Convert pixel vector to image
out = col2im(pix, imsize) is an image (HxWxP) comprising the pixel values in pix (NxP) with one row per pixel where N=HxW. imsize is a 2-vector (N,M).
out = col2im(pix, im) as above but the dimensions of out are the same as im.
Machine Vision Toolbox for MATLAB © 1990-2014 Peter Corke.