OpenCV for ANDROID image compare
Asked Answered
M

1

8

I want to develop app which will recognize object(like monument or something) present in front of camera using OpenCv and then it will show information about it.

So the question is how to recognize object(like monument or something) shape or compare to images with OpenCV?
And what is the best method for doing this?

It would be good if there was some kind of samples or tutorials for object detection and comparison.

Thank you.

Minefield answered 15/6, 2012 at 5:50 Comment(1)
What object detection algorithms have you looked at? First you must decide on the most appropriate one for your application. Depending on your algorithm, you may have to use training data to help define a model that best describes the object you wish to detect. Computer vision is a very difficult area to work on, and requires a good understanding of the area. If you're new to this, I'd recommend getting some textbooks.Illustrational
T
6

The best method for what you ask is using local features detectors like OpenCV's SIFT, SURF and ORB, for example.

You need at least one picture from the object you want to detect. Afterwards, those algorithms can compare that image with other images to see if they are similar enough.

Here is the Documentation for the algorithms.

  • ORB and others:

http://docs.opencv.org/modules/features2d/doc/feature_detection_and_description.html

  • SURF and SIFT ('nonfree'):

http://docs.opencv.org/modules/nonfree/doc/feature_detection.html

The way these algorithms work for that task is by selecting interesting points for each image, and compare them to see if they match. If several matches are found, it is most likely the images have the same object.

Tutorials (from Feature Detection and below):

http://docs.opencv.org/doc/tutorials/features2d/table_of_content_features2d/table_of_content_features2d.html

You can also find C++ samples related to this topic here (samples are also within OpenCV download package):

  • eg. "matching_to_many_images.cpp"
  • "video_homography.cpp"

http://code.opencv.org/projects/opencv/repository/revisions/master/show/samples/cpp

And Android Java samples here (unrelated but also helpful):

http://code.opencv.org/projects/opencv/repository/revisions/master/show/samples/android

Or Python samples which are actually the more updated ones for this topic (at the time this post was written):

http://code.opencv.org/projects/opencv/repository/revisions/master/show/samples/python2

As a final note, like @BDFun said in the comment, this is not trivial to do.

More - if you want an overview of OpenCV Feature detection and description, check this post.

Tristram answered 15/6, 2012 at 9:0 Comment(2)
how to use opencv+android ?with the android NDK ?Tuckerbag
Have you check this? docs.opencv.org/doc/tutorials/introduction/…Tristram

© 2022 - 2024 — McMap. All rights reserved.