Accord.Imaging.Filters.Closing.ApplyInPlace C# (CSharp) Method

ApplyInPlace() public method

Apply filter to an image.
The method applies the filter directly to the provided source image.
Unsupported pixel format of the source image.
public ApplyInPlace ( Bitmap image ) : void
image System.Drawing.Bitmap Image to apply filter to.
return void
        public void ApplyInPlace( Bitmap image )
        {
            dilatation.ApplyInPlace( image );
            errosion.ApplyInPlace( image );
        }

Same methods

Closing::ApplyInPlace ( Bitmap image, Rectangle rect ) : void
Closing::ApplyInPlace ( BitmapData imageData ) : void
Closing::ApplyInPlace ( BitmapData imageData, Rectangle rect ) : void
Closing::ApplyInPlace ( UnmanagedImage image ) : void
Closing::ApplyInPlace ( UnmanagedImage image, Rectangle rect ) : void

Usage Example

Example #1
0
        /// <summary>
        /// Process the filter on the specified image.
        /// </summary>
        ///
        /// <param name="image">Source image data.</param>
        ///
        protected override unsafe void ProcessFilter(UnmanagedImage image)
        {
            // copy source image
            UnmanagedImage sourceImage = image.Clone( );

            // perform closing on the source image
            closing.ApplyInPlace(image);
            // subtract source image from the closed image
            subtract.UnmanagedOverlayImage = sourceImage;
            subtract.ApplyInPlace(image);

            sourceImage.Dispose( );
        }