2

I'm currently working on comparing objects in different angles for image detection. Basically, I want to know whether the object from image 1 is similar with object from image 2 (% of similarity would be great).

Image1:

Black glass in angle 1

Image2:

Black glass in angle 2

I have already looked around on the Internet and it seems like ASIFT (LINK) is a great solution. However, when I implement their demo and rerun the demo multiple times with the same inputs, ASIFT gives out different results on matched vertices.

Why does ASIFT give out different results each time I rerun the demo with the same inputs?

PS:
Some comments regarding alternative solutions like ASIFT or SIFT for comparing objects in a different angle (having a more consistent result) would be appreciated as well.

GitaarLAB
  • 14,536
  • 11
  • 60
  • 80
Tim
  • 1,029
  • 2
  • 14
  • 23
  • 1
    1) you can try with [AKAZE](http://docs.opencv.org/3.0-beta/doc/tutorials/features2d/akaze_matching/akaze_matching.html#akaze). 2) probably there is some randomness in the algorithm. – Miki Sep 15 '15 at 18:46
  • 1
    I edited the question as it was in the close-vote queue and tried to make the question part (*Why does ASIFT give out different results each time I rerun the demo with the same inputs?*) stand out more by bringing it out more clearly. If the PS-part is still unacceptable, please delete it (and ping me a comment so I know and learn). – GitaarLAB Sep 16 '15 at 21:25
  • @GitaarLAB Thanks for editing. It sounds more clearly now – Tim Sep 16 '15 at 23:20
  • @Miki Thanks for the suggestion. Do you know the differences between AKAZE and ASIFT? Like which one is better in term on accuracy? – Tim Sep 16 '15 at 23:22
  • I'm not an expert, but in general you need to test different descriptors. There's no golden rule for each case (aside that _in general_ SIFT works pretty well). I suggested AKAZE because they seem to be robust against homography transformations, which seems your case. But you need to try them to find out. – Miki Sep 17 '15 at 12:36

3 Answers3

1

You can try SURF, which is already implemented in OpenCV.

You may want also to have a look at vlFeat, which is in C, and have Matlab bindings.

Eran W
  • 1,696
  • 15
  • 20
  • Just like @RacilHilan said. It would be nice if you can clarify the differences between these algorithms and what they are mainly used for. Like how accurate they are in comparing objects in different angles? – Tim Sep 16 '15 at 23:24
1

It is not ASIFT or better-ASIFT problem. Basically, ASIFT solves "Wide baseline stereo" problem - find correspondences and geometrical transformations between different views of the SAME object or scene.

What you looking for is some kind of image (object) similarity. State-of-art method for this - train neural net, get fixed length descriptor of image from it and compare descriptors with Eucledian distance between them

For example, have a look into "Neural Codes for Image Retrieval" paper - http://arxiv.org/abs/1404.1777

P.S. If you still need correspondences and gave us different glasses by mistake, you can try MODS http://cmp.felk.cvut.cz/wbs/index.html Difference from ASIFT that it could handle much bigger angluar differences, more stable and much faster.

old-ufo
  • 2,799
  • 2
  • 28
  • 40
1

This is a quite hard problem for SIFT/ASIFT feature comparison if you have those two images only. It's not that clear even to me to say both images depict the same glasses, having in mind that there are very similar glasses that can be different in, say, the width of the side piece.

That said, I'd look for a different approach. These are some high level approaches that come to my mind:

  • The color is very characteristic in this case. If you have two exact models of different color, you can easily say they are not the same. So you can get the color histogram (ignoring the background) and compare them.
  • Another very characteristic feature of glasses is the shape of the frame around the lens. According to your images, I'd expect that frame to be visible always. So, you may find the rectangle that encompasses the lens, find the homography between the two images, warp the rectangle and compare both by cross correlation, for example.
ChronoTrigger
  • 8,459
  • 1
  • 36
  • 57