You are on page 1of 154

Robotic Vision

SS21

Prof. Dr.-Ing. Maria Schweigel

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 1


organizational things 2

meetings:
Lesson every Monday 8:00-9:30 and
10:00 – 11:30 online in BBB

Exam:
written exam at end of semester about 120 min

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


content 3

Chapter 1 – Introduction
1. Development of Robotic, Robotic today (Industry robotic, Service
robotic, Self driving cars, Medical robots, Aeronautic and military
robots)
2. Autonomous robotics: Definition Robot
3. Artificial Intelligence – AI: Neural Networks, classification flow –
superviced learning, over and under fitting,
4. Ethic Aspects
5. Vision based Robotics: Main components of vision based robots,
Classification of a camera as a sensor, Why vision in robotics?,
Challenges of robot vision, Structure of vision sensing

Chapter 2 – Coordinate systems and transformations


1. Mathematical representation of a robot
2. Rotation Matrix: In 2D, In 3D, Other representations of rotation matrix
in 3D
3. Transformation Matrix: In 2D, In 3D
4. Center of Rotation
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
content 4

Chapter 3 – Physics of Light and color


1. Radiometry (irradiance, radiance, radiant intensity)
2. Photometry: physical values (luminous flux, luminous intensity,
illuminance), physics of photometry (Absorbtion, Reflectance, Luminance),
Effects of Photometry (Photometric Stereo, Shadows, Polarization)
3. Colorimetry: Trichromatic theory and Opponent color theory, Physic of
colors (math. Description, reproducing color, chromaticity space, hue and
saturation)
4. Problems in Robot Vision because of light and color: Color temperature
and white balancing, Dichromatic refection, Gamma and gamma
correction, Shadows and shadow removal

Chapter 4 - Image formation


1. Perspective projection: Projecting Points with the Camera Matrix, Other
mathematical descriptions of perspective projection, Distortions
2. Camera calibration: Classical calibration techniques, Bouguet’s Calibration
3. Types of wide-view cameras: Fisheye Lens Camera, Catadioptric Camera,
Spherical Camera, Transformation of image models
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
content 5

Chapter 5 – Image processing


1. Histogram
2. Monadic operations
3. Diadic Operations
4. Spatial Operations: Linear Spatial filtering, Smoothing, Edge detection,
Template Matching, other Spatial filtering
5. Mathematical Morphology
6. Shape Changing: Cropping/ROI, Resizing, Warping

Chapter 6 – Image feature extraction


1. Classification: Binary classification via grey level, Color classification
2. Representation
3. Features: Boundary Box, Moments: Calculating Area, Center from
Moments, Orientation and Shape from moments, Shape, Character
recognition, Line features, Point features: Moravec’s interest operator,
Harris-Stephens Edge Detection, SIFT - Scale-invariant feature
transform, SURF - Speeded Up Robust Feature

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


content 6

Chapter7 - Vision-Based Control


1. Multi vision: Correspondence, Geometry of Multi Vision:
Epipolargeometry, Planar Homography, Photogrammetry
2. Visual servoing: Position-Based Visual Servo (PBVS), Image-Based
Visual Servo (IBVS)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


literature 7

‘Vision Based Autonomous Robot Navigation’,


Chatterjee, Rakshit, Singh, Springer 2013

‘Robotics – Vision and Control‘, Peter Corke,


Springer 2017

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 1 –
Introduction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 8


Development of Robotic 9

Electro the Smoking Robot


(1939)
1. Introduction

https://www.pinterest.de/pin/409616528588699674/ https://www.pinterest.de/pin/311381761708387505/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Development of Robotic 10
1. Introduction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Development of Robotic 11
1. Introduction

https://www.zdnet.com/pictures/15-vintage-robots-that-definitely-show-their-age/10/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Robotic today 12
1. Introduction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Robotic today 13
1. Introduction

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Industry robotic 14
1. Introduction

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Service robotic 15

Care-O-bot
by
Fraunhofer
1. Introduction

