Automatic Measurement of 3-Dimensional Coordinate Measuring Machine by Means of CAD and Image Data

Automatic Measurement of 3-Dimensional Coordinate Measuring Machine by Means of CAD and Image Data

Automatic Measurement of 3-Dimensional Coordinate Measuring Machine by Means of CAD and Image Data Yoshimi Takeuchi, Hiroyuki Shimizu, lkuo Mukai; The...

787KB Sizes 0 Downloads 1 Views

Automatic Measurement of 3-Dimensional Coordinate Measuring Machine by Means of CAD and Image Data Yoshimi Takeuchi, Hiroyuki Shimizu, lkuo Mukai; The University of Electro-Communications Submitted by Toshio Sata Received on January 15,19 SUMMARY : The study deals w i t h the method o f the automatic measurement o f workpiece dimensions being a r b i t r a r i l y s e t on the t a b l e o f a 3D-CH. The measuring path i s i n advance generated on the basis o f a personal CAD/CAM system employlng the s o l l d modeling technique. To know the p s i l i o n and a t t i t u d e o f a workpiece. the image data taken by an I T V camera are compared Based on the information, the measuring path i s altered, w i t h CAD data, t h a t makes i t possible t o actua:ly measure the workpiece. The method i s experimentally found t o be v a l i d . KEY WORDS : Automatic measurement, 3D-CM.

CAD/CAM.

image data, matching.

measuring path

1.

Introduction

I n recent years, 3-demensional coordinate measuring machines ( 3D-CMM ) increasingly p l a y more important r o l e s than before as measuring s t a t i o n s f o r precise and complicated workpiece shapes. The automatic operation o f CNC 3D-CM has been c a r r i e d o u t by on-llne teaching-playback methods. However, the time necessary t o teach measuring path t o the workpiece on the t a b l e o f 3D-CM increases w i t h increasing workpieces o f complicated shape. Thus, the o f f - l i n e manual teaching method outside o f the t a b l e becomes r e c e n t l y dominant n o t t o hinder the measurement operation. Nevertheless, the automatic preparation o f measuring c m a n d s remain s t i l l unsolved.

