CN104751458B - A kind of demarcation angular-point detection method based on 180 ° of rotation operators - Google Patents
A kind of demarcation angular-point detection method based on 180 ° of rotation operators Download PDFInfo
- Publication number
- CN104751458B CN104751458B CN201510127733.6A CN201510127733A CN104751458B CN 104751458 B CN104751458 B CN 104751458B CN 201510127733 A CN201510127733 A CN 201510127733A CN 104751458 B CN104751458 B CN 104751458B
- Authority
- CN
- China
- Prior art keywords
- mrow
- rotation
- template
- calibration
- point
- 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.)
- Expired - Fee Related
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 32
- 230000008859 change Effects 0.000 claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000005259 measurement Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 8
- 239000011159 matrix material Substances 0.000 claims description 7
- 239000012535 impurity Substances 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 12
- 238000013461 design Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 5
- 230000009466 transformation Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 150000003071 polychlorinated biphenyls Chemical class 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
本发明公开了一种基于180°旋转算子的标定角点检测方法,包括下述步骤:(1)获取待处理的标定图像I,(2)判断灰度变化度Z1;(3)判断180°旋转重合度Z2;(4)提取图像的角点。本发明在摄像机标定过程中,根据标定块三个面的棋盘格角点周围图案的旋转对称性,设计出一种基于180°旋转算子的模板,实现对标定块角点的高效检测。通过实验数据及结果分析,该方法对角点检测具有很高的精确性和稳定性,不仅能够适用于一般的标定板图像,也适用于多个面的标定块图像,对于有一定倾斜度和畸变的标定图像同样有较好的效果。
The invention discloses a calibration corner detection method based on a 180° rotation operator, comprising the following steps: (1) acquiring a calibration image I to be processed, (2) judging the degree of grayscale change Z1; (3) judging 180 ° Rotation coincidence degree Z2; (4) Extract the corner points of the image. In the process of camera calibration, the present invention designs a template based on a 180° rotation operator according to the rotational symmetry of the patterns around the checkerboard corner points on the three sides of the calibration block, so as to realize efficient detection of the corner points of the calibration block. Through the analysis of experimental data and results, this method has high accuracy and stability for corner point detection. It is not only suitable for general calibration plate images, but also suitable for calibration block images with multiple surfaces. For those with certain inclination and Distorted calibration images also have better results.
Description
技术领域technical field
本发明涉及表面贴装设备中的图像处理领域,特别涉及一种基于180°旋转算子进行快速精确检测摄像机标定中的角点的方法。The invention relates to the field of image processing in surface mounting equipment, in particular to a method for quickly and accurately detecting corner points in camera calibration based on a 180° rotation operator.
背景技术Background technique
摄像机标定是机器视觉和图像处理中的重要组成部分,其精度在很多情况下决定了整个三维测量系统的性能。在精密电子制造系列装备中,表面贴装设备是用来对PCB进行元器件贴装的设备。因此,装备系统精确度的重要性是不言而喻的。一般情况下,是利用棋盘格图像作为标定图像,其中的角点就是图像亮度变化与邻点变化程度相差很大的点。角点检测是摄像机标定的重要环节。通过提取图像上的角点位置信息,可以确定三维测量系统中,三维物体的每一点的信息在像平面坐标与空间坐标系之间的关系,从而得到摄像机的内外参数,进而确定其空间位置。Camera calibration is an important part of machine vision and image processing, and its accuracy determines the performance of the entire 3D measurement system in many cases. In the series of equipment for precision electronics manufacturing, surface mount equipment is used to mount components on PCBs. Therefore, the importance of equipment system accuracy is self-evident. In general, the checkerboard image is used as the calibration image, and the corner points are the points where the brightness change of the image is very different from that of adjacent points. Corner detection is an important part of camera calibration. By extracting the corner position information on the image, the relationship between the image plane coordinates and the space coordinate system of the information of each point of the 3D object in the 3D measurement system can be determined, so as to obtain the internal and external parameters of the camera, and then determine its spatial position.
摄像机标定的途径是根据摄像机模型,由已知特征点的图像坐标求解摄像机的模型参数。图像中每点像素都是通过透射投影方式得到的,对应于光学中心与场景点形成的一条射线,如何确定这条射线在场景坐标系中的方程就是摄像机标定所要解决的问题。在标定过程中,需要确定摄像机的内部参数和外部参数。在三维测量系统中,根据射影几何以及摄像机针孔模型,推算出场景世界坐标系与像素坐标系间的变换关系的公式如下。The way of camera calibration is to solve the model parameters of the camera from the image coordinates of the known feature points according to the camera model. Each pixel in the image is obtained by transmission projection, corresponding to a ray formed by the optical center and the scene point. How to determine the equation of this ray in the scene coordinate system is the problem to be solved by camera calibration. During the calibration process, it is necessary to determine the intrinsic and extrinsic parameters of the camera. In the 3D measurement system, according to the projective geometry and the camera pinhole model, the formula for deducing the transformation relationship between the scene world coordinate system and the pixel coordinate system is as follows.
其中(Xwi,Ywi,Zwi,1)为空间第i个点的世界坐标,(ui,vi,1)为第i点的图像坐标;mij为投影矩阵M的第i行第j列元素。Where (X wi , Y wi , Z wi ,1) is the world coordinate of the i-th point in space, (u i , v i ,1) is the image coordinate of the i-th point; m ij is the i-th row of the projection matrix M The jth column element.
通过借助标定块上大量已知角点的三维坐标以及它们在摄像机上的像素坐标,可以求解出投影矩阵M。由上式可以看出,角点的检测精度直接决定了摄像机参数的计算精度。By using the 3D coordinates of a large number of known corner points on the calibration block and their pixel coordinates on the camera, the projection matrix M can be solved. It can be seen from the above formula that the detection accuracy of corner points directly determines the calculation accuracy of camera parameters.
目前,基于棋盘格图像的角点检测主要有两种方式:一种是手动获取的方法,通过鼠标点击逐个获取角点的位置;另一种是自动检测的方法,例如利用Harris算子、Susan算子等获取图像的角点位置。手动获取角点的位置信息,存在的问题有:首先需要人工干预。影响了摄像机标定图像处理过程中的速度,而且没有办法实现动态校准;其次,角点的检测精度不稳定,一定程度上也会与操作员的经验有关等等。而自动检测方法中,使用Harris算子、Susan算子等虽然可以实现自动标定过程,但也会出现精度不稳定,伪角点等情况,尤其是在倾斜的棋盘格图像中,进而影响了整个摄像机标定的精度。At present, there are two main methods of corner detection based on checkerboard images: one is the method of manual acquisition, and the position of the corners is obtained one by one by clicking the mouse; the other is the method of automatic detection, such as using Harris operator, Susan The operator etc. obtains the corner position of the image. Manually obtain the location information of the corner points, the existing problems are: firstly, manual intervention is required. It affects the speed of the camera calibration image processing process, and there is no way to achieve dynamic calibration; secondly, the detection accuracy of corner points is unstable, and to a certain extent, it is also related to the operator's experience and so on. In the automatic detection method, although Harris operator, Susan operator, etc. can be used to realize the automatic calibration process, but the accuracy is unstable, false corners, etc., especially in the tilted checkerboard image, which affects the entire Accuracy of camera calibration.
发明内容Contents of the invention
本发明的主要目的在于克服现有技术的缺点与不足,提供一种基于180°旋转算子的标定角点检测方法,相比于现有的角点检测方法具有实用性强、精度高、速度快的特点。The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide a calibration corner detection method based on a 180° rotation operator. Compared with the existing corner detection methods, it has strong practicability, high precision and fast Fast feature.
为了达到上述目的,本发明采用以下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
一种基于180°旋转算子的标定角点检测方法,包括下述步骤:A kind of calibration corner point detection method based on 180 ° rotation operator, comprises the following steps:
(1)获取待处理的标定图像I:在三维测量系统中,将标定块放置于固定位置,调节好光源的亮度,通过摄影机拍摄得到标定图像;(1) Obtain the calibration image I to be processed: in the three-dimensional measurement system, the calibration block is placed in a fixed position, the brightness of the light source is adjusted, and the calibration image is obtained by shooting with a camera;
(2)判断灰度变化度Z1:对图像上各点I(i,j)进行逐一扫描,建立以像素点I(i,j)为中心的大小为n×n的正方形旋转算子模板W,利用求取灰度均方差的方法来计算算子模板内图像的平坦情况,即灰度变化度Z1;(2) Judging the degree of gray scale change Z1: scan each point I(i, j) on the image one by one, and establish a square rotation operator template W with a size of n×n centered on the pixel point I(i, j) , using the method of calculating the mean square error of the gray level to calculate the flatness of the image in the operator template, that is, the degree of gray change Z1;
(3)判断180°旋转重合度Z2:判断灰度变化度Z1并提取出边缘及角点所在区域之后,对于符合条件的像素点I(i,j),计算其旋转算子模板W中黑白灰度比例,进行有需要的黑白灰度对换,产生新的模板,在这个新的模板上再进行重合度函数计算,即对旋转算子模板W进行180°旋转后,得到旋转模板W0,求取两者的差值矩阵中各元素的绝对值之和的均值Z2;(3) Judgment of the 180° rotation coincidence degree Z2: After judging the degree of gray change Z1 and extracting the area where the edge and corner points are located, for the qualified pixel point I(i, j), calculate the black and white in the rotation operator template W Grayscale ratio, perform necessary black-and-white grayscale exchange, generate a new template, and then calculate the coincidence function on this new template, that is, after rotating the rotation operator template W by 180°, the rotation template W0 is obtained, Calculate the mean value Z2 of the sum of the absolute values of the elements in the difference matrix between the two;
(4)提取图像的角点:由旋转算子模板判断灰度变化度Z1和旋转重合度Z2之后,获取出每处角点所在区域的连通域,内重合度最高的点,即为图像的角点。(4) Extract the corner points of the image: After the gray scale change degree Z1 and the rotation coincidence degree Z2 are judged by the rotation operator template, the connected domain of the area where each corner point is located is obtained, and the point with the highest degree of coincidence in the image is the point of the image corner.
优选的,步骤(1)在利用旋转算子处理之前,首先对图像叠加模板为5×5,宽度为1的二维高斯滤波器,滤除杂质噪声。Preferably, in step (1), before using the rotation operator to process, first superimpose a two-dimensional Gaussian filter with a template size of 5×5 and a width of 1 on the image to filter out impurity noise.
优选的,所述二维高斯滤波器的函数g(i,j),其中为模板中心σ为宽度,也即平滑程度。Preferably, the function g(i,j) of the two-dimensional Gaussian filter, in for template center σ is the width, that is, the degree of smoothness.
优选的,步骤(1)中,所述三维测量系统包括一个投影仪、一个摄像机装置以及一个标定块。Preferably, in step (1), the three-dimensional measurement system includes a projector, a camera device and a calibration block.
优选的,步骤(2)中,计算灰度变化程度Z1的均方差函数Z1(i,j),为:Preferably, in step (2), the mean square error function Z 1 (i, j) of calculating the degree of gray scale change Z1 is:
式中,为模板W中像素的灰度平均值,n为窗口W的宽度。In the formula, is the average gray value of pixels in the template W, and n is the width of the window W.
优选的,步骤(3)中,判断灰度变化程度Z1是否满足预设阈值T1,选择阈值T1为0.1,判断Z1(i,j)是否满足Z1(i,j)>T1,若能够满足,则证明以当前像素点I(i,j)为中心的旋转算子模板处于边缘点或角点位置而非平坦区域,其灰度变化较大,继续计算其重合度函数值Z2进行处理;若不能满足,无需处理,跳过。Preferably, in step (3), it is judged whether the degree of gray scale change Z1 satisfies the preset threshold T1, the threshold T1 is selected as 0.1, and it is judged whether Z 1 (i,j) satisfies Z 1 (i,j)>T1, if it can Satisfied, it proves that the rotation operator template centered on the current pixel point I(i,j) is in an edge point or corner point rather than a flat area, and its gray level changes greatly, so continue to calculate its coincidence function value Z2 for processing ; If unsatisfactory, do not need to process, skip.
优选的,步骤(3)中,计算180°旋转重合度Z2之前,判断黑白灰度比例,模板总面积S=n×n,白色部分面积为S1,选择预设阈值e=(n×n-1)/2,,则占面积比α=S1/S,Preferably, in step (3), before calculating the 180° rotation coincidence degree Z2, judge the black-and-white grayscale ratio, the total area of the template is S=n×n, the area of the white part is S1, and the preset threshold e=(n×n- 1)/2, then the area ratio α=S1/S,
其中W′(i,j)为黑白灰度对换后的旋转算子模板。Among them, W′(i,j) is the rotation operator template after the black-white-grayscale swap.
优选的,计算180°旋转重合度Z2的函数Z2(i,j),式中,n为窗口W的宽度,(x,y)为窗口内的移动点,I(i-x,j+y)是I(i+x,j-y)点以I(i,j)为中心旋转180°后的对应点。Preferably, calculate the function Z 2 (i, j) of the 180° rotation coincidence degree Z2, In the formula, n is the width of the window W, (x,y) is the moving point in the window, I(ix,j+y) is the rotation of the I(i+x,jy) point around I(i,j) Corresponding point after 180°.
优选的,判断旋转重合度Z2是否满足预设阈值T2,选择阈值T2不超过0.1,判断Z2(i,j)是否满足Z2(i,j)>T2,若能够满足,则证明当前像素点I(i,j)为中心的旋转算子模板的对称性足够,重合度较高,像素点I(i,j)处于角点区域位置,可以精确提取出其位置,反之则无需处理,跳过。Preferably, it is judged whether the rotation coincidence degree Z2 satisfies the preset threshold T2, the selected threshold T2 does not exceed 0.1, and it is judged whether Z 2 (i,j) satisfies Z 2 (i,j)>T2, if it can be satisfied, it is proved that the current pixel The symmetry of the rotation operator template centered at point I(i,j) is sufficient, and the coincidence degree is high. The pixel point I(i,j) is located in the corner area, and its position can be accurately extracted. Otherwise, no processing is required. jump over.
优选的,由步骤(2)所得的Z1(i,j)和步骤(3)所得的Z2(i,j),得到角点所处近似模糊的区域,利用八邻域获取出连通域,再叠加判断算法筛选出连通域内重合度值Z2最高的点,即为图像的角点。Preferably, from Z 1 (i, j) obtained in step (2) and Z 2 (i, j) obtained in step (3), the corner point is located in an approximately fuzzy area, and the connected domain is obtained by using eight neighbors , and then the superposition judgment algorithm screens out the point with the highest coincidence value Z2 in the connected domain, which is the corner point of the image.
本发明与现有技术相比,具有如下优点和有益效果:Compared with the prior art, the present invention has the following advantages and beneficial effects:
(1)本发明通过180°旋转变换检测出角点,加快了检测速度,过程简单,可操作性强。(1) The present invention detects corner points through 180° rotation transformation, which speeds up the detection speed, has simple process and strong operability.
(2)本发明对旋转变换具有不变性,并能有效地去除伪角点及噪点的干扰,提高了算法的准确度和稳定性。(2) The invention has invariance to the rotation transformation, can effectively remove the interference of false corner points and noise points, and improves the accuracy and stability of the algorithm.
(3)本发明不仅能够适用于一般的标定板图像,也适用于多个面的标定块图像,对于有一定倾斜度和畸变的标定图像同样有着很好的效果。(3) The present invention is applicable not only to general calibration plate images, but also to calibration block images with multiple surfaces, and it also has a good effect on calibration images with certain inclination and distortion.
(4)本发明能够符合预期设计要求,而且和其他一些目前比较流行的自动检测算法相比,它的适用性更广,精确度更好,稳定性更高。(4) The present invention can meet the expected design requirements, and compared with other currently popular automatic detection algorithms, it has wider applicability, better accuracy and higher stability.
附图说明Description of drawings
图1是本发明检测系统的结构示意图;Fig. 1 is the structural representation of detection system of the present invention;
图2是本发明检测方法的流程图;Fig. 2 is the flowchart of detection method of the present invention;
图3是本发明旋转算子的示意图;Fig. 3 is the schematic diagram of rotation operator of the present invention;
图4是本发明旋转算子中心对称的示意图。Fig. 4 is a schematic diagram of the centrosymmetry of the rotation operator of the present invention.
具体实施方式detailed description
下面结合实施例及附图对本发明作进一步详细的描述,但本发明的实施方式不限于此。The present invention will be further described in detail below in conjunction with the embodiments and the accompanying drawings, but the embodiments of the present invention are not limited thereto.
如图1所示,本发明的基于180°旋转算子的标定角点检测方法的检测系统,包括放置平台3上的标定块4,投影仪2可以作为光源,由摄像机1采集图像。正常的标定过程中,通常要采集大于或等于2张的标定板图像,而且标定板必须不能在同一平面放置。这样一来,第一是操作繁琐,第二在更换标定板的过程中,难免会对测量精度造成一定影响。这里用到的标定块,是由至少3个这样的标定板面组成的立方体。如图1所示。使用标定块只需要拍照一次,在同一张图中进行算法处理,因此更加方便快捷。As shown in FIG. 1 , the detection system of the calibration corner detection method based on the 180° rotation operator of the present invention includes a calibration block 4 placed on a platform 3 , the projector 2 can be used as a light source, and the camera 1 collects images. In the normal calibration process, it is usually necessary to collect more than or equal to 2 images of the calibration board, and the calibration board must not be placed on the same plane. In this way, the first is that the operation is cumbersome, and the second is that in the process of replacing the calibration plate, it will inevitably have a certain impact on the measurement accuracy. The calibration block used here is a cube composed of at least 3 such calibration boards. As shown in Figure 1. Using the calibration block only needs to take a picture once, and the algorithm is processed in the same picture, so it is more convenient and quicker.
如图2所示,为本发明一种角点检测方法的整体流程图,其具体的操作步骤如下:As shown in Figure 2, it is an overall flowchart of a corner detection method of the present invention, and its specific operation steps are as follows:
(1)获取待处理的标定图像I:在具有图1所示的三维测量系统中,将标定块放置于固定位置,调节好光源的亮度,通过摄影机拍摄得到标定图像I。在利用旋转算子处理之前,首先对图像叠加模板为5×5,宽度为1的二维高斯滤波器,滤除杂质噪声;(1) Obtain the calibration image I to be processed: In the three-dimensional measurement system shown in Figure 1, the calibration block is placed at a fixed position, the brightness of the light source is adjusted, and the calibration image I is obtained by shooting with a camera. Before using the rotation operator to process, first superimpose the image with a 5×5 two-dimensional Gaussian filter with a width of 1 to filter out impurity noise;
(2)判断灰度变化度Z1:对图像上各点I(i,j)进行逐一扫描,建立以像素点I(i,j)为中心的大小为n×n的正方形旋转算子模板W。利用求取灰度均方差的方法来计算算子模板内图像的平坦情况,即灰度变化度Z1。(2) Judging the degree of gray scale change Z1: scan each point I(i, j) on the image one by one, and establish a square rotation operator template W with a size of n×n centered on the pixel point I(i, j) . The flatness of the image in the operator template is calculated by calculating the mean square error of the gray level, that is, the gray level change degree Z1.
如图3所示,为本发明设计的一种旋转算子的原理示意图。对于图像的每一点I(i,j),以该点为中心的模板称之为W。W可以是圆形的也可以是方形的,这里选用方形的模板,设模板的宽度为n,则模板内的像素个数为n×n。为了计算的准确性以及检测的精确性,W的宽度n应当小于一个棋盘格的边长。n的取值为奇数,这样就保证了模板在计算过程各点值都为整数。As shown in FIG. 3 , it is a schematic diagram of the principle of a rotation operator designed in the present invention. For each point I(i,j) of the image, the template centered on this point is called W. W can be circular or square. Here, a square template is selected. If the width of the template is n, then the number of pixels in the template is n×n. For calculation accuracy and detection accuracy, the width n of W should be smaller than the side length of a checkerboard. The value of n is an odd number, which ensures that the value of each point of the template in the calculation process is an integer.
当模板W处于区域a时,图像是平坦的,灰度方差值很小,因此不是边缘点和角点。当模板W处于区域b时,其180°旋转后的重合度较高,是理想的角点。而c,d处虽然图像不平坦,也具有一定的对称性,但其关于中心点的对称度较低。这样,我们就可以根据计算的180°旋转后的重合度准确确定角点所在的位置。When the template W is in the region a, the image is flat and the gray variance value is small, so there are no edge points and corner points. When template W is in area b, its coincidence degree after 180° rotation is high, which is an ideal corner point. Although the images at c and d are not flat, they also have certain symmetry, but their symmetry about the center point is low. In this way, we can accurately determine the position of the corner point according to the calculated coincidence degree after 180° rotation.
之后需要有效地剔除图像中的平坦区域,提取出边缘点及角点所在区域。因为平坦区域的像素点所在的模板内,像素灰度的均方差值比较小,所以设计旋转算子的均方差响应值作为反映周围像素灰度值变化剧烈程度的灰度方差,以此来剔除平坦区域,其公式表达式,即计算灰度变化程度Z1的均方差函数Z1(i,j)如下所示After that, it is necessary to effectively remove the flat area in the image, and extract the edge point and the area where the corner point is located. Because the mean square error value of the pixel grayscale is relatively small in the template where the pixel points in the flat area are located, the mean square error response value of the rotation operator is designed as the grayscale variance reflecting the intensity of the gray value change of the surrounding pixels. To remove flat areas, the formula expression, that is, to calculate the mean square error function Z 1 (i,j) of the degree of gray change Z1 is as follows
式中,为模板W中像素的灰度平均值,n为窗口W的宽度。In the formula, is the average gray value of pixels in the template W, and n is the width of the window W.
判断灰度变化程度Z1是否满足预设阈值T1。选择阈值T1大约为0.1。判断Z1(i,j)是否满足Z1(i,j)>T1,若能够满足,则证明以当前像素点I(i,j)为中心的旋转算子模板处于边缘点或角点位置而非平坦区域,其灰度变化较大,继续计算其重合度函数值Z2进行处理。若不能满足,无需处理,这是非角点。It is judged whether the degree of gray scale change Z1 satisfies a preset threshold T1. The threshold T1 is chosen to be approximately 0.1. Judging whether Z 1 (i,j) satisfies Z 1 (i,j)>T1, if so, it proves that the rotation operator template centered on the current pixel point I(i,j) is at the edge or corner position In the non-flat area, the gray level changes greatly, and the coincidence function value Z2 is continued to be calculated for processing. If it is not satisfied, there is no need to deal with it, this is a non-corner point.
(3)判断180°旋转重合度Z2:判断灰度变化度Z1之后,计算180°旋转重合度Z2之前,对于符合条件的像素点I(i,j),计算其旋转算子模板W中黑白灰度比例,进行有需要的黑白灰度对换,产生新的模板。这是因为,在倾斜的标定块图像中,直接计算以上的重合度函数,同样倾斜度的模板,对于白色部分偏多或者黑色部分偏多的,其计算结果也会有较大区别。(3) Judgment of the 180° rotation coincidence degree Z2: After judging the gray scale change degree Z1, before calculating the 180° rotation coincidence degree Z2, for the qualified pixel point I(i,j), calculate the black and white in the rotation operator template W Grayscale ratio, perform necessary black-and-white grayscale exchange, and generate a new template. This is because, in the inclined calibration block image, the above coincidence degree function is directly calculated, and the template with the same inclination will have a large difference in the calculation results for those with more white parts or more black parts.
因此在计算整合度函数过程中加入判断条件:若旋转算子的模板中,白色部分的面积占总面积的大半,则将黑白部分进行灰度值转换。在这个新的模板上再进行重合度函数计算,即对旋转算子模板W进行180°旋转后,得到旋转模板W0,求取两者的差值矩阵中各元素的绝对值之和的均值Z2。Therefore, a judgment condition is added in the process of calculating the integration function: if the area of the white part accounts for more than half of the total area in the template of the rotation operator, then the black and white part is converted to gray value. On this new template, the coincidence function calculation is performed, that is, after the rotation operator template W is rotated by 180°, the rotation template W0 is obtained, and the mean value Z2 of the sum of the absolute values of each element in the difference matrix between the two is obtained .
模板总面积S=n×n,白色部分面积为S1,选择预设阈值e=(n×n-1)/2。则占面积比α=S1/S。满足以下情况则进行对换。The total area of the template is S=n×n, the area of the white part is S1, and the preset threshold e=(n×n−1)/2 is selected. Then the area ratio α=S1/S. Swap if the following conditions are met.
其中W′(i,j)为黑白灰度对换后的旋转算子模板。Among them, W′(i,j) is the rotation operator template after the black-white-grayscale swap.
如图4所示,是本发明的旋转算子中心对称的示意图。对于模板中的某个像素A(i+x,j-y)关于中心点I(i,j)对称的点为A1(i+x,j-y)。定义旋转算子的重合度响应值为模板W中关于中心点I(i,j)对称的每一对像素的灰度平方差绝对值的平均值,则重合度函数的表示式Z2(i,j)如下所示:As shown in FIG. 4 , it is a schematic diagram of the centrosymmetry of the rotation operator of the present invention. For a certain pixel A(i+x,jy) in the template, the symmetrical point about the central point I(i,j) is A1(i+x,jy). The coincidence degree response value of the rotation operator is defined as the average value of the absolute value of the gray square difference of each pair of pixels symmetrical about the center point I(i, j) in the template W, then the expression of the coincidence degree function Z 2 (i ,j) as follows:
式中,n为窗口W的宽度,(x,y)为窗口内的移动点。I(i-x,j+y)是I(i+x,j-y)点以I(i,j)为中心旋转180°后的对应点。标定图像上的特征角点的重合度函数计算值Z2较小;而边界点和噪点等,由于不对称性,一边像素灰度值大,另一边像素灰度值小,所以其Z2较大。图像上某一点I(i,j)的重合度函数计算值Z2即是,以该点像素为中心的小窗口范围内像素灰度分布的空间对称性的反映。In the formula, n is the width of the window W, and (x, y) is the moving point in the window. I(i-x,j+y) is the corresponding point after point I(i+x,j-y) is rotated 180° around I(i,j). The calculated value Z2 of the coincidence function of the characteristic corner points on the calibration image is small; while boundary points and noise points, etc., due to asymmetry, the gray value of the pixel on one side is large, and the gray value of the pixel on the other side is small, so its Z2 is relatively large. The coincidence function calculation value Z2 of a certain point I(i,j) on the image is the reflection of the spatial symmetry of the pixel gray distribution within the small window centered on the pixel at this point.
判断旋转重合度Z2是否满足预设阈值T2。选择阈值T2不超过0.1。判断Z2(i,j)是否满足Z2(i,j)>T2,若能够满足,则证明当前像素点I(i,j)为中心的旋转算子模板的对称性足够,重合度较高,像素点I(i,j)处于角点区域位置,可以精确提取出其位置。反之则无需处理,属于非角点。It is judged whether the rotation coincidence degree Z2 satisfies the preset threshold T2. The threshold T2 is chosen not to exceed 0.1. Judging whether Z 2 (i,j) satisfies Z 2 (i,j)>T2, if it can be satisfied, it proves that the symmetry of the rotation operator template centered on the current pixel point I(i,j) is sufficient, and the coincidence degree is relatively high. High, the pixel point I(i,j) is in the position of the corner area, and its position can be accurately extracted. Otherwise, there is no need to deal with it, and it belongs to non-corner points.
(4)提取图像的角点:由图4的旋转算子的示意图,可见这是以像素点I(i,j)为中心旋转算子模板W(一个n×n的正方形矩阵),进行180°旋转后,得到的新旋转模板W0,两者再相减,求取差值矩阵中各元素的绝对值之和的均值,即重合度函数值Z2。(4) Extract the corners of the image: From the schematic diagram of the rotation operator in Figure 4, it can be seen that this is the rotation operator template W (an n×n square matrix) centered on the pixel point I(i,j), and the 180 After °rotation, the new rotation template W0 is obtained, and the two are subtracted again to obtain the mean value of the sum of the absolute values of each element in the difference matrix, that is, the coincidence degree function value Z2.
由旋转算子模板判断灰度变化度Z1和旋转重合度Z2之后,获取出每处角点所在区域的连通域之后,再分别提取出各区域内的角点。接下来对整张图像进行八邻域计算,获取出每个角点所在区域的连通域。内重合度最高的点,即为图像的角点。设上一步中提取的连通域内的像素点数为l,当l<2或l>8时,此连通域内的像素点为噪点或者是边缘点,将其去除;若1<l<9,则筛选出连通域内重合度值Z2最高的点,即为图像的角点。至此,标定图像的角点检测完成。After judging the degree of gray change Z1 and the degree of rotation coincidence Z2 by the rotation operator template, after obtaining the connected domain of the region where each corner point is located, the corner points in each region are extracted respectively. Next, the eight-neighborhood calculation is performed on the entire image to obtain the connected domain of the area where each corner point is located. The point with the highest degree of inner coincidence is the corner point of the image. Let the number of pixels in the connected domain extracted in the previous step be l, when l<2 or l>8, the pixels in this connected domain are noise points or edge points, and remove them; if 1<l<9, filter The point with the highest coincidence value Z2 in the connected domain is the corner point of the image. So far, the corner point detection of the calibration image is completed.
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiment is a preferred embodiment of the present invention, but the embodiment of the present invention is not limited by the above-mentioned embodiment, and any other changes, modifications, substitutions, combinations, Simplifications should be equivalent replacement methods, and all are included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510127733.6A CN104751458B (en) | 2015-03-23 | 2015-03-23 | A kind of demarcation angular-point detection method based on 180 ° of rotation operators |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510127733.6A CN104751458B (en) | 2015-03-23 | 2015-03-23 | A kind of demarcation angular-point detection method based on 180 ° of rotation operators |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104751458A CN104751458A (en) | 2015-07-01 |
CN104751458B true CN104751458B (en) | 2017-08-25 |
Family
ID=53591077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510127733.6A Expired - Fee Related CN104751458B (en) | 2015-03-23 | 2015-03-23 | A kind of demarcation angular-point detection method based on 180 ° of rotation operators |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104751458B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105551048A (en) * | 2015-12-21 | 2016-05-04 | 华南理工大学 | Space surface patch-based three-dimensional corner detection method |
CN106023171B (en) * | 2016-05-12 | 2019-05-14 | 惠州学院 | A kind of image angular-point detection method based on turning radius |
CN106780611A (en) * | 2016-12-10 | 2017-05-31 | 广东文讯科技有限公司 | One kind uses intelligent terminal camera angular-point detection method |
CN107941241B (en) * | 2017-10-10 | 2021-04-06 | 天津大学 | A resolution plate for quality evaluation of aerial photogrammetry and using method thereof |
CN109658372B (en) * | 2017-10-10 | 2021-01-26 | 凌云光技术股份有限公司 | Image uniformity evaluation method and device |
CN114140521B (en) * | 2020-09-04 | 2025-06-20 | 深圳光峰科技股份有限公司 | A method, device, system and storage medium for identifying projection position |
CN113376170B (en) * | 2021-06-16 | 2023-01-10 | 博众精工科技股份有限公司 | Calibration method and calibration block of product appearance detection equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101763632A (en) * | 2008-12-26 | 2010-06-30 | 华为技术有限公司 | Method for demarcating camera and device thereof |
CN101980292A (en) * | 2010-01-25 | 2011-02-23 | 北京工业大学 | A Calibration Method of Intrinsic Parameters of Vehicle Camera Based on Regular Octagonal Template |
CN103198319A (en) * | 2013-04-11 | 2013-07-10 | 武汉大学 | Method of extraction of corner of blurred image in mine shaft environment |
WO2013182080A1 (en) * | 2012-06-08 | 2013-12-12 | 华为技术有限公司 | Parameter calibration method and device |
CN103679720A (en) * | 2013-12-09 | 2014-03-26 | 北京理工大学 | Fast image registration method based on wavelet decomposition and Harris corner detection |
CN103927750A (en) * | 2014-04-18 | 2014-07-16 | 上海理工大学 | Detection method of checkboard grid image angular point sub pixel |
CN104331900A (en) * | 2014-11-25 | 2015-02-04 | 湖南科技大学 | Corner sub-pixel positioning method in CCD (charge coupled device) camera calibration |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8855442B2 (en) * | 2012-04-30 | 2014-10-07 | Yuri Owechko | Image registration of multimodal data using 3D-GeoArcs |
-
2015
- 2015-03-23 CN CN201510127733.6A patent/CN104751458B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101763632A (en) * | 2008-12-26 | 2010-06-30 | 华为技术有限公司 | Method for demarcating camera and device thereof |
CN101980292A (en) * | 2010-01-25 | 2011-02-23 | 北京工业大学 | A Calibration Method of Intrinsic Parameters of Vehicle Camera Based on Regular Octagonal Template |
WO2013182080A1 (en) * | 2012-06-08 | 2013-12-12 | 华为技术有限公司 | Parameter calibration method and device |
CN103198319A (en) * | 2013-04-11 | 2013-07-10 | 武汉大学 | Method of extraction of corner of blurred image in mine shaft environment |
CN103679720A (en) * | 2013-12-09 | 2014-03-26 | 北京理工大学 | Fast image registration method based on wavelet decomposition and Harris corner detection |
CN103927750A (en) * | 2014-04-18 | 2014-07-16 | 上海理工大学 | Detection method of checkboard grid image angular point sub pixel |
CN104331900A (en) * | 2014-11-25 | 2015-02-04 | 湖南科技大学 | Corner sub-pixel positioning method in CCD (charge coupled device) camera calibration |
Non-Patent Citations (3)
Title |
---|
"使用12 像素对称模板的棋盘格内角点检测";戴士杰等;《红外与激光工程》;20140430;第43卷(第4期);1306-1311 * |
"基于双旋转模板的黑白棋盘角点检测算法";凌江;《图形、图像与多媒体》;20141231;第33卷(第21期);42-45 * |
"用于摄像机标定的棋盘图像角点检测新算法";杨幸芳等;《仪器仪表学报》;20110531;第32卷(第5期);1109-1113 * |
Also Published As
Publication number | Publication date |
---|---|
CN104751458A (en) | 2015-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104751458B (en) | A kind of demarcation angular-point detection method based on 180 ° of rotation operators | |
CN111429532B (en) | Method for improving camera calibration accuracy by utilizing multi-plane calibration plate | |
CN109859226B (en) | Detection method of checkerboard corner sub-pixels for graph segmentation | |
CN108760767B (en) | Large-size liquid crystal display defect detection method based on machine vision | |
Jeon et al. | Accurate depth map estimation from a lenslet light field camera | |
CN105279372B (en) | A kind of method and apparatus of determining depth of building | |
CN114820817B (en) | Calibration method and three-dimensional reconstruction method based on high-precision line laser 3D camera | |
WO2017092631A1 (en) | Image distortion correction method for fisheye image, and calibration method for fisheye camera | |
CN107248159A (en) | A kind of metal works defect inspection method based on binocular vision | |
CN106981081A (en) | A kind of degree of plainness for wall surface detection method based on extraction of depth information | |
CN104091324A (en) | Quick checkerboard image feature matching algorithm based on connected domain segmentation | |
CN105023265A (en) | Checkerboard angular point automatic detection method under fish-eye lens | |
CN106898048B (en) | A kind of undistorted integration imaging 3 D displaying method being suitable for complex scene | |
CN112581904B (en) | A Moiré Compensation Method for Brightness Grayscale Image of OLED Screen | |
CN113674360B (en) | A covariant-based method for line structured light and light plane calibration | |
CN103902953A (en) | Screen detection system and method | |
CN111145134A (en) | Algorithm for all-focus image generation of microlens light field camera based on block effect | |
CN102739952A (en) | Multi-view image capturing method and application system thereof | |
CN110866882A (en) | Layered joint bilateral filtering depth map restoration algorithm based on depth confidence | |
CN106875341A (en) | Distorted image correction method and its localization method | |
CN108596981B (en) | Aerial view angle re-projection method and device of image and portable terminal | |
CN111630569B (en) | Binocular matching method, visual imaging device and device with storage function | |
TWI439961B (en) | Conversion algorithm for voids generated after converting 2D images | |
CN116222381A (en) | Electrode coating size measurement method and device | |
CN117314792B (en) | Depth image restoration method based on RGB image edge capture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170825 |
|
CF01 | Termination of patent right due to non-payment of annual fee |