The following is my C-OpenCV code.I can reach img.at(2,3)=5;//its ok but why program don't give me a segmentation fault error when I try to reach a number bigger than WIDTH (10 in here) like img.at(2,10)=5;
const int HEIGHT = 5;
const int WIDTH = 4;
const int CHANNEL = 4;
int main( int argc, char** argv )
{
Mat img(HEIGHT,WIDTH, CV_8U);
int choosingWidth=3;
int choosingHeight=2;
cout << "img = \n"<< " " << img << "\n\n";
img.at<char>(choosingHeight,choosingWidth)=5;
cout << "img = \n"<< " " << img << "\n\n";
choosingWidth=10;
img.at<char>(choosingHeight,choosingWidth)=5;
cout << "img = \n"<< " " << img << "\n\n";
return 0;
}