Trait opencv::prelude::StructuredEdgeDetectionConst
source · pub trait StructuredEdgeDetectionConst: AlgorithmTraitConst {
// Required method
fn as_raw_StructuredEdgeDetection(&self) -> *const c_void;
// Provided methods
fn detect_edges(
&self,
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()> { ... }
fn compute_orientation(
&self,
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()> { ... }
fn edges_nms(
&self,
edge_image: &dyn ToInputArray,
orientation_image: &dyn ToInputArray,
dst: &mut dyn ToOutputArray,
r: i32,
s: i32,
m: f32,
is_parallel: bool
) -> Result<()> { ... }
}
Expand description
Constant methods for crate::ximgproc::StructuredEdgeDetection
Required Methods§
fn as_raw_StructuredEdgeDetection(&self) -> *const c_void
Provided Methods§
sourcefn detect_edges(
&self,
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
fn detect_edges( &self, src: &dyn ToInputArray, dst: &mut dyn ToOutputArray ) -> Result<()>
The function detects edges in src and draw them to dst.
The algorithm underlies this function is much more robust to texture presence, than common approaches, e.g. Sobel
Parameters
- src: source image (RGB, float, in [0;1]) to detect edges
- dst: destination image (grayscale, float, in [0;1]) where edges are drawn
See also
Sobel, Canny
sourcefn compute_orientation(
&self,
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
fn compute_orientation( &self, src: &dyn ToInputArray, dst: &mut dyn ToOutputArray ) -> Result<()>
The function computes orientation from edge image.
Parameters
- src: edge image.
- dst: orientation image.
sourcefn edges_nms(
&self,
edge_image: &dyn ToInputArray,
orientation_image: &dyn ToInputArray,
dst: &mut dyn ToOutputArray,
r: i32,
s: i32,
m: f32,
is_parallel: bool
) -> Result<()>
fn edges_nms( &self, edge_image: &dyn ToInputArray, orientation_image: &dyn ToInputArray, dst: &mut dyn ToOutputArray, r: i32, s: i32, m: f32, is_parallel: bool ) -> Result<()>
The function edgenms in edge image and suppress edges where edge is stronger in orthogonal direction.
Parameters
- edge_image: edge image from detectEdges function.
- orientation_image: orientation image from computeOrientation function.
- dst: suppressed image (grayscale, float, in [0;1])
- r: radius for NMS suppression.
- s: radius for boundary suppression.
- m: multiplier for conservative suppression.
- isParallel: enables/disables parallel computing.
C++ default parameters
- r: 2
- s: 0
- m: 1
- is_parallel: true