CN115683059A - Structured light three-dimensional perpendicular line measuring device and method - Google Patents
Structured light three-dimensional perpendicular line measuring device and method Download PDFInfo
- Publication number
- CN115683059A CN115683059A CN202211374739.XA CN202211374739A CN115683059A CN 115683059 A CN115683059 A CN 115683059A CN 202211374739 A CN202211374739 A CN 202211374739A CN 115683059 A CN115683059 A CN 115683059A
- Authority
- CN
- China
- Prior art keywords
- checkerboard
- camera
- posture
- coordinate system
- vertical line
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域technical field
本发明方法属于计算机视觉领域,尤其涉及一种结构光三维垂线测量装置及方法。The method of the invention belongs to the field of computer vision, and in particular relates to a structured light three-dimensional vertical line measuring device and method.
背景技术Background technique
垂线坐标仪是一种测量大型工程结构水平位移和(垂直位移)的传统仪器,广泛用于大坝、建筑物的水平位移和挠度监测,是确保大坝安全运行的重要仪表设备。为实现垂线仪观测数据实时采集、准确可靠、在线监控和快速反馈的目标,要求采用自动化测量方式。随着传感器技术的发展,采用自动遥测方式替代传统的人工观测模式,已经成为安全监测的一共重要发展方向。The vertical line coordinate instrument is a traditional instrument for measuring the horizontal displacement and (vertical displacement) of large-scale engineering structures. It is widely used in the horizontal displacement and deflection monitoring of dams and buildings. It is an important instrument equipment to ensure the safe operation of dams. In order to achieve the goals of real-time collection, accurate and reliable, on-line monitoring and fast feedback of the observation data of the plumb line instrument, an automatic measurement method is required. With the development of sensor technology, the use of automatic telemetry to replace the traditional manual observation mode has become an important development direction of safety monitoring.
垂线坐标仪根据工作原理可以分为电容式、涡流式、光电式等类型。传统电容式垂线坐标仪可以实现对垂线大量程、高灵敏度、高精度的测量,但当测量环境潮湿多尘时,电容极板间介电常数容易发生缓慢变化,导致测量结果失真。CCD传感器由于体积小、重量轻、集成度高以及功耗低、线性好、动态范围大、寿命长和抗干扰能力强等优点在垂线坐标仪中得到广泛使用,现有自动化垂线坐标仪大多采用基于线阵CCD传感器的位移测量技术。基于CCD的垂线坐标仪的设计方法制了基于线阵CCD的垂线坐标仪用于矿井井壁变形观测。新型光电式垂线坐标仪的研制方法研制了一种大量程无透镜CCD垂线坐标仪。但仍存在只能测量平面两个方向、测量装置重复、量程小、测量精度受平行光源质量影响等问题。在此基础上,基于CCD的三维垂线坐标仪设计方法在水平方向的垂直基准线上固定一个与其垂直的圆盘,作为竖直方向的垂直基准,设计出三维垂线坐标仪。为扩大垂线仪的测量范围,大量程步进式垂线坐标仪的研制方法采用步进式测量原理,由步进电机驱动光电探头实现平面二维位移测量激光发射接收进行位置检测,采用对步进电机的驱动脉冲进行计数,通过丝杠导程来计算运动距离给出位移值。高速高精垂线坐标仪采用类似的思路研制了一种高速高精度垂线坐标仪,该仪器使用光栅尺进行位移测量。基于步进式测量原理的垂线仪由于仪器中包含电机及丝杠机构,结构较复杂,成本较高。Perpendicular coordinate instruments can be divided into capacitive, eddy current, photoelectric and other types according to the working principle. The traditional capacitive vertical line coordinate instrument can realize large-scale, high-sensitivity, and high-precision measurement of the vertical line. However, when the measurement environment is humid and dusty, the dielectric constant between the capacitor plates is prone to slow changes, resulting in distortion of the measurement results. CCD sensors are widely used in vertical coordinate instruments due to the advantages of small size, light weight, high integration, low power consumption, good linearity, large dynamic range, long life and strong anti-interference ability. Most of them adopt displacement measurement technology based on linear array CCD sensor. Design method of vertical coordinate instrument based on CCD A vertical coordinate instrument based on linear array CCD is used for mine shaft wall deformation observation. The development method of a new photoelectric vertical coordinate instrument A large-range lensless CCD vertical coordinate instrument has been developed. However, there are still problems such as only two directions of the plane can be measured, the measurement device is repeated, the measuring range is small, and the measurement accuracy is affected by the quality of the parallel light source. On this basis, a three-dimensional vertical coordinate instrument design method based on CCD fixes a disk perpendicular to it on the vertical reference line in the horizontal direction as the vertical reference in the vertical direction, and designs a three-dimensional vertical coordinate instrument. In order to expand the measurement range of the vertical line instrument, the development method of the large-range stepping vertical line coordinate instrument adopts the stepping measurement principle, and the photoelectric probe is driven by the stepping motor to realize the plane two-dimensional displacement measurement. Laser emission and reception are used for position detection. The driving pulse of the motor is counted, and the displacement value is given by calculating the movement distance through the screw lead. A high-speed and high-precision vertical coordinate instrument has developed a high-speed and high-precision vertical coordinate instrument using a similar idea. The instrument uses a grating ruler for displacement measurement. The vertical line meter based on the principle of step-by-step measurement has a complicated structure and high cost because the instrument includes a motor and a screw mechanism.
发明内容Contents of the invention
针对现有技术的问题,本发明提出了一种结构光三维垂线测量装置及方法,本发明不依赖高精度的平行光源和电机丝杠机构,结构简单,实时性好,对不同环境适应性强。Aiming at the problems of the prior art, the present invention proposes a structured light three-dimensional vertical line measurement device and method. The present invention does not rely on high-precision parallel light sources and motor screw mechanisms. It has simple structure, good real-time performance, and adaptability to different environments. powerful.
本发明装置的技术方案为一种结构光三维垂线测量装置,包括:计算机、CCD相机、线激光发射器、待测量垂线、支架、小球;The technical solution of the device of the present invention is a structured light three-dimensional vertical line measuring device, including: a computer, a CCD camera, a line laser transmitter, a vertical line to be measured, a bracket, and a small ball;
所述CCD相机与所示计算机连接;Described CCD camera is connected with shown computer;
所述线激光发射器放置于所述CCD相机下方,朝向所述待测量垂线,并发射水平方向的激光平面;The line laser emitter is placed below the CCD camera, towards the vertical line to be measured, and emits a horizontal laser plane;
所述小球固定在所述待测量垂线上,所述待测量垂线通过所述支架悬挂于所述CCD相机前方;The bead is fixed on the vertical line to be measured, and the vertical line to be measured is suspended in front of the CCD camera by the bracket;
本发明方法的技术方案为一种结构光三维垂线测量方法,包括以下步骤:The technical solution of the method of the present invention is a structured light three-dimensional perpendicular measurement method, comprising the following steps:
步骤1:计算机通过张正友相机标定法对CCD相机主点、CCD相机焦距、CCD相机畸变参数进行标定,得到标定后相机主点、标定后相机焦距、标定后相机畸变参数;Step 1: The computer calibrates the principal point of the CCD camera, the focal length of the CCD camera, and the distortion parameters of the CCD camera through Zhang Zhengyou’s camera calibration method, and obtains the principal point of the calibrated camera, the focal length of the calibrated camera, and the distortion parameters of the calibrated camera;
步骤2:计算机通过基于棋盘格的线结构光标定方法对激光平面参数进行标定,得到激光平面方程参数;Step 2: The computer calibrates the laser plane parameters through the checkerboard-based line structure cursor calibration method to obtain the laser plane equation parameters;
步骤3:将棋盘格竖直放置在CCD相机前方,计算机通过CCD相机采集第一姿态棋盘格图像,提取棋盘格角点的第一姿态图像坐标和在局部棋盘格世界坐标系下的第一姿态世界坐标,计算局部棋盘格世界坐标系的第一姿态,计算棋盘格角点在相机坐标系下的第一姿态相机坐标,将棋盘格角点在相机坐标系下的第一姿态相机坐标通过最小二乘拟合方法计算得到第一姿态棋盘格平面的法向量;Step 3: Place the checkerboard vertically in front of the CCD camera, the computer captures the first pose checkerboard image through the CCD camera, extracts the first pose image coordinates of the corner points of the checkerboard and the first pose in the local checkerboard world coordinate system World coordinates, calculate the first pose of the local checkerboard world coordinate system, calculate the first pose camera coordinates of the checkerboard corner points in the camera coordinate system, and pass the first pose camera coordinates of the checkerboard corner points in the camera coordinate system through the minimum The square fitting method calculates and obtains the normal vector of the first attitude checkerboard plane;
步骤4:将棋盘格旋转一定角度后,计算机通过CCD相机采集第二姿态棋盘格图像,提取棋盘格角点的第二姿态图像坐标和在局部棋盘格世界坐标系下的第二姿态世界坐标,计算局部棋盘格世界坐标系的第二位姿,计算棋盘格角点在相机坐标系下的第二姿态相机坐标,将棋盘格角点在相机坐标系下的第二姿态相机坐标通过最小二乘拟合方法计算得到第二姿态棋盘格平面的法向量;Step 4: After rotating the checkerboard at a certain angle, the computer collects the second pose checkerboard image through the CCD camera, extracts the second pose image coordinates of the corner points of the checkerboard and the second pose world coordinates in the local checkerboard world coordinate system, Calculate the second pose of the local checkerboard world coordinate system, calculate the second pose camera coordinates of the checkerboard corner points in the camera coordinate system, and pass the second pose camera coordinates of the checkerboard corner points in the camera coordinate system through least squares The fitting method calculates the normal vector of the second attitude checkerboard plane;
步骤5:将第一姿态棋盘格平面的法向量、第二姿态棋盘格平面的法向量进行叉乘得到垂线方向向量标定参数;Step 5: Carry out the cross product of the normal vector of the first posture checkerboard plane and the normal vector of the second posture checkerboard plane to obtain the calibration parameter of the vertical direction vector;
步骤6:计算机控制CCD相机采集全景图像,结合CCD相机畸变参数对全景图像进行畸变矫正得到畸变校正后的图像,提取水平方向的激光平面与垂线相交的光点的图像坐标,提取小球中心点的图像坐标,构建垂线的解析方程以及小球中心点投影成像的光线方程,求解得到垂线在X、Y、Z三个方向上的位移Step 6: The computer controls the CCD camera to collect the panoramic image, and combines the distortion parameters of the CCD camera to correct the distortion of the panoramic image to obtain the distortion-corrected image, extract the image coordinates of the light point where the laser plane in the horizontal direction intersects the vertical line, and extract the center of the ball The image coordinates of the point, construct the analytical equation of the vertical line and the ray equation of the projection imaging of the center point of the ball, and solve the displacement of the vertical line in the three directions of X, Y, and Z
作为优选,步骤3所述提取棋盘格角点的第一姿态图像坐标和在局部棋盘格世界坐标系下的第一姿态世界坐标,具体为:As a preference, step 3 extracts the first posture image coordinates of the checkerboard corner points and the first posture world coordinates under the local checkerboard world coordinate system, specifically:
计算机采用棋盘格角点提取算法对第一姿态棋盘格图像进行处理,提取棋盘格角点的第一姿态图像坐标和在局部棋盘格世界坐标系下的第一姿态世界坐标;The computer adopts the checkerboard corner point extraction algorithm to process the first posture checkerboard image, and extracts the first posture image coordinates of the checkerboard corner points and the first posture world coordinates under the local checkerboard world coordinate system;
作为优选,步骤3所述计算局部棋盘格世界坐标系的第一姿态,具体为:As a preference, the calculation of the first posture of the local checkerboard world coordinate system described in step 3 is specifically:
计算机采用PnP算法,结合棋盘格角点的第一姿态图像坐标和棋盘格角点在局部棋盘格世界坐标系下的第一姿态世界坐标,计算局部棋盘格世界坐标系的第一姿态;The computer adopts the PnP algorithm to calculate the first posture of the local checkerboard world coordinate system in combination with the first pose image coordinates of the checkerboard corner points and the first pose world coordinates of the checkerboard corner points in the local checkerboard world coordinate system;
作为优选,步骤3所述计算棋盘格角点在相机坐标系下的第一姿态相机坐标,具体为:As a preference, the calculation of the first pose camera coordinates of the checkerboard corner points in the camera coordinate system described in step 3 is specifically:
结合标定后相机主点、标定后相机焦距、标定后相机畸变参数、局部棋盘格世界坐标系的第一位姿,通过相机成像模型计算棋盘格角点在相机坐标系下的第一姿态相机坐标;Combining the principal point of the camera after calibration, the focal length of the camera after calibration, the distortion parameters of the camera after calibration, and the first pose of the local checkerboard world coordinate system, the first pose camera coordinates of the checkerboard corner points in the camera coordinate system are calculated through the camera imaging model ;
作为优选,步骤4所述提取棋盘格角点的第二姿态图像坐标和在局部棋盘格世界坐标系下的第二姿态世界坐标,具体如下:As a preference, step 4 extracts the second posture image coordinates of the checkerboard corner points and the second posture world coordinates under the local checkerboard world coordinate system, specifically as follows:
计算机采用棋盘格角点提取算法对第二姿态棋盘格图像进行处理,提取棋盘格角点的第二姿态图像坐标和在局部棋盘格世界坐标系下的第二姿态世界坐标;The computer adopts the checkerboard corner point extraction algorithm to process the second posture checkerboard image, and extracts the second posture image coordinates of the checkerboard corner points and the second posture world coordinates under the local checkerboard world coordinate system;
作为优选,步骤4所述计算局部棋盘格世界坐标系的第二位姿,具体如下:As a preference, the calculation of the second pose of the local checkerboard world coordinate system described in step 4 is as follows:
计算机采用PnP算法,结合棋盘格角点的第二姿态图像坐标和棋盘格角点在局部棋盘格世界坐标系下的第二姿态世界坐标,计算局部棋盘格世界坐标系的第二位姿;The computer adopts the PnP algorithm to calculate the second pose of the local checkerboard world coordinate system in combination with the second pose image coordinates of the checkerboard corner points and the second pose world coordinates of the checkerboard corner points in the local checkerboard world coordinate system;
作为优选,步骤4所述计算棋盘格角点在相机坐标系下的第二姿态相机坐标,具体为:As a preference, the second pose camera coordinates of the checkerboard corner points in the camera coordinate system are calculated in step 4, specifically:
结合标定后相机主点、标定后相机焦距、标定后相机畸变参数、局部棋盘格世界坐标系的第二位姿,通过相机成像模型计算棋盘格角点在相机坐标系下的第二姿态相机坐标;Combining the principal point of the camera after calibration, the focal length of the camera after calibration, the distortion parameters of the camera after calibration, and the second pose of the local checkerboard world coordinate system, calculate the second pose camera coordinates of the checkerboard corner points in the camera coordinate system through the camera imaging model ;
作为优选,步骤6所述取水平方向的激光平面与垂线相交的光点的图像坐标,具体为:As a preference, the image coordinates of the light spot where the laser plane in the horizontal direction intersects the vertical line as described in step 6 are specifically:
对畸变矫正后的图像处理,通过中值滤波、二值化、灰度质心法提取水平方向的激光平面与垂线相交的光点的图像坐标;For image processing after distortion correction, the image coordinates of the light point where the laser plane in the horizontal direction intersects the vertical line are extracted through median filtering, binarization, and gray-scale centroid method;
作为优选,步骤6所述提取小球中心点的图像坐标,具体为:As a preference, the image coordinates of the center point of the small ball extracted in step 6 are specifically:
计算机对畸变矫正后的图像通过形态学滤波、连通域分析截取包含小球的图像块,对包含小球的图像块通过高斯滤波、canny边缘提取、椭圆拟合提取小球中心点的图像坐标;The computer intercepts the image block containing the ball through morphological filtering and connected domain analysis on the image after distortion correction, and extracts the image coordinates of the center point of the ball through Gaussian filtering, canny edge extraction, and ellipse fitting for the image block containing the ball;
作为优选,步骤6所述构建垂线的解析方程,具体为:As preferably, the analytical equation of constructing the vertical line described in step 6 is specifically:
计算机结合激光平面方程参数,通过激光三角测量原理求解光点的坐标,结合垂线方向向量标定参数构建垂线的解析方程;Combining the parameters of the laser plane equation, the computer solves the coordinates of the light point through the principle of laser triangulation, and constructs the analytical equation of the vertical line in combination with the calibration parameters of the vertical line direction vector;
作为优选,步骤6所述构建小球中心点投影成像的光线方程,具体为:As a preference, the ray equation for constructing the projection imaging of the center point of the small ball described in step 6 is specifically:
计算机结合标定后相机主点、标定后相机焦距、标定后相机畸变参数,根据相机成像模型,构建小球中心点投影成像的光线方程;The computer combines the principal point of the camera after calibration, the focal length of the camera after calibration, and the distortion parameters of the camera after calibration, and according to the camera imaging model, constructs the ray equation for projection imaging of the center point of the ball;
作为优选,步骤6所述求解得到垂线在X、Y、Z三个方向上的位移,具体为:As preferably, the solution described in step 6 obtains the displacement of the vertical line in three directions of X, Y, and Z, specifically:
计算机联立垂线的解析方程和小球中心点投影成像的光线方程,求解得到小球中心点坐标,小球中心点坐标的变化量即为垂线在X、Y、Z三个方向上的位移。The computer combines the analytical equation of the vertical line and the ray equation of the projection imaging of the center point of the ball, and solves the coordinates of the center point of the ball. displacement.
本发明的优点在于基于线结构光的激光三角测距原理,采用单一线结构光源,即可以实现垂线的三维位移测量,无需分别在X、Y、Z三个方向配置相同结构的三套光源和传感器,简化结构,提高稳定性;使用高分辨率的相机和镜头,充分利用视场,可以提高测量精度和测量范围。The advantage of the present invention is that it is based on the principle of laser triangulation distance measurement of line structured light, using a single line structured light source, that is, three-dimensional displacement measurement of vertical lines can be realized, and there is no need to configure three sets of light sources with the same structure in the three directions of X, Y, and Z respectively. and sensors, simplify the structure and improve stability; use high-resolution cameras and lenses to make full use of the field of view, which can improve measurement accuracy and measurement range.
附图说明Description of drawings
图1:本发明实施例的装置结构示意图。Figure 1: Schematic diagram of the device structure of the embodiment of the present invention.
图2:本发明实施例的方法流程图。Fig. 2: A flow chart of the method of the embodiment of the present invention.
图3:本发明实施例的三维垂线测量标定垂线方向向量原理图。Fig. 3: Schematic diagram of the three-dimensional vertical measurement calibration vertical direction vector of the embodiment of the present invention.
图4:本发明实施例的三维垂线测量原理图。Fig. 4: Schematic diagram of the three-dimensional vertical line measurement of the embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
具体实施时,本发明技术方案提出的方法可由本领域技术人员采用计算机软件技术实现自动运行流程,实现方法的系统装置例如存储本发明技术方案相应计算机程序的计算机可读存储介质以及包括运行相应计算机程序的计算机设备,也应当在本发明的保护范围内。During specific implementation, the method proposed by the technical solution of the present invention can be implemented by those skilled in the art using computer software technology to realize the automatic operation process. The system device for realizing the method is, for example, a computer-readable storage medium that stores the corresponding computer program of the technical solution of the present invention and includes a computer that runs the corresponding computer program. The computer equipment of the program should also be within the protection scope of the present invention.
图1为本发明实施例的装置结构示意图,本发明实施例装置的技术方案为一种结构光三维垂线测量装置,包括:计算机、CCD相机、线激光发射器、待测量垂线、支架、小球;Fig. 1 is a schematic diagram of the device structure of the embodiment of the present invention. The technical solution of the device of the embodiment of the present invention is a three-dimensional vertical measurement device with structured light, including: a computer, a CCD camera, a line laser transmitter, a vertical line to be measured, a bracket, small ball;
所述CCD相机与所示计算机连接;Described CCD camera is connected with shown computer;
所述线激光发射器放置于所述CCD相机下方,朝向所述待测量垂线,并发射水平方向的激光平面;The line laser emitter is placed below the CCD camera, towards the vertical line to be measured, and emits a horizontal laser plane;
所述小球固定在所述待测量垂线上,所述待测量垂线通过所述支架悬挂于所述CCD相机前方。The small ball is fixed on the vertical line to be measured, and the vertical line to be measured is suspended in front of the CCD camera through the bracket.
所述计算机的选型为:i7-7700 CPU、16GB内存、Windows10操作系统;The selection of the computer is: i7-7700 CPU, 16GB memory, Windows10 operating system;
所述CCD相机的选型为:JAI GO-5000M-PGE;The selection of the CCD camera is: JAI GO-5000M-PGE;
所述线激光发射器的选型为;恒久-100M-16A648-50-GLXS;The selection of the line laser transmitter is: Hengjiu-100M-16A648-50-GLXS;
所述待测量垂线的选型为:白色建筑弦线;The selection of the vertical line to be measured is: white building string;
所述支架的选型为:高50cm的实验室支架;The type selection of the support is: a laboratory support with a height of 50cm;
所述小球的选型为直径5mm的白色塑料空心小球。The selected ball is a white plastic hollow ball with a diameter of 5 mm.
下面结合图2-图4介绍本发明实施例提供的一种结构光三维垂线测量方法,具体如下:A structured light three-dimensional vertical line measurement method provided by an embodiment of the present invention is introduced below in conjunction with FIGS. 2-4 , specifically as follows:
步骤1:计算机通过张正友相机标定法对CCD相机主点、CCD相机焦距、CCD相机畸变参数进行标定,得到标定后相机主点、标定后相机焦距、标定后相机畸变参数;Step 1: The computer calibrates the principal point of the CCD camera, the focal length of the CCD camera, and the distortion parameters of the CCD camera through Zhang Zhengyou’s camera calibration method, and obtains the principal point of the calibrated camera, the focal length of the calibrated camera, and the distortion parameters of the calibrated camera;
步骤2:计算机通过基于棋盘格的线结构光标定方法对激光平面参数进行标定,得到激光平面方程参数;Step 2: The computer calibrates the laser plane parameters through the checkerboard-based line structure cursor calibration method to obtain the laser plane equation parameters;
步骤3:将棋盘格竖直放置在CCD相机前方,计算机通过CCD相机采集第一姿态棋盘格图像,计算机采用棋盘格角点提取算法对第一姿态棋盘格图像进行处理,提取棋盘格角点的第一姿态图像坐标和在局部棋盘格世界坐标系下的第一姿态世界坐标;计算机采用PnP算法,结合棋盘格角点的第一姿态图像坐标和棋盘格角点在局部棋盘格世界坐标系下的第一姿态世界坐标,计算局部棋盘格世界坐标系的第一姿态;结合标定后相机主点、标定后相机焦距、标定后相机畸变参数、局部棋盘格世界坐标系的第一位姿,通过相机成像模型计算棋盘格角点在相机坐标系下的第一姿态相机坐标,将棋盘格角点在相机坐标系下的第一姿态相机坐标通过最小二乘拟合方法计算得到第一姿态棋盘格平面的法向量;Step 3: Place the checkerboard vertically in front of the CCD camera, the computer collects the first posture checkerboard image through the CCD camera, and the computer uses the checkerboard corner extraction algorithm to process the first posture checkerboard image to extract the checkerboard corner points The first pose image coordinates and the first pose world coordinates in the local checkerboard world coordinate system; the computer adopts the PnP algorithm, combining the first pose image coordinates of the checkerboard corner points and the checkerboard corner points in the local checkerboard world coordinate system calculate the first pose of the local checkerboard world coordinate system; combine the calibrated camera principal point, calibrated camera focal length, calibrated camera distortion parameters, and the first pose of the local checkerboard world coordinate system, through The camera imaging model calculates the first pose camera coordinates of the checkerboard corner points in the camera coordinate system, and calculates the first pose checkerboard coordinates of the checkerboard corner points in the camera coordinate system through the least squares fitting method the normal vector of the plane;
步骤4:将棋盘格旋转一定角度后,计算机通过CCD相机采集第二姿态棋盘格图像,计算机采用棋盘格角点提取算法对第二姿态棋盘格图像进行处理,提取棋盘格角点的第二姿态图像坐标和在局部棋盘格世界坐标系下的第二姿态世界坐标;计算机采用PnP算法,结合棋盘格角点的第二姿态图像坐标和棋盘格角点在局部棋盘格世界坐标系下的第二姿态世界坐标,计算局部棋盘格世界坐标系的第二位姿;结合标定后相机主点、标定后相机焦距、标定后相机畸变参数、局部棋盘格世界坐标系的第二位姿,通过相机成像模型计算棋盘格角点在相机坐标系下的第二姿态相机坐标,将棋盘格角点在相机坐标系下的第二姿态相机坐标通过最小二乘拟合方法计算得到第二姿态棋盘格平面的法向量;Step 4: After rotating the checkerboard at a certain angle, the computer collects the second pose checkerboard image through the CCD camera, and the computer uses the checkerboard corner point extraction algorithm to process the second pose checkerboard image to extract the second pose of the checkerboard corner points The image coordinates and the second pose world coordinates in the local checkerboard world coordinate system; the computer uses the PnP algorithm to combine the second pose image coordinates of the checkerboard corner points with the second pose coordinates of the checkerboard corner points in the local checkerboard world coordinate system. Attitude world coordinates, calculate the second pose of the local checkerboard world coordinate system; combined with the calibrated camera principal point, calibrated camera focal length, calibrated camera distortion parameters, and the second pose of the local checkerboard world coordinate system, image through the camera The model calculates the second pose camera coordinates of the checkerboard corner points in the camera coordinate system, and calculates the second pose camera coordinates of the checkerboard corner points in the camera coordinate system through the least squares fitting method to obtain the second pose checkerboard plane normal vector;
步骤5:将第一姿态棋盘格平面的法向量、第二姿态棋盘格平面的法向量进行叉乘得到垂线方向向量标定参数;Step 5: Carry out the cross product of the normal vector of the first posture checkerboard plane and the normal vector of the second posture checkerboard plane to obtain the calibration parameter of the vertical direction vector;
步骤6:计算机控制CCD相机采集全景图像,结合CCD相机畸变参数对全景图像进行畸变矫正,得到畸变校正后的图像;对畸变矫正后的图像处理,通过中值滤波、二值化、灰度质心法提取水平方向的激光平面与垂线相交的光点的图像坐标;计算机对畸变矫正后的图像通过形态学滤波、连通域分析截取包含小球的图像块,对包含小球的图像块通过高斯滤波、canny边缘提取、椭圆拟合提取小球中心点的图像坐标;计算机结合激光平面方程参数,通过激光三角测量原理求解光点的坐标,结合垂线方向向量标定参数构建垂线的解析方程;计算机结合标定后相机主点、标定后相机焦距、标定后相机畸变参数,根据相机成像模型,构建小球中心点投影成像的光线方程;计算机联立垂线的解析方程和小球中心点投影成像的光线方程,求解得到小球中心点坐标,小球中心点坐标的变化量即为垂线在X、Y、Z三个方向上的位移。Step 6: The computer controls the CCD camera to collect panoramic images, and performs distortion correction on the panoramic images combined with the distortion parameters of the CCD camera to obtain a distortion-corrected image; for image processing after distortion correction, median filtering, binarization, and grayscale centroid The method extracts the image coordinates of the light spot where the laser plane in the horizontal direction intersects with the vertical line; the computer intercepts the image blocks containing small balls through morphological filtering and connected domain analysis on the image after distortion correction, and passes Gaussian to the image blocks containing small balls. Filtering, canny edge extraction, and ellipse fitting extract the image coordinates of the center point of the ball; the computer combines the parameters of the laser plane equation, solves the coordinates of the light point through the principle of laser triangulation, and constructs the analytical equation of the vertical line in combination with the calibration parameters of the vertical line direction vector; The computer combines the principal point of the camera after calibration, the focal length of the camera after calibration, and the distortion parameters of the camera after calibration, and according to the camera imaging model, constructs the ray equation of the projection imaging of the center point of the ball; the computer combines the analytical equation of the vertical line and the projection imaging of the center point of the ball The ray equation is solved to obtain the coordinates of the center point of the ball, and the change in the coordinates of the center point of the ball is the displacement of the vertical line in the three directions of X, Y, and Z.
本发明实施例的三维垂线测量标定垂线方向向量原理如图3所示,其中O-uv为相机成像面,Oc-XcYcZc为相机坐标系。棋盘格平面α1为第一姿态下的棋盘格平面,棋盘格平面α2为第二姿态下的棋盘格平面。Pc,i,j为棋盘格平面α1上一角点在相机坐标系下的坐标,其中下标c表示该坐标值基于相机坐标系,下标i表示该角点位于棋盘格的第i行,下标j表示该角点位于棋盘格的第j列,根据使用的标定板大小为11×8,下标i的取值范围为1~11,下标j的取值范围为1~8。Pw,i,j为第i行第j列的棋盘格角点在局部棋盘格世界坐标系下的坐标,其中下标w表示该坐标值基于局部棋盘格世界坐标系。pi,j为第i行第j列的棋盘格角点的投影点的图像坐标。n1为棋盘格平面α1的法向量,n2为棋盘格平面α2的法向量,n为垂线方向向量标定参数,其中垂线为平面α1与平面α2的交线,则垂线方向向量可由两平面的法向量叉乘求出,即n=n1×n2。The principle of the three-dimensional vertical line measurement and calibration of the vertical line direction vector in the embodiment of the present invention is shown in Figure 3, where O-uv is the camera imaging plane, and O c -X c Y c Z c is the camera coordinate system. The checkerboard plane α 1 is the checkerboard plane in the first posture, and the checkerboard plane α 2 is the checkerboard plane in the second posture. P c, i, j are the coordinates of a corner point on the checkerboard plane α 1 in the camera coordinate system, where the subscript c indicates that the coordinate value is based on the camera coordinate system, and the subscript i indicates that the corner point is located in the ith row of the checkerboard , the subscript j indicates that the corner point is located in the jth column of the checkerboard. According to the size of the calibration board used is 11×8, the value range of the subscript i is 1~11, and the value range of the subscript j is 1~8 . P w, i, j are the coordinates of the checkerboard corner point in the i-th row and the jth column in the local checkerboard world coordinate system, where the subscript w indicates that the coordinate value is based on the local checkerboard world coordinate system. p i,j is the image coordinates of the projection point of the checkerboard corner point in row i and column j. n 1 is the normal vector of the checkerboard plane α 1 , n 2 is the normal vector of the checkerboard plane α 2 , n is the calibration parameter of the vertical direction vector, where the vertical line is the intersection line of the plane α 1 and the plane α 2 , then the vertical The line direction vector can be calculated by the cross product of the normal vectors of the two planes, namely n=n 1 ×n 2 .
本发明实施例的三维垂线测量原理如图4所示,其中O-uv为相机成像面,Oc-XcYcZc为相机坐标系。Pc为小球中心点,p为其成像的像点。P1为激光平面与垂线相交的光点,p1为其成像的像点。其中小球中心点投影成像的光线Pcp与垂线相交于点Pc,则联立光线Pcp的方程与垂线方程有:The three-dimensional vertical measurement principle of the embodiment of the present invention is shown in Figure 4, where O-uv is the camera imaging plane, and O c -X c Y c Z c is the camera coordinate system. P c is the center point of the ball, and p is its imaging point. P 1 is the point where the laser plane intersects the vertical line, and p 1 is the image point of its imaging. Among them, the ray P c p projected and imaged by the center point of the ball intersects the vertical line at point P c , then the equation of the simultaneous ray P c p and the vertical line equation are:
其中,fx为标定后X方向相机焦距,fy为标定后Y方向相机焦距,u0为标定后相机主点X方向偏移量,v0为标定后相机主点Y方向偏移量,nx为垂线方向向量标定参数n的X方向分量,ny为垂线方向向量标定参数n的Y方向分量,nz为垂线方向向量标定参数n的Z方向分量,xc为Pc在相机坐标系下的X坐标值,yc为Pc在相机坐标系下的Y坐标值,zc为Pc在相机坐标系下的Z坐标值。对上述超定方程组求最小二乘解即得到小球中心点Pc的坐标值xc、yc、zc。Among them, f x is the focal length of the camera in the X direction after calibration, f y is the focal length of the camera in the Y direction after calibration, u 0 is the offset in the X direction of the principal point of the camera after calibration, v 0 is the offset in the Y direction of the principal point of the camera after calibration, n x is the X direction component of the calibration parameter n of the vertical direction vector, n y is the Y direction component of the calibration parameter n of the vertical direction vector, n z is the Z direction component of the calibration parameter n of the vertical direction vector, x c is P c The X coordinate value in the camera coordinate system, y c is the Y coordinate value of P c in the camera coordinate system, and z c is the Z coordinate value of P c in the camera coordinate system. Find the least squares solution to the above overdetermined equations to get the coordinate values x c , y c , z c of the center point P c of the ball.
实验:根据本发明所述方法,基于Windows平台构建基于结构光的三维垂线测量系统(以下简称本系统),在实验室移动平台上进行垂线位移测量实验,使用高精度光栅尺和导轨,控制垂线每次移动5mm,将测量的垂线位移与光栅尺读数对比,计算误差,实验数据如表1、表2所示:Experiment: according to the method of the present invention, a three-dimensional vertical line measurement system (hereinafter referred to as the system) based on structured light is constructed based on the Windows platform, and the vertical line displacement measurement experiment is carried out on the laboratory mobile platform, using a high-precision grating ruler and a guide rail, Control the vertical line to move 5mm each time, compare the measured vertical line displacement with the reading of the grating ruler, and calculate the error. The experimental data are shown in Table 1 and Table 2:
表1:垂线X方向位移测量实验结果表(单位:mm)Table 1: Experimental results of displacement measurement in the vertical X direction (unit: mm)
表2:垂线Y方向位移测量实验结果表(单位:mm)Table 2: Experimental results of displacement measurement in the vertical Y direction (unit: mm)
垂线在Z方向的位移难以精确控制,因此在垂线上悬挂2个小球,用上述方法测量2个小球之间的距离,与用游标卡尺测量的距离对比,实验数据如表3所示:The displacement of the vertical line in the Z direction is difficult to control precisely, so two small balls are suspended on the vertical line, and the distance between the two small balls is measured by the above method. Compared with the distance measured by the vernier caliper, the experimental data are shown in Table 3 :
表3:垂线Z方向位移测量实验结果表(单位:mm)Table 3: Experimental results of displacement measurement in the vertical Z direction (unit: mm)
综上所述,针对现有垂线坐标仪只能测量平面两个方向的位移、测量范围小、仪器结构复杂等问题,本发明基于激光三角测量原理,选择合适的相机与镜头,构建结构光测量系统,同时在垂线上固定小球,实现同时测量垂线在三个方向上的位移,精度高,测量范围大,测量速度快,结构简单,可靠性高。实验结果证实了本发明提出的方法可以同时测量垂线三个方向上的位移,测量精度达到要求。To sum up, in view of the problems that the existing vertical line coordinate instrument can only measure the displacement in two directions of the plane, the measurement range is small, and the instrument structure is complicated, the present invention is based on the principle of laser triangulation, selects a suitable camera and lens, and constructs a structured light The measurement system fixes the small ball on the vertical line at the same time to realize the simultaneous measurement of the displacement of the vertical line in three directions, with high precision, large measurement range, fast measurement speed, simple structure and high reliability. Experimental results prove that the method proposed by the invention can simultaneously measure the displacement in three directions of the vertical line, and the measurement accuracy meets the requirements.
应当理解的是,本说明书未详细阐述的部分均属于现有技术。It should be understood that the parts not described in detail in this specification belong to the prior art.
尽管本文较多地使用了计算机、CCD相机、线激光发射器、待测量垂线、支架、小球等术语,但并不排除使用其他术语的可能性。使用这些术语仅仅是为了更方便的描述本发明的本质,把它们解释成任何一种附加的限制都是与本发明精神相违背的。Although terms such as computer, CCD camera, line laser emitter, vertical line to be measured, bracket, and ball are frequently used in this paper, the possibility of using other terms is not excluded. These terms are only used to describe the essence of the present invention more conveniently, and it is against the spirit of the present invention to interpret them as any additional limitation.
应当理解的是,上述针对较佳实施例的描述较为详细,并不能因此而认为是对本发明专利保护范围的限制,本领域的普通技术人员在本发明的启示下,在不脱离本发明权利要求所保护的范围情况下,还可以做出替换或变形,均落入本发明的保护范围之内,本发明的请求保护范围应以所附权利要求为准。It should be understood that the above-mentioned descriptions for the preferred embodiments are relatively detailed, and should not therefore be considered as limiting the scope of the patent protection of the present invention. Within the scope of protection, replacements or modifications can also be made, all of which fall within the protection scope of the present invention, and the scope of protection of the present invention should be based on the appended claims.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211374739.XA CN115683059B (en) | 2022-11-04 | 2022-11-04 | A structured light three-dimensional vertical line measurement device and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211374739.XA CN115683059B (en) | 2022-11-04 | 2022-11-04 | A structured light three-dimensional vertical line measurement device and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115683059A true CN115683059A (en) | 2023-02-03 |
| CN115683059B CN115683059B (en) | 2025-05-13 |
Family
ID=85047839
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211374739.XA Active CN115683059B (en) | 2022-11-04 | 2022-11-04 | A structured light three-dimensional vertical line measurement device and method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115683059B (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118836767A (en) * | 2024-06-14 | 2024-10-25 | 江苏信息职业技术学院 | Perpendicular coordinate measuring method based on structured light image |
| CN118999405A (en) * | 2024-07-15 | 2024-11-22 | 浙江大学 | Calibration method of 360-degree panoramic three-dimensional scanning measurement device |
| CN120351856A (en) * | 2025-06-24 | 2025-07-22 | 长江水利委员会长江科学院 | Displacement measurement method and device based on binocular vision |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106871799A (en) * | 2017-04-10 | 2017-06-20 | 淮阴工学院 | A kind of full-automatic crops plant height measuring method and device |
| US20180315214A1 (en) * | 2017-04-27 | 2018-11-01 | Sick Ag | Method of calibrating a camera and a laser scanner |
| CN113405528A (en) * | 2021-06-18 | 2021-09-17 | 天津市勘察设计院集团有限公司 | Total station assisted ball machine attitude measurement and leveling method and device |
| CN115046498A (en) * | 2022-08-11 | 2022-09-13 | 中国石油大学(华东) | Calibration method for monocular rotating structure light three-dimensional measurement system |
-
2022
- 2022-11-04 CN CN202211374739.XA patent/CN115683059B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106871799A (en) * | 2017-04-10 | 2017-06-20 | 淮阴工学院 | A kind of full-automatic crops plant height measuring method and device |
| US20180315214A1 (en) * | 2017-04-27 | 2018-11-01 | Sick Ag | Method of calibrating a camera and a laser scanner |
| CN113405528A (en) * | 2021-06-18 | 2021-09-17 | 天津市勘察设计院集团有限公司 | Total station assisted ball machine attitude measurement and leveling method and device |
| CN115046498A (en) * | 2022-08-11 | 2022-09-13 | 中国石油大学(华东) | Calibration method for monocular rotating structure light three-dimensional measurement system |
Non-Patent Citations (1)
| Title |
|---|
| 周良平等: "基于CCD的三维垂线坐标仪设计", 工矿自动化, vol. 40, no. 1, 31 January 2014 (2014-01-31), pages 97 - 100 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118836767A (en) * | 2024-06-14 | 2024-10-25 | 江苏信息职业技术学院 | Perpendicular coordinate measuring method based on structured light image |
| CN118999405A (en) * | 2024-07-15 | 2024-11-22 | 浙江大学 | Calibration method of 360-degree panoramic three-dimensional scanning measurement device |
| CN120351856A (en) * | 2025-06-24 | 2025-07-22 | 长江水利委员会长江科学院 | Displacement measurement method and device based on binocular vision |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115683059B (en) | 2025-05-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115683059B (en) | A structured light three-dimensional vertical line measurement device and method | |
| CN102519400B (en) | Large slenderness ratio shaft part straightness error detection method based on machine vision | |
| RU2431804C2 (en) | Positioning pattern | |
| CN104567690B (en) | A kind of laser beam field calibration method and device | |
| CN111351431B (en) | Correction method of detection system for multi-hole sites on PCB | |
| CN108709499A (en) | A kind of structured light vision sensor and its quick calibrating method | |
| CN110966956A (en) | Binocular vision-based three-dimensional detection device and method | |
| CN111947578A (en) | A structure displacement measurement system and its measurement method | |
| CN103376065B (en) | Class bar code extensometer system and the method measuring Complete stress-strain curve thereof | |
| CN103617611A (en) | Automatic threshold segmentation detection method for center and size of light spot | |
| CN110146017A (en) | Measuring method of repetitive positioning accuracy of industrial robots | |
| CN103528520A (en) | Detection device and method for synchronous operation jacking system based on binocular vision | |
| CN102419198A (en) | A liquid level high-precision real-time laser triangulation measurement method and measurement device | |
| CN101650156B (en) | Device and method for measuring geometric parameter of superplastic non-spherical free bulge | |
| CN104535300B (en) | Large-diameter collimator wavefront and image surface position calibration device and method | |
| CN106767443A (en) | A kind of new automatic secondary element image detector and measuring method | |
| CN111325793A (en) | A spot-based dynamic calibration system and calibration method for pixel size in image measurement | |
| CN111754584A (en) | A system and method for calibrating parameters of a long-distance large field of view camera | |
| CN116202423A (en) | Line laser two-dimensional positioning method based on laser triangulation ranging | |
| CN103712572A (en) | Structural light source-and-camera-combined object contour three-dimensional coordinate measuring device | |
| CN113888651B (en) | Dynamic and static visual detection system | |
| Zexiao et al. | A novel approach for the field calibration of line structured-light sensors | |
| CN117948896A (en) | A piezoelectric nanostepper displacement measurement device based on speckle | |
| CN103697811A (en) | Method of obtaining three-dimensional coordinates of profile of object through combining camera and structural light source | |
| CN106767926B (en) | Calibration method of digital calibration system of demarcation device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |



