【OpenCV学习笔记】【异常处理】一(The Matrix is not continuous, thus its number of rows can not be changed)

来源:互联网 发布:淘宝网可爱宝贝纸尿裤 编辑:程序博客网 时间:2024/06/06 01:21

在调试《Mastering OpenCV with  Practical Computer Vision Projects》书中的代码,trainSVM.cpp文件,对数码管的正负样本进行训练时,出现以下错误:

OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number
 of rows can not be changed) in unknown function, file src\matrix.cpp, line 801

最后检查出的错误有两点,这两点性质是一样的,都是找不到训练的图片:

(1)训练图片的命名不是随便命名的,而是从0开始,不是从1开始。

(2)训练路径没写对,(注意cpp文件中,路径用双斜杠)



0 0
原创粉丝点击