Mammogram - Detecting Skin Line need help
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Sean de Wolski
2011-10-7
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 AI for Signals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!