1 SIEL week 6 Computer Vision •Machine Vision •Technieken voor beeldverwerking

Preview:

Citation preview

1

SIEL week 6

Computer Vision

• Machine Vision• Technieken voor beeldverwerking

2

Enkele beelden

3

Digitaal grijswaardenbeeld

4

Computer Graphics Vision

Output

Input

Image Kenmerken

ImageImage

processingImage

analysis

KenmerkenComputer graphics

Expert system

5

Machine vision Human vision

• Flexibiliteit• Snelheid • 2D-3D• Betrouwbaarheid• Spectrum• Waarnemingen combineren

6

Industrieel inspectie-systeem

7

Onderdelen vision systeem

• Object• Camera • Verlichting• Trigger• Computer hardware• Computer software• Actuator

8

Operaties Vision Systeem

• Triggeren• Opname maken• Frame grabbing• Image preprocessing• Image analysis• Presentatie• Actie

9

Vidicon (verouderd)

10

CCD-sensor

11

Uitlezing CCD

12

CCD geometrie

13

14

Analoge video formats

15

Analog image scanning

16

Composite video signaal

17

Interlacing

18

Beweging met Interlace

19

Digital Area Scan Camera

20

Linescan camera

21

Linescan camera

22

Aliasing (1)

23

(Bijna) geen aliasing

24

Aliasing (2)

25

Optische vergroting

26

Scherptediepte

27

Vervorming door lensfouten

28

Vertekening en vervorming

29

Vertekening en Vervorming

c.

Nonlinear Distortion

b.

Perspective Projection

a.

Calibration Grid

30

Bewegingsonscherpte

Sluitertijd: Lang middel kort

31

Kleur

32

Keuze camera

• Analoog/Digitaal• Monochrome/kleur• Linescan, Matrix scan• Aantal pixels (resolutie)• Interlaced/progressive scan• Frame rate and triggering• Smart camera/ PC-based solution

33

Verlichtingsmethoden

34

Easy Lighting Techniques

Technique Ring-lighting Strobe Backlighting

How it works

Light encircles camera lens

Light rapidly pulses on and off

Great for

Even illumination Reducing blur Silhouetting

Cautions

Can produce circular glare

Must apply gain to avoid dark images

Cylindrical objects diffract light

35

Stralingsbronnen

• Gloeilamp en halogeen• TL-buis• LED (ook infrarood)• Gasontladingsbuis (Kwik, Natrium, Xenon)• (Ultra) geluid (sonar)

36

Spectra lichtbronnen

37

Elimineren van reflecties

38

Spiegelende reflectie

39

Diffuse reflectie

40

Back lighting

41

Silhouetopname met back light

42

Back-lit beeld en data

43

Structured light (a)

44

Structured light (b)

45

Parameters opname

• Resolutie (aantal pixels)• Beeldhoek (Field of View)• Voorwerpsafstand (Working Distance)• Sensor afmetingen (Sensor Size)• Scherptediepte (Depth of Field)

46

Camera instelling

• Scherpstelling (Focussing)

• Diafragma (Iris)

• Sluitertijd (Exposure time)

• Verlichtingssterkte (Lighting)

• Versterking (Gain)

• Gamma

47

Fasen in beeldbewerkingsproces

• Verbeteren (Image enhancement)

• Corrigeren (Image restoration)

• Delen onderscheiden (Image segmentation)

• Beeld-Analyse (Image analysis)

• Voorwerpen herkennen (Classification)

48

Pixel indices

49

Monadische/dyadische operatoren

50

Image & Pixel windows

51

Soorten beeldbewerkingen

• Punt operaties

• Statistics

• Geometrische operaties

• Omgevingsoperaties (neighborhood)

52

Image enhancement

• Region of Interest (ROI)

• Contrastverbetering: Grey-level re-mapping

• Intensiteitsfuncties

• Look Up Table (LUT)

• Drempelen (Thresholding)

53

Grijswaarde-histogrammen

54

Identiteits-operator

55

Inverse operator

56

Stretch-operator

57

Drempelen (Binary Thresholding)

58

Threshold operators

59

Histograms and Thresholds

Threshold

Histogram

Original

60

Particle (blob) analysis

• Threshold

• Particle filter

• Particle analysis (More than 50 parameters available for analysis)– Quantity– Size and location– Area and circularity– ……………………..

Original Threshold function Particle filter

61

Geometrische operaties

100

1

;

1

..

0

0

1

fed

cba

A

y

x

py

x

p

pAppAp

i

i

inout

outininout

62

Geometrische transformaties

63

Interpolatie bij re-sampling

( , )

(1 ).(1 ) ( , )

.(1 ) ( 1, )

(1 ). ( , 1)

. ( 1, 1)

.

.

.

.

f i p j q

p q f i j

p q f i j

p q f i j

p q f i j

64

Morfologische bewerkingen

• Edge detector, hoekdetector, ………

• Erosie

• Expansie (Dilation)

• Opening = eerste erosie, dan expansie

• Closing = eerst expansie, dan erosie

• Skeletonizing, Thinning (geeft ongeveer de symmetrie-as)

• Distance transform (afstand tot rand v.d. blob)

65

Structuurelementen (binair beeld) Erosie

x 1 x

x 1 1

x x x

voorwerp = 1, achtergrond = 0, x = don’t care

011

011

000

110

110

000

000

011

011

000

110

110

001

000

000

110

000

000

000

001

001

000

110

110

66

Hoekdetectie

0 1 x

0 1 1

0 0 0

voorwerp = 1, achtergrond = 0, x = don’t care

011

011

000

110

110

000

000

011

011

000

110

110

000

000

000

000

000

000

000

000

000

000

010

000

67

4-8 connected

68

6-hoekige pixels

69

Omgevings-operaties

Convolutiefilters

– Low-pass filtering (smoothing)

– Highpass filtering (sharpening)

70

3x3 convolutiefilter h(i,j)

3x3 convolution filter

71

Image Smoothing

72

Template matching

73

Template t(i,j) met image I(i,j)

i

j

I

t

74

Verschuif template over image

i

j

I

X

Y

75

Correlatiefunctie

( , ) ( , ) ( , )i j

Corr X Y t i j I X i Y j

( , )

( , )

t i j

I i j

Template:

Image:

76

Genormaliseerde correlatiefunctie

( , ) ( , )

( , ) i j

t I

t i j I X i Y j

nCorr X YN N

( , ) 1

( , ) 0

nCorr X Y

nCorr X Y

(X,Y) is juiste positie

(X,Y) is niet juiste positie of

Lijkt niet op template

77

Template matching

• Goede keuze van ROI belangrijk

• Correlatie op kenmerken veel sneller dan correlatie op

pixelwaarden

• Snellere methoden via frequentiedomein

• Gevorderde methoden voor:• rotatie, • scaling, • perspectief (vragen veel performance)

• Neurale netwerken in opmars (OCR)

78

Fourier-spectrum zaagtand

Tijddomein

Frequentie-domein

79

Plaats x <==> Frequentie u

2.sin( . ) sin .A u x A x

Frequentie 1

f

Aantal golven per meter

Fourier spectrum = amplitude A a.f.v. de frequentie A(u). Voor een golf in de x-richting zetten we u vertikaal uit.

80

Fourierspectra: f(x,y) <==> F(u,v)

y

x x

y

x

y

u

vF

u

vF

u

vF

81

Fourier superpositie

82

Optische muis (1)

83

Optische muis (2)

84

Optische muis (3)

85

Voorbeeld Visionlab

Recommended