First time here? Check out the FAQ!
answered 2012-10-12 02:15:13 -0600
edgeMat has CV_8UC1 type. You should iterate it with unsigned char type:
unsigned char
const unsigned char* Mi = edgeMat.ptr<unsigned char>(i);