IPA

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/
https://automationline.rbsonline.de/multiturn-sensor-fuer-smarten-serviceroboter/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Service robotic 16

ARMA by KIT (Karlsruher


Instutut of Technology)
• size: 1,7m
• weight: 70kg
1. Introduction

• energy supply: battery


• 63 actuators, 214 sensors,
76 microkontroller, 3PCs for
perzeption
• balance

→ARMA should be able to act


in normal home and help
human with his daily work. https://his.anthropomatik.kit.edu/241.php
https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Self driving cars 17
1. Introduction

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Self driving cars 18

https://www.wired.com/story/waymo-launches-self-driving-minivans-fiat-chrysler/
1. Introduction

Waymo

https://www.buyherepayhereusa.com/blo
g/safety-tips-learn-from-self-driving-cars/
https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Medical robots 19
1. Introduction

https://intelligente-welt.de/medizinroboter/

Medizin robot Da Vinci, the only system with a wide


https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/
international certification
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Medical robots 20

https://intelligente-welt.de/medizinroboter/
1. Introduction

Miro by German Aerospace Center (DLR)


https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Agriculture robots 21

http://www.agriexpo.online/prod/bosch-deepfield-robotics/product-168586-1199.html
1. Introduction

BoniRob by University Osnabrück and BOSCH


https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Aeronautic and military robots 22

Mars Science Lander by NASA


1. Introduction

https://www.bostondynamics.com/wildcat

https://mars.nasa.gov/news/8371/curio WildCat by Boston


sity-rover-to-temporarily-switch-brains/
Dynamics
https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Aeronautic and military robots 23
1. Introduction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Development of Robotic 24

Elektro the Smoking Robot


(1939) Terminator (2029)
1. Introduction

https://www.pinterest.de/pin/409616528588699674/ http://de.moviepedia.wikia.com/wiki/Terminator_Genisys/Wikia-Kritik

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Definition 25
1. Introduction

„A Robot is a goal oriented machine


that can sense, plan and act.“

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Autonomous robitics 26

- from greek word:


„autós“ = self „nomos“ = law
1. Introduction

- autonomous: self-sufficient, independent, act


to own laws

→ An autonomous system (AS) acts


according to its own laws, which are
determined by software or acquired
through learning processes.
https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Artificial Intelligence - AI 27


1. Introduction

neural networks
• support vector machines
• decision trees
• fuzzy logic
• deep learning
• ….
https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Neural Networks 28
1. Introduction

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Neural Networks 29
1. Introduction

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Neural Networks 30
1. Introduction

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


classification flow – supervised learning
1. acquisition of data, determining features and related
class of data , e.g. with help of expert
2. training of classifier so that classifier can classify as much
as possible training data with the correct class =
1. Introduction

