Ask Your Question
0

Image comparison - two image files in different directories

asked 2013-02-07 00:05:17 -0500

Bala gravatar image

Hi,

I've a set of images of an object in a directory, I take a new photo of an object 'X' and I want to compare the new image file with the previously stored images and find if they both are the same object. It's not real-time object recognition, no live image from the camera. Object recognition with image database and new image file. How can I do it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-28 05:39:35 -0500

lamparta gravatar image

You should use opencv_bridge to load and convert your images. Then use a similarity method: It depends an what you want to get. Do you only want to recognize the object in the image or also localize it?

  1. If only detection is needed: Use a Sift descriptor and detect all features in your image. If you have more images do it on each one and choose the principal components i.e. the features that occur in all of the training images. Then check for features in the image you want to detect the object in. If it has the same features up to some percentage, accept it as a valid detection.

  2. Template matching, if the object is of about the same size in each image. This is not rotation invariant nor scale invariant and also strongly affected by viewpoint changes. Very slow btw.

  3. If the object is not textured and the rest is highly textured, remove the textured components, p.e. by using a Canny Edge Detector. If your object is round you might also use Hough transform for circles.

There would be much more and it all depends on precise problem formulation. Try to give all information possible when asking questions.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-02-07 00:05:17 -0500

Seen: 125 times

Last updated: Oct 28 '15