I am a beginner in openCV. I want to detect some images, do I need to generate cascade file similar to one present in face detection sample app? What is the correct way?
I have installed opencv-3.0.0 using the installer from "http://downloads.sourceforge.net/opencvlibrary/opencv-3.0.0.exe". I am running the utilities opencv_createsamples and opencv_traincascade directly after running the installer. Is this the correct way to run the utilities?
"Is this the correct way to run the utilities?" - yes, i'd think so.
http://docs.opencv.org/ref/master/dc/...
http://answers.opencv.org/questions/q...
Thanks for the response Berak. Can you help me get the steps to generate a correct cascade file?
read a bit, try out, come back with actual problems ?
I tried generating a cascade file for detecting a car. I have 500 images in negative folder and one positive image. I used the below commands: 1. opencv_createsamples -img car.png -num 550 -w 48 -h 24 –vec cars.vec 2. 2. opencv_traincascade -data data -vec cars.vec -bg bg.txt -numStages 10 -minhitrate 0.999 -maxfalsealarm 0.1 -featureType LBP -numPos 1 -numNeg 500 -w 48 -h 24 3. I replaced the cascade file in face-detection sample app with this new generated cascade file.
But many false positives gets detected too along with the car. Probably the cascade file which I generated is not correct enough to detect only the car which I supplied as a positive image.
I am going through many other links and materials, but any suggestion will be of great help.
you're trying with one positive ( -img car.png) only ? that won't work. decide, which orientation(front,back,side) you want, it will only work for one. then use the annotation tool , and gather a few hundred positives
Thanks Berak. Yes I am trying with one positive, because my goal is to detect a particular image. Is that not possible with OpenCV?
a particular image ? what do you mean exactly ?
I have an image of a company's logo and now I want to detect it. This logo can be present anywhere, on top of any thing. As soon as I get this logo in my camera feed, I want to detect it and mark it.
so, that means, you need to collect images of your logo, not whole cars, right ? why didn't you say so before ?
still, you need as many cropped images of that logo as you can get. also, try to keep it as close to 1 orientation as possible.