OpenCV create_samples 失败
OpenCV create_samples fails
我的 positives.txt
文件中引用了 567 张正面图片,格式如下(假设每张图片只有 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
这是什么原因造成的?
原来是我的txt文件格式不对;格式如下(假设每张图片只包含1个物体):
path num_of_objects x y width height
我的 positives.txt
文件中引用了 567 张正面图片,格式如下(假设每张图片只有 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
这是什么原因造成的?
原来是我的txt文件格式不对;格式如下(假设每张图片只包含1个物体):
path num_of_objects x y width height