[go: up one dir, main page]

CN108399412A - A kind of X-type angular-point sub-pixel extracting method - Google Patents

A kind of X-type angular-point sub-pixel extracting method Download PDF

Info

Publication number
CN108399412A
CN108399412A CN201810187810.0A CN201810187810A CN108399412A CN 108399412 A CN108399412 A CN 108399412A CN 201810187810 A CN201810187810 A CN 201810187810A CN 108399412 A CN108399412 A CN 108399412A
Authority
CN
China
Prior art keywords
corner
point
image
sub
points
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.)
Pending
Application number
CN201810187810.0A
Other languages
Chinese (zh)
Inventor
潘鹏飞
孙厚广
栾辉
徐冬林
张�杰
张云洲
肖冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Angang Group Mining Co Ltd
Original Assignee
Angang Group Mining Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Angang Group Mining Co Ltd filed Critical Angang Group Mining Co Ltd
Priority to CN201810187810.0A priority Critical patent/CN108399412A/en
Publication of CN108399412A publication Critical patent/CN108399412A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明提出一种X型角点亚像素提取方法,属于图像处理技术领域,该方法以灰度图像左上角的像素点为原点建立坐标系,所述灰度图像的水平方向为X轴,垂直方向为Y轴,采用Harris算子对灰度图像进行角点检测;通过Harris算子确定角点的坐标位置,根据角点的坐标位置获得亚像素级角点坐标;以每个亚像素级角点为窗口中心并设置窗口边长,构建窗口,保留窗口内角点量最大的角点,并删除其它的角点;该方法可以滤掉图像中的伪角点,能够精确检测出图像中的角点,检测精度可以达到0.09个像素,该方法计算简单,对图像旋转、灰度变化、噪声影响和视点变换不敏感。

The invention proposes an X-shaped corner point sub-pixel extraction method, which belongs to the field of image processing technology. The method uses the pixel point in the upper left corner of the grayscale image as the origin to establish a coordinate system. The horizontal direction of the grayscale image is the X axis, and the vertical direction is the X axis. The direction is the Y axis, and the Harris operator is used to detect the corners of the gray image; the coordinates of the corners are determined by the Harris operator, and the sub-pixel-level corner coordinates are obtained according to the coordinates of the corners; The point is the center of the window and the side length of the window is set, the window is constructed, and the corner point with the largest amount of corner points in the window is retained, and other corner points are deleted; this method can filter out the false corner points in the image, and can accurately detect the corner points in the image points, the detection accuracy can reach 0.09 pixels, this method is simple to calculate, and is insensitive to image rotation, gray scale change, noise influence and viewpoint change.

Description

一种X型角点亚像素提取方法A method for sub-pixel extraction of X-shaped corner points

技术领域technical field

本发明属于图像处理技术领域,具体涉及一种X型角点亚像素提取方法。The invention belongs to the technical field of image processing, and in particular relates to an X-shaped corner point sub-pixel extraction method.

背景技术Background technique

随着科学技术的不断发展,摄像机也得到了飞速的发展,摄像机的种类以及功能也越来越多,人们也享受到了科技发展带来的各种便利。比如,人们可以利用将摄像机设置在车辆上,通过摄像机采集图像的方式获知停车场内的环境信息。With the continuous development of science and technology, cameras have also developed rapidly, and there are more and more types and functions of cameras, and people have also enjoyed various conveniences brought by the development of science and technology. For example, people can obtain the environmental information in the parking lot by setting the camera on the vehicle and collecting images through the camera.

目前的摄像机,在使用时需要对参数进行标定,以得到较为精确的参数,而参数计算直接受角点精确度影响,这就要求角点提取的精确度较高;传统的角点提取技术有基于段测试的角点检测方法,但是图像场景复杂,加上段测试的模板大小、灰度差阀值难以选择等原因,导致在检测X型角点的过程中,容易造成漏检、多检,出现较多伪角点。The current cameras need to calibrate the parameters to obtain more accurate parameters, and the calculation of parameters is directly affected by the accuracy of the corner points, which requires a higher accuracy of corner point extraction; traditional corner point extraction techniques have The corner detection method based on the segment test, but the image scene is complex, and the template size of the segment test, the threshold of the gray difference is difficult to choose, etc., resulting in the detection of X-shaped corner points, it is easy to cause missed detection, multiple detection, There are more false corners.

