I need to transform thermographic images into gray-scale to detect temperature variation using matlab.
I tried to use the inbuilt function rgb2gray()
, 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?
My formula:
i=0.29 * rgb_img(:,:,1) + 0.59 * rgb_img(:,:,2) + 0.11 * rgb_img(:,:,3);
and
i=0.6889*rgb_img(:,:,1)+.5211*rgb_img(:,:,2)+.4449*rgb_img(:,:,3)+72.8;
but both of these didn't help.
sample images are: