Click or drag to resize
Ranorex

ImagingProcessingDetectEdgesLaplace Method (Bitmap, Boolean, Int32)

Converts the input images to a grayscale image that contains object edges from the input image using a Laplace filter kernel, optionally scaling grayscale values in the output image.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static Bitmap DetectEdgesLaplace(
	Bitmap input,
	bool scale,
	out int margin
)

Parameters

input
Type: System.DrawingBitmap
An image.
scale
Type: SystemBoolean
If true, the FilterScaled(Bitmap, Int32) method is used to filter the input image; otherwise the Filter(Bitmap, Int32) method is used.
margin
Type: SystemInt32
When this method returns, contains an integer that specifies the pixel margin in the output image that has not been written to because of the filter size.

Return Value

Type: Bitmap
A grayscale image containing object edges.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf input is null.
ArgumentExceptionIf the input image is not a grayscale image and cannot be converted to Format24bppRgb pixel format (i.e. if it is no color image in a 32 bit format).
Remarks
By default the LaplaceKernel5x5 is used as the filter kernel, unless the image with or height is smaller than 5 pixels; in that case the LaplaceKernel3x3 is used instead.
See Also