发明内容Contents of the invention

针对现有技术的不足,本发明提出一种X型角点亚像素提取方法,能够精确识别图像中X型角点,为摄像机精确标定提供保障。Aiming at the deficiencies of the prior art, the present invention proposes an X-shaped corner point sub-pixel extraction method, which can accurately identify the X-shaped corner point in the image, and provides guarantee for accurate calibration of the camera.

一种X型角点亚像素提取方法,包括以下步骤:A method for extracting X-shaped corner sub-pixels, comprising the following steps:

步骤1、将待处理图像转换为灰度图像;Step 1, converting the image to be processed into a grayscale image;

步骤2、以灰度图像左上角的像素点为原点建立坐标系,所述灰度图像的水平方向为X轴,垂直方向为Y轴,采用Harris算子对灰度图像进行角点检测;Step 2, establish a coordinate system with the pixel point in the upper left corner of the grayscale image as the origin, the horizontal direction of the grayscale image is the X axis, the vertical direction is the Y axis, and the Harris operator is used to detect the corners of the grayscale image;

步骤3、通过Harris算子确定角点的坐标位置,根据角点的坐标位置获得亚像素级角点坐标;Step 3, determine the coordinate position of the corner point through the Harris operator, and obtain the sub-pixel level corner point coordinates according to the coordinate position of the corner point;

步骤4、以每个亚像素级角点为窗口中心并设置窗口边长,构建窗口,保留窗口内角点量最大的角点,并删除其它的角点;Step 4. Take each sub-pixel-level corner point as the center of the window and set the window side length to construct the window, retain the corner point with the largest amount of corner points in the window, and delete other corner points;

步骤5、判断被测图像的角点个数是否已知,若是,则执行步骤6,否则执行步骤7;Step 5, judging whether the number of corner points of the image under test is known, if so, then perform step 6, otherwise perform step 7;

步骤6、将保留下来的角点按照角点量由大到小进行排序,根据图像已知角点的个数,选择排在前面的角点,完成图像X型角点亚像素的提取;Step 6. Sorting the retained corner points according to the amount of corner points from large to small, and selecting the corner point in front according to the number of known corner points in the image to complete the extraction of the X-shaped corner point sub-pixels of the image;

步骤7、判断保留下的角点的角点量是否大于设定阈值,若是,则保留,完成图像X型角点亚像素的提取;否则,删除。Step 7. Judging whether the amount of corner points of the retained corner points is greater than the set threshold, if so, keep them, and complete the extraction of the X-shaped corner point sub-pixels of the image; otherwise, delete them.

所述的X型角点,设X型角点p周围任意一点为q,则p点处的梯度与向量qp点积为零。For the X-shaped corner point, if any point around the X-shaped corner point p is q, then the dot product of the gradient at point p and the vector qp is zero.

本发明优点:Advantages of the present invention:

本发明提出一种X型角点亚像素提取方法,该方法可以滤掉图像中的伪角点,能够精确检测出图像中的角点,检测精度可以达到0.09个像素,该方法计算简单,对图像旋转、灰度变化、噪声影响和视点变换不敏感。The present invention proposes an X-shaped corner point sub-pixel extraction method, which can filter out false corner points in the image, and can accurately detect the corner points in the image, and the detection accuracy can reach 0.09 pixels. Insensitive to image rotation, grayscale changes, noise effects and viewpoint changes.

附图说明Description of drawings

图1为本发明一种实施例的X型角点亚像素提取方法流程图;Fig. 1 is a flow chart of an X-shaped corner point sub-pixel extraction method according to an embodiment of the present invention;

