A handwritten OpenCV binding for Lua.
To build LuaOCV, you need
- GNU Make
- pkg-config
- A C++11 compatible compiler
- OpenCV 4.x
- Lua 5.4 interpreter
installed on your system.
For the simplest build, run
$ make
in the repository, this will produce luaocv.so
, the loadable Lua module.
LUA_PKGNAME
: pkg-config package name of Lua (lua-5.4
)CV_PKGNAME
: pkg-config package name of OpenCV (opencv4
)LUA_CXXFLAGS
: CXXFLAGS for Lua (detect with pkg-config)CV_CXXFLAGS
: CXXFLAGS for OpenCV (detect with pkg-config)LUA_LDFLAGS
: LDFLAGS for Lua (detect with pkg-config)CV_LDFLAGS
: LDFLAGS for OpenCV (detect with pkg-config)CROSS_COMPILE
: Prefix for cross-compilation toolchain (None)CXX
: C++ Compiler ($(CROSS_COMPILE)g++
)CXXLD
: Linker ($(CROSS_COMPILE)g++
)DYN_FLAGS
: Flags forCXX
andCXXLD
to produce shared library (-shared -fPIC
)RELEASE
: Build a RELEASE library when set to 1 (None)
A release build disables boundary checks and enables optimization, make the code faster to run, but harder to debug.
default
: Build the libraryclean
: Clean object filesdisbuild
: Clean object files also with the library
There are some tests for LuaOCV in tests
. Before run them, the library need
to be built first.
Use run.sh
to do testing.
$ test/run.sh # run all tests
$ test/run.sh lua5.4 # run all tests with interpreter "lua5.4"
$ test/run.sh lua5.4 core # run test "core" with interpreter "lua5.4"
See doc
directory.
Release under MIT License. Copyright (c) 2024 Yao Zi. All rights reserved.