0

I'm trying to complete a code that I started on. I have an .bmp image that I transferred into a thermal image.

I also changed the orientation of the output into a r and theta from the central point of the picture.

What I am trying to do is take in the thermal, r, and theta information and output the r and theta values of the highest thermal signatures in the whole picture.

Does anyone know how to execute this?

clc
close all
clear all


[img,cmap] = imread('test_thermal.bmp');

img = img(:,:,1);
[ny,nx] = size(img)

% Since there are an even number of rows and columns

y1d = -ny/2 + 1/2:- 1/2 + ny/2
x1d = -nx/2 + 1/2:- 1/2 + nx/2

[X2D,Y2D] = meshgrid(x1d,y1d);
figure()
imagesc(x1d,y1d,img);

[theta2D, radius2D] = cart2pol(X2D,Y2D);
theta2Ddeg = rad2deg(theta2D);

Image Before

Image After

ceilowens
  • 1
  • 2

1 Answers1

0
  1. To obtain the peak thermal value you have to calibrate: You need 2 temperature references, for instance you need to know that 2 given pixels are equivalent to 2 (°C/°F/K) temperatures.

Then you can tell what is the temperature of the entire picture, of each pixel, by mapping the range of values in img to the scale that 2 temperature measurements.

The temperature distance between these 2 references should be as wide as possible, but not wider than the min(T) and max(T) in the picture, to avoid losing resolution.

If possible try taking an input reference image having measured the skin temperature on an 'easy to spot' point when looking for it across img : This is the 1st reference point.

For this input reference image also measure the room temperature , which would be the background of the input image : 2nd reference point.

If you can somehow add the room temperature measurement to each input image, as a separate input from the grey scale input image, then accuracy of overall temperature measurement greatly increases, because the background temperature may greatly vary.

  1. Then finding the peak temperature value is just max(max(img)) translated to temperature with the above mentioned mapping.

  2. There's no need for cart2pol at least to find the peak temperature value as asked here.

  3. If you supply such measurement, even if only simulated I can show you how to produce such mapping, for the 2 reference points you supply.

If you find it useful please consider marking it as correct answer. Thanks for reading my answer.

John BG
  • 690
  • 4
  • 12