Vous êtes sur la page 1sur 42

Image Acquisition Pattern Recognition

Kardi Teknomo, PhD

Kardi Teknomo, PhD

Overview
Image & digital image Image parameters (resolution accuracy) (resolution, Color, gray and binary image Image quality and storage size q alit sto age si e Color model Video Vid

Kardi Teknomo, PhD

Digital Acquisition
Digital acquisition is the process of converting the physical phenomenon (sound, image) into a form suitable for digital processing

Kardi Teknomo, PhD

Image
An image is an electromagnetic radiation that enters the human visual system through eyes and is incident y g y upon the cells of the retina. Wavelength is between 4 000 and 7,700 A W l hi b 4,000 d 7 700 Angstrom (violet and red), i.e. between 4 10^(7) and 7.7 10^(7) m. ( ) Light enters through pupil, the circular opening in the center of iris, passes through the crystalline lens, and vitreous humor to be converged to a nodal point and is focused on the retina

Kardi Teknomo, PhD

Human Eyes

Picture source: Human Body, Britannica Illustrated Science Library

Kardi Teknomo, PhD

Eye is equivalent to a camera


Retina = film Lense to adjust focus Aperture controls the amount of light that reaches the camera sensor= pupil

Kardi Teknomo, PhD

Digital Camera
Two types of sensor:
Charge Coupled Devices (CCD) g p ( ) Complementary Metal Oxide Semiconductor (CMOS)

Both are N by M rectangular grid photosensor (sensitive to light intensity)

Picture source: Technology, Britannica Illustrated Science Library

Kardi Teknomo, PhD

CCD/CMOS

In CMOS, diodes are replaced with CMOS sensor (noisier but cheaper)
Picture source: Technology, Britannica Illustrated Science Library

Kardi Teknomo, PhD

Digital image
Digital image is a finite collection of discrete samples (pixels) of any observable object j

Kardi Teknomo, PhD

Pixels
The elementary unit of the digital image is the pixel, which is an abbreviation of picture element p 1 pixel = 1 cell in the matrix = 1 dot in printer or screen monitor A pixel is also the smallest unit of resolution on the monitor or printer. Resolution depends on the device (DPI = dots per inch)

Kardi Teknomo, PhD

Resolution
Resolution = number of pixels per inch A digital camera can capture images at different resolutions, i.e. using a different amount of pixels.
Low resolution: 320 240 (or 352 288) pixels/image Medium resolution: 640 480 pixels/image. High resolution: 1216 912 (or 1600 1200) pixels/image

Spatial resolution of an image is the image size in pixels, which corresponds to the size of the CCD (or CMOS) grid Matrix size

Kardi Teknomo, PhD

Effect of resolution
The same picture, different resolution
a. b. c. c d.

256 x 256 128 x 128 64 x 64 32 x 32

Kardi Teknomo, PhD

Bits
Digital image consists of N * M pixels, each represented by k bits. A pixel can thus have 2^k i l th h different values The pixel values are considered as integers varying from 0 (black pixel) to 2^(k-1) ( hit pixel). i l) t 1) (white i l)

Kardi Teknomo, PhD

Number of gray levels


The same image size 256 x 256 pixels, p different in number of gray levels:
a. a b. c. d.

32 16 8 4

(5 bits) (4 bits) (3 bits) (2 b ) ( bits)

Kardi Teknomo, PhD

Digitization Parameters
The main parameters of the digitization are:
Image resolution: the number of samples in the
grid.

Pixel accuracy: how many bits are used per sample.

These two parameters have a direct effect on p the image quality but also to the storage size of the image

Kardi Teknomo, PhD

Effect to Image Quality


Pixel accuracy

resolution

Kardi Teknomo, PhD

Effect to storage size

1 byte = 8 bits E.g: 32 x 32 at 1 bit per pixel = 1024 bits = 128 bytes

Kardi Teknomo, PhD

