0% found this document useful (0 votes)
12 views21 pages

02 Chapter 1 CV Introduction Digital Image Fundamentals

This document is a lecture outline on Computer Vision and Image Processing, covering fundamental concepts such as digital images, the human visual system, image representation, and types of image graphics. It discusses the technical aspects of image formation, color representation, and the differences between raster and vector graphics. The document also touches on image acquisition processes and the human ability to perceive light intensity levels.

Uploaded by

xuancuong268
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)
12 views21 pages

02 Chapter 1 CV Introduction Digital Image Fundamentals

This document is a lecture outline on Computer Vision and Image Processing, covering fundamental concepts such as digital images, the human visual system, image representation, and types of image graphics. It discusses the technical aspects of image formation, color representation, and the differences between raster and vector graphics. The document also touches on image acquisition processes and the human ability to perceive light intensity levels.

Uploaded by

xuancuong268
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

Contents

(COMPUTER VISION)
Introduction to

Computer Vision and Image Processing, [email protected]. 2024


This lecture will cover:
Chapter 1:
Computer vision  What is an image?

Digital Image Fundamentals  The human visual system

ThS: TRẦN VĂN HÙNG  Light and the electromagnetic spectrum


Email: [email protected]
 Image representation
E-Learning: Trần Văn Hùng
ocw.fet.iuh.edu.vn  Image sensing and acquisition
Company
LOGO  Sampling, quantisation and resolution

What is an image? Digital images

 Rectangular grid of pixels- 5x5 grid


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


 If we are using 1 bit per cell, how many bits are needed to present the
picture?
 What is a pixel?
 Point/Cell in the image that contains color data
 Each pixel is made up of bits
 Resolution: Details contained in an image
 Defined by the number of pixels
5x5 grid

[0,0] [0,1] [0,2] [0,3] [0,4]

[1,0] [1,1] [1,2] [1,3] [1,4]

[2,0] [2,1] [2,2] [2,3] [2,4]


George Seurat: Sunday afternoon on the island
[3,0] [3,1] [3,2] [3,3] [3,4]
of La Grande Jatte (1884-1886)
[4,0] [4,1] [4,2] [4,3] [4,4]
Representing Color Representing Color

Computer graphics/Images: RGB


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Red Green Blue
R: 0 to 255, G: 0 to 255, B: 0 to 255

Red Green Blue Color


• 255 • 255 • 255 • White
• 255 • 255 •0 • Yellow

Binary Images Bit Color Depth

• Remember, everything on a computer is stored as 0s and


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


1s.
• Thus, we must interpret these numbers as different forms
of data.
• One bit (binary digit) can be either a 0 or a 1. 1 bit 2 bits 4 bits 8 bits 24 bits
– Therefore, it can only represent two possibilities: hot or cold,
black or white, on or off, etc…
1= ON 0 =OFF
24 bit True Color can
000000110011100111001100001
100111010000111000111000110 00 01 10 11 represent more than 16.7
001111000011100011110000111 Different shades of gray million unique colors. More
000110111001110011011000101
001100010101000110001010111 colors than the human eye
011101000110100101010100001 can distinguish!
110000101010100000000001110

1 bit per pixel


Raster vs Vector Graphics Raster vs Vector Graphics

 Raster graphics: made up of pixels  Raster graphics - Image formats:


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


 Resolution dependent  BMP
 Cannot be scaled without losing quality  GIF
 Can represent photo realistic elements better
than vector graphics  JPEG
 PNG
 Vector graphics: geometric primitives,  Vector graphics - Image formats:
composed of paths  Flash
 Mathematical equations
 Scalable vector graphics (SVG)
 Resolution independent
 Can be scaled to any size without losing
 CDR (corelDraw)
quality  AI (Adobe Illustrator)
 Best for cartoon-like images
 3D modeling

