uchar *ptr = eye.ptr<uchar>(y);
The
ptr
function takes an integer parameter (
y
) and returns a pointer to an array of unsigned characters.
int value = static_cast<int>(*ptr);
The character that is pointed to by the pointer is cast to an integer value. This is then added to an element of the sums array in the following loop.