pub trait StructuredEdgeDetectionTraitConst: AlgorithmTraitConst {
// Required method
fn as_raw_StructuredEdgeDetection(&self) -> *const c_void;
// Provided methods
fn detect_edges(
&self,
src: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()> { ... }
fn compute_orientation(
&self,
src: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()> { ... }
fn edges_nms(
&self,
edge_image: &impl ToInputArray,
orientation_image: &impl ToInputArray,
dst: &mut impl ToOutputArray,
r: i32,
s: i32,
m: f32,
is_parallel: bool,
) -> Result<()> { ... }
fn edges_nms_def(
&self,
edge_image: &impl ToInputArray,
orientation_image: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> 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: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()>
fn detect_edges( &self, src: &impl ToInputArray, dst: &mut impl 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: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()>
fn compute_orientation( &self, src: &impl ToInputArray, dst: &mut impl ToOutputArray, ) -> Result<()>
The function computes orientation from edge image.
§Parameters
- src: edge image.
- dst: orientation image.
Sourcefn edges_nms(
&self,
edge_image: &impl ToInputArray,
orientation_image: &impl ToInputArray,
dst: &mut impl ToOutputArray,
r: i32,
s: i32,
m: f32,
is_parallel: bool,
) -> Result<()>
fn edges_nms( &self, edge_image: &impl ToInputArray, orientation_image: &impl ToInputArray, dst: &mut impl 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
Sourcefn edges_nms_def(
&self,
edge_image: &impl ToInputArray,
orientation_image: &impl ToInputArray,
dst: &mut impl ToOutputArray,
) -> Result<()>
fn edges_nms_def( &self, edge_image: &impl ToInputArray, orientation_image: &impl ToInputArray, dst: &mut impl ToOutputArray, ) -> 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.
§Note
This alternative version of StructuredEdgeDetectionTraitConst::edges_nms function uses the following default values for its arguments:
- r: 2
- s: 0
- m: 1
- is_parallel: true
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.