Exemple #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 = dilatation.Apply( image );
            errosion.ApplyInPlace( destImage );

            return destImage;
        }
Exemple #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)
 {
     errosion.ApplyInPlace(image);
     dilatation.ApplyInPlace(image);
 }