You are on page 1of 62

Department of Mechatronics

Image Acquisition and Pre-processing


MACHINE VISION AND IMAGE PROCESSING
(MTE 4075)

Year/ Semester : IVth / VII th

Name of Faculty:
Dr. Umesh Sahu
(Assistant Professor)
Manipal Institute of Technology, Manipal, India
−1−
Syllabus
Image acquisition and pre-processing: [15]
Vision system components, Image acquisition and analysis, Image formation
- Sampling & Quantization, simple operations on image, Image
enhancement: Spatial Domain and frequency domain methods, Image noise,
image restoration , morphological operations, Segmentation, image analysis,
representation of regions, Feature extraction, fundamentals of color image
processing, conversion of color spaces.

Manipal Institute of Technology, Manipal, India


−2−
Content
▪Introduction: Vision in humans
▪Vision and Imaging Sensors/Detectors
▪Simple model of image formation
▪What is Digital Image Processing?
▪Image Acquisition Process
▪Image Sampling and Quantization
▪Key Stages in Digital Image Processing
▪Applications & Research Topics (Self Learning)
▪Task
Manipal Institute of Technology, Manipal, India
−3−
Vision in humans
• Vision is our most powerful sense. Half of primate cerebral cortex is devoted to visual processing
• The retina is ~1,000 𝑚𝑚2. Contains 130 million photoreceptors (120 mil. rods for low light vision
and 10 mil. cones for color sampling) covering a visual field of 𝟐𝟐𝟎 × 𝟏𝟑𝟓 degrees
• Provides enormous amount of information: data-rate of ~3GBytes/s
• To match the eye resolution, we would need a 500 Megapixel camera. But in practice the acuity of
an eye is 8 Megapixels within a 18-degree field of view (5.5 mm diameter) around a region called
fovea

Manipal Institute of Technology, Manipal, India 4


−4−
Vision in humans: how we see
• The area we see in focus and in full color represents the part of the visual field that is covered by
the fovea
• The fovea is 0.35 mm in diameter, covers a visual field of 1-2 degrees, has high density of cone
cells
• Within the rest of the peripheral visual field, the image we perceive becomes more blurry (rod
cells)

How we actually see. This principle is used in


foveated rendering
Manipal Institute of Technology, Manipal, India 19
−5−
Vision and Imaging Sensors/Detectors
• Electronic devices that detect the presence of objects or colors within their fields of view and
convert this information into a visual image for display
• They usually integrate a camera, lights, and controller in a single unit
• Employed in many manufacturing operations for quality control, presence sensing,
positioning and orienting, sorting, labeling inspecting, gripping and guiding, etc
• Some sensors send output signals to control systems to direct actions on parts. Such systems
are termed “embedded vision” systems to describe a device that encompasses not only the
image acquisition components but the image processing system as well, sometimes called
a “smart” camera (color and monochrome sensors)
• Lighting options in image acquisition: light rings around their lenses, Lights can be white,
red, blue, or green, Backlighting to enhance the silhouette of a complex shape, Infrared and
ultraviolet lighting
• Lenses: wide-angle or telephoto images Machine Vision and Computer Vision
– are they both same?
https://www.thomasnet.com/articles/instruments-controls/all-about-vision-and-imaging-sensors/

Manipal Institute of Technology, Manipal, India


−6−
Contd..

• Area sensor - to detect missing features in a machined part, such as a hole or multiple holes.
• Blemish sensors - to locate scratches on a surface or foreign matter on packaging material
• Match sensors -to compare patterns such as inscriptions to reference patterns
• Sort sensor - to check a part against multiple patterns for orienting it.
• Inspection: Line scan cameras
Application?

Manipal Institute of Technology, Manipal, India


−7−
Manipal Institute of Technology, Manipal, India
−8−
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.

Manipal Institute of Technology, Manipal, India


−9−
Light

Is Imaging
possible only in
visible light ?

Manipal Institute of Technology, Manipal, India


− 10 −
X-Ray Visible Infrared SAR image

Manipal Institute of Technology, Manipal, India


− 11 −
Images in different walks of life

Entertainment Medical Field

Image

Remote Sensing Forensic Field

Manipal Institute of Technology, Manipal, India


− 12 −
Image Types

Manipal Institute of Technology, Manipal, India


− 13 −
Image Digitization
▪ Why do we need image digitization ?
– To store an image in digital computer, since there are infinite points between two numbers and
representation of all points will take infinite space in the memory.
– Image need to be represented using finite 2-D matrix.

▪ What is image digitization?


