[][src]Function opencv::imgproc::pre_corner_detect

pub fn pre_corner_detect(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    ksize: i32,
    border_type: i32
) -> Result<()>

Calculates a feature map for corner detection.

The function calculates the complex spatial derivative-based function of the source image

block formula

where inline formula,inline formula are the first image derivatives, inline formula,inline formula are the second image derivatives, and inline formula is the mixed derivative.

The corners can be found as local maximums of the functions, as shown below:

   Mat corners, dilated_corners;
   preCornerDetect(image, corners, 3);
   // dilation with 3x3 rectangular structuring element
   dilate(corners, dilated_corners, Mat(), 1);
   Mat corner_mask = corners == dilated_corners;

Parameters

  • src: Source single-channel 8-bit of floating-point image.
  • dst: Output image that has the type CV_32F and the same size as src .
  • ksize: %Aperture size of the Sobel .
  • borderType: Pixel extrapolation method. See #BorderTypes. #BORDER_WRAP is not supported.

C++ default parameters

  • border_type: BORDER_DEFAULT