Mammogram - Detecting Skin Line need help
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
I'm trying to find the skin line from the mammogram and replace the pixel to remove unwanted area.
Below is my code to replace pixels, and metrix y is count from right because image is from right view:
-------------------------------------------------
for i=1:x
for j=y:-1:1
if (LMLO_result(i,j)==255)
LMLO_result(i,j:1024)=255;
LMLO_result(i,1:j)=0;
end
end
end
-------------------------------------------------
Question:
1. Why the pixel looks like replaced from left to right? Since metrix y counted from right.
2. Why some black pixels with cover over white pixels?
Thank you.
0 commentaires
Réponses (1)
Sean de Wolski
le 7 Oct 2011
1) It may start from right to left, but it traverses all of the way across. Thus the furthest left point turns everything to the right white.
2) I'm not sure to the answer of your second question. Post the original binary image as a standalone file so we can run it.
Why are you setting the values to 255? Why not just use logicals (0/1) since there appear to only be two colors:
result = logical(cumsum(original,2));
Everything after the first true to the right will be white (1, i.e. logical true) everything else, to the left of the first true will be left black (0, i.e. logical false)
Voir également
Catégories
En savoir plus sur AI for Signals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!