– Image is represented in 2-D finite matrix.
– Each element of matrix represented by finite set of discrete value.

▪ How to digitize an image?


– sampler followed by quantization

Manipal Institute of Technology, Manipal, India


− 14 −
What is Digital Image Processing?
Digital Image
— a two-dimensional function
x and y are spatial coordinates f ( x, y)
The amplitude of f is called intensity or gray level at the point (x, y)

Digital Image Processing


— process digital images by means of computer, it covers low-, mid-, and high-level processes
low-level: inputs and outputs are images
mid-level: outputs are attributes extracted from input images
high-level: an ensemble of recognition of individual objects

Pixel
— the elements of a digital image

Manipal Institute of Technology, Manipal, India


− 15 −
Image Acquisition Process

Manipal Institute of Technology, Manipal, India


− 16 −
Image Sampling and Quantization
Plot of Intensity
(amplitude) value
along the AB

Digitizing the
coordinate
values
Digitizing the
amplitude
values

Gonzalez_Digital Image Processing(2007)

Manipal Institute of Technology, Manipal, India


− 17 −
Image Sampling and Quantization

Manipal Institute of Technology, Manipal, India


− 18 −
Gonzalez_Digital Image Processing(2007)

Manipal Institute of Technology, Manipal, India


− 19 −
Representing Digital Images

▪ The representation of an M×N numerical array as

Image element/ picture element/


pixel/ pel

 f (0, 0) f (0,1) ... f (0, N − 1) 


 f (1, 0) f (1,1) ... f (1, N − 1) 
f ( x, y ) = 
 ... ... ... ... 
 
 f ( M − 1, 0) f ( M − 1,1) ... f ( M − 1, N − 1) 

Manipal Institute of Technology, Manipal, India


− 20 −
Representing Digital Images

▪ The representation of an M×N numerical array as

 a0,0 a0,1 ... a0, N −1 


 a a1,1 ... a1, N −1  
A=  1,0

 ... ... ... ... 


 
 aM −1,0 aM −1,1 ... aM −1, N −1 

Manipal Institute of Technology, Manipal, India


− 21 −
Representing Digital Images

▪ The representation of an M×N numerical array in MATLAB

 f (1,1) f (1, 2) ... f (1, N ) 


 f (2,1) f (2, 2) ... f (2, N ) 
f ( x, y ) = 
 ... ... ... ... 
 
 f ( M ,1) f ( M , 2) ... f (M , N )

Manipal Institute of Technology, Manipal, India


− 22 −
How are images represented in the computer?

Manipal Institute of Technology, Manipal, India


− 23 −
Color images

Manipal Institute of Technology, Manipal, India


− 24 −
Digital Image

Digital image = a multidimensional


array of numbers (such as intensity image)
or vectors (such as color image)

Each component in the image 10 10 16 28


 9 656 7026
56  43
37  78
called pixel associates with  32 99 70 56
15  256013 902296
54 96 67 
67
the pixel value (a single number in 3  21  54 47  42 
 2 158587 853943  92
the case of intensity images or a 54  65 65 39 
vector in the case of color images). 32 65 87  99

Manipal Institute of Technology, Manipal, India


− 25 −
What is DIP? (cont…)

▪The continuum from image processing to computer vision can be broken up into low-,
mid- and high-level processes
Low Level Process Mid Level Process High Level Process

Input: Image Input: Image Input: Attributes


Output: Image Output: Attributes Output: Understanding
Examples: Noise removal, Examples: Object Examples: Scene
image sharpening recognition, segmentation understanding, autonomous
navigation

Manipal Institute of Technology, Manipal, India


− 26 −
Key Stages in Digital Image Processing

Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 27 −
Key Stages in Digital Image Processing: Image Acquisition

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 28 −
Key Stages in Digital Image Processing: Image Enhancement

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 29 −
Key Stages in Digital Image Processing: Image Restoration

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 30 −
Key Stages in Digital Image Processing: Morphological Processing

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 31 −
Key Stages in Digital Image Processing: Segmentation

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 32 −
Key Stages in Digital Image Processing: Object Recognition

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 33 −
Key Stages in Digital Image Processing: Representation & Description

Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 34 −
Key Stages in Digital Image Processing: Image Compression

Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 35 −
Key Stages in Digital Image Processing: Colour Image Processing

Morphological
Image Restoration
Processing

Image
Segmentation
Enhancement

Object
Image Acquisition
Recognition

Problem Domain Representation


& Description
Colour Image Image
Processing Compression

Manipal Institute of Technology, Manipal, India


− 36 −
Applications
&
Research Topics

Manipal Institute of Technology, Manipal, India


