OPENCV_ROOT
폴더에있어
와 윈 - 64에서 다음 명령을 실행 :에서 OpenCV createsamples - 유효하지 않은 배경 설명 파일
opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 1.1
maxzangle 0.5 -maxidev 40 -w 80 -h 40
-img ABSOLUTE_PATH_TO_POSITIVE_IMAGES_FOLDER\car.jpg
-bg ABSOLUTE_PATH_TO_PROJECT\negatives.txt
-vec ABSOLUTE_PATH_TO_SAMPLES_FOLDER\car.jpg.vec
-num 125
내 negatives.txt
은 다음과 같습니다
negative_images\city01_02.jpg
negative_images\city01_04.jpg
negative_images\city01_05.jpg
negative_images\city01_06.jpg
negative_images\city01_07.jpg
이 내입니다 출력 :
Info file name: (NULL)
Img file name: ABSOLUTE_PATH_TO_POSITIVE_IMAGES_FOLDER\car.jpg
Vec file name: ABSOLUTE_PATH_TO_SAMPLES_FOLDER\car.jpg.vec
BG file name: ABSOLUTE_PATH_TO_PROJECT\negatives.txt
Num: 125
BG color: 0
BG threshold: 0
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 80
Height: 40
Create training samples from single image applying distortions...
Invalid background description file.
내 부정적인 수집 파일 (negatives.txt
)? 절대 경로와 상대 경로를 사용하여 파일을 나열하려고했습니다. 자습서는 this입니다.
이것은 어려운 문제입니다. 흠. 네거티브.txt 파일의 전체 경로를 지정해 보셨습니까? 예를 들어,'negative_images \ city01_02.jpg' 대신에'C : \ images \ negative_images \ city01_02.jpg'를 사용합니까? – rockinfresh
내가 의심하는 또 다른 이유는 이미지 이름에'_'가 될 수 있습니다. – rockinfresh
예, 밑줄없이 시도했지만 차이는 없습니다. 나는 또한 네거티브에서 전체 경로를 사용하여 시도했다. 나는 심지어 negative_images 폴더를 opencv_createsamples 바이너리가있는 폴더에 복사했지만 차이점은 없었다. – user961627