Thermal Camera Image Analyzing

6 次查看(过去 30 天)
Ayesha
Ayesha 2024-7-19
移动DGM 2024-8-25
Hi,I have thermal images and I need to draw weight lines for specific points:areas in the image. How to do that?
  1 个评论
DGM
DGM 2024-7-19
What does "draw weight lines for specific points/areas" mean exactly? Are you trying to find temperature profiles along lines defined by points?
Having a sample image and target points would be useful for creating an example.

请先登录,再进行评论。

采纳的回答

Rahul
Rahul 2024-8-23
I understand that you are trying to draw weight lines for specific areas in thermal images.
One of the ways of approaching this problem can be drawing weight lines using the "contour" function. This function creates a contour plot of the thermal image. You can set threshold values for the thermal image to highlight certain areas of the image and get appropriate contours.
You can use the following code:
thresholdValue = 150; % Setting an example threshold
binaryImage = thermalImage > thresholdValue;
figure;
imshow(thermalImage);
hold on;
% Use the "contour" function to draw contours on the thermal image
contour(binaryImage, 'LineColor', 'r', 'LineWidth', 2);
title('Contours on Thermal Image');
hold off;
% In this example "thermalImage" variable is assumed to be the thermal
% image
If needed you can also look into other image processing techniques to achieve the desired result from the "Image Processing Toolbox".
You can refer to the following documentations for your reference:
Hope this helps! Thanks.
  2 个评论
DGM
DGM 2024-8-23
编辑:DGM 2024-8-23
To be clear, this assumes that the input is already a 2D array of temperature data, not a pseudocolor image.
Given that, you could threshold it based on temperature ...
% a fake thermal image in floating point
S = load('Tpep.mat');
T = S.T;
% threshold based on temperature
thresh = 12.5;
mask = T > thresh;
% that works, but it's rough
imshow(mask)
... but there's no point in doing that if you're going to use contour() on the result.
% a fake thermal image in floating point
S = load('Tpep.mat');
T = S.T;
% if you're using contour(), there's no point in binarizing
templevels = [-50 -18.75 12.5 43.75 75]; % pick some temperature levels
imshow(repmat(mat2gray(T),[1 1 3])); hold on
contour(T,templevels,'linewidth',2)
colormap(parula(numel(templevels)))
As can be demonstrated easily, trying to show the source image and the contour simultaneously as in your example will not work for at least one reason. First, the temperature data is not in unit-scale, so it will be grossly truncated. If the linecolor specification were omitted, there would be other problems. Since T is 2D, both the displayed image and the contour() object would share the exact same color table which is asserted when contour() is called, making the contour effectively invisible.
% a fake thermal image in floating point
S = load('Tpep.mat');
T = S.T;
% threshold based on temperature
thresh = 12.5;
mask = T > thresh;
% this won't work
imshow(T); % this truncates the image at irrelevant levels
hold on;
contour(mask,'linewidth',2,'linecolor','r')
Even at that, it's not clear that "draw weight lines for specific points:areas" means "draw the level curves of the temperature data". OP never clearly stated what they wanted.
Also, it's not clear whether an overlaid contour in a figure is adequate, or whether the lines need to be incorporated into the image itself for some reason.
Ayesha
Ayesha 2024-8-25
移动:DGM 2024-8-25
Thank you very much

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 View and Analyze Simulation Results 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by