[go: up one dir, main page]

CN104021568B - Automatic registering method of visible lights and infrared images based on polygon approximation of contour - Google Patents

Automatic registering method of visible lights and infrared images based on polygon approximation of contour Download PDF

Info

Publication number
CN104021568B
CN104021568B CN201410294262.3A CN201410294262A CN104021568B CN 104021568 B CN104021568 B CN 104021568B CN 201410294262 A CN201410294262 A CN 201410294262A CN 104021568 B CN104021568 B CN 104021568B
Authority
CN
China
Prior art keywords
contour
image
point
pixel
transformation
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
Application number
CN201410294262.3A
Other languages
Chinese (zh)
Other versions
CN104021568A (en
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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN201410294262.3A priority Critical patent/CN104021568B/en
Publication of CN104021568A publication Critical patent/CN104021568A/en
Application granted granted Critical
Publication of CN104021568B publication Critical patent/CN104021568B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to an automatic registering method of visible lights and infrared images based on polygon approximation of a contour, belonging to the field of multi-source image registration. The method mainly comprises the following five steps: I, applying an edge detection operator and contour tracing algorithm to extract a main contour of an image; II, carrying out polygon approximation on the extracted contour; III, matching the fitted contour and selecting control points; IV, selecting an image transformation model and estimating transformation parameters; and V, carrying out corresponding transformation and interpolation operation to input images according to the transformation parameters. The method provided by the invention is high in registering precision and fast in speed and can effectively solve the automatic registering problem of visible lights and infrared images under rigid body transformation.

Description

基于轮廓多边形拟合的可见光与红外图像的自动配准方法Automatic Registration Method of Visible Light and Infrared Images Based on Contour Polygon Fitting

技术领域technical field

本发明涉及基于轮廓多边形拟合的可见光与红外图像的自动配准方法,属于多源图像配准领域。The invention relates to an automatic registration method of visible light and infrared images based on contour polygon fitting, and belongs to the field of multi-source image registration.

背景技术Background technique

区别于单传感器图像,来自不同传感器的可见光与红外图像在灰度值、图像对比度、敏感目标等方面存在较大差异,这增加了图像配准的难度和复杂度。常见的图像配准方法分为两类:基于图像灰度的方法和基于图像特征的方法。由于不同传感器获取的图像灰度特征不一致,因此很难运用基于图像灰度的配准方法对这类图像进行配准。而基于特征的配准方法能够提取图像的显著特征,如轮廓、角点等,压缩了图像信息量,配准速度快,且对图像灰度变换具有鲁棒性。随着多源图像融合技术的发展,基于图像特征的配准方法在图像配准领域有着广泛的应用。这类方法主要包括特征提取、特征匹配、选取变换模型及求取参数、坐标变换及插值等四个方面。Different from single-sensor images, visible light and infrared images from different sensors have large differences in gray value, image contrast, sensitive targets, etc., which increases the difficulty and complexity of image registration. Common image registration methods are divided into two categories: methods based on image grayscale and methods based on image features. Because the grayscale features of images acquired by different sensors are not consistent, it is difficult to register such images using image grayscale-based registration methods. The feature-based registration method can extract the salient features of the image, such as contours, corners, etc., compresses the amount of image information, has a fast registration speed, and is robust to image grayscale transformation. With the development of multi-source image fusion technology, registration methods based on image features have been widely used in the field of image registration. This kind of method mainly includes four aspects: feature extraction, feature matching, selection of transformation model and calculation of parameters, coordinate transformation and interpolation.

应用较多的线特征是轮廓特征。论文:Dai X L,Khorram S.A Feature-basedImage Registration Algorithm Using Improved Chain-code RepresentationCombined with Invariant Moments[J].IEEE Transactions on Geoscience and RemoteSensing,1999,37(5):2351-2362.提出一种多源图像基于轮廓的图像配准方法,只匹配输入图像的闭轮廓,根据匹配后的闭轮廓的质心来估计配准参数。该方法图像配准精度较高,但要求能够从输入图像中检测出较好的闭轮廓。当不能从输入图像中检测出匹配闭轮廓时,这种配准方法不适用。论文:Li H,Manjunath B S,Mitra S K.A Contour-basedApproach to Multisensor Image Registration[J].IEEE Transactions on ImagingProcessing,1995,4(3):320-334.提出了一种基于轮廓的多传感器图像配准方法,通过对开轮廓和闭轮廓分别匹配的方式,选取匹配开轮廓的角点和匹配闭轮廓的质心作为控制点。该方法充分利用了图像的开轮廓和闭轮廓信息,配准精度相对较高。但该方法算法复杂度较高,角点检测对配准精度影响较大。The most widely used line feature is the outline feature. Paper: Dai X L, Khorram S.A Feature-based Image Registration Algorithm Using Improved Chain-code Representation Combined with Invariant Moments[J].IEEE Transactions on Geoscience and RemoteSensing,1999,37(5):2351-2362. A multi-source image based on The contour image registration method only matches the closed contour of the input image, and estimates the registration parameters according to the centroid of the matched closed contour. This method has high accuracy of image registration, but it needs to be able to detect better closed contours from the input image. This registration method is not suitable when matching closed contours cannot be detected from the input image. Paper: Li H, Manjunath B S, Mitra S K.A Contour-based Approach to Multisensor Image Registration[J].IEEE Transactions on Imaging Processing,1995,4(3):320-334. Proposed a contour-based multisensor image registration method, by matching the open contour and the closed contour respectively, the corner points of the matching open contour and the centroid of the matching closed contour are selected as control points. This method makes full use of the open contour and closed contour information of the image, and the registration accuracy is relatively high. However, the algorithm complexity of this method is high, and the corner detection has a great influence on the registration accuracy.

发明内容Contents of the invention

本发明的目的是针对现有多源图像配准方法的不足,提出一种基于轮廓多边形拟合的可见光与红外图像的自动配准方法。The purpose of the present invention is to propose an automatic registration method of visible light and infrared images based on contour polygon fitting to address the shortcomings of existing multi-source image registration methods.

为实现上述目的,本发明采用下述技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种基于轮廓多边形拟合的可见光与红外图像的自动配准方法,包括以下步骤:A method for automatic registration of visible light and infrared images based on contour polygon fitting, comprising the following steps:

1).分别提取参考图像和待配准图像的主轮廓;1). Extract the main contours of the reference image and the image to be registered respectively;

