Movatterモバイル変換


[0]ホーム

URL:


CN116433733B - Registration method and device between visible light image and infrared image of circuit board - Google Patents

Registration method and device between visible light image and infrared image of circuit board

Info

Publication number
CN116433733B
CN116433733BCN202310060353.XACN202310060353ACN116433733BCN 116433733 BCN116433733 BCN 116433733BCN 202310060353 ACN202310060353 ACN 202310060353ACN 116433733 BCN116433733 BCN 116433733B
Authority
CN
China
Prior art keywords
image
points
feature
point
entropy
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.)
Active
Application number
CN202310060353.XA
Other languages
Chinese (zh)
Other versions
CN116433733A (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.)
Hefei University of Technology
China National Electric Apparatus Research Institute Co Ltd
Original Assignee
Hefei University of Technology
China National Electric Apparatus Research Institute 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 Hefei University of Technology, China National Electric Apparatus Research Institute Co LtdfiledCriticalHefei University of Technology
Priority to CN202310060353.XApriorityCriticalpatent/CN116433733B/en
Publication of CN116433733ApublicationCriticalpatent/CN116433733A/en
Application grantedgrantedCritical
Publication of CN116433733BpublicationCriticalpatent/CN116433733B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开一种电路板的可见光图像与红外图像之间的配准方法及装置。配准方法为:采用图像区域分块统计信息熵,并根据阈值,提取其高熵信息区域作为后续检测特征点的原始图像,在提高特征点质量的同时提升检测效率;选用FAST+SIFT算法相结合的方法提取图像特征点;采用改进的SIFT特征点环形描述子;根据FLANN匹配法与改进的RANSAC算法,完成特征点匹配与误匹配剔除,从而实现图像的精匹配。本发明在图像匹配时,通过选择更能体现出图像特征的点进行匹配,在保证匹配精度的同时改善了传统SIFT算法在进行特征点提取时效率较慢,响应强度不高的问题,在配准效率与精度上相比于传统算法均有明显提高。

The present invention discloses a registration method and device between a visible light image and an infrared image of a circuit board. The registration method comprises the following steps: using image region block statistical information entropy, and extracting its high entropy information region as the original image for subsequent feature point detection based on a threshold value, thereby improving the quality of feature points while also improving detection efficiency; selecting a method combining the FAST+SIFT algorithm to extract image feature points; adopting an improved SIFT feature point annular descriptor; and completing feature point matching and false matching elimination based on the FLANN matching method and the improved RANSAC algorithm, thereby achieving precise image matching. During image matching, the present invention selects points that better reflect image features for matching, thereby ensuring matching accuracy while improving the problems of the traditional SIFT algorithm, which has slow efficiency and low response strength when extracting feature points. Compared with traditional algorithms, the registration efficiency and accuracy are significantly improved.

Description

