Chapter 1
Chapter 1
Image fundamentals
○ Processing of image data for storage, transmission and representation for autonomous machine
perception
Key Stages in Digital Image Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Colour Image Image
Processing Compression
What is an image?
● We can think of an image as a function, f, from R2 to R:
○ f( x, y ) gives the intensity at position ( x, y )
● A color image is just three functions pasted together.
● We can write this as a “vector-valued” function:
What is a digital image??
● We usually operate on digital (discrete) images:
○ Sample the 2D space on a regular grid
○ Quantize each sample (round to nearest integer)
● If our samples are D apart, we can write this as:
○ f[i ,j] = Quantize{ f(i D, j D) }
● The image can now be represented as a matrix of integer
values
Image processing?
● An image processing operation typically defines a new image g in
terms of an existing image f.
● We can transform either the range of f.
●
● Or the domain of f:
●
● What kinds of operations can each perform?
Image Formation: Image Acquisition Process
• Image Formation
Image Acquisition Process: Digitization
• Sampling
• Quantization
Image Acquisition Process: Digitization
• Sampling and Quantization
Image Acquisition Process: Digitization
• Sampling and Quantization
To create a digital image, we need to convert the continuous sensed data into digital form.
This process includes 2 processes:
1. Sampling: Digitizing the co-ordinate value is called sampling.
2. Quantization: Digitizing the amplitude value is called quantization.
To convert a continuous image f(x, y) into digital form, we have to sample the function in both co-ordinates
and amplitude.
Image Acquisition Process: Digitization
• Sampling and Quantization
Representation of Digital Image
• Sampling and Quantization
Representation of Digital Image
• Sampling and Quantization
1D Signal: Audio, Speech, ECG
● 1D Signal: Audio, Speech, ECG
2D Signals: Images
● 2D Signals: Images
3D Signals: Video
● 3D Signals: Video
○ There is third axis as well i.e. temporal
3D Signals: Video
● 3D Signals: Video
○ There is third axis as well i.e. temporal
3D Signals: Video
● 3D Signals: Video
○ There is third axis as well i.e. temporal
3D Signals: Video
● 3D Signals: Video
○ There is third axis as well i.e. temporal
Example: Grayscale Digital Image 1
• Gray-scale Image
• I(x, y) ∈
[0..255]
• Color Image
• IR(x, y) IG(x, y) IB(x, y)
Three Types of Images
• Pixel and its Color
• R(x, y) G(x, y) B(x, y)
Basic Measures of a Digital Image
● Terminology: “dpi” and “ppi”
○ “dpi” (dots per inch)
■ printing term that describes # dots in a print.
○ Different from square pixels per inch (“ppi”) in the digital image
● “dpi” has been commonly adopted to describe the resolution of digital
images as well, and “dpi” is used here in place of “ppi”.
●
● Two basic measures for digital image characteristics/quality:
○ Spatial resolution – capturing detail (dpi)
○ Tonal resolution – color, bit-depth, and dynamic range (bits per
pixel(bpp))
Spatial Resolution (Spatial Frequency/dpi)
● Spatial resolution
○ The rate at which an image is sampled during scanning.
○ It is the frequency of pixels used to capture sample tones in the
space of the object being digitized.
● Example
○ 300 pixels per inch of the original image
○ More pixels per inch means a higher resolution,
○ But overall image quality cannot be determined by spatial resolution alone.
○ Spatial frequency is a synonym for spatial resolution.
Tonal Resolution (color, bit-depth, and dynamic range)
● Color representation
○ Bitonal images have only black or white valuse.
○ Bitonal images would not be useful for most purposes.
○ Grayscale has the range of tonal values (shades) from black to white.
○ It have a tonal representation
○ Good choice for representing them as compared to bitonal images.
● Color can capture a much broader range of values than grayscale.
● Bit-depth: Minimum bit-depth are 8-bit for grayscale and 24-bit for color.
● Sensitivity: Ability to measure faint brightnesses
● Dynamic Range: Ability to image “bright” and “faint” sources in same system
Relationship of bit-depth to the number of available colors
● Relationship of bit-depth to the number of available
colors
Spatial and gray-level resolution
• Spatial Resolution: Shrinking
Resolution: Subsampled and resampled
● Spatial Resolution: Zooming by Replica
Resolution: Varying the number of gray levels
● Tonal Resolution
Images with different level of details
• Images with different level of details
Basic Relationships Between Pixels
● Neighbors of a pixel: Three kinds of neighbors of a pixel O
○ Closed path O X O
O O O
● Connectivity in a subset S of an image
○ Two pixels are connected if there is a path between them that lies completely within S.
● Connected component of S: Set of all pixels in S that are connected to a given pixel in S.
● Region of an image: Boundary, border or contour of a region
● Edge: a path of one/more pixels that separate two regions of significantly different gray levels.
Basic Relationships Between Pixels
• Neighbors of a pixel:
O O O O O O
O X O X O X O
O O O O O O
Basic Relationships Between Pixels
• Adjacency: V is set of gray-level values used to define adjacency
• 4-adjacency
• Two pixels p and q with values form V are 4-adjacency if q is in the set of
• 8-adjacency
• Two pixels p and q with values form V are 8-adjacency if q is in the set of
• m-adjacency (mixed adjacency):
• Two pixels p and q with values from V are m-adjacency if
• q is in , or
• q is in and the set has no pixels whose values are from V
• Example
Distance measures
• Distance measures
• Euclidean distance
• City-block distance
• Chessboard distance
• Dm distance: The shortest m-path (m-adjacency) between the points
Problem :
•Given an image of size 1024×1024 pixels in which intensity of each pixel is an 8-bit quality.
It requires of storage space if the image is not compressed.
• 1 KB
• 1 MB
• 8 KB
• 8 MB
Zooming
Down-sampling
In the down-sampling technique, the number of pixels in the given image is
reduced depending on the sampling frequency. Due to this, the resolution and
size of the image decrease.
Up-sampling
The number of pixels in the down-sampled image can be increased by using up-
sampling interpolation techniques. The up-sampling technique increases the
resolution as well as the size of the image.
Zooming
Down-sampling
Mipmap
Box Sampling
Sinc
Up-sampling
Nearest Neighbour Interpolation
Bilinear Interpolation
Bicubic Spline Interpolation
Generalized Bicubic Interpolation
Down-sampling
Box Filter
Box filter is a simplest linear filter. Each pixel
calculated is the average of the pixel
values in a square (filter window) centered at
that pixel.
Up-sampling
Nearest Neighbour Interpolation
Up-sampling
Bilinear Interpolation
10 20 10 13 17 20 10 13 17 20
17 20 24 27
23 26 30 33
30 40 30 33 37 40 30 33 37 40
https://www.youtube.com/watch?v=8bTDssnJyZc&t=102s
Up-sampling
Bi-cubic Interpolation
Image Format describes how data related to the image will be stored. Data can be
stored in compressed, Uncompressed, or vector format.
Each format of the image has a different advantage and disadvantage. Image types
such as TIFF are good for printing while JPG or PNG, are best for the web.
Image Formats
TIFF(.tif, .tiff) : Tagged Image File Format this format store image data without losing any data. It
does not perform any compression on images, and a high-quality image is obtained but the size of
the image is also large, which is good for printing, and professional printing.
JPEG (.jpg, .jpeg): Joint Photographic Experts Group is a loss-prone (lossy) format in which data is
lost to reduce the size of the image. Due to compression, some data is lost but that loss is very
less. It is a very common format and is good for digital cameras, nonprofessional prints, E-Mail,
Powerpoint, etc., making it ideal for web use.
GIF (.gif): GIF or Graphics Interchange Format files are used for web graphics. They can be
animated and are limited to only 256 colors, which can allow for transparency. GIF files are
typically small in size and are portable.
Image Formats
PNG (.png): PNG or Portable Network Graphics files are a lossless image format. It was designed to
replace gif format as gif supported 256 colors unlike PNG which support 16 million colors.
Bitmap (.bmp): Bit Map Image file is developed by Microsoft for windows. It is same as TIFF due to
lossless, no compression property. Due to BMP being a proprietary format, it is generally recommended
to use TIFF files.
EPS (.eps): Encapsulated PostScript file is a common vector file type. EPS files can be opened in
applications such as Adobe Illustrator or CorelDRAW.
RAW Image Files (.raw, .cr2, .nef, .orf, .sr2): These Files are unprocessed and created by a camera or
scanner. Many digital SLR cameras can shoot in RAW, whether it be a .raw, .cr2, or .nef. These images are
the equivalent of a digital negative, meaning that they hold a lot of image information. These images
need to be processed in an editor such as Adobe Photoshop or Lightroom. It saves metadata and is used
for photography.
History
● Early 1920s
● Image transmitted between London & New York
● Bartlane cable Picture transmission system
● Printed using Telegraph printer in halftone
46
History
● 1922
● Tape Punched after the signal crossed Atlantic
twice
● 5 distinct brightness level
● Quality improved by printing device
47
History
● 1929
● Image obtained using 15 tone equipment
● London to New York
48
History
● First Picture of Moon
● US Spacecraft (Ranger 7) took this picture
● 31 July 1964
49
History
● Late 1960s & Early 1970s:
○ Space applications
○ Medical applications
○ Remote Earth resource observations
○ Astronomy
○ Satellite image processing
○ Defense
○ Industrial Applications
Application Areas
● Office Automation
○ Optical Character Recognition
○ Document Processing
○ Cursive Script Recognition
○ Logo & Icon Recognition
● Industrial Automation
○ Automatic Assembly
○ PCB Checking
○ Robotics
○ Oil & natural Gas Exploration
51 ○
Application Areas
● Bio-Medical
○ ECG, EEG, EMG analysis
○ Cytological, histological & Stereological Applications
○ Automatic Radiology & Pathology
○ X-ray Image analysis
○ CAT, MRI, PET SPECT, USG and other tomographic images
● Remote Sensing
○ Natural Resources Survey & Management
○ Estimation related to agriculture, forestry, hydrology,
mineralogy, urban planning
○ Monitoring traffic
57 ○ Environment & Pollution
Application Areas
● Scientific Applications
○ High energy Physics
○ Bubble Chamber
○ Other form of track analysis
● Criminology
○ Fingerprint identification
○ Human face identification & Registration
○ Forensic investigations
● Astronomy & Space Applications
○ Restoration of images suffering from geometric &
58 photometric
Application Areas
● Meteorology
○ Short term weather forecasting
○ Long term climatic change detection
○ Cloud pattern analysis
● Information Technology
○ Facsimile image transmission
○ Videoconferencing & Videophones
● Entertainment
○ HDTV
○ Multimedia Applications
54 ○ Video
Application Areas
● Printing & Graphic Arts
○ Color fidelity in desktop publishing
○ Art conservation & dissemination
● Military Applications
○ Missile guidance and detection
○ Target identification
○ Navigation of pilot less vehicles
○ Reconnaissance
○ Range finding
55
Optical Illusions
• Optical Illusions
Optical Illusions
• Optical Illusions
Text Book