2).经轮廓提取后的轮廓冗余点和噪声比较多,这不仅会增加匹配难度,而且对于复杂的轮廓,在配准的过程中更容易产生误差;需对提取的轮廓进行多边形拟合,将复杂的轮廓简化,剔除轮廓中的冗余点和噪声;2). After contour extraction, there are many redundant points and noises in the contour, which will not only increase the difficulty of matching, but also for complex contours, errors are more likely to occur during the registration process; polygon fitting is required for the extracted contours , simplify the complex outline, and remove redundant points and noise in the outline;

3).进行轮廓匹配及控制点选择;3). Contour matching and control point selection;

4).选取图像变换模型,根据控制点估算图像变换参数;4). Select the image transformation model and estimate the image transformation parameters according to the control points;

5).根据估算的变换参数,对待配准图像进行重采样和插值运算。对配准结果图像中的每个像素坐标,根据变换参数逐一计算其在待配准图像中的坐标,这很容易造成计算得到的像素点的坐标不全是整数,可采用插值运算来解决这个问题。5). Perform resampling and interpolation operations on the image to be registered according to the estimated transformation parameters. For each pixel coordinate in the registration result image, its coordinates in the image to be registered are calculated one by one according to the transformation parameters, which can easily cause the coordinates of the calculated pixels to be not all integers, and interpolation operations can be used to solve this problem .

所述步骤1)中的提取轮廓主要分为两部分:边缘检测和轮廓跟踪。以红外图像作为参考图像,可见光图像作为待配准图像。红外和可见光图像的灰度相似性虽然很低,但是它们有共同的目标信息,共同目标信息的轮廓相关性较大。利用Canny算子可检测出相关性较大的参考图像轮廓和待配准图像轮廓。采用Freeman链码来描述轮廓,通过轮廓跟踪将每个边界点的坐标和链码存储下来。链码方式描述轮廓需要记录轮廓的起点和轮廓上每一点相对于前一点的链码值列表。以8-领域链码为例,首先按照从左至右,从上至下的顺序查找轮廓起点;再按照逆时针方向左下、下、右下、右的顺序查找第二个轮廓点,然后按照左下、下、右下、右、右上、上、左上、左的顺序查找其它轮廓点,直到找到下一轮廓起点为止。跟踪出的轮廓长短不一,包含了很多杂乱的纹理边缘。为提高运行效率和获取最有利于匹配的有用轮廓,在轮廓跟踪过程中,结合轮廓的提取效果,可设置一个轮廓长度阈值TC,只保留超过该阈值的轮廓。The contour extraction in the step 1) is mainly divided into two parts: edge detection and contour tracking. The infrared image is used as the reference image, and the visible light image is used as the image to be registered. Although the gray similarity of infrared and visible light images is very low, they have common target information, and the contour correlation of common target information is relatively large. Canny operator can be used to detect the contours of the reference image and the contour of the image to be registered, which are highly correlated. Freeman chain code is used to describe the contour, and the coordinates and chain code of each boundary point are stored through contour tracking. The chain code way to describe the contour needs to record the starting point of the contour and the chain code value list of each point on the contour relative to the previous point. Take the 8-domain chain code as an example, first search the starting point of the contour in the order from left to right and from top to bottom; then search for the second contour point in the order of left bottom, bottom, right bottom and right in the counterclockwise direction, and then follow Search for other contour points in the order of lower left, lower, lower right, right, upper right, upper, upper left, and left until the starting point of the next contour is found. The traced outlines are of varying lengths and contain a lot of messy texture edges. In order to improve operating efficiency and obtain useful contours that are most conducive to matching, in the contour tracking process, combined with the contour extraction effect, a contour length threshold T C can be set, and only contours exceeding this threshold are retained.

所述步骤2)中的对轮廓进行多边形拟合采用的是一种迭代端点的拟合方法:详见论文:张帆,翟志华,张新红.图像处理中多边形拟合的快速算法[J].电脑开发与应用,2001,4(10):474-478.曲线拟合示意图如图1所示。在该拟合算法中,迭代次数越多,对轮廓的拟合精度就越高,拟合后的轮廓线就越接近原始轮廓线。该拟合算法拟合一条轮廓的主要步骤如下:In the step 2), what polygon fitting is carried out to the contour adopts a fitting method of iterative endpoints: see the paper for details: Zhang Fan, Zhai Zhihua, Zhang Xinhong. A fast algorithm for polygon fitting in image processing [J]. Computer Development and Application, 2001,4(10):474-478. The schematic diagram of curve fitting is shown in Figure 1. In this fitting algorithm, the more iterations, the higher the fitting accuracy of the contour, and the closer the fitted contour is to the original contour. The main steps of the fitting algorithm to fit a contour are as follows:

(1)设置一个距离阈值T;(1) Set a distance threshold T;

(2)选取轮廓线的起始点A和终止点B为拟合多边形的两个端点;(2) Select the starting point A and the ending point B of the contour line as two endpoints of the fitted polygon;

(3)计算在轮廓线AB上A、B两点间所有点到A、B连线的距离,选出这其中距离最大点C,并设此最大距离值为H;(3) Calculate the distance between all points between A and B on the contour line AB to the line connecting A and B, select the point C with the largest distance among them, and set the maximum distance as H;

(4)比较H和T,如果H>T,说明C是拟合多边形的一个端点,继续步骤(5);如果H<T,则跳出算法,说明该段轮廓线上不存在端点;(4) compare H and T, if H>T, illustrate that C is an end point of the fitting polygon, continue step (5); If H<T, then jump out of algorithm, illustrate that there is no end point on this segment contour line;

