Mammogram - Detecting Skin Line need help

1 view (last 30 days)
ws
ws on 7 Oct 2011
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.

Answers (1)

Sean de Wolski
Sean de Wolski on 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)
  1 Comment
ws
ws on 7 Oct 2011
Thanks for your reply. I have fix my problem :)
BTW, may I ask you another question?
How to differenciate the input mammogram is left or right side view by using mean?
For example:
Mean_right=mean (RMLO) %right side view
Mean_Left=mean (LMLO) %left side view
If Mean_Left> Mean_right then mammogram is LMLO & (Mask1=LMLO),View=Left
Else given mammogram is RMLO & (Mask1=RMLO),View=Right
Thank you.

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!