Solved

Quick comparing two images for differences in VB.NET

Posted on 2010-09-17
3
1,218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

632 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