Registration method and device between visible light image and infrared image of circuit board
Technical Field
The invention relates to an infrared and visible light image registration method based on combination of image entropy and an improved SIFT algorithm and a registration device adopting the registration method in the field of image processing, in particular to a registration method and a registration device between a visible light image and an infrared image of a circuit board.
Background
A large number of various circuit boards are used in various electronic products and various electric appliances, the application of the circuit boards is wider and wider, the mechanism and the function of the circuit boards are more and more complex, and when the circuit boards fail, a great deal of time and energy are required to be spent by the traditional contact diagnosis mode. Among them, the infrared thermal imaging detection technology is a non-contact detection technology, which has been successfully applied in many fields, and the fault detection of the circuit board is one of the important uses. When the circuit board works, different heat radiation exists in each element, the infrared image is obtained and then is subjected to image processing, the processed fault infrared image and the infrared image of the circuit board which is not faulty are subjected to characteristic comparison analysis, and the fault part and the fault element are judged through an intelligent algorithm.
Because the resolution of the infrared image is low, a lot of image information can be lost in the imaging process, so that the judgment of the fault position of the circuit board and components becomes extremely difficult, the optical imaging is clear, and the image information is complete. Therefore, the infrared image and the optical image are fused, so that the accurate detection of the fault defect distribution of the printed circuit board of the product can be realized, but the infrared image and the optical image cannot be directly fused due to different resolutions of the infrared thermal imager and the optical camera, different shooting angles and the like, and therefore, the registration algorithm of the infrared image and the visible light image needs to be studied.
Image registration is an important link in the field of image processing, and refers to the corresponding relation between images of the same scene at two different time points, and is a basic problem in the field of computer vision research and is also computer vision application. In recent years, image registration methods based on feature extraction have been rapidly developed, image registration based on feature points is most widely used in the field of image registration,
Among a plurality of image registration algorithms, the SIFT method has good invariance under the conditions of image rotation, scale transformation and affine transformation, and becomes the most stable algorithm at present, however, the SIFT method has limitations that the SIFT method needs to process a plurality of times of data volume of an original image, the generation process of a feature descriptor is quite complex, and the calculation amount is large when the feature is matched due to the fact that the dimension of the descriptor is high.
Disclosure of Invention
Aiming at the technical problems of difficult registration of infrared and visible light images and large calculation amount of a SIFT algorithm, the invention provides a SIFT registration method based on characteristic points, provides an infrared and optical image registration method based on combination of image entropy and the improved SIFT algorithm, optimizes the flow of the SIFT algorithm, improves the speed and the accuracy of the SIFT algorithm to a certain extent, and particularly relates to a registration method and a registration device between the visible light images and the infrared images of a circuit board.
The invention adopts the following technical scheme that the method for registering the visible light image and the infrared image of the circuit board comprises the following steps:
Step one, taking a visible light image and an infrared image of the circuit board as input images;
Step two, traversing the two input images by adopting non-overlapping sliding windows, dividing the windows, calculating the information entropy of the window area after division, defining the image local area higher than a given preset information entropy threshold as a high entropy area and the image local area lower than the given information entropy threshold as a low entropy area according to the histogram formed by the acquired information entropy, wherein the high entropy area is used for subsequent algorithm feature extraction to participate in feature point detection, and the low entropy area does not participate in feature point detection;
detecting characteristic points of the high-entropy areas screened out of the infrared image and the high-entropy areas screened out of the visible light image by adopting a SIFT+FAST algorithm, and screening out representative points as respective SIFT characteristic points;
Step four, respectively constructing annular descriptors for SIFT feature points detected by the two images, performing PCA dimension reduction processing, and respectively acquiring 64-dimensional feature vector descriptors of the visible light images and 64-dimensional feature vector descriptors of the infrared images;
And fifthly, taking Euclidean distance and cosine similarity as similarity measurement indexes of the two images, calculating Euclidean distance and cosine similarity of feature point feature vectors on the two images, adopting a nearest neighbor/secondary neighbor FLANN algorithm to perform initial matching on the reference image and the image to be matched, adopting a RANSAC algorithm to remove incorrect matching, and finally realizing the precise matching between the visible light image and the infrared image.
As a further improvement of the above solution, in the second step, the method for screening the high entropy area and the low entropy area by using the information entropy threshold includes the following steps:
Firstly, dividing a visible light image and an infrared image by adopting non-overlapping sliding windows, traversing each image by using a plurality of non-overlapping sliding windows, dividing each image according to the size of the window, and calculating the information entropy of each window area;
And secondly, according to a histogram formed by the acquired information entropy, setting a segmentation threshold, namely the information entropy threshold, screening a window area for calculating the information entropy, reserving a window area larger than the set information entropy threshold, extracting the characteristic points of a subsequent SIFT+FAST algorithm, and not detecting the characteristic points of the window area smaller than the information entropy threshold.
As a further improvement of the above scheme, for a two-dimensional image in discrete form, the calculation formula of the information entropy Pi,j is:
Pi,j=f(i,j)/W·h
Wherein W, H is the width and height of the picture respectively, (i, j) is a binary group, i represents the gray value of the center in a certain sliding window, j is the gray average value of the pixels except the center in the window, f (i, j) represents the number of times that the binary group appears in the whole image, and H is the two-dimensional gray entropy of the image.
As a further improvement of the above solution, in step three, a detection method for detecting feature points in a high entropy area screened out from each image by using sift+fast algorithm includes the following steps:
firstly, constructing a Gaussian scale space;
the gaussian scale space of an image is defined as a function L (x, y, σ):
L(x,y,σ)=G(x,y,σ)*I(x,y)
Wherein I (x, y) is an input image, G (x, y, sigma) is a variable-scale Gaussian function, (x, y) is a point coordinate on the image, sigma is a Gaussian blur coefficient, adjacent layers in each group are subtracted to obtain a Gaussian differential pyramid DOG, the subsequent extraction of characteristic points is carried out on the DOG pyramid, and the formula of a DOG operator D (x, y, sigma) is as follows:
D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ))*I(x,y)=L(x,y,kσ)-L(x,y,σ)
wherein k is a proportionality coefficient;
secondly, detecting and accurately positioning Gaussian scale space feature points;
Searching all scales and image positions in a Gaussian scale space, positioning extreme points on each layer of image of all scales, and determining that a circle is drawn with the radius of 3 by taking the point as the center, wherein when at least 12 pixel points in 16 pixel points on the edge are satisfied and are larger than Ix+T1 or are all smaller than Ix-T1, the point is regarded as a key point, and then the position and the scale of the key point are accurately determined by fitting a three-dimensional quadratic function, wherein Ix is the pixel value of a detection point, and T1 is a pixel range threshold;
Then, removing the points with low contrast and the points positioned at the edges of the image;
Removing the two unstable points by setting a contrast threshold and a Hessian matrix;
finally, calculating the direction of the feature points;
The method comprises the steps of utilizing gradient direction characteristics of neighborhood pixels of key points to realize rotation invariance of an image, sampling in a plurality of neighborhood windows taking characteristic points as centers, counting gradient directions of the neighborhood pixels by using a histogram, dividing the histogram into 8 directions by using the gradient histogram with the range of 0-360 degrees and one direction of every 45 degrees, namely, 8 gradient direction information of each characteristic point, wherein a peak value of the histogram represents a main direction of the neighborhood gradient at the characteristic point, namely, the main direction of the characteristic point, and smoothing the histogram by using a Gaussian function to reduce the influence of mutation, wherein in the gradient direction histogram, when another peak value which is equal to 80% of energy of a main peak value exists, the direction is regarded as an auxiliary direction of the characteristic point, and one characteristic point can be designated to have a plurality of directions, namely, one direction and more than one auxiliary direction, so as to enhance matching robustness.
Further, when removing points with low contrast and points located at the edges of the image, the extreme points are accurate to the sub-pixel level by using a fitting three-dimensional quadratic function, are substituted into the Taylor expansion, and only the first two terms are taken:
Wherein the method comprises the steps ofWherein represents the offset relative to the interpolated center coordinates (x, y);
the method comprises the steps of presetting a first contrast threshold, comparing and analyzing the contrast of an extreme point with the first contrast threshold, taking the extreme point with the contrast larger than the first contrast threshold as a feature point to be selected, presetting a second contrast threshold, wherein the second contrast threshold is larger than the first contrast threshold, and continuously storing the extreme point with the contrast larger than the second contrast threshold as the feature point to be selected;
Acquiring a Hessian matrix H (x, y) of the feature points to be selected:
Tr (H (x, y))=Dxx(x,y)+Dyy (x, y) represents the sum of characteristic values of the matrix H (x, y), det (H (x, y))=Dxx(x,y)Dyy(x,y)-(Dxy(x,y))2 represents a determinant of the matrix H (x, y), wherein the value of Dxx(x,y),Dxy(x,y),Dyy (x, y) is obtained by differentiating the corresponding positions of the neighborhood of candidate points, the principal curvature of Det (H (x, y)) is proportional to the characteristic values of H (x, y), and the formula is setRepresenting the ratio of the maximum characteristic value to the minimum characteristic value of H (x, y), thenIn order to detect whether the principal curvature is below a certain threshold T2, it is only necessary to detectIf the above formula is established, the feature point is rejected, otherwise, the feature point is reserved.
Further, the calculation method for calculating the direction of the feature point includes the steps of:
For the key points detected in the DOG pyramid, collecting the gradient and direction distribution characteristics of pixels in a 3 sigma neighborhood window of the Gaussian pyramid image, wherein the gradient has the following modulus value and direction:
θ(x,y)=tan-1((L(x,y+1)-L(x,y-1))/(L(x+1,y)-L(x-1,y)))
Wherein L (x, y) is a scale space value at (x, y) where the key point is located, L (x+1, y) is a scale space value at (x+1, y) where the key point is located, L (x-1, y) is a scale space value at (x-1, y) where the key point is located, L (x, y+1) is a scale space value at (x, y+1) where the key point is located, L (x, y-1) is a scale space value at (x, y-1) where the key point is located, m (x, y) is a gradient modulus value, and θ (x, y) is a gradient direction.
As a further improvement of the above solution, in step four, the method for acquiring the 64-dimensional annular feature vector descriptor of the two images includes the steps of:
For any one feature key point, taking the key point as the center of a circle in the scale space, and making a circle with a radius of 13, dividing the region into 8 concentric annular circles in a mode of radius of 2, 3, 4, 5, 6, 8, 10 and 13 pixel points as the gradient distribution weight of the pixel point farther from the center of the circle is smaller, so as to form 8 sub-regions, wherein the key point in each sub-region has 8 gradient directions, and therefore 8×8=64 data, namely 64-dimensional SIFT feature vectors are totally obtained.
As a further improvement of the above solution, in step five, the matching method for performing initial matching by using the FLANN algorithm combining euclidean distance and cosine similarity includes the following steps:
After SIFT feature vectors of the two images are generated, euclidean distance and cosine similarity between feature point feature vectors of the two images are calculated, the distance and direction between the feature vectors are used as similarity judging indexes, feature points with minimum distance and cosine similarity higher than a certain given threshold value are selected as initial matching points, a pair of correct matching points are judged according to the fact that the ratio of Euclidean distance between nearest neighbors to next nearest neighbors is smaller than a certain ratio threshold value T3 to be 0.77, error matching points are removed, and the matching points in the visible light image and the infrared image are connected through lines. Thereby achieving image registration.
The invention also provides a registration device between the visible light image and the infrared image of the circuit board, which comprises:
The acquisition module is used for acquiring an infrared image and a visible light image of the circuit board;
The entropy region distinguishing module is used for respectively removing low-entropy regions according to the respective image information entropy in the visible light image and the infrared image, and reserving high-entropy regions for subsequent feature point detection;
the construction module is used for constructing a Gaussian scale space for the high-entropy area and establishing an image Gaussian pyramid and a Gaussian differential pyramid;
the characteristic point screening module is used for acquiring extreme points in different scale spaces in the Gaussian differential pyramid by using a FAST+SIFT combination algorithm, and accurately positioning and screening the characteristic points according to the extreme points;
The removing module is used for screening and removing unstable points by adopting a threshold value method and a Hessian matrix method, and comprises points with low contrast and points positioned at the edge of an image;
The characteristic point direction calculation module is used for calculating and determining the characteristic point direction and constructing a key point 64-dimensional annular descriptor;
and the key point matching module is used for carrying out key point matching by using the Euclidean distance and cosine similarity between vectors as measurement indexes and applying a quick approximate nearest neighbor search FLANN, and eliminating mismatching by using a RANSAC random sampling consistency algorithm.
As a further improvement of the above scheme, the configuration device is also used for adopting the registration method between the visible light image and the infrared image of any circuit board.
Compared with the prior art, the invention has the following beneficial effects:
1. the image area blocking statistical information entropy is adopted, and the high entropy information area is extracted as a detection target image according to the threshold value, so that the accuracy of the matching point pair is improved, and the matching accuracy is higher than that of the traditional SIFT matching point pair.
2. By using the SIFT and FAST combined method, the problems of slower efficiency and low response strength when the traditional algorithm is used for extracting the feature points are solved, the accuracy of the matching point pairs is improved, and the matching accuracy is higher than that of the traditional SIFT matching point pairs.
3. The improved SIFT feature point annular descriptor is adopted, and the overall operation speed of the algorithm is improved on the premise of ensuring the registration quality.
According to the invention, when images are matched, the points which can better reflect the image characteristics are selected for matching, so that the problems of low efficiency and low response strength of the traditional SIFT algorithm when the characteristic points are extracted are solved while the matching precision is ensured, and the registration efficiency and the precision are obviously improved compared with the traditional algorithm. Therefore, the invention selects the visible light and the infrared image as experimental data, compares the experimental data with the traditional SIFT algorithm, obviously improves the registration efficiency and the precision compared with the traditional algorithm, and has wide application prospects in image fusion, remote sensing image processing, computer vision, vision field and power equipment diagnosis.
Drawings
Fig. 1 is a flowchart of a registration method between an optical image and an infrared image of a circuit board provided by the present invention.
Fig. 2 is an entropy histogram of the visible light image of fig. 1.
Fig. 3 is an entropy histogram of the infrared image of fig. 1.
Fig. 4 is a feature point detection diagram in fig. 1.
Fig. 5 is a schematic diagram of the process of creating a 64-dimensional ring descriptor in fig. 1.
Fig. 6 is a conventional sift algorithm registration chart.
Fig. 7 is a registration diagram of the modified sift algorithm of fig. 1.
Fig. 8 is a graph comparing results.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that when a component is referred to as being "mounted on" another component, it can be on the other component or intervening components may also be present. When an element is referred to as being "disposed on" another element, it can be disposed on the other element or intervening elements may also be present. When an element is referred to as being "fixed to" another element, it can be fixed to the other element or intervening elements may also be present.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "or/and" as used herein includes any and all combinations of one or more of the associated listed items.
The registration method between the optical image and the infrared image of the circuit board mainly comprises 5 steps.
And step one, taking the optical image and the infrared image of the circuit board as input images to be registered.
Step two, traversing the optical image and the infrared image by adopting non-overlapping sliding windows, dividing the windows, calculating the information entropy of the window area after division, defining an image local area with high information entropy higher than a preset information entropy threshold as a high entropy area, defining an image local area with low information entropy lower than the information entropy threshold as a low entropy area, wherein the high entropy area is used for subsequent algorithm feature extraction to participate in feature point detection, and the low entropy area is not used for feature point detection.
And thirdly, respectively detecting characteristic points of the high-entropy area screened out of the optical image and the high-entropy area screened out of the infrared image by adopting a SIFT+FAST algorithm, and respectively screening representative points as respective SIFT characteristic points.
And fourthly, respectively constructing annular descriptors and performing dimension reduction processing on SIFT feature points of the optical image and SIFT feature points of the infrared image to respectively acquire 64-dimensional feature vector descriptors of the optical image and 64-dimensional feature vector descriptors of the infrared image.
And fifthly, taking Euclidean distance and cosine similarity as similarity measurement indexes of the optical image and the infrared image, calculating Euclidean distance and cosine similarity of feature vectors of feature points on the two images, adopting a nearest neighbor/next neighbor FLANN algorithm to perform initial matching on the optical image and the infrared image, adopting a RANSAC algorithm to remove mismatching in the optical image and the infrared image, and finally realizing fine matching between the optical image and the infrared image.
Of course, referring to fig. 1, seven aspects can be summarized:
1) Acquiring an infrared image and a visible light image of a PCB;
2) Removing a low entropy region according to the size of the image information entropy, and reserving a high entropy region for subsequent feature point detection;
3) Constructing a Gaussian scale space for the image, and constructing an image Gaussian pyramid and a Gaussian differential pyramid;
4) Acquiring extreme points in different scale spaces in the Gaussian differential pyramid by using a FAST+SIFT combination algorithm, and accurately positioning and screening out characteristic points according to the extreme points;
5) The unstable points are removed by screening through a threshold method and a Hessian matrix method, wherein the unstable points comprise points with low contrast and points positioned at the edge of an image;
6) Calculating and determining the direction of the characteristic points, and constructing a 64-dimensional annular descriptor of the key points;
7) And (3) using the Euclidean distance between vectors and cosine similarity as measurement indexes, performing key point matching by using a quick approximate nearest neighbor search (FLANN), and eliminating mismatching by using a RANSAC random sampling consistency algorithm.
Each step is then analyzed in detail.
Aiming at the first step, acquiring an infrared image and a visible light image of a PCB (printed circuit board);
Aiming at the second step, the specific method for screening the high-entropy window area and the low-entropy window area by utilizing the image entropy threshold value is as follows:
Firstly, dividing a reference image and an image to be registered by adopting a non-overlapping sliding window, traversing the image by using a plurality of (such as 5*5) non-overlapping sliding windows, dividing the image according to the window size, and calculating the information entropy of each small window area. For a two-dimensional image in a discrete form, the information entropy is calculated according to the following formula:
Pi,j=f(i,j)/W·h
Wherein W, H is the width and height of the picture respectively, (i, j) is a binary group, i represents the gray value of the center in a certain sliding window, j is the gray average value of the pixels except the center in the window, f (i, j) represents the number of times that the binary group appears in the whole image, and H is the two-dimensional gray entropy of the image.
Secondly, according to the histogram (shown in fig. 2 and 3) formed by the acquired information entropy, a segmentation threshold is set, window areas for calculating the information entropy are screened, window areas larger than the set threshold are reserved for subsequent extraction of characteristic points of a SIFT+FAST algorithm, and window areas smaller than the threshold are not subjected to subsequent detection of the characteristic points.
For the third step, please refer to fig. 4, the specific method for detecting the feature points of the image high entropy region by adopting the sift+fast algorithm is as follows:
(1) Construction of a Gaussian scale space the Gaussian scale space of an image is defined as a functionAs a variable-scale gaussian function, the gaussian convolution kernel is the only linear kernel that implements the scale transformation. Wherein (x, y) is the coordinates of points on the image, σ is a gaussian blur coefficient, the size of σ determines the smoothness of the image, the large scale corresponds to the profile features of the image, the small scale corresponds to the detail features of the image, the output image is I (x, y), i.e., L (x, y, σ) =g (x, y, σ) ×i (x, y), wherein I (x, y) is the input image, and G (x, y, σ) is the variable scale gaussian function. After the image Gaussian pyramid is created, in order to effectively detect stable key points in a scale space, adjacent layers in each group are subtracted to obtain a Gaussian differential pyramid (DOG), and the subsequent feature point extraction is carried out on the DOG pyramid.
(2) Searching all scales and image positions in a Gaussian scale space, positioning extreme points on each layer of images of all scales, and determining a method of drawing a circle with the radius of 3 by taking the point as a center, wherein when at least 12 pixel points in 16 pixel points on the edge are satisfied and are larger than Ix+T1 or smaller than Ix-T1, the point is regarded as a key point, and then the position and the scale of the key point are accurately determined by fitting a three-dimensional quadratic function.
(3) The points of low contrast and the points at the edges of the image are removed by setting a contrast threshold and a Hessian matrix.
(4) Calculating the direction of the feature points by utilizing the gradient direction characteristics of the neighborhood pixels of the key points so as to realize rotation invariance of the image, sampling in a plurality of neighborhood windows such as 4 multiplied by 4 with the feature points as the centers, and counting the gradient directions of the neighborhood pixels by using a histogram, wherein the gradient histogram ranges from 0 to 360 degrees, and the histogram is divided into 8 directions, namely 8 gradient direction information are arranged on each feature point. The peak of the histogram represents the main direction of the neighborhood gradient at the feature point, i.e. the direction that is the feature point. And meanwhile, a Gaussian function is used for smoothing the histogram, the influence of mutation is reduced, and when another peak value equivalent to 80% of the energy of the main peak value exists in the gradient direction histogram, the direction is regarded as the auxiliary direction of the characteristic point. A feature point may be designated to have multiple directions, a primary direction, and more than one secondary direction for enhanced robustness of the match.
For step four, please refer to fig. 5, the specific method for obtaining the 64-dimensional annular feature vector descriptors of the reference image and the image to be matched is as follows:
For any one feature key point, taking the key point as the center of a circle in the scale space, and making a circle with a radius of 13, dividing the region into 8 concentric annular circles with the radius of 2, 3, 4, 5, 6, 8, 10 and 13 as the gradient distribution weight of the pixel points which are farther from the center of the circle is smaller, so as to form 8 sub-regions, wherein the key point in each sub-region has 8 gradient directions, and therefore 8×8=64 data, namely 64-dimensional SIFT feature vectors are totally obtained.
Aiming at the fifth step, the specific method for carrying out initial matching by utilizing a FLANN algorithm combining the Euclidean distance and the cosine similarity is as follows:
After SIFT feature vectors of the two images are generated, euclidean distance and cosine similarity of feature vectors of feature points on the two images are calculated, the distance and direction between the vectors are used as similarity judging indexes, feature points with the smallest distance and the cosine similarity being higher than a certain given threshold value are used as initial matching points, the matching points are judged to be a pair of matching points according to the fact that the ratio of Euclidean distance between the nearest neighbor and the next nearest neighbor is smaller than a certain ratio threshold value T and is 0.77, the error matching points are removed, and then the matching points in the reference image and the image to be registered are connected by lines, so that image registration is achieved. Please refer to fig. 6,7 and 8, wherein fig. 6 is a conventional sift algorithm registration chart, fig. 7 is a modified sift algorithm registration chart of fig. 1, and fig. 8 is a result comparison chart.
The registration method between the optical image and the infrared image of the circuit board can be designed into embedded software or non-embedded software when in application, but the registration device between the optical image and the infrared image of the circuit board can be designed independently.
The registration device comprises an acquisition module, an entropy region distinguishing module, a construction module, a characteristic point screening module, a removal module, a characteristic point direction calculation module and a key point matching module.
The acquisition module is used for acquiring an infrared image and a visible light image of the circuit board, taking the visible light image, namely the optical image, as a reference image and taking the infrared image as an image to be matched. The entropy region distinguishing module is used for respectively removing low-entropy regions according to the respective image information entropy of the reference image and the image to be matched, and reserving high-entropy regions for subsequent feature point detection. The construction module is used for constructing a Gaussian scale space for the high-entropy region and establishing an image Gaussian pyramid and a Gaussian differential pyramid. The feature point screening module is used for acquiring extreme points in different scale spaces in the Gaussian differential pyramid by using a FAST+SIFT combination algorithm, and accurately positioning and screening the feature points according to the extreme points. The removing module is used for screening and removing unstable points by adopting a threshold method and a Hessian matrix method, and comprises points with low contrast and points positioned at the edge of an image. The characteristic point direction calculation module is used for calculating and determining the characteristic point direction and constructing a key point 64-dimensional annular descriptor. The key point matching module is used for carrying out key point matching by using the Euclidean distance and cosine similarity between vectors as measurement indexes and applying a quick approximate nearest neighbor search FLANN, and eliminating mismatching by using a RANSAC random sampling consistency algorithm.
The image entropy is an estimate of how "busy" an image is, expressed as the average number of bits in the image gray level set, and also describes the average information content of the image source. The entropy of an image is a statistical form of characteristics, which reflects the quantity of average information in the image, and represents the aggregation characteristics of gray distribution of the image, and the larger the entropy of the image information is, the more characteristic points with high contrast and high quality are indicated, and vice versa.
The method comprises the steps of firstly traversing a visible light image and an infrared image of a circuit board by adopting a non-overlapping sliding window and dividing the window, calculating the information entropy of the divided window area, secondly setting a threshold value according to the information entropy of a plurality of local areas of the image, selecting a proper threshold value according to a histogram formed by the acquired information entropy to reserve the local area of the image with high information entropy, simultaneously removing the low information entropy image area, and extracting the characteristic points of the reserved image area by adopting an improved SIFT algorithm.
The specific flow of establishing the Gaussian scale space is that after two images of visible light and infrared are grayed, the two images are respectively doubled and then used as 1 st group of 1 st layers of the Gaussian pyramid, wherein the 1 st group of 1 st layers are positioned at the bottommost end of the Gaussian pyramid and are sequentially sampled upwards, the image of the 1 st group of 1 st layers after Gaussian convolution is used as the 2 nd layer of the 1 st group of pyramid, and the Gaussian convolution function is as follows: Then multiplying sigma by a proportionality coefficient k to obtain a new smoothing factor sigma=k sigma, smoothing the group 1 layer 2 image by using the new smoothing factor sigma=k sigma, taking the formed image result as the group 1 layer 3, repeating the operation to obtain the group 1 layer image, taking the group 1 reciprocal layer 3 image as downsampling of the proportionality factor 2 for the group 2 image, taking the obtained image as the group 2 layer 1, and then smoothing the group 2 layer 1 image by using the smoothing factor sigma to obtain the group 2 layer 2 image, wherein the sizes of the images in the same group are the same as the sizes of the images in the same group, but the smoothing scales of the images are different, and the corresponding smoothing coefficients are 0, sigma, k sigma, 2k sigma and k(L-2)σ respectively.
The Gaussian differential pyramid is constructed, feature point detection and accurate positioning are carried out, specifically, on the basis of the Gaussian pyramid of the image constructed in the previous step, the Gaussian differential pyramid (DOG) can be obtained by subtracting adjacent layers in each group, and subsequent SIFT feature point extraction is carried out on the DOG pyramid. The 1 st layer of the 1 st group of the DOG pyramid is obtained by subtracting the 1 st layer of the 1 st group from the 1 st layer of the Gaussian pyramid, and the steps are repeated to form a Gaussian differential pyramid, simplifying the Gaussian differential scale space, removing the 1 st layer scale space of the 1 st group in the Gaussian differential scale space, and detecting extreme points through the simplified Gaussian differential scale space. Whether a certain characteristic point K in a certain layer of image is a characteristic point or not can be judged, a circle can be drawn by taking the point as the center and the radius is 3 pixels, and 16 pixel points are arranged on a circumference arc line of the circle. By comparing the 16 pixel points with the pixel value of the center point to be measured, whether at least 12 continuous pixel points in the 16 pixel points arranged on the circumference are satisfied to be larger than Ik -t or smaller than Ik +t. If such a requirement is satisfied, K is determined to be a feature point. In order to reduce the feature point detection time, for each point, the pixel points of the positions 1, 5, 9 and 13 with the four positions of up, down, left and right of 90 degrees need to be detected, and if at least 3 of the 4 points meet the condition, the method for detecting the pixel points in 16 fields is continuously carried out on the point. Otherwise, judging that the point is a non-characteristic point, and directly eliminating.
The specific process for removing the points with low contrast and the points at the edges of the image comprises the steps of utilizing a fitting three-dimensional quadratic function to accurately reach the sub-pixel level, substituting Taylor expansion, and taking the first two terms: The method comprises the steps of presetting a first contrast threshold value, comparing and analyzing the contrast of an extreme point with the first contrast threshold value, taking the extreme point with the contrast larger than the first contrast threshold value as a feature point to be selected, presetting a second contrast threshold value, wherein the second contrast threshold value is larger than the first contrast threshold value, continuously storing the extreme point with the contrast larger than the second contrast threshold value as the feature point to be selected, and removing some unstable edge response points because the DOG operator generates stronger edge response. Acquiring a Hessian matrix of the feature points to be selected: Wherein the D value can be obtained by taking the difference between adjacent pixel points, and the characteristic value of H is in direct proportion to the main curvature of D. The unstable edge response points are removed, and the two unstable points are removed by setting a contrast threshold and a Hessian matrix.
In this embodiment, a Hessian matrix H (x, y) of the feature points to be selected is obtained:
Tr (H (x, y))=Dxx(x,y)+Dyy (x, y) represents the sum of characteristic values of the matrix H (x, y), det (H (x, y))=Dxx(x,y)Dyy(x,y)-(Dxy(x,y))2 represents a determinant of the matrix H (x, y), wherein the value of Dxx(x,y),Dxy(x,y),Dyy (x, y) is obtained by differentiating the corresponding positions of the neighborhood of candidate points, the principal curvature of Det (H (x, y)) is proportional to the characteristic values of H (x, y), and the formula is setRepresenting the ratio of the maximum characteristic value to the minimum characteristic value of H (x, y), thenIn order to detect whether the principal curvature is below a certain threshold T2, it is only necessary to detectIf the above formula is established, the feature point is rejected, otherwise, the feature point is reserved.
And calculating the direction of the key points, namely collecting the gradient and direction distribution characteristics of pixels in a 3 sigma neighborhood window of the Gaussian pyramid image where the key points are detected in the DOG pyramid. The modulus and direction of the gradient are as follows:
θ(x,y)=tan-1((L(x,y+1)-L(x,y-1))/(L(x+1,y)-L(x-1,y)))
Wherein L (x, y) is a scale space value at (x, y) where the key point is located, L (x+1, y) is a scale space value at (x+1, y) where the key point is located, L (x-1, y) is a scale space value at (x-1, y) where the key point is located, L (x, y+1) is a scale space value at (x, y+1) where the key point is located, L (x, y-1) is a scale space value at (x, y-1) where the key point is located, m (x, y) is a gradient modulus value, and θ (x, y) is a gradient direction.
And designating a direction parameter for each key point by utilizing the gradient direction distribution characteristic of the key point neighborhood pixels, so that the operator has rotation invariance. And (3) adopting a gradient histogram statistical method, counting, namely determining the direction of the key point by taking the key point as an original point and using the histogram to count the gradient and the direction of pixels in the neighborhood by using the image pixel points in the 3 sigma neighborhood window of the Gaussian pyramid image. The gradient histogram divides the range of directions from 0 to 360 degrees into 36 bins, with 10 degrees per bin. The peak direction of the histogram represents the main direction of the key point, the contribution of the key point to the histogram is reduced along with the field which is far from the central point, the histogram is smoothed by using a Gaussian function, the influence of mutation is reduced, when another peak value equivalent to 80% of the energy of the main peak value exists in the gradient direction histogram, the direction is regarded as the auxiliary direction of the characteristic point, and one characteristic point can be designated to have a plurality of directions, one main direction and more than one auxiliary direction for enhancing the matching robustness.
The key point descriptors are constructed, and feature vectors are formed by adopting annular descriptors, and the main directions of the feature points do not need to be determined because the annular has rotation invariance. Taking a key point as a circle center, taking a round window with a radius of 13 as a neighborhood range of a characteristic point, and dividing the neighborhood into 8 concentric circles, namely 8 sub-areas by respectively taking 2, 3, 4, 5, 6, 8, 10 and 13 pixels with the radius. And counting the pixel gradients and directions of 8 directions (one direction is every 45 degrees) of all the pixel points on each annular subarea. Therefore, the total is 8×8=64, the feature vectors are ordered and weighted by a gaussian window, and normalization is adopted to process the feature vectors in order to reduce negative images generated by the matching effect due to illumination transformation.
And (3) performing key point matching by using a FLANN algorithm, namely after SIFT 64-dimensional feature vectors of the two images are generated, calculating Euclidean distance and cosine similarity between feature point feature vectors of the two images as similarity measurement. The first two feature points closest to the Euclidean distance are found out from the reference image and are called the nearest neighbor and the next nearest neighbor. If the distance of the nearest neighbor feature point divided by the distance of the next nearest neighbor feature point is smaller than a preset proportional threshold value and the cosine similarity is higher than a certain given threshold value, the group of feature points are considered to be successfully matched, otherwise, the feature points are considered to be failed to be matched, namely no matching points exist, and then the matching points in the reference image and the image to be registered are connected through lines so as to realize image registration. After an initial match is made, a partial mismatch may occur in one image. In order to eliminate the mismatching, the RANSAC algorithm is adopted to eliminate the mismatching point pairs so as to realize the fine matching of the images.
Compared with the prior art, the invention has the following beneficial effects:
1. the image area blocking statistical information entropy is adopted, and the high entropy information area is extracted as a detection target image according to the threshold value, so that the accuracy of the matching point pair is improved, and the matching accuracy is higher than that of the traditional SIFT matching point pair.
2. By using the SIFT and FAST combined method, the problems of slower efficiency and low response strength when the traditional algorithm is used for extracting the feature points are solved, the accuracy of the matching point pairs is improved, and the matching accuracy is higher than that of the traditional SIFT matching point pairs.
3. The improved SIFT feature point annular descriptor is adopted, and the overall operation speed of the algorithm is improved on the premise of ensuring the registration quality.
The invention selects the visible light and the infrared image as experimental data, and compares the experimental data with the traditional SIFT algorithm, and compared with the traditional algorithm, the registration efficiency and the precision are obviously improved. The method has wide application prospect in image fusion, remote sensing image processing, computer vision, vision field and power equipment diagnosis.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (13)