(5)端点C将轮廓线AB分为AC和BC两部分,按照(2)、(3)、(4)、(5)步骤,分别找出这两部分轮廓线上的端点;依此找出曲线AB上所有端点(A、B、C、D……),将它们按照顺序连接起来,即获得最后拟合的多边形,端点A、B、C、D……即为多边形顶点。(5) The endpoint C divides the contour line AB into two parts AC and BC, and finds out the endpoints of the two parts of the contour line according to (2), (3), (4), and (5) respectively; Get all the endpoints (A, B, C, D...) on the curve AB, and connect them in order to obtain the final fitted polygon. The endpoints A, B, C, D... are the vertices of the polygon.

所述步骤3)中的轮廓匹配采用的是链码匹配方式。一条数字化的轮廓曲线可以用八方向Freeman链码表示出来。如图2所示,Pi表示当前像素,i为像素索引值,Ci表示Pi的链码值,Ci∈{0,1,…,7}。如果Pi下一个像素在b6位置上,则Ci为6。设定参考图像和待配准图像分别为第一图像和第二图像,按照Freeman链码的编码方式,便能得到第一图像和第二图像中每条轮廓的链码,可将两图像多边形拟合后的轮廓用链码表示出来。The contour matching in the step 3) adopts a chain code matching method. A digitized contour curve can be represented by an eight-direction Freeman chain code. As shown in Figure 2, P i represents the current pixel, i is the pixel index value, C i represents the chain code value of P i , and C i ∈{0,1,…,7}. If the next pixel of P i is at position b 6 , then C i is 6. Set the reference image and the image to be registered as the first image and the second image respectively, and according to the encoding method of Freeman chain code, the chain code of each contour in the first image and the second image can be obtained, and the two images can be polygon The fitted contour is represented by chain code.

假设链码{ai}代表第一图像中一条长NA的轮廓A,链码{bi}代表第二图像中一条长NB的轮廓B;以A上第(k+1)个像素为起点、B上第(l+1)个像素为起点,分别截取长为n的轮廓段;其中,A上第(k+1)个像素对应的链码值为ak,B上第(l+1)个像素对应的链码值为bl;则两轮廓段的匹配度定义为:Suppose the chain code {a i } represents a contour A of length N A in the first image, and the chain code { bi } represents a contour B of length N B in the second image; the (k+1)th pixel on A is the starting point, and the (l+1)th pixel on B is the starting point, respectively intercepting the contour segments with length n; among them, the chain code value corresponding to the (k+1)th pixel on A is a k , and the ( The chain code value corresponding to l+1) pixels is b l ; then the matching degree of two contour segments is defined as:

式中,其中,i,j∈[0,n-1],Dkl n表示长度为n的A、B两轮廓段的匹配度,ak+j表示A上第(k+j+1)个像素的链码值,bl+j表示B上第(l+j+1)个像素的链码值;设置一匹配度阈值TD,当说明截取的两轮廓段是匹配的。In the formula, Among them, i,j∈[0,n-1], D kl n represents the matching degree of the two contour segments of A and B with length n, a k+j represents the (k+j+1)th pixel on A chain code value, b l+j represents the chain code value of the (l+j+1)th pixel on B; a matching degree threshold T D is set, when It shows that the two intercepted contour segments are matched.

为获取控制点,需要选择匹配轮廓上的匹配特征点。每条轮廓的特征是以特征点为中心的几段小轮廓特征的集合。因此,可以选择轮廓上特征点附近一定长度的轮廓段作为匹配单元,寻找在另一幅图像中的匹配轮廓段。即以轮廓上的特征点为中心,前后各选择TL个像素点组成长度为(2TL+1)的特征链码段,遍历另一幅图像,不断计算匹配度,选取大于TD的最大匹配度对应的特征轮廓段即为匹配轮廓段,对应的特征点即为匹配特征点。To obtain the control points, it is necessary to select the matching feature points on the matching contour. The feature of each contour is a collection of several small contour features centered on the feature point. Therefore, a contour segment of a certain length near the feature point on the contour can be selected as a matching unit to find a matching contour segment in another image. That is, take the feature point on the contour as the center, select T L pixel points before and after to form a feature chain code segment with a length of (2T L +1), traverse another image, continuously calculate the matching degree, and select the largest value greater than T D The feature contour segment corresponding to the matching degree is the matching contour segment, and the corresponding feature point is the matching feature point.

特征点的检测对图像的配准精度影响较大。观察提取的轮廓图像发现,轮廓特征点主要包括角点、切点和拐点。角点曲率较大,相对比较容易提取;切点和拐点曲率较小,较难提取。采用基于Freeman链码的角点检测方法,总会出现漏检,增加了各匹配阈值参数的设置难度。此外,当匹配的角点数量较少时,会降低图像的配准精度。角点检测算法详见:余博,郭雷,赵天云等.Freeman链码描述的曲线匹配方法[J].计算机工程与应用,2012,48(4):5-8.由多边形拟合过程可知,所有的角点、切点和拐点都包含在多边形顶点中。因此,可选择多边形顶点为特征点,不会出现漏检情况,而且配准效果会更好。具体操作流程图如图3所示。The detection of feature points has a great influence on the registration accuracy of images. Observing the extracted contour image, it is found that the contour feature points mainly include corner points, tangent points and inflection points. Corner points have large curvatures and are relatively easy to extract; tangent points and inflection points have small curvatures and are difficult to extract. Using the corner detection method based on Freeman chain code, there will always be missed detection, which increases the difficulty of setting the matching threshold parameters. In addition, when the number of matched corners is small, the registration accuracy of the image will be reduced. For the corner detection algorithm, see: Yu Bo, Guo Lei, Zhao Tianyun, etc. Curve matching method described by Freeman chain code [J]. Computer Engineering and Application, 2012, 48(4): 5-8. From the polygon fitting process we can see , all corner points, tangent points, and inflection points are included in the polygon vertices. Therefore, the vertices of the polygon can be selected as the feature points, and there will be no missed detection, and the registration effect will be better. The specific operation flow chart is shown in Figure 3.

