I am trying this simple code:
int main()
{
Mat a = Mat::zeros(Size(200,200) , CV_8UC1); Mat b;
b = a;
for(int i=0 ; i< a.rows ; i++)
{
for(int j = 0 ; j< a.cols ; j++)
{
a.at<int>(i,j) = 100;
}
}
namedWindow("one" , WINDOW_AUTOSIZE);
namedWindow("two" , WINDOW_AUTOSIZE);
imshow("one", a);
imshow("two", b);
waitKey();
return 0;
}
But I get some strange results about memory map. What is the problem of this code?