pub mod phase_unwrapping {
use crate::{mod_prelude::*, core, sys, types};
pub mod prelude {
pub use { super::PhaseUnwrappingTraitConst, super::PhaseUnwrappingTrait, super::HistogramPhaseUnwrappingTraitConst, super::HistogramPhaseUnwrappingTrait };
}
pub trait HistogramPhaseUnwrappingTraitConst: crate::phase_unwrapping::PhaseUnwrappingTraitConst {
fn as_raw_HistogramPhaseUnwrapping(&self) -> *const c_void;
}
pub trait HistogramPhaseUnwrappingTrait: crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst + crate::phase_unwrapping::PhaseUnwrappingTrait {
fn as_raw_mut_HistogramPhaseUnwrapping(&mut self) -> *mut c_void;
#[inline]
fn get_inverse_reliability_map(&mut self, reliability_map: &mut impl core::ToOutputArray) -> Result<()> {
output_array_arg!(reliability_map);
return_send!(via ocvrs_return);
unsafe { sys::cv_phase_unwrapping_HistogramPhaseUnwrapping_getInverseReliabilityMap_const__OutputArrayR(self.as_raw_mut_HistogramPhaseUnwrapping(), reliability_map.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
}
}
pub struct HistogramPhaseUnwrapping {
ptr: *mut c_void
}
opencv_type_boxed! { HistogramPhaseUnwrapping }
impl Drop for HistogramPhaseUnwrapping {
#[inline]
fn drop(&mut self) {
extern "C" { fn cv_HistogramPhaseUnwrapping_delete(instance: *mut c_void); }
unsafe { cv_HistogramPhaseUnwrapping_delete(self.as_raw_mut_HistogramPhaseUnwrapping()) };
}
}
unsafe impl Send for HistogramPhaseUnwrapping {}
impl core::AlgorithmTraitConst for HistogramPhaseUnwrapping {
#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
}
impl core::AlgorithmTrait for HistogramPhaseUnwrapping {
#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
}
impl crate::phase_unwrapping::PhaseUnwrappingTraitConst for HistogramPhaseUnwrapping {
#[inline] fn as_raw_PhaseUnwrapping(&self) -> *const c_void { self.as_raw() }
}
impl crate::phase_unwrapping::PhaseUnwrappingTrait for HistogramPhaseUnwrapping {
#[inline] fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void { self.as_raw_mut() }
}
impl crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst for HistogramPhaseUnwrapping {
#[inline] fn as_raw_HistogramPhaseUnwrapping(&self) -> *const c_void { self.as_raw() }
}
impl crate::phase_unwrapping::HistogramPhaseUnwrappingTrait for HistogramPhaseUnwrapping {
#[inline] fn as_raw_mut_HistogramPhaseUnwrapping(&mut self) -> *mut c_void { self.as_raw_mut() }
}
impl HistogramPhaseUnwrapping {
#[inline]
pub fn create(parameters: crate::phase_unwrapping::HistogramPhaseUnwrapping_Params) -> Result<core::Ptr<crate::phase_unwrapping::HistogramPhaseUnwrapping>> {
return_send!(via ocvrs_return);
unsafe { sys::cv_phase_unwrapping_HistogramPhaseUnwrapping_create_const_ParamsR(¶meters, ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
let ret = unsafe { core::Ptr::<crate::phase_unwrapping::HistogramPhaseUnwrapping>::opencv_from_extern(ret) };
Ok(ret)
}
}
boxed_cast_base! { HistogramPhaseUnwrapping, core::Algorithm, cv_HistogramPhaseUnwrapping_to_Algorithm }
#[repr(C)]
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct HistogramPhaseUnwrapping_Params {
pub width: i32,
pub height: i32,
pub hist_thresh: f32,
pub nbr_of_small_bins: i32,
pub nbr_of_large_bins: i32,
}
opencv_type_simple! { crate::phase_unwrapping::HistogramPhaseUnwrapping_Params }
impl HistogramPhaseUnwrapping_Params {
#[inline]
pub fn default() -> Result<crate::phase_unwrapping::HistogramPhaseUnwrapping_Params> {
return_send!(via ocvrs_return);
unsafe { sys::cv_phase_unwrapping_HistogramPhaseUnwrapping_Params_Params(ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
}
}
pub trait PhaseUnwrappingTraitConst: core::AlgorithmTraitConst {
fn as_raw_PhaseUnwrapping(&self) -> *const c_void;
}
pub trait PhaseUnwrappingTrait: core::AlgorithmTrait + crate::phase_unwrapping::PhaseUnwrappingTraitConst {
fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void;
#[inline]
fn unwrap_phase_map(&mut self, wrapped_phase_map: &impl core::ToInputArray, unwrapped_phase_map: &mut impl core::ToOutputArray, shadow_mask: &impl core::ToInputArray) -> Result<()> {
input_array_arg!(wrapped_phase_map);
output_array_arg!(unwrapped_phase_map);
input_array_arg!(shadow_mask);
return_send!(via ocvrs_return);
unsafe { sys::cv_phase_unwrapping_PhaseUnwrapping_unwrapPhaseMap_const__InputArrayR_const__OutputArrayR_const__InputArrayR(self.as_raw_mut_PhaseUnwrapping(), wrapped_phase_map.as_raw__InputArray(), unwrapped_phase_map.as_raw__OutputArray(), shadow_mask.as_raw__InputArray(), ocvrs_return.as_mut_ptr()) };
return_receive!(unsafe ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
}
}
pub struct PhaseUnwrapping {
ptr: *mut c_void
}
opencv_type_boxed! { PhaseUnwrapping }
impl Drop for PhaseUnwrapping {
#[inline]
fn drop(&mut self) {
extern "C" { fn cv_PhaseUnwrapping_delete(instance: *mut c_void); }
unsafe { cv_PhaseUnwrapping_delete(self.as_raw_mut_PhaseUnwrapping()) };
}
}
unsafe impl Send for PhaseUnwrapping {}
impl core::AlgorithmTraitConst for PhaseUnwrapping {
#[inline] fn as_raw_Algorithm(&self) -> *const c_void { self.as_raw() }
}
impl core::AlgorithmTrait for PhaseUnwrapping {
#[inline] fn as_raw_mut_Algorithm(&mut self) -> *mut c_void { self.as_raw_mut() }
}
impl crate::phase_unwrapping::PhaseUnwrappingTraitConst for PhaseUnwrapping {
#[inline] fn as_raw_PhaseUnwrapping(&self) -> *const c_void { self.as_raw() }
}
impl crate::phase_unwrapping::PhaseUnwrappingTrait for PhaseUnwrapping {
#[inline] fn as_raw_mut_PhaseUnwrapping(&mut self) -> *mut c_void { self.as_raw_mut() }
}
impl PhaseUnwrapping {
}
boxed_cast_base! { PhaseUnwrapping, core::Algorithm, cv_PhaseUnwrapping_to_Algorithm }
}