所述步骤4)中变换模型采用刚体变换模型:Described step 4) transformation model adopts rigid body transformation model in:

其中,为待配准图像中控制点坐标,为参考图像中控制点坐标,Δx为水平位移,单位为像素;Δy为垂直位移,单位为像素;θ为旋转角度,单位为度。in, is the coordinates of the control points in the image to be registered, Δx is the horizontal displacement in pixels; Δy is the vertical displacement in pixels; θ is the rotation angle in degrees.

定义变换参数矩阵:待匹配图像控制点矩阵:参考图像控制点矩阵:其中m为匹配的控制点对数,m>2,且 ……、为相匹配的控制点对。可有:根据该式可计算出变换参数矩阵M。Define the transformation parameter matrix: The image control point matrix to be matched: Reference image control point matrix: Where m is the number of matched control point pairs, m>2, and and and ..., and for matching control point pairs. may have: According to this formula, the transformation parameter matrix M can be calculated.

采用裁剪的最小二乘算法来估算变换参数矩阵,该算法的主要步骤如下:A clipped least squares algorithm is used to estimate the transformation parameter matrix. The main steps of the algorithm are as follows:

(1)假设m对控制点组成集合P,计算P中全部点的变换矩阵M的最小二乘解为:(1) Assuming that m pairs of control points form a set P, the least squares solution to calculate the transformation matrix M of all points in P is:

(2)利用(1)中获得的变换矩阵M和矩阵X,得到估计值计算估计值与实际值中每对控制点估计值和实际值之间的误差:(2) Use the transformation matrix M and matrix X obtained in (1) to obtain the estimated value Calculate estimates with actual value The error between the estimated and actual values for each pair of control points in :

其中,为待配准图像中控制点i的实际值,为待配准图像中控制点i的估计值,i∈{1,2,…,m}。in, is the actual value of the control point i in the image to be registered, is the estimated value of the control point i in the image to be registered, i∈{1,2,…,m}.

(3)将上述误差最大Errormax对应的匹配控制点对删除,更新集合P′。再用更新的P′,用最小二乘方法计算新的变换矩阵M′。(3) Delete the pair of matching control points corresponding to the above-mentioned Error max , and update the set P′. Then use the updated P' to calculate a new transformation matrix M' using the least squares method.

(4)设置一个误差阈值TE,不断重复(2)、(3)。直到Errormax<TE,获得最终变换矩阵。(4) Set an error threshold T E , and repeat (2) and (3) continuously. Until Error max < T E , the final transformation matrix is obtained.

在外点数量未过半的情况下,裁剪的最小二乘方法有较强的容错能力,能够不断剔除外点,可以正确地估算出变换参数。When the number of outliers is less than half, the clipped least squares method has a strong error tolerance, can continuously eliminate outliers, and can correctly estimate the transformation parameters.

所述步骤5)中插值算法为双线性插值。获得变换参数后,需要利用变换参数对待配准图像进行相应的坐标变换。对配准结果图像中的每个像素坐标,根据变换参数逐一计算其在待配准图像中的坐标,这很容易造成计算得到的像素点的坐标不全是整数,可采用插值法来解决这个问题。双线性插值是一种计算量不大、能够在很大程度上消除锯齿现象、具有良好插值效果的插值方法。该方法的实质是用4个邻域整数点像素值权重来估算当前非整数点的像素值,算法示意图如图4所示。The interpolation algorithm in the step 5) is bilinear interpolation. After obtaining the transformation parameters, it is necessary to use the transformation parameters to perform corresponding coordinate transformation on the image to be registered. For each pixel coordinate in the registration result image, its coordinates in the image to be registered are calculated one by one according to the transformation parameters, which can easily cause the coordinates of the calculated pixel points to not all be integers, and interpolation method can be used to solve this problem . Bilinear interpolation is an interpolation method with a small amount of calculation, can eliminate aliasing to a large extent, and has good interpolation effect. The essence of this method is to use the pixel value weights of 4 neighborhood integer points to estimate the pixel value of the current non-integer point. The schematic diagram of the algorithm is shown in Figure 4.

表1Table 1

表1为本发明方法与文献Li H,Manjunath B S,Mitra S K.A Contour-basedApproach to Multisensor Image Registration[J].IEEE Transactions on ImagingProcessing,1995,4(3):320-334.及手动配准方法的实验对比结果。实验结果表明:本发明方法的参数估计最接近参数实际值。除此之外,本发明方法的RMSE最小。可见,与其他两种方法对比,本发明方法的配准精度是最高的。利用本发明方法对上述三幅待配准图像的配准结果如图9-11所示。Table 1 is the method of the present invention and literature Li H, Manjunath B S, Mitra S K.A Contour-basedApproach to Multisensor Image Registration [J]. IEEE Transactions on Imaging Processing, 1995, 4 (3): 320-334. and manual registration method Experimental comparison results. Experimental results show that the parameter estimation of the method of the present invention is closest to the actual value of the parameter. Besides, the RMSE of the method of the present invention is minimal. It can be seen that compared with the other two methods, the registration accuracy of the method of the present invention is the highest. The registration results of the above three images to be registered using the method of the present invention are shown in FIGS. 9-11 .

本发明配准精度高、速度快,可有效解决刚体变换下可见光图像与红外图像的自动配准问题。The invention has high registration precision and fast speed, and can effectively solve the problem of automatic registration of visible light images and infrared images under rigid body transformation.

附图说明Description of drawings

图1是曲线多边形拟合示意图;Fig. 1 is a schematic diagram of curve polygon fitting;

图2是Freeman链码方向值和链码指向示意图;Fig. 2 is a schematic diagram of Freeman chain code direction value and chain code direction;

图3是选择匹配的多边形顶点流程图;Fig. 3 is the polygon vertex flowchart of selection match;

图4是双线性插值示意图(●表示图像中的整数像素点);Fig. 4 is a schematic diagram of bilinear interpolation (Denotes integer pixels in the image);

