cvMinMaxLoc

獲取圖片顏色最大最小值及其位置
cvMinMaxLoc(影像 , &MinValue,&MaxValue,&MinLocation,&MaxLocation);


    cvSetImageCOI(image,1);
    cvMinMaxLoc(image,&MinValue,&MaxValue,&MinLocation,&MaxLocation);

    printf("The Min number is : %.f\n",MinValue);
    printf("The position is : ( %d , %d )\n",MinLocation.x,MinLocation.y);
    printf("The Max number is : %.f\n",MaxValue);
    printf("The position is : (%d , %d )\n",MaxLocation.x,MaxLocation.y);

    cvNamedWindow("grotto",1);
    cvShowImage("grotto",image);

    cvWaitKey(0);

}




留言

這個網誌中的熱門文章

SQL SEVER備份與還原遭遇問題

asp.net頁面間傳值