How to analyse and detect defects?
2 views (last 30 days)
Show older comments
Hello
In this file (FindPathology.m) what I would like to do is analyse and detect pathologies in medical images. I have 3 normal images (image_A, image_C, image_E) and 2 images with pathologies (image_B, image_D). If the code was to be used only in these pictures it would be easy since I know the what pathology to look for (in this case the decagram) so I would just need to find an area with the same measures or even use Template Matching.
I've created all this code and this is the image that I obtained:
The next steps that I would like to do are:
- Analyse the image and detect if there's a pathology;
- Would need to invert teh image colors so I could get the contour coordinates and crop the pathology
- With the extaction of the pathology get information of the area.
Now I'd need to find a way to analyse and find the hole so then I could extract to an other image and take some characteristics (e.g. area, perimeter, etc.). I tried using Euler number to find holes but because there's some little holes in the image it doesn't garantee much results, and I can't use imdilate() because it covers a part of the pathology. I've tried to use imfill() too because I saw in one of MATLAB answers but it didn't resolve nothing as well.
I've tried to Google it and look for similar MATLAB answers but none of them really helped. If someone knows what functions should I look at to achieve it that would be terrific because I feel so stuck in this. I just really need an idea on how to approach this, just an hint on how to do this. And if someone thinks there's a better way to do than the steps mentioned above feel free to tell me, all answers are much appreciated.
Thank you
0 Comments
Answers (1)
Image Analyst
on 23 Jun 2021
Edited: Image Analyst
on 23 Jun 2021
There is no single program that can do the job of a radiologist and recognize any type of abnormality at all in a radiograph. The images are just too complicated and variable. There are algorithms that look at specific types of abnormalities and you can find them here:
under the medical section. I'm pretty certain none look at binary images, or images with high contrast holes in them.
We could easily find a large hole such as that in your very unrealistic image. "mask" is your binary image, so to find the single hole
bigHole = imclearborder(~mask); % Get rid of black touching the edge of the image
bigHole = bwareafilt(bigHole, 1); % Take largest blob only.
% To crop out to separate array
props = regionprops(bigHole, 'BoundingBox', 'Area') % Find the bounding box and area
croppedImage = imcrop(bigHole, 'props.BoundingBox'); % Do the crop.
imshow(croppedImage); % Display the image.
0 Comments
See Also
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!