Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv_createsamples invalid syntax

I'm using

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit 
(AMD64)] on win32

and installed opencv via cmd.

I'm try to get a vector file via opencv_createsamples and I'm facing the following error:

opencv_createsamples -info pos.lst -num 32 -w 20 -h 20 -vec pos.vec
File "<stdin>", line 1
opencv_createsamples -info pos.lst -num 32 -w 20 -h 20 -vec pos.vec                         ^
SyntaxError: invalid syntax

Using the absolute path for .exe doesnt help either and creates the same error

"C:\\Users\\azach\\Downloads\\opencv\\build\\x64\\vc15\\bin\\opencv_createsample.exe" -info pos.lst -num 2500 -w 20 -h 20 -vec pos.vec

nor does the absolute path for pos.lst change error.

Here are a few lines from pos.lst

pos/1.jpg
pos/2.jpg
pos/3.jpg

The directory's built: haar - pos.lst - pos - -1.jpg - -2.jpg - -3.jpg