opencv-haar-classifier-training
opencv-haar-classifier-training copied to clipboard
sh: 1: Syntax error: Unterminated quoted string
when I run: perl bin/createsamples.pl positives.txt negatives.txt samples 1500 "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1
-maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 20 -h 20"
using the perl function, we are trying to run the quoted command, but as you see the quoted function is separated by a "\n" and thus it is interpreted as two different functions.
To resolve this -
-
You can run the command in one line. For eg> perl bin/createsamples.pl positives.txt negatives.txt samples 1500 "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40"
-
or you can use a line separator such as- For Linux - perl bin/createsamples.pl positives.txt negatives.txt samples 1500
"opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1
-maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40" For Windows - perl bin/createsamples.pl positives.txt negatives.txt samples 1500 ^ "opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 ^ -maxyangle 1.1 maxzangle 0.5 -maxidev 40 -w 80 -h 40"