Skip to content

Commit

Permalink
Update changelog and regen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
twistedfall committed Sep 15, 2024
1 parent af28836 commit dd5aac8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
* 0.93.0
* Improve automatic slice detection, e.g. `CommandParser::new()` now calculates `argc` automatically.
* `find_circles_grid` now can take `None` the `blob_detector` argument.
* Rework the handling of static library linkage.
* Allow passing custom clang args via `OPENCV_CLANG_ARGS` environment variable.

* 0.92.3
* Add an irreversible conversion from `BoxedRefMut` to `BoxedMut`.
* Fix handling of arrays of strings, fixes `CommandLineParser` (kudos to niemeyer).
Expand Down
8 changes: 4 additions & 4 deletions docs/calib3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3508,11 +3508,11 @@ pub mod calib3d {
/// * flags: CALIB_CB_SYMMETRIC_GRID
/// * blob_detector: SimpleBlobDetector::create()
#[inline]
pub fn find_circles_grid_1(image: &impl ToInputArray, pattern_size: core::Size, centers: &mut impl ToOutputArray, flags: i32, blob_detector: &core::Ptr<crate::features2d::Feature2D>) -> Result<bool> {
pub fn find_circles_grid_1(image: &impl ToInputArray, pattern_size: core::Size, centers: &mut impl ToOutputArray, flags: i32, blob_detector: Option<&core::Ptr<crate::features2d::Feature2D>>) -> Result<bool> {
input_array_arg!(image);
output_array_arg!(centers);
return_send!(via ocvrs_return);
unsafe { sys::cv_findCirclesGrid_const__InputArrayR_Size_const__OutputArrayR_int_const_PtrLFeature2DGR(image.as_raw__InputArray(), &pattern_size, centers.as_raw__OutputArray(), flags, blob_detector.as_raw_PtrOfFeature2D(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_findCirclesGrid_const__InputArrayR_Size_const__OutputArrayR_int_const_PtrLFeature2DGR(image.as_raw__InputArray(), &pattern_size, centers.as_raw__OutputArray(), flags, blob_detector.map_or(::core::ptr::null(), |blob_detector| blob_detector.as_raw_PtrOfFeature2D()), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand Down Expand Up @@ -3554,11 +3554,11 @@ pub mod calib3d {
/// Note: The function requires white space (like a square-thick border, the wider the better) around
/// the board to make the detection more robust in various environments.
#[inline]
pub fn find_circles_grid(image: &impl ToInputArray, pattern_size: core::Size, centers: &mut impl ToOutputArray, flags: i32, blob_detector: &core::Ptr<crate::features2d::Feature2D>, parameters: crate::calib3d::CirclesGridFinderParameters) -> Result<bool> {
pub fn find_circles_grid(image: &impl ToInputArray, pattern_size: core::Size, centers: &mut impl ToOutputArray, flags: i32, blob_detector: Option<&core::Ptr<crate::features2d::Feature2D>>, parameters: crate::calib3d::CirclesGridFinderParameters) -> Result<bool> {
input_array_arg!(image);
output_array_arg!(centers);
return_send!(via ocvrs_return);
unsafe { sys::cv_findCirclesGrid_const__InputArrayR_Size_const__OutputArrayR_int_const_PtrLFeature2DGR_const_CirclesGridFinderParametersR(image.as_raw__InputArray(), &pattern_size, centers.as_raw__OutputArray(), flags, blob_detector.as_raw_PtrOfFeature2D(), &parameters, ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_findCirclesGrid_const__InputArrayR_Size_const__OutputArrayR_int_const_PtrLFeature2DGR_const_CirclesGridFinderParametersR(image.as_raw__InputArray(), &pattern_size, centers.as_raw__OutputArray(), flags, blob_detector.map_or(::core::ptr::null(), |blob_detector| blob_detector.as_raw_PtrOfFeature2D()), &parameters, ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand Down
28 changes: 14 additions & 14 deletions docs/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13820,11 +13820,11 @@ pub mod core {
/// * argv: array of command line arguments (from main())
/// * keys: string describing acceptable command line parameters (see class description for syntax)
#[inline]
pub fn new(argc: i32, argv: &[&str], keys: &str) -> Result<core::CommandLineParser> {
pub fn new(argv: &[&str], keys: &str) -> Result<core::CommandLineParser> {
string_array_arg!(argv);
extern_container_arg!(keys);
return_send!(via ocvrs_return);
unsafe { sys::cv_CommandLineParser_CommandLineParser_int_const_charXX_const_StringR(argc, argv.as_ptr(), keys.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_CommandLineParser_CommandLineParser_int_const_charXX_const_StringR(argv.len().try_into()?, argv.as_ptr(), keys.opencv_as_extern(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
let ret = unsafe { core::CommandLineParser::opencv_from_extern(ret) };
Expand Down Expand Up @@ -36015,9 +36015,9 @@ pub mod core {
/// ## C++ default parameters
/// * q: Queue()
#[inline]
fn run(&mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &impl core::QueueTraitConst) -> Result<bool> {
fn run(&mut self, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &impl core::QueueTraitConst) -> Result<bool> {
return_send!(via ocvrs_return);
unsafe { sys::cv_ocl_Kernel_run_int_size_tX_size_tX_bool_const_QueueR(self.as_raw_mut_Kernel(), dims, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, q.as_raw_Queue(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_ocl_Kernel_run_int_size_tX_size_tX_bool_const_QueueR(self.as_raw_mut_Kernel(), globalsize.len().min(localsize.len()).try_into()?, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, q.as_raw_Queue(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand All @@ -36042,9 +36042,9 @@ pub mod core {
/// This alternative version of [KernelTrait::run] function uses the following default values for its arguments:
/// * q: Queue()
#[inline]
fn run_def(&mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool) -> Result<bool> {
fn run_def(&mut self, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool) -> Result<bool> {
return_send!(via ocvrs_return);
unsafe { sys::cv_ocl_Kernel_run_int_size_tX_size_tX_bool(self.as_raw_mut_Kernel(), dims, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_ocl_Kernel_run_int_size_tX_size_tX_bool(self.as_raw_mut_Kernel(), globalsize.len().min(localsize.len()).try_into()?, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand All @@ -36062,9 +36062,9 @@ pub mod core {
/// ## C++ default parameters
/// * q: Queue()
#[inline]
fn run_(&mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &impl core::QueueTraitConst) -> Result<bool> {
fn run_(&mut self, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &impl core::QueueTraitConst) -> Result<bool> {
return_send!(via ocvrs_return);
unsafe { sys::cv_ocl_Kernel_run__int_size_tX_size_tX_bool_const_QueueR(self.as_raw_mut_Kernel(), dims, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, q.as_raw_Queue(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_ocl_Kernel_run__int_size_tX_size_tX_bool_const_QueueR(self.as_raw_mut_Kernel(), globalsize.len().min(localsize.len()).try_into()?, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, q.as_raw_Queue(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand All @@ -36083,9 +36083,9 @@ pub mod core {
/// This alternative version of [KernelTrait::run_] function uses the following default values for its arguments:
/// * q: Queue()
#[inline]
fn run__def(&mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool) -> Result<bool> {
fn run__def(&mut self, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool) -> Result<bool> {
return_send!(via ocvrs_return);
unsafe { sys::cv_ocl_Kernel_run__int_size_tX_size_tX_bool(self.as_raw_mut_Kernel(), dims, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_ocl_Kernel_run__int_size_tX_size_tX_bool(self.as_raw_mut_Kernel(), globalsize.len().min(localsize.len()).try_into()?, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), sync, ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand Down Expand Up @@ -36123,9 +36123,9 @@ pub mod core {
/// ## C++ default parameters
/// * q: Queue()
#[inline]
fn run_profiling(&mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], q: &impl core::QueueTraitConst) -> Result<i64> {
fn run_profiling(&mut self, globalsize: &mut [size_t], localsize: &mut [size_t], q: &impl core::QueueTraitConst) -> Result<i64> {
return_send!(via ocvrs_return);
unsafe { sys::cv_ocl_Kernel_runProfiling_int_size_tX_size_tX_const_QueueR(self.as_raw_mut_Kernel(), dims, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), q.as_raw_Queue(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_ocl_Kernel_runProfiling_int_size_tX_size_tX_const_QueueR(self.as_raw_mut_Kernel(), globalsize.len().min(localsize.len()).try_into()?, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), q.as_raw_Queue(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand All @@ -36141,9 +36141,9 @@ pub mod core {
/// This alternative version of [KernelTrait::run_profiling] function uses the following default values for its arguments:
/// * q: Queue()
#[inline]
fn run_profiling_def(&mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t]) -> Result<i64> {
fn run_profiling_def(&mut self, globalsize: &mut [size_t], localsize: &mut [size_t]) -> Result<i64> {
return_send!(via ocvrs_return);
unsafe { sys::cv_ocl_Kernel_runProfiling_int_size_tX_size_tX(self.as_raw_mut_Kernel(), dims, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_ocl_Kernel_runProfiling_int_size_tX_size_tX(self.as_raw_mut_Kernel(), globalsize.len().min(localsize.len()).try_into()?, globalsize.as_mut_ptr(), localsize.as_mut_ptr(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand Down
4 changes: 2 additions & 2 deletions docs/highgui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1631,10 +1631,10 @@ pub mod highgui {
}

#[inline]
pub fn start_loop(pt2_func: Option<unsafe extern "C" fn(i32, *mut *mut c_char) -> i32>, argc: i32, argv: &mut [&str]) -> Result<i32> {
pub fn start_loop(pt2_func: Option<unsafe extern "C" fn(i32, *mut *mut c_char) -> i32>, argv: &mut [&str]) -> Result<i32> {
string_array_arg_mut!(argv);
return_send!(via ocvrs_return);
unsafe { sys::cv_startLoop_int__X__int__charXX__int_charXX(pt2_func, argc, argv.as_mut_ptr(), ocvrs_return.as_mut_ptr()) };
unsafe { sys::cv_startLoop_int__X__int__charXX__int_charXX(pt2_func, argv.len().try_into()?, argv.as_mut_ptr(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
Expand Down

0 comments on commit dd5aac8

Please sign in to comment.