Removing an object from an image

2 views (last 30 days)
Ciara
Ciara on 22 May 2014
Answered: Image Analyst on 7 Jun 2014
Hi, I am trying to remove the pectoral muscle from a mammogram image. I did this by converting it to binary doing the the following:
img2=img<150;
imclearborder(img2); %since the pectoral muscle is usually at the border of the image
This removes the pectoral muscle from the image. But I now need to convert the resulting image without the pectoral muscle back to grayscale. Can anyone advise me on how to do this please?
The first image shows a binary version of the mammogram with the pectoral muscle in the top left hand corner. The second image shows the binary image with the pectoral muscle removed. I need to convert this image back to graysclae.

Answers (1)

Image Analyst
Image Analyst on 7 Jun 2014
outputImage = originalGrayscaleImage .* uint8(binaryImage);

Community Treasure Hunt

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

Start Hunting!