图5是输入的红外图像;Fig. 5 is the input infrared image;

图6是输入的可见光图像;Figure 6 is the input visible light image;

图7是待配准图像一;Figure 7 is the first image to be registered;

图8是待配准图像二;Figure 8 is the second image to be registered;

图9是待配准图像三;Figure 9 is the third image to be registered;

图10是参考图像与待配准图像一轮廓匹配图(左是参考图像,右是待配准图像);Fig. 10 is a reference image and an image to be registered-contour matching diagram (the left is the reference image, the right is the image to be registered);

图11是参考图像与待配准图像二轮廓匹配图(左是参考图像,右是待配准图像);Fig. 11 is a two-contour matching diagram of a reference image and an image to be registered (the left is a reference image, and the right is an image to be registered);

图12是参考图像与待配准图像三轮廓匹配图(左是参考图像,右是待配准图像);Fig. 12 is a three-contour matching diagram of the reference image and the image to be registered (the left is the reference image, and the right is the image to be registered);

图13是待配准图像一的配准结果图;Fig. 13 is a registration result diagram of image 1 to be registered;

图14是待配准图像二的配准结果图;Fig. 14 is a registration result diagram of image 2 to be registered;

图15是待配准图像三的配准结果图。FIG. 15 is a registration result diagram of image three to be registered.

具体实施方式detailed description

下面结合附图和实例对本发明进行进一步说明。The present invention will be further described below in conjunction with accompanying drawings and examples.

步骤1:输入参考图像和待配准图像。如图5-6,是已知的两幅已配准的734×473红外图像和可见光图像。以红外图像作为参考图像,对可见光图像分别进行以下三种几何变换(1)逆时针旋转3度;(2)水平位移5,垂直位移5;(3)水平位移5,垂直位移5,逆时针旋转3°;获得三幅待配准图像,如图7-9所示。Step 1: Input the reference image and the image to be registered. As shown in Figure 5-6, there are two known registered 734×473 infrared images and visible light images. Taking the infrared image as a reference image, the following three geometric transformations are performed on the visible light image (1) counterclockwise rotation 3 degrees; (2) horizontal displacement 5, vertical displacement 5; (3) horizontal displacement 5, vertical displacement 5, counterclockwise Rotate 3°; obtain three images to be registered, as shown in Figure 7-9.

步骤2:分别提取参考图像和三幅待配准图像的轮廓信息。首先,用Canny算子对各图像进行边缘检测,获得参考图像和待配准图像相关信息较大的轮廓图像。然后,跟踪检测出的轮廓,将各边界点坐标存储下来。在此过程中,忽略图像中的短轮廓和孤点,只保留超过一定阈值长度TC的轮廓。这里TC=80,可见图10-12轮廓匹配图。若输入图像噪声较大,在边缘检测前需先对相应图像进行滤波去噪处理。Step 2: Extract the contour information of the reference image and the three images to be registered respectively. Firstly, use the Canny operator to detect the edge of each image, and obtain the contour image with relatively large relative information between the reference image and the image to be registered. Then, track the detected contour and store the coordinates of each boundary point. During this process, the short contours and isolated points in the image are ignored, and only the contours exceeding a certain threshold length T C are kept. Here T C =80, see Figure 10-12 contour matching diagram. If the input image is noisy, it is necessary to filter and denoise the corresponding image before edge detection.

步骤3:对提取轮廓进行多边形拟合。比较不同阈值时的拟合效果可知,T越大,拟合的曲线段变形越严重,特别是在原轮廓不平坦的区域。这里选择T=2,既能较好地剔除轮廓上的冗余点又能较大程度地保持原轮廓曲线的形状。同时,将各轮廓多边形拟合的顶点存储下来。这里选择多边形顶点作为轮廓的特征点。多边形顶点涵盖了角点、切点、拐点等常见的几种特征点,不存在漏检的问题。在多边形拟合的过程中就可以将特征点存储下来,降低了算法复杂度。Step 3: Perform polygon fitting on the extracted contour. Comparing the fitting effect at different thresholds, it can be seen that the larger T is, the more serious the deformation of the fitted curve segment is, especially in the area where the original contour is not flat. Here, T=2 is selected, which can not only eliminate redundant points on the contour but also maintain the shape of the original contour curve to a greater extent. At the same time, the vertices fitted by each outline polygon are stored. Here the polygon vertices are selected as the feature points of the contour. The polygon vertices cover several common feature points such as corner points, tangent points, and inflection points, and there is no problem of missed detection. The feature points can be stored during the polygon fitting process, which reduces the complexity of the algorithm.

步骤4:用Freeman链码对多边形拟合后的轮廓进行编码,并且选取以特征点为中心,前后TL个像素的长为(2TL+1)特征链码段作为匹配单元,进行轮廓匹配。设定参考图像和待配准图像分别为第一图像和第二图像,假设链码{ai}代表第一图像中一条长NA的轮廓A,链码{bi}代表第二图像中一条长NB的轮廓B;以A上第(k+1)个像素为起点、B上第(l+1)个像素为起点,分别截取长为n的轮廓段;其中,A上第(k+1)个像素对应的链码值为ak,B上第(l+1)个像素对应的链码值为bl;则两轮廓段的匹配度定义为:Step 4: Use the Freeman chain code to encode the contour after polygon fitting, and select the feature point as the center, and the length of T L pixels before and after is (2T L +1) feature chain code segment as the matching unit to perform contour matching . Set the reference image and the image to be registered as the first image and the second image respectively, assuming that the chain code {a i } represents a contour A of length N A in the first image, and the chain code {b i } represents the contour A in the second image A contour B of length N B ; with the (k+1)th pixel on A as the starting point and the (l+1)th pixel on B as the starting point, the contour segments with a length of n are intercepted respectively; wherein, the ( The chain code value corresponding to k+1) pixels is a k , and the chain code value corresponding to the (l+1)th pixel on B is b l ; then the matching degree of the two contour segments is defined as:

