1 | initial version |
replace the following lines in your code:
double maxVal=0;
minMaxLoc(hist, 0, &maxVal, 0, 0);
cout << "highest Hue value: " << maxVal << endl;
with this:
double maxVal=0;
Point maxLoc;
cv::minMaxLoc(hist, 0, &maxVal, 0, &maxLoc);
cout << "highest Hue value: " << maxVal << "at the " << maxLoc.y << " bin." endl; // maxLoc.y shows you in which bin you have the most of your pixels values
2 | No.2 Revision |
replace the following lines in your code:
double maxVal=0;
minMaxLoc(hist, 0, &maxVal, 0, 0);
cout << "highest Hue value: " << maxVal << endl;
with this:
double maxVal=0;
Point maxLoc;
cv::minMaxLoc(hist, 0, &maxVal, 0, &maxLoc);
cout << "highest Hue value: " << maxVal << "at the " << maxLoc.y << " bin." << endl; // maxLoc.y shows you in which bin you have the most of your pixels values