| The light-pen measurement system is a device based on machine vision technology.The feature points on the light-pen body are used as direct monitoring targets,and a computer performs correlation calculations to obtain the spatial coordinates of the measured points.The technology of light-pen measurement system in foreign countries is mature,and a variety of marketed products have been applied in the industrial field,while domestic ones are still in the laboratory research stage and have a wide gap with foreign marketed products.Aiming at the problems of simple structure,large volume,few functions,and difficulty in meeting industrial measurement of domestic light-pens,an embedded light-pen is designed in this thesis,which realizes the registration of CAD models for the parts under measurement.The main work of this thesis is as follows:(1)An embedded light-pen is designed for the light-pen measurement system.The Raspberry 4B is used as the main control,and the internal hardware consists of lightemitting diodes,lithium batteries,touch screens,etc.,and communicates with the computer via Wi-Fi.Using 3D software to design and process the shell structure of the light-pen,the panel size is only 140×96 mm.Compared with domestic light-pens,it has the characteristics of complete hardware,handheld wireless design,and small size.(2)Due to the differences in CAD model design sizes,models may be too large to be displayed in full or too small to have obvious features during rendering.To address these problems,this thesis proposes a model self-adaptive display algorithm.The algorithm achieves the optimal display objective of maximizing the model display circle within the window by adjusting the projection angle.Unlike conventional per-image maximization algorithms,this algorithm only maximizes the largest pose image and preserves the viewpoints of the other pose images on the same sphere.Experiments with four models show that the algorithm can adapt to models of different size.(3)Aiming at the problem that registration needs to store a large number of pose graphics offline and occupy a large amount of storage space,a storage space optimization algorithm is proposed.The algorithm performs threshold segmentation,labeling connected domains,and cropping external rectangle on the pose graphic to remove redundant background and greatly reduce storage space,which is further reduced by the lossless compression format storage.The experiments tested four models with different numbers of pose image libraries,with a storage space compression rate of 94.9% at the lowest,99.28% at the highest,and 97.57% on average.It is shown that the proposed algorithm can greatly reduce the storage space of the pose image library.Finally,upper and lower bounds on the compression rate are investigated.Experiments show that the algorithm achieves the lowest compression rate of 89.73% for spheres and the highest compression rate of 99.86% for cylinders.(4)A cascade method of rough matching and precise matching is designed for part registration,which reduces the amount of matching calculation and improves the calculation efficiency.Rough matching screens out a large number of graphics according to the aspect ratio characteristics of the pose graphics.Precise matching uses the LINEMOD algorithm to match the part image with all the graphics obtained by rough matching.The registration experiments were performed on the two models from 10 different viewing angles under the light pen measurement system.The results show that the registration method in this thesis has a certain error tolerance rate for small shadows and displacements,and can correctly match images.The average registration time is approximately 1.2s,which can meet the real-time requirements of light-pen online measurement. |