Accord.Imaging.Filters.ExtractBiggestBlob.Apply C# (CSharp) Method

Apply() public method

Apply filter to an image.
Unsupported pixel format of the source image. Unsupported pixel format of the original image. Source and original images must have the same size. The source image does not contain any blobs.
public Apply ( Bitmap image ) : Bitmap
image System.Drawing.Bitmap Source image to get biggest blob from.
return System.Drawing.Bitmap
        public Bitmap Apply(Bitmap image)
        {
            // lock source bitmap data
            BitmapData srcData = image.LockBits(
                new Rectangle(0, 0, image.Width, image.Height),
                ImageLockMode.ReadOnly, image.PixelFormat);

            Bitmap dstImage = null;

            try
            {
                // apply the filter
                dstImage = Apply(srcData);
            }
            finally
            {
                // unlock source image
                image.UnlockBits(srcData);
            }

            return dstImage;
        }

Same methods

ExtractBiggestBlob::Apply ( BitmapData imageData ) : Bitmap
ExtractBiggestBlob::Apply ( UnmanagedImage image ) : UnmanagedImage
ExtractBiggestBlob::Apply ( UnmanagedImage sourceImage, UnmanagedImage destinationImage ) : void
ExtractBiggestBlob