Image processing for calculating length between two points on an image.
Afficher commentaires plus anciens
Hello,
I am investigating a soltuion for calculating the width of cracks in lithium-ion batteries that have been damaged. I have CT scans of cross sections of the batteries, and I am looking to use MATLAB Image Processing Toolbox to calculate the width of the crack from these images.
So far, I have worked to isolate the battery casing from the image using some image processing functions, including segmenting the image with a global threshold and then retaining the object with the largest perimeter (the battery casing) using the bwpropfilt function. The code I have used for this is below.
I = imread('2D top view_310822_1238.jpg');
imshow(I)
title('Original CT Scan');
Igray = rgb2gray(I);
imshow(Igray)
Igray2 = imadjust(Igray);
imshow(Igray2)
BW = imbinarize(Igray2,"global");
imshow(BW)
BW2 = bwpropfilt(BW, 'perimeter', 1);
figure;
imshow(BW2)
I have also attached images of the original CT scan and the image BW2.
What I would now like to do is to calculate the point-to-point distance between the two ends of the battery casing. I have attached a third image, "Question_demonstration", to demonstrate this question.
Therefore, can somebody please suggest solutions to this problem?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Processing Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

