CBlobResult 很痛苦。使用 Visual C++ 2008.OpenCV

发布于 2024-09-04 20:40:14 字数 359 浏览 2 评论 0原文

当我键入以下代码行时...其中 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

氛圍 2024-09-11 20:40:14

您可能已经为旧库编写了代码。看一下头文件,我猜构造函数只有 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.

你的往事 2024-09-11 20:40:14

由于某种原因,零值阈值不起作用。

尝试
blob = CBlobResult(&abc,NULL,255);

For some reason thresholding with a zero value does not work.

Try
blobs = CBlobResult(&abc,NULL,255);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文