I tried to get the value underneath an cv::Mat dImg
in the format 16UC1
but only get rubbish when obtaining one pixel value.
I expect an int ranging inbetween 0 and 2^16-1 (65535) but this is what i get:
135530515
583506521733990419
4.45466e-34
1.18455e-269
with
cout<<dImg.at<int>(240,320)<<endl;
cout<<dImg.at<long>(240,320)<<endl;
cout<<dImg.at<float>(240,320)<<endl;
cout<<dImg.at<double>(240,320)<<endl;