Solved

Quick comparing two images for differences in VB.NET

Posted on 2010-09-17
3
1,181 Views
Last Modified: 2012-05-10
In VB.NET, I have a source image and a reference image that I want to compare and identify the differences. The two images are jpegs so the pixels can differ slightly while still being basically the same. I'm trying to determine how alike the two pictures are, e.g. are the 95% identical, or 10% identical etc.

I know how to loop through the image doing GetPixel() and comparing the results, but that is pretty slow for large images especially when you have to process the pixels to determine "how different" they are as opposed to just comparing them.

Does anybody have any ideas/tricks that can do this in a faster way?
0
Comment
Question by:Frosty555
3 Comments
 
LVL 9

Accepted Solution

by:
Hawkvalley1 earned 500 total points
ID: 33700667
0
 

Expert Comment

by:c_hubbard
ID: 33702131
Why not sample a % of the pixels in the image rather than reading all of them.

How are you comparing pixels?
  You could average (Math.abs(R1-R2)+Math.abs(G1-G2)+Math.abs(B1-B2))/255//3 over all the pixels.
 
0
 
LVL 31

Author Closing Comment

by:Frosty555
ID: 33717380
Well that certainly sped things up to what I needed it to be at. Thank you!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Asus ks2003 driver XP 32 33 72
Setting runtime form location 4 19
VB.NET HttpWebRequest 12 34
Achieve json result 2 35
We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now