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.
| C# | Visual Basic | Visual C++ |
Public Shared Function DetectEdgesLaplace ( _ input As Bitmap, _ scale As Boolean, _ <OutAttribute> ByRef margin As Integer _ ) As Bitmap
public: static Bitmap^ DetectEdgesLaplace( Bitmap^ input, bool scale, [OutAttribute] int% margin )
- input (Bitmap)
- An image.
- scale (Boolean)
- If true, the FilterScaled(Bitmap, array<Int32,2>[,](,)[,]) method is used to filter the input image; otherwise the Filter(Bitmap, array<Int32,2>[,](,)[,]) method is used.
- margin ( Int32 %)
- 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.
A grayscale image containing object edges.
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.
| Exception | Condition |
|---|---|
| ArgumentNullException | If input is null. |
| ArgumentException | If 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). |