Raster Graphics Vector Graphics

 BMP (bitmaps)  SVG (Scalable Vector Graphics)


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


 Simple structure
 Pixel color values left to right, top to bottom  Text based scripts
 Can be compressed using run-length encoding <rect class="redbox" x="10" y="0"
 GIF (graphics interchange format) width="460" height="50"/>
 8-bit palette (any 256 colors)
 Small size
 Simple images: line art, shapes, logos
 Lossless compression: covering areas with single color
 JPEG (joint photographic experts group)
 Is a compression method stored in JFIF (JPEG file interchange format)
 Lossy compression: Averages color hues over short distances  Text compression
• Taking advantage of limitations of our visual system, discarding  Compression ratio can be as small as 0.2
invisible information
 Great for web-based imaging
 Compression ratio is usually 0.1
 Structure: sequence of segments. Marker followed by a definition of the
marker
Human Visual System Visual Perception: Human Eye

The best vision model we have!


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Digital image = a multidimensional
array of numbers (such as intensity image)
or vectors (such as color image)
• Knowledge of how images form in the eye
can help us with processing digital images

• We will take just a whirlwind tour of the


human visual system Each component in the image 10 10 16 28
 9 656 70 56  43
called pixel associates with the 26 3756
 32 99 54 7096  67 78
pixel value (a single number in the   67
15  256013 902296
  21  54 47  42 
case of intensity images or a vector 32  158587 853943  92
54  65 65 39 
in the case of color images). 32 65 87 99

Visual Perception: Human Eye Visual Perception: Human Eye

1. The lens contains 60-70% water, 6% of fat.


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


2. The iris diaphragm controls amount of light that enters the
eye.
3. Light receptors in the retina
• About 6-7 millions cones for bright light vision called
photopic
- Density of cones is about 150,000 elements/mm2.
- Cones involve in color vision.
- Cones are concentrated in fovea about 1.5x1.5 mm2.
• About 75-150 millions rods for dim light vision called
scotopic
- Rods are sensitive to low level of light and are not
(Picture from Microsoft Encarta 2000)
involved color vision.
4. Blind spot is the region of emergence of the optic nerve
from the eye.
Blind-Spot Experiment Blind-Spot Experiment

Draw an image similar to that below on a piece


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


of paper (the dot and cross are about 6 inches
apart)

Close your right eye and focus on the cross with


your left eye
Hold the image about 20 inches away from your
face and move it slowly towards you
The dot should disappear!

Image Formation In The Eye Optical Illusions

Muscles within the eye can be used to change the shape


Computer Vision and Image Processing, [email protected]. 2024

of the lens allowing us focus on objects that are near or far Computer Vision and Image Processing, [email protected]. 2024

away
An image is focused onto the retina causing rods and
cones to become excited which ultimately send signals to
the brain
Optical Illusions Optical Illusions

Stare at the
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


cross in the
middle of the
image and think
circles

Visible Spectrum Image Sensors


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Single sensor

Line sensor

Array sensor

The electromagnetic spectrum. The visible spectrum is shown zoomed


to facilitate explanation but note that the visible spectrum is a rather
narrow portion of the EM spectrum
Image Sensors : Single Sensor Image Sensors : Line Sensor
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Combining a single sensor with motion to generate a 2-D image.
Fingerprint sweep sensor
Computerized Axial Tomography

Fundamentals of Digital Images Conventional Coordinate for Image


Representation
x
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Origin

y
Image “After snow storm” f(x,y)
 An image: a multidimensional function of spatial coordinates.
 Spatial coordinate: (x,y) for 2D case such as photograph,
(x,y,z) for 3D case such as CT scan images
(x,y,t) for movies
 The function f may represent intensity (for monochrome images)
or color (for color images) or other associated values.
Digital Image Types : Intensity Image Digital Image Types : RGB Image

Intensity image or monochrome Color image or RGB image:


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


image each pixel contains a vector
each pixel corresponds to light representing red, green and
intensity normally represented in blue components.
gray scale (gray level).

Gray scale values


10 10 16 28
RGB components
 9 6 26 37 10 10 16 28
   9 656 70 56  43
15 25 13 22  32 99
26 3756
  54 7096  67 78
32 15 87 39 15  256013 902296
  67
  21  54 47  42 
32 15 87 39
  85 85 43  92
