【问题标题】:I'm trying to denoise a colored image using OpenCV我正在尝试使用 OpenCV 对彩色图像进行降噪
【发布时间】:2015-04-25 05:45:08
【问题描述】:
 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 中的断言失败

谁能告诉我怎么回事?

【问题讨论】:

    标签: c++ opencv


    【解决方案1】:
    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;
    

    【讨论】:

    • 当我编译代码时,它给出“错误 LNK2019: unresolved external symbol”void __cdecl cv::fastNlMeansDenoisingColored(class cv::_InputArray const &,class cv::_OutputArray const &,float,float ,int,int)" (?fastNlMeansDenoisingColored@cv@@YAXABV_InputArray@1@ABV_OutputArray@1@MMHH@Z) 在函数 _main 中引用致命错误 LNK1120: 1 unresolved externals" as error......
    • 你必须链接opencv_photo249.lib(d在最后调试)
    猜你喜欢
    • 2015-11-07
    • 2020-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-12
    • 1970-01-01
    • 2017-06-01
    相关资源
    最近更新 更多