thermal images processing || Need help! :)

Hello, recently struggling with a problem that concerns the thermal images which are visualized tumors. Now, I would like to somehow show the images only place showing the changes that are characterized by an intense red color (the higher the temperature the more "intense red" point image). I would like to make it look like so that they retain their spot color intensity, while the rest of the image that has been turned into gray. Another idea is a thresholding the image to show me the "white" such sites, and only those (thresholding of the appropriate range?), Then the program consisted of areas of that field. Welcome suggestions as to the algorithm itself, as well as to use a feature, and a great pleasure to accept some pieces of code :) For any help in advance thank you very much.

回答 (3 件)

Matt Kindig
Matt Kindig 2013 年 5 月 28 日
編集済み: Matt Kindig 2013 年 5 月 28 日

1 投票

Here's an example of an approach that might work:
X= imread('coins.png'); %sample indexed image
BW = (X > 100); %convert to black/white
L = bwlabel(BW); %segment image
Mask = (L==2); %isolate one coin
RGB = ind2rgb(X, jet(256)); %convert to RGB image
RGB = int8(255*RGB);
Gray = ind2gray(X, gray(256)); %convert to grayscale image
Gray = cat(3, Gray, Gray, Gray);
[ii,jj] = ind2sub( size(Mask), find(Mask));
kk = repmat(1:3, size(ii));
kk = sub2ind( size(RGB), repmat(ii,3,1), repmat(jj,3,1), kk(:)); %get indices of RGB image
Gray(kk) = RGB(kk); %assign pixels in mask to RGB
imshow(Gray); %one coin in color, all else in grayscale

1 件のコメント

Hszcz
Hszcz 2013 年 5 月 30 日
Hi! Thanks for your response. I tried used this code to my images but i can`t extract area of the more intensive red colour on my picture. Could you also help me in this matter?

サインインしてコメントする。

Image Analyst
Image Analyst 2013 年 5 月 30 日

0 投票

Do you have access to the original data? Or are you stuck with the pseudocolored version? If you have the original data, which you should have, then just change the colormap. If you're stuck with the pseudocolored version, contact your source and tell them you don't want or need that processed image and to give you the original image.

6 件のコメント

Hszcz
Hszcz 2013 年 5 月 30 日
編集済み: Hszcz 2013 年 5 月 30 日
Hi! Thanks for your response. I changed colormap as you said. I tried many colormaps but it doesn`t ave any effect at my image during thresholding. What to do after I change colormap?
Image Analyst
Image Analyst 2013 年 5 月 30 日
You have to call the colormap() function to apply it.
% Create the colormap.
cmap = gray(256);
% Make it red after gray level 200:
cmap(201:end, 1) = 1;
cmap(201:end, 2) = 0;
cmap(201:end, 3) = 0;
% Apply the colormap.
colormap(cmap);
Hszcz
Hszcz 2013 年 5 月 31 日
I like it! It works really fine :) But now it makes red two ranges of color. I work with this image: http://tinypic.com/r/25q3wgn/5 for test and with brilliant code you suggested:
X = imread('rece.tif');
figure, imshow(X);
X=rgb2gray(X);
cmap = gray(256);
% Make it red after gray level 200:
cmap(90:140, 1) = 1;
cmap(90:140, 2) = 0;
cmap(90:140, 3) = 0;
% Apply the colormap.
figure, imshow(X);
colormap(cmap);
with this particular thresholding it marks as a red really red range of color but also green one. Can I solve this problem somehow?
Image Analyst
Image Analyst 2013 年 5 月 31 日
That's an indexed image that's been made into an RGB image. The relationship between temperature and gray level has been lost unless you want to examine the colormap, which is a real pain. Ask them to give you the same image with a grayscale colormap. Otherwise you're in for a lot of work. You CAN'T just convert to gray like you did and expect that you'll get any meaningful temperatures - you'd need to examine the colorbar like I said..
Julie Ann Serrano
Julie Ann Serrano 2016 年 10 月 5 日
Hi. Can you guys help me? What we're going to do is to capture the thermal image of a plant and relate the temperature to its water status. My first concern: Can you give me some recommendations on how can I measure the temperature of the plant itself using the Grayscale of the thermal image?By using Matlab? What exactly are the considerations and parameters involved? I heard there has supposed to be some sort of mapping. I can't fully understand. Can you pls explain this to me? Your answer will be very much appreciated. Thank you so much. :)
Image Analyst
Image Analyst 2016 年 10 月 6 日
I assume you're doing it assuming evaporative cooling. You'll need to make a calibration standard by measuring plants of known water content at standardized temperature and humidity conditions and build a model, essentially a curve of water vs. gray level.

サインインしてコメントする。

suki
suki 2014 年 8 月 25 日

0 投票

hey... am doing project on thermal image processing.... for medical images i need to how to write coding from dat image.. thank u

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2013 年 5 月 28 日

コメント済み:

2016 年 10 月 6 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by