optimizing process (step by step adaption of classifier


model till results with testing data satified
3. determining quality of classificator with help of an
independent data set (validation data), How good
classifator can handle with unknown data?

→ tree data sets necessary:


• training data
• testing data
• validation data (independent)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


over and under fitting

e
Optimum
1. Introduction

e – mean square error

N – number of training cycle

training data
validation data
over fitting
under fitting
Optimum
under fitting over fitting
N

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


example over and under fitting
1. Introduction

? ? ?

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Ethic Aspects 34

What and from


What acceptance Can ethical
whom can the AS
is given to an AS? instructions be
learn?
1. Introduction

translated into the AS


language?

Ethic Aspects
Will the AS replace Who ultimately bears
humans? the responsibility?

Which security gaps


With whom can the How much is a life
are hidden in an AS?
AS connect and worth?
communicate?

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Main components of vision based robots 35

Maps Path planning


1. Introduction

Data Acquisition Self-


Localisation

Feature Landmark
Extraction Recognition

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Classification of a camera as a sensor 37

passive
1. Introduction

aktive

sensors

proprioceptive exteroceptive

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Why vision in robotics? 38

• Most important sense for humans


• conventional sensors, like ultrasonic, IR, GPS,
laser sensors etc. have physical limitations or
1. Introduction

high cost!

→ Vision based robotic:

• Reduce cost
• Do not emit light or waves
• Maintaining of high degree of intelligence,
flexibility and robustness
https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Challenges of robot vision 39

• Handling with hugh data


• Vision processing is computationally
1. Introduction

intensive

→ Increasing of computation resources


provide usage of vision based robotics

https://www.abb-kundenmagazin.de/fertigungsautomatisierung/trommelwirbel/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Structure of vision sensing 40
1. Introduction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 2 –
Coordinate systems and
transformations

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 43


Mathematical representation of a robot 44
2. Coordinate systems and transformations

Representation as a Point or a Vector


y axis

P
PQ Q

P
Q

origin x axis

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Mathematical representation of a robot 45

Representation as a relative Pose and a object frame


2. Coordinate systems and transformations

y axis
yR

P2
P1

{R}
ξR
P
xR

origin x axis

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Mathematical representation of a robot 46
2. Coordinate systems and transformations

Relations of Pose and Points


y axis

P yR
RP

OP


{R}
R xR

{O} x axis

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Mathematical representation of a robot 47
2. Coordinate systems and transformations

Relations of Pose and Points


y axis

yC
P CP
xC
yR
RP
{C}
OP Rξ
C


{R}
R xR

{O} x axis

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Mathematical representation of a robot 48
2. Coordinate systems and transformations

Relations of Pose and Points in 3 Dimensions

[Corke, Robotics – Vision and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Mathematical representation of a robot 49
2. Coordinate systems and transformations

Algebraic rules

[Corke, Robotics – Vision and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Rotation Matrix in 2D 50

Rotation of coordinate system about origin in 2D


2. Coordinate systems and transformations

Ay

By

P
AP
y
cos ϕ

BP Bx
y
BP sin ϕ
x ϕ

-sin ϕ {A} {B} AP cos ϕ Ax


x

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Rotation Matrix in 3D 51

Euler’s rotation theorem:


2. Coordinate systems and transformations

“Any rotation can be considered as a sequence of rotations about


different coordinate axes”

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Rotation Matrix in 3D 52

Rotation in 3 Dimensions is not commutative!


2. Coordinate systems and transformations

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 3 –
Physics of Light and color

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 53


Structure of vision sensing 54
3. Physics of Light and color

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Photometry 56
3. Physics of Light and color

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Photometry 57
3. Physics of Light and color

Emission
spectra for
sun, tungsten
lamp and
response of
human eye

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Absorption 58
3. Physics of Light and color

Transmittance
of sun light in
5 m water

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Procedure of illumination 59
3. Physics of Light and color

illuminant

illuminance luminance
E(λ) L(λ)

reflectance
R(λ)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Structure of vision sensing 60
3. Physics of Light and color

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Colorimetry 61

Spectra
response of
3. Physics of Light and color

three
different cone
cells of
human eye
(normalized)

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Lab color space 62

https://wisotop.
de/lab-
3. Physics of Light and color

farbmodell.php

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Procedure of image formation 63
3. Physics of Light and color

illuminant response
M(λ)

illuminance luminance
E(λ) L(λ)

reflectance
R(λ)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Colorimetry 64

Spectra of
light from
3. Physics of Light and color

source till
human eye

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


CIE primaries 65
3. Physics of Light and color

Red: λr = 700nm
Green: λg = 546.1nm
Blue: λb = 435.8nm

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


CIE color matching functions 66

Color
3. Physics of Light and color

matching
functions
for
standard
observer

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chromaticity space 67

r-g-chro-
3. Physics of Light and color

maticity
plane

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chromaticity space – imaginary nonphysical primaries 68

Color
matching
3. Physics of Light and color

functions
for standard
observer
based on
imaginary
primaries
X,Y,Z

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chromaticity space – imaginary nonphysical primaries 69

x,y-chromaticity plane
3. Physics of Light and color

[https://en.wikipedia.org/wiki/Impossible_c
olor]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


HSV color space 70

https://en.wi
kipedia.org/w
3. Physics of Light and color

iki/HSL_and_
HSV#/media/
File:HSV_colo
r_solid_cylind
er_saturation
_gray.png

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


LCh color space 72
3. Physics of Light and color

https://sensing.konicaminolta.
us/blog/understanding-the-
cie-lch-color-space/

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Color temperature 73

Light source Color temperature (K)


3. Physics of Light and color

Candle light 1 900


Dawn/dusk sky 2 000
40W tungsten lamp 2 600
2.5W(25W) LED lamp (warm white) 2 700
100w tungsten lamp 2 850
Tungsten halogen lamp 3 200
Direct sunlight 5 800
Overcast sky 6 000-7 000
Standard daylight 6 500
Hazy sky 8 000
Clear blue sky 10 000-30 000
[Corke, Robotics – Vision
and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Dichromatic reflection model 74

Dichromatic
reflection on a
3. Physics of Light and color

surface
a) Molecular
view
b) Theoretical
view

https://www.researchgate.ne
t/figure/The-dichromatic-
reflection-model-of-surface-
reflectance-in-
inhomogeneous-materials-
a_fig1_293121272

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Dichromatic reflection model 75

http://time.com/5234787/di
rty-dozen-pesticides/
3. Physics of Light and color

Picture of strawberries: Colored areas because of body


reflection, shiny areas because of specular reflection

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Gamma correction 76
3. Physics of Light and color

a)

b)