Translated fromChinese
1.一种电路板的可见光图像与红外图像之间的配准方法,其特征在于,所述配准方法包括以下步骤:1. A registration method for a visible light image and an infrared image of a circuit board, characterized in that the registration method comprises the following steps:步骤一、将所述电路板的可见光图像和红外图像作为输入图像;Step 1: using a visible light image and an infrared image of the circuit board as input images;步骤二、针对两输入图像均采用非重叠滑动窗口遍历,并分割窗口,计算分割后窗口区域的信息熵,根据获取的信息熵形成的直方图,将高于给定预设信息熵阈值的图像局部区域定义为高熵区域,低于给定信息熵阈值的图像局部区域定义为低熵区域,所述高熵区域用于后续算法特征提取而参与特征点检测,所述低熵区域不参与特征点检测;Step 2: Use non-overlapping sliding windows to traverse both input images and split the windows. Calculate the information entropy of the window area after segmentation. Based on the histogram formed by the obtained information entropy, define the local image area with a value above a given preset information entropy threshold as a high entropy area, and the local image area with a value below the given information entropy threshold as a low entropy area. The high entropy area is used for subsequent algorithm feature extraction and participates in feature point detection, while the low entropy area does not participate in feature point detection.步骤三、采用SIFT+FAST算法对红外图像中筛选出的高熵区域和可见光图像中筛选出的高熵区域分别进行特征点检测,分别筛选出具有代表性的点作为各自的SIFT特征点;特征点检测的检测方法包括以下步骤:构建高斯尺度空间;高斯尺度空间特征点检测及精确定位;去除低对比度的点和位于图像边缘的点;计算特征点方向;其中,利用关键点邻域像素的梯度方向特点,从而实现图像的旋转不变性;以特征点为中心的多个邻域窗口内采样,并用直方图统计邻域像素的梯度方向;梯度直方图的范围是0—360°,每45度为一个方向,将直方图分为8个方向,即每个特征点有8个梯度方向信息;直方图的峰值代表了该特征点处邻域梯度的主方向,即作为该特征点的方向;同时使用高斯函数对直方图进行平滑,减少突变的影响,在梯度方向直方图中,当存在另外一个相当于主峰值80%能量的峰值时,则将这个方向认为是该特征点的辅方向;一个特征点可能会被指定具有多个方向,一个主方向,一个以上辅方向,用于增强匹配的鲁棒性;Step 3: Use SIFT+FAST algorithm to detect feature points of high entropy areas selected from infrared images and high entropy areas selected from visible light images, and select representative points as their respective SIFT feature points. The feature point detection method includes the following steps: constructing Gaussian scale space; Gaussian scale space feature point detection and precise positioning; removing low contrast points and points at the edge of the image; calculating the direction of the feature point; wherein, the gradient direction characteristics of the pixels in the neighborhood of the key point are used to achieve the rotation invariance of the image; sampling in multiple neighborhood windows centered on the feature point, and using histogram statistics of the neighborhood pixels. The gradient direction of the gradient histogram is 0-360°, with every 45 degrees as a direction. The histogram is divided into 8 directions, that is, each feature point has 8 gradient direction information; the peak of the histogram represents the main direction of the neighborhood gradient at the feature point, that is, the direction of the feature point; at the same time, the histogram is smoothed using a Gaussian function to reduce the impact of mutations. In the gradient direction histogram, when there is another peak equivalent to 80% of the energy of the main peak, this direction is considered to be the auxiliary direction of the feature point; a feature point may be assigned multiple directions, one main direction and more than one auxiliary direction, to enhance the robustness of matching;步骤四、对两图像检测出的SIFT特征点,分别构建环形描述符并进行PCA降维处理,分别获取可见光图像的64维特征向量描述符和红外图像的64维特征向量描述符;Step 4: For the SIFT feature points detected in the two images, construct ring descriptors and perform PCA dimensionality reduction processing to obtain 64-dimensional feature vector descriptors for the visible light image and 64-dimensional feature vector descriptors for the infrared image respectively;步骤五、以欧式距离与余弦相似度作为两图像的相似性度量指标,计算两幅图像上特征点特征向量的欧式距离与余弦相似度,采用最近邻/次近邻FLANN算法对参考图像和待匹配图像进行初始匹配,并采用RANSAC算法剔除其中的错误匹配,最终实现可见光图像和红外图像之间的精匹配。Step 5: Use Euclidean distance and cosine similarity as similarity measurement indicators of the two images, calculate the Euclidean distance and cosine similarity of the feature vectors of the feature points on the two images, use the nearest neighbor/next nearest neighbor FLANN algorithm to perform initial matching on the reference image and the image to be matched, and use the RANSAC algorithm to eliminate incorrect matches, and finally achieve precise matching between the visible light image and the infrared image.2.根据权利要求1所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,在步骤二中,利用信息熵阈值筛选高熵区域与低熵区域方法包括以下步骤:2. The registration method between a visible light image and an infrared image of a circuit board according to claim 1, wherein in step 2, the method of screening high entropy regions and low entropy regions using an information entropy threshold comprises the following steps:首先,采用非重叠滑动窗口分别对可见光图像和红外图像进行分割,用多个非重叠滑动窗口遍历每个图像,对每个图像按窗口大小进行分割,并计算每个窗口区域的信息熵;Firstly, non-overlapping sliding windows are used to segment visible light images and infrared images respectively. Multiple non-overlapping sliding windows are used to traverse each image, and each image is segmented according to the window size, and the information entropy of each window area is calculated.其次,根据获取信息熵形成的直方图,设置分割阈值即所述信息熵阈值,对计算出信息熵的窗口区域进行筛选,并保留大于设定信息熵阈值的窗口区域进行后续SIFT+FAST算法特征点提取,小于信息熵阈值的窗口区域则不进行后续特征点检测。Secondly, according to the histogram formed by obtaining the information entropy, the segmentation threshold, i.e., the information entropy threshold, is set to screen the window area where the information entropy is calculated, and the window area greater than the set information entropy threshold is retained for subsequent SIFT+FAST algorithm feature point extraction, while the window area less than the information entropy threshold is not subjected to subsequent feature point detection.3.根据权利要求2所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,对于离散形式的二维图像,其信息熵Pi,j的计算公式为:3. The registration method for a visible light image and an infrared image of a circuit board according to claim 2, wherein for a discrete two-dimensional image, the information entropy Pi,j is calculated as follows:Pi,j=f(i,j)/W·hPi,j =f(i,j)/W·h其中,W、h分别为图片的宽、高,(i,j)为一个二元组,i表示某个滑动窗口内中心的灰度值,j为该窗口内除了中心像素的灰度均值;f(i,j)表示(i,j)这个二元组在整个图像中出现的次数,H为图像二维灰度熵。Among them, W and h are the width and height of the image respectively, (i, j) is a two-tuple, i represents the grayscale value of the center of a sliding window, and j is the grayscale mean of the window except the center pixel; f(i, j) represents the number of times the two-tuple (i, j) appears in the entire image, and H is the two-dimensional grayscale entropy of the image.4.根据权利要求1所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,在步骤三中,检测方法包括:4. The registration method between a visible light image and an infrared image of a circuit board according to claim 1, wherein in step 3, the detection method comprises:图像的高斯尺度空间被定义为函数L(x,y,σ):The Gaussian scale space of an image is defined as the function L(x,y,σ):L(x,y,σ)=G(x,y,σ)*I(x,y)L(x,y,σ)=G(x,y,σ)*I(x,y)其中,I(x,y)为输入图像,G(x,y,σ)为尺度可变高斯函数,(x,y)是图像上点坐标,σ是高斯模糊系数;每一组内的相邻层相减得到高斯差分金字塔DOG,后续特征点的提取都是在DOG金字塔上进行的,DOG算子D(x,y,σ)的公式如下:Where I(x,y) is the input image, G(x,y,σ) is the scale-variable Gaussian function, (x,y) is the coordinate of the point on the image, and σ is the Gaussian blur coefficient. The Gaussian difference pyramid DOG is obtained by subtracting adjacent layers in each group. Subsequent feature point extraction is performed on the DOG pyramid. The formula of the DOG operator D(x,y,σ) is as follows:D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ))*I(x,y)=L(x,y,kσ)-L(x,y,σ)D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ))*I(x,y)=L(x,y,kσ)-L(x,y,σ)其中,k为比例系数;Where k is the proportionality coefficient;在高斯尺度空间内搜索所有尺度和图像位置,在所有尺度每一层图像上进行极值点定位,通过判断以该点为中心,半径为3画圆的方法,当边缘上的16个像素点中最少有12个像素点满足都比Ix+T1大或者都比Ix-T1小时,则认为此点为关键点,然后通过拟合三维二次函数来精确的确定关键点位置和尺度,其中Ix为检测点的像素值,T1为像素范围阈值;Search all scales and image positions in the Gaussian scale space, locate the extreme point on each layer of the image at all scales, and draw a circle with a radius of 3 with this point as the center. When at least 12 of the 16 pixels on the edge meet the requirements of being greater than Ix + T1 or smaller than Ix - T1 , this point is considered a key point. Then, the key point position and scale are accurately determined by fitting a three-dimensional quadratic function, where Ix is the pixel value of the detection point and T1 is the pixel range threshold.通过设定对比度阈值和Hessian矩阵去除这两种不稳定的点。These two unstable points are removed by setting the contrast threshold and Hessian matrix.5.根据权利要求4所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,在去除低对比度的点和位于图像边缘的点时,利用拟合三维二次函数将所述极值点精确到亚像素级,代入泰勒展开式,并只取前两项:5. The registration method for a visible light image and an infrared image of a circuit board according to claim 4, characterized in that when removing low-contrast points and points at the edge of the image, the extreme points are accurately calculated to the sub-pixel level by fitting a three-dimensional quadratic function, and the Taylor expansion is substituted, with only the first two terms being taken:其中其中代表相对插值中心坐标(x,y)的偏移量;in Where represents the offset relative to the interpolation center coordinates (x, y);预设第一对比度阈值,将极值点的对比度与所述第一对比度阈值对比分析,将对比度大于第一对比度阈值的极值点作为待选特征点;同时预设第二对比度阈值,所述第二对比度阈值大于第一对比度阈值,将对比度大于第二对比度阈值的极值点继续保存为待选特征点;Preset a first contrast threshold, compare and analyze the contrast of the extreme points with the first contrast threshold, and select the extreme points with a contrast greater than the first contrast threshold as candidate feature points; simultaneously preset a second contrast threshold, the second contrast threshold being greater than the first contrast threshold, and continue to save the extreme points with a contrast greater than the second contrast threshold as candidate feature points;获取所述待选特征点的Hessian矩阵H(x,y):Get the Hessian matrix H(x,y) of the feature point to be selected:Tr(H(x,y))=Dxx(x,y)+Dyy(x,y)表示矩阵H(x,y)特征值之和,Det(H(x,y))=Dxx(x,y)Dyy(x,y)-(Dxy(x,y))2表示矩阵H(x,y)的行列式,其中Dxx(x,y),Dxy(x,y),Dyy(x,y)值是候选点邻域对应位置的差分求得的,Det(H(x,y))的主曲率和H(x,y)的特征值成正比,设表示H(x,y)最大特征值和最小特征值的比值,则为了检测主曲率是否在某个阈值T2下,只需检测如果上式成立,则剔除该特征点,否则保留。Tr(H(x,y))=Dxx (x,y)+Dyy (x,y) represents the sum of the eigenvalues of the matrix H(x,y), Det(H(x,y))=Dxx (x,y)Dyy (x,y)-(Dxy (x,y))2 represents the determinant of the matrix H(x,y), where Dxx (x,y), Dxy (x,y), and Dyy (x,y) are obtained by taking the differences between the corresponding positions of the candidate point neighborhood. The principal curvature of Det(H(x,y)) is proportional to the eigenvalues of H(x,y). Let represents the ratio of the maximum eigenvalue to the minimum eigenvalue of H(x,y), then To detect whether the principal curvature is below a certain threshold T2 , we only need to check If the above formula is true, the feature point is removed, otherwise it is retained.6.根据权利要求4所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,计算特征点方向的计算方法包括以下步骤:6. The registration method between a visible light image and an infrared image of a circuit board according to claim 4, wherein the method for calculating the direction of the feature point comprises the following steps:对于在DOG金字塔中检测出的关键点,采集其所在高斯金字塔图像3σ邻域窗口内像素的梯度和方向分布特征;梯度的模值和方向如下:For the key points detected in the DOG pyramid, the gradient and direction distribution characteristics of the pixels in the 3σ neighborhood window of the Gaussian pyramid image are collected; the modulus and direction of the gradient are as follows:θ(x,y)=tan-1((L(x,y+1)-L(x,y-1))/(L(x+1,y)-L(x-1,y)))θ(x,y)=tan-1 ((L(x,y+1)-L(x,y-1))/(L(x+1,y)-L(x-1,y)))式中,L(x,y)为关键点所在(x,y)处的尺度空间值,L(x+1,y)为关键点所在(x+1,y)处的尺度空间值,L(x-1,y)为关键点所在(x-1,y)处的尺度空间值,L(x,y+1)为关键点所在(x,y+1)处的尺度空间值,L(x,y-1)为关键点所在(x,y-1)处的尺度空间值,m(x,y)为梯度模值,θ(x,y)为梯度方向。Where L(x,y) is the scale-space value of the key point at (x,y), L(x+1,y) is the scale-space value of the key point at (x+1,y), L(x-1,y) is the scale-space value of the key point at (x-1,y), L(x,y+1) is the scale-space value of the key point at (x,y+1), L(x,y-1) is the scale-space value of the key point at (x,y-1), m(x,y) is the gradient modulus, and θ(x,y) is the gradient direction.7.根据权利要求1所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,在步骤四中,获取两图像的64维环形特征向量描述符的方法包括以下步骤:7. The registration method between a visible light image and an infrared image of a circuit board according to claim 1, wherein in step 4, the method of obtaining a 64-dimensional annular feature vector descriptor of the two images comprises the following steps:对于任意一个特征关键点,在其所在尺度空间取以关键点为圆心,半径为13做圆,由于距离圆心越远的像素点梯度分布权重越小,故以半径为2、3、4、5、6、8、10、13个像素点的方式,将此区域划分为8个同心环形圆,形成8个子区域,其中每个子区域中的关键点各自都有8个梯度方向,因此,共有8×8=64个数据,即64维SIFT特征向量。For any feature key point, a circle with a radius of 13 is drawn with the key point as the center in its scale space. Since the gradient distribution weight of the pixel point farther away from the center is smaller, the area is divided into 8 concentric annular circles with radii of 2, 3, 4, 5, 6, 8, 10, and 13 pixels to form 8 sub-areas. The key points in each sub-area have 8 gradient directions. Therefore, there are a total of 8×8=64 data, that is, 64-dimensional SIFT feature vectors.8.根据权利要求1所述的电路板的可见光图像与红外图像之间的配准方法,其特征在于,在步骤五中,利用欧式距离与余弦相似度相结合的FLANN算法进行初始匹配的匹配方法包括以下步骤:8. The registration method for a visible light image and an infrared image of a circuit board according to claim 1, wherein in step 5, the matching method using the FLANN algorithm combining Euclidean distance and cosine similarity for initial matching comprises the following steps:当两幅图像的SIFT特征向量生成后,计算两幅图像上特征点特征向量之间的欧式距离与余弦相似度,把特征向量之间的距离和方向作为相似性判定指标,选定距离最小、余弦相似度高于某一给定阈值的特征点作为初始匹配点,并根据最近邻和次近邻的欧式距离之比小于某个比例阈值T3为0.77,判定为一对正确匹配点,并移除错误匹配点;再将可见光图像和红外图像中的匹配点用线连接起来。After the SIFT feature vectors of the two images are generated, the Euclidean distance and cosine similarity between the feature vectors of the feature points on the two images are calculated. The distance and direction between the feature vectors are used as similarity judgment indicators. The feature points with the smallest distance and cosine similarity higher than a given threshold are selected as initial matching points. The ratio of the Euclidean distance between the nearest neighbor and the next nearest neighbor is less than a certain ratio threshold T3 of 0.77, and they are determined to be a pair of correct matching points. The wrong matching points are then removed. The matching points in the visible light image and the infrared image are then connected with lines.9.一种电路板的可见光图像与红外图像之间的配准装置,其特征在于,所述配准装置包括:9. A registration device for a visible light image and an infrared image of a circuit board, characterized in that the registration device comprises:采集模块,其用于采集获取电路板的红外图像与可见光图像;An acquisition module, which is used to acquire infrared images and visible light images of the circuit board;熵区域区分模块,其用于根据所述可见光图像和所述红外图像中各自图像信息熵的大小,分别去除低熵区域,保留高熵区域用于后续的特征点检测;An entropy region distinguishing module, which is used to remove low entropy regions according to the size of the image information entropy in the visible light image and the infrared image, and retain high entropy regions for subsequent feature point detection;构建模块,其用于对高熵区域构建高斯尺度空间,建立图像高斯金字塔和高斯差分金字塔;A construction module is used to construct a Gaussian scale space for high entropy areas and to establish image Gaussian pyramids and Gaussian difference pyramids;特征点筛选模块,其用于利用FAST+SIFT相结合算法,获取所述高斯差分金字塔中不同尺度空间中的极值点,根据所述极值点精确定位筛选出特征点;A feature point screening module is used to obtain extreme points in different scale spaces in the Gaussian difference pyramid using a combined FAST+SIFT algorithm, and to accurately locate and screen feature points based on the extreme points;去除模块,其用于采用阈值法和Hessian矩阵法筛选去除不稳定的点;包括低对比度的点和位于图像边缘的点;The removal module is used to filter and remove unstable points using the threshold method and the Hessian matrix method, including points with low contrast and points at the edge of the image;特征点方向计算模块,其用于计算确定特征点方向,并构建关键点64维环形描述符;Feature point direction calculation module, which is used to calculate and determine the direction of feature points and construct a 64-dimensional ring descriptor of key points;关键点匹配模块,其用于以向量间欧式距离与余弦相似度为度量指标,运用快速近似最近邻搜索FLANN进行关键点匹配,RANSAC随机抽样一致性算法剔除误匹配。The key point matching module uses the Euclidean distance and cosine similarity between vectors as measurement indicators, applies the fast approximate nearest neighbor search FLANN to perform key point matching, and uses the RANSAC random sampling consensus algorithm to eliminate false matches.10.根据权利要求9所述的电路板的可见光图像与红外图像之间的配准装置,其特征在于,熵区域区分模块包括:10. The apparatus for registering a visible light image and an infrared image of a circuit board according to claim 9, wherein the entropy region differentiation module comprises:针对两输入图像均采用非重叠滑动窗口遍历,并分割窗口,计算分割后窗口区域的信息熵,根据获取的信息熵形成的直方图,将高于给定预设信息熵阈值的图像局部区域定义为高熵区域,低于给定信息熵阈值的图像局部区域定义为低熵区域,所述高熵区域用于后续算法特征提取而参与特征点检测,所述低熵区域不参与特征点检测。A non-overlapping sliding window is used to traverse both input images and split the windows. The information entropy of the window area after segmentation is calculated. According to the histogram formed by the obtained information entropy, the local image area with an entropy value above a given preset information entropy threshold is defined as a high entropy area, and the local image area with an entropy value below a given information entropy threshold is defined as a low entropy area. The high entropy area is used for subsequent algorithm feature extraction and participates in feature point detection, and the low entropy area does not participate in feature point detection.11.根据权利要求9所述的电路板的可见光图像与红外图像之间的配准装置,其特征在于,构建模块包括:11. The apparatus for registering a visible light image and an infrared image of a circuit board according to claim 9, wherein the construction module comprises:图像的高斯尺度空间被定义为函数L(x,y,σ):The Gaussian scale space of an image is defined as the function L(x,y,σ):L(x,y,σ)=G(x,y,σ)*I(x,y)L(x,y,σ)=G(x,y,σ)*I(x,y)其中,I(x,y)为输入图像,G(x,y,σ)为尺度可变高斯函数,(x,y)是图像上点坐标,σ是高斯模糊系数;每一组内的相邻层相减得到高斯差分金字塔DOG,后续特征点的提取都是在DOG金字塔上进行的,DOG算子D(x,y,σ)的公式如下:Where I(x,y) is the input image, G(x,y,σ) is the scale-variable Gaussian function, (x,y) is the coordinate of the point on the image, and σ is the Gaussian blur coefficient. The Gaussian difference pyramid DOG is obtained by subtracting adjacent layers in each group. Subsequent feature point extraction is performed on the DOG pyramid. The formula of the DOG operator D(x,y,σ) is as follows:D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ))*I(x,y)=L(x,y,kσ)-L(x,y,σ)D(x,y,σ)=(G(x,y,kσ)-G(x,y,σ))*I(x,y)=L(x,y,kσ)-L(x,y,σ)其中,k为比例系数。Where k is the proportionality coefficient.12.根据权利要求9所述的电路板的可见光图像与红外图像之间的配准装置,其特征在于,特征点筛选模块包括:12. The apparatus for registering a visible light image and an infrared image of a circuit board according to claim 9, wherein the feature point screening module comprises:在高斯尺度空间内搜索所有尺度和图像位置,在所有尺度每一层图像上进行极值点定位,通过判断以该点为中心,半径为3画圆的方法,当边缘上的16个像素点中最少有12个像素点满足都比Ix+T1大或者都比Ix-T1小时,则认为此点为关键点,然后通过拟合三维二次函数来精确的确定关键点位置和尺度,其中Ix为检测点的像素值,T1为像素范围阈值。Search all scales and image positions in the Gaussian scale space, locate the extreme point on each layer of the image at all scales, and draw a circle with a radius of 3 with this point as the center. When at least 12 of the 16 pixels on the edge are greater than Ix + T1 or smaller than Ix - T1 , this point is considered a key point. Then, the key point position and scale are accurately determined by fitting a three-dimensional quadratic function, where Ix is the pixel value of the detection point and T1 is the pixel range threshold.13.根据权利要求9所述的电路板的可见光图像与红外图像之间的配准装置,其特征在于,特征点方向计算模块包括:13. The apparatus for registering a visible light image and an infrared image of a circuit board according to claim 9, wherein the feature point direction calculation module comprises:利用关键点邻域像素的梯度方向特点,从而实现图像的旋转不变性;以特征点为中心的多个邻域窗口内采样,并用直方图统计邻域像素的梯度方向;梯度直方图的范围是0—360°,每45度为一个方向,将直方图分为8个方向,即每个特征点有8个梯度方向信息;直方图的峰值代表了该特征点处邻域梯度的主方向,即作为该特征点的方向;同时使用高斯函数对直方图进行平滑,减少突变的影响,在梯度方向直方图中,当存在另外一个相当于主峰值80%能量的峰值时,则将这个方向认为是该特征点的辅方向;一个特征点可能会被指定具有多个方向,一个主方向,一个以上辅方向,用于增强匹配的鲁棒性。The gradient direction characteristics of the neighborhood pixels of the key points are used to achieve rotation invariance of the image; sampling is performed in multiple neighborhood windows centered on the feature point, and the gradient directions of the neighborhood pixels are counted using a histogram; the range of the gradient histogram is 0-360°, with every 45 degrees as a direction, and the histogram is divided into 8 directions, that is, each feature point has 8 gradient direction information; the peak of the histogram represents the main direction of the neighborhood gradient at the feature point, that is, the direction of the feature point; at the same time, the histogram is smoothed using a Gaussian function to reduce the impact of mutations. In the gradient direction histogram, when there is another peak equivalent to 80% of the energy of the main peak, this direction is considered to be the auxiliary direction of the feature point; a feature point may be assigned multiple directions, one main direction and more than one auxiliary direction, to enhance the robustness of matching.
CN202310060353.XA2023-01-182023-01-18Registration method and device between visible light image and infrared image of circuit boardActiveCN116433733B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202310060353.XACN116433733B (en)2023-01-182023-01-18Registration method and device between visible light image and infrared image of circuit board

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202310060353.XACN116433733B (en)2023-01-182023-01-18Registration method and device between visible light image and infrared image of circuit board

