OpenCV Detecting Traffic Light green signal
I'm new to OpenCV Object detection using Cascade Classifier and trying to perform an application that detect green signal of a traffic light.
Downloaded a Dataset containing positive pictures about STOP,GO and WARNING pictures of traffic light (arround 4000 samples for each).
Using pictures where there's green traffic light as positive samples and both red and orange traffic light as negative samples.
My configurations for training: - 20 Stages - numPos 2000 - numNeg 2000 - w 24 - h 24
Got nice result of some pictures and wrong ones from some others (i took in both cases, test picture from the positive examples that i used to train with)
Here's a preview:
How come such result even thought the second picture belong to used positive examples of training ?
Something else,i have followed as well opencv's tutorial about Cascade Classifier training and programmation, but it doesn't really explain questions like how things work, or how many stages to use, or how many numPos to use etc... so if you have anything that could answer such questions just feed me please...
Thanks in advance.
using a cascade classifier for this might be a poor choice here. (not enough shape / texture information)
it also ignores color, so all you've left is a dark box with a light blob
then, you missed, that it can only make a binary classification, -- thing or not.
you cannot train it to predict 3 things: green light, red light, or no traffic light at the same time.
I'm training the detection of 1 thing only => green light so i'm using green light pictures as positive samples and (yellow + red) pictures as negative samples.
If a cascade classifier isn't possible for this purpose, what should i use then ?
do you understand, how a binary classifier works ?
its not green lights vs red lights, it is:
(trees, sky, cars, street, you name it)
sorry to say so, but this won't work, ever.
I used negative pictures containing a whole environment ( cars + trees + people + sky + buildings ...) , i have same pictures as above that doesn't contain green traffic light that i used for negative samples ! they don't contain ONLY red traffic light x)