0% found this document useful (0 votes)
52 views5 pages

RGB Images: An Image Is A Matrix of Pixels Each Pixel Contains 3 Values (24 Bits) : Red, Green and Blue

An RGB image is composed of three 2D arrays that represent the red, green, and blue color components. To extract just the blue component, the blue 2D array can be accessed directly but it is better to subtract it from the grayscale version to remove bright/white parts. The median filter operates by placing a 3x3 pixel window over each pixel and replacing the pixel value with the median of the windowed pixels. This is effective for noise removal while better preserving edges than other filters.

Uploaded by

Barack Obama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views5 pages

RGB Images: An Image Is A Matrix of Pixels Each Pixel Contains 3 Values (24 Bits) : Red, Green and Blue

An RGB image is composed of three 2D arrays that represent the red, green, and blue color components. To extract just the blue component, the blue 2D array can be accessed directly but it is better to subtract it from the grayscale version to remove bright/white parts. The median filter operates by placing a 3x3 pixel window over each pixel and replacing the pixel value with the median of the windowed pixels. This is effective for noise removal while better preserving edges than other filters.

Uploaded by

Barack Obama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

RGB IMAGES

An Image is a matrix of pixels


Each pixel contains 3 values (24 bits): red, green and blue

So the whole image is made of 3 different images for each color (components)
EXTRACT THE BLUE COMPONENT
The image is a 3D array width*height*3:
• red component: data(:, :, 1)
• green component: data(:, :, 2)
• blue component: data(:, :, 3)

Why just doing data(:, :, 3) is not a good idea?

So it is better to subtract bright/white parts: imsubract(data(:, :, 3), rgb2grey(data(:, :, :)))


MEDIAN FILTER
Pass a 3by3 mask over every pixel of the image and replace that pixel with the median.
Very good for noise removal and better than the Gaussian or Mexican hat filter at preserving edges.

PROCEDURE:

3 7 1 5 8 4 6
3 5 3 6 5 1 2 For every pixel in the image,
8 9 0 7 8 0 6 place the 3by3 mask centered
9 5 1 2 5 4 8 on it

0 3 6 9 7 8 5
6 3 5 8 6 9 1
2 8 6 4 5 6 7
MEDIAN FILTER
Pass a 3by3 mask over every pixel of the image and replace that pixel with the median.
Very good for noise removal and better than the Gaussian or Mexican hat filter at preserving edges.

PROCEDURE:

3 7 1 5 8 4 6
3 5 3 6 5 1 2 1: take values: 5 3 6 9 0 7 5 1 2
8 9 0 7 8 0 6 2: order values: 0 1 2 3 5 5 6 7 9
9 5 1 2 5 4 8 3: take the middle one: 5

0 3 6 9 7 8 5
6 3 5 8 6 9 1
2 8 6 4 5 6 7
MEDIAN FILTER
Pass a 3by3 mask over every pixel of the image and replace that pixel with the median.
Very good for noise removal and better than the Gaussian or Mexican hat filter at preserving edges.

PROCEDURE:

3 7 1 5 8 4 6
3 5 3 6 5 1 2 4: replace it in the image
8 9 5 7 8 0 6
9 5 1 2 5 4 8
0 3 6 9 7 8 5
6 3 5 8 6 9 1
2 8 6 4 5 6 7

You might also like