c)

a) without gamma correction b) with gamma encoding c) with gamma decoding


https://www.elmar-baumann.de/fotografie/lexikon/gammakorrektur.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Gamma correction 77
3. Physics of Light and color

Gamma correction of grey steps


Top: without gamma correction (linear grey steps)
Bottom: with gamma correction about γ=2.2 (linear sensing of steps)

https://www.elmar-
baumann.de/fotogra
fie/lexikon/gammak
orrektur.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Shadow removal 78
3. Physics of Light and color

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 4 –
Image formation

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 79


Structure of vision sensing 80
4. Image formation

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Perspective Projection 81
4. Image formation

Perspective Projection of an object by pin hole and by lense [Corke, Robotics – Vision
and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Characteristics of Perspective Projection 82

https://www.arthipo.com/artblog/en
/drawing-techniques/basic-
4. Image formation

principles-of-perspective-drawing-1-
diminution.html

Objects appear smaller the farther they are way


https://en.wikipedia.org/wiki/London_Eye#/m
edia/File:Ojo_de_Londres,_Londres,_Inglaterr
Circular Objects appear elliptic a,_2014-08-07,_DD_028.JPG

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Central-projection model 83

P = (X, Y, Z)
4. Image formation

z
x
P‘ = (X‘, Y‘ ,Z‘)

xC
zC {C}
Camera origin
y yC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Camera Sensors 84

https://de.wikipedia.org/wiki/CCD-Sensor#/media/File:Delta-
https://de.wikipedia.org/wiki/Active_Pixel_Sensor#/media/File:Ac Doped_Charged_Coupled_Devices_(CCD)_for_Ultra-
4. Image formation

tive_pixel_sensor_prototype.jpg Violet_and_Visible_Detection.jpg

Camera Sensors: CCD-Sensor (left), CMOS-Sensor (right)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Discrete image plane 85

P = (X, Y, Z)
4. Image formation

z
x
P‘ = (X‘, Y‘ ,Z‘)

H
xC

zC {C}
Camera origin
y W yC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Perspective Projection with Camera Matrix C 86
4. Image formation

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Distortions - Chromatic aberration 91
4. Image formation

https://de.wikipedia.org/wiki/Chromatische_Aberration

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Distortions - Spherical aberration 92
4. Image formation

https://en.wikipedia.org/wiki/Spherical_aberration

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Distortions - Astigmatism 93
4. Image formation

http://hyperphysics.phy-astr.gsu.edu/hbase/geoopt/coma.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Geometric Distortions – tangential distortion 94
4. Image formation

https://de.mathworks.com/help/vision/ug/camera-calibration.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Geometric Distortions – radial distortion 95
4. Image formation

Without distortion (left), Pincushion distortion (mid) and Barrel distortion (right)

http://vrguy.blogspot.com/2013/07/what-is-geometric-distortion-and-why.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Geometric Distortions – radial distortion 96
4. Image formation

Barrel distortion

http://www.scandig.eu/Kameraverzerrung.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Geometric Distortions 97

Distortion of point (u,v) is:


4. Image formation

 u   u ( k1 r 2
+ k 2 r 4
+ k 3 r 6
+ ... )  
+
2 p1uv + p2 ( r 2
+ 2u 2
) 

 =
  v   v ( k1r 2 + k2 r 4 + k3r 6 + ...)   p1 ( r 2 + 2v 2 ) + 2 p2uv 

radial tangential

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Geometric Distortions 98

Tangential and radial distortion


4. Image formation

https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=i
mages&cd=&cad=rja&uact=8&ved=2ahUKEwiy5qyJqPLgAhUGJ
1AKHaxVC44Qjhx6BAgBEAI&url=https%3A%2F%2Fwww2.infor
matik.hu-
berlin.de%2F~stuebing%2Fpublic%2FStudienarbeit_Sascha_Stu
ebing_2010.pdf&psig=AOvVaw1bTNeojvyH8AGSAGz_Ywkg&us
t=1552126514887415

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Classical camera calibration 99
4. Image formation

http://www.signkwik.com/security
-camera-calibration.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Bouguet’s camera calibration 100

Detailed examples of camera calibration in matlab on:


http://www.vision.caltech.edu/bouguetj/calib_doc/#examples
4. Image formation

http://www.vision.caltech
.edu/bouguetj/calib_doc/
htmls/example.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Fisheye lens camera 101
4. Image formation

https://upload.wikimedia.
org/wikipedia/commons/
c/c3/The_Squirrels_0048.
jpg

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Fisheye lens camera 102

P = (X, Y, Z)
4. Image formation

z R x

Θ Φ
u
P‘ = (u,v)
{C}
Camera origin r
Φ

v
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Fisheye lens camera 103

Mapping of projection types


4. Image formation

Stereographic r = 2 f tan ( )
Equidistant (Equiangular) r = f
Equisolid  
r = 2 f sin  
2
orthographic r = f sin ( )

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Fisheye lens camera 104
4. Image formation

Gnomonic stereographic equidistant


equisolid orthographic

http://www.fisheyelens.de/html/def.html
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Fisheye lens camera 105
4. Image formation

Gnomonic stereographic equidistant


equisolid orthographic

http://www.fisheyelens.de/html/def.html
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Catadioptric camera 106
4. Image formation

https://commons.wikimedia.org/wiki/File:Phoe
nix_500mm_f8_mirror.jpg

https://www.math.drexel.edu/~
ahicks/design/what-are.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Catadioptric camera 107
4. Image formation

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Spherical camera 108
4. Image formation

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Unified imaging model 109
4. Image formation

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Unified imaging model 110
4. Image formation

Imaging L m
Perspective 0 f
Stereographic 1 f
Fisheye >1 f
Catadioptic (elliptical, 0<ε<1) 2 2 ( 2 p − 1)
1+  2 1+  2

Catadioptic (parabolic, ε=1) 1 2p-1


Catadioptic (hyperbolic, ε>1) 2 2 ( 2 p − 1)
1+  2 1+  2

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 5 –
Image processing

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 111


Structure of vision sensing 112
5. Image processing

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Some monadic image operations 113

[Corke, Robotics – Vision


and Control]
5. Image processing

thresholding histogram normalized

Gramma correction brightness increase posterization

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


diadic image operations 114

Chroma-keying:
5. Image processing

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Smoothing kernels 115
5. Image processing

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Edge detection 116

Iu = Ku * I Iv = Kv * I
5. Image processing

Maginitude of gradient: Direction of gradient


m = Iu 2 + Iv 2  = a tan 2 ( I u , I v )

 0.125 0 −0.125   0.125 0.25 −0.125 


   
=  0.25 0 −0.25  K S , xT = 0 0 0  = KS , y
Sobel: KS ,x
 0.125 0.25 −0.125 
 0.125 0 −0.125   

1 0 −1 1 1 1
Prewitt:   
= 0 0 0 

K P,x = 1 0 −1 K P, y
 −1 −1 −1
1 0 −1  

1 0   0 1
Roberts: K R, x =  K R, y =  
 0 −1   −1 0 
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Edge detection with smoothing 117

Derivate of
I u = K * G ( ) * I
Gaussian:
5. Image processing

DoG (Derivative of gaussian)


u ²+v ²
u −
DoGu ( u , v ) = − e 2 ²
2 4

Additional information for edge detection with matlab on:


https://de.mathworks.com/help/images/ref/edge.html#d117e60716

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Similarity functions for template matching 118

SAD (sum of absolute differences):


s =  I1 ( u, v ) − I 2 ( u, v )
5. Image processing

ZSAD (zero-offset SAD):


( ) (
s =  I1 ( u, v ) − I 1 − I 2 ( u, v ) − I 2 )
SSD (squared differences): (
s =  I1 ( u, v ) − I 2 ( u, v )
2
)
(( ) (
s =  I1 ( u, v ) − I 1 − I 2 ( u, v ) − I ))
2
ZSSD (zero-offset SSD):

NCC (normalized cross-correlation): s=


 I ( u, v ) I ( u, v )
1 2

 I ( u, v )  I ( u, v )
2 2
1 2

ZNCC (zero-offset NCC):


s=
 ( I ( u, v ) − I ) ( I ( u, v ) − I )
1 1 2 2

 ( I ( u, v ) − I )  ( I ( u, v ) − I )
2 2
1 1 1 1

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Important Morphological operations 119

Morphological operation Matlab function Realization


Erosion imerode O=IӨS
5. Image processing

f(·)=min(·)
Dilatation imdilate O=IꚚS
f(·)=max(·)
Open imopen O = I ○ S = (I Ө S) Ꚛ S
Erosion then dilatation
Close imclose O = I ● S = (I Ꚛ S) Ө S
Dilatation then erosion

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Usage of Morphological operations 120

Example Skeleton operation with bwskel:


5. Image processing

original binary image skeleton detection

https://de.mathworks.com/help/images/ref/bwskel.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 6 –
Image feature extraction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 123


Structure of vision sensing 124
6. Image feature extraction

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Image segmentation 125
6. Image feature extraction

classification

representation

features

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Binary classification via grey level 126

0, if I u , v   t
C u , v  = 
6. Image feature extraction

1, if I u , v   t
t..threshold, C..Class, I…intensity

Local threshold by niblack:

t u , v  =  (W ) − k (W )

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Moments of an image 127

The Moment m is:


6. Image feature extraction

mpq =  u v I u , v 
p q

( u ,v )I
where p,q are order of moment
0. moment:
m00 =  I u, v 
( u ,v )I

Center of mass:
m10 m01
uc = vc =
m00 m00
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Central Moments of an image 128

 pq =  ( u − uc ) ( v − vc ) I u, v
p q
6. Image feature extraction

( u ,v )I

→independent from translation


Moments of inertia:
m10 2 m012
20 = m20 − 02 = m02 −
m00 m00

Symmetric matrix:
 20 11 
J =
 11 02 
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Central Moments of an image 129

Sides of ellipse: 2 1
a=2 b=2
6. Image feature extraction

m00 m00
λ..eigenvalue of J
Aspect ration: a
r=
b
Angle of orientation:
x22
 = tan −1

x21
x2… last column of eigenvector
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Other Moments 130

ij
normalized central moments: ij =  i+ j 
1+ 
  2 
6. Image feature extraction

00

Hu-moments:
H1 =  20 + 02 H 2 = (20 −02 ) + ( 211 )
2 2

H3 = (30 − 312 ) + ( 321 −03 ) H 4 = (30 +12 ) + (21 +03 )


2 2 2 2

H5 = (30 − 312 )(30 + 12 ) (30 + 12 ) − 3 (21 + 03 )  + ( 321 −03 )(21 + 03 ) 3 (30 + 12 ) − (21 + 03 ) 
2 2 2 2
   

H 6 = (20 −02 ) (30 + 12 ) − (21 + 03 )  + ( 411 )(30 +12 )(21 +03 )
2 2
 
H 7 = ( 321 −03 )(30 −12 ) (30 + 12 ) − 3 (21 + 03 )  − (30 − 312 )(21 + 03 ) 3 (30 + 12 ) − (21 + 03 ) 
2 2 2 2
   

Ming-Kuei Hu, "Visual Pattern Recognition by Moment Invariants",


doi:10.1109/TIT.1962.1057692
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Shape from Perimeter 131
6. Image feature extraction

Chain code Freeman chain Crack code

p=14 p=12.2 p=18

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Shape from circularity 132

Circularity:
6. Image feature extraction

4 m00
= 2
p

p…perimeter length
m00 …0.order moment (area for binary images)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Detecting lines 133


v = −u arctan ( ) +
sin ( )
6. Image feature extraction

 max = −  min = max (W , H )    −  max ,  min )   


  − , 
 2 2

