Removing an object from an image

조회 수: 2 (최근 30일)
Ciara
Ciara 2014년 5월 22일
답변: Image Analyst 2014년 6월 7일
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.

답변 (1개)

Image Analyst
Image Analyst 2014년 6월 7일
outputImage = originalGrayscaleImage .* uint8(binaryImage);

Community Treasure Hunt

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

Start Hunting!

Translated by