0.63.0 Regenerate bindings
MODIFY
CHANGES.md
CHANGES.md
+* 0.63.0
+ * Provide bindings for `++` and `--` operators (fixes [#319](https://github.com/twistedfall/opencv-rust/issues/319))
+ * Drop type restrictions for `Rect_`, `Point_`, `Size_`, `Point3_`, `VecN` (and related structs) (fixes [#316](https://github.com/twistedfall/opencv-rust/issues/316))
+ * Make sure that `VectorOfVectorOff64` is generated for calib3d module (fixes [#321](https://github.com/twistedfall/opencv-rust/issues/321))
+
* 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.

MODIFY
Cargo.toml
Cargo.toml
@@ -6,7 +6,7 @@ repository = "https://github.com/twistedfall/opencv-rust"
readme = "README.md"
keywords = ["opencv", "vision"]
license = "MIT"
-version = "0.62.0"
+version = "0.63.0"
edition = "2018"
authors = ["Pro <twisted.fall@gmail.com>", "Mathieu Poumeyrol <kali@zoy.org>"]
autoexamples = false # not all examples compile on just any system
@@ -60,7 +60,7 @@ once_cell = "1.0"
rgb = { version = "0.8.20", features = ["argb"], optional = true }
[build-dependencies]
-binding-generator = { package = "opencv-binding-generator", version = "0.40.0", path = "binding-generator" }
+binding-generator = { package = "opencv-binding-generator", version = "0.41.0", path = "binding-generator" }
cc = { version = "1.0", features = ["parallel"] }
clang = { version = "1.0", features = ["clang_6_0"] }
dunce = "1.0"

MODIFY
README.md
README.md
@@ -15,7 +15,7 @@ generation) are installed in your system.
Update your Cargo.toml
```toml
-opencv = "0.62"
+opencv = "0.63"
```
Import prelude

MODIFY
binding-generator/Cargo.toml
binding-generator/Cargo.toml
name = "opencv-binding-generator"
description = "Binding generator for opencv crate"
repository = "https://github.com/twistedfall/opencv-rust"
-version = "0.40.0"
+version = "0.41.0"
license = "MIT"
authors = ["Pro <twisted.fall@gmail.com>"]
edition = "2018"

MODIFY
src/opencv/hub/core.rs
src/opencv/hub/core.rs
@@ -9960,6 +9960,17 @@ pub trait FileNodeIteratorTraitConst {
pub trait FileNodeIteratorTrait: core::FileNodeIteratorTraitConst {
fn as_raw_mut_FileNodeIterator(&mut self) -> *mut c_void;
+ /// moves iterator to the next node
+ #[inline]
+ fn incr(&mut self) -> Result<core::FileNodeIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_FileNodeIterator_operatorAA(self.as_raw_mut_FileNodeIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { core::FileNodeIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
/// Reads node elements to the buffer with the specified format.
///
/// Usually it is more convenient to use operator `>>` instead of this method.
@@ -14072,6 +14083,28 @@ pub trait MatConstIteratorTrait: core::MatConstIteratorTraitConst {
ret
}
+ /// decrements the iterator
+ #[inline]
+ fn decr(&mut self) -> Result<core::MatConstIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_MatConstIterator_operatorSS(self.as_raw_mut_MatConstIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
+ /// increments the iterator
+ #[inline]
+ fn incr(&mut self) -> Result<core::MatConstIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_MatConstIterator_operatorAA(self.as_raw_mut_MatConstIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { core::MatConstIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
/// ## C++ default parameters
/// * relative: false
#[inline]
@@ -18274,6 +18307,28 @@ pub trait SparseMatConstIteratorTrait: core::SparseMatConstIteratorTraitConst {
ret
}
+ /// moves iterator to the previous element
+ #[inline]
+ fn decr(&mut self) -> Result<core::SparseMatConstIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_SparseMatConstIterator_operatorSS(self.as_raw_mut_SparseMatConstIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
+ /// moves iterator to the next element
+ #[inline]
+ fn incr(&mut self) -> Result<core::SparseMatConstIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_SparseMatConstIterator_operatorAA(self.as_raw_mut_SparseMatConstIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { core::SparseMatConstIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
/// moves iterator to the element after the last element
#[inline]
fn seek_end(&mut self) -> Result<()> {
@@ -18379,6 +18434,17 @@ pub trait SparseMatIteratorTraitConst: core::SparseMatConstIteratorTraitConst {
pub trait SparseMatIteratorTrait: core::SparseMatConstIteratorTrait + core::SparseMatIteratorTraitConst {
fn as_raw_mut_SparseMatIterator(&mut self) -> *mut c_void;
+ /// moves iterator to the next element
+ #[inline]
+ fn incr(&mut self) -> Result<core::SparseMatIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_SparseMatIterator_operatorAA(self.as_raw_mut_SparseMatIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { core::SparseMatIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
}
/// Read-write Sparse Matrix Iterator

MODIFY
src/opencv/hub/imgproc.rs
src/opencv/hub/imgproc.rs
@@ -7613,6 +7613,17 @@ pub trait LineIteratorTrait: crate::imgproc::LineIteratorTraitConst {
Ok(ret)
}
+ /// prefix increment operator (++it). shifts iterator to the next pixel
+ #[inline]
+ fn incr(&mut self) -> Result<crate::imgproc::LineIterator> {
+ return_send!(via ocvrs_return);
+ unsafe { sys::cv_LineIterator_operatorAA(self.as_raw_mut_LineIterator(), ocvrs_return.as_mut_ptr()) };
+ return_receive!(unsafe ocvrs_return => ret);
+ let ret = ret.into_result()?;
+ let ret = unsafe { crate::imgproc::LineIterator::opencv_from_extern(ret) };
+ Ok(ret)
+ }
+
}
/// Line iterator

MODIFY
src/opencv/hub/sys.rs
src/opencv/hub/sys.rs
@@ -947,6 +947,7 @@ mod core_sys {
pub fn cv_FileNodeIterator_FileNodeIterator_const_FileNodeR_bool(node: *const c_void, seek_end: bool, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_FileNodeIterator_FileNodeIterator_const_FileNodeIteratorR(it: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_FileNodeIterator_operatorX_const(instance: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
+ pub fn cv_FileNodeIterator_operatorAA(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_FileNodeIterator_readRaw_const_StringR_voidX_size_t(instance: *mut c_void, fmt: *const c_char, vec: *mut c_void, len: size_t, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_FileNodeIterator_remaining_const(instance: *const c_void, ocvrs_return: *mut Result<size_t>);
pub fn cv_FileNodeIterator_equalTo_const_const_FileNodeIteratorR(instance: *const c_void, it: *const c_void, ocvrs_return: *mut Result<bool>);
@@ -1119,6 +1120,8 @@ mod core_sys {
pub fn cv_MatConstIterator_MatConstIterator_const_MatConstIteratorR(it: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_MatConstIterator_operatorX_const(instance: *const c_void, ocvrs_return: *mut Result<*const u8>);
pub fn cv_MatConstIterator_operator___const_ptrdiff_t(instance: *const c_void, i: ptrdiff_t, ocvrs_return: *mut Result<*const u8>);
+ pub fn cv_MatConstIterator_operatorSS(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
+ pub fn cv_MatConstIterator_operatorAA(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_MatConstIterator_pos_const(instance: *const c_void, ocvrs_return: *mut Result<core::Point>);
pub fn cv_MatConstIterator_pos_const_intX(instance: *const c_void, _idx: *mut i32, ocvrs_return: *mut Result_void);
pub fn cv_MatConstIterator_lpos_const(instance: *const c_void, ocvrs_return: *mut Result<ptrdiff_t>);
@@ -1379,11 +1382,14 @@ mod core_sys {
pub fn cv_SparseMatConstIterator_SparseMatConstIterator_const_SparseMatX(_m: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_SparseMatConstIterator_SparseMatConstIterator_const_SparseMatConstIteratorR(it: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_SparseMatConstIterator_node_const(instance: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
+ pub fn cv_SparseMatConstIterator_operatorSS(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
+ pub fn cv_SparseMatConstIterator_operatorAA(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_SparseMatConstIterator_seekEnd(instance: *mut c_void, ocvrs_return: *mut Result_void);
pub fn cv_SparseMatIterator_SparseMatIterator(ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_SparseMatIterator_SparseMatIterator_SparseMatX(_m: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_SparseMatIterator_SparseMatIterator_const_SparseMatIteratorR(it: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_SparseMatIterator_node_const(instance: *const c_void, ocvrs_return: *mut Result<*mut c_void>);
+ pub fn cv_SparseMatIterator_operatorAA(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_TLSDataContainer_cleanup(instance: *mut c_void, ocvrs_return: *mut Result_void);
pub fn cv_TermCriteria_TermCriteria(ocvrs_return: *mut Result<core::TermCriteria>);
pub fn cv_TermCriteria_TermCriteria_int_int_double(typ: i32, max_count: i32, epsilon: f64, ocvrs_return: *mut Result<core::TermCriteria>);
@@ -4356,6 +4362,7 @@ mod imgproc_sys {
pub fn cv_LineIterator_LineIterator_Rect_Point_Point_int_bool(bounding_area_rect: *const core::Rect, pt1: *const core::Point, pt2: *const core::Point, connectivity: i32, left_to_right: bool, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_LineIterator_init_const_MatX_Rect_Point_Point_int_bool(instance: *mut c_void, img: *const c_void, bounding_area_rect: *const core::Rect, pt1: *const core::Point, pt2: *const core::Point, connectivity: i32, left_to_right: bool, ocvrs_return: *mut Result_void);
pub fn cv_LineIterator_operatorX(instance: *mut c_void, ocvrs_return: *mut Result<*mut u8>);
+ pub fn cv_LineIterator_operatorAA(instance: *mut c_void, ocvrs_return: *mut Result<*mut c_void>);
pub fn cv_LineIterator_pos_const(instance: *const c_void, ocvrs_return: *mut Result<core::Point>);
pub fn cv_LineSegmentDetector_detect_const__InputArrayR_const__OutputArrayR_const__OutputArrayR_const__OutputArrayR_const__OutputArrayR(instance: *mut c_void, image: *const c_void, lines: *const c_void, width: *const c_void, prec: *const c_void, nfa: *const c_void, ocvrs_return: *mut Result_void);
pub fn cv_LineSegmentDetector_drawSegments_const__InputOutputArrayR_const__InputArrayR(instance: *mut c_void, image: *const c_void, lines: *const c_void, ocvrs_return: *mut Result_void);

0.63.0 Regenerate bindings