Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

JAVA / ANDROID: Trying to detect buttons (in a car). Which is the way to go? I tried many ways already.

hello there. im pretty new to opencv, only started using is a few weeks ago.

here is the situation:

i want to write an android application that takes a picture (or captures the frame of a video) of a button in (for example) a car. after the button is detected, the app is supposed to tell you what that button does.

the last part is not the problem, but in fact my problem is how i can detect and differentiate all the buttons in a car?

what i have tried so far:

1) using featuredetection: this worked alright, but it takes about 5 seconds for the image to be processed / detected. => this is too slow for me.

2) using template matching, as it was suggested to me: well, this worked well if the input image was exactly the same as the template image (just not cropped). but once the input image was not exactly the same image as the template, it did not work.

3) training my own haar classifier: i was trying to train my own classifier for the black cap of a pencil for the start. i took 40 positives and 635 negatives. out of the 40 positives i generated 3000 samples with the perlscript "createsamples.pl". training went good up to the 20st stage, but there were still too many "random" false detections. so i trained further, and the "random" false detections got less, but now it started to detect everything else i took a picture of aswell. example result: Result of the detection . here you can see that the cap was detected (which i wanted to), but also the coin was detected (which i sure didn't want to). my positives looked like this: Positive pictures

so my question is:

does any of you have a suggestion about what the correct aproach for my goal is? i am kind of stuck as i have tried all the above methods but none was satisfying...

thanks in advance, i apprechiate any help :)