Publications (2)

Publication NumberPublication Date
CN116433733A CN116433733A (en)2023-07-14
CN116433733Btrue CN116433733B (en)2025-09-19

Family

ID=87093205

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202310060353.XAActiveCN116433733B (en)2023-01-182023-01-18Registration method and device between visible light image and infrared image of circuit board

Country Status (1)

CountryLink
CN (1)CN116433733B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116703909B (en)*2023-08-072023-10-27威海海泰电子有限公司Intelligent detection method for production quality of power adapter
CN116758086B (en)*2023-08-212023-10-20山东聚宁机械有限公司Bulldozer part quality detection method based on image data
CN117115218B (en)*2023-08-242025-08-26华东数字医学工程研究院 Medical image registration method, control system, electronic device and storage medium
CN117635676A (en)*2023-11-082024-03-01国网上海市电力公司Transformer infrared and visible light image registration method
CN117830301B (en)*2024-03-042024-05-14青岛正大正电力环保设备有限公司Slag dragging region detection method based on infrared and visible light fusion characteristics
CN118304165B (en)*2024-04-192025-06-10重庆邮电大学 Intelligent robot for moxibustion and thermal therapy based on infrared-visible light fusion positioning and its control method
CN119850568A (en)*2024-12-272025-04-18视拓(苏州)工业自动化有限公司Semiconductor wafer defect detection method and system based on machine vision
CN119399559B (en)*2025-01-022025-04-04晨达(广州)网络科技有限公司Image classification method and system based on machine vision
CN119758708B (en)*2025-03-052025-06-24中国科学院长春光学精密机械与物理研究所 A method for stable target tracking combined with ground speed compensation

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113793372A (en)*2021-10-152021-12-14中航华东光电有限公司Optimal registration method and system for different-source images

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113793372A (en)*2021-10-152021-12-14中航华东光电有限公司Optimal registration method and system for different-source images

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于SIFT算法的可见光图像与红外图像配准;周文理;金施群;;黑龙江科技学院学报;20110325(第02期);全文*

