hi, I know this sound very small problem, But I have been searching google answer for this, basically what I need is convert 2d array of gray image into 1d unsigned short array. I tried following code, but I could not get what I need.
unsigned short i[48400]; img= imread("lena.png"); cvtColor(img,gimg,COLOR_RGB2GRAY); Mat gimg(220, 220, CV_16UC1, i);