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)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!