ch2

47
Chapter 2 Image Acquisition

Upload: teba

Post on 13-Jan-2015

365 views

Category:

Technology


0 download

DESCRIPTION

Computer Vision 2

TRANSCRIPT

Page 1: Ch2

Chapter 2

Image Acquisition

Page 2: Ch2

This chapter includes:• Introduction

• Image Sensors

• Representation of the Image Data

• Types of digital images

Page 3: Ch2

• The aim of image acquisition sub-system is:

• to transform optical image data into an array of numerical data.

Introduction

Page 4: Ch2

• Three major issues for image acquisition:

1. sensing,

2. representation,

3. digitization.

Introduction

Page 5: Ch2

• Image sensing is carried out by different techniques.

• The most commonly used devices are:1. Vidicon cameras,2. solid-state arrays,3. laser scanners.

Image Sensors

Page 6: Ch2

• The Vidicon is a device used to transform optical images into electrical signals.

• An electron beam in the tube is deflected to scan the image.

• The net current through the photo conductive surface varies according to the scanned image position.

The Vidicon

Page 7: Ch2

• The Vidicon , while relatively inexpensive, has some disadvantages.

• The signal contains a large component of

high-frequency noise;

• fragile and easily broken by vibration or shock.

.

The Vidicon

Page 8: Ch2

.

Solid-State Image Devices

•These elements are highly durable, compact, and attaining higher resolution.

•The two main kinds of sensors used in digital cameras are:

• CCD (charge coupled device) • CMOS (complementary metal oxide on

silicon)

Page 9: Ch2

.

.

Solid-State Image Devices

Page 10: Ch2

• In a CCD, photons are accumulated in each active well during the exposure time.

• The charges are transferred from well to well and convert it to voltage at output node.

.

Solid-State Image Devices (CCD)

Page 11: Ch2

• In CMOS, the photos hitting the sensor directly affect the conductivity (or gain) of a photosensitive transistor.

• The resulting voltage is then amplified and sampled .

.

Solid-State Image Devices (CMOS)

Page 12: Ch2

• Particularly important in industrial applications.

• devices that obtain a “ depth map “.

• The laser light is transmitted and then measuring the phase of the arriving reflected light.

.

Laser Scanner

Page 13: Ch2

Representation should fulfill two requirements:

1. Facilitate processing by means of a computer.

2. Contain all the information that defines characteristics of the image.

.

Representation of the Image Data

Page 14: Ch2

.

Representation of the Image Data

• The optical sub-system will deliver a continuous two-dimensional function f(x,y).

• f(x, y) represents the intensity of light at each point.

• f(x, y) is quantized so that it can be represented as an array of numbers.

Page 15: Ch2

.

Representation of the Image Data

Two forms of quantization:• Spatial Quantization• Amplitude ( intensity ) Quantization

Page 16: Ch2

.

Spatial Quantization

• The image is sampled at (m x n) discrete points.

• Each sample is called a picture cell ( “pixel”).

Page 17: Ch2

Pixels

Pixels is the smallest addressable area of a display.

The word pixel comes from “picture element”.

Page 18: Ch2

PixelsThe resolution of an image is described as the number of pixels horizontally times the number of pixels vertically.

A 10x7 image

Page 19: Ch2

Pixels

We will refer to a pixel by the number of its row and the number of its column.

1 2 3 4 5 6 7 8 9 10

2

1

3

4

5

6

7

This is the (3,7) pixel

Page 20: Ch2

PixelsBy this convention, the x-axis is vertical and the y-axis is horizontal.

This is consistent with the way we refer to the elements of a matrix.

This is the (3,7) pixel

y

x

Page 21: Ch2

.

Amplitude Quantization

• Each pixel assigned a numerical code.• The code represents the intensity of the

image function at that point.• The resolution of the code is determined by

the number of quantization levels ( gray levels ).

Page 22: Ch2

.

Amplitude Quantization

• The set of the gray levels ranging from black to white is called the gray scale of the system.

• The number of gray levels is usually an integral power of 2, such that:

• black = 0 - white =2L – 1

• where L is an integer and there are 2L gray levels in the gray scale.

Page 23: Ch2

Digital images• We consider the image as being a two dimensional

function, • The function values give the brightness of the

image at any given point

Page 24: Ch2

• A digital image is obtained by quantizing the output signals obtained from image acquisition devices.

• We consider a digital image as a matrix.• Its rows and columns indices identify a point

in the image.• The matrix element value indicates the gray

level at that point.

Digital images

