Ex

cv::Mat img;
︙
double min, max; // 最大値 最小値
cv::Point min_p, max_p; //最大値最小値の位置
cv::minMaxLoc(img, &min, &max, &min_p, &max_p);