pub struct IntelligentScissorsMB { /* private fields */ }
Expand description
Intelligent Scissors image segmentation
This class is used to find the path (contour) between two points which can be used for image segmentation.
Usage example: usage_example_intelligent_scissors
Reference: “Intelligent Scissors for Image Composition” algorithm designed by Eric N. Mortensen and William A. Barrett, Brigham Young University Mortensen95intelligentscissors
Implementations§
source§impl IntelligentScissorsMB
impl IntelligentScissorsMB
pub fn default() -> Result<IntelligentScissorsMB>
Trait Implementations§
source§impl Boxed for IntelligentScissorsMB
impl Boxed for IntelligentScissorsMB
source§unsafe fn from_raw(
ptr: <IntelligentScissorsMB as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <IntelligentScissorsMB as OpenCVFromExtern>::ExternReceive, ) -> Self
Wrap the specified raw pointer Read more
source§fn into_raw(
self,
) -> <IntelligentScissorsMB as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <IntelligentScissorsMB as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
source§fn as_raw(
&self,
) -> <IntelligentScissorsMB as OpenCVTypeExternContainer>::ExternSend
fn as_raw( &self, ) -> <IntelligentScissorsMB as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
source§fn as_raw_mut(
&mut self,
) -> <IntelligentScissorsMB as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <IntelligentScissorsMB as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
source§impl Clone for IntelligentScissorsMB
impl Clone for IntelligentScissorsMB
source§impl Debug for IntelligentScissorsMB
impl Debug for IntelligentScissorsMB
source§impl Drop for IntelligentScissorsMB
impl Drop for IntelligentScissorsMB
source§impl IntelligentScissorsMBTrait for IntelligentScissorsMB
impl IntelligentScissorsMBTrait for IntelligentScissorsMB
fn as_raw_mut_IntelligentScissorsMB(&mut self) -> *mut c_void
source§fn set_weights(
&mut self,
weight_non_edge: f32,
weight_gradient_direction: f32,
weight_gradient_magnitude: f32,
) -> Result<IntelligentScissorsMB>
fn set_weights( &mut self, weight_non_edge: f32, weight_gradient_direction: f32, weight_gradient_magnitude: f32, ) -> Result<IntelligentScissorsMB>
Specify weights of feature functions Read more
source§fn set_gradient_magnitude_max_limit(
&mut self,
gradient_magnitude_threshold_max: f32,
) -> Result<IntelligentScissorsMB>
fn set_gradient_magnitude_max_limit( &mut self, gradient_magnitude_threshold_max: f32, ) -> Result<IntelligentScissorsMB>
Specify gradient magnitude max value threshold Read more
source§fn set_gradient_magnitude_max_limit_def(
&mut self,
) -> Result<IntelligentScissorsMB>
fn set_gradient_magnitude_max_limit_def( &mut self, ) -> Result<IntelligentScissorsMB>
Specify gradient magnitude max value threshold Read more
source§fn set_edge_feature_zero_crossing_parameters(
&mut self,
gradient_magnitude_min_value: f32,
) -> Result<IntelligentScissorsMB>
fn set_edge_feature_zero_crossing_parameters( &mut self, gradient_magnitude_min_value: f32, ) -> Result<IntelligentScissorsMB>
Switch to “Laplacian Zero-Crossing” edge feature extractor and specify its parameters Read more
source§fn set_edge_feature_zero_crossing_parameters_def(
&mut self,
) -> Result<IntelligentScissorsMB>
fn set_edge_feature_zero_crossing_parameters_def( &mut self, ) -> Result<IntelligentScissorsMB>
Switch to “Laplacian Zero-Crossing” edge feature extractor and specify its parameters Read more
source§fn set_edge_feature_canny_parameters(
&mut self,
threshold1: f64,
threshold2: f64,
aperture_size: i32,
l2gradient: bool,
) -> Result<IntelligentScissorsMB>
fn set_edge_feature_canny_parameters( &mut self, threshold1: f64, threshold2: f64, aperture_size: i32, l2gradient: bool, ) -> Result<IntelligentScissorsMB>
Switch edge feature extractor to use Canny edge detector Read more
source§fn set_edge_feature_canny_parameters_def(
&mut self,
threshold1: f64,
threshold2: f64,
) -> Result<IntelligentScissorsMB>
fn set_edge_feature_canny_parameters_def( &mut self, threshold1: f64, threshold2: f64, ) -> Result<IntelligentScissorsMB>
Switch edge feature extractor to use Canny edge detector Read more
source§fn apply_image(
&mut self,
image: &impl ToInputArray,
) -> Result<IntelligentScissorsMB>
fn apply_image( &mut self, image: &impl ToInputArray, ) -> Result<IntelligentScissorsMB>
Specify input image and extract image features Read more
source§fn apply_image_features(
&mut self,
non_edge: &impl ToInputArray,
gradient_direction: &impl ToInputArray,
gradient_magnitude: &impl ToInputArray,
image: &impl ToInputArray,
) -> Result<IntelligentScissorsMB>
fn apply_image_features( &mut self, non_edge: &impl ToInputArray, gradient_direction: &impl ToInputArray, gradient_magnitude: &impl ToInputArray, image: &impl ToInputArray, ) -> Result<IntelligentScissorsMB>
Specify custom features of input image Read more
source§fn apply_image_features_def(
&mut self,
non_edge: &impl ToInputArray,
gradient_direction: &impl ToInputArray,
gradient_magnitude: &impl ToInputArray,
) -> Result<IntelligentScissorsMB>
fn apply_image_features_def( &mut self, non_edge: &impl ToInputArray, gradient_direction: &impl ToInputArray, gradient_magnitude: &impl ToInputArray, ) -> Result<IntelligentScissorsMB>
Specify custom features of input image Read more
source§impl IntelligentScissorsMBTraitConst for IntelligentScissorsMB
impl IntelligentScissorsMBTraitConst for IntelligentScissorsMB
fn as_raw_IntelligentScissorsMB(&self) -> *const c_void
source§fn get_contour(
&self,
target_pt: Point,
contour: &mut impl ToOutputArray,
backward: bool,
) -> Result<()>
fn get_contour( &self, target_pt: Point, contour: &mut impl ToOutputArray, backward: bool, ) -> Result<()>
Extracts optimal contour for the given target point on the image Read more
source§fn get_contour_def(
&self,
target_pt: Point,
contour: &mut impl ToOutputArray,
) -> Result<()>
fn get_contour_def( &self, target_pt: Point, contour: &mut impl ToOutputArray, ) -> Result<()>
Extracts optimal contour for the given target point on the image Read more
impl Send for IntelligentScissorsMB
Auto Trait Implementations§
impl Freeze for IntelligentScissorsMB
impl RefUnwindSafe for IntelligentScissorsMB
impl !Sync for IntelligentScissorsMB
impl Unpin for IntelligentScissorsMB
impl UnwindSafe for IntelligentScissorsMB
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Helper function to call OpenCV functions that allow in-place modification of a
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more