opencv_createsamples:无效的背景描述文件? [英] opencv_createsamples: Invalid background description file?

查看:243
本文介绍了opencv_createsamples:无效的背景描述文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在带有OpenCV的Ubuntu 16.04上运行创建示例,并且在运行时不断遇到此错误.我有大约1960张负像,我正尝试从中生成样本图像.我在终端中运行的是:

I'm trying to run create samples on Ubuntu 16.04 with OpenCV, and I keep coming across this error when it runs. I have about 1960 negative images that I'm trying to generate sample images from. What i'm running in the terminal is:

opencv_createsamples -img pipe1.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 5 -maxyangle 5 -maxzangle 5 -num 1950

并且缩写输出为:

Open background image: neg/930.jpg
Open background image: neg/11.jpg
Open background image: neg/332.jpg
Open background image: neg/141.jpg
Invalid background description file.

我没有得到的是它似乎能够正确解析文件并找到图像...但是它一直说描述文件不正确...

What I don't get is it seems to be able to parse the file correctly and find the images...but it keeps saying the description file is incorrect...

推荐答案

这是我的解决方案:使用完整路径.

Here is my solution: use full path.

此问题可能是由以下原因引起的:

This problem can be caused by a few things:

1)缺少图像,因此无法打开.

1) an image is missing thus failed to be opened.

2)路径不正确.您需要验证您提供的路径(如果是图片的路径).

2) the path is incorrect. you need to verify the path you give if the path to an image.

这篇关于opencv_createsamples:无效的背景描述文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