compensated based on the information o f the coordinates o f two points, i.e., two holes f o r f i x a t i o n on the t a b l e o f 3D-Cm. The coordinates o f two holes are measured w i t h the machine coordinate system and the image coordinate system respectively. The angle between two lines, obtained by l i n k i n g two p o i n t s respectively, Supposing t h a t the coordinate leads t o the s e t t i n g e r r o r 8 < . values o f the machine coordinate system, PCO(XCO. Yca) and PCI (XCI. Y c l ) , and those o f the image coordinate system, Y I * ) and P I , ( X I , . YII) , the s e t t i n g e r r o r Pie (XI* 8 . i s as follows: 9

* a

To solve the above problem. i t i s desirable t o develop the system t o execute the measuring operation merely by p l a c i n g workpieces on the t a b l e o f 3D-Cm. One o f the authors has reported t h e automatic measurement by use o f the image processing technique f o r recognizing the shape and a t t i t u d e o f workpiece. The method was a v a i l a b l e t o the automatic measurement o f l i m i t e d workpiece shapes due t o the shortage o f image r e s o l u t i o n and much processing time [I]. On the other hand, the method o f the o f f - l i n e measuring path generation has been studied by making use o f CAD systems [2.3.4]. However. the correspondence o f the o f f - l i n e measuring path and the actual workpiece on the t a b l e has not been automatically made. Thus. the operator manually conducts the s e t t i n g o f the coordinate system.

=

t an-'

(

Y

Y

lo/xII-x

(1)

-tan-' ( Y C l - ~ C . / ~ C l - ~ c O ) the image data should be r o t a t e d I9

As a r e s u l t , center point. 3.2

around the

CAD data

CAD data imply CSG data of P-CAPS and a r r a y model 2-map derived from CSG data [5].

a modified s p a t i a l CSG data present

-

ITV CAMERA

The study deals w i t h the automation o f correspondence between the workpiece and the o f f - l l n e generated measuring path, u t i l i z i n g the image o f workpiece taken by an I T V camera. 2.

Structure o f Measuring System

-

The system configuration I s shown i n Flg. 1. The image and the 3 P C M ( Mltutoyo, processing u n i t ( PIAS. LA500 ) FN503 ) are connected w i t h a 16-bit personal computer ( NEC. PC98DlVX ). An ITV camera i s set up over the 3D-CMM t o take the image o f workpieces. The image processing u n l t i s used f o r the i n p u t o f image data and the b i - l e v e l i n g processing. The other processing such as matching o f the CAD data and the image data, measuring path generation and so on i s performed by the personal computer. As a CAD/CAM system. our own s o l i d modelin system, P-CAPS. runnlng on the personal computer. i s u t i l i z e d [54. Measuring c m a n d s f o r 3D-CM generated by the system, are sent t o the 3D-Cm c o n t r o l l e r through GP-IB conmunication l i n e . Then, 3D-Cm begins the measuring operation. Measured data from a touch probe o f 3D-CH are sent back t o the computer by GP-IB c m u n i c a t i o n l i n e , and r e s u l t s i n the evaluation o f dimensions.

P-CAPS/CAT.

G P I B COMPUTER (PC-0801)

3D-CM

FN503 Fig. 1

3. 3.1

MBASUR I NG MACH I NE CONTROLLER

System c o n f i g u r a t i o n o f automatic measurement

Correspondence by Use o f CAD and Image Data Image i n p u t and processing

For correspondence between the workpiece shape defined by P-CAPS system and the actual workpiece t o be measured on the t a b l e o f 3D-CM. i t i s necessary t o know the p o s i t i o n and Thus, the matching o f CAD data and image a t t i t u d e o f workpiece. data i s required. The image data are composed o f bi-leveled 512 x 512 p i x e l s on the basis o f the image taken by the camera however, are conpressed t o 128 x 128 p i x e l s over the workpiece. t o save the amount o f memory. For i n p u t t i n g image data, i t i s desirable f o r the ITV camera t o be s e t i n p a r a l l e l w i t h the coordinate axes o f 3D-CM. Due t o the d i f f i c u l t y o f s e t t i n g i n practice, the image data are

Annals of the CIRP Vol. .ns/r/l/llswo

a designed workpiece shape by performing the s e t operation such as union, d i f f e r e n c e o r i n t e r s e c t i o n f o r shape elements c o n s i s t i n g o f p r i m i t i v e s ( sphere, cone and cube ), r o t a t l o n a l boby. torus and sculptured surface, and preserve the information o f shape generation process such as s t r u c t u r e data, a f f i n e transformation m a t r i x and so on. CSG data are used f o r the determination o f measuring p o i n t s on the workplece surface since the measuring p o i n t s are i n advance appointed f o r each p r i m i t i v e . Z-map i s the modified s p a t i a l array model developed f o r 3a x i s machining. As shown i n Fig. 2. each l a t t i c e p o i n t on the xy plane has a z-coordinate value o f two-byte i n t e g e r standing f o r a h e i g h t o f workpiece surface. The feature o f Z-map model l i e s i n the p o i n t t h a t the employment o f the inverse o f f s e t method

565

enables the r a p i d generation o f o f f s e t surface on Z-map as well as a r e l a t i v e l y small q u a n t i t y o f memory. Z-map i s a l s o used f o r matching w i t h the image data and checking o f probe path and measuring points.

'**#AXIS OF INERTIA b ',

Fig. 3

4. 4.1

Fig. 2

3.3

Rotation o f the a x i s o f i n e r t i a o f CAD data t o match the image data

Measuring Path Generation O f f - l i n e measuring path generation

CSG data o f P-CAPS preserves the shape generation process o f workpiece. By using the information. the system, P-CAPS/CAT, automatically selects the measurement items, and determines measuring p o i n t s every p r i m i t i v e . Accordingly, the study does not deal w i t h the measurement concerning r o t a t i o n a l bogy, torus and sculptured surface.

A modified s p a t i a l array model Z-map

Matching

The actual measuring path i s prepared by matching the CAD data o f workpiece w i t h the image data o f i t and transforming the measuring path previously generated o f f - l i n e by CAD system. The matching process consists o f two operations: one i s t o a d j u s t the p o s i t i o n o f the center o f g r a v i t y o f the compensated image data and the Z-map data, and the other t o r o t a t e the a x i s o f i n e r t i a o f the Z-map data around the center t o be arranged i n the same d i r e c t i o n o f the image data, as shown i n Fig. 3. The Z-map data derived from Z-map are a s e t o f l a t t i c e p o i n t s (X.Y). where Z-coordinate value i s n o t zero.

With regard t o the determination o f measuring points, the measuring p o i n t s o f p r i m i t i v e s are i n advance appointed around them i n the uniform distance so t h a t the measurement e r r o r may be as small as possible. However. some o f measuring p o i n t s may e x i s t i n s i d e the workpiece due t o the s e t operation. Therefore, i t i s necessary t o check whether the appointed measuring p o i n t s are on the outside o f workpiece surface o r not. The i n t e r f e r e n c e check i s c a r r i e d o u t as follows: the l a t t i c e p o i n t Pm(X,Y) t o be measured on Z-map and f o u r neighboring p o i n t s Pu(X.Y-I), Pl(X-l.Y). Pr(Xt1.Y) and Pd(X.Y+l) are a t f i r s t bi-leveled by the threshold value o f the height o f the l a t t i c e point. Then, the p o i n t s are operated by the f o l l o w i n g second-order differential filter:

I n case o f the bi-leveled shape data, the f o l l o w i n g formula reprcsents the mocnent provided t h a t each p i x e l o f the f i g u r e has the u n i t mass:

By use o f the f o l l o w i n g equation. V and M(0,l) and where, M(O.0) means the area o f t h r e figure, the moment f o r y- and x-axis o f the f i g u r e respectively. M(l.0) Therefore, the coordinates o f the center of g r a v i t y i s as follows:

-

-4.Pn t Pu t P1

= 1

(4)

where,

Pr

t

Pd

the measuring p o i n t Pm i s judged t o be:

-

V > 0. V 0,

then then

V < 0. then Accordingly,

By use o f the above r e l a t i o n , the p o s i t i o n o f the center o f g r a v i t y o f the Z-map data i s moved t o t h a t o f the image data. Then, the angle between the y-axis and the a x i s o f i n e r t i a i s calculated f o r the Z-map data and the image data respectively. The angle8. between the y-axis and the axis o f i n e r t i a can be obtained by using the equation (2) as follows:

+

outside the workpiece i n s i d e the workpiece on the workpiece surface

i t i s possible t o measure the p o i n t i f V < 0.

Next, P-CAPS/CAT d e t e r n i n e s the j u n c t i o n p o i n t s f o r measurement. where the probe mode changes from the moving mode t o the measuring mode. The j u n c t i o n p o i n t e x i s t s a t a c e r t a i n distance from the measuring p o i n t i n the d i r e c t i o n normal t o the The normal vector can be e a s i l y obtained by workpiece surface. the e x t e r i o r product o f two vectors by means o f four neighboring points. The movement o f the probe from the j u n c t i o n p o i n t t o the measuring p o i n t enables the probe t o touch the workpice from the d i r e c t i o n perpendicular t o the surface. The j u n c t i o n p o i n t s are a l s o subjected t o the i n t e r f e r e n c e check w i t h the workpiece by comparing the height o f the j u n c t i o n p o i n t w i t h t h a t o f the l a t t i c e p o i n t o f Z-map corresponding t o the j u n c t i o n point. If there i s an interference between the j u n c t i o n p o i n t s and the workpiece, the next candidate f o r measuring p o i n t i s checked again. The measuring path can be generated by connecting the measuring p o i n t s and the j u n c t i o n points, which are determined i n the manner above mentioned. During the movement from a j u n c t i o n p o i n t t o another, the probe i s drawn up t o some extent t o avoid the interference.

The Z-map data are r o t a ?d I the d i f f c r e n c e a ,i angles for matching. The matching process i s performed by r o t a t i n g the angle every x / Z since f o u r d i r e c t i o n s e x i s t as the a x i s o f i n e r t i a . The matching operation i s finished when the c m n area between the image data and the Z-map data has the maximum w i t h regard t o some d i r e c t i o n .

4.2

Actual measuring path generation

The Reasuring p o i n t s and measuring p a t h previously provided by P-CAPS/CAT are transformed t o those a t t h e machine coordinate sysc,m by the t r a n s l a t i o n and r o t a t i o n . The transformation i s conducted by use o f the f o l l o w i n g m a t r i x :

a

b

c

i

P

d

e

f

:

4

g

h

i

i

r

1

A i P

........... TiS

............................ ...... tx

t,

:

tZ

J

(8)

S i

where, A: geometric transformation ( scaling related to each axis, reverse, shearing and rotation ) T: geometric transformation ( translation ) P: perspective transformation S: whole scaling

The data of The measurement procedure is shown in Fig. 4. the actual measuring path transformed to the machine coordinate system are composed of a kind of movement mode and the x. y and z coordinates of the destination, and then are sent to the controller through GP-IB comnunication line.

5.

Measurement Experiments and Results

For experiments. a workpiece shape is prepared. The workpiece has a finished base, on which the primitives such as semi-sphere. cone, cylinder and cube are placed. The change of primitives yields various workpiece shapes. Here. let us explain the experimental result for the workpiece with both a cone and a part combining semi-sphere and cylinder, as shown in Fig. 5. Figure 6 shows the CAD data and the Image data before matching. The shape of the Z-map data as the CAD data is in the left-hand side and the compensated image of the workpiece taken

[Y]

I

tA;500 I

I

MATCH 1NO OENTER OF

MEASURING POINT

GRAVITY

4

MATCH I NG

AXIS OF INERT1A

/

i

I

OHEOK

I

a MEASUREMENT DATA DATA PROCESS 1NO

Fig. 4

Procedure of automatic measurement

by the ITV camera over the 3D-CM in the right-hand slde. The input of the coordinates of two points on the table for the setting error compensation of camera enables the scaling of the Z-map data to be automatically performed. The translation of the center of gravity and the rotation around it achieves the matching as shown in Fig. 7.

Fig. 8

Off-line measuring path and measuring points generated by P-CAPS/CAT

567

The actual measuring c m n d s are sent t o the c o n t r o l l e r of the 30-Cm f o r measurement, whose r e s u l t i s l i s t e d i n Fig. 10.

6.

Conclusions

To r e a l i z e the autanatic measurement o f 3D-Cm, a method i s proposed t h a t the measuring path previously generated by P-CAPS/CAT i s transformed t o the actual one by corresponding t o From some measurement the image data taken by an ITV camera. experiments, the study i s sumnarized i n t h e following:

1) The measuring path f o r workpieces consisting o f p r i m i t i v e s can be generated o f f - l i n e . taking account o f the interference between the probe and the workpiece. 2) The transformation of the o f f - l i n e measuring path t o t h e actual one allows workpieces a r b i t r a r i l y placed on the l a b l e o f 3D-W t o be measured by matching the center o f g r a v i t y and the axis o f i n e r t i a o f the Z-inap data w i t h those o f the image data. 3) The automatic measurement by use of the actual measuring path r e s u l t s i n the p o s s i b i l i t y o f automatic evaluation o f measured data. Fig. 9

