pub mod phase_unwrapping {
use crate::mod_prelude::*;
use crate::{core, sys, types};
pub mod prelude {
pub use super::{HistogramPhaseUnwrappingTrait, HistogramPhaseUnwrappingTraitConst, PhaseUnwrappingTrait, PhaseUnwrappingTraitConst};
}
pub struct HistogramPhaseUnwrapping {
ptr: *mut c_void,
}
opencv_type_boxed! { HistogramPhaseUnwrapping }
impl Drop for HistogramPhaseUnwrapping {
#[inline]
fn drop(&mut self) {
unsafe { sys::cv_phase_unwrapping_HistogramPhaseUnwrapping_delete(self.as_raw_mut_HistogramPhaseUnwrapping()) };
}
}
unsafe impl Send for HistogramPhaseUnwrapping {}
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!(ocvrs_return => ret);
let ret = ret.into_result()?;
let ret = unsafe { core::Ptr::<crate::phase_unwrapping::HistogramPhaseUnwrapping>::opencv_from_extern(ret) };
Ok(ret)
}
#[inline]
pub fn create_def() -> Result<core::Ptr<crate::phase_unwrapping::HistogramPhaseUnwrapping>> {
return_send!(via ocvrs_return);
unsafe { sys::cv_phase_unwrapping_HistogramPhaseUnwrapping_create(ocvrs_return.as_mut_ptr()) };
return_receive!(ocvrs_return => ret);
let ret = ret.into_result()?;
let ret = unsafe { core::Ptr::<crate::phase_unwrapping::HistogramPhaseUnwrapping>::opencv_from_extern(ret) };
Ok(ret)
}
}
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 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!(ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
}
}
impl std::fmt::Debug for HistogramPhaseUnwrapping {
#[inline]
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("HistogramPhaseUnwrapping")
.finish()
}
}
boxed_cast_base! { HistogramPhaseUnwrapping, core::Algorithm, cv_phase_unwrapping_HistogramPhaseUnwrapping_to_Algorithm }
boxed_cast_base! { HistogramPhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrapping, cv_phase_unwrapping_HistogramPhaseUnwrapping_to_PhaseUnwrapping }
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() }
}
boxed_ref! { HistogramPhaseUnwrapping, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }
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() }
}
boxed_ref! { HistogramPhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTraitConst, as_raw_PhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTrait, as_raw_mut_PhaseUnwrapping }
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() }
}
boxed_ref! { HistogramPhaseUnwrapping, crate::phase_unwrapping::HistogramPhaseUnwrappingTraitConst, as_raw_HistogramPhaseUnwrapping, crate::phase_unwrapping::HistogramPhaseUnwrappingTrait, as_raw_mut_HistogramPhaseUnwrapping }
#[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!(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) {
unsafe { sys::cv_phase_unwrapping_PhaseUnwrapping_delete(self.as_raw_mut_PhaseUnwrapping()) };
}
}
unsafe impl Send for PhaseUnwrapping {}
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 ToInputArray, unwrapped_phase_map: &mut impl ToOutputArray, shadow_mask: &impl 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!(ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
}
#[inline]
fn unwrap_phase_map_def(&mut self, wrapped_phase_map: &impl ToInputArray, unwrapped_phase_map: &mut impl ToOutputArray) -> Result<()> {
input_array_arg!(wrapped_phase_map);
output_array_arg!(unwrapped_phase_map);
return_send!(via ocvrs_return);
unsafe { sys::cv_phase_unwrapping_PhaseUnwrapping_unwrapPhaseMap_const__InputArrayR_const__OutputArrayR(self.as_raw_mut_PhaseUnwrapping(), wrapped_phase_map.as_raw__InputArray(), unwrapped_phase_map.as_raw__OutputArray(), ocvrs_return.as_mut_ptr()) };
return_receive!(ocvrs_return => ret);
let ret = ret.into_result()?;
Ok(ret)
}
}
impl std::fmt::Debug for PhaseUnwrapping {
#[inline]
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.debug_struct("PhaseUnwrapping")
.finish()
}
}
boxed_cast_base! { PhaseUnwrapping, core::Algorithm, cv_phase_unwrapping_PhaseUnwrapping_to_Algorithm }
boxed_cast_descendant! { PhaseUnwrapping, crate::phase_unwrapping::HistogramPhaseUnwrapping, cv_phase_unwrapping_PhaseUnwrapping_to_HistogramPhaseUnwrapping }
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() }
}
boxed_ref! { PhaseUnwrapping, core::AlgorithmTraitConst, as_raw_Algorithm, core::AlgorithmTrait, as_raw_mut_Algorithm }
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() }
}
boxed_ref! { PhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTraitConst, as_raw_PhaseUnwrapping, crate::phase_unwrapping::PhaseUnwrappingTrait, as_raw_mut_PhaseUnwrapping }
}