title: Create a satellite true color image using Matlab
body: <p>I'm trying to create a true color RBG image from satellite data using matlab, but I don't know how to do it.</p>
  
  <p>The false color RGB image is simple, just employing the right channels for the red, green and blue you can make it</p>
  
  <pre><code>    RGB(:,:,1)=(ref16)'; %red - reflectance 1.6mic
      RGB(:,:,2)=(ref06)'; %green - reflectance 600nm
      RGB(:,:,3)=(ref05)'; %blue - reflectance 500nm
      image(RGB)
  </code></pre>
  
  <p>In this case I'm using reflectances from the satellite channels which range from 0 to 1, so I don't need to modify the original data</p>
  
  <p>But I'm having so much trouble when I try to plot true color images.</p>
  
  <p>According to literature, the following profile should yield good RGB images from MERIS Level-1b data products (the data I'm using). The linear-combinations for the red, green and blue components are based on the colour matching functions of the CIE 1931 color space.</p>
  
  <pre><code>    RGB(:,:,1)=log(1.0+0.35*radiance_2+0.60*radiance_5+radiance_6+0.13*radiance_7)'
      RGB(:,:,2)=log(1.0+0.21*radiance_3+0.50*radiance_4+radiance_5+0.38*radiance_6)'
      RGB(:,:,3)=log(1.0+0.21*radiance_1+1.75*radiance_2+0.47*radiance_3+0.16*radiance_4)'
  </code></pre>
  
  <p>Radiance are real values going from 0 to 400 (with the scale factor applied), so I guess that I have to normalize the RGB array (0-1 or 0-255) to create the image. </p>
  
  <p>But doing the normalization myself or just using im2uint8 doesn't produce the right image.</p>
  
  <p>It's likely that I'm doing everything wrong because I'm not familiar with colour profiles. Is there a way in matlab to create the image using directly the CIE rgb combination (the one I think I'm getting from the above formulas)?</p>
  
  <p>Is anyone out there familiar with images using matlab and satellite data?</p>
  
  <p>Thanks!</p>