Paulina Jose
Paulina Jose

Reputation: 71

Comparing 2 images pixel by pixel (the first image is stored at a database)

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

Answers (2)

Boyko Perfanov
Boyko Perfanov

Reputation: 3047

Perform a hash function on your image and compare it with the precalculated image hash in the database.

Upvotes: 0

Bull
Bull

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

Related Questions