我正在讨论一个我无法打印图像像素值的问题。图像显示正确,但实际上不是给我三个255值,而是
-2147483648
-2147483648
-2147483648
是什么给出的?我不知道我做错了什么?
int main(int argc, char** argv)
{
Mat baselineColor(1000,900,CV_8UC3,Scalar(255,255,255));
//cvtColor(baselineColor,baselineColor,COLOR_BGR2HSV);
cout << static_cast<int>(baselineColor.at<Vec3d>(10,10)[0]) << endl;
cout << static_cast<int>(baselineColor.at<Vec3d>(10,10)[1]) << endl;
cout << static_cast<int>(baselineColor.at<Vec3d>(10,10)[2]) << endl;
namedWindow("Projector",WINDOW_AUTOSIZE);
imshow("Projector",baselineColor);
waitKey(0);
return 0;
}