How to convert the mat image to string (array2d<rgb_pixel>)?