Practice-1 (5 minutes)
You found an image size 256 by 384 pixels. The file size is about 295 KB (294,947 to be (294 947 exact). What is most probable the pixel accuracy in bits p pixel? y per p

Kardi Teknomo, PhD

Color Image
Typical color acquisition in the digital cameras uses red, g green and blue (RGB) filters ( ) At each pixel location, each color component is represented by 8 bits (256 different values: 0-255) 24 bits per pixels Hence the overall amount of different colors that can be represented by each pixel are 256^3 =16,777,216 p y p , , colors. For icon, 8 bits per pixel (256 colors) , p p ( ) is usually enough

Kardi Teknomo, PhD

Gray Level Image


A grayscale image is only one colors are shades of gray. Component R G B R=G=B Simpler because only a single intensity value for each pixel 8-bit integer = 256 possible different shades of gray from black to white (0-255).

Kardi Teknomo, PhD

Binary Image
Each pixel contains 1 bit information Only 2 colors: black and white Simplest & fastest to process ImageJ: P ocess Binary ImageJ Process > Bina > Make bina binary

Kardi Teknomo, PhD

Practice-2 (5-10 minutes)


Take any color image from Google Image or use your own image Using ImageJ:
Check the resolution and pixel accuracy (Image > Show Info) Reduce pixel accuracy to 8 bits color image with number of colors = 128, 64 and 28 (Image > Type). Reduce pixel to 32 bits, 16 bits, 8 bits gray scale. . Change into 1 bit image. image

Kardi Teknomo, PhD

RGB Primary Colors


Standardization by the CIE (Commission Internationale de l'Eclairage - International Commission on g Illumination) in 1931 states the following specific wavelength values to the primary colors:
blue (B) = 435.8 nm 435 8 green (G)= 546.1 nm red (R) = 700.0 nm

Kardi Teknomo, PhD

Sensitivity of human eyes


The color sensors in the human eye, which are commonly identified as red, green , and blue red greenbluesensitive are actually cover a range of long, medium, and short wavelengths. , g

Kardi Teknomo, PhD

Mixing the colors of light


RGB Secondary colors:
Magenta (red + blue) M t ( d bl ) Cyan (green + blue) Yellow (red + green) Y ll ( d )

Mixed all colors: White (R+G+B)

Kardi Teknomo, PhD

RGB Color Model


RGB color model can be described as a triple (R, G, B) so that the value of R G B are B), R, G, normalized into range of [0,1].

r +g +b = 1

G R r= g= ( R + B + G) ( R + B + G)

B b= ( R + B + G)

Kardi Teknomo, PhD

RGB Color Space: Cube

Kardi Teknomo, PhD

Practice
Find the corresponding RGB values of the following RGB color model
(0.1432, 0.2864, 0.5705) Black (0, 0, 0) White (1, 1, 1) (1 1 Yellow (1, 1, 0) Magenta (1, 0, 1)

Find the RGB color model of the following RGB values


White (255, 255, 255) (255 255 (255, 128, 64)

Kardi Teknomo, PhD

CMY Color model


Used for offset printing CMY primary colors are C (cyan) M (magenta) (cyan), (magenta), and Y (yellow). The secondary colors of RGB are the primary colors of CMY, and vice versa. The RGB to CMY conversion can be performed by
C=1-R M=1-G Y=1-B

Kardi Teknomo, PhD

Mixing the color of ink


CMY Secondary colors:
Blue (M Bl (Magenta + Cyan) t C ) Red (Yellow + Magenta) Green (Y ll G (Yellow + Cyan) C )

Mixed all colors: Black (C+M+Y)

Kardi Teknomo, PhD

YUV Color model


The basic idea in the YUV color model is to separate the color information apart from the brightness p g information Components:
Y = 0.3 R + 0.6 G + 0.1 B U=BY V=RY

Component Y is called luminance (brightness), components U and V are called chrominance (color information) Application: The luminance component can be considered as a gray-scale version of the RGB i id d l i f th image

Kardi Teknomo, PhD

Advantages of YUV
The brightness information is separated from the color information The correlations between the color components are p p reduced each component can be compressed separately Most of the information is collected to the Y component, while the information content in the U and V is less the contrast of the Y component is much greater than that of the U and V components YUV color system is adopted in the JPEG image compression standard i t d d

Kardi Teknomo, PhD

Example of Color Separation

Kardi Teknomo, PhD

HSI color model


HSI model consists of hue (H), saturation (S), and intensity (I) ).
Intensity corresponds to the luminance (brightness) component (Y) of the YUV models. Hue is an attribute associated with the dominant wavelength in a mixture of light waves, i.e. the dominant color as perceived by an observer observer. Saturation refers to relative purity of the amount of white light mixed with hue

Kardi Teknomo, PhD

Advantages of HSI
The intensity is separated from the color information (the same as YUV models) The hue and saturation components are intimately related to the way in which human beings perceive color g p

Kardi Teknomo, PhD

HSI Color Space

Kardi Teknomo, PhD

Conversion Formula
Intensity Hue

1 I = ( R + G + B) 3

1 [( R G ) + ( R B ) ] 1 2 , if B G H= cos 1 360 ( R G ) 2 + ( R B )( G B ) 1 [( R G ) + ( R B ) ] 1 2 , otherwise H = 1 cos 1 360 ( R G ) 2 + ( R B )( G B )

Saturation

3 S=1 min ( R, G, B ) ( R + G + B)

Kardi Teknomo, PhD

Video
If a sequence of image is projected at more than 25 images per second, human eyes second cannot realize that they are looking at a sequence of discrete images. q g Video and movies use this principle to produce the sensation of moving images. Video = image sequence g q

Kardi Teknomo, PhD

Digital Video
Digital video is a sequence of frames, each of them is a digital image, whose basic element, as we have seen, is g g , , , the pixel In order to produce a uniform movement, digital video movement has to display at least 25 frames per second. In d digital video, the ratio between the horizontal and l d h b h h l d the vertical dimension is 4/3, whereas the digital screen usually has 640480 (or 800600) pixels. Highy ( )p g definition television usually has 1280720 pixels and the ratio between the horizontal and the vertical dimension is 16/9

Kardi Teknomo, PhD

Averaging Noisy Image


More frames = more information we can use Averaging noisy image of b f bone marrow:
a. b. c. d.

1 frame Average 4 frames g Average 16 frames Average 256 frames

Kardi Teknomo, PhD

Practice
How much memory is required to store the movie Titanic in its uncompressed version? Assume that the movie is color, A h h i i l has 30 frame/sec (each frame is 640480 pixels), its runtime is p ), 194 minutes. For sake of simplicity, do not consider the memory required to store the audio of the movie.

Kardi Teknomo, PhD

Assignment
Find the corresponding YUV and HSI values of the following RGB values
(255, 128, 64) (255, 255, 255) (64, 84, 146)

Vous aimerez peut-être aussi