delete background x ray image

Hi, how can I delete the background of a dicom-image? By now I use this code:
level = graythresh(ImageLowNRUOTATA);
BW = im2bw(ImageLowNRUOTATA,level);
figure (3)
subplot(1,2,1); imshow(BW)
and it returns a binary image (black and white).
bw=uint16(BW);
ImageLowNRUOTATABINARY=uint16(ImageLowNRUOTATA);
C=imsubtract(ImageLowNRUOTATABINARY,bw);
I don't know how subtract the greyscale image (dicom) and the image that i found with the graythresh. Please help me.

回答 (1 件)

Image Analyst
Image Analyst 2016 年 1 月 18 日

0 投票

Don't use imsubtract, just set the values in the image to zero where your mask is true:
ImageLowNRUOTATABINARY(BW) = 0;

2 件のコメント

Laura Fabbri
Laura Fabbri 2016 年 1 月 19 日
Hi, using ImageLowNRUOTATABINARY(BW) = 0; the image becomes all black. I have to delete the background of a dicom chest image and using the 'graytresh' function the image becomes binary (black the chest and white the background, you can see in the photo) but now i don't know how return to a grayscale image without the background.
edgar avalos
edgar avalos 2019 年 5 月 29 日
try:
ImageLowNRUOTATABINARY(imcomplement(BW)) = 0;

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDICOM Format についてさらに検索

質問済み:

2016 年 1 月 18 日

コメント済み:

2019 年 5 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by