First time here? Check out the FAQ!
answered 2013-12-26 03:21:18 -0600
Your Mat is of type CV_8U, so you should access it's elements using:
image.at<uchar>(y,x)=0
However, you can also create a matrix of all zeros using :
Mat Z = Mat::zeros(3,3, CV_8UC1);