OpenCV:Traincascade 失败“断言失败 _img.cols == winSize.width”
有人知道 OpenCV 错误:断言失败 _img.cols == winSize.width 是什么意思吗?我不熟悉 haar 训练(=traincascade)的新实现,也无法在 wiki 中找到任何文档。 谢谢, 约瑟夫
Anybody has an idea what OpenCV Error: Assertion failed _img.cols == winSize.width means? I'm not familar with the new implemenation of the haar training (=traincascade) nor could I find any documentation in the wiki.
Thanks,
Josef
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可能这有帮助:
http://lab.cntl.kyutech.ac.jp /~kobalab/nishida/opencv/OpenCV_ObjectDetection_HowTo.pdf
May be this helps:
http://lab.cntl.kyutech.ac.jp/~kobalab/nishida/opencv/OpenCV_ObjectDetection_HowTo.pdf
我想我已经找到了一些答案:
但我会选择第一个,因为如果我减少样本数量,它就不会再被卡住了。
I think I have found some answers:
But I would go for the first one, because if I reduce the number of samples it is not getting stuck anymore.
数据库太大不是问题,但没有意义。这是我好几天的问题。我猜你在程序中使用了线程,并且你的线程在到达检测器(用于检测关键点)之前到达 svm(或用于训练的其他东西)。如果您查看导致断言错误的路径,您就会发现这些事情是相关的。我建议您使用互斥体(或信号量)来正确管理线程,或者如果您不使用线程,请确保在训练之前进行检测。
祝你好运
Having too big database is not problem, it doesn't make sense . That was my issue for days. I guess you used thread in your program and your threads reach to the svm (or some thing else that you use for train) before get to detector (for detect the keypoints). If you look at the path which give you in assertion error, you got it that these things are relevant. I advice you to use mutex (or semaphores) to manage your threads correctly or if you don't use threads make sure that do detecting before training.
good luck