I'm now trying to do a project which is image comparison and find out the difference.
For the difference, I would like to draw out i circle to show to the user.
The problem i faced was:
* I cannot get & draw out the difference point between both Master image (img1) and SAMPLE image (img2)
* For my result, I would like to draw out the circle based on the MASTER image position in any color inside the Yellow Rectangle (draw by me using paint) for SAMPLE image.
Currently, I have do by overlay technique but not the result i wanted, which is:
- Code: Select all
ThresholdedDifference filter = new ThresholdedDifference(100);
filter.OverlayImage = img2;
Bitmap resultImage = filter.Apply(img1);
resultImage.MakeTransparent();
Bitmap bitmapResult = new Bitmap(img2.Width, img2.Height, img2.PixelFormat);
Graphics g = Graphics.FromImage(bitmapResult);
g.DrawImage(img2, 0, 0, img1.Width, img1.Height); //background image
g.DrawImage(resultImage, 0, 0, img1.Width, img1.Height); //foreground image
g.Save();
pictureBox2.Image = bitmapResult;
* This is trying to overlay the SAMPLE image by using the difference of both image.
* The result will be in the Yellow Rectangle(draw by paint) of SAMPLE image(img2).
* If possible, I would like to change the differences color (inside the SAMPLE image - white color) during the .MakeTransparent() method into other color so that it will directly so the different. (for me, this is the most simplest way to do the comparison.)
At last, thanks for you view and if possible, please guide me or given me any suggestion to do that... ^.^