Page 25: Ch2

Digital images

• A digital image differs from a photo in that the x, y and f(x, y) values are all discrete. Usually they take on only integer values,

Page 26: Ch2

Color Digital images

• An image is broken into thousands of pixels.• An image stored in this way is called a bitmap.• Pixels are represented by three numbers.

• Red 0-255• Blue 0-255• Green 0-255

Page 27: Ch2

Types of Digital Images

• Black&white images–Binary images (1-bit images)–Grayscale images (8-bit gray-level

images)

• Color images– 24-bit color images– 8-bit color images

Page 28: Ch2

Binary Images

• Each pixel is stored as a single bit (0 or 1),• The intensities of the pixels are either 0 or 1. • Such images are called binary and use only one bit per

pixel. • Such an image is also called a 1-bit monochrome

image since it contains no color.

Page 29: Ch2

Binary Images• An example was the image shown

• we have only the two colors: white for the edges, and black for the background.

Page 30: Ch2

Monochrome 1-bit Lena image.

Another example

Page 31: Ch2

Binary Images

• To generate Binary image from grey scale image.• A Threshold value, T, is used to partition the

image into pixels with just two values, such that :• IF f (x,y) >= T THEN g (x,y) = 1• IF f (x,y) < T THEN g (x,y) = 0• where g (x,y) denotes the binary version of f (x,y).

Page 32: Ch2

Image Data Structures

• Pixels -- picture elements in digital images

• Image Resolution -- number of pixels in a digital image :• Resolution = width x height • higher resolution always yields better quality.

• File size = width x height x #ofBytesPerPixel

Page 33: Ch2

Binary ImagesFile size calculation:

Resolution: 640 x 480

File size = 640 x 480 x 1/8 = 38.4 kB

Page 34: Ch2

Grayscale images

• Each pixel has a gray-value between 0 and 255. • The high values correspond to bright pixels and the

low values correspond to dark pixels.• A dark pixel might have a value of 10, and a bright

one might be 230.

Page 35: Ch2

Grayscale images

• The intensities of the pixels are integers in the interval [0,255].

• We use one byte of memory for each pixel.

Page 36: Ch2

Grayscale images

The whole image is described by an array of numbers called matrix.

54.034.034.035.0

23.089.039.00

25.032.0098.0

43.012.076.009.0

Page 37: Ch2

Grayscale image of Lena.

Page 38: Ch2

Grayscale image of Lena.Monochrome 1-bit Lena image.

307 200 Bytes38 400 Bytes

Page 39: Ch2

8-bit Gray-level Images

File size calculation:

Resolution: 640 x 480

File size = 640 x 480 x 1 = 307 200 = 300 kB

Page 40: Ch2

Colour images• Colour image are usually described in the RGB

colour space. • The primary colours red, green and blue are

combined to reproduce other colours.

Page 41: Ch2

Colour images

A colour image is described by three matrices.

31.087.065.0

75.082.056.0

02.038.048.0

73.093.037.071.084.019.0

92.056.016.0

Page 42: Ch2

Colour images

• In the RGB colour space, a colour is represented by a triplet (r,g,b)

• r gives the intensity of the red component • g gives the intensity of the green component • b gives the intensity of the blue component

• You will often see the values of r,g,b as integers in the interval [0,255].

Page 43: Ch2

Colour images

• Each pixel is represented by three bytes (e.g., RGB)- 24-bit Color Images

• Supports 256 x 256 x 256 possible combined colors (16,777,216)

• A 640 x 480 24-bit color image would require 921.6 KB of storage

Page 44: Ch2

Indexed images

• 8-bit Color Images• One byte for each pixel • Requires Color Look-Up Tables (LUTs) • A 640 x 480 8-bit color image

requires 307.2 KB of storage (the same as 8-bit grayscale)

Page 45: Ch2

Indexed images• The image has an associated color map which is simply a

list of all the colors used in that image. • Each pixel has a value which does not give its color (as for

an RGB image), but an index to the color in the map.

Page 46: Ch2

8-bit Color Images

• Such image files use the concept of a lookup table to store color information.

• Basically, the image stores not color, but instead a code value, for each pixel.

• Each code is actually an index into a table with 3-byte values that specify the color for a pixel with that lookup table index.

Page 47: Ch2

Color Look-up Tables (LUTs)

• The idea used in 8-bit color images is to store only the index, or code value, for each pixel.

• Then, if a pixel stores the value 25, the meaning is

to go to row 25 in a color look-up table (LUT).