I'm trying to apply derivative based color constancy on images and I'm using opencv in c++ to do so. I'm using Sobel derivatives to calculate my gradients but I don't know what I should cast pixel values of gradient image to in order to be able to read and change them.
Sobel( gradr1, gradr1, gradr1.depth(), 1, 0, 3, 1, 0, BORDER_DEFAULT );
gradr1.at<char>(i,j)
What should I use instead of char?