Image processing : can we remove objects attached to others ?
Show older comments
Ok I finally ask a question because I can't figure it out despite my researchs.
I want to process footprints photos to calculate the Arch Index (Cavanagh and al. 1987) :

To calculate the arch index we use the easy equation above, however we have to remove toes before calculation.
Therefore, I took a photo of my footprint ('testPab.png') , there is two footprints on paper (left and right foot, right foot has less ink) then I tried a way to process the data to get a binary image with footprints.
data = imread("testPab.png");
% Trying to smooth data
H=fspecial('gaussian',30,10);
AdjSmooth=imfilter(data,H,'replicate');
grayIMG=im2gray(AdjSmooth);
% improve contrast
edgeThreshold = 0.8;
amount = 0.4;
AdjGrayIMG = localcontrast(grayIMG, edgeThreshold, amount);
contrastIM = imadjust(AdjGrayIMG);
% Closing the image
SE=strel('rectangle',[10000 10000]); %[height width]
BW = imbothat(contrastIM,SE);
BW=imlocalbrighten(BW,0.6);
filteredIM = medfilt2(BW,[100 100]);
bwData = imbinarize(filteredIM,"adaptive","ForegroundPolarity","bright",'Sensitivity',0.6);
bigObject = bwareafilt(bwData,2); % keep the 2 biggest forms
binaryFoot = imfill(bigObject,'holes'); % fill the holes
montage({data,binaryFoot})
How can I detect and remove the toes? Is ther a way to interpolate the form without the toes ?
I thought about finding circles (imfindcircles) or the number of [0 1] I have for each rows to cut the toes but I still can't figure out the good way to do it.
PS: On R2022a I get this result with the same code, so I have to improve robustness if you have some advices :D

Accepted Answer
More Answers (1)
Pablo Rozier-Delgado
on 21 Nov 2022
0 votes
Categories
Find more on Image Processing Toolbox 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!