式中,其中,i,j∈[0,n-1],Dkl n表示长度为n的A、B两轮廓段的匹配度,ak+j表示A上第(k+j+1)个像素的链码值,bl+j表示B上第(l+j+1)个像素的链码值;设置一匹配度阈值TD,当说明截取的两轮廓段是匹配的。匹配轮廓段上对应的特征点即为匹配特征点。In the formula, Among them, i,j∈[0,n-1], D kl n represents the matching degree of the two contour segments of A and B with length n, a k+j represents the (k+j+1)th pixel on A chain code value, b l+j represents the chain code value of the (l+j+1)th pixel on B; a matching degree threshold T D is set, when It shows that the two intercepted contour segments are matched. The corresponding feature points on the matching contour segment are the matching feature points.

步骤5:选取图像变换模型并估计变换参数。这里假定参考图像与待配准图像间是刚体变换,刚体变换模型为:Step 5: Select the image transformation model and estimate the transformation parameters. Here it is assumed that there is a rigid body transformation between the reference image and the image to be registered, and the rigid body transformation model is:

其中,为待配准图像中控制点坐标,为参考图像中控制点坐标,Δx为水平位移,单位为像素;Δy为垂直位移,单位为像素;θ为旋转角度,单位为度。in, is the coordinates of the control points in the image to be registered, Δx is the horizontal displacement in pixels; Δy is the vertical displacement in pixels; θ is the rotation angle in degrees.

定义变换参数矩阵:待匹配图像控制点矩阵:参考图像控制点矩阵:其中m为匹配的控制点对数,m>2,且 ……、为相匹配的控制点对。可有: Define the transformation parameter matrix: The image control point matrix to be matched: Reference image control point matrix: Where m is the number of matched control point pairs, m>2, and and and ..., and for matching control point pairs. may have:

使用裁剪的最小二乘方法不断剔除误匹配的特征点,根据筛选出的控制点估算出图像的变换参数矩阵,如图10-12所示是三幅待配准图像的轮廓匹配结果图,其中用“■”表示筛选后匹配的控制点。Use the cropped least squares method to continuously eliminate the mismatched feature points, and estimate the transformation parameter matrix of the image according to the selected control points. Figure 10-12 shows the contour matching results of the three images to be registered. Use "■" to indicate the matched control points after filtering.

步骤6:根据计算出的变换参数,对三幅待配准图像进行重采样和插值运算。如图13-15所示为三幅待配准图像的配准结果图。Step 6: Perform resampling and interpolation operations on the three images to be registered according to the calculated transformation parameters. Figure 13-15 shows the registration results of the three images to be registered.

步骤7:描述配准精度。用均方根误差来(RMSE)来描述配准精度。RMSE值越小,配准精度越高。RMSE的计算公式如下:Step 7: Describe the registration accuracy. The registration accuracy is described by root mean square error (RMSE). The smaller the RMSE value, the higher the registration accuracy. The calculation formula of RMSE is as follows:

式中,其中,n′是最终控制点对数,为保证实验中变换参数的正确求解,需保证n′>2;(xi,yi)是参考图像中的控制点坐标;是待配准图像中的控制点坐标;Δx为水平位移,单位为像素;Δy为垂直位移,单位为像素;θ为旋转角度,单位为度。In the formula, Among them, n′ is the logarithm of the final control points. In order to ensure the correct solution of the transformation parameters in the experiment, it is necessary to ensure that n′>2; ( xi , y i ) are the coordinates of the control points in the reference image; is the coordinate of the control point in the image to be registered; Δx is the horizontal displacement, the unit is pixel; Δy is the vertical displacement, the unit is pixel; θ is the rotation angle, the unit is degree.

本发明的内容只限于刚体变换下的可见光图像与红外图像的配准,对于其它变换模型,不在本发明的精神和原则之内。The content of the present invention is limited to the registration of visible light images and infrared images under rigid body transformation, and other transformation models are not within the spirit and principle of the present invention.

表1Table 1

表1为本发明方法与文献Li H,Manjunath B S,Mitra S K.A Contour-basedApproach to Multisensor Image Registration[J].IEEE Transactions on ImagingProcessing,1995,4(3):320-334.及手动配准方法的实验对比结果。实验结果表明:本发明方法的参数估计最接近参数实际值。除此之外,本发明方法的RMSE最小。可见,与其他两种方法对比,本发明方法的配准精度是最高的。利用本发明方法对上述三幅待配准图像的配准结果如图9-11所示。除此之外,本发明对输入图像的闭轮廓提取数量没有要求。Table 1 is the method of the present invention and literature Li H, Manjunath B S, Mitra S K.A Contour-basedApproach to Multisensor Image Registration [J]. IEEE Transactions on Imaging Processing, 1995, 4 (3): 320-334. and manual registration method Experimental comparison results. Experimental results show that the parameter estimation of the method of the present invention is closest to the actual value of the parameter. Besides, the RMSE of the method of the present invention is minimal. It can be seen that compared with the other two methods, the registration accuracy of the method of the present invention is the highest. The registration results of the above three images to be registered using the method of the present invention are shown in FIGS. 9-11 . Besides, the present invention has no requirement on the number of closed contour extractions of the input image.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, those skilled in the art do not need to pay creative work Various modifications or variations that can be made are still within the protection scope of the present invention.

Claims (5)

