computational methods for on-line shape inspection/optipro_web.pdf · optipro computational methods...

Post on 13-Jul-2020

7 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

OPTIPRO

Computational Methods forOn-Line Shape Inspection

September 18, 2009

Per Bergström

Department of Mathematics,Luleå University of Technology

OPTIPRO

Project Management

Svensk Verktygsteknik (Swedish tool & die technology)

OPTIPRO

Licentiate Thesis in Scientific Computing

Computational Methods forOn-Line Shape Inspection

ISSN: 1402-1757ISBN 978-91-86233-09-9

http://pure.ltu.se/ws/fbspretrieve/2505373

OPTIPRO

Abstract

Computer vision problem

Industrial production line

Aimed for on-line shape inspection

OPTIPRO

1

Introduction

Measurement of the shape of the surface

Transformation of the measured surface

Fitting the surface of the CAD object

Comparison with the CAD object

Measured surface is inspected

– Typeset by FoilTEX – 1

OPTIPRO

2

The Shape Measurement Method

Projected fringes

Optical non-touching measurement method

One projector, two cameras

– Typeset by FoilTEX – 2

OPTIPRO

3

The Shape Measurement Method

– Typeset by FoilTEX – 3

OPTIPRO

4

The Shape Measurement Method

The measurement results in a huge number of data pointsrepresenting the measured surface.

Notation of data points: P = pkk=0,...,NP−1, NP ∼ 105

The background will be measured

Troubles around sharp edges

– Typeset by FoilTEX – 4

OPTIPRO

5

About Surfaces in CAD

Example of NURBS surface with bidirectional control net.

– Typeset by FoilTEX – 5

OPTIPRO

6

About Surfaces in CAD

Trimmed NURBS Surfaces

Concept of trimming

Arbitrarily shaped domainDomain is a connected spaceBounded by an outer curve and possible inner curve(s)

– Typeset by FoilTEX – 6

OPTIPRO

7

Transformation of the Measured Surface

CAD surface: model points, set of points X

measured surface: data points, set of pointsP = pkk=0,...,NP−1

– Typeset by FoilTEX – 7

OPTIPRO

8

Transformation of the Measured Surface

Rotation matrix R ∈ Ω,

Ω = R ∈ R3×3|RTR = I3,det (R) = +1

Translation vector T ∈ R3×1

– Typeset by FoilTEX – 8

OPTIPRO

9

Transformation of the Measured Surface

Surface matching problem

minR∈Ω,T

NP−1∑k=0

(d(Rpk + T, X)

)2(1)

where d(p, X) = minx∈X‖x− p‖2

– Typeset by FoilTEX – 9

OPTIPRO

10

Transformation of the Measured Surface

Problem (1) is solved using the ICP algorithm

ICP (iterative closest point) algorithm

Require: X,PR = I3, T = 0repeat

yk = C(Rpk + T, X), k = 0, . . . , NP − 1

[R,T] = arg minR∈Ω,T

NP−1∑k=0‖Rpk + T− yk‖2

2

until convergencereturn R , T

– Typeset by FoilTEX – 10

OPTIPRO

11

Examples of Shape Inspection

p point on measured surface

p = Rp + T

p corresponding point on CAD object

x point on CAD object

x = R−1(x−T)

x corresponding point on measured surface

– Typeset by FoilTEX – 11

OPTIPRO

12

Examples of Shape Inspection

Distance Measurement

Distance between two fix-points

– Typeset by FoilTEX – 12

OPTIPRO

13

Examples of Shape Inspection

– Typeset by FoilTEX – 13

OPTIPRO

14

Examples of Shape Inspection

x1 and x2 points on CAD object

Measured distance d between the points

d =∥∥R−1

2 (x2 −T2)−R−11 (x1 −T1)

∥∥2

– Typeset by FoilTEX – 14

OPTIPRO

15

Using Best Fit: Finding Corners

Computer vision problem

The computer does not understand the shape

A minimization problem must be solved

– Typeset by FoilTEX – 15

OPTIPRO

16

Using Best Fit: Finding Corners

– Typeset by FoilTEX – 16

OPTIPRO

17

Using Best Fit: Finding Corners

– Typeset by FoilTEX – 17

OPTIPRO

18

Using Best Fit: Finding Corners

– Typeset by FoilTEX – 18

OPTIPRO

19

Brief Introduction of Robust Estimation

Decrease influence of strogly deviating data points

Apply methods from robust statistics tothe surface fitting problem

– Typeset by FoilTEX – 19

OPTIPRO

20

Brief Introduction of Robust Estimation

x

y

Example of linear regression by minimizing a sum ofsquared residuals.

– Typeset by FoilTEX – 20

OPTIPRO

21

Brief Introduction of Robust Estimation

−15 −10 −5 0 5 10 150

5

10

15

20

25

30

r

ρ

HuberTukeys Biweight

Huber (k > 0) Tukey’s Bi-weight (k > 0)

ρ(r) =

r2/2, |r| ≤ kk|r| − k2/2, |r| > k

ρ(r) =

(k2/6)[1− 1− (r/k)23], |r| ≤ kk2/6, |r| > k

Two examples of ρ-functions. Huber is convex,while Biweight is not.

– Typeset by FoilTEX – 21

OPTIPRO

22

Brief Introduction of Robust Estimation

x

y

Regression examples: Linear robust regression using theHuber ρ-function, solid line.

Linear least squares regression, dotted line.

– Typeset by FoilTEX – 22

OPTIPRO

23

Robust Problem Formulation

Instead of solving

minR∈Ω,T

NP−1∑k=0

(d(Rpk + T, X)

)2

the problem

minR∈Ω,T

NP−1∑k=0

ρ(d(Rpk + T, X)/σ

)(2)

is solved

– Typeset by FoilTEX – 23

OPTIPRO

24

IRLS

IRLS (iteratively re-weighted least squares) method

weight function

w(r) =

ddrρ(r)r

if r 6= 0

d2

dr2ρ(r) if r = 0

– Typeset by FoilTEX – 24

OPTIPRO

25

The ICP Algorithm with IRLS

Require: X,P,Rinit,Tinit

R = Rinit, T = Tinit

repeatpi = Rpi + T, i = 0, . . . , NP − 1yi = C(pi, X), i = 0, . . . , NP − 1ri = ‖pi − yi‖2 /σ, i = 0, . . . , NP − 1

[R,T] = arg minR∈Ω,T

NP−1∑i=0

wi(ri) ‖Rqi + T− yi‖22

until convergencereturn R , T

– Typeset by FoilTEX – 25

OPTIPRO

26

Robust Estimators

−15 −10 −5 0 5 10 150

5

10

15

20

25

30

r

ρ

Least−SquareHuberFairTukeys BiweightHampel

– Typeset by FoilTEX – 26

OPTIPRO

27

Robust Estimators

−15 −10 −5 0 5 10 150

0.2

0.4

0.6

0.8

1

r

w

Least−SquareHuberFairTukeys BiweightHampel

– Typeset by FoilTEX – 27

OPTIPRO

28

End of Presentation

Questions?

– Typeset by FoilTEX – 28

top related