图2为本发明一种实施例的待处理图像;Fig. 2 is the image to be processed of an embodiment of the present invention;

图3为本发明一种实施例的待处理图像灰度图像;Fig. 3 is the grayscale image of the image to be processed in an embodiment of the present invention;

图4为本发明一种实施例的高斯图像;Fig. 4 is a Gaussian image of an embodiment of the present invention;

图5为本发明一种实施例的滤波和腐蚀后的灰度图像;Fig. 5 is the filtered and corroded grayscale image of an embodiment of the present invention;

图6为本发明一种实施例的利用Harris算子提取到的像素级坐标示意图;FIG. 6 is a schematic diagram of pixel-level coordinates extracted by using Harris operator according to an embodiment of the present invention;

图7为本发明一种实施例的利用Harris算子提取到的亚像素级坐标示意图;7 is a schematic diagram of sub-pixel-level coordinates extracted by a Harris operator according to an embodiment of the present invention;

图8为本发明一种实施例的亚像素级X型角点向量示意图;Fig. 8 is a schematic diagram of a sub-pixel level X-shaped corner point vector according to an embodiment of the present invention;

图9为本发明一种实施例的像素级角点经过删除的角点坐标示意图;FIG. 9 is a schematic diagram of corner point coordinates after deletion of pixel-level corner points according to an embodiment of the present invention;

图10为本发明一种实施例的亚像素级角点经过删除的角点坐标示意图;FIG. 10 is a schematic diagram of corner point coordinates after deletion of sub-pixel level corner points according to an embodiment of the present invention;

图11为本发明一种实施例的角点个数已知时亚像素级X型角点示意图;Fig. 11 is a schematic diagram of sub-pixel level X-shaped corner points when the number of corner points is known in an embodiment of the present invention;

图12为本发明一种实施例的角点个数未知时亚像素级X型角点示意图;Fig. 12 is a schematic diagram of sub-pixel level X-shaped corner points when the number of corner points is unknown according to an embodiment of the present invention;

图13为本发明一种实施例的根据像素级别的角点的提取结果示意图。Fig. 13 is a schematic diagram of an extraction result of corner points based on pixel level according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明一种实施例做进一步说明。An embodiment of the present invention will be further described below in conjunction with the accompanying drawings.

本发明实施例中,X型角点亚像素提取方法,方法流程图如图1所示,包括以下步骤:In the embodiment of the present invention, the X-shaped corner point sub-pixel extraction method, the flow chart of the method is shown in Figure 1, including the following steps:

步骤1、将待处理图像转换为灰度图像;Step 1, converting the image to be processed into a grayscale image;

本发明实施例中,Harris角点为图像上在任意两个垂直方向上灰度值变化都比较大的点。但是Harris算法是针对灰度图像进行处理提取其中角点的,所以首先将原始图像转换为灰度图像,图2是原图,图3是对应的灰度图像;In the embodiment of the present invention, the Harris corner point is a point on the image whose gray value changes relatively large in any two vertical directions. However, the Harris algorithm extracts the corner points from the grayscale image, so the original image is first converted into a grayscale image. Figure 2 is the original image, and Figure 3 is the corresponding grayscale image;

步骤2、以灰度图像左上角的点为原点建立坐标系,所述灰度图像的水平方向为X轴,垂直方向为Y轴,采用Harris算子对灰度图像进行角点检测;Step 2, establish a coordinate system with the point in the upper left corner of the grayscale image as the origin, the horizontal direction of the grayscale image is the X axis, the vertical direction is the Y axis, and the Harris operator is used to detect the corners of the grayscale image;

本发明实施例中,以图像中左上角的点为原点建立坐标系,其中,图像的水平方向为X轴,图像的垂直方向为Y轴,通过Harris算子进行角点检测,具体检测过程如下:In the embodiment of the present invention, a coordinate system is established with the point in the upper left corner of the image as the origin, wherein the horizontal direction of the image is the X axis, and the vertical direction of the image is the Y axis, and the corner point detection is performed through the Harris operator. The specific detection process is as follows :

