Ask Your Question

Revision history [back]

Actually, the createsample utility will just do a stupid crop operation to your specified -w and -h parameter resulting in a vector of positive training samples all containing the same dimensions, no matter what the original size of the training data was.

If your ratio of your original image was for example w/h = 2/1 and you pass a w/h ratio to the tool of 1/1 then you can definitately understand that your image representation of your object will be wrong and highly deformed, a somewhat pushed together car in width.

And also, this -w and -h parameter will determine the ratio of your detection ratio, which will mean that he will only find cars with a 1/1 ration and not the normal cars that have a 2/1 ratio.

I suggest changing your parameters to for example -w 40 -h 20 and the result will be perfectly working :)