CBlobResult 很痛苦。使用 Visual C++ 2008.OpenCV
当我键入以下代码行时...其中 img_hsv 是 Mat 图像...
IplImage abc=img_hsv;
// object that will contain blobs of inputImage
CBlobResult blobs;
// Extract the blobs using a threshold of 100 in the image
blobs = CBlobResult(&abc,NULL,100,true);
它显示以下错误...
错误 C2661: 'CBlobResult::CBlobResult' : 没有重载函数需要 4 个参数.. 欢迎任何帮助...!!
When I type the following code line.. where img_hsv is a Mat image...
IplImage abc=img_hsv;
// object that will contain blobs of inputImage
CBlobResult blobs;
// Extract the blobs using a threshold of 100 in the image
blobs = CBlobResult(&abc,NULL,100,true);
It displays the following error...
error C2661: 'CBlobResult::CBlobResult' : no overloaded function takes 4 arguments..
Any help is welcome...!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能已经为旧库编写了代码。看一下头文件,我猜构造函数只有 3 个参数。删除
true
,然后它应该可以工作。此讨论可能会指出更多详细信息的问题: http://tech.groups .yahoo.com/group/OpenCV/message/61534 帮助您找到可能更合适的解决方案(如果简单地删除该标志确实会产生一些不良副作用)。
You probably have code written for an older library. Have a look at the header file, I guess the constructor has only 3 arguments. Remove
true
, then it should work.This discussion might point out the problem with more details: http://tech.groups.yahoo.com/group/OpenCV/message/61534 to help you finding a maybe more suitable solution if simply removing the flag does have some undesirable side effects.
由于某种原因,零值阈值不起作用。
尝试
blob = CBlobResult(&abc,NULL,255);
For some reason thresholding with a zero value does not work.
Try
blobs = CBlobResult(&abc,NULL,255);