步骤2-1、利用梯度算子计算x、y方向差值;Step 2-1, using the gradient operator to calculate the difference in x and y directions;

步骤2-2、利用图像中每个像素点的灰度计算图像中每个像素点的x轴、y轴方向的梯度Ix、IyStep 2-2, using the grayscale of each pixel in the image to calculate the gradients I x and I y in the x-axis and y-axis directions of each pixel in the image;

计算公式如下:Calculated as follows:

其中,公式(1)和公式(2)中,梯度算子可以是如表1所示的算子;Wherein, in formula (1) and formula (2), the gradient operator can be the operator shown in table 1;

表1Table 1

步骤2-3、分别计算图像中每个像素点在两个方向的梯度乘积Ix 2、Iy 2和IxyStep 2-3, respectively calculating the gradient products I x 2 , I y 2 and I xy of each pixel point in the image in two directions;

计算公式如下:Calculated as follows:

Ix 2=Ix*Ix (3)I x 2 =I x *I x (3)

Iy 2=Iy*Iy (4)I y 2 =I y *I y (4)

Ixy=Ix*Iy (5)I xy =I x *I y (5)

步骤2-4、利用高斯函数生成高斯核分别对Ix 2、Iy 2和Ixy滤波,高斯滤波器图像如图4所示;Step 2-4, use the Gaussian function to generate a Gaussian kernel to filter I x 2 , I y 2 and I xy respectively, and the Gaussian filter image is shown in Figure 4;

其中高斯函数公式为:The Gaussian function formula is:

其中,x表示水平方向,y表示竖直方向,σ为二维高斯曲线的标准差,g表示卷积,W为高斯滤波窗口。Among them, x represents the horizontal direction, y represents the vertical direction, σ is the standard deviation of the two-dimensional Gaussian curve, g represents the convolution, and W is the Gaussian filter window.

根据公式(6)至公式(9)计算每个像素点的角点量R,计算公式如下:According to formula (6) to formula (9), calculate the corner value R of each pixel point, the calculation formula is as follows:

本发明实施例中,从得到的角点量R中找出角点量R局部最大值对应的角点即为所需提取的X型角点;但是对于实际应用中有一类角点棱角明显,并非所需提取到的点,因此本发明实施例中,利用类似棋盘格的形状来进行,先对得到的灰度图像进行中值滤波和腐蚀操作,从而使图像形状的棱角不明显,减小我们不期望角点的R值从而将此类角点的角点特征弱化,同时避免了X型角点应滤波处理造成的模糊,使图像中X型角点的R值最高;图5就是经过滤波和腐蚀操作后的灰度图像。In the embodiment of the present invention, the corner point corresponding to the local maximum value of the corner point amount R is found from the obtained corner point amount R, which is the X-shaped corner point to be extracted; It is not the points that need to be extracted, so in the embodiment of the present invention, the shape similar to a checkerboard is used to perform median filtering and erosion operations on the obtained grayscale image, so that the edges and corners of the image shape are not obvious, reducing We do not expect the R value of the corners to weaken the corner features of such corners, and at the same time avoid the blur caused by the X-shaped corners that should be filtered, so that the R value of the X-shaped corners in the image is the highest; Figure 5 is after Grayscale image after filtering and erosion operations.

步骤3、通过Harris算子确定角点的坐标位置,根据角点的坐标位置获得亚像素级角点坐标;Step 3, determine the coordinate position of the corner point through the Harris operator, and obtain the sub-pixel level corner point coordinates according to the coordinate position of the corner point;

本发明实施例中,利用Harris算子确定角点的坐标位置,根据角点的坐标位置计算亚像素级的角点坐标,其中,设X型角点p,设p周围任意一点为q,则p点处的梯度与向量qP点积为零;利用Harris算子提取到的像素级坐标如图6所示,亚像素级坐标如图7所示;In the embodiment of the present invention, the Harris operator is used to determine the coordinate position of the corner point, and the sub-pixel-level corner point coordinates are calculated according to the coordinate position of the corner point, wherein, an X-shaped corner point p is set, and any point around p is set to q, then The dot product of the gradient at point p and the vector qP is zero; the pixel-level coordinates extracted by the Harris operator are shown in Figure 6, and the sub-pixel-level coordinates are shown in Figure 7;