Three-side views o f the same f i g u r e as Fig. 8 Acknowledgement

**

**

SPHERE C o o r d i n a t e s X = 244.535 Y = 189.708 C o o r d i n a t e s X = 235.124 Y = 194.247 Coordinates X = 241.468 Y E 180.781 Coordinates X = 253.319 Y = 186.436 Coordinates X = 247.753 Y = 199.528 Center Coordinates X = 244.202 Y = 190.295 R = 5.485 Radius F = 0.020 Sphericity CYLINDER Coordinates X = 229.109 Y = 196.941 C o o r d i n a t e s X = 232.872 Y = 178.295 C o o r d i n a t e s X = 258.297 Y = 181.762 Coordinates X = 250.341 Y = 205.593 C o o r d i n a t e s X = 231.276 Y = 200.542 C o o r d i n a t e s X = 234.367 Y = 177.062 C o o r d i n a t e s X = 258.685 Y = 182.442 C o o r d i n a t e s X = 249.492 Y = 205.908 Cylindricity F = 0.002 ~~

~~~

**

Coordinates Coordinates Coordinates Coordinates Coordinates Coordinates Coordinates Coordinates A x i s Angle Cone A n g l e Roundness

**

**

CONE

**

X = 266.636 Y = 162.200 X = 264.345 Y = 134.043 X = 289.976 Y = 130.481 X = 284.598 Y I 163.364 X = 280.953 Y = 154.645 X = 268.069 Y = 148.948 X = 273.926 Y = 139.100 X = 284.783 Y = 145.024 WX = 8 9 . 2 9 2 WY = 9 0 . 1 9 4 T = 67.031 F = 0.000

