CN114963981A - Monocular vision-based cylindrical part butt joint non-contact measurement method - Google Patents
- ️Tue Aug 30 2022
Info
-
Publication number
- CN114963981A CN114963981A CN202210527443.0A CN202210527443A CN114963981A CN 114963981 A CN114963981 A CN 114963981A CN 202210527443 A CN202210527443 A CN 202210527443A CN 114963981 A CN114963981 A CN 114963981A Authority
- CN
- China Prior art keywords
- camera
- image
- coordinate system
- edge
- hole Prior art date
- 2022-05-16 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
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/002—Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
A monocular vision-based cylindrical part butt joint non-contact measurement method is characterized by comprising the following steps: selecting two cameras of the same manufacturer and the same model, and calibrating and registering the cameras; 2. photographing and measuring the end faces of the fixed part and the butt joint part; 3. denoising the shot picture; 4. extracting a processing area where the end face features are located by threshold segmentation, extracting hole edges by an edge detection algorithm, determining the position of a hole center in an image by screening and ellipse fitting, mapping the hole centers and the axes on the two parts to the same coordinate system by coordinate transformation, and calculating the roll angle of the butt joint part relative to the fixed part. The invention has high automation degree and high measuring speed. According to the invention, on the premise that a target is not required to be arranged on the end face of the part and manual participation is not required, automatic measurement is realized, and the working efficiency is improved.
Description
技术领域technical field
本发明涉及智能装配领域,尤其是一种大尺寸筒状零件的对接技术,具体地说是一种基于单目视觉的筒状零件对接非接触式测量方法,在对接零件与固定零件同轴度符合对接要求的情况下,用于实现两者之间相对转角的测量,以实现二者的对接。The invention relates to the field of intelligent assembly, in particular to a docking technology for large-sized cylindrical parts, in particular to a non-contact measurement method for docking cylindrical parts based on monocular vision. In the case of meeting the docking requirements, it is used to measure the relative rotation angle between the two, so as to realize the docking of the two.
背景技术Background technique
随着科学技术不断发展,市场竞争日趋激烈。快速、高效、可靠的生产已经成为了当今所有工业发展的主要方向和特性。为了实现这些目标各行业都面临着提升生产效率、提高产品质量和降低生产成本的问题。在某些大尺寸筒状零件的生产中,高质量自动化对接测量设备尤为重要。快捷精确的测量零件的空间姿态、对中和定位,能够在缩短装配时间、提高对接效率方面扮演重要角色。With the continuous development of science and technology, the market competition is becoming increasingly fierce. Fast, efficient and reliable production has become the main direction and characteristic of all industrial development today. In order to achieve these goals, various industries are faced with the problem of improving production efficiency, improving product quality and reducing production costs. In the production of certain large-sized cylindrical parts, high-quality automated butt measuring equipment is particularly important. Quickly and accurately measure the spatial attitude, alignment and positioning of parts, which can play an important role in shortening assembly time and improving docking efficiency.
现有的姿态测量方式有接触式测量和非接触式测量两大类。非接触式测量主要采用视觉测量与激光扫描测量两种方式。接触式测量主要由三坐标机械机构和检测头组成,并且检测头和被测零件必须接触才可以实现测量。为保证测量精度和防止仪器被撞坏,测量仪器和被测零件接触时必须缓慢接触。另外由于需要检测的零件的空间维度比较多,所以测量的点比较多,导致测量时间比较长,严重影响了生产效率。激光扫描测量,需要对工件的整体外形进行扫描,生成点云,并处理大量的模型数据,测量时间长。而视觉测量技术其测量系统结构简单,便于移动,数据采集快速、便捷,操作方便,测量成本较低,尤其适合于三维空间点位、尺寸或大型工件轮廓的检测。视觉测量又分为单目视觉和双目视觉,相比于双目视觉,单目视觉系统结构简单,不需要对相机的调校,安装和使用更加方便,因此本发明使用单目视觉进行测量。同时,这种非接触测量方法既可以避免对被测对象的损坏又适合被测对象不可接触的情况,如高温、高压、流体、环境危险等场合;同时机器视觉系统可以同时对多个尺寸一起测量,实现了测量工作的快速完成;而对于微小尺寸的测量又是机器视觉系统的长处,它可以利用高倍镜头放大被测对象,使得测量精度达到微米以上。There are two types of attitude measurement methods: contact measurement and non-contact measurement. Non-contact measurement mainly adopts visual measurement and laser scanning measurement. Contact measurement is mainly composed of a three-coordinate mechanical mechanism and a detection head, and the detection head and the measured part must be in contact to achieve measurement. In order to ensure the measurement accuracy and prevent the instrument from being damaged, the measuring instrument and the measured part must be in contact with each other slowly. In addition, due to the large number of spatial dimensions of the parts to be detected, there are many points to be measured, resulting in a long measurement time, which seriously affects the production efficiency. Laser scanning measurement needs to scan the overall shape of the workpiece, generate point clouds, and process a large amount of model data, and the measurement time is long. The visual measurement technology has a simple measurement system structure, easy to move, fast and convenient data acquisition, convenient operation, and low measurement cost. It is especially suitable for the detection of three-dimensional space points, dimensions or large workpiece contours. Visual measurement is further divided into monocular vision and binocular vision. Compared with binocular vision, the monocular vision system has a simple structure, does not need to adjust the camera, and is more convenient to install and use. Therefore, the present invention uses monocular vision for measurement. . At the same time, this non-contact measurement method can avoid damage to the measured object and is suitable for situations where the measured object cannot be touched, such as high temperature, high pressure, fluid, environmental hazards, etc. The measurement realizes the rapid completion of the measurement work; and the measurement of small dimensions is the strength of the machine vision system. It can use a high-magnification lens to magnify the measured object, so that the measurement accuracy can reach above microns.
发明内容SUMMARY OF THE INVENTION
本发明的目的是针对现有的筒状零件测量周期长、需处理数据多易导致装配周期长,影响生产效率的问题,发明一种基于单目视觉的筒状零件对接非接触式测量方法。The purpose of the present invention is to devise a non-contact measurement method for butt joint of cylindrical parts based on monocular vision, aiming at the problems of long measurement period of existing cylindrical parts and many data to be processed, which easily leads to long assembly period and affects production efficiency.
本发明的技术方案是:The technical scheme of the present invention is:
一种基于单目视觉的筒状零件对接非接触式测量方法,其特征是它包括以下步骤:A non-contact measurement method for butt joint of cylindrical parts based on monocular vision, characterized in that it comprises the following steps:
步骤1:选取两台同一生产商同一型号的相机,按照图1所示进行安装,一台相机拍摄固定零件端面,另一台相机拍摄对接零件端面,然后对两台相机进行标定和配准,具体步骤如下:Step 1: Select two cameras of the same manufacturer and the same model, and install them as shown in Figure 1. One camera shoots the end face of the fixed part, and the other camera shoots the end face of the docking part, and then calibrate and register the two cameras. Specific steps are as follows:
步骤1.1:建立世界坐标系、相机坐标系、图像坐标系、像素坐标系,四个坐标系位置关系如图2所示,以相机光轴为Z轴,根据右手定则建立相机坐标系(Xc,Yc,Zc),以照片中心为原点,建立如图2图像坐标系(x,y),以照片左上角第一个元素为原点,建立如图2建立像素坐标系(u,v),以相机标定时拍摄的第一张照片的相机坐标系作为世界坐标系(Xw,Yw,Zw)。Step 1.1: Establish the world coordinate system, camera coordinate system, image coordinate system, and pixel coordinate system. The positional relationship of the four coordinate systems is shown in Figure 2. The camera optical axis is the Z axis, and the camera coordinate system is established according to the right-hand rule (X c , Y c , Z c ), take the center of the photo as the origin, establish the image coordinate system (x, y) as shown in Figure 2, take the first element in the upper left corner of the photo as the origin, establish the pixel coordinate system (u, y) as shown in Figure 2 v), take the camera coordinate system of the first photo taken during camera calibration as the world coordinate system (X w , Y w , Z w ).
步骤1.2:使用标准大小的国际象棋棋盘格作为标定物,对标定物从不同方向拍摄多张照片,将照片输入到MATLAB单目相机标定模型中,获得相机坐标系到世界坐标系的转换矩阵,即相机的外参,相机的畸变模型,以及包括相机焦距、单个像元与图像的宽和高,以及在图像坐标系下的照片中心点坐标的内参,计算出两组相机的数学模型。Step 1.2: Use a standard size chessboard as the calibration object, take multiple photos of the calibration object from different directions, input the photos into the MATLAB monocular camera calibration model, and obtain the transformation matrix from the camera coordinate system to the world coordinate system, That is, the external parameters of the camera, the distortion model of the camera, and the internal parameters including the focal length of the camera, the width and height of a single pixel and the image, and the coordinates of the center point of the photo in the image coordinate system, to calculate the mathematical models of the two groups of cameras.
步骤1.3:将两台相机沿配准架对称放置,根据相机与零件端面的距离,将相机轴心与拍摄端面夹角为45度,将完全对接贴合的零件重新分开,使对接和固定零件端面距离固定架中点的距离相等,对相机进行配准和标定,系统模型结构组成如图1所示。Step 1.3: Place the two cameras symmetrically along the registration frame. According to the distance between the camera and the end face of the part, set the angle between the camera axis and the shooting end face to be 45 degrees, and re-separate the parts that are completely butted to make the butt and fixed parts The distance between the end face and the midpoint of the fixed frame is the same, and the camera is registered and calibrated. The structure of the system model is shown in Figure 1.
步骤2:对固定零件与对接零件的端面进行拍照测量。Step 2: Take photos and measure the end faces of the fixed part and the butted part.
步骤3:结合相关约束条件,对步骤2得到的测量图片进行预处理,具体步骤如下:Step 3: Preprocess the measurement image obtained in Step 2 in combination with the relevant constraints. The specific steps are as follows:
步骤3.1:对测量图片进行重投影,应用步骤1得到相机内参和外参,将对端面倾斜拍照的图片转换为对端面垂直拍照的图片。Step 3.1: Re-project the measurement image, apply step 1 to obtain the camera's internal and external parameters, and convert the image of the obliquely photographed end face into the image of the vertical photograph of the end face.
步骤3.2:对拍照后的图片进行对数变换,将源图像中范围较窄的低灰度值映射到范围较宽的灰度区间,同时将范围较宽的高灰度值区间映射为较窄的灰度区间,从而扩展了暗像素的值,压缩了高灰度的值,对图像中低灰度细节进行增强。Step 3.2: Perform logarithmic transformation on the photographed image, map the narrower range of low grayscale values in the source image to the wider range of grayscale values, and at the same time map the wider range of high grayscale values to the narrower range The grayscale interval of the image expands the value of dark pixels, compresses the value of high grayscale, and enhances the details of low grayscale in the image.
步骤3.3:将照片中一点的值用该点的一个邻域中各点值的中值代替,解决图像中椒盐噪声,以及重投影后存在的没有灰度值的点。Step 3.3: Replace the value of a point in the photo with the median value of each point value in a neighborhood of the point, solve the salt and pepper noise in the image, and the points that have no gray value after reprojection.
步骤4:对上述预处理后的图片进行阈值分割和边缘检测,提取孔心与零件轴心的位置,具体步骤如下:Step 4: Perform threshold segmentation and edge detection on the above preprocessed image, and extract the position of the hole center and the axis of the part. The specific steps are as follows:
步骤4.1:根据端面对接特征设置阈值分割的灰度值为50,通过阈值分割筛选并提取出独立的连通区域,对于所选出的区域,通过圆度和面积特征进一步筛选出孔所在的区域。对该区与分别进行腐蚀和膨胀并将所得的区域求交集,得到孔边缘所在的区域。Step 4.1: Set the gray value of the threshold segmentation to 50 according to the end-face contact feature, and filter and extract independent connected regions through threshold segmentation. For the selected region, further filter out the region where the hole is located by circularity and area features. This area is eroded and dilated respectively and the resulting area is intersected to obtain the area where the hole edge is located.
步骤4.2:将上一步所得到的区域和原图像求交集,将含有孔边缘的图像从原图上选出,进一步缩小图像的运算区域。Step 4.2: Calculate the intersection of the area obtained in the previous step and the original image, select the image containing the edge of the hole from the original image, and further reduce the operation area of the image.
步骤4.3:运用边缘检测算法提取孔边缘,并根据形状进行筛选,对筛选结果椭圆拟合,确定孔中心和零件轴心在图像中的位置,通过相机模型计算得到被测孔心和零件轴心在其对应的相机真实坐标系中的位置。Step 4.3: Use the edge detection algorithm to extract the edge of the hole, and screen according to the shape, fit the ellipse to the screening result, determine the position of the hole center and the axis of the part in the image, and calculate the center of the hole and the axis of the part through the camera model. The position in its corresponding camera real coordinate system.
步骤4.4:将固定零件和对接零件中孔心和轴心映射到同一世界坐标系,计算出需要调整的偏转角。Step 4.4: Map the center of the hole and the axis of the fixed part and the butt-jointed part to the same world coordinate system, and calculate the deflection angle that needs to be adjusted.
本发明的有益效果是:The beneficial effects of the present invention are:
本发明既可以避免对被测对象的损坏又适合被测对象不可接触的情况,如高温、高压、流体、环境危险等场合;同时机器视觉系统可以同时对多个尺寸一起测量,实现了测量工作的快速完成;而对于微小尺寸的测量又是机器视觉系统的长处,它可以利用高倍镜头放大被测对象,使得测量精度达到微米以上。The invention can not only avoid damage to the measured object, but also is suitable for situations where the measured object cannot be contacted, such as high temperature, high pressure, fluid, environmental hazards, etc.; at the same time, the machine vision system can measure multiple dimensions at the same time, realizing the measurement work. The measurement of small size is the strength of the machine vision system. It can use a high-magnification lens to magnify the measured object, so that the measurement accuracy can reach above microns.
本发明为零件姿态的测量提供一种简易化、自动化的测量方法,测量的内容为零件之间的相对转角。本发明自动化程度高,测量速度快。本发明在不需要在零件端面设置标靶,不需要人工参与的前提下,实现了自动测量,提高了工作效率。The invention provides a simplified and automatic measuring method for measuring the posture of the parts, and the content of the measurement is the relative rotation angle between the parts. The invention has high automation degree and fast measurement speed. The invention realizes automatic measurement and improves work efficiency on the premise that no target is set on the end face of the part and no manual participation is required.
附图说明Description of drawings
图1是本发明的系统模型结构组成图。Fig. 1 is a system model structure composition diagram of the present invention.
图2是本发明所采用的四个坐标系位置关系示意图。FIG. 2 is a schematic diagram of the positional relationship of the four coordinate systems used in the present invention.
图3是本发明所采用的非接触式测量装置的结构示意图。FIG. 3 is a schematic structural diagram of the non-contact measuring device used in the present invention.
图4是本发明的非接触测量处理流程图。FIG. 4 is a flow chart of the non-contact measurement process of the present invention.
具体实施方式Detailed ways
为了使本发明的技术方案和实施步骤更加清晰明了,下面结合附图和实施例对本发明做进一步的说明。In order to make the technical solutions and implementation steps of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings and embodiments.
如图1-4所示。As shown in Figure 1-4.
一种基于单目视觉的筒状零件对接非接触式测量方法,用于实现对接零件与固定零件上定位孔与零件轴心的提取,从而实现两个零件之间相对转角测量。A non-contact measurement method for butt joint of cylindrical parts based on monocular vision, which is used to realize the extraction of positioning holes on butt parts and fixed parts and the axis of the parts, so as to realize the relative rotation angle measurement between the two parts.
本发明提供的一种用于零件对接的非接触式测量方法采用如图3所示的测量系统包括非接触式测量装置、通讯模块一、通信模块二以及工控机系统。A non-contact measurement method for parts docking provided by the present invention adopts the measurement system shown in FIG. 3 including a non-contact measurement device, a first communication module, a second communication module and an industrial computer system.
图4是本发明的非接触测量处理流程图,具体包括如下步骤:Fig. 4 is the non-contact measurement processing flow chart of the present invention, and specifically comprises the following steps:
步骤1:选取两台同一生产商同一型号的相机,按照图1所示进行安装,相机A拍摄固定零件端面,相机B拍摄对接零件端面,然后对两台相机进行标定和配准,本发明系统模型结构如图1所示,具体步骤如下:Step 1: Select two cameras of the same manufacturer and the same model, and install them as shown in Figure 1. Camera A shoots the end face of the fixed part, and camera B shoots the end face of the docking part, and then the two cameras are calibrated and registered. The system of the present invention The model structure is shown in Figure 1, and the specific steps are as follows:
步骤1.1:建立世界坐标系、相机坐标系、图像坐标系、像素坐标系,四个坐标系位置关系如图2所示,以相机光轴为Z轴,根据右手定则建立相机坐标系(Xc,Yc,Zc),以照片中心为原点,建立如图2图像坐标系(x,y),以照片左上角第一个元素为原点,建立如图2建立像素坐标系(u,v),以相机标定时拍摄的第一张照片的相机坐标系作为世界坐标系(Xw,Yw,Zw)。Step 1.1: Establish the world coordinate system, camera coordinate system, image coordinate system, and pixel coordinate system. The positional relationship of the four coordinate systems is shown in Figure 2. The camera optical axis is the Z axis, and the camera coordinate system is established according to the right-hand rule (X c , Y c , Z c ), take the center of the photo as the origin, establish the image coordinate system (x, y) as shown in Figure 2, take the first element in the upper left corner of the photo as the origin, establish the pixel coordinate system (u, y) as shown in Figure 2 v), take the camera coordinate system of the first photo taken during camera calibration as the world coordinate system (X w , Y w , Z w ).
步骤1.2:使用标准大小的国际象棋棋盘格作为标定物,对标定物从不同方向拍摄多张照片,将照片输入到MATLAB单目相机标定模型中,获得相机的畸变模型,相机坐标系到世界坐标系的转换矩阵,以及包括相机焦距、单个像元与图像的宽和高,以及在图像坐标系下的照片中心点坐标的内参,计算出两组相机的数学模型。Step 1.2: Use a standard-sized chessboard as the calibration object, take multiple photos of the calibration object from different directions, and input the photos into the MATLAB monocular camera calibration model to obtain the distortion model of the camera, and the camera coordinate system to the world coordinates The transformation matrix of the system, as well as the internal parameters including the camera focal length, the width and height of a single pixel and the image, and the coordinates of the center point of the photo in the image coordinate system, calculate the mathematical models of the two groups of cameras.
步骤1.3:将两台相机沿固定架对称放置,根据相机与零件端面的距离,将相机轴线与拍摄端面夹角为45度,将完全对接贴合的零件重新分开,使对接和固定零件端面距离固定架中点的距离相等,对端面上的定位孔进行拍照,提取固定端面与对接端面孔心坐标对分别为Pak(xk,yk)与Pbk(xk,yk),k=1,2,3……N,获取两组不同的配准点对。将固定零件相机作为基准相机,假设两点集可通过变换矩阵进行配准,即:Step 1.3: Place the two cameras symmetrically along the fixing frame. According to the distance between the camera and the end face of the part, set the angle between the camera axis and the shooting end face to be 45 degrees, and re-separate the parts that are completely butted together to make the distance between the butt and the end face of the fixed part. The distance between the midpoints of the fixed frame is equal, take pictures of the positioning holes on the end face, and extract the coordinate pairs of the fixed end face and the butt end face center as P ak (x k , y k ) and P bk (x k , y k ), k =1,2,3...N, two sets of different registration point pairs are obtained. Taking the fixed part camera as the reference camera, it is assumed that the two point sets can be registered by the transformation matrix, namely:
计算出在物理空间下固定零件与对接零件的世界坐标系之间的转移矩阵
Calculate the transfer matrix between the world coordinate system of the fixed part and the docking part in physical space步骤2:对固定零件与对接零件的端面进行拍照测量。Step 2: Take photos and measure the end faces of the fixed part and the butted part.
步骤3:结合相关约束条件,对步骤2得到的测量图片进行预处理,具体步骤如下:Step 3: Preprocess the measurement image obtained in Step 2 in combination with the relevant constraints. The specific steps are as follows:
步骤3.1:对测量图片进行重投影,应用步骤1得到相机内参和外参,将对端面倾斜拍照的图片转换为对端面垂直拍照的图片。Step 3.1: Re-project the measurement image, apply step 1 to obtain the camera's internal and external parameters, and convert the image of the obliquely photographed end face into the image of the vertical photograph of the end face.
步骤3.2:对拍照后的图片进行对数变换s=clog(1+r),c为常数,将源图像中范围较窄的低灰度值映射到范围较宽的灰度区间,同时将范围较宽的高灰度值区间映射为较窄的灰度区间,从而扩展了暗像素的值,压缩了高灰度的值,对图像中低灰度细节进行增强。Step 3.2: Perform logarithmic transformation s=clog(1+r) on the photographed image, where c is a constant, map the low grayscale value with a narrow range in the source image to a grayscale interval with a wide range, and at the same time convert the range The wider high gray value interval is mapped into a narrow gray interval, thereby expanding the value of dark pixels, compressing the high gray value, and enhancing the low gray details in the image.
步骤3.3:将照片中一点的值用该点的一个邻域中各点值的中值代替,解决图像中椒盐噪声,以及重投影后存在的没有灰度值的点。Step 3.3: Replace the value of a point in the photo with the median value of each point value in a neighborhood of the point, solve the salt and pepper noise in the image, and the points that have no gray value after reprojection.
步骤4:对上述预处理后的图片进行阈值分割和边缘检测,提取孔心与零件轴心的位置,具体步骤如下:Step 4: Perform threshold segmentation and edge detection on the above preprocessed image, and extract the position of the hole center and the axis of the part. The specific steps are as follows:
步骤4.1:设置适用于当前情况下阈值分割的灰度值,通过阈值分割提取出独立的连通区域,对于所选出的区域,通过圆度和面积特征进一步筛选出孔所在的区域。对该区与分别进行腐蚀和膨胀并将所得的区域求交集,得到孔边缘所在的区域。将所得到的区域和原图像求交集,将含有孔边缘的图像从原图上选出,进一步缩小图像的运算区域。Step 4.1: Set the gray value suitable for the threshold segmentation in the current situation, and extract the independent connected area through the threshold segmentation. For the selected area, further filter out the area where the hole is located by the circularity and area features. This area is eroded and dilated respectively and the resulting area is intersected to obtain the area where the hole edge is located. The obtained area and the original image are intersected, and the image containing the edge of the hole is selected from the original image, and the operation area of the image is further reduced.
步骤4.2:对上一步结果进行高斯滤波使图像变得平滑,对于一个位置(m,n)的像素点,其灰度值(这里只考虑二值图)为f(m,n)。那么经过高斯滤波后的灰度值将变为:
计算滤波后的边缘梯度值和梯度方向,边缘就是灰度值变化较大的像素点的集合。在图像中,用梯度来表示灰度值的变化程度和方向,通过以下公式计算梯度值和梯度方向:Step 4.2: Perform Gaussian filtering on the result of the previous step to smooth the image. For a pixel at a position (m, n), its gray value (only the binary image is considered here) is f(m, n). Then the gray value after Gaussian filtering will become: The filtered edge gradient value and gradient direction are calculated, and the edge is a collection of pixels with large changes in gray value. In the image, the gradient is used to represent the change degree and direction of the gray value, and the gradient value and gradient direction are calculated by the following formulas:
在高斯滤波过程中,边缘有可能被放大了。因此,通过设置规则来过滤不是边缘的点,使边缘的宽度尽可能为1个像素点:如果一个像素点属于边缘,那么这个像素点在梯度方向上的梯度值是最大的,否则不是边缘,将灰度值设为0。使用上下阀值来检测边缘,其中大于上阈值的都被检测为边缘,而低于上阈值的都被检测为非边缘。对于中间的像素点,如果与确定为边缘的像素点邻接,则判定为边缘;否则为非边缘。During Gaussian filtering, edges may be amplified. Therefore, by setting rules to filter points that are not edges, make the width of the edge as 1 pixel as possible: if a pixel belongs to an edge, then the gradient value of this pixel in the gradient direction is the largest, otherwise it is not an edge, Set the grayscale value to 0. The upper and lower thresholds are used to detect edges, where anything greater than the upper threshold is detected as an edge, and anything below the upper threshold is detected as a non-edge. For a pixel in the middle, if it is adjacent to a pixel determined to be an edge, it is determined to be an edge; otherwise, it is a non-edge.
步骤4.3:通过形状对结果进行筛选,并利用最小二乘法进行椭圆拟合,确定孔中心和零件轴心在图像中的位置,通过相机模型计算得到被测孔中心和零件轴心在其对应的相机真实坐标系中的位置。Step 4.3: Screen the results by shape, and use the least squares method to perform ellipse fitting to determine the position of the hole center and the axis of the part in the image, and calculate the center of the hole to be measured and the axis of the part in its corresponding position through the camera model calculation. The position of the camera in the real coordinate system.
步骤4.4:将固定零件和对接零件中孔心和轴心映射到同一世界坐标系下,轴心坐标为Hab0=(x0,y0),孔心坐标集为Ha=(xm,ym),Hb=(xm,ym),m=1,2,3……N,根据同一坐标系下两零件轴心与孔心确定的直线,通过三角函数:Step 4.4: Map the hole center and the axis center of the fixed part and the butt-jointed part to the same world coordinate system, the axis center coordinate is H ab0 = (x 0 , y 0 ), and the hole center coordinate set is H a = (x m , y m ), H b = (x m , y m ), m = 1, 2, 3...N, according to the straight line determined by the axis center and the hole center of the two parts in the same coordinate system, through the trigonometric function:
计算出需要调整的最小偏转角α。Calculate the minimum deflection angle α that needs to be adjusted.
本发明未涉及部分与现有技术相同或可采用现有技术加以实现。The parts not involved in the present invention are the same as or can be implemented by using the prior art.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210527443.0A CN114963981B (en) | 2022-05-16 | 2022-05-16 | A non-contact measurement method for cylindrical parts docking based on monocular vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210527443.0A CN114963981B (en) | 2022-05-16 | 2022-05-16 | A non-contact measurement method for cylindrical parts docking based on monocular vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114963981A true CN114963981A (en) | 2022-08-30 |
CN114963981B CN114963981B (en) | 2023-08-15 |
Family
ID=82970874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210527443.0A Active CN114963981B (en) | 2022-05-16 | 2022-05-16 | A non-contact measurement method for cylindrical parts docking based on monocular vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114963981B (en) |
Cited By (2)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116140987A (en) * | 2023-04-17 | 2023-05-23 | 广东施泰德测控与自动化设备有限公司 | Visual quick docking device and docking method for axle test board |
CN118840369A (en) * | 2024-09-20 | 2024-10-25 | 东海实验室 | Method, system and storage medium for detecting double-shaft butt joint deviation |
Citations (8)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108562274A (en) * | 2018-04-20 | 2018-09-21 | 南京邮电大学 | A kind of noncooperative target pose measuring method based on marker |
CN109190628A (en) * | 2018-08-15 | 2019-01-11 | 东北大学 | A kind of plate camber detection method based on machine vision |
CN110146038A (en) * | 2019-06-08 | 2019-08-20 | 西安电子科技大学 | Distributed Monocular Camera Laser Measuring Device and Method for Assembly Rotation Angle of Cylindrical Parts |
CN112362034A (en) * | 2020-11-11 | 2021-02-12 | 上海电器科学研究所(集团)有限公司 | Solid engine multi-cylinder section butt joint guiding measurement algorithm based on binocular vision |
CN112686920A (en) * | 2020-12-31 | 2021-04-20 | 天津理工大学 | Visual measurement method and system for geometric dimension parameters of circular part |
CN113295171A (en) * | 2021-05-19 | 2021-08-24 | 北京航空航天大学 | Monocular vision-based attitude estimation method for rotating rigid body spacecraft |
WO2021208231A1 (en) * | 2020-04-15 | 2021-10-21 | 上海工程技术大学 | Gap measuring system and measuring method |
US20220148213A1 (en) * | 2020-01-10 | 2022-05-12 | Dalian University Of Technology | Method for fully automatically detecting chessboard corner points |
-
2022
- 2022-05-16 CN CN202210527443.0A patent/CN114963981B/en active Active
Patent Citations (8)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108562274A (en) * | 2018-04-20 | 2018-09-21 | 南京邮电大学 | A kind of noncooperative target pose measuring method based on marker |
CN109190628A (en) * | 2018-08-15 | 2019-01-11 | 东北大学 | A kind of plate camber detection method based on machine vision |
CN110146038A (en) * | 2019-06-08 | 2019-08-20 | 西安电子科技大学 | Distributed Monocular Camera Laser Measuring Device and Method for Assembly Rotation Angle of Cylindrical Parts |
US20220148213A1 (en) * | 2020-01-10 | 2022-05-12 | Dalian University Of Technology | Method for fully automatically detecting chessboard corner points |
WO2021208231A1 (en) * | 2020-04-15 | 2021-10-21 | 上海工程技术大学 | Gap measuring system and measuring method |
CN112362034A (en) * | 2020-11-11 | 2021-02-12 | 上海电器科学研究所(集团)有限公司 | Solid engine multi-cylinder section butt joint guiding measurement algorithm based on binocular vision |
CN112686920A (en) * | 2020-12-31 | 2021-04-20 | 天津理工大学 | Visual measurement method and system for geometric dimension parameters of circular part |
CN113295171A (en) * | 2021-05-19 | 2021-08-24 | 北京航空航天大学 | Monocular vision-based attitude estimation method for rotating rigid body spacecraft |
Non-Patent Citations (4)
* Cited by examiner, † Cited by third partyTitle |
---|
焦亮等: "基于机器视觉的高精度测量与装配系统设计", 《计算机测量与控制》 * |
焦亮等: "基于机器视觉的高精度测量与装配系统设计", 《计算机测量与控制》, no. 07, 25 July 2016 (2016-07-25) * |
谷凤伟等: "一种简易的单目视觉位姿测量方法研究", 《光电技术应用》 * |
谷凤伟等: "一种简易的单目视觉位姿测量方法研究", 《光电技术应用》, no. 04, 15 August 2018 (2018-08-15) * |
Cited By (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116140987A (en) * | 2023-04-17 | 2023-05-23 | 广东施泰德测控与自动化设备有限公司 | Visual quick docking device and docking method for axle test board |
CN118840369A (en) * | 2024-09-20 | 2024-10-25 | 东海实验室 | Method, system and storage medium for detecting double-shaft butt joint deviation |
CN118840369B (en) * | 2024-09-20 | 2025-01-21 | 东海实验室 | A method, system and storage medium for detecting double-axis docking deviation |
Also Published As
Publication number | Publication date |
---|---|
CN114963981B (en) | 2023-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110276808B (en) | 2022-10-18 | Method for measuring unevenness of glass plate by combining single camera with two-dimensional code |
CN110889829B (en) | 2023-11-03 | A monocular distance measurement method based on fisheye lens |
CN109190628A (en) | 2019-01-11 | A kind of plate camber detection method based on machine vision |
CN111369630A (en) | 2020-07-03 | A method of multi-line lidar and camera calibration |
JP6899189B2 (en) | 2021-07-07 | Systems and methods for efficiently scoring probes in images with a vision system |
CN107084680B (en) | 2019-04-09 | Target depth measuring method based on machine monocular vision |
CN112067233B (en) | 2022-08-12 | A 6-DOF Motion Capture Method for Wind Tunnel Models |
CN101299270A (en) | 2008-11-05 | Multiple video cameras synchronous quick calibration method in three-dimensional scanning system |
CN112200203B (en) | 2022-04-05 | Matching method of weak correlation speckle images in oblique field of view |
CN108007388A (en) | 2018-05-08 | A kind of turntable angle high precision online measuring method based on machine vision |
CN103902953B (en) | 2017-11-07 | A kind of screen detecting system and method |
CN116188558B (en) | 2023-07-11 | Stereo photogrammetry method based on binocular vision |
CN111402330B (en) | 2024-02-27 | Laser line key point extraction method based on planar target |
CN114897864A (en) | 2022-08-12 | Workpiece detection and defect judgment method based on digital and analog information |
CN109859137B (en) | 2023-02-17 | Wide-angle camera irregular distortion global correction method |
CN113324478A (en) | 2021-08-31 | Center extraction method of line structured light and three-dimensional measurement method of forge piece |
CN114963981B (en) | 2023-08-15 | A non-contact measurement method for cylindrical parts docking based on monocular vision |
CN112161997A (en) | 2021-01-01 | On-line precision visual measurement method and system for three-dimensional geometric dimensions of semiconductor chip pins |
CN116129037B (en) | 2023-10-31 | Visual touch sensor, three-dimensional reconstruction method, system, equipment and storage medium thereof |
CN114331879A (en) | 2022-04-12 | Visible light and infrared image registration method for equalized second-order gradient histogram descriptor |
CN114677356A (en) | 2022-06-28 | Wine bottle appearance defect detection method based on multi-view image fusion |
CN114964007A (en) | 2022-08-30 | Visual measurement and surface defect detection method for weld size |
CN111968182B (en) | 2024-04-16 | Calibration method for nonlinear model parameters of binocular camera |
CN114998571B (en) | 2024-04-12 | Image processing and color detection method based on fixed-size markers |
CN209279912U (en) | 2019-08-20 | A kind of object dimensional information collecting device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2022-08-30 | PB01 | Publication | |
2022-08-30 | PB01 | Publication | |
2022-09-16 | SE01 | Entry into force of request for substantive examination | |
2022-09-16 | SE01 | Entry into force of request for substantive examination | |
2023-08-15 | GR01 | Patent grant | |
2023-08-15 | GR01 | Patent grant |