本发明实施例中,由图7可以看出,用大白纸铺设的黑白格区域有且仅能检测到7个Harris角点,且检测的位置相对准确,其中7个角点中有一个是所需要的标记点。由于场景相对复杂,图6中也检测到了很多非标记的点,如位于图6场景即大白纸之外的点,且图6中角点的位置坐标只是像素级别,还需进一步提纯,得到亚像素级;In the embodiment of the present invention, it can be seen from Fig. 7 that there are and only 7 Harris corner points can be detected in the black and white grid area paved with large white paper, and the detected positions are relatively accurate, and one of the 7 corner points is the required markers. Due to the relatively complex scene, many non-marked points are also detected in Figure 6, such as the points located outside the scene in Figure 6, that is, the big white paper, and the position coordinates of the corner points in Figure 6 are only at the pixel level, and further purification is needed to obtain sub- pixel level;

本发明实施例中,由于p点处的梯度与向量qp点积为零,依据此定理,可以构造如图8所示的向量;In the embodiment of the present invention, since the dot product of the gradient at the point p and the vector qp is zero, according to this theorem, the vector shown in Figure 8 can be constructed;

本发明实施例中,角点区域附近点的位置可分为在边缘上和不在边缘上两种,在图8中,假设B点在边缘上,其灰度梯度向量垂直于向量OB,则与向量OB点积为0;A点不在边缘上,由于该点的灰度梯度向量为0,所以与向量OA点积也为0,可以用如下公式表示:In the embodiment of the present invention, the positions of points near the corner area can be divided into two types: on the edge and not on the edge. In Figure 8, assuming that point B is on the edge, its gray gradient vector perpendicular to the vector OB, then The dot product with vector OB is 0; point A is not on the edge, since the gray gradient vector of this point is 0, so The dot product with the vector OA is also 0, which can be expressed by the following formula:

其中,表示灰度梯度向量,表示图像原点到坐标点i的向量,表示图像原点到坐标点O的向量;in, Represents the gray gradient vector, Represents the vector from the origin of the image to the coordinate point i, Represents the vector from the origin of the image to the coordinate point O;

本发明实施例中,根据公式(11)可以在点O附近寻找多个点,计算所寻找的多个点的每个点的灰度梯度向量以及组成方程组,可以求解方程组,得到角点O亚像素级精度的坐标值,以完成图像中角点亚像素的提取,亚像素级坐标如图7所示。In the embodiment of the present invention, according to the formula (11), multiple points can be found near point O, and the gray gradient vector of each point of the multiple points that are found can be calculated as well as Composing a system of equations can solve the system of equations to obtain the coordinate value of the sub-pixel level precision of the corner point O to complete the extraction of the sub-pixel of the corner point in the image. The sub-pixel level coordinates are shown in Figure 7.

步骤4、以每个亚像素级角点为窗口中心并设置窗口边长,构建窗口,保留窗口内角点量最大的角点,并删除其它的角点;Step 4. Take each sub-pixel-level corner point as the center of the window and set the window side length to construct the window, retain the corner point with the largest amount of corner points in the window, and delete other corner points;

本发明实施例中,对于找到的角点,经常会出现角点聚集的情况,图6和图7也可以很清楚的看到这一点,将这种类型的角点称为重复角点,需要在角点聚集的地方选取一个R值最大的角点;具体做法如下:In the embodiment of the present invention, for the found corner points, corner points often gather, which can also be clearly seen in Figure 6 and Figure 7, and this type of corner point is called a repeated corner point, which needs to Select a corner point with the largest R value at the place where the corner points gather; the specific method is as follows:

