Ask Your Question

No output from opencv_createsamples

asked 2017-09-21 08:25:45 -0500

huzam gravatar image


I came across a problem when using the opencv_createsamples utility for object detection. I am detecting suitable tea leaves for harvesting. So I wanted to create the cascade file (.xml) using Opencv 3.3 in windows 7 which will then be used in a code with a raspberry pi. I have taken 13 positive samples and I wanted to merge them with a few negative samples one by one. For example 10 samples for one positive image. I have more than 300 negative samples.

I have linked a batch file with the command to enter into the command line like so:

C:\opencv\build\x64\vc14\bin\opencv_createsamples.exe -img Positive1.jpg -bg neg.txt -info tea\leaf.lst -pngoutput tea -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 20 -w 24 -h 24 -show

The following results appeared:

image description

"face detector" is just the name of the folder with the data for my project.

Unfortunately, there were no images or text files listing the samples that appeared to the directed folder. I even tried entering the direct paths for every parameter in the command line instruction above and still nothing happened. The image lists all the contents in project folder: image description

I appreciate your help and I hope to hear from you soon. Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-26 05:00:33 -0500

vohungvi gravatar image

Please add parameter -vec. Example: -vec leaf.vec

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-09-21 08:25:45 -0500

Seen: 290 times

Last updated: Sep 26 '17