1. A method for automatically registering visible light and infrared images based on contour polygon fitting is characterized by comprising the following steps:
1) respectively extracting main outlines of the reference image and the image to be registered;
extracting a main contour, dividing the main contour into an edge detection part and a contour tracking part, carrying out edge detection by adopting a Canny operator which is best in noise suppression and edge positioning compromise, and tracking all contours in a counterclockwise direction;
2) performing polygon fitting on the main profile extracted in the step 1) by adopting an iterative endpoint fitting algorithm, simplifying the complex profile on the premise of keeping the profile characteristics, and removing redundant points and noise in the profile;
3) matching the fitted contours and selecting control points; in order to obtain the control points, matching feature points on the matching contour need to be selected, and polygon vertexes are selected as the feature points;
4) selecting an image transformation model, and estimating image transformation parameters according to the control points;
5) resampling the image to be registered and carrying out interpolation operation;
and (4) calculating coordinates of each pixel in the registration result image one by one according to the transformation parameters obtained in the step 4), and obtaining the gray value of each pixel in the registration result image by using an interpolation algorithm.
2. The method for automatic registration of visible and infrared images based on contour polygon fitting according to claim 1, characterized in that: the extraction quantity of the closed contours of the input images in the step 1) is not required, and the automatic registration of the visible light images and the infrared images under rigid body transformation can be realized under the condition of obtaining the clear main contours of the images.
3. The method for automatic registration of visible and infrared images based on contour polygon fitting according to claim 1, characterized in that: performing polygon fitting on the extracted main profile by adopting an iterative endpoint fitting algorithm in the step 2), wherein the method for fitting one profile mainly comprises the following steps:
(1) setting a distance threshold T;
(2) selecting a starting point A and an end point B of a contour line as two end points of a fitting polygon;
(3) calculating the distance from all points A, B on the contour line AB to the connecting line A, B, selecting the point C with the maximum distance, and setting the maximum distance value as H;
(4) comparing H and T, if H > T, indicating that C is an end point of the fitting polygon, and continuing to the step (5); if H is less than T, jumping out of the algorithm, and showing that no end point exists on the section of contour line;
(5) the end point C divides the contour line AB into an AC part and a BC part, and the end points on the contour lines of the two parts are respectively found out according to the steps (2), (3), (4) and (5); all the endpoints on the curve AB are found out (A, B, C, D … …), and are connected in sequence to obtain the final fitting polygon, and the endpoint A, B, C, D … … is the polygon vertex.
4. The method for automatic registration of visible and infrared images based on contour polygon fitting according to claim 1, characterized in that: the outline matching in the step 3) adopts a chain code matching mode;
firstly, according to the coding mode of the Freeman chain code, representing each fitted outline by the Freeman chain code; setting a reference image and an image to be registered as a first image and a second image respectively, and assuming a chain code { a }iRepresents a length N in the first imageAProfile A of (1), chain code { b }iRepresents a length N in the second imageBThe profile B of (A); respectively intercepting a contour segment with the length of n by taking the (k +1) th pixel on A as a starting point and the (l +1) th pixel on B as a starting point; wherein, the chain code value corresponding to the (k +1) th pixel on A is akAnd the (l +1) th pixel on B corresponds to the chain code value Bl(ii) a The matching degree of the two contour segments is defined as:
in the formula,wherein i, j ∈ [0, n-1 ]],Dkl nDenotes the degree of match, a, of A, B two contour segments of length nk+jDenotes the chain code value of the (k + j +1) th pixel on A, bl+jA chain code value representing the (l + j +1) th pixel on B; setting a matching degree threshold TDWhen is coming into contact withDescription interceptionThe two profile segments of (a) are matched;
the feature of each contour is a set of several sections of small contour features taking a feature point as a center, so that a contour section near the feature point can be selected as a matching unit to search for a matching contour section in another image; and (3) taking the polygon vertex in the step 2) as the center, selecting the same number of pixels from the front and the back of the contour to form a feature contour segment, and searching a matched contour segment in the other image through contour matching degree calculation, wherein the corresponding feature point is the matched feature point.
5. The method for automatic registration of visible and infrared images based on contour polygon fitting according to claim 1, characterized in that: in the step 4), the forward transformation from the pixel points of the image to be registered to the pixel points of the registration result image cannot ensure that each pixel point of the image to be matched has a corresponding pixel point in the registration result image, namely, an unassigned pixel point may appear in the registration result image; in order to avoid the situation, inverse transformation is adopted, namely, for each pixel point in the reference image, the pixel point corresponding to the pixel point in the image to be registered is solved reversely;
the rigid body transformation model is:
wherein,for the coordinates of the control points in the image to be registered,coordinates of control points in the reference image; Δ x is the horizontal displacement in pixels; Δ y is the vertical displacement in pixels; theta is a rotation angle in degrees;
defining a transformation parameter matrix:controlling a point matrix of the image to be matched:reference picture control point matrix:wherein m is the logarithm of matched control points, m > 2, andand andandthe control points are matched control point pairs;
estimating a transformation parameter matrix by using a cutting least square algorithm, wherein the algorithm mainly comprises the following steps:
(1) assuming that M pairs of control points form a set P, calculating the least square solution of the transformation matrix M of all the points in P as:
(2) obtaining an estimated value by using the transformation matrix M and the matrix X obtained in (1)Calculating an estimateAnd the actual valueError between the estimated value and the actual value of each control point:
wherein,for the actual value of the control point i in the image to be registered,an estimated value of a control point i in the image to be registered, i ∈ {1,2, …, m };
(3) the Error is maximized ErrormaxDeleting the corresponding matching control point pair, and updating the set P'; then, calculating a new transformation matrix M 'by using the updated P' and a least square method;
(4) setting an error threshold TEContinuously repeating the steps (2) and (3); up to Errormax<TEObtaining a final transformation matrix;
under the condition that the number of the outliers is not more than half, the least square algorithm of cutting has stronger fault-tolerant capability, can continuously remove the outliers, and correctly estimates the transformation parameters.
CN201410294262.3A 2014-06-25 2014-06-25 Automatic registering method of visible lights and infrared images based on polygon approximation of contour Expired - Fee Related CN104021568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410294262.3A CN104021568B (en) 2014-06-25 2014-06-25 Automatic registering method of visible lights and infrared images based on polygon approximation of contour

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410294262.3A CN104021568B (en) 2014-06-25 2014-06-25 Automatic registering method of visible lights and infrared images based on polygon approximation of contour

Publications (2)

Publication Number Publication Date
CN104021568A CN104021568A (en) 2014-09-03
CN104021568B true CN104021568B (en) 2017-02-15

Family

