I have image with size of 36*36 it's logo of company .every time my app capture image, I want to find is that logo is available. if its available need to find it coordinates in the image. Guide me in right direction
2 Answers
You could do the following:
Feature Detection on your logo
Feature Detection on your image
Match feature descriptors
Compute a good homography with RANSAC (assuming the logo is planar)
Logo is found when number of inliers is above a threshold
The coordinates of the logo in the new image can be found by projecting a rectangle with your homography
EDIT:
This tutorial has some sample code: http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_feature2d/py_feature_homography/py_feature_homography.html

- 2,255
- 14
- 21
-
Can u elaborate little more, i could not get what your mentioned above. – Rakki s Apr 25 '17 at 11:14
-
I found a tutorial that does exactly this. – dari Apr 25 '17 at 11:50
-
Thanks for the code .. but i need it in java so is there any link for java or do i need to implement same using java and opencv ? – Rakki s Apr 25 '17 at 12:47
-
I don't know of any java implementation of this, so you probably have to do it yourself. – dari Apr 25 '17 at 15:07
Use template maching with rescale of image: http://docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matching.html
For example you run template maching for a image at original resolution and for 3 - 4 rescale with 1.1 and for 3 - 4 rescale with 0.9.
Resize: http://docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html#resize
-
-
-
What crashing? I don't understand. You have openCV installed, no? If you use camera try `System.gc();` for calling garbage collector. – Apr 26 '17 at 20:39
-
I used Open CV first thing it ask me to install OpenCV apk in device . After i did it keep on crash i used YU Mobile with 5.1.0 android OS – Rakki s Apr 27 '17 at 09:04