首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我试着用OpenCV对彩色图像去噪

我试着用OpenCV对彩色图像去噪
EN

Stack Overflow用户
提问于 2014-06-20 09:23:47
回答 1查看 4.8K关注 0票数 0
代码语言:javascript
复制
 Mat dimg=imread("mata.jpg");
 Mat result;

 void fastNlMeansDenoisingColored(InputArray dimg, OutputArray result, float h=3, float
 hColor=3, int templateWindowSize=7, int searchWindowSize=21 );     

 namedWindow("denoised Image",1);
 imshow("denoised Image",result);

 /// Wait until user press some key
 waitKey();
 return 0;

我得到以下断言:

断言在cv::imshow中失败

有人能告诉我怎么回事吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-06-20 09:33:40

代码语言:javascript
复制
Mat dimg=imread("mata.jpg");
Mat result;

if ( dimg.empty() ) // only fools don't check !
{
   cerr << "could not load image !";
}

// you have to call the actual function, not copy/paste the declaration !
fastNlMeansDenoisingColored( dimg, result, 3, 3, 7, 21 );     

namedWindow("denoised Image",1);
imshow("denoised Image",result);

/// Wait until user press some key
waitKey();
return 0;
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24323995

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档