我正在尝试使用此function,但我找不到任何示例。所以我尝试了所有可能的方法,每次我得到一个不同的错误:
cv::Mat salMap;
cv::saliency::StaticSaliencySpectralResidual::computeSaliency(img, salMap);
这会导致错误:
'cv::saliency::Saliency::computeSaliency': illegal call of non-static member function
然后我试着像这样实例化这个类:
cv::saliency::StaticSaliencySpectralResidual myObj;
myObj.computeSaliency(grayImg, salMap); // also tried "->" instead of "."
这是我得到的错误:
Error LNK2001 unresolved external symbol "public: bool __cdecl cv::saliency::Saliency::computeSaliency(class cv::_InputArray const &,class cv::_OutputArray const &)" (?computeSaliency@Saliency@saliency@cv@@QEAA_NAEBV_InputArray@3@AEBV_OutputArray@3@@Z)
Error LNK2001 unresolved external symbol "public: virtual __cdecl cv::saliency::Saliency::~Saliency(void)" (??1Saliency@saliency@cv@@UEAA@XZ)
那我怎么能用这个班?
感谢您的帮助!