54  65 65 39 
32 65 87 99

Image Types : Binary Image Image Types : Index Image

Binary image or black and white image Index image


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Each pixel contains one bit : Each pixel contains index number
1 represent white pointing to a color in a color table
0 represents black Color Table

Index Red Green Blue


component component component
No.
1 0.1 0.5 0.3
2 1.0 0.0 0.0
1 4 9
6 4 7  3 0.0 1.0 0.0
Binary data   4 0.5 0.5 0.5
0 0 0 0 6 5 2
0 5 0.2 0.8 0.9
0 0 0
  Index value
1 1 1 1 … … … …
 
1 1 1 1
Digital Image Acquisition Process Generating a Digital Image

Computer Vision and Image Processing, [email protected]. 2024


Computer Vision and Image Processing, [email protected]. 2024

Brightness Adaptation & Brightness Adaptation &


Discrimination Discrimination

 The human visual system can perceive Weber ratio


Computer Vision and Image Processing, [email protected]. 2024

approximately 1010 different light intensity Computer Vision and Image Processing, [email protected]. 2024

levels.
 However, at any one time we can only
discriminate between a much smaller
number – brightness adaptation.
 Similarly, the perceived intensity of a
region is related to the light intensities of
the regions surrounding it.
Brightness Adaptation of Human Eye : Mach Band Effect
Mach Band Effect
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Intensities of surrounding
points effect perceived
brightness at each point.

In this image, edges between


bars appear brighter on the
right side and darker on the
Intensity

left side.

Position

Mach Band Effect Brightness Adaptation of Human Eye :


Simultaneous Contrast
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024

A
B
Intensity

Position

In area A, brightness perceived is darker while in area B is Simultaneous contrast. All small squares have exactly the
brighter. This phenomenon is called Mach Band Effect. same intensity but they appear progressively darker as
background becomes lighter.
Simultaneous Contrast Brightness Adaptation &
Discrimination
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Examples of simultaneous contrast. All the inner squares
have the same intensity, but they appear progressively
darker as the background becomes lighter.
An example of Mach bands

Brightness Adaptation & Light And The Electromagnetic


Discrimination Spectrum

Light is just a particular part of the


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024 electromagnetic spectrum that can be sensed by
the human eye
The electromagnetic spectrum is split up
according to the wavelengths of different forms of
energy
Sampling, Quantisation And
Reflected Light
Resolution
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


The colours that we perceive are determined by the In the following slides we will consider what is
nature of the light reflected from an object involved in capturing a digital image of a real-world

For example, if white scene

light is shone onto a  Image sensing and representation


green object most
 Sampling and quantisation
wavelengths are Colours
Absorbed

absorbed, while green  Resolution


light is reflected from
the object

Image Representation Colour images

Before we discuss image acquisition recall that a


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


digital image is composed of M rows and N columns
of pixels each storing a
col

value Pixel values are most


often grey levels in the
range 0-255(black-white)

We will see later on


that images can easily
f (row, col)
be represented as matrices row
Colour images Image Acquisition

Images are typically generated by illuminating a

Computer Vision and Image Processing, [email protected]. 2024


scene and absorbing the energy reflected by the
objects in that scene
– Typical notions of
illumination and
scene can be way
off:
• X-rays of a skeleton
• Ultrasound of an
unborn baby
• Electro-microscopic
images of molecules

Image Sensing Image Sensing

• Incoming energy lands on a sensor material


Computer Vision and Image Processing, [email protected]. 2024

responsive to that type of energy and this Computer Vision and Image Processing, [email protected]. 2024

generates a voltage
• Collections of sensors are arranged to capture
images

Imaging Sensor Using Sensor Strips and Rings

Line of Image Sensors Array of Image Sensors


Image Sampling And Quantisation Image Sampling And Quantisation

• A digital sensor can only measure a limited number


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


of samples at a discrete set of energy levels

• Quantisation is the process of converting a


continuous analogue signal into a digital
representation of this signal

Image Sampling And Quantisation Image Sampling And Quantisation

