title: Reading image in matlab in a format acceptable to mex
body: <p>Hi I use imread function in matlab to read an image. But now if i want to use this image in a mex file what should I do? 
  I used im2double function to the image and then passed it to the mex file but the results i get are not acceptable.</p>
  
  <p>so is there any other function which can be used</p>