Compare two images to find differences in each image using Visual Basic .NET
This example shows how to compare two images to find differences in VB .NET.
When you select two images to compare the program executes the following code.
It loads the two image files into Bitmaps. It finds the smaller of the Bitmaps'
widths and heights, and makes a new Bitmap of that size. Next the program
loops over the pixels in the smaller area, comparing the the images' pixels. If
two corresponding pixels are equal, the program colors the result pixel white.
If the two pixels are unequal, the program makes the result pixel red. When it
has examined all of the pixels, the program displays the result image. The
result image highlights differences between the two input images no matter how
small the differences are. If a pixel in one image has RGB values 50, 150, 200
and the corresponding pixel in the other image has RGB values 51, 150, 200, the
result shows the difference plainly even though you won't be able to tell the
difference with your eyes.
|
|
|
|
First |
Second Used Edge Finding |
Differance in two images |
 |
|
Thank you for viewing this source code. If you want to download the project files and a copy of this source code you must either fill out this form with a valid email address as some useful commets about this site or you may become a member free of charge. In either case a link will be emailed where you can down load the project filess.
|
|
|