θ η u
η θ
ρ

η
θ

v
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Detecting points 134
6. Image feature extraction

interest point

interest point
any point on line (corner point)

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Moravec‘s corner detection 135

 ( I u +  + i , v +  v + j  − I u + i , v + j  )
6. Image feature extraction

s ( u , v,  u ,  v ) =
2
u
( i , j )W

C ( u, v ) = min s ( u, v, u ,  v )
u ,v

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Harris corner detection 136

s ( u , v,  u ,  v ) =  W ( i , j ) ( I  u +  u + i , v +  v + j  − I u + i , v + j  )
2

( i , j )W
6. Image feature extraction

with
I  u +  u + i , v +  v + j   I  u + i , v + j  + I u  u + i , v + j   u + I v u + i , v + j   v

results
s ( u , v,  u ,  v ) =  W ( i, j ) ( I u u + i, v + j   u + I v u + i , v + j   v )
2

( i , j )W

s ( u, v,  u ,  v ) =  u2  W ( i, j ) I u 2 u + i, v + j  +  v2  W ( i, j ) I v 2 u + i, v + j  +  u  v  W (i, j ) I u + i, v + j I u + i, v + j 
u v
( i , j )W ( i , j )W ( i , j )W

 u 
s ( u , v,  u ,  v ) = (  u v ) A 
 v 
  W ( i, j ) I u 2 u + i, v + j   W ( i, j ) I u u + i, v + j I v u + i , v + j  
 ( i , j )W ( i , j )W 
