Find input image (ID,passport) in imagesDB based on similarity

帅比萌擦擦* 提交于 2019-12-25 18:53:49

问题


I would like to decide if an image is present in a list stored in a DB (e.g. pictures of IDs, passport, Stu. card, etc). I thought about using a KNN algorithm, that will plot the K closest images.

Options for distance metric:

  1. sum of Euclidean distance between each relative pixels (img1[pixel_i], img2[pixel_i])
  2. sum of Euclidean distance betwen each pixel to each other, multiplied by some factor decreasing with distance (pixel to pixel)
  3. same as above, but with manhattan...

Do you know/think of a better way to deal with the image similarity subject?


回答1:


I think that using raw graylevel values in computing distances is a very bad idea. This is not invariant to illumination, to translation and to rotation (although I don't think that rotation is a big issue in face images).

Try to use some robust and invariant descriptor extracted from each image (e.g. SIFT on keypoints) and then compute distances between those features. K-NN could work. Alternatively, look for image retrieval literature for more advanced approaches.

Hope this helps!




回答2:


If you have a large number of images in your database, it will get rather unwieldy calculating the similarity between a given image and every single image in your database every time. Instead, I would consider something like a Perceptual Hash (pHash) where you could pre-compute a parameter ONCE for each image in your database and store it, and then , when you want to compare an image you calculate just its single pHash and compare that with all the stored ones in your database.



来源:https://stackoverflow.com/questions/27150946/find-input-image-id-passport-in-imagesdb-based-on-similarity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!