我有567张正面图像,使用以下格式在我的positives.txt
文件中引用(假设每张图片只有1个对象):
path num_of_objects x1 y1 x2 y2
当我跑步时
opencv_createsamples -info ../data/positives.txt -num 567 -w 256 -h 256 -vec training.vec
我收到以下错误
Unable to open image: ../data//Users/jkarimi91/Documents/Projects/kaggle/right_whale_recognition/data/imgs/train/whale_00195/w_2753.jpg
OpenCV Error: Unknown error code -9 () in cvSetImageROI, file /Users/jhelmus/anaconda/conda-bld/work/opencv-2.4.8/modules/core/src/array.cpp, line 3000
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /Users/jhelmus/anaconda/conda-bld/work/opencv-2.4.8/modules/core/src/array.cpp:3000: error: (-9) in function cvSetImageROI
Abort trap: 6
造成这种情况的原因是什么?
答案 0 :(得分:0)
事实证明我没有正确格式化txt文件;它的格式应如下(假设每个图像只包含1个对象):
path num_of_objects x y width height