Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
(EOD).Software topics.pdf
Скачиваний:
18
Добавлен:
23.08.2013
Размер:
1.55 Mб
Скачать

page 170

14.11 PRACTICE PROBLEMS

1.Consider a circle and an ellipse that might be viewed by a vision system. The circle has a 4” radius, whereas the ellipse has a minor and major radius of 2” and 4”. Compare the two definitions using form factors (compactness and thickness) and show how they differ.

page 171

ans.

circle

 

 

 

circle

 

 

 

 

R = 4

 

 

R1 = 2

R2 = 4

Dmin

= 8

Dmax = 8

Dmin

= 4

Dmax

= 8

A = π R2 = 50.3

A = π

R1R2 = 25.1

 

P = π ( 2R)

= 25.1

P 2π

R12 + R22

=

19.9

 

 

 

 

------------------

 

 

 

 

 

 

2

 

 

 

 

 

 

Compactness values differ

 

 

 

 

 

C =

P2

= 12.5

C =

P2

 

 

 

-----

----- = 15.8

 

 

 

A

 

 

 

A

 

 

 

 

 

 

the min/max values are the same for the circle

 

 

 

Dmin

T

=

Dmin

=

0.16

Tmin

=

Tmax

-----------

= ----------- = 0.16

min

 

A

 

 

 

 

 

 

A

 

 

Dmax

 

 

 

 

 

 

 

Tmax

=

=

0.32

 

 

 

 

-----------

 

 

 

 

 

 

A

 

 

 

2. Describe image resolution in vision systems.

ans. Resolution of a video image describes the number of rows and columns of pixels in a video image. A higher resolution means that there are more rows of pixels in the images, and therefore we can distinguish smaller details.

3. An image has been captured from a video camera, and stored in the matrix below.

64

87

54

64

12

35

22

36

 

 

 

 

 

 

 

 

36

57

76

24

84

26

63

74

 

 

 

 

 

 

 

 

84

187

201

234

195

222

198

25

 

 

 

 

 

 

 

 

54

78

197

198

34

75

218

74

 

 

 

 

 

 

 

 

25

9

84

202

194

213

192

79

 

 

 

 

 

 

 

 

37

25

57

98

93

95

91

89

 

 

 

 

 

 

 

 

page 172

a) Use a threshold of 100 to filter the image.

ANS.

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

0

1

1

1

1

1

1

0

 

 

 

 

 

 

 

 

 

 

0

0

1

1

0

0

1

0

 

 

 

 

 

 

 

 

 

 

0

0

0

1

1

1

1

0

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

b) Perform an edge detection on the thresholded image.

ANS.

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

0

1

1

1

1

1

1

0

 

 

 

 

 

 

 

 

 

 

0

0

1

1

0

0

1

0

 

 

 

 

 

 

 

 

 

 

0

0

0

1

1

1

1

0

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

c) Segment the image into distinct regions.

page 173

ANS.

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

0

1

1

1

1

1

1

0

 

 

 

 

 

 

 

 

 

 

0

0

1

1

2

2

1

0

 

 

 

 

 

 

 

 

 

 

0

0

0

1

1

1

1

0

 

 

 

 

 

 

 

 

 

 

0

0

0

0

0

0

0

0

 

 

 

 

 

 

 

 

 

d) Calculate the compactness and thickness for the region above the threshold.

ANS.

( 22) 2

T =

3

6

-----OR-----

C =

------------

 

13

13

 

13

 

 

 

e) Calculate form factors including perimeter, area, centroid, compactness and minimum and maximum thickness.

4.We have four part shapes (as listed below) that will be arriving on a conveyor.We want to develop a decision tree for the vision system to tell them apart. We also need to find their centroids relative to the top left of the image so that a robot may pick them up.

Isosceles triangle 6” per side Rectangle 2” by 8”

Triangle with side lengths 8”, 5” and 4” Circle 5” Radius

page 174

ans.

First, calculate the form factors

Form

Area

Perimeter

Compact

Tmin

isosceles triangle

15.59

18

20.78

0.3333

rectangle

16

20

25

0.125

odd triangle

8.18

17

35.33

0.25

circle

78.54

31.42

12.57

0.127

A > 40

 

 

 

 

circle

 

A < 40

Tmin < 0.18

 

rectangle

 

 

 

 

 

 

 

 

 

 

Tmin > 0.18

C > 28

 

 

 

 

odd triangle

 

 

 

 

 

 

 

C < 28

 

 

 

 

isosceles triangle

 

 

 

 

Соседние файлы в предмете Электротехника