Trait ConvolutionTrait

Source
pub trait ConvolutionTrait: AlgorithmTrait + ConvolutionTraitConst {
    // Required method
    fn as_raw_mut_Convolution(&mut self) -> *mut c_void;

    // Provided methods
    fn convolve(
        &mut self,
        image: &impl ToInputArray,
        templ: &impl ToInputArray,
        result: &mut impl ToOutputArray,
        ccorr: bool,
        stream: &mut impl StreamTrait,
    ) -> Result<()> { ... }
    fn convolve_def(
        &mut self,
        image: &impl ToInputArray,
        templ: &impl ToInputArray,
        result: &mut impl ToOutputArray,
    ) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::cudaarithm::Convolution

Required Methods§

Provided Methods§

Source

fn convolve( &mut self, image: &impl ToInputArray, templ: &impl ToInputArray, result: &mut impl ToOutputArray, ccorr: bool, stream: &mut impl StreamTrait, ) -> Result<()>

Computes a convolution (or cross-correlation) of two images.

§Parameters
  • image: Source image. Only CV_32FC1 images are supported for now.
  • templ: Template image. The size is not greater than the image size. The type is the same as image .
  • result: Result image. If image is W x H and templ is w x h, then result must be W-w+1 x H-h+1.
  • ccorr: Flags to evaluate cross-correlation instead of convolution.
  • stream: Stream for the asynchronous version.
§C++ default parameters
  • ccorr: false
  • stream: Stream::Null()
Source

fn convolve_def( &mut self, image: &impl ToInputArray, templ: &impl ToInputArray, result: &mut impl ToOutputArray, ) -> Result<()>

Computes a convolution (or cross-correlation) of two images.

§Parameters
  • image: Source image. Only CV_32FC1 images are supported for now.
  • templ: Template image. The size is not greater than the image size. The type is the same as image .
  • result: Result image. If image is W x H and templ is w x h, then result must be W-w+1 x H-h+1.
  • ccorr: Flags to evaluate cross-correlation instead of convolution.
  • stream: Stream for the asynchronous version.
§Note

This alternative version of ConvolutionTrait::convolve function uses the following default values for its arguments:

  • ccorr: false
  • stream: Stream::Null()

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.

Implementors§