pub fn laplacian(
src: &impl GMatTraitConst,
ddepth: i32,
ksize: i32,
scale: f64,
delta: f64,
border_type: i32,
) -> Result<GMat>
Expand description
Calculates the Laplacian of an image.
The function calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator:
This is done when ksize > 1
. When ksize == 1
, the Laplacian is computed by filtering the image
with the following aperture:
Note: Function textual ID is “org.opencv.imgproc.filters.laplacian”
§Parameters
- src: Source image.
- ddepth: Desired depth of the destination image.
- ksize: Aperture size used to compute the second-derivative filters. See [get_deriv_kernels] for details. The size must be positive and odd.
- scale: Optional scale factor for the computed Laplacian values. By default, no scaling is applied. See [get_deriv_kernels] for details.
- delta: Optional delta value that is added to the results prior to storing them in dst .
- borderType: Pixel extrapolation method, see #BorderTypes. [BORDER_WRAP] is not supported.
§Returns
Destination image of the same size and the same number of channels as src.
§See also
Sobel, Scharr
§C++ default parameters
- ksize: 1
- scale: 1
- delta: 0
- border_type: BORDER_DEFAULT