OpenCV 2 二进制转换
我想根据像素的某个阈值将 Mono16 类型的 Mat 转换为二进制图像。我尝试使用以下内容:
阈值(img, ret, 0.1, 1, CV_THRESH_BINARY);
尝试编译时,出现 make 错误:
error: 'threshold'不能用作函数
谁能帮我解决这个问题吗?提前致谢!
I want to convert a Mat of type Mono16 to a binary image, based on some threshold value for the pixels. I tried to use the following:
threshold(img, ret, 0.1, 1, CV_THRESH_BINARY);
When trying to compile, I get a make error that says:
error: ‘threshold’ cannot be used as a function
Can anyone help me solve this problem? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“xxxx 不能用作函数”通常意味着您在代码中使用“xxxx”作为变量。
您的代码中是否有一个名为
threshold
的变量(我打赌您有......)?因为变量会隐藏函数。"xxxx cannot be used as a function" usually means you are using 'xxxx' as a variable in your code.
Do you have a variable called
threshold
in your code (I'm betting you do...)? Because the variable will then hide the function.