OpenCV_Contrib module quality

asked 2020-03-26 02:24:12 -0600

snehal gravatar image

updated 2020-03-26 02:42:17 -0600

berak gravatar image

Hello, I am using '' for image quality assessment . When i write following code in main() function and execute I got an error.

Mat img = cv::imread("E:\Images\Slide_02\200131_141613\Tile_0_0_0_0_2.bmp");

String model_path = "E:\VS_Projects\ImageQuality_opencvContrib\ImageQuality_opencvContrib\brisque_model_live.yml";

cv::String range_path = "E:\VS_Projects\ImageQuality_opencvContrib\ImageQuality_opencvContrib\brisque_range_live.yml";

/* compute BRISQUE quality score via static method */
cv::Scalar result_static = quality::QualityBRISQUE::compute(img,model_path, range_path);

Error : e:\opencv_contrib-master\modules\quality\include\opencv2\quality\qualitybrisque.hpp(67): error C2665: 'cv::Ptr<cv::ml::SVM>::Ptr': none of the 3 overloads could convert all the argument types

please suggest me where i am going wrong.

edit retag flag offensive close merge delete



vs version ?

btw, rather use forward slashes in pathnames, even on windows

berak gravatar imageberak ( 2020-03-26 02:30:36 -0600 )edit

I am using VS15

snehal gravatar imagesnehal ( 2020-03-26 02:34:39 -0600 )edit

does it get better, if you remove the = nullptr part ?

berak gravatar imageberak ( 2020-03-26 02:40:40 -0600 )edit

yes. Thank you

snehal gravatar imagesnehal ( 2020-03-26 03:09:08 -0600 )edit

so, did it solve the problem ?

if so, maybe you should post an issue about it ?

berak gravatar imageberak ( 2020-03-26 03:28:05 -0600 )edit

but got

error LNK2019: unresolved external symbol "public: static class cv::Scalar_<double> __cdecl cv::quality::QualityBRISQUE::compute(class cv::debug_build_guard::_InputArray const &,class cv::String const &,class cv::String const &)" ([email protected]@[email protected]@@[email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]) referenced in function main

Why i am getting linking error?

snehal gravatar imagesnehal ( 2020-03-26 03:33:04 -0600 )edit


you're trying to link RELEASE libs to a DEBUG project. (strictly use libs with trailing d for DEBUG)

berak gravatar imageberak ( 2020-03-26 03:38:27 -0600 )edit

i given 'opencv_world341d.lib' in Linker-> Input-> Additional dependencies in DEBUG mode. what else i need to link ?

snehal gravatar imagesnehal ( 2020-03-26 04:04:34 -0600 )edit

wait -- IF you built the opencv libs (with contrib modules) locally there should be a opencv_quality341d.lib

berak gravatar imageberak ( 2020-03-26 04:08:43 -0600 )edit

I have just downloaded opencv_contrib package in that there is no lib files. Is i need to build separately?

snehal gravatar imagesnehal ( 2020-03-26 07:14:30 -0600 )edit