CS9261 – Lecturer series 1 Image Fundamentals Prepared by Mohanalin
CS9261 – Lecturer series 1
Image Fundamentals
Prepared by Mohanalin
For FX
Fundamentals
These slides show
Importance of images
Image acquisition systemsBasic concepts of digital images Evolution of image processing
Overview of Image processing
Picture of earth’s moon taken by space probe in 1964. Picture made with a television camera (vidicon), transmitted to the earth by analog modulation, and digitized on the ground.
Images….What are they? Why it is important?
Medical Images
Satellite Images
Radar Image
Ancient times: Documentation and manual drawing
Photography: Documentation eg. Astronomy, particle physics
Imagine counting the stars manually
Imagine counting the hydrogen particles in a gas chamber
Then came the PCs which revolutionized the field
So how do images form?
Evolution of Images
Fundamentals Let’s look at eye
Fundamentals
We are mostly interested in the retina:
• consists of cones and rods• Cones• color receptors• About 7 million, primarily in the retina’s
central portion • for image details
• Rods• Sensitive to illumination, not involved in
color vision• About 130 million, all over the retina• General, overall view
Fundamentals
Distribution of cones and rods:
Fundamentals
The human eye is sensible to electromagnetic waves in the ‘visible spectrum’ :
Fundamentals
The human eye is sensible to electromagnetic waves in the ‘visible
spectrum’ , which is around a wavelength of
0.000001 m = 0.001 mm
Fundamentals
The human eye
• Is able to perceive electromagnetic waves in a certain spectrum
• Is able to distinguish between wavelengths in this spectrum (colors)
• Has a higher density of receptors in the center
• Maps our 3D reality to a 2 dimensional image !
Fundamentals
…or more precise:
maps our continous (?) reality to a (spatially) DISCRETE 2D image
Fundamentals
Some topics we have to deal with:
• Sharpness• Brightness
• Processing of perceived visual information
Fundamentals
Sharpness
The eye is able to deal with sharpness in different distances
Fundamentals
Brightness
The eye is able to adapt to different ranges of brightness
Fundamentals
Processing of perceived information: optical illusions
Fundamentals
optical illusions:
Digital Image Processing does NOT (primarily) deal with cognitive
aspects of the perceived image !
Image Acquisition
There are two parts to the image formation process:
The geometry of image formation, which determines where in the image plane the projection of a point in the scene will be located.
The physics of light, which determines the brightness of a point in the image plane as a function of illumination and surface properties.
General purpose Image acquisition and processing system consists of 4 essential components:
An image acquisition system…e.g ccd camera, video recorder etc…
A frame grabber – to convert the electrical signal to digital Image
A PC to store
IP s/w to process
Fundamentals
Acquisition
Fundamentals
Acquisition
A Simple model of image formation
The scene is illuminated by a single source. The scene reflects radiation towards the camera. The camera senses it via chemicals on film.
Pinhole camera
This is the simplest device to form an image of a 3D scene on a 2D surface.
Straight rays of light pass through a “pinhole” and form an inverted image of the object on the image plane.
Camera optics
In practice, the aperture must be larger to admit more light.
Lenses are placed to in the aperture to focus the bundle of rays from each scene point onto the corresponding point in the image plane
Fundamentals
Typical sensor for images:
CCD (Charge Couple Devices) CMOS (complement metal oxide semiconductor)
• Use in digital cameras• Typical resolution 1024 x 768
(webcam)
Fundamentals
CCD
Fundamentals
CCD
Fundamentals
CCD: 3.2 million pixels !
CCD (Charged-Coupled Device) cameras
Tiny solid state cells convert light energy into electrical charge.
The image plane acts as a digital memory that can be read row by row by a computer.
Frame grabber
Usually, a CCD camera plugs into a computer board (frame grabber).
The frame grabber digitizes the signal and stores it in its memory (frame buffer).
Image digitization
• Sampling means measuring the value of an image at a finite number of points.
• Quantization is the representation of the measured value at the sampled point by an integer.
Image digitization (cont’d)
Image quantization(example)
• 256 gray levels (8bits/pixel) 32 gray levels (5 bits/pixel) 16 gray levels (4 bits/pixel)
• 8 gray levels (3 bits/pixel) 4 gray levels (2 bits/pixel) 2 gray levels (1 bit/pixel)
Image sampling (example)
original image sampled by a factor of 2
sampled by a factor of 4 sampled by a factor of 8
Digital image
• An image is represented by a rectangular array of integers.
• An integer represents the brightness or darkness of the image at that point.
• N: # of rows, M: # of columns, Q: # of gray levels– N = , M = , Q = (q is the # of bits/pixel)– Storage requirements: NxMxQ (e.g., N=M=1024, q=8, 1MB)
(0,0) (0,1) ... (0, 1)
(1,0) (1,1) ... (1, 1)
... ... ... ...
( 1,0) ( 1,1) ... ( 1, 1)
f f f M
f f f M
f N f N f N M
2 n 2m 2 q
Image file formats
• Many image formats adhere to the simple model shown below (line by line, no breaks between lines).
• The header contains at least the width and height of the image.
• Most headers begin with a signature or “magic number” - a short sequence of bytes for identifying the file format.
Common image file formats
• GIF (Graphic Interchange Format) -
• PNG (Portable Network Graphics)
• JPEG (Joint Photographic Experts Group)
• TIFF (Tagged Image File Format)
• PGM (Portable Gray Map)
• FITS (Flexible Image Transport System)
Comparison of image formats
PGM format
• A popular format for grayscale images (8 bits/pixel)
• Closely-related formats are:
– PBM (Portable Bitmap), for binary images (1 bit/pixel)
– PPM (Portable Pixelmap), for color images (24 bits/pixel)
» ASCII or binary (raw) storage
ASCII vs Raw format
• ASCII format has the following advantages:– Pixel values can be examined or modified very easily using a standard text editor.– Files in raw format cannot be modified in this way since they contain many unprintable
characters.
• Raw format has the following advantages:– It is much more compact compared to the ASCII format.– Pixel values are coded using only a single character !
Fundamentals
What is an image ?
Fundamentals
A 2D grayvalue - image is a 2D -> 1D function,
v = f(x,y)
Fundamentals
As we have a function, we can apply operators to this function, e.g.
H(f(x,y)) = f(x,y) / 2
Operator Image (= function !)
Fundamentals
H(f(x,y)) = f(x,y) / 2
6 8 2 0
12 200 20 10
3 4 1 0
6 100 10 5
Fundamentals
Remember: the value of the cells is the illumination (or brightness)
6 8 2 0
12 200 20 10
3 4 1 0
6 100 10 5
Fundamentals
As we have a function, we can apply operators to this function…
…but why should we ?
some motivation for (digital) image processing
Over view of IP
Finding Depth in images Classification of objects Motion estimation Extraction of features Restoration Exploring dynamic process Finding shapes Visual Inspection and so onnnnnnnn
Fundamentals
• Image Enhancement
Fundamentals
• Image Analysis / Recognition
Fundamentals
Digital vs. Analogue Images
Analogue:Function v = f(x,y): v,x,y are REAL
Digital:Function v = f(x,y): v,x,y are INTEGER