1

画像のダイナミック レンジを計算する必要があります。そのため、画像の最大明度と最小明度を計算する必要があります。opencv を使用してこれを行う必要があります。opencvでこれを行う方法はありますか?

4

1 に答える 1

4

これは役立つかもしれません:

 // find minimum intensity and location of minimum intensiy
void min_Loc(Mat* img, Point* minloc, double* minVal)
{
    Mat dst2gray;
    double maxVal;
    Point maxloc;
    cvtColor(*img, *img, CV_RGB2GRAY);
    minMaxLoc(*img, minVal, &maxVal,minloc,&maxloc); //find minimum and maximum intensities and their positions

}
于 2013-02-06T11:22:25.187 に答える