unable to set saturation in grayworld white balancing of opencv_extra module
virtual void cv::xphoto::GrayworldWB::setSaturationThreshold ( float val ) ;
without this function, the below code is having no issues, but when i am trying to get or set the saturation level it is giving the error:cannot call member function ‘virtual void cv::xphoto::GrayworldWB::setSaturationThreshold(float)’ without object, what is the correct way to call the function??
int main(int argc, const char **argv)
{
Mat src,resized,res;
src = imread("/home/u-16i/Pictures/wp/beach_flowers-wallpaper-1440x900.jpg");
if (src.empty())
{
printf("Cannot read image file");
return -1;
}
resize(src, resized, Size(), .49, 0.49, CV_INTER_AREA);
imshow("b4 white balance", resized);
Ptr<xphoto::GrayworldWB> wb =xphoto::createGrayworldWB();
xphoto::GrayworldWB::setSaturationThreshold(0.5);//error: cannot call member function ‘virtual void cv::xphoto::GrayworldWB::setSaturationThreshold(float)’ without object
wb->balanceWhite(resized, res);
imshow("after white balance", res);
waitKey(0);
return 0;
}