/// <summary> /// Process the filter on the specified image. /// </summary> /// /// <param name="image">Source image data.</param> /// protected override unsafe void ProcessFilter(UnmanagedImage image) { // perform opening on the source image UnmanagedImage openedImage = opening.Apply(image); // subtract opened image from source image subtract.UnmanagedOverlayImage = openedImage; subtract.ApplyInPlace(image); openedImage.Dispose( ); }
/// <summary> /// Process the filter on the specified image. /// </summary> /// /// <param name="image">Source image data.</param> /// protected override void ProcessFilter(UnmanagedImage image) { // Apply first Gaussian blur var image1 = first.Apply(image); // Apply second Gaussian blur second.ApplyInPlace(image); // Subtract the two images subtract.UnmanagedOverlayImage = image1; subtract.ApplyInPlace(image); }
/// <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( ); }