delete background x ray image
Show older comments
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.
Answers (1)
Image Analyst
on 18 Jan 2016
Don't use imsubtract, just set the values in the image to zero where your mask is true:
ImageLowNRUOTATABINARY(BW) = 0;
2 Comments
Laura Fabbri
on 19 Jan 2016
edgar avalos
on 29 May 2019
try:
ImageLowNRUOTATABINARY(imcomplement(BW)) = 0;
Categories
Find more on DICOM Format in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!