An inner product-based x-ray non-destructive testing image registration method
By employing an image registration method based on inner product and utilizing the sliding window inner product matrix to calculate the offset vector, the problem of fast and reliable registration of high-definition X-ray inspection images is solved, making it applicable to fields such as industrial non-destructive testing, medical imaging, and remote sensing imaging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF COMP TECH & APPL
- Filing Date
- 2025-11-28
- Publication Date
- 2026-06-26
AI Technical Summary
In X-ray nondestructive testing, it is difficult to achieve fast and reliable registration of high-definition images. In particular, due to the image misalignment and imaging angle difference caused by the placement error of the tested product, the existing methods are computationally intensive and inefficient, making it difficult to achieve the global optimal matching of two images.
An image registration method based on inner product is adopted. By acquiring standard and test images with consistent length and width, the offset vector is calculated by traversing the inner product matrix through a sliding window, thus achieving fast and reliable image registration and avoiding the extraction of complex feature information.
It achieves fast and reliable image registration within a limited time, reduces computational complexity, and is applicable to fields such as industrial non-destructive testing, medical imaging, and remote sensing imagery.
Smart Images

Figure CN122289326A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial nondestructive testing, specifically relating to an X-ray nondestructive testing image registration method based on inner product. Background Technology
[0002] In the industrial sector, X-ray nondestructive testing (NDT) is widely used for defect detection in circuit boards, battery modules, and mechanical structural components, providing a technical guarantee for product quality. However, in NDT with unknown defect morphologies, directly using neural networks or other classifiers to identify defects in images results in low detection rates. Currently, a relatively effective method in industry is to compare and analyze images of the tested product with images of a defect-free product. However, errors in the placement of the tested product on the X-ray machine stage during inspection lead to misalignment between the tested product image and the standard image (X-ray image of the defect-free product), resulting in inaccurate defect detection. Furthermore, since X-rays are approximately point light sources, differences in the placement of the tested product on the X-ray machine stage cause differences in the imaging perspective, increasing the difficulty of image registration. Currently, machine vision mainly uses features such as SIFT and SURF for image registration. However, this method is computationally intensive and inefficient for high-resolution X-ray images of 60-100 megapixels, and the resulting transformation matrices for multiple feature points have poor consistency, making it difficult to effectively achieve globally optimal matching between the two images. Therefore, rapid and reliable registration of high-definition X-ray inspection images has become an urgent problem to be solved. Summary of the Invention
[0003] (a) Technical problems to be solved The technical problem to be solved by the present invention is how to provide an X-ray non-destructive testing image registration method based on inner product, so as to solve the problem of fast and reliable registration of high-definition X-ray testing images.
[0004] (II) Technical Solution To address the aforementioned technical problems, this invention proposes an X-ray nondestructive testing image registration method based on inner product, which includes the following steps: Step S1, Image Acquisition Step: Acquire a standard image and a test image, both with the same length and width; Step S2, Inner Product Matrix Calculation Step: Obtain the inner product matrix by traversing a certain range of the standard image through the central region of the test image; Step S3, Offset Vector Calculation Step: Calculate the coordinates of the maximum value of the inner product matrix, and use these coordinates and the coordinates of the center of the test area image to determine the offset vector, indicating the translation relationship between corresponding points of the test image and the standard image; S4. Steps for obtaining the registered image: Translate the test image according to the offset vector to obtain the registered image.
[0005] (III) Beneficial Effects This invention proposes an X-ray nondestructive testing image registration method based on inner product. It avoids extracting complex image feature information and obtains a reliable registration reference within a limited time by utilizing the image inner product. The method has fast calculation speed and low complexity, enabling it to operate effectively even with limited resources. It has the advantages of simplicity, stability, and reliability, and can be widely applied in fields such as industrial nondestructive testing, medical imaging, remote sensing imagery, and autonomous driving navigation. Attached Figure Description
[0006] Figure 1 This is a flowchart of the X-ray nondestructive testing image registration method based on inner product according to the present invention; Figure 2 This is a schematic diagram of a region image and a window image. The left side shows the region image in the test image, and the right side shows the range of movement of the window image in the standard image. Detailed Implementation
[0007] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0008] This invention discloses an X-ray nondestructive testing image registration method based on inner product. The method mainly includes: (1) Image acquisition step: acquiring a standard image and a test image with consistent length and width; (2) Inner product matrix calculation step: using a sliding window method, traversing the region images in the test image and the region images in the standard image, performing inner product calculation, and obtaining the inner product matrix; (3) Offset vector calculation step: calculating the coordinates of the maximum value of the inner product matrix, using this coordinate and the center coordinates of the test region image to determine the offset vector, and obtaining the translation relationship of corresponding points in the two images; (4) Registered image acquisition step: translating the test image according to the offset vector to obtain the registered image. This invention, an X-ray nondestructive testing image registration method based on inner product, achieves image registration through an inner product matrix with low computational cost, reducing the complexity of the problem.
[0009] Figure 1 The diagram shows a flowchart of an X-ray nondestructive testing image registration method based on inner product according to the present invention. Figure 1 As shown, the method includes the following steps: Step S1, Image Acquisition Step: Acquire a standard image and a test image, both with the same length and width; Step S2, Inner Product Matrix Calculation Steps: Obtain the inner product matrix by traversing a certain range of the standard image through the central region image of the test image; the main steps include setting the central region image of the test image, determining the window image within the standard image, and calculating the inner product matrix.
[0010] Step S21, setting the central region image A of the test image, specifically refers to: the test image Image A of the central regionx a , y a ), is based on the center coordinates of the test image ( x c , y c Centered on ), the length and height are respectively... p , q The rectangular region image, where x c - p / 2 ≤ x a ≤ x c + p / 2 , y c - q / 2 ≤ y a ≤ y c + q / 2 Based on practical experience, p , q The value is generally 1 / 5 to 1 / 3 of the length and height of the object being measured in the X-ray image.
[0011] Step S22, the window image B within the standard image is determined in the standard image I. r (x r y r Within a defined range, the central region of the image A is used. x a , y a Iterate through it; window image B ( x b , y b The center and standard image I r (x r y r The centers coincide, and the length and height of window image B are respectively... p +2k, q +2k; Central region image A in standard image I r The range of movement is ( x c ± k , y c ± k ), that is, the start and end range of window image B is ( x c - kp / 2 , y c - kq / 2 )to( x c + k+p / 2 , y c + k+q / 2 ), where the sliding window step size is m , n ( m , n ≤ k ),in, m , n The value is typically 1, to speed up calculations. m , n The value can be increased, but the accuracy will decrease.
[0012] Step S23: Calculate the inner product matrix: Compare the central region image A of the test image with the window image of the standard image. B During traversal, the inner product is calculated, which is the sum of the products of all corresponding elements of the two matrices, resulting in the inner product matrix C, where C contains elements... c lk The calculation is as follows:
[0013] in, l,k For integers, 0 ≤ l ≤ (2 k- 1) / m , 0≤k≤(2 k- 1) / n。 Therefore, the coordinates of the center point of matrix C are ( k , k ).
[0014] Step S3, Offset Vector Calculation Step: Calculate the coordinates of the maximum value of the inner product matrix, and use these coordinates and the coordinates of the center of the test area image to determine the offset vector, indicating the translation relationship between corresponding points of the test image and the standard image; Step 3 of the offset vector calculation includes: Step 31: Calculate the maximum value of the elements in the inner product matrix C. c max ; Step 32, Confirm c max The coordinate position in the C matrix ( x cmax , y cmax ); Step 33: Calculate the offset vector between the test image and the standard image, based on the coordinates of the maximum value of the inner product matrix C ( x cmax , y cmaxThe coordinates of the inner product matrix C are obtained from the offset of the center point; if the coordinates of the maximum value of the inner product matrix C are ( x cmax , y cmax ) and center point coordinates ( k , k If they overlap, it indicates that the test image Image A of the central region x a , y a The center of the window image B of the standard image coincides with the center of the window image B, i.e., there is no offset; The method for calculating the offset vector between the test image and the standard image is as follows: Offset Δx = x cmax – k Offset Δy = y cmax – k S4. Steps for obtaining the registered image: Translate the test image according to the offset vector to obtain the registered image I. P .
[0015] The registered image I P In step S4, the details are as follows: Based on the offset vector, coordinate transformation is performed to achieve image translation and obtain the registered image I. P The calculation formula is as follows:
[0016] Example 1: The following describes specific embodiments of the present invention, but these are not intended to limit the specific implementation methods.
[0017] The specific implementation process of this invention is as follows.
[0018] This invention proposes an X-ray nondestructive testing image registration method based on inner product, comprising the following steps: (1) Image acquisition step: acquiring a standard image and a test image with consistent length and width; (2) Inner product matrix calculation step: using a sliding window method, traversing the region images in the test image and the region images in the standard image, performing inner product calculation, and obtaining the inner product matrix; (3) Offset vector calculation step: calculating the coordinates of the maximum value of the inner product matrix, using this coordinate and the center coordinates of the test region image to determine the offset vector, and obtaining the translation relationship of corresponding points in the two images; (4) Registered image acquisition step: translating the test image according to the offset vector to obtain the registered image. This invention, an X-ray nondestructive testing image registration method based on inner product, achieves image registration through an inner product matrix with low computational cost, reducing the complexity of the problem.
[0019] like Figure 1 As shown, the method includes the following steps: (1) Image acquisition steps: Acquire a standard image and a test image, both with the same length and width; (2) Inner product matrix calculation steps: Using the sliding window method, traverse all window images of the region image in the test image and the standard image, perform inner product calculation, and obtain the inner product matrix; (3) Offset vector calculation steps: Calculate the coordinates of the maximum value of the inner product matrix, and use these coordinates and the coordinates of the center of the test area image to determine the offset vector, indicating the translation relationship between the corresponding points of the test image and the standard image; (4) Steps for obtaining the registered image: Translate the image to be tested by the offset vector to obtain the registered image.
[0020] Step 2 of the inner product matrix calculation includes: Step 21: Acquire the test region image. For example... Figure 2 As shown on the left, let the standard image be I. R (x r y r The test image is Take the test area image A( x a , y a Size is p × q The center coordinates are ( x c , y c ),in x c - p / 2 ≤ x a ≤ x c + p / 2 , y c - q / 2 ≤ y a ≤ y c + q / 2 ; Step 22: Extract a window image within the standard image. B ij ( x b , y b To slide a window, such as... Figure 2 As shown on the right, the range of movement of the window image center within the standard image is ( x c ±k , y c ± k The window image movement range is ( ). x c - kp / 2 , y c - kq / 2 )to( x c + k+p / 2 , y c + k+q / 2 ), window image size is p×q The sliding window step size is m , n ( m , n ≤ 2k ).
[0021] Step 23: Calculate the inner product matrix. Compare the test region image A with each original window image. B ij Performing the inner product calculation, which is the sum of the products of all corresponding elements of the two matrices, yields the inner product matrix C. Step 3 of the offset vector calculation includes: Step 31: Calculate the maximum value of the elements in the inner product matrix C. c max ; Step 32: Confirm c max Corresponding window image B ij The coordinates of the center point; Step 33: Calculate the offset vector between the test image and the standard image based on the center coordinates.
[0022] Step 4 of acquiring the registered image includes: Based on the offset vector, coordinate transformation is performed to achieve image translation and obtain the registered image. .
[0023] This invention provides an X-ray nondestructive testing image registration method based on inner product. It avoids extracting complex image feature information and obtains a reliable registration reference in a limited time by utilizing the image inner product. It has fast calculation speed and low complexity, which makes the method effective even when resources are available. It has the advantages of simplicity, stability and reliability, and can be widely used in industrial nondestructive testing, medical imaging, remote sensing image, autonomous driving navigation and other fields.
[0024] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for X-ray nondestructive testing image registration based on inner product, characterized in that, The method includes the following steps: Step S1, Image Acquisition Step: Acquire a standard image and a test image, both with the same length and width; Step S2, Inner Product Matrix Calculation Step: Obtain the inner product matrix by traversing a certain range of the standard image through the central region of the test image; Step S3, Offset Vector Calculation Step: Calculate the coordinates of the maximum value of the inner product matrix, and use these coordinates and the coordinates of the center of the test area image to determine the offset vector, indicating the translation relationship between corresponding points of the test image and the standard image; S4. Steps for obtaining the registered image: Translate the test image according to the offset vector to obtain the registered image.
2. The X-ray nondestructive testing image registration method based on inner product as described in claim 1, characterized in that, S2 includes: Step S21: The central region image A of the set test image; Step S22: Determine the window image B within the standard image; Step S23: Calculate the inner product matrix: When traversing the central region image A of the test image and the window image B of the standard image, perform the inner product calculation, that is, the sum of the products of all corresponding elements of the two matrices, to obtain the inner product matrix C.
3. The X-ray nondestructive testing image registration method based on inner product as described in claim 2, characterized in that, S21 includes: a test image Image A of the central region x a , y a ), is based on the center coordinates of the test image ( x c , y c Centered on ), the length and height are respectively... p , q The rectangular region image, where x c - p / 2 ≤ x a ≤ x c + p / 2 , y c - q / 2 ≤ y a ≤ y c + q / 2 .
4. The X-ray nondestructive testing image registration method based on inner product as described in claim 3, characterized in that, p and q are taken as 1 / 5 to 1 / 3 of the length and height of the object being measured in the X-ray image.
5. The X-ray nondestructive testing image registration method based on inner product as described in claim 3, characterized in that, S22 includes: in the standard image I r (x r y r Within a defined range, the central region of the image A is used. x a , y a Iterate through it; window image B ( x b , y b The center and standard image I r (x r y r The centers coincide, and the length and height of window image B are respectively... p +2k, q +2k; Central region image A in standard image I r The range of movement is ( x c ± k , y c ± k ), that is, the start and end range of window image B is ( x c - kp / 2 , y c - kq / 2 )to( x c + k+p / 2 , y c + k+q / 2 ), where the sliding window step size is m , n , m , n ≤ k .
6. The X-ray nondestructive testing image registration method based on inner product as described in claim 5, characterized in that, m and n are both 1.
7. The X-ray nondestructive testing image registration method based on inner product as described in claim 5, characterized in that, S23 includes: elements within C c lk The calculation is as follows: in, l,k For integers, 0 ≤ l ≤ (2 k- 1) / m , 0≤k≤(2 k- 1) / n; Therefore, the coordinates of the center point of matrix C are ( k , k ).
8. The X-ray nondestructive testing image registration method based on inner product as described in claim 7, characterized in that, S3 includes: Step 31: Calculate the maximum value of the elements in the inner product matrix C. c max ; Step 32, Confirm c max The coordinate position in the C matrix ( x cmax , y cmax ); Step 33: Calculate the offset vector between the test image and the standard image, based on the coordinates of the maximum value of the inner product matrix C ( x cmax , y cmax The coordinates of the inner product matrix C are obtained from the offset of the center point; if the coordinates of the maximum value of the inner product matrix C are ( x cmax , y cmax ) and center point coordinates ( k , k If they overlap, it indicates that the test image Image A of the central region x a , y a The center of the window image B of the standard image coincides with the center of the window image B, i.e., there is no offset.
9. The X-ray nondestructive testing image registration method based on inner product as described in claim 8, characterized in that, In step S33, the method for calculating the offset vector between the test image and the standard image is as follows: Offset Δx = x cmax – k Offset Δy = y cmax – k .
10. The X-ray nondestructive testing image registration method based on inner product as described in claim 9, characterized in that, S4 includes: performing coordinate transformation based on the offset vector to achieve image translation and obtain the registered image I. P The calculation formula is as follows: 。