Also Published As

Publication numberPublication date
CN116433733A (en)2023-07-14

Similar Documents

PublicationPublication DateTitle
CN116433733B (en)Registration method and device between visible light image and infrared image of circuit board
CN110148162B (en)Heterogeneous image matching method based on composite operator
US8233716B2 (en)System and method for finding stable keypoints in a picture image using localized scale space properties
CN111340701B (en)Circuit board image splicing method for screening matching points based on clustering method
CN105427298B (en)Remote sensing image registration method based on anisotropic gradient metric space
CN110020995B (en)Image splicing method for complex images
CN108230237A (en)A kind of multispectral image reconstructing method for electrical equipment on-line checking
CN112288758B (en)Infrared and visible light image registration method for power equipment
CN106257535A (en)Electrical equipment based on SURF operator is infrared and visible light image registration method
CN107464252A (en)A kind of visible ray based on composite character and infrared heterologous image-recognizing method
CN108345881A (en)A kind of document quality detection method based on computer vision
CN107145829A (en) A Palm Vein Recognition Method Fused with Texture Features and Scale Invariant Features
CN109949227A (en) Image stitching method, system and electronic device
CN117115214B (en) A multi-source remote sensing image registration method based on improved PIIFD feature description
CN107945111A (en)A kind of image split-joint method based on SURF feature extraction combination CS LBP descriptors
CN113658238B (en)Near infrared vein image high-precision matching method based on improved feature detection
US20220358321A1 (en)Detection Method And Device For Assembly Body Multi-View Change Based On Feature Matching
CN112614167A (en)Rock slice image alignment method combining single-polarization and orthogonal-polarization images
CN116977316A (en)Full-field detection and quantitative evaluation method for damage defects of complex-shape component
CN113902668B (en)Thread region extraction method and system for pedal thread identification
CN106650580A (en)Image processing based goods shelf quick counting method
CN114596343A (en)Cross-modal remote sensing image intelligent multi-scale registration method for complex ground scene
CN113793372A (en)Optimal registration method and system for different-source images
CN114612412A (en)Processing method of three-dimensional point cloud data, application of processing method, electronic device and storage medium
CN119090926A (en) A difference map registration method based on feature point matching

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp