0% found this document useful (0 votes)
90 views31 pages

EME408 01 Digital Image Fundamentals

The document provides an overview of digital image fundamentals including human vision, image acquisition, image sampling and quantization, representing digital images, grayscale and color images, and image histograms. It also discusses some basic MATLAB commands for reading and displaying images.

Uploaded by

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

EME408 01 Digital Image Fundamentals

The document provides an overview of digital image fundamentals including human vision, image acquisition, image sampling and quantization, representing digital images, grayscale and color images, and image histograms. It also discusses some basic MATLAB commands for reading and displaying images.

Uploaded by

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

EME408 Image processing and

vision

01 – Digital image fundamentals

Dr. Thilini Rajakaruna


Human Vision and perception
The human eye is equipped with a variety of optical elements, including the
cornea, iris, pupil, a variable lens and the retina.
Can :
 Recognize people and objects
 Navigate through obstacles
 Understand mood in the scene
 Imagine stories

3/28/2019 EME408 Image Processing and Vision - March 2019


2
Image acquisition
There are three main imaging sensor types:

 Single sensors such as the photodiode output a signal proportional to


(perhaps filtered) light intensity. Can be converted to a 2D image using a
scanner device.

 Strip sensors arrange light-sensitive elements in a single linear or circular

strip. Flatbed scanners, line cameras, and CAT machines are examples.

 Sensor arrays arrange sensor elements in arrays, typically 2D rectangular


arrays.
3/28/2019 EME408 Image Processing and Vision - March 2019
3
Content
 Digital Images overview

 Image sampling and quantization

 Representing digital images

 Spatial and intensity resolution

 Grayscale and colour image histograms

Ref: Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, 4th Ed

3/28/2019 EME408 Image Processing and Vision - March 2019


4
Components of a vision system

3/28/2019 EME408 Image Processing and Vision - March 2019


5
Digital images

3/28/2019 EME408 Image Processing and Vision - March 2019


6
Digital Images
An image is a two dimensional function where x and y are spatial (plane)
coordinates.
𝑓 (𝑥, 𝑦)
The amplitude of 𝑓 (, ) at (𝑥, 𝑦) is the intensity or gray level of the image
at that point.

𝑥, 𝑎𝑛𝑑 𝑦 are spatial coordinates.

An image being digital means that x and y are finite and discrete. With finite values
for x and y we have a finite number of pixel elements or pixels.

3/28/2019 EME408 Image Processing and Vision - March 2019


7
Simple image model
Image as a 2D light-
intensity function 𝑓 (𝑥, 𝑦)
 Continuous
 Non-zero, finite value

3/28/2019 EME408 Image Processing and Vision - March 2019


8
Representing images as matrices
Each point is a pixel with amplitude
𝑓 (𝑥, 𝑦)

An image is a matrix with size N X M

3/28/2019 EME408 Image Processing and Vision - March 2019


9
Colour images
Grey-scale image: one value per position 𝑓(𝑥, 𝑦) = 𝑖
RGB colour image: one vector per position 𝑓(𝑥, 𝑦) = [𝑅 𝐺 𝐵]𝑇

3/28/2019 EME408 Image Processing and Vision - March 2019


10
Useful MATLAB® commands
%Read and display an image
>> Img01 = imread('tulips.png');
>> imshow(Img01);
>> whos
Name Size Bytes Class Attributes
Img01 512x768x3 1179648 uint8

>> imfinfo('tulips.png')
%provide Information about graphics file

3/28/2019 EME408 Image Processing and Vision - March 2019


11
MATLAB ® Image Processing Toolbox™
Defines four
basic types of
images.

3/28/2019 EME408 Image Processing and Vision - March 2019


12
Image formats
BMP (Microsoft® Windows® Bitmap) PCX (Paintbrush)

GIF (Graphics Interchange Files) PNG (Portable Network Graphics)

HDF (Hierarchical Data Format) TIFF (Tagged Image File Format)

JPEG (Joint Photographic Experts Group) XWD (X Window Dump)