Remember that a digital image is always only an


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024 approximation of a real world scene
Computer Vision and Image Processing, [email protected]. 2024 Computer Vision and Image Processing, [email protected]. 2024

Image Representation
Image Representation

Computer Vision and Image Processing, [email protected]. 2024 Computer Vision and Image Processing, [email protected]. 2024
Image Representation
Image Representation
Spatial Resolution Spatial Resolution (cont…)

The spatial resolution of an image is determined by


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


how sampling was carried out
Spatial resolution simply refers to the smallest
discernable detail in an image
 Vision specialists will
often talk about pixel
size
 Graphic designers will
talk about dots per
inch (DPI)

Spatial Resolution (cont…) Spatial Resolution (cont…)

1024 * 1024 512 * 512 256 * 256


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024

128 * 128 64 * 64 32 * 32
Intensity Level Resolution Intensity Level Resolution (cont…)

256 grey levels (8 bits per pixel) 128 grey levels (7 bpp) 64 grey levels (6 bpp) 32 grey levels (5 bpp)
Intensity level resolution refers to the number of
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


intensity levels used to represent the image
 The more intensity levels used, the finer the level of
detail discernable in an image
 Intensity level resolution is usually given in terms of
the number of bits used to store each intensity level
Number of Intensity
Number of Bits Examples
Levels
1 2 0, 1
2 4 00, 01, 10, 11
4 16 0000, 0101, 1111
8 256 00110011, 01010101
16 65,536 1010101010101010

16 grey levels (4 bpp) 8 grey levels (3 bpp) 4 grey levels (2 bpp) 2 grey levels (1 bpp)

Saturation & Noise Resolution: How Much Is Enough?

The big question with resolution is always how


Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


much is enough?

 This all depends on what is in the image and


what you would like to do with it

 Key questions include


• Does the image look aesthetically pleasing?

• Can you see what you need to see within the


image?
Computer Vision and Image Processing, [email protected]. 2024 Computer Vision and Image Processing, [email protected]. 2024

plate
The picture on the right is fine for counting the
number of cars, but not for reading the number

Intensity Level Resolution


Resolution: How Much Is Enough?

Computer Vision and Image Processing, [email protected]. 2024 Computer Vision and Image Processing, [email protected]. 2024
Low Detail
Medium Detail
High Detail

Intensity Level Resolution


Intensity Level Resolution
Intensity Level Resolution Intensity Level Resolution

 Isopreference curves.
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


 Represent the dependence between
intensity and spatial resolutions.
 Points lying on a curve represent
images of “equal” quality as
described by observers.
 They become more vertical as the
degree of detail increases (a lot of
detail need less intensity levels),
e.g. in the Crowd image, for a given
value of N, k is almost constant.

How to choose the spatial resolution How to choose the spatial resolution:
Nyquist Rate
Spatial resolution = Sampling locations

Original image
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


Original image

Sampled image

1mm
2mm
Sampled image

No detail is lost!
Minimum Nyquist Rate:
Spatial resolution
Period Spatial resolution must be less or equal
(sampling rate)
half of the minimum period of the image
= Sampling locations or sampling frequency must be greater
or Equal twice of the maximum
Under sampling, we lost some image details!
frequency.
Aliased Frequency Effect of Spatial Resolution

x1 (t )  sin(2t ), f 1
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024


1 x2(t)  sin(12t), f 6
0.5

-0.5

-1
0 0.5 1 1.5 2 256x256 pixels 128x128 pixels
Sampling rate:
1
5 samples/sec

0.5

-0.5

-1
0 0.5 1 1.5 2

Two different frequencies but the same results ! 64x64 pixels 32x32 pixels

Effect of Spatial Resolution Moire Pattern Effect : Special Case of


Sampling
Computer Vision and Image Processing, [email protected]. 2024

Computer Vision and Image Processing, [email protected]. 2024

A 1024x1024, 8-bit image subsample down to size 32x32


Moire patterns occur when frequencies of two
pixels. The number of allowable gray levels was kept at 256.
superimposed periodic patterns are close to each other.
[email protected]

Company
LOGO

You might also like