Beispiel #1
0
        /// <summary>
        /// Apply filter to an image in unmanaged memory.
        /// </summary>
        ///
        /// <param name="image">Source image in unmanaged memory to apply filter to.</param>
        ///
        /// <returns>Returns filter's result obtained by applying the filter to
        /// the source image.</returns>
        ///
        /// <remarks>The method keeps the source image unchanged and returns
        /// the result of image processing filter as new image.</remarks>
        ///
        /// <exception cref="UnsupportedImageFormatException">Unsupported pixel format of the source image.</exception>
        ///
        public UnmanagedImage Apply(UnmanagedImage image)
        {
            UnmanagedImage destImage = errosion.Apply(image);

            dilatation.ApplyInPlace(destImage);

            return(destImage);
        }
Beispiel #2
0
 /// <summary>
 /// Apply filter to an image.
 /// </summary>
 ///
 /// <param name="image">Image to apply filter to.</param>
 ///
 /// <remarks>The method applies the filter directly to the provided source image.</remarks>
 ///
 /// <exception cref="UnsupportedImageFormatException">Unsupported pixel format of the source image.</exception>
 ///
 public void ApplyInPlace(Bitmap image)
 {
     dilatation.ApplyInPlace(image);
     errosion.ApplyInPlace(image);
 }