ID=51438306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410294262.3A Expired - Fee Related CN104021568B (en) 2014-06-25 2014-06-25 Automatic registering method of visible lights and infrared images based on polygon approximation of contour

Country Status (1)

Country Link
CN (1) CN104021568B (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447849A (en) * 2015-11-12 2016-03-30 北京建筑大学 Remote-sensing image segmentation water body polygon outline generalization method
CN106338263A (en) * 2016-08-30 2017-01-18 常州正易晟网络科技有限公司 Metalwork surface flatness detecting device and method
CN106353319A (en) * 2016-08-30 2017-01-25 常州正易晟网络科技有限公司 Device and method for automatically analyzing texture and process of sewing thread based on video recognition
CN106353288A (en) * 2016-08-30 2017-01-25 常州正易晟网络科技有限公司 Finished product chemical residue detection device and method based on fluorescent analysis
CN106504225A (en) * 2016-09-27 2017-03-15 深圳增强现实技术有限公司 A kind of recognition methodss of regular polygon and device
CN106548467B (en) * 2016-10-31 2019-05-14 广州飒特红外股份有限公司 The method and device of infrared image and visual image fusion
CN107240128B (en) * 2017-05-09 2020-09-11 北京理工大学 X-ray and color photo registration method based on contour features
WO2018214151A1 (en) * 2017-05-26 2018-11-29 深圳配天智能技术研究院有限公司 Image processing method, terminal device and computer storage medium
CN107368828A (en) * 2017-07-24 2017-11-21 中国人民解放军装甲兵工程学院 High definition paper IMAQ decomposing system and method
CN107633528A (en) * 2017-08-22 2018-01-26 北京致臻智造科技有限公司 A kind of rigid body recognition methods and system
CN107845059A (en) * 2017-10-12 2018-03-27 北京宇航时代科技发展有限公司 Human meridian point's state dynamically normalized digital analysis system and method
CN108416839B (en) * 2018-03-08 2022-04-08 云南电网有限责任公司电力科学研究院 A method and system for three-dimensional reconstruction of contour lines of multiple X-ray rotating images
CN109166098A (en) * 2018-07-18 2019-01-08 上海理工大学 Work-piece burr detection method based on image procossing
CN110246173B (en) * 2018-08-14 2023-11-03 浙江大华技术股份有限公司 Method and device for judging shape area
CN109886878B (en) * 2019-03-20 2020-11-03 中南大学 Infrared image splicing method based on coarse-to-fine registration
CN110082355A (en) * 2019-04-08 2019-08-02 安徽驭风风电设备有限公司 A kind of wind electricity blade detection system
CN110245575B (en) * 2019-05-21 2023-04-25 东华大学 Human body type parameter capturing method based on human body contour line
CN110414470B (en) * 2019-08-05 2023-05-09 深圳市矽赫科技有限公司 Inspection method based on terahertz and visible light
CN110596120A (en) * 2019-09-06 2019-12-20 深圳新视智科技术有限公司 Glass boundary defect detection method, device, terminal and storage medium
CN110766730B (en) * 2019-10-18 2023-02-28 上海联影智能医疗科技有限公司 Image registration and follow-up evaluation method, storage medium and computer equipment
CN113409371B (en) * 2021-06-25 2023-04-07 浙江商汤科技开发有限公司 Image registration method and related device and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567979A (en) * 2012-01-20 2012-07-11 南京航空航天大学 Vehicle-mounted infrared night vision system and multi-source images fusing method thereof
CN103514606A (en) * 2013-10-14 2014-01-15 武汉大学 Heterology remote sensing image registration method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567979A (en) * 2012-01-20 2012-07-11 南京航空航天大学 Vehicle-mounted infrared night vision system and multi-source images fusing method thereof
CN103514606A (en) * 2013-10-14 2014-01-15 武汉大学 Heterology remote sensing image registration method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刚体变化下基于轮廓的多传感器图像匹配算法;陈桂友等;《系统工程与电子技术》;20070731;第29卷(第7期);第1节 *

Also Published As

Publication number Publication date
CN104021568A (en) 2014-09-03

Similar Documents

Publication Publication Date Title
CN104021568B (en) Automatic registering method of visible lights and infrared images based on polygon approximation of contour
CN109903327B (en) A target size measurement method for sparse point cloud
WO2022007431A1 (en) Positioning method for micro qr two-dimensional code
CN107845134B (en) A 3D reconstruction method of a single object based on a color depth camera
Geiger et al. Efficient large-scale stereo matching
CN108122256B (en) A method of it approaches under state and rotates object pose measurement
Kim et al. Adaptive smoothness constraints for efficient stereo matching using texture and edge information
JP6121776B2 (en) Image processing apparatus and image processing method
CN107833270A (en) Real-time object dimensional method for reconstructing based on depth camera
CN103700101B (en) Non-rigid brain image registration method
Lo et al. Joint trilateral filtering for depth map super-resolution
CN101334263A (en) Method for locating the center of a circular target
Chen et al. Robust affine-invariant line matching for high resolution remote sensing images
CN104992400B (en) Multi-spectrum image registration method and device
CN112785705B (en) Pose acquisition method and device and mobile equipment
CN104200461A (en) Mutual information image selected block and sift (scale-invariant feature transform) characteristic based remote sensing image registration method
US9727776B2 (en) Object orientation estimation
CN111105452B (en) Binocular vision-based high-low resolution fusion stereo matching method
CN108597009A (en) A method of objective detection is carried out based on direction angle information
CN106952312B (en) A logo-free augmented reality registration method based on line feature description
CN106778813B (en) The self-adaption cluster partitioning algorithm of depth image
CN107452030A (en) Method for registering images based on contour detecting and characteristic matching
CN107093182B (en) A Human Height Estimation Method Based on Feature Inflection Point
CN114820639A (en) Image processing method, device and equipment based on dynamic scene and storage medium
CN109767442B (en) Remote sensing image airplane target detection method based on rotation invariant features

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170215

Termination date: 20190625