Beispiel #1
0
        private void SaturationAdjustment(object sender, EventArgs e)
        {
            UploadedImageBitmap.BM = ImageFilter.AdjustSaturation(UploadedImageBitmap.startBM, trackBar3.Value);
            UploadedImageBitmap.BM = ImageFilter.AdjustBrightness(UploadedImageBitmap.BM, UploadedImageBitmap.brightness);
            UploadedImageBitmap.BM = ImageFilter.AdjustContrast(UploadedImageBitmap.BM, UploadedImageBitmap.contrast);

            pictureBox1.Image = UploadedImageBitmap.BM;

            UploadedImageBitmap.saturation = trackBar3.Value;
            UpdateTrackBarTextboxes(UploadedImageBitmap);
        }
        private void LaplacianCompare(object sender, EventArgs e)
        {
            bool   grayscale = true;
            Bitmap BM1       = ImageFilter.Laplacian3x3Filter(new Bitmap(pictureBox1.Image), grayscale);
            Bitmap BM2       = ImageFilter.Laplacian3x3Filter(new Bitmap(pictureBox2.Image), grayscale);



            ImageFilter.DrawOutlineFromLaplacian(BM1, Color.FromArgb(0, 0, 0), Color.Red);
            ImageFilter.DrawOutlineFromLaplacian(BM2, Color.FromArgb(0, 0, 0), Color.Red);

            ImageFilter.ReplaceColor(BM1, Color.FromArgb(0, 0, 0), Color.Empty);
            ImageFilter.ReplaceColor(BM1, Color.FromArgb(0, 0, 0), Color.Empty);


            pictureBox1.Image = BM1;
            pictureBox2.Image = BM2;

            textBox1.Text = ImageManipulation.CompareImages(BM1, BM2).ToString();
        }
Beispiel #3
0
 private void button2_Clik(object sender, EventArgs e)
 {
     workingImage      = new Bitmap(ImageFilter.FilteredImage(workingImage));
     pictureBox2.Image = workingImage;
 }
Beispiel #4
0
 private void rotate_Click(object sender, EventArgs e)
 {
     chosenImage       = new Bitmap(ImageFilter.RotateImage90CW(chosenImage));
     pictureBox2.Image = chosenImage;
 }
Beispiel #5
0
 private void trackBar2_Scroll(object sender, EventArgs e)
 {
     workingImage      = ImageFilter.adjustContrast(chosenImage, trackBar2.Value);
     pictureBox2.Image = workingImage;
 }
Beispiel #6
0
 private void trackBar1_Scroll(object sender, EventArgs e)
 {
     workingImage      = ImageFilter.adjustBrightness(chosenImage, trackBar1.Value);
     pictureBox2.Image = workingImage;
 }
Beispiel #7
0
 private void Negative_click(object sender, EventArgs e)
 {
     pictureBox1.Image = ImageFilter.DrawAsNegative(DefaultImage);
 }
Beispiel #8
0
 private void Sepia_click(object sender, EventArgs e)
 {
     pictureBox1.Image = ImageFilter.DrawAsSepiaTone(DefaultImage);
 }
Beispiel #9
0
 private void Grayscale_click(object sender, EventArgs e)
 {
     pictureBox1.Image = ImageFilter.DrawAsGrayscale(DefaultImage);
 }
Beispiel #10
0
 private void Rotate90CW(object sender, EventArgs e)
 {
     UploadedImageBitmap.BM = new Bitmap(ImageFilter.RotateImage90CW(pictureBox1.Image));
     pictureBox1.Image      = UploadedImageBitmap.BM;
 }
Beispiel #11
0
 private void SuggestedFilterBoxClick(object sender, EventArgs e)
 {
     pictureBox5.Image = ImageFilter.SuggestedFilter(UploadedImageBitmap);
     pictureBox1.Image = pictureBox5.Image;
 }
Beispiel #12
0
 private void Negative_click(object sender, EventArgs e)
 {
     UploadedImageBitmap.BM = ImageFilter.DrawAsNegative(UploadedImageBitmap.BM);
     pictureBox1.Image      = UploadedImageBitmap.BM;
 }
Beispiel #13
0
 private void Sepia_click(object sender, EventArgs e)
 {
     UploadedImageBitmap.BM = ImageFilter.DrawAsSepiaTone(UploadedImageBitmap.BM);
     pictureBox1.Image      = UploadedImageBitmap.BM;
 }