Please help: OpenCV Android Star Feature Detection

asked 2014-08-13 03:19:17 -0600

PrettyDerp gravatar image

updated 2020-11-09 11:32:34 -0600

Please help me with my problem, I am facing right now. I am very new to OpenCV Android and was asked to create an application to detect some reference colours using Star Feature Detection. I tried to search google for any related topic but most of them are C++/C. So I want to ask is there any basic practice sample based on StarFeatureDetection, anybody can provide me?

edit retag flag offensive close merge delete

Comments

2

Nope but you could use the JNI support to call C++ samples from android. Look at this tutorial.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-13 03:32:05 -0600 )edit

But I am restricted to only use android coding

PrettyDerp gravatar imagePrettyDerp ( 2014-08-13 03:45:31 -0600 )edit
1

should work from plain java, too, look here

FeatureDetector star = FeatureDetector.create(FeatureDetector.STAR);

berak gravatar imageberak ( 2014-08-13 04:00:31 -0600 )edit

Actually I know how to create but I don't understand how to use star.detect() and the description "Detects keypoints in an image (first variant) or image set (second variant)". Example: { I got 2 image, 1 is the "source image" and the other one is "template image" the function will compare the 2 image and see if the feature in "template image" appear in "source image". If it appear, it will return the position of the detected area. } is that what the function do??

PrettyDerp gravatar imagePrettyDerp ( 2014-08-13 04:13:19 -0600 )edit

sidenote ... how do people choose their nicknames on forums :D?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-08-13 04:18:50 -0600 )edit

no, there's no comparison done.

it either collects keypoints for 1 image, or vectors of keypoints for many images.

@PrettyDerp, maybe it's time now, to explain, what you want to do, once you found keypoints.

"to detect some reference colours " - that's pretty blurry.

berak gravatar imageberak ( 2014-08-13 04:19:05 -0600 )edit

What I actually need to do is by using StarFeatureDetector, find the the position of the reference colour. In short, I have this image and within the image there is multiple reference colour. I want to detect that specify reference colour in the image using StarFeatureDetector but I do not know how and i can't find any good example to help me

PrettyDerp gravatar imagePrettyDerp ( 2014-08-13 04:27:27 -0600 )edit

I tried using template matching but it cannot detect the colour position if the image is not vertical or horizontal

PrettyDerp gravatar imagePrettyDerp ( 2014-08-13 04:29:17 -0600 )edit
1

each keypoint has a pt member, the location. you could query the img color at that point, but i see no guarantee, that those keypoints will hit your reference color at all (most feature detectors even work on grayscale).

berak gravatar imageberak ( 2014-08-13 04:35:55 -0600 )edit
1

so you mean most feature detector only work if the image is grayscale?

PrettyDerp gravatar imagePrettyDerp ( 2014-08-13 04:39:09 -0600 )edit