Lab 8 Biomedical Imaging
Lab 8 Biomedical Imaging
Lab 8 Biomedical Imaging
Biomedical Imaging
29-04-2021
TERM PROJECT
rgb2gray converts RGB images to grayscale by
eliminating the hue and saturation information while
retaining the luminance. I = rgb2gray(RGB) converts the
truecolor image RGB to the grayscale intensity image I.
newmap = rgb2gray(map) returns a grayscale colormap
equivalent to map.
im2bw (Convert image to binary image, based on
threshold)
• BW = im2bw(I,level) converts the grayscale image I to binary image
BW, by replacing all pixels in the input image with luminance greater
than level with the value 1 (white) and replacing all other pixels with
the value 0 (black).
• This range is relative to the signal levels possible for the image's class.
Therefore, a level value of 0.5 corresponds to an intensity value
halfway between the minimum and maximum value of the class.
bwareaopen (Remove small objects from binary
image)
• BW2 = bwareaopen(BW,P) removes all connected components
(objects) that have fewer than P pixels from the binary image BW,
producing another binary image, BW2. This operation is known as an
area opening.
• Remove objects containing fewer than 50 pixels using bwareaopen
function.
• BW2 = imfill(BW,'holes');
• figure
• imshow(BW2)
• title('Filled Image')
strel