title: Coloured image warping in MATLAB
body: <p>Let's say we have a source image on which we want to do some deformations: To relocate the source image pixels into new deformed positions, I use the <a href="http://www.mathworks.se/help/matlab/ref/griddata.html" rel="nofollow">griddata</a> function for x and y values separately, which interpolates all the points in the image according to given reference points. I then calculate where each pixels should be remapped on the basis of the griddata outputs.</p>
  
  <p>The colour information, however, is lost during the process. So the output image is in gray scale.</p>
  
  <p>How do I operate with griddata function without losing the colour information?</p>
  
  <p>My question is related to coloured image warping.</p>