Fundamentals of Image Processing
Fundamentals of Image Processing
Processing
The Origins of Digital Image Processing
• One of the first applications of digital images was in the
newspaper industry, when pictures were first sent by submarine
cable between London and New York.
• Functions of vision
• Discriminate figure from background (food or rock?)
• Detect movement (predator / prey?)
• Detect color (adaptive value of color vision)
Image Sensing and Acquisition
• Most of the images in which we are interested are generated by the
combination of an "illumination" source and the reflection or absorption
of energy from that source by the elements of the "scene" being
imaged.
Bands of the EM spectrum are not distinct but rather transition smoothly from one to the other.
Cont.
• The visible spectrum can be divided into three bands:
• Light is a particular type of electromagnetic radiation that can be
sensed by the human eye.
• Radiance is the total amount of energy that flows from the light
source, and it is usually measured in watts (W)
• Luminance, measured in lumens (Im), gives a measure of the
amount of energy an observer perceives from a light source.
• The part of the infrared band close to the visible spectrum is called
the near-infrared region.
• Digital and analog circuitry sweep these outputs and convert them to
an analog signal, which is then digitized by another section of the
imaging system.
1 pixel
What is a Digital Image? (cont…)
Common image formats include:
• 1 sample per point (B&W or Grayscale)
• 3 samples per point (Red, Green, and Blue)
• 4 samples per point (Red, Green, Blue, and “Alpha”, a.k.a. Opacity)
• When x, Y, and f are all finite, discrete quantities, image is a digital image.
Analog vs Digital
Advantages of Digital Image Processing
• Humans are limited to the visual band of the electromagnetic
(EM) spectrum.
• But imaging machines cover almost the entire EM spectrum, ranging from
gamma to radio waves.
• Low-level processes,
• Mid-level processes
• High-level processes.
• Thus, a low-level process is characterized by the fact that both its inputs
and outputs are images.
Cont.
• Second involves tasks such as segmentation, description of those
objects to reduce them to a form suitable for computer processing, and
classification of individual objects.
• The physics of light, which determines the brightness of a point in the image
plane as a function of illumination and surface properties.
Image digitization
• The diagram shows that the magic number bytes header is followed
by the image data. The image data is then followed by a padding
byte, which is a byte that is used to pad the file to a certain size.
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)
• GIF: A lossless image format that uses a color palette of up to 256 colors. GIF
files are often used for web graphics, as they can be relatively small in size.
• PNG: A lossless image format that supports up to 16 million colors. PNG files
are often used for images that require high color accuracy, such as logos and
illustrations.
• JPEG: A lossy image format that uses a compression algorithm to reduce the
file size of an image. JPEG files are often used for photographs, as they can be
compressed without significantly affecting the image quality.
• TIFF: A lossless image format that supports a wide range of color depths and
resolutions. TIFF files are often used for images that require high quality, such
as scanned documents and photographs.
Cont.
• PGM: The Portable Graymap (PGM) format is a simple, lossless image
format that stores grayscale images. Each pixel in a PGM image is
represented by a single byte, which can store a value from 0 to 255. This
means that PGM images can store a maximum of 256 different gray levels.
• FITS: The Flexible Image Transport System (FITS) format is a more complex,
lossless image format that can store grayscale, color, and spectral images.
FITS images are typically used in astronomy and other scientific
applications.
Comparison of image formats
• PGM: A binary image file format that stores grayscale images.
• GIF: A lossless image file format that stores images with a limited number of colors.
• TIF: A lossless image file format that stores images with a wide range of colors.
• PS: A vector image file format that stores images as a set of mathematical objects.
• HIPS: A lossless image file format that stores images with a high dynamic range.
• JPG (lossless): A lossless image file format that stores images using a compression algorithm
that preserves image quality.
• JPG (lossy): A lossy image file format that stores images using a compression algorithm that
reduces image quality to save space.
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)
Some argument about where image processing ends and fields such as
image analysis and computer vision start.
What is DIP? (cont…)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing: Image Acquisition
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing: Image Enhancement
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing: Image Restoration
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing: Morphological
Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Segmentation
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Object Recognition
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Representation & Description
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Compression
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image Processing:
Colour Image Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
Colour Image Image & Description
Processing Compression
Color Model
A color model is a system used to describe a color. Different types of
color models are used in multiple fields like in hardware, in multiple
applications of creating animation, etc.
• RGB
• CMYK
• HSI
• YIQ
Before discussing different color models let us discuss types of color model.
• These models mixes different amount of RED, GREEN, and BLUE (primary
colors) light to produce rest of the colors.
• Example: RGB model is used for digital displays such as laptops, TVs,
tablets, etc.
Subtractive Color Model
• These type of models use printing inks to display colors.
• Subtractive color starts with an object that reflects light and uses colorants to
subtract portions of the white light illuminating an object to produce other colors.
• If an object reflects all the white light back to the viewer, it appears white, and if it
absorbs all the light then it appears black.
• Example: Graphic designers used the CMYK model for printing purpose.
RGB Model:
• The RGB color model is an additive color model.
• The RGB color model is one of the most widely used color representation
method in computer graphics. It use a color coordinate system with three
primary colors:
R(red), G(green), B(blue)
• Each primary color can take an intensity value ranging from 0(lowest) to
1(highest). Mixing these three primary colors at different intensity levels
produces a variety of colors.
The primary colors are added to produce secondary colors.
Red + Blue = Magenta
Red + Green = Yellow
Blue + Green = Cyan
CMY and CMYK Models:
• cyan, magenta, and yellow are the secondary colors of light or, alternatively, they
are the primary colors of pigments.
• For example, when a surface coated with cyan pigment is illuminated with white
light, no red light is reflected from the surface.
• That is, cyan subtracts red light from reflected white light, which itself is composed
of equal amounts of red, green, and blue light.
• equal amounts of the pigment primaries, cyan, magenta, and yellow, should
produce black.
Cont.
• In practice, because C, M, and Y inks seldom are pure colors, combining
these colors for printing black produces instead a muddy-looking
brown.
• The Hue component describes the color in the form of an angle between [0,360]
degrees.
• The Saturation component describes how much the color is diluted with white
light.
• The range of the S varies between [0,1]. The Intensity range is between [0,1] and 0
means black, 1 means white.
YIQ Model:
• Y stands for luminance part and IQ stands for chrominance part. In the
black and white television, only the luminance part (Y) was broadcast.
…
Vision is really hard
Is that a
queen or a
bishop?
Why computer vision matters
Comfort Fun
Ridiculously brief history of computer vision
• 1966: Minsky assigns computer vision
as an undergrad summer project
• 1960’s: interpretation of synthetic
worlds Guzman ‘68
• 1970’s: some progress on interpreting
selected images
• 1980’s: ANNs come and go; shift toward
geometry and increased mathematical
rigor
• 1990’s: face recognition; statistical Ohta Kanade ‘78
analysis in vogue
• 2000’s: broader recognition; large
annotated datasets available; video
processing starts
LaneHawk by EvolutionRobotics
“A smart camera is flush-mounted in the checkout lane, continuously
watching for items. When an item is detected and recognized, the
cashier verifies the quantity of items that were found under the basket,
and continues to close the transaction. The item can remain under the
basket, and with LaneHawk,you are assured to get paid for it… “
Vision-based biometrics
“How the Afghan Girl was Identified by Her Iris Patterns” Read the story
wikipedia
Login without a password…
http://www.sportvision.com/video.html
Smart cars Slide content courtesy of Amnon Shashua
• Mobileye
– Vision systems currently in high-end BMW, GM,
Volvo models
– By 2010: 70% of car manufacturers.
Google cars
http://www.nytimes.com/2010/10/10/science/10google.html?ref=artificialintelligence
Interactive Games: Kinect
• Object Recognition:
http://www.youtube.com/watch?feature=iv&v=fQ59dXOo63o
• Mario: http://www.youtube.com/watch?v=8CTJL5lUjHg
• 3D: http://www.youtube.com/watch?v=7QrnwoO1-8A
• Robot: http://www.youtube.com/watch?v=w8BmgtMKFbY
Vision in space
NASA'S Mars Exploration Rover Spirit captured this westward view from atop
a low plateau where Spirit spent the closing months of 2007.