An example of the results
i have this:
Canny(test,edges,0.9*av[0],2*av[0],3,true);
for(int i=0;i<edges.rows;i++){
for(int j=0;j<edges.cols;j++){
cv::Vec2w& elem = edges.at<cv::Vec2w>(i,j);
std::cout << elem[0] << " , "<<elem[1] << std::endl;
}
}
the edges (cv::Mat) variable storage the result of cv::Canny function (a binary image) .. when i try to see the values of pixels using cv::Vec2w i have this for result:
6408 , 2058
1817 , 7433
1540 , 282
5386 , 1024
15 , 4867
768 , 275
1285 , 512
2 , 0
0 , 0
1 , 256
with cv::Vec2
0 , 0
0 , 0
0 , 0
0 , 0
0 , -256
255 , -256
0 , 0
0 , 0
with cv::Vec2i
0 , 0
0 , 0
-16777216 , -16776961
0 , 0
0 , -256
-1 , 65535
0 , -16777216
65535 , 0
0 , 0
and so on...
But for example if i write this image (imwrite("image.pgm",edges) ) and then reading with armadillo (the image es a single channel binary image) i have for the result an matrix (nx1) with values between 0 and 255 .. i know .. the format of both libraries is different, but .. i supose: binary image always have values 0 and 255 in one channel ....