I want to set a pixel which meets certain criteria to 4096 (2^12), but what I end up with is 14;
for(int j=0;j<dImg.rows;j++)
{
uchar* pixrow = dImg.ptr<uchar>(j);
for (int i=0;i<dImg.cols;i++)
{
if(j == 240 && pixrow[i] ==0) dImg.at<uchar>(j,i) = 2^12;
I check the value with
cout<<"\nmodified: "<<endl;
for(int i = 0; i<dImg.cols;i++){
cout<<" "<<unsigned(dImg.at<uchar>(240,i));
}