0% found this document useful (0 votes)
39 views

Image Processing Basics: Muhammad Jakaria Rahimi

This document outlines image processing basics including image types, pixel coordinates, conversion between image types, histograms, and adjustments like equalization and level adjustment. It discusses grayscale, color, indexed, intensity and binary images. It presents MATLAB functions for reading, displaying, and converting between image types. It also explains how image histograms work and how equalization redistributes pixel values for better contrast. Examples are provided of equalization techniques for grayscale, color and indexed images. Level adjustment is introduced as a way to enhance contrast by remapping pixel values to a full range.

Uploaded by

Farhan Rahman
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Image Processing Basics: Muhammad Jakaria Rahimi

This document outlines image processing basics including image types, pixel coordinates, conversion between image types, histograms, and adjustments like equalization and level adjustment. It discusses grayscale, color, indexed, intensity and binary images. It presents MATLAB functions for reading, displaying, and converting between image types. It also explains how image histograms work and how equalization redistributes pixel values for better contrast. Examples are provided of equalization techniques for grayscale, color and indexed images. Level adjustment is introduced as a way to enhance contrast by remapping pixel values to a full range.

Uploaded by

Farhan Rahman
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Image Processing Basics

Muhammad Jakaria Rahimi


Ahsanullah University of Science and Technology

3/6/2015 1
Lecture Outline
• Image pixel coordinate.
• Image types and their conversion.
• Matlab functions for Image conversion.
• Image Histogram and Equalization.
• Level Adjustment.

3/6/2015 2
Image Pixel Coordinate

3/6/2015 3
Types of image: supported by MATLAB
• 8-bit gray scale image

• 24-bit color Image.

• 8-bit color image/ Indexed color image.


• Intensity Image.
• Binary Image.

3/6/2015 4
Indexed color image

3/6/2015 5
Intensity and Binary image

3/6/2015 6
Image conversion

3/6/2015
7
Matlab functions for Image conversion
• imread = read image data file with the specified format
• X = 8-bit grayscale image, 8-bit indexed image, or 24-bit RGB color image
• map = color map table for the indexed image (256 entries)
• imshow(X, map) = 8-bit image display.
• imshow(X) = 24-bit RGB color image display if image X is in a 24-bit RGB
• color format; grayscale image display if image X is in an 8-bit grayscale
format
• ind2gray = 8-bit indexed color image to 8-bit grayscale image conversion
• ind2rgb = 8-bit indexed color image to 24-bit RGB color image conversion
• rgb2ind = 24-bit RGB color image to 8-bit indexed color image conversion
• rgb2gray = 24-bit RGB color image to 8-bit grayscale image conversion
• im2double = 8-bit image to intensity image conversion
• mat2gray = image data to intensity image conversion
• im2uint8 = intensity image to 8-bit grayscale image conversion

3/6/2015 MATLAB example 8


Image Histogram and Equalization
• An image histogram is a graph to show how many pixels
are at each scale level or at each index for the indexed
color image.
• The histogram contains information needed for image
equalization, where the image pixels are stretched to give
a reasonable contrast.
• To do so, the equalized new pixel value is redefined as

3/6/2015 9
Solved example

3/6/2015 10
Example of Equalization

3/6/2015 11
Before After

3/6/2015 12
Color Image Equalization-I

3/6/2015 13
Color Image Equalization-II

3/6/2015 14
Indexed color Image Equalization
• Step 1. The RGB color map is converted to the YIQ color map. Note that
there are only 256 color table entries. Since the image contains the index
values, which point to locations on the color table containing RGB
components, it is natural to convert the RGB color table to the YIQ color
table.
• Step 2. The grayscale image is generated using the Y channel value, so that
grayscale equalization can be performed.
• Step 3. Grayscale equalization is executed.
• Step 4. The equalized 256 Y values are divided by their corresponding old Y
values to obtain the relative luminance scale factors.
• Step 5. Finally, the R, G, and B values are each scaled in the old RGB color
table with the corresponding relative luminance scale factor and are
normalized as new RGB channels in the color table in the correct range.
Then the new RGB color map is the output. (Multiply and Adjust)

3/6/2015 15
Indexed color Equalization

3/6/2015 16
Matlab function for equalization
• histeq=grayscale histogram equalization, or 8-
bit indexed color histogram equalization
• imhist = histogram display
• rgb2ntsc = 24-bit RGB color image to 24-bit
YIQ color image conversion
• ntsc2rgb = 24-bit YIQ color image to 24-bit
RGB color image conversion

3/6/2015 17
Image Histogram Equalizatio

3/6/2015
18
Equalization using MATLAB

3/6/2015
MATLAB Example 19
Linear Level Adjustment
• Sometimes, if the pixel range in an image is small, we can
adjust the image pixel level to make use of a full pixel range.
Hence, contrast of the image is enhanced.

3/6/2015 20
Level adjustment example

3/6/2015 21
Level adjustment (continued)

3/6/2015 22
3/6/2015 23
3/6/2015 24

You might also like