以找出的每个角点为窗口中心,设置大小为n×n窗口,找出该n×n窗口内中每个像素点的角点量的最大值对应的角点同时删除其它的角点,根据具体的图像大小选取合适的n值,本发明实施例中n取5,单位为像素;图9是图6经过删除之后的结果,图10是图7经过删除之后的结果;Take each found corner point as the center of the window, set the size as an n×n window, find the corner point corresponding to the maximum value of the corner point value of each pixel in the n×n window, and delete other corner points at the same time , select a suitable n value according to the specific image size, n is 5 in the embodiment of the present invention, and the unit is a pixel; Figure 9 is the result after deletion in Figure 6, and Figure 10 is the result after deletion in Figure 7;

根据白纸上实际的角点位置,利用亚像素提取出的角点坐标准确度有了很大的提高,更加靠近实际的角点,角点位置更加精准。According to the actual corner position on the white paper, the accuracy of the corner coordinates extracted by using sub-pixels has been greatly improved, and it is closer to the actual corner point, and the corner position is more accurate.

步骤5、判断被测图像的角点个数是否已知,若是,则执行步骤6,否则执行步骤7;Step 5, judging whether the number of corner points of the image under test is known, if so, then perform step 6, otherwise perform step 7;

步骤6、将保留下来的角点按照角点量由大到小进行排序,根据图像已知角点的个数,选择排在前面的角点,完成图像X型角点亚像素的提取;Step 6. Sorting the retained corner points according to the amount of corner points from large to small, and selecting the corner point in front according to the number of known corner points in the image to complete the extraction of the X-shaped corner point sub-pixels of the image;

本发明实施例中,角点是通过计算角点量R值得到的,X型角点R值要比轮廓上的角点的R值要大,因此当已知图像中角点个数N的时候,将图像中所有角点按R值得大小进行排序,选择前N个角点即为X型角点;本发明实施例中,地板上铺了4张白纸,因此设置N为4,即已知有4个X型角点;In the embodiment of the present invention, the corner point is obtained by calculating the R value of the corner point, and the R value of the X-shaped corner point is larger than the R value of the corner point on the contour, so when the number N of corner points in the known image is At this time, all the corner points in the image are sorted according to the value of R, and the first N corner points are selected as the X-shaped corner points; in the embodiment of the present invention, 4 sheets of white paper are laid on the floor, so N is set to 4, namely It is known that there are 4 X-shaped corner points;

步骤7、判断保留下的角点的角点量是否大于设定阈值,若是,则保留,完成图像X型角点亚像素的提取;否则,删除。Step 7. Judging whether the amount of corner points of the retained corner points is greater than the set threshold, if so, keep them, and complete the extraction of the X-shaped corner point sub-pixels of the image; otherwise, delete them.

本发明实施例中,利用Harris算子提取角点的时候设置阈值,当该点的R值大于阈值的时,将它当做角点,当该点的R值小于阈值的时候,它就不是角点。针对X型角点,它们的R值普遍偏大,因此,本发明实施例中,在设置阈值的时候将阈值适当提高就可以只提取出X型角点;阈值的选择要做到既不漏掉X型角点,又不能将非X型角点提取出来。In the embodiment of the present invention, a threshold is set when using the Harris operator to extract corner points. When the R value of the point is greater than the threshold, it is regarded as a corner point. When the R value of the point is smaller than the threshold, it is not a corner. point. For X-shaped corners, their R values are generally too large. Therefore, in the embodiment of the present invention, when setting the threshold, the threshold can be appropriately increased to extract only X-shaped corners; the selection of the threshold should be done without missing The X-shaped corner points cannot be extracted, and the non-X-shaped corner points cannot be extracted.