− 37 −
Signature Verification

Manipal Institute of Technology, Manipal, India


− 38 −
Biometrics

Manipal Institute of Technology, Manipal, India


− 39 −
Fingerprint Identification Research at UNR

Minutiae Matching

Delaunay Triangulation

Manipal Institute of Technology, Manipal, India


− 40 −
Target Recognition

▪ Department of Defense (Army, Airforce, Navy)

Manipal Institute of Technology, Manipal, India


− 41 −
Autonomous Vehicles

▪ Land, Underwater, Space

Manipal Institute of Technology, Manipal, India


− 42 −
Traffic Monitoring

Manipal Institute of Technology, Manipal, India


− 43 −
Face Detection/Recognition Research at UNR

Manipal Institute of Technology, Manipal, India


− 44 −
Facial Expression Recognition

Manipal Institute of Technology, Manipal, India


− 45 −
Hand Gesture Recognition
▪Smart Human-Computer User ▪Sign Language Recognition
Interfaces

Manipal Institute of Technology, Manipal, India


− 46 −
Human Activity Recognition

Manipal Institute of Technology, Manipal, India


− 47 −
Medical Applications

▪ skin cancer breast cancer

Manipal Institute of Technology, Manipal, India


− 48 −
Morphing

Manipal Institute of Technology, Manipal, India


− 49 −
Inserting Artificial Objects into a Scene

Manipal Institute of Technology, Manipal, India


− 50 −
Robotic Vision
Programming a robot to see Sense the information
through camera

What you need to know


Principles of vision
capture images, camera, pre processing of an image, image transformations, identify
the shapes, colours transformation, morphology operations, camera calibration,
stereo vision, feature extraction, detection and classification
Mathematical knowledge action
linear algebra, probability
Programming skills
Program to plan
Python (OpenCV)
MATLAB (image processing and computer vision toolbox
Mathematica
Lab View
Third party APIs- sherlocks

Manipal Institute of Technology, Manipal, India


− 51 −
Applications of Machine Vision in
Industry

Manipal Institute of Technology, Manipal, India


− 52 −
Applications of Machine Vision in Industry

Remote monitoring
Bottle verification Medicine inspection

Food grade inspection

Coloured object separation Dimension measurement


Pick and place applications

Manipal Institute of Technology, Manipal, India


− 53 −
Glance on these techniques
Character recognition
Remote inspection

Barcode detection

Object detection

Object tracking Agriculture machines

Speed estimation
Measure the dimension of object
Find the distance of the object from camera
Stereo vision Robotic surgery

Manipal Institute of Technology, Manipal, India


− 54 −
Glance on these techniques
piston ring counting

Contains more than 100 rings (width of 0.29mm-0.79mm Camera- 5MP


Labour intensive Red diffused light
Sherlock software
Counts the piston rings
vision system design magazine

Manipal Institute of Technology, Manipal, India


− 55 −
Turtlebot

Camera- 3D vision
Iben robot with Orbbec Astra stereo camera to sanitize the hospitals
Robot Operating System
Algorithms for object detection and tracking
Uses OpenCV
Sensors for obstacle avoidance
for vision applications
Can be programmed to move from location A to B
Dept of Mechatronics, MIT Manipal
vision system design magazine
Manipal Institute of Technology, Manipal, India
− 56 −
Plant disease monitor: virus & bacteria infections potatoes Requires detection and recognition of diseases
Removes the diseased plants Actions through actuators
Deep learning approaches on hyperspectral image data
vision system design magazine

Manipal Institute of Technology, Manipal, India


− 57 −
Vision guided drone for flood monitoring system

Pipe inspection in oil refinery

Infrared cameras for wild life behaviour


vision system design magazine

Manipal Institute of Technology, Manipal, India


− 58 −
Logistics and warehouses
sensors gyroscope, accelerometer, encoders, laser scanners
Obstacle avoidance algorithms
Proximity sensors
Intel’s D435 USB 3.0 cameras

vision system design magazine

Manipal Institute of Technology, Manipal, India


− 59 −
Practice Problem
Gonzalez, Rafael C., and Richard E. Woods. "Digital Image Processing,
New Jersey.", 2007. 3rd edition.

Example 2.1, 2.2, 2.3, 2.4

Manipal Institute of Technology, Manipal, India


− 60 −
Task:
Difference between Computer
Vision and Machine Vision?

Brainstorm your own


Application.
(for Assignment)

Manipal Institute of Technology, Manipal, India


− 61 −
Thank you
for your attention

Manipal Institute of Technology, Manipal, India


− 62 −

You might also like