#include
#include
#include
int main(){
img = imread("./lena.png");
cvtColor(img, img, CV_BGR2GRAY);
uchar** pixmat = new uchar*[img.rows];
for(int i = 0; i < img.rows; i++){
pixmat[i] = new uchar[img.cols];
for(int j = 0; j < img.cols; j++){
pixmat[i][j] = img.at
}}}
//pixmat is demanded 2-D array