A= 
  W ( i, j ) I u u + i, v + j I v u + i, v + j   W ( i , j ) I v 2 u + i , v + j  
 (i , j )W ( i , j )W 
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Harris corner detection (2) 137

can convert to
6. Image feature extraction

 G ( I  I u2 ) G ( I  I u I v ) 
A= 
 G ( I  I u I v ) G ( I  I v2 ) 
 

CH ( u , v ) = det ( A ) − k tr ( A )
with
 n

det ( A) = 12 =   sgn (  )  ai ,  (i ) 
 i =1 

tr ( A ) = 1 + 2 =  ( a jj )
n

j =1

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


SIFT- Scale-invariant feature transform 138

Gaussian sequence
6. Image feature extraction

G(σ) G(σ) G(σ)

- - -

Laplacian of Gaussian (LoG) sequence

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


SIFT- Scale-invariant feature transform (2) 139
6. Image feature extraction

844x1087 422x544 211x272 106x136

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Point features by matlab 140
6. Image feature extraction

https://de.mathworks.com/help/vision/object-detection-using-features.html?s_tid=CRUX_lftnav

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Chapter 7 –
Multi Vision and Vision-
Based Control

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel 141


Structure of vision sensing 142
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Geometry of stereo vision 143

P = (X, Y, Z)
7. Multi Vision and VBC

