title: RGB image to grayscale conversion for thermographic images
body: <p>I need to transform thermographic images into gray-scale to detect temperature variation using matlab.</p>
  
  <p>I tried to use the inbuilt function <code>rgb2gray()</code>, but it's inefficient for my image database, so I tried to compute the formula for this, using correlation between colours and temperature and then interpolating it, but then will be it possible to get the efficient mathematical formula?</p>
  
  <p>My formula:</p>
  
  <blockquote>
    <p>i=0.29 * rgb_img(:,:,1) + 0.59 * rgb_img(:,:,2) + 0.11 *
    rgb_img(:,:,3);</p>
  </blockquote>
  
  <p>and </p>
  
  <blockquote>
    <p>i=0.6889*rgb_img(:,:,1)+.5211*rgb_img(:,:,2)+.4449*rgb_img(:,:,3)+72.8;</p>
  </blockquote>
  
  <p>but both of these didn't help.</p>
  
  <p>sample images are:</p>
  
  <p><a href="http://www.google.com/imgres?imgurl=http://www.breastthermography.com/images/AP-Breast-Case-2.jpg&amp;imgrefurl=http://www.breastthermography.com/case_studies.htm&amp;h=199&amp;w=300&amp;tbnid=48Yto8Y8RtRPjM:&amp;zoom=1&amp;docid=PX1nchTaFQpa3M&amp;ei=ftVdVIatNZCQuATptoLgCA&amp;tbm=isch" rel="nofollow">http://www.google.com/imgres?imgurl=http://www.breastthermography.com/images/AP-Breast-Case-2.jpg&amp;imgrefurl=http://www.breastthermography.com/case_studies.htm&amp;h=199&amp;w=300&amp;tbnid=48Yto8Y8RtRPjM:&amp;zoom=1&amp;docid=PX1nchTaFQpa3M&amp;ei=ftVdVIatNZCQuATptoLgCA&amp;tbm=isch</a></p>