This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
The parameter-less constructor adds in Format8bppIndexed, Format24bppRgb, Format32bppRgb, Format32bppArgb to the SupportedFormats array, which the other constructor does not. Finding corners from an object created with the second constructor will throw an exception on 8bpp images (at least).
|
public SusanCornersDetector() |
|
{ |
|
base.SupportedFormats.UnionWith(new[] { PixelFormat.Format8bppIndexed, |
|
PixelFormat.Format24bppRgb, |
|
PixelFormat.Format32bppRgb, |
|
PixelFormat.Format32bppArgb }); |
|
} |
Inside the InnerProcess the image gets converted to 8bpp if it isn't already:
|
if (image.PixelFormat == PixelFormat.Format8bppIndexed) |
|
{ |
|
grayImage = image; |
|
} |
|
else |
|
{ |
|
// create temporary grayscale image |
|
grayImage = Grayscale.CommonAlgorithms.BT709.Apply(image); |
|
} |
The second constructor should call the parameterless constructor.