z
x
P1‘ = (X1‘, Y1‘ ,Z1‘)

P2‘ = (X2‘, Y2‘ ,Z2‘)


H
xC

zC {C1}
y W xC
yC
{C2}
yC
SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel
Corresponding Points 144
7. Multi Vision and VBC

Detect distinctive points


Simplification of problem

Describe points
Descriptor vector
Find similar points

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Epipolar geometry 145

T
P2 ' F P1 ' = 0
7. Multi Vision and VBC

F K 2 −T t  X R K1−1

l1 F T P2 '
l2 F P1 '

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Epipolar geometry – two cameras parallel 146
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Epipolar geometry – two cameras in series 147
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Planar homography 148
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Sparse stereo 149
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Sparse stereo 150
7. Multi Vision and VBC

https://www.uio.no/studier/emner/matnat/its/nedlagte-emner/UNIK4690/v16/forelesninger/lecture_6_3_stereo_processing.pdf

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Dense stereo 151
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Dense stereo 152
7. Multi Vision and VBC

https://www.uio.no/studier/emner/matnat/its/nedlagte-emner/UNIK4690/v16/forelesninger/lecture_6_3_stereo_processing.pdf

bx bx
Z= f X = xL
bx
Y = yL
d d d

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Bundle Adjustment 153
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Structured light 155