针对上面的两种方法都进行了实验,图11是角点个数已知得到的结果,图12是角点个数未知得到的结果;由结果可以看出,两种方法提取到的X型角点一致,而且符合实际的情况,对于复杂背景的X型角点的提取有很好的效果;同样,利用上面两种方法对像素级角点进行提取,也得到了相同的结果,图13是根据像素级别的角点的提取结果;将两者进行对比发现,亚像素级X型角点位置更准确,更符合实际情况。Experiments have been carried out for the above two methods. Figure 11 is the result obtained with the known number of corner points, and Figure 12 is the result obtained with the unknown number of corner points; it can be seen from the results that the X-type extracted by the two methods The corner points are consistent and in line with the actual situation, and have a good effect on the extraction of X-shaped corner points in complex backgrounds; similarly, the above two methods are used to extract pixel-level corner points, and the same results are obtained, as shown in Figure 13 It is based on the pixel-level corner point extraction results; comparing the two, it is found that the sub-pixel-level X-shaped corner point position is more accurate and more in line with the actual situation.

Claims (2)

1.一种X型角点亚像素提取方法,其特征在于,包括以下步骤:1. A method for extracting X-type corner sub-pixels is characterized in that, comprising the following steps: 步骤1、将待处理图像转换为灰度图像;Step 1, converting the image to be processed into a grayscale image; 步骤2、以灰度图像左上角的像素点为原点建立坐标系,所述灰度图像的水平方向为X轴,垂直方向为Y轴,采用Harris算子对灰度图像进行角点检测;Step 2, establish a coordinate system with the pixel point in the upper left corner of the grayscale image as the origin, the horizontal direction of the grayscale image is the X axis, the vertical direction is the Y axis, and the Harris operator is used to detect the corners of the grayscale image; 步骤3、通过Harris算子确定角点的坐标位置,根据角点的坐标位置获得亚像素级角点坐标;Step 3, determine the coordinate position of the corner point through the Harris operator, and obtain the sub-pixel level corner point coordinates according to the coordinate position of the corner point; 步骤4、以每个亚像素级角点为窗口中心并设置窗口边长,构建窗口,保留窗口内角点量最大的角点,并删除其它的角点;Step 4. Take each sub-pixel-level corner point as the center of the window and set the window side length to construct the window, retain the corner point with the largest amount of corner points in the window, and delete other corner points; 步骤5、判断被测图像的角点个数是否已知,若是,则执行步骤6,否则执行步骤7;Step 5, judging whether the number of corner points of the image under test is known, if so, then perform step 6, otherwise perform step 7; 步骤6、将保留下来的角点按照角点量由大到小进行排序,根据图像已知角点的个数,选择排在前面的角点,完成图像X型角点亚像素的提取;Step 6. Sorting the retained corner points according to the amount of corner points from large to small, and selecting the corner point in front according to the number of known corner points in the image to complete the extraction of the X-shaped corner point sub-pixels of the image; 步骤7、判断保留下的角点的角点量是否大于设定阈值,若是,则保留,完成图像X型角点亚像素的提取;否则,删除。Step 7. Judging whether the amount of corner points of the retained corner points is greater than the set threshold, if so, keep them, and complete the extraction of the X-shaped corner point sub-pixels of the image; otherwise, delete them. 2.根据权利要求1所述的X型角点亚像素提取方法,其特征在于,所述的X型角点,设X型角点p周围任意一点为q,则p点处的梯度与向量qp点积为零。2. X-type corner point sub-pixel extraction method according to claim 1, is characterized in that, described X-type corner point, if any point around X-type corner point p is q, then the gradient and vector at p point place The qp dot product is zero.
CN201810187810.0A 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method Pending CN108399412A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810187810.0A CN108399412A (en) 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810187810.0A CN108399412A (en) 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method

Publications (1)

Publication Number Publication Date
CN108399412A true CN108399412A (en) 2018-08-14

Family

ID=63092635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810187810.0A Pending CN108399412A (en) 2018-03-07 2018-03-07 A kind of X-type angular-point sub-pixel extracting method

Country Status (1)

