I'm having a problem regarding reading the pixel values (w=30, h=10). Suppose I'm using
- int readValue = cvGetReal2D(img,y,x); and
- int readValue = data[y*step+x];
Lets say I am trying to access pixel values at w=35, h=5 using the (1) and (2) method. The (1) will output an error of index out of range. But why (2) does not output an error of index out of range?
After that, I'm trying to use try...catch()...