Solved

Quick comparing two images for differences in VB.NET

Posted on 2010-09-17
3
1,208 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why use this lambda? 12 62
A question on Active Directory LDS 4 22
VB.net/VSTO Excel Add-in 2 16
VB.net Is there code behind PowerPivot 2 47
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 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