Reputation: 71
I want to compare 2 images, where the first image is stored in a database and the second image is from a live video stream via a webcam. Is it possible to determine whether there are some differences between the images, or whether they are identical?
I want the image comparison to be pixel by pixel. If a pixel by pixel comparison is hard, or even impossible, could you suggest a better way of doing this?
Upvotes: 0
Views: 1709
Reputation: 3047
Perform a hash function on your image and compare it with the precalculated image hash in the database.
Upvotes: 0
Reputation: 11941
A simple pixel by pixel comparison is unlikely to work well because of noise in the webcam image.
You need a similarity measure like Peak signal-to-noise ratio (PSNR) or Structural Similarity (SSIM)
Upvotes: 4