Fig. 10

Z = 63.955 Z = 60.647 Z = 60.648 Z = 60.647 Z = 60.648 Z

=

Z Z Z Z Z Z

= = = =

568

References

47.541

Sakamoto. M.. 1988. Automatic Measurement System of 3-dimensional Coordinate Measuring Machine on the Basis of Image Processing, Jour. JSPE. Vo1.54 No. 3 : 542-547 Kawabe, S.. Enomoto, M.. Kimura, F.. Sata. T., 1983. Development o f a Programing System f o r NC Three Coordinate Measuring Machines Based on a Part Model, Jour. JSPE, Vo1.49 N0.12 : 1673-1679 Duffie, N.. Bollinger, J., Piper, R.. Kronenberg. M.. 1984. Directed Inspection and E r r o r Analysis Using Surface Patch Databases. Annals o f the CIRP. Vo1.33/1 : 347-350 ElMaraghy. H.A.. Gu, P.H.. 1987. Expert System for Inspection Planning, Annals o f the CIRP. Vo1.36/1 : 85-89 Takeuchi, Y.. Sakamoto. M.. Abe. Y.. Orita. R., 1989, Development of a Personal CAD/CAM System f o r %old Manufacture Based on S o l i d Modeling Techniques, Annals of the CIRP, VO1.38/1 : 429-432

