[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: OpenCV bindings for Lua
- From: Gaspard Bucher <gaspard@...>
- Date: Sun, 9 Jan 2011 15:56:57 +0100
I do not have the horsepower to manage too many standalone projects. Keeping a piece of code working and clean is something I can do, but I do not want to deal with the overhead of another git repository, luarocks settings, etc.
OpenCV is also not a very easy project to compile and install, so my plan is to provide binary installations for rubyk which contains opencv bindings (and all required libs).
If you are just interested in the bindings, the simplest solution is probably to:
> cd lubyk
> mkdir build
> cd build
> cmake ..
> make cv
==> creates
lib/cv.lua (loader)
lib/cv/vendor.so (opencv lib as so object)
lib/cv/core.so (bindings)
I just moved the files into the latest head and tested compilation on Mac OS X. The version of openCV I am linking against is not the latest but it works (I have not rewritten the testing code, but it loads and I can create a cv.Mat).
As I said, this is a "raw" binding without any helpers to access raw matrix data and such. If anyone wants to enable pixel access with:
m = cv.Mat(300, 300, cv.CV_8UC1)
for i=1,300 do
for j=1,300 do
-- set
m[i][j] = i * j * 255 / 90000
-- get
print(m[i][j])
end
end
I'd be *very* glad to include such helpers... (m[i] could return m->row() if rows > 1 or the pixel value if rows == 1).
Cheers,
Gaspard
On Sun, Jan 9, 2011 at 2:03 PM, Michal Kottman
<k0mpjut0r@gmail.com> wrote:
On Sun, 2011-01-09 at 13:45 +0100, Gaspard Bucher wrote:
> As for Qt, the bindings are not intended to be "all qt" like
> https://github.com/mkottman/lqt but highly integrated parts that will
> be added as need arise.
>
>
> OpenCV bindings exist but are still experimental (could crash).
I'm interested in OpenCV bindings for Lua, I've been trying to create
complete bindings myself, using the same generator we use in Lqt,
however without much luck (the OpenCV library headers are not as well
organized as Qt).
Are you planning to release it as standalone library?