Country Link
CN (1) CN108399412A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487594A (en) * 2021-07-22 2021-10-08 上海嘉奥信息科技发展有限公司 Sub-pixel angular point detection method, system and medium based on deep learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100177966A1 (en) * 2009-01-14 2010-07-15 Ruzon Mark A Method and system for representing image patches
CN102169578A (en) * 2011-03-16 2011-08-31 内蒙古科技大学 Non-rigid medical image registration method based on finite element model
CN103345755A (en) * 2013-07-11 2013-10-09 北京理工大学 Chessboard angular point sub-pixel extraction method based on Harris operator
CN103996191A (en) * 2014-05-09 2014-08-20 东北大学 Detection method for black and white checkerboard image corners based on least square optimization
CN104517276A (en) * 2013-09-28 2015-04-15 沈阳新松机器人自动化股份有限公司 Checker corner detection method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100177966A1 (en) * 2009-01-14 2010-07-15 Ruzon Mark A Method and system for representing image patches
CN102169578A (en) * 2011-03-16 2011-08-31 内蒙古科技大学 Non-rigid medical image registration method based on finite element model
CN103345755A (en) * 2013-07-11 2013-10-09 北京理工大学 Chessboard angular point sub-pixel extraction method based on Harris operator
CN104517276A (en) * 2013-09-28 2015-04-15 沈阳新松机器人自动化股份有限公司 Checker corner detection method
CN103996191A (en) * 2014-05-09 2014-08-20 东北大学 Detection method for black and white checkerboard image corners based on least square optimization

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SENIT_CO: "图像特征之Harris角点检测", 《HTTPS://SENITCO.GITHUB.IO/2017/06/18/IMAGE-FEATURE-HARRIS/》 *
孟偲等: "具有方向特性的X角点的亚像素检测定位", 《北京航空航天大学学报》 *
徐甲: "一种用于无人机航空相机标定的角点检测算法", 《桂林航天工业高等专科学校学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113487594A (en) * 2021-07-22 2021-10-08 上海嘉奥信息科技发展有限公司 Sub-pixel angular point detection method, system and medium based on deep learning
CN113487594B (en) * 2021-07-22 2023-12-01 上海嘉奥信息科技发展有限公司 Sub-pixel corner detection method, system and medium based on deep learning

Similar Documents

Publication Publication Date Title
CN108629775B (en) A kind of hot high-speed wire surface image processing method
JP5699788B2 (en) Screen area detection method and system
CN109859226B (en) Detection method of checkerboard corner sub-pixels for graph segmentation
CN103345755B (en) A kind of Chessboard angular point sub-pixel extraction based on Harris operator
CN106530271B (en) A kind of infrared image conspicuousness detection method
CN107045634B (en) Text positioning method based on maximum stable extremum region and stroke width
CN104700421A (en) Edge detection algorithm based on canny self-adaptive threshold value
CN103955949B (en) Moving target detecting method based on Mean-shift algorithm
CN111126174A (en) Visual detection method for robot to grab parts
CN104091324A (en) Quick checkerboard image feature matching algorithm based on connected domain segmentation
CN108537787B (en) A Quality Judgment Method of Face Image
CN111597941B (en) A target detection method for dam defect images
CN110569857A (en) A Method of Image Contour Corner Detection Based on Centroid Distance Calculation
CN105023265A (en) Checkerboard angular point automatic detection method under fish-eye lens
CN108895959A (en) A kind of camera calibration plate angle point calculating method based on sub-pix
CN105678737A (en) Digital image corner point detection method based on Radon transform
CN112991374A (en) Canny algorithm-based edge enhancement method, device, equipment and storage medium
CN110533713A (en) Bridge Crack width high-precision measuring method and measuring device
CN108492306A (en) A kind of X-type Angular Point Extracting Method based on image outline
CN106529548A (en) Sub-pixel level multi-scale Harris corner detection algorithm
CN109242917A (en) One kind being based on tessellated camera resolution scaling method
CN110516527B (en) Visual SLAM loop detection improvement method based on instance segmentation
CN106022337A (en) Planar object detection method based on continuous edge characteristic
CN106600615A (en) Image edge detection algorithm evaluation system and method
CN109977910A (en) Bill method for rapidly positioning and its system based on colored line segment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180814