[l]Takeuchi. Y.. 45.550 45.551 45.550 45.551 = 44.193 = 44.193 Z = 44.193 Z = 44.193

[2]

[31 [41

Z = 48.501 Z = 48.502 Z = 48.501 Z = 48.501 Z = 62.713 Z = 62.713 Z = 62.712 Z = 62.713 WZ = 1 7 9 . 2 3 4

Measurement r e s u l t

The workpiece shape consists merely o f p r i m i t i v e s without the set operation. However, most o f mechanical parts are composed o f the combination o f p r i m i t i v e s . Thus, the automatic generation o f measuring path and measuring points i s attempted for a complex workpiece shape, which i s composed o f a p a r t combining c y l i n d e r and cone and a p a r t combining cone, sphere The generated measuring path i s shown i n Fig. 11. and cylinder. I t i s seen t h a t the automatic measuring path generation can be put i n t o p r a c t i c e f o r such a complicated workpiece shape. I t may be possible t o measure i t a c t u a l l y though i t i s not yet done due t o the d i f f i c u l t y o f preparing such a complicated workpiece.

Fig. 11

The authors would l i k e t o thank Mr. S. Nishiyama f o r h i s earnest c o l l a b o r a t i o n and Mitutoyo Co. f o r the cooperation. The study i s p a r t i a l l y supported by Grant-in-Aid f o r Science Research of the M i n i s t r y of Education ( C63550100 ).

Example of o f f - l i n e measuring path f o r a complicated workpiece shape

[51