MATLAB math supports three different numeric classes for image display:
 double-precision floating-point (double)
 16-bit unsigned integer (uint16)
 8-bit unsigned integer (uint8)
3/28/2019 EME408 Image Processing and Vision - March 2019
13
Digitizing: Sampling and quantization

3/28/2019 EME408 Image Processing and Vision - March 2019


14
Quantization levels
Analog: 0 < 𝑓 𝑥, 𝑦 < ∞
Digital: Finite storage space per
data point

Quantization: Round each value to


its nearest level, If 𝐿 levels and 𝑛
storage bits, 𝐿 = 2𝑛

3/28/2019 EME408 Image Processing and Vision - March 2019


15
Spatial and intensity resolution
Spatial resolution:
line pairs per unit distance, or dots (pixels) per unit distance, dots per inch
(dpi)

Intensity resolution:
smallest discernible change in intensity level

3/28/2019 EME408 Image Processing and Vision - March 2019


16
Digitizing an image: Sampling
The scene is,
 projected on a 2D plane,
 sampled on a regular grid
 each sample is quantized
(rounded to the nearest
integer)

3/28/2019 EME408 Image Processing and Vision - March 2019


17
Effect of Sampling

1 pixel

3/28/2019 EME408 Image Processing and Vision - March 2019


18
Effect of different sampling levels

3/28/2019 EME408 Image Processing and Vision - March 2019


19
Image sampling and quantization

Image sub sampling: Remove every other


row and column to create ½ size image

3/28/2019 EME408 Image Processing and Vision - March 2019


20
Effect of quantization level
Analog: 0 < 𝑓 𝑥, 𝑦 < ∞
Digital: Finite storage
space per data point

Quantization: Round
each value to its nearest
level, If 𝐿 levels and 𝑛
storage bits, 𝐿 = 2𝑛

3/28/2019 EME408 Image Processing and Vision - March 2019


21
Image size
Storage space:

Spatial resolution =NXM


Quantization (bit depth) = m bits per pixel
Required bits, b
𝒃 = 𝑵𝑿𝑴𝑿𝒎

3/28/2019 EME408 Image Processing and Vision - March 2019


22
Image types

3/28/2019 EME408 Image Processing and Vision - March 2019


23
Colour images
Grey-scale image: one value per position 𝑓(𝑥, 𝑦) = 𝑖
RGB colour image: one vector per position 𝑓(𝑥, 𝑦) = [𝑅 𝐺 𝐵]𝑇

3/28/2019 EME408 Image Processing and Vision - March 2019


24
Colour spectrum and colour images
RGB colour space: Red, Green and Blue are the three additive primary colours.
Used in image capture and digital display

3/28/2019 EME408 Image Processing and Vision - March 2019


25
RGB components of a colour image

3/28/2019 EME408 Image Processing and Vision - March 2019


26
Negative image and colour complements

Colour equivalent of an
image negative

3/28/2019 EME408 Image Processing and Vision - March 2019


27
Image histograms
Colour or intensity distribution of an image

3/28/2019 EME408 Image Processing and Vision - March 2019


28
RGB Colour histograms

3/28/2019 EME408 Image Processing and Vision - March 2019


29
Exercises
 Read a truecolour RGB image and convert the image to grayscale. Read and display RGB
colour components as grayscale images

 Read a grayscale image and convert to a binary image by selecting a suitable threshold.

 Spatial quantization (sub-sample) an image

 Complement a grayscale and truecolour image, display as a montage or a combined


image

3/28/2019 EME408 Image Processing and Vision - March 2019


30
Next Week
Intensity transformations and Spatial filtering
 Relationships Between Pixels: Neighbours, Adjacency, connectivity

 Mathematical Tools Used in Digital Image Processing

 Intensity Transformation Functions

 Histogram Processing

 Fundamentals of Spatial Filtering, Smoothing/Sharpening spatial filters

Recommended reading: Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, 4th Ed –
Chapter 2: Digital Image Fundamentals
Chapter 3: Intensity Transformations and Spatial Filtering
3/28/2019 EME408 Image Processing and Vision - March 2019
31

You might also like