-
0.93.5
- Fix the
jobserver
minimum version (fixes #639)
- Fix the
-
0.93.4
- Various documentation, callback handling and other internal improvements.
-
0.93.3
- Fix issue with using
Option<Ptr>
, now behaves as expected and doesn't segfault. - Introduce
Mat::get_data_dump()
to get the dump of the Mat data, it's also included in theDebug
output. - Improve formatting of the generated bindings.
- Fix issue with using
-
0.93.2
- Fix binding generation using clang-19.
-
0.93.1
-
0.93.0
- Improve automatic slice detection, e.g.
CommandParser::new()
now calculatesargc
automatically. find_circles_grid
now can takeNone
theblob_detector
argument.- Rework the handling of static library linkage.
- Allow passing custom clang args via
OPENCV_CLANG_ARGS
environment variable.
- Improve automatic slice detection, e.g.
-
0.92.3
- Add an irreversible conversion from
BoxedRefMut
toBoxedMut
. - Fix handling of arrays of strings, fixes
CommandLineParser
(kudos to niemeyer).
- Add an irreversible conversion from
-
0.92.2
- Fix new warnings with Rust 1.80
- Don't export
ocvrs_create_string
andocvrs_create_byte_string
from the rlib to allow combining multipleopencv
create versions as dependencies.
-
0.92.1
- Implement
Send
andSync
where applicable forMat
,Ptr
andTuple
. - Introduce new
Mat
constructors that take byte slices:from_bytes
/_mut
andnew_rows_cols_with_bytes
/_mut
- Add missing
Mat_::at_row
/_mut
methods.
- Implement
-
0.92.0
- Add
DoubleEndedIterator
impl forVector
and simplify trait bounds. - Type aliases for
Vector
(VectorOf...
),Ptr
andTuple
are now deprecated. - Add missing
Mat_
methods, speed upMat::at*()
andMat_::at*()
methods slightly. Allow callingat()
method on aMat
with more than 2 dimensions. - Improved typedef generation that led to changing of some typedef names, e.g.
va_display
→VADisplay
. Typedefed types are now also preserved in function signatures. - Fix several cases where returned objects were not usable and led to a segfault, e.g.
SparseMap::hdr()
. - Add a helper to accommodate calling OpenCV functions that can modify a
Mat
in place, usemodify_inplace()
method.
- Add
-
0.91.3
- Add workaround for #548.
-
0.91.2
- Generate functions for converting DirectX objects to OpenCL.
- Allow creation of
Vector<BoxedRef<T>>
and using it asToInputArray
(fixes #555).
-
0.91.1
- Add
TryFrom<i32>
impls for enums to allow easy fallible conversions fromi32
.
- Add
-
0.91.0
- Multiple improvements for
InputArray
/OutputArray
/InputOutputArray
handling:- It's now possible to use the following types as
InputArray
:&[u8]
/[u8; N]
,Vector<bool>
Vector<GpuMat>
and the following asInputArray
,OutputArray
orInputOutputArray
:Vector<Mat>
andVector<UMat>
. InputArray
/OutputArray
/InputOutputArray
constructors now returnBoxedRef
/BoxedRefMut
to express the borrowing semantics.- Some constructors have received
_mut
suffix where appropriate.
- It's now possible to use the following types as
- Unsafe
Mat
constructors (*_with_data
) have received_unsafe
suffix and safe versions have been introduced that returnBoxedRef
/BoxedRefMut
. Consequently,Mat::from_slice_rows_cols
was replaced byMat::new_rows_cols_with_data
, note the different order and types of the arguments. MatSize::new
is now unsafe and accepts a pointer.
- Multiple improvements for
-
0.90.0
- Automatically generate default constructors for classes where possible.
- Backwards-incompatible changes:
LayerParams::default()
can no longer fail, so it returnsSelf
withoutResult
.GpuMat::default()
is nowGpuMat::new_def()
.- Automatically named functions (*_1) in
features2d
module were given proper names. - Generate bindings to
float16_t
andhfloat
types to fix the build with the current OpenCV master.
-
0.89.0
- All functions accepting classes now take
impl ClassTrait
instead ofClass
directly. This allows passing other objects that implement the same trait. This change should be backwards compatible. - Some functions, notably
Mat::roi()
, now return aBoxedRef<Mat>
wrapper instead of seemingly independentMat
. This fixes old soundness hole because the returnedMat
was actually a view into the sourceMat
and you could easily end up with 2 mutable references to the same memory. An additional*_mut()
is generated for each of such function to return a mutableBoxedRefMut<Mat>
. To get 2 mutable references to the sameMat
for the non-intersecting regions use the newMat::roi_2_mut()
function. - Slice detection improved, slice arguments in more functions are now generated automatically.
- Some slices in function arguments are now references to arrays of particular size. To migrate call
.try_into()
to convert the slice to the array. - The error message for the unspecified error (should never actually be visible) is changed to "Unspecified error, neither from OpenCV nor from std".
- Function signature changes:
- A group of functions for
Mat
,UMat
,GpuMat
andGpuMatND
have been given proper names (rowscols
,roi
,ranges
,col_bounds
). Consequently, e.g.roi
function can now be called on theMat
instance (mat.roi()
) instead of requiring a fully qualified call (Mat::roi(&mat)
). MatConstIterator::pos_to()
is now unsafe and takes a pointer instead of a reference.
- A group of functions for
- All functions accepting classes now take
-
0.88.9
- Fix building on macOS with vcpkg (fixes #549).
-
0.88.8
- Fix the build hang with the latest version of
cc
(fixes #480). - Minimum supported Rust version is now 1.66.0.
- Fix the build hang with the latest version of
-
0.88.7
- Improve handling of input strings (fixes #534).
-
0.88.6
- Regenerate documentation with OpenCV 4.9.0.
-
0.88.5
- Adjust to the upcoming changes in OpenCV (fixes #518).
-
0.88.4
- More fixes for clang 17 (kudos to PaulWagener).
-
0.88.3
- Add
Mat::iter_mut()
and improveMat
iteration performance.
- Add
-
0.88.2
- Fix build with clang 17 (fixes #519).
-
0.88.1
- Generate
Vector<Vector<Point2d>>
bindings forccalib
module.
- Generate
-
0.88.0
- Detect more cases where a Rust slice can be passed to an OpenCV function.
- Generate both const and mut property readers where possible. Previously only mut readers were generated.
- Rename some more automatically named functions.
- Add conversion from an enum into a
i32
. - Bump minimum supported Rust version to 1.65.
- Generate additional
Vector
bindings forccalib
module.
-
0.87.0
- This version is skipped due to the release process gone wrong.
-
0.86.1
- Provide a clearer message for the case when
libclang
can't be loaded.
- Provide a clearer message for the case when
-
0.86.0
- Add support for
operator =
viaset
method. - Improve documentation generation.
- Fix several automatically functions.
- Add support for
-
0.85.3
-
0.85.2
- Fix binding generation using clang-6 (fixes #496).
- Add more
From
implementations forScalar
to improve API usability.
-
0.85.1
- Add workaround when building with rustc version before 1.66.
-
0.85.0
- Generate companion functions
*_def()
that allow skipping the default arguments to improve API usability. - Remove bindings to
SparseMatIterator--
and changeOutputArray::from_gpu_mat_vec()
to take mutable argument (instead ofOutputArray::from_gpu_mat_vec_mut()
which is now removed). Those functions were often missing in the OpenCV shared libraries causing linking errors. - Update automatic case conversion algorithm to increase performance and improve correctness. Some function names are now
slightly different. Especially those containing
2d
and3d
. - Improve documentation generation.
- Generate companion functions
-
0.84.5
- Improve parallel build performance (more noticeable on lower thread count).
- Take
VCPKGRS_TRIPLET
environment var into account for crate rebuild. - Add a way to select MSVC CRT library with
OPENCV_MSVC_CRT
environment variable. - Make sure to always generate bindings for
Ptr<float>
(fixes #487).
-
0.84.4
- Workaround for a build hang due to
cc
dependency
- Workaround for a build hang due to
-
0.84.3
- Update docs
-
0.84.2
-
0.84.1
- Fix build targeting Android (fixes #477).
-
0.84.0
- Detect more cases where a Rust
char
can be used. - Remove deprecated
DataType::depth()
,DataType::channels()
andDataType::typ()
functions. - Speed up binding generation by reducing number of passes (3 → 2) and removing the usage of
ocvrs_ephemeral.hpp
. - Generate more casts (to base and to decendants) for
Ptr
s and classes.
- Detect more cases where a Rust
-
0.83.0
- Add support for OpenCV 4.8.
- Tune naming for classes in
rapid
and CUDA modules. - Add a
Debug
implementation for all classes and smart pointers.
-
0.82.1
- Fix generation issue with specific module setup involving
dnn
module.
- Fix generation issue with specific module setup involving
-
0.82.0
- Change the handling of abstract C++ classes, they are no longer exposed as
dyn Class
but a struct is generated for them making them easier to use from Rust. One notable change is calling static methods on those classes no longer requires UCS. So<dyn ORB>::default()
becomes justORB::default()
. You might also need to adjust your imports because while traits are imported as part of the prelude, the structs need to be imported explicitly. - Functions that take
Input/OutputArray
now take them by&impl
instead of&dyn
making those calls faster because they don't use dynamic dispatch anymore.
- Change the handling of abstract C++ classes, they are no longer exposed as
-
0.81.5
- Bring back the
clang-runtime
feature to improve cooperation with other crates.
- Bring back the
-
0.81.4
- Change the way the binding generator is run decreasing the complexity and improving the compatibility with vendored builds.
-
0.81.3
- Don't require
runtime
feature ofclang
.
- Don't require
-
0.81.2
- Fix building when crosscompiling with target-specific RUSTFLAGS.
-
0.81.1
- Fix building on macOS (fixes #460).
-
0.81.0
- Fix compilation when using clang-6.
- Add hough_lines example.
- Add
Scalar::is_real()
. - Apply proper naming to some methods from RNG.
-
0.80.0
- Generate default constructors for some classes that were missing any form of construction.
-
0.79.0
DataType
can now be implemented by downstream types that will allow storage of some custom types insideMat
. Previously this trait was sealed, now it's an unsafe trait because types must guarantee the memory layout.0- Calling
.iter()
on an emptyMat
no longer returns an error, but an empty iterator. - Some functions like
Point_::new()
orSize_::new()
are nowconst
. - Minor documentation updates.
-
0.78.2
- Fix compilation with clang 16
-
0.78.1
- Automatically implement
Clone
for those classes that are constructor-copiable in C++, e.g.KeyPoint
. - Fixes for crosscompiling (kudos to icedrocket).
- Automatically implement
-
0.78.0
- Don't strip "lib" prefix from linked libraries when building with MSVC (kudos to icedrocket)
- Fix newline handling on Windows (kudos to grindvoll)
- Fix for the build failure against the upcoming OpenCV version.
-
0.77.0
- Rename
typ()
,channels()
,depth()
toopencv_type()
,opencv_channels()
,opencv_depth()
. The old functions are scheduled for removal mid-2023. - Generate
DrawLinesMatchesFlags
enum correctly. - Make sure to generate
Vector<Point2d>
forcalib3d
module (fixes #422).
- Rename
-
0.76.4
- Fix autocomplete and documentation for rust-analyzer based IDEs.
-
0.76.3
- Introduce
Mat::from_slice_rows_cols()
function to simplify creation of 2d matrices from byte buffers. - Improve documentation.
- Introduce
-
0.76.2
- Fix incorrect display of macros in documentation, some internal macros were showing up, but some usable were not.
-
0.76.1
- Fix build failure.
-
0.76.0
- Change the way the generated bindings are stored. They are no longer generated under
src/
, but stored in the output directory and included dynamically. Previously it didn't work very well with IDEs which resulted in missing autocomplete and documentation. This looks to be working correctly now at least inrust-analyzer
andintellij-rust
. - Bump crate edition to 2021 (from 2018) and require at least Rust 1.59.0 (the MSRV check is now included in CI).
- Start phasing out OpenCV 3.2 support. This does not mean immediate breakage, but it's no longer going to be tested and problems in generation for that outdated and unsupported version will no longer be addressed.
- Change the way the generated bindings are stored. They are no longer generated under
-
0.75.0
- Add support for OpenCV 4.7.0.
- Add support for C++ function call operator:
operator ()
.
-
0.74.2
- Adjust dependencies to ensure that
jobserver
is the appropriate version (fixes #400).
- Adjust dependencies to ensure that
-
0.74.1
- Fix building when
-j1
cargo option is specified (fixes #380).
- Fix building when
-
0.74.0
- Add support aruco_detector module present in the future opencv_contrib.
-
0.73.0
- Add basic support for the Graph-API (gapi) module.
- Generate bindings for
std::tuple
andstd::pair
. - Add support for the following operators:
!=
,>
,>=
,<
,<=
,&
,|
,^
,~
. - Correctly handle rvalue reference (
&&
) as move operation. - Due to multiple internal improvements some functions have slightly changed names.
-
0.72.0/0.72.1
-
0.71.0
- Multiple improvements to the
Vector
type:VectorRefIterator
is now cloneable.- Better performance and correctness for
Vector
iterators. - Implement
Vector::from_elem()
. - Make sure that
Vector<T: Send + Sync>
is alsoSend + Sync
.
- Fix building on platforms where
c_char
≠u8
.
- Multiple improvements to the
-
0.70.0
- Internal improvements and reorganization
-
0.69.0
- Fix building with clang-15.
- Rename
distort_points
tofisheye_distort_points
for consistency.
-
0.68.0
- Make sure that
howToGetFeatures
argument of thecreateStructuredEdgeDetection()
is nullable. - Add
OutputArray
andInputOutputArray
implementations forMat_
.
- Make sure that
-
0.67.0
- Change
fourcc
method to acceptchar
s instead ofi8
s. - Remove
gapi
feature as this module is not supported at the moment.
- Change
-
0.66.0
- Generate
valid_pix_roi
argument ofget_optimal_new_camera_matrix
as optional argument (fixes #349). clang-runtime
feature has been dropped and the associated behavior is now the default. It's caused by the changed API of theclang
crate.
- Generate
-
0.65.0
- Improve generation for OpenCV 4.6.0.
-
0.64.1
- Improve function documentation generation (fixes #266).
-
0.64.0
- Fix documentation for conditional compilation macros.
- Make sure to generate
VectorOfPoint3f
andVectorOfVectorOfPoint3f
forcalib3d
module. - Disable generation of
merge_slice
function because it's not usable from Rust.
-
0.63.2
- Introduce macros that allow external crates to conditionally include code based on the OpenCV branch (3.2, 3.4 or 4).
-
0.63.1
- Provide
From
implementations from tuples and similar C++ conversions forPoint
,Size
,Rect
andPoint3
.
- Provide
-
0.63.0
-
0.62.0
- Fixed a segfault when using functions that return small structures (like Point2f) with some C++ compiler combinations, e.g. when using repository OpenCV with the default compiler in Ubuntu 20.04.
- Fix segfault and error handling while casting to descendant classes.
- Test with OpenCV 4.5.5 and 3.4.17.
-
0.61.3
- Implement
ToInput/OutputArray
forScalar
and all other often used combinations ofVecN
. - Fix building on macOS with OpenCV as framework.
- Implement
-
0.61.2
- Add support for parsing
CV_NODISCARD
attributes, they are converted to#[must_use]
.
- Add support for parsing
-
0.61.1
- Make sure that
VectorOfVectorOfPoint
type is generated for theimgproc
module.
- Make sure that
-
0.61.0
- The QR code decoding function in
objdetect
module are now returningVec<u8>
instead ofString
because the codes can contain binary raw binary data and are not always UTF-8. - You can now iterate over
Mat
usingfor
loop. The iterator will yield elements of type(Point, T)
, a position and an element.
- The QR code decoding function in
-
0.60.0
- The features for OpenCV module selections now have inter-dependencies so that you can't exclude a module that's needed for some other one.
- Infallible functions returning references should be faster now due to the streamlined error handling.
- More simple functions are marked as infallible (e.g.
Mat::total()
,Mat::depth()
). - Functions that returned references to some internal data (e.g.
Mat::ptr()
,Mat::data_mut()
) now return raw pointers, it makes more sense and allows checking for null pointer outside of call. The corresponding property setters also accept pointers. - Functions that accept raw pointers are now marked as unsafe.
-
0.59.0
- You can now select which OpenCV modules you want to include in generation using the crate features, there is a feature for
every OpenCV module except core. This supersedes the old system with environment variables
OPENCV_MODULE_WHITELIST
andOPENCV_MODULE_BLACKLIST
, they are no longer supported (kudos to nsabovic). - You can now use the
rgb
crate types as elements ofMat
, just enable thergb
feature (kudos to fzyzcjy). - You can now use
Vector::from_slice()
for a faster construction ofVector
from a slice. This only works for simple types likeu8
orPoint
.
- You can now select which OpenCV modules you want to include in generation using the crate features, there is a feature for
every OpenCV module except core. This supersedes the old system with environment variables
-
0.58.0
- Infallible functions are no longer using exception handling internally so they should be faster.
core::Vec
is renamed tocore::VecN
to avoid name conflict with std'sVec
.- The
dnn::TextDetectionModel
struct is now generated correctly for newer OpenCV's.
-
0.57.0
- Add support for mathematical operations on
Mat
(kudos to fzyzcjy). VecNT
(e.g.Vec3b
) are now rewritten using const generics which makes them more flexible. That raises the minimum Rust version requirement to 1.51. Also be mindful of the name clash betweenopencv::core::Vec
andstd::vec::Vec
.- Added mathematical operations on
Vec
that are available in the OpenCV library. - Added support for generating bindings for the
==
operator.
- Add support for mathematical operations on
-
0.56.1
- Structs that have infallible default constructors (e.g.
Mat
) now implementDefault
trait. - Make sure to generate
std::vector<cv::Vec[23][fd]>
bindings forimgproc::HoughLines
function.
- Structs that have infallible default constructors (e.g.
-
0.56.0
- Mark most exported functions as
#[inline]
to facilitate inter-crate inlining. Those function calls are just wrappers around the corresponding FFI function. - Adjust the code to support OpenCV 4.5.4 better.
- Allow passing
None
tominMaxLoc
andminMaxIdx
functions.
- Mark most exported functions as
-
0.55.0
- add
Mat::data_bytes[_mut]()
methods to access byte data insideMat
as slice,Mat::data()
now returns raw pointer instead of reference.
- add
-
0.54.0
- highgui::create_trackbar now takes
Option<&mut i32>
forvalue
to fix the deprecation warning (fixes #261). - Class traits are now split into const and mut variants. So what previously was
MatTrait
is nowMatTraitConst
with only const methods andMatTrait
with only mut methods.
- highgui::create_trackbar now takes
-
0.53.2
- Fix building with cmake versions below 3.15.
-
0.53.1
- Add support for casting classes to their bases. You can now call
.into()
on the descendant class to cast it to the parent. - Add support for newly released OpenCV 4.5.3 and 3.4.15.
- Minor improvements in the
vcpkg
support.
- Add support for casting classes to their bases. You can now call
-
0.53.0
- This release removes some features and environment variables to make the crate easier to use:
buildtime-bindgen
is removed. With all the possible OpenCV configurations out there it was practically impossible to build the crate without regenerating bindings to fit your exact installation.opencv-32
,opencv-34
andopencv-4
branch selection features are removed too. Version selection is now performed in build-time. If you were using those features in yourCargo.toml
then just remove them (anddefault-features = false
can probably go too).- Support for
OPENCV_CLANG_STDLIB_PATH
environment variable is removed. If you were using it, then you can add that directory as part ofOPENCV_INCLUDE_PATHS
. E.g.:OPENCV_INCLUDE_PATHS="<path_to_clang_stdlib_path>,+"
- Support for
OPENCV_HEADER_DIR
is also removed. It was meant to be development-only environment variable, and it's no longer needed in the development process.
- The crate is now smaller due to dropping of the bundled headers and bindings.
- Fixes for building with older OpenCV versions (fixes #227)
- This release removes some features and environment variables to make the crate easier to use:
-
0.52.0
- Add support for OpenCV 4.5.2 and 3.4.14
- In those new OpenCV versions some methods are now marked NOEXCEPT which makes them return result directly,
without the wrapping Result. Most notable of those new methods is
Mat::default
, which now returns aMat
directly. To keep the examples and tests running those methods are also manually marked as NOEXCEPT for previous versions of OpenCV. - The "contrib" feature flag is there no more, the crate now uses build-time module set detection, so just drop
it from your
Cargo.toml
if you've been using it.
-
0.51.0
- Make sure that casts to Ptr are also generated (fixes #218)
- Port text detection example (requires OpenCV 4.5.1)
- Adjust some function names
-
0.50.0
- Improve smart pointer handling (
Ptr
), deeper analysis now generates more necessaryPtr<T>
bindings and allPtr<Child>
types are now castable toPtr<Parent>
when it's required by the OpenCV API (fixes #217) - Module-level documentation generation for
tracking
module is now fixed
- Improve smart pointer handling (
-
0.49.1
- Improved processing of environment variables
-
0.49.0
- Fix conversion of slice arguments, allow nullable slices (fixes #201)
-
0.48.0
- Fix binding-generator build in cross-compilation environment (kudos to tylerhawkes)
- Using
dnn_superres
now requirescontrib
feature enabled, it was incorrectly marked as core module
-
0.47.0
- Fix building with OpenCV 4.5.1 and 3.4.13
- Due to the code adjustments, some
VectorOf...
types are no longer generated (e.g.VectorOfPoint3i
) - The documentation for
tracking
module is now a copy ofimgproc
, which is a bug
-
0.46.3
- Specify minimum required vcpkg version
-
0.46.2
- Bring back deprecated cmake find-package discovery as a fallback, it's still useful in some cases
-
0.46.1
- Improve cmake package detection (and remove deprecated find-package)
- Re-enable parallel building with
clang-runtime
feature enabled - Add support for appending user values to detected OpenCV build configurations like include paths or link paths
- Fix generation with OpenCV 4.5.0
- Minimal required rust version is now 1.45.0 due to usage of
str::strip_prefix
-
0.46.0
- Fix linking in some configurations (#164)
- Fix argument name clashing in external functions
-
0.45.1
- Internal improvements in const handling
- Fix warnings in beta
- Misc CI improvements
-
0.45.0
- Add implementation of
From<Vec<T>>
forVector<T>
+ misc vector improvements - Enable OpenGL functions and classes from the
core
module
- Add implementation of
-
0.44.2
- Fix building with Apple clang
- Show libclang diagnostics during binding generation
-
0.44.1
- Fix docs.rs build
-
0.44.0
- Add support for ovis module
- Add implementation of Ptr::new for non-abstract types
- Rework string handling, that fixed core::convert_type_str() function which was handling memory very unsafely before
- Internal refactor of cpp const handling, that changed the internal function identifiers
-
0.43.3
- Test with the newly released OpenCV 3.4.11 and 4.4.0
- Internal cleanups and CI fixes
-
0.43.2
- Fix build on RPi (fixes #157)
-
0.43.1
- Fix docs.rs build
-
0.43.0
- Add
Clone
implementation (that panics on error) forMat
,SparseMat
,UMat
,GpuMat
andHostMem
. - Add
Vector::as_mut_slice()
for copy types. - Add
Vector::clone()
for types withClone
implementation (based on work of carbotaniuman).
- Add
-
0.42.0
- Enable CUDA support, check
examples/cuda.rs
for a bootstrap. buildtime-bindgen
is now enabled by default, compilation without it enabled rarely worked in reality. You can still disable it by disabling default features.Vector
now implementsInto<Vec>
,Debug
,AsRef
,Borrow
,Default
,Extend
andFromIterator
,Vector::to_slice
was renamed toVector::as_slice
(kudos to jerry73204 and carbotaniuman).- Improve tests and examples.
- Internal reorganization for better logic separation.
- Enable CUDA support, check
-
0.41.1
- Revert the parallelization of the build when
clang-runtime
is enabled, it led to #145
- Revert the parallelization of the build when
-
0.41.0
- Enable parallel build even if
clang-runtime
is enabled (it uses helper generator binary in multiple threads) - Enable most of the remaining contrib modules, namely: quality, saliency, stereo, ximgproc, tracking, rgbd, hfs and optflow.
- Move all the remaining methods from
VectorTrait
toVector
struct and removeVectorTrait
. - Improve
Mat_
usability. - Enable class constant generations (these were previously methods).
- Fix the issue where functions accepting strings will not reject strings with null characters in them, but silently truncate them.
- Enable parallel build even if
-
0.40.1
- Fix parsing of cmake output during package discovery (fixes #136)
- Prefer vcpkg over cmake when building on Windows (fixes #137)
-
0.40.0
- Optimized dependencies, the crate has now 19 (including transitional) dependencies less.
- Fixed pre-generated bindings for version 3.4 that got left out in the previous release.
-
0.39.0
- Iterators for
Vector
now correctly return remaining length insize_hint
andlen
methods. - Internal improvements and cleanups
- Iterators for
-
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 #110 - Fix examples
-
0.33.1
- Internal rework of
VectorOf…
generation logic, fix #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
- Ancient history