Detection of caracteristic points
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ok so I have written a code that allows me to create a silhouette of the hip from a X-ray and superimpose that over the original image. The goal of this code is to detect is the patient has a dysplasia that's why the next thing I want to do is to detect some typical points from these shape. But I don't know how to detect it. If anyone has a suggestion for me or tips I'm all ears! I'm far from an expert. Thanks in advance for your help!
if true
%ouverture de l'image que l'on veut traiter
I = imread('myfile.jpg');
figure (1), imshow(I), title('Radiographie à traiter');
%Premier filtrage : segmentation
[~, threshold] = edge(I, 'sobel');
fudgeFactor = .54; %on peut jouer sur le fait que les pixels en dessous de 0.85 sont considere comme des 0
BWs = edge(I,'sobel', threshold * fudgeFactor);
figure, imshow(BWs), title('masque de gradient binaire');
%augmenter le constraste des lignes de démarcation
se90 = strel('line', 3, 90);
se0 = strel('line', 3, 0);
BWsdil = imdilate(BWs, [se90 se0]);
figure, imshow(BWsdil), title('masque à gradient dilaté');
%suppression du bruit
I5 = bwareaopen(BWsdil, 100); %plus le parametre est important et plus la suppression sera important
figure(6), imshow(I5), title('Première suppression de bruit');
%remplir les trous à 1
BWdfill = imfill(I5, 'holes');
figure, imshow(BWdfill), title('Image binarisé remplie');
%filtrage de tout les pixels ayant une taille de forme ... inferieur à ...
seD = strel('diamond',3);
BWfinal = imerode(BWdfill,seD);
BWfinal = imerode(BWfinal,seD);
figure, imshow(BWfinal), title('image segmenté');
%nouvelle suppression du bruit
I6 = bwareaopen(BWfinal, 500);
figure(9),imshow(I6),title('Deuxième suppression de bruit');
%utilisation du filtre Canny ou prewitt c'est pareil
BW1 = edge(I6,'Canny');
%BW1 = bwmorph (I6,'remove');
figure, imshow (BW1),title('Filtre canny');
%superposition d'image
figure , imshow(I), title('Superposition');
boundaries = bwboundaries(BW1);
hold on;
visboundaries(BW1, 'Color', 'y');
hold off;
end
here it is the image that I used to do my shape's detection of the hip.
0 commentaires
Réponses (2)
Image Analyst
le 18 Avr 2018
It doesn't look like the hips can be found with traditional methods like intensity thresholding or morphology operations. I suggest you try deep learning.
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!