[Corke, Robotics – Vision


and Control]
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Mosaicing 156

https://de.mathworks.com/matlabcentral/fileexchange/46148-image-mosaicing
7. Multi Vision and VBC

http://leblogdex.overblog.com/image-mosaicing

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Visual odometry (VO) 158
7. Multi Vision and VBC

Camera motion

Video (Sequence of images)

https://de.mathworks.com/help/vision/ug/monocular-visual-odometry.html

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Visual servoing 159
7. Multi Vision and VBC

Eye in hand Eye to hand

„Vision Based Attitude Control“ , Maroš Hladký, Luleå University of Technology

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Position-Based Visual Servoing 160
7. Multi Vision and VBC

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Position-Based Visual Servoing 162
7. Multi Vision and VBC

[Corke, Robotics – Vision and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Image-Based Visual Servoing 163

Observing camera motion Controlling feature motion


7. Multi Vision and VBC

P = J P ( P, K , C )
P = J P ( P ', Z ) ( ) 
+
 J P , Z
 P 1 1
 =   
 ( P '* − P')
 vx 
 fˆ
−
u   Z
0
u uv
Z fˆ
−


u 2

fˆ +  v   
fˆ 
  vy 
  vz 
 (
 J P , Z
 P n n ) 


 =  w 
v   fˆ v ˆ v 2  x
−u   
uv
 0 − Z Z f + fˆ −

   wy 
w 
 z

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Image-Based Visual Servoing 164
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Depth estimation 165

Z=3 (right depth)


7. Multi Vision and VBC

Z=1 (too low depth)

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Depth estimation 166

Z=3 (right depth)


7. Multi Vision and VBC

Z=10 (too big depth)

[Corke, Robotics – Vision


and Control]

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Holonomic mobile robot 167

 fˆ 
− 0 v   vx 
P =  Z   vy 
7. Multi Vision and VBC

 fˆ   
 0 − −u   wz 
 Z 

https://www.servomagazine.com/magazine/article/a-look-at-holonomic-
locomotion

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel


Structure of vision sensing 168
7. Multi Vision and VBC

SS 2021 Robotic Vision – Prof. Dr.-Ing. Maria Schweigel

You might also like