Example #1
0
        private void btn_prep_Click(object sender, EventArgs e)
        {           
            rich_status.Text += "Removing Image Noise...\n";
            image = new Bitmap(pictureBox1.Image);
            Preprocesses.monochrome(image);
            //ConservativeSmoothing filter = new ConservativeSmoothing();
            GaussianSharpen filter = new GaussianSharpen(4, 11);
            filter.ApplyInPlace(image);

            rich_status.Text += "Image Pre-processing Successful.\n";
            pictureBox1.Image = image;
        }
Example #2
0
 public static Bitmap GaussianSharpen(Bitmap bmp, int value, int kernel)
 {
     GaussianSharpen filter = new GaussianSharpen(value, kernel);
     filter.ApplyInPlace(bmp);
     return bmp;
 }
		/// <summary>
		/// Sharpen using a gaussian sharpen filter.
		/// </summary>
		public static Bitmap Sharpen(this Bitmap bitmap) {
			if ((bitmap = bitmap.Channel()) != null) {
				var gaussianSharpen = new GaussianSharpen();
				gaussianSharpen.ApplyInPlace(bitmap);
			}
			return bitmap;
		}
 /// <summary>
 /// Sharpen using a gaussian sharpen filter.
 /// </summary>
 public static Bitmap Sharpen(this Bitmap Bitmap)
 {
     // Convert grayscale to RGB colour space.
     if ((Bitmap = Bitmap.Channel()) != null) {
         // Initialize a new instance of the GaussianSharpen class.
         var GaussianSharpen = new GaussianSharpen();
         // Apply the filter to the image.
         GaussianSharpen.ApplyInPlace(Bitmap);
     }
     // Return the bitmap.
     return Bitmap;
 }