-
0.38.0
- Fix crosscompilation when targeting Windows platform.
- Fix generation of bigger binaries
-
0.37.0
- Add
clang-runtime
feature for compatiblity with dependencies that requireclang
orclang-sys
that enable itsruntime
feature unconditionally (likebindgen
). - Add
OPENCV_CLANG_STDLIB_PATH
environment variable to allow working around header detection of libclang when it fails (should fix #125). - Stop using synchronization primitives for callback handling.
- Improve cmake based library discovery.
- Add
-
0.36.0
- Large internal rework of
Matx
,PtrOf…
andVectorOf…
structs. They have been made generic and their code generation have been mostly moved to Rust macros. This change should have no user facing consequences, type aliases with the old names are kept for backwards compatibility and code brevity. - Methods for accessing raw pointers for boxed classes have been moved into a common
Boxed
trait. Additionally,from_raw_ptr()
is nowfrom_raw()
,as_raw()
is now returning*const c_void
(as opposed tomut
) and new methods have been added:as_raw_mut()
,into_raw()
. This applies to all structs that are allocated by C++ side (e.g. Mat),Ptr<T>
andVector<T>
. TermCriteria
is now a simple class so you can write and read its properties directly without using accessor methods, APIs involving this class have also been updated.- C++ operators * (multiplication, dereferencing), / (division), + (addition) and - (subtraction) are now
also exposed to Rust under function names
mul_*
/try_deref
,div_*
,add_*
andsub_*
.
- Large internal rework of
-
0.35.0
- Add beta-level support for doing OpenCV library discovery using cmake, which is now a recommended method by the upstream.
- Add ability to override
OPENCV_LINK_LIBS
,OPENCV_LINK_PATHS
andOPENCV_INCLUDE_PATHS
in case of library auto-discovery. This doesn't work for vcpkg yet. - Add ability to introduce to specify package names separately for different auto-discovery systems using
OPENCV_PKGCONFIG_NAME
,OPENCV_CMAKE_NAME
andOPENCV_VCPKG_NAME
.
-
0.34.0
- Bump bindings to OpenCV version 4.3.0 and 3.4.10
- Mark
Mat::new_*_with_data
functions unsafe because they allow passing arbitrary data pointer - Sort out internal generation of string return type wrappers, should help on some platforms in avoiding
buildtime-bindgen
, see twistedfall#110 - Fix examples
-
0.33.1
- Internal rework of
VectorOf…
generation logic, fix twistedfall#109
- Internal rework of
-
0.33.0
- Basic support for building against OpenCV.framework on macOS, for details see ci files
- Fix internals of
PtrOff32
- Big internal refactoring getting rid of most instances of type casting and
void*
-
0.32.0
- Improve Matx: better api ergonomics, add PartialEq, add ToInput/OutputArray implementations, add tests
- 'u_mat' the method names is now 'umat' (underscore removed)
-
0.31.1
- Fix passing bigger simple classes as arguments
-
0.31.0
- Add from/to_vec method to
Point_
andPoint3_
- Add basic implementations of
Mat_
,Matx
andAffine3
generic types, and OpenCV methods that use them - Rename
Mat::*_mut_unchecked
methods to*_unchecked_mut
for consistency with std library
- Add from/to_vec method to
-
0.30.1
- Dummy version to fix docs.rs build
-
0.30
-
Total rewrite of the binding generator in Rust. It no longer relies on Python, but instead uses libclang to parse the C++ code. Please be sure to install clang/llvm in your system if you're going to regenerate bindings (mostly macOS and Windows users). You can expect all of the previous functionality to be there (sans name changes) and a lot of new functions and classes. Binding generation is now more precise and quick.
-
While most of the crate interface remain the same there are some quite changes in the API:
- Some functions have changed name to the one hinted in the OpenCV headers, e.g.
core::sum()
is nowcore::sum_elems()
. - Some functions got renamed for more consistency (e.g.
VideoCapture
constructors) or to avoid the name clash with the newly generated functions (likeMatConstIterator::get
→current
). Please use the documentation to discover the new name. - A bunch of functions got renamed from their _1 automatic names.
- Names that coincide with Rust keywords now get underscore at the end, not the beginning, e.g.
_ref
becomesref_
. Moreovertype_
is nowtyp
. - Vector types now receive their Rust type suffix, so
VectorOfuchar
gets renamed toVectorOfu8
.
- Some functions have changed name to the one hinted in the OpenCV headers, e.g.
-
FileStorage
/FileNode
API is now usable. -
Some methods (like
Mat::new_nd_with_default
) now accept slices instead ofVector
s. The length of the Rust slice is passed down to the OpenCV. -
Traits are now used way more through the API, importing prelude is a must (
use opencv::prelude::*;
). There are also separate preludes per module should you want to use that (use opencv::imgproc::*;
). -
All enums are now generated.
-
Full property access, you can now read and write all public properties of the OpenCV classes through getters and setters.
-
You can now access properties for
PtrOf...
objects directly without the need to go throughget()
andget_mut()
(those methods are now dropped, they were unsound). -
All property setters and getters are now infallible so they don't return
Result
, but a value directly. -
_OutputArray
and_InputOutputArray
have received a second set of constructorsfrom_*_mut
, so if you use those manually you most probably want to use*_mut
version instead of the const one. -
New modules: face, surface_matching, text
-
Calling
Mat::data_typed()
andMat::data_typed_mut()
will now dois_continuous()
check and return an error if it's false.
-
-
0.29.2
- add ability to get reference to the inner value of non-trait
PtrOf*
types (kudos to jerry73204)
- add ability to get reference to the inner value of non-trait
-
0.29.1
- fix generation of setters for properties (kudos to jerry73204)
-
0.29
-
default features now target OpenCV 4.2.0 (instead of OpenCV 3.4.x). Feature
opencv-42
was renamed toopencv-4
. Bindings were bumped to OpenCV 4.2.0 and 3.4.9. -
core::MAKETYPE was renamed to CV_MAKETYPE, core::MAT_DEPTH was renamed to CV_MAT_DEPTH
-
-
0.28
- dnn::BackendNode constructor as well as stitching::createStitcher and stitching::createStitcherScans are no longer generated for the OpenCV version where they are not available, fixing the linking issues
-
0.27.0
-
add support for
vcpkg
when building for windows, it's being used by default in the absence of environment variables -
with
buildtime-bidngen
feature enabled the crate no longer uses bundled source files for code generation by default, but the ones installed with OpenCV library detected bypkg_config
,vcpkg
or environment; setOPENCV_HEADER_DIR
environment variable to override this behavior
-
-
0.26.6
- ...