Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you also have to learn C++, see e.g. C++ Templates

<uchar> is a template parameter and means that img_pyr2 must be of type uchar

if you would like to convert an uchar image to int you should use img_pyr2.convertTo(img_pyr_int, CV_32S);. Afterwards you can access the pixels via img_py_int.at<int>(y, x)