I am looking for matlab code to extract different useful features from the thermal image and microstructure image of printed part in additive manufacturing

19 次查看(过去 30 天)
features from thermal image like temperature distribution, thermal gradient, thermal anamolies, profile analysis , thermal time series.
features from microstructure image like Porosity and Density, grain structure, surface roughness and texture, Morphology and Shape Analysis, phase analysis and fractal analysis

回答(1 个)

Milan Bansal
Milan Bansal 2023-9-11
Hi,
I understand you need to extract different features from Thermal Images and Microstructural Images using MATLAB.
For thermal images:
Refer to the MATLAB File Exchange link below. This contains information and example code to extract Temperature Information form thermal images.
Use "improfile" function for profile analysis of the images. Refer to the documentation link below to learn more.
For microstructural images:
Refer to the MATLAB File Exchange link below for information and example code to calculate Porosity in Microstructure Images.
Refer to the following documentation link for textural analysis of the images.
Refer to the following documentation link for morphological analysis of the images.
Try to run the code given below to find the grain boundaries in the microstructure image.
microstructureImage = imread('microstructureImage.png');
binaryImage = imbinarize(microstructureImage); % Binarize the image
[B,L,N,A] = bwboundaries(binaryImage); % find boundaries
figure;
imshow(microstructureImage); hold on;
for k=1:length(B),
boundary = B{k};
plot(boundary(:,2), boundary(:,1),...
'LineWidth',1,color='k');
end
Refer to the documentation link to know more about "bwboundaries" function of "Image Processing Toolbox".
Try to run the code given below to calculate phase fraction of the microstructure.
I=imread("microstructureImage.jpg");
imshow(I)
% check for gray scale
if ndims(I)>2
K = rgb2gray(I);
else
K=I;
end
imshow(K)
[BW,maskedImage] = segmentImage(K);
imshow(BW)
WF = (sum(BW(:)) / numel(BW))*100
BF=(100-WF)
figure
montage({K, BW })
title(['Black fraction: ' num2str(BF) ' White fraction: ' num2str(WF)]);
function [BW,maskedImage] = segmentImage(X)
X = imadjust(X);
BW = imbinarize(X, 'adaptive', 'Sensitivity', 0.500000, 'ForegroundPolarity', 'dark');
maskedImage = X;
maskedImage(~BW) = 0;
end
Refer to the documentation link given below for Image Segmentation and Analysis on Microstructure Images.

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by