A method and apparatus for acquiring digital images

By rationally dividing the matching region and constructing feature sub-regions in the image stitching algorithm, and combining frequency domain information fusion, the computational complexity and stitching seam problem in large field of view and high-precision visual inspection are solved, and fast and accurate image stitching effect is achieved.

CN115511761BActive Publication Date: 2026-07-17BEIJING SATELLITE MFG FACTORY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SATELLITE MFG FACTORY
Filing Date
2022-09-26
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing image stitching algorithms suffer from high computational complexity and insufficient real-time performance in large field-of-view, high-precision visual inspection, and fail to fully utilize neighborhood information, resulting in poor stitching effects and obvious stitching seams.

Method used

By rationally dividing the matching region and constructing feature units, image matching is performed using edge region feature units. After hierarchical downsampling of frequency domain information, neighborhood weight fusion and high-frequency information thresholding fusion are adopted, combined with a human eye biomimetic model to achieve fast and accurate image matching and fusion.

Benefits of technology

It enables rapid and accurate stitching of large field-of-view, high-precision images, reduces stitching seams, and improves the real-time performance and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115511761B_ABST
    Figure CN115511761B_ABST
Patent Text Reader

Abstract

This invention discloses a digital image acquisition method and apparatus. The method includes: scanning a detection area of ​​the test piece using a digital image acquisition device corresponding to the test piece, obtaining a region scanning result corresponding to the test piece; matching the region scanning result to obtain a matched image region corresponding to the test piece; performing coordinate registration processing on the matched image region to obtain a registered image of the test piece; and fusing edge region information of the registered image to obtain a digital image of the test piece. This invention can solve the problems of high computational load and insufficient real-time performance in existing image stitching methods, which is beneficial for quickly and accurately achieving image matching and fusion, thereby promoting the detection of large field-of-view, high-precision images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and apparatus for acquiring digital images. Background Technology

[0002] Currently, many industrial sectors such as aviation, aerospace, and military have placed higher demands on visual inspection with large field of view and high precision in order to achieve large-scale, full-field displacement and deformation detection. Accurate and reasonable measurement of large field of view and high-precision digital images is the key foundation for comprehensively acquiring the test state of the test piece and evaluating its performance.

[0003] Image stitching algorithms are an effective method for achieving high-precision, large-size digital images. This method mainly utilizes devices capable of acquiring digital images to collect information about the surface being measured, obtain end-face point clouds, further combine digital image features for image matching, and perform coordinate registration on images acquired from different viewpoints and acquisition devices. Finally, a fusion method is used to fuse the data to obtain a stitched image that balances a large field of view and high detection accuracy.

[0004] However, existing stitching algorithms directly process all point cloud coordinate data obtained from measurements to achieve image feature acquisition and image matching. The preprocessing process is complex, the real-time computation is difficult to meet engineering requirements, and the mutual influence of neighboring information is often not considered during the fusion process, resulting in obvious stitching seams in the actual stitching. The above-mentioned shortcomings of traditional methods seriously affect the actual effect of image stitching, thus bringing errors and uncertainties to the detection and evaluation based on the stitching results. Summary of the Invention

[0005] The technical problem solved by the present invention is to overcome the shortcomings of the prior art and provide a digital image acquisition method and apparatus.

[0006] The technical solution of this invention is:

[0007] In a first aspect, embodiments of the present invention provide a digital image acquisition method, the method comprising:

[0008] The area to be detected of the test piece is scanned using a digital image acquisition device corresponding to the test piece, and the scanning result of the area corresponding to the test piece is obtained.

[0009] The scan results of the region are matched to obtain the matching image region corresponding to the test piece;

[0010] The matched image regions are subjected to coordinate registration processing to obtain the registered image of the test piece;

[0011] The edge region information of the registered image is fused to obtain a digital image of the test piece.

[0012] Optionally, the digital image acquisition device corresponding to the test piece scans the area to be detected of the test piece to obtain the area scanning result corresponding to the test piece, including:

[0013] Obtain the maximum image resolution covering the detection area of ​​the test piece at a specified accuracy;

[0014] Obtain the number of scans of the detection area at the specified accuracy;

[0015] The detection area is divided into N regions; N is a positive integer.

[0016] The digital image acquisition device scans the N divided regions according to the maximum image resolution and the number of scans to obtain the region scan result corresponding to the test piece.

[0017] Optionally, matching the region scanning results to obtain the matching image region corresponding to the test piece includes:

[0018] Based on the region scanning results, the edge region of a single region is obtained;

[0019] The edge region is divided into multiple grid regions to obtain the edge region.

[0020] Obtain the feature point coordinates of the region point set for each grid region and the feature point coordinates of the entire region, as well as the region pixel feature value of each grid region;

[0021] Based on the feature point coordinates and the region pixel feature values, determine the edge region feature descriptor of the edge region;

[0022] The edge region feature descriptors are matched to obtain the matched image region of the test piece.

[0023] Optionally, the step of performing coordinate registration processing on the matched image region to obtain the registered image of the test piece includes:

[0024] Extract grid feature points within the matched image region to generate a coordinate calculation data set;

[0025] Obtain the scaling factor of the coordinate data of each feature point in the coordinate calculation data set;

[0026] Based on the coordinates of three non-collinear points in the data set, the coordinate calculation deviation and the rotation matrix are calculated.

[0027] Based on the scaling factor, the rotation matrix, and the data, the offset parameter is calculated for any point in the data set.

[0028] The coordinate transformation parameters are calculated based on the scaling factor, the rotation matrix, and the offset parameter.

[0029] Based on the coordinate transformation parameters, coordinate registration processing is performed on the matched image region to obtain the registered image of the test piece.

[0030] Optionally, the step of fusing the edge region information of the registered image to obtain a digital image of the test piece includes:

[0031] Frequency domain extraction is performed on the image information of the registered image. A low-pass filter is constructed using a scaling function to extract low-frequency information in the registered image, and a high-pass filter is constructed using a wavelet function to extract high-frequency information in the image.

[0032] The low-frequency information and the high-frequency information are fused to obtain a digital image of the test piece.

[0033] In a second aspect, embodiments of the present invention provide a digital image acquisition device, the device comprising:

[0034] The region scanning result acquisition module is used to scan the area to be detected of the test piece based on the digital image acquisition device corresponding to the test piece, and obtain the region scanning result corresponding to the test piece.

[0035] The image region acquisition module is used to match the region scanning results to obtain the matching image region corresponding to the test piece;

[0036] The registration image acquisition module is used to perform coordinate registration processing on the matched image region to obtain the registration image of the test piece;

[0037] The digital image acquisition module is used to perform fusion processing on the edge region information of the registered image to obtain a digital image of the test piece.

[0038] Optionally, the region scan result acquisition module includes:

[0039] The image resolution acquisition unit is used to acquire the maximum image resolution covering the detection area of ​​the test piece at a specified accuracy;

[0040] A scan count acquisition unit is used to acquire the number of scans of the detection area at the specified accuracy.

[0041] The region division acquisition unit is used to divide the detection region into N regions; N is a positive integer.

[0042] The region scanning result acquisition unit is used to scan the N divided regions based on the maximum image resolution and the number of scans by the digital image acquisition device to obtain the region scanning result corresponding to the test piece.

[0043] Optionally, the image region acquisition module includes:

[0044] An edge region acquisition unit is used to acquire the edge region of a single region based on the region scanning results.

[0045] A grid region acquisition unit is used to divide the edge region into grid regions to obtain multiple grid regions of the edge region;

[0046] The feature point acquisition unit is used to acquire the coordinates of the feature points of the region point set of each grid region and the coordinates of the feature points of the entire region, as well as the region pixel feature value of each grid region.

[0047] The feature descriptor determination unit is used to determine the edge region feature descriptor of the edge region based on the feature point coordinates and the region pixel feature values;

[0048] The image region acquisition unit is used to perform matching processing on the edge region feature descriptors to obtain the matching image region of the test piece.

[0049] Optionally, the registration image acquisition module includes:

[0050] The coordinate calculation data group generation unit is used to extract grid feature points within the matched image region and generate coordinate calculation data groups.

[0051] The scaling factor acquisition unit is used to acquire the scaling factor of the coordinate data of each feature point in the coordinate calculation data group.

[0052] The rotation matrix calculation unit is used to calculate the coordinate calculation deviation and the rotation matrix based on three non-collinear points in the coordinate calculation data set.

[0053] The offset parameter calculation unit is used to calculate the offset parameter based on the scaling factor, the rotation matrix, and the data calculation data group for any point.

[0054] The transformation parameter calculation unit is used to calculate the coordinate transformation parameters based on the scaling factor, the rotation matrix, and the offset parameter.

[0055] The registration image acquisition unit is used to perform coordinate registration processing on the matched image region based on the coordinate transformation parameters to obtain the registration image of the test piece.

[0056] Optionally, the digital image acquisition module includes:

[0057] The high-frequency information extraction unit is used to extract the image information of the registered image in the frequency domain, construct a low-pass filter using a scaling function to extract low-frequency information in the registered image, and construct a high-pass filter using a wavelet function to extract high-frequency information in the image.

[0058] The digital image acquisition unit is used to perform information fusion processing on the low-frequency information and the high-frequency information to obtain a digital image of the test piece.

[0059] The advantages of this invention compared to existing technologies are as follows: By rationally delineating the matching region and constructing feature sub-regions, this invention enables rotation-invariant feature description of a small amount of data. Image matching based on edge region feature sub-regions solves the problems of high computational load and insufficient real-time performance in existing image stitching methods, facilitating rapid and accurate image matching and fusion, thereby promoting the detection of large field-of-view, high-precision images. Furthermore, after hierarchical downsampling extraction of frequency domain information, neighborhood weight fusion is used for low-frequency information, and neighborhood contrast thresholding fusion is used for high-frequency information. By fully integrating the human eye biomimetic model, effective and stable fusion of image data is achieved based on the effective utilization of neighborhood information, resulting in a visually seamless effect. Attached Figure Description

[0060] Figure 1 A flowchart illustrating the steps of a digital image acquisition method provided in an embodiment of the present invention;

[0061] Figure 2 This is a schematic diagram illustrating an example of a scanning execution scheme provided in an embodiment of the present invention;

[0062] Figure 3 This is a schematic diagram illustrating the segmentation of edge information for a single region, provided as an embodiment of the present invention.

[0063] Figure 4 This is a schematic diagram illustrating a 3×3 partitioning of edge information and feature extraction provided in an embodiment of the present invention;

[0064] Figure 5 A schematic diagram of an image matching result provided in an embodiment of the present invention;

[0065] Figure 6 A schematic diagram of an image fusion process provided in an embodiment of the present invention;

[0066] Figure 7 This is a schematic diagram illustrating an image information extraction process provided in an embodiment of the present invention;

[0067] Figure 8 This is a schematic diagram of the structure of a digital image acquisition device provided in an embodiment of the present invention. Detailed Implementation

[0068] The embodiments of the present invention can be applied to the improved high-precision large-scale digital image acquisition process under high and low temperature environments, mainly including the following four stages:

[0069] In the first stage, digital images are acquired by scanning with image acquisition equipment. The placement of multi-camera image acquisition equipment is confirmed according to the shape of the target. The field of view detected by each image acquisition equipment is then further processed into a grid. Each individual image acquisition equipment scans the gridded field of view region by region, forming an independent set of points. These points include, but are not limited to, the three-dimensional coordinates and pixel values ​​of each pixel in the current image acquisition equipment's coordinate system, providing fundamental information for acquiring high-precision, large-size images.

[0070] In the second stage, the point sets of each region are further divided into grids, and the features of the grids corresponding to the edge parts of each overall region are extracted. The center position of each grid in the edge region and the neighborhood feature statistics of the center are calculated. The edge region information is used to form the feature of the overall region, and the feature will be used for further image registration.

[0071] The third stage involves matching edge features across different regions. The correlation between feature values ​​between regions is calculated, and the edges of each pair of regions with the highest correlation index are identified as the matching result. Three pairs of non-collinear grids with central moments are randomly selected from the edges of the matched regions. The coordinates of the focal points of each grid are calculated, and the coordinate transformation equations between regions are iteratively fitted based on the focal point coordinates of the corresponding grids. Combining these coordinate transformation equations, all coordinate transformations between the matched regions are achieved, and the matching result with complete coordinate transformation is used as the final image registration result.

[0072] The fourth stage involves information fusion of the image registration results. Wavelet transform is used to perform spatial domain transformation on the edge regions in the registration results. High-pass and low-pass filters are used to decompose image information of different scales in the spatial domain. After removing noise and enhancing information, high-frequency information representing contours and textures and low-frequency information representing the overall light and shadow color of the image are extracted separately. Visual biomimetic weighted fusion method is used for low-frequency information fusion, and thresholding fusion method is used for high-frequency information fusion. After completing the high-frequency and low-frequency information fusion, the fusion result is inversely transformed to the spatial domain. The transformed result is used as the final result of image stitching after fusion, and finally a high-precision large-size digital image is obtained.

[0073] The technical solutions of the embodiments of the present invention will now be described in detail with reference to specific examples.

[0074] Example 1

[0075] Reference Figure 1 The flowchart illustrates the steps of a digital image acquisition method provided by an embodiment of the present invention, as follows: Figure 1 As shown, the digital image acquisition method may include the following steps:

[0076] Step 101: Scan the area to be detected of the test piece using the digital image acquisition device corresponding to the test piece to obtain the area scanning result corresponding to the test piece.

[0077] In this embodiment, the area to be detected on the test piece can be scanned using a digital image acquisition device corresponding to the test piece, thereby obtaining the scanning result of the area corresponding to the test piece. Specifically, this implementation process can be described in detail below with reference to the specific implementation method.

[0078] In one specific implementation of this application, step 101 may include:

[0079] Sub-step A1: Obtain the maximum image resolution covering the detection area of ​​the test piece at a specified precision.

[0080] In this embodiment, speckle target processing is performed on the surface of the test specimen. Digital image acquisition devices are arranged according to the shape of the test specimen itself, and the scanning results of the field of view forming area are scanned using the digital image acquisition devices. The number of digital image acquisition devices corresponding to the part or end face to be inspected on the test specimen is at least one. The state of the arranged image acquisition devices is adjusted and confirmed to ensure that the part of the specimen to be inspected and its target are within the effective imaging distance of the image acquisition devices. The image acquisition devices are used to scan the part of the specimen to be inspected, ensuring that the images acquired by each image acquisition device always share a common area with the images of adjacent positions. The determination of the scanning area during the image scanning process is based on the required detection accuracy combined with the resolution of the image acquisition devices and the size of the part to be inspected. The basic principle is to ensure the accuracy of the scanned image while minimizing the number of scans (region divisions). The specific calculation method is as follows:

[0081]

[0082] First, the maximum image resolution covering the detection area can be calculated at a specified accuracy. In the above formula, DIC_acc represents the highest accuracy of image acquisition and processing by the image acquisition device, which is generally 0.01 pixels; Dis_acc represents the required accuracy for detection; Ls represents the size of the area being measured; and Lp represents the maximum image resolution required to cover the area being measured, in pixels.

[0083] Sub-step A2: Obtain the number of scans of the detection area at the specified precision.

[0084] Sub-step A3: Divide the detection area into N partitioned regions; N is a positive integer.

[0085] Sub-step A4: Based on the digital image acquisition device, scan the N divided regions according to the maximum image resolution and the number of scans to obtain the region scan result corresponding to the test piece.

[0086] After obtaining the maximum image resolution required for the required accuracy, the number of scans of the area is further calculated. In the following formula, the resolution of an image acquisition device is Cam_colxCam_row. During scanning, the detected area is divided into N regions, where N is a positive integer, and N = m × n.

[0087]

[0088] Finally, the obtained area is scanned. During scanning, the image acquisition device parameters are set according to the location of the image acquisition points and the size and spacing of each area. The scan results are stored in the form of three-dimensional spatial coordinates and the corresponding pixel values ​​of each coordinate point. There are overlapping areas among the areas, which will be used as the common stitching area for registration and stitching. Figure 2 As shown, A1 to A9 are the nine regions. Starting from A1 in the upper left corner, at least one image acquisition device is used to scan row by row and column by column along the path indicated by the arrow. During the scan, the parameters of the image acquisition device are set according to the layout of the image acquisition device and the size and spacing of each region. In the scan results, the data of each region is stored in the form of spatial three-dimensional coordinates and the corresponding pixel values ​​of each coordinate point.

[0089] After obtaining the scan results of the area corresponding to the test piece, proceed to step 102.

[0090] Step 102: Match the scan results of the region to obtain the matching image region corresponding to the test piece.

[0091] After obtaining the region scan results corresponding to the test piece, the region scan results can be matched to obtain the matching image region corresponding to the test piece. This implementation process can be described in detail below with reference to the specific implementation method.

[0092] In one specific implementation of the present invention, step 102 may include:

[0093] Sub-step B1: Based on the region scanning results, obtain the edge region of a single region.

[0094] In this embodiment of the invention, after obtaining the region scanning results, the edge regions of a single region can be obtained based on the region scanning results. Specifically, firstly, edge region data is obtained for the scanned single region. The edge region is the defined portion of the region edge that is not smaller than the overlapping region, such as... Figure 3 As shown, four edge regions H1, H2, V1, and V2 are obtained from a single region, where H represents the horizontal boundary and V represents the vertical boundary. The feature information of these edge regions characterizes the features of the corresponding regions, and image data matching between regions is performed based on this feature information. The feature information in the edge regions is mainly obtained by meshing the region into a JxK grid and extracting and describing the grid features. Taking a 3x3 grid as an example, the edge information description and extraction can be performed as follows: Figure 4 As shown, in Figure 3 The V2 region shown is divided into nine grids, from G1 to G9.

[0095] Sub-step B2: Divide the edge region into grid regions to obtain multiple grid regions of the edge region.

[0096] Sub-step B3: Obtain the coordinates of the feature points of the region point set of each grid region and the coordinates of the feature points of the entire region, as well as the region pixel feature values ​​of each grid region.

[0097] Sub-step B4: Based on the feature point coordinates and the region pixel feature values, determine the edge region feature descriptor of the edge region.

[0098] Sub-step B5: Perform matching processing on the edge region feature descriptors to obtain the matching image region of the test piece.

[0099] The feature information in the edge region is mainly obtained by meshing the region into a J×K grid and extracting and describing the grid features. The feature extraction steps for the J×K grids are as follows:

[0100] The first step is to solve for the feature point coordinates of the region point set of each grid and the feature point coordinates of the entire region, as shown in the following formula, where m and M represent the number of pixels in the grid and the number of pixels in the region, respectively, and PGi and PG represent the feature point coordinates of each grid and the feature point coordinates of the region, respectively.

[0101]

[0102]

[0103] The second step is to solve for the regional pixel feature value of each grid. Specifically, this means solving for the pixel mean of all pixels in the grid to obtain the pixel feature value SGi (i = 1...JK) of each grid, and solving for the pixel mean of the entire region as the regional pixel feature value SG.

[0104] The third step is to construct an edge region feature descriptor based on the feature point coordinates and feature pixels. The feature matrix is ​​established as shown in the following formula, where Dis represents the spatial distance between the coordinates of each grid feature point PGe and the coordinates of the region feature point PG, and Diff represents the difference between the pixel feature value SGi of each grid point and the pixel feature value SG of the region. All Dis values ​​are normalized after calculation, and all Diff values ​​are binarized after calculation. The final calculation result uses the Dis and Diff data with the largest spatial distance as the first row of data. The feature matrix is ​​established by progressively decreasing the spatial distance. The feature matrix is ​​used as a boundary region feature, as shown in the following formula. A single region will ultimately have four feature sub-sub ...

[0105]

[0106] The fourth step involves image matching using the four edge features of each region. A decentralized, unbiased mean squared error correlation index is proposed as the criterion for evaluating the correlation of boundary features. Boundary features belonging to the same horizontal or vertical direction between regions are extracted and their correlation is calculated. Taking the correlation calculation of horizontal features between two regions as an example, and the calculation of vertical edges as another example, the formulas are shown below. The pair of edges with the highest correlation index is taken as the image matching result. The matching result can be as follows: Figure 5 As shown:

[0107]

[0108]

[0109]

[0110]

[0111]

[0112] After matching the region scan results to obtain the matching image region corresponding to the test piece, step 103 is executed.

[0113] Step 103: Perform coordinate registration processing on the matched image region to obtain the registered image of the test piece.

[0114] After matching the region scan results to obtain the corresponding image region for the test piece, coordinate registration processing can be performed on the matched image region to obtain the registered image of the test piece. Specifically, grid feature points within the matched image region can be extracted to generate a coordinate calculation data set; the scaling factor of the coordinate data of each feature point in the coordinate calculation data set can be obtained; the coordinate calculation deviation and rotation matrix can be calculated based on three non-collinear points in the coordinate calculation data set; the offset parameter can be calculated based on the scaling factor, the rotation matrix, and any point in the coordinate calculation data set; the coordinate transformation parameter can be calculated based on the scaling factor, the rotation matrix, and the offset parameter; and the coordinate registration processing can be performed on the matched image region based on the coordinate transformation parameter to obtain the registered image of the test piece.

[0115] In practice, registration is based on image matching from the previous step. Spatial coordinate registration is achieved by combining the coordinates of edge feature points in matched images obtained from different shooting positions of the same image acquisition device or from different image acquisition devices. The specific implementation process is as follows:

[0116] The first step is to randomly extract grid feature points in the matched edge region, and use the extracted points and corresponding points to form a coordinate calculation data set; the number of grid feature points extracted in a single image shall not be less than three, and there shall be at least three feature points that are not collinear with each other in space.

[0117] The second step is to calculate the scaling factor for the coordinates of each feature point in the data set. Two points P are randomly selected. Gα P Gβ Forming reference edge L < P Gα ,P Gβ >, and its corresponding edge L < P Gα ',P Gβ >, and calculate the scaling factor λ using the following formula, where ||L<P Gα ,P Gβ >||、||L<P Gα ',P Gβ '>|| represents the modulus of the two sides mentioned above; calculate the scaling coefficients for at least three sets and solve for the mean, using the mean result as the final scaling coefficient calculation result.

[0118]

[0119]

[0120] The third step is to extract three non-collinear points P from the coordinate calculation data set. Gα (x1,y1,z1),P Gβ (x2,y2,z2), P Gγ (x3, y3, z3) constitute the reference point set, corresponding to P Gα '(x1',y1',z1'),P Gβ '(x2',y2',z2'), P Gγ (x3', y3', z3') constitute the corresponding point set;

[0121] Repeat the above sampling n times to obtain a total of n pairs of points. Combine the least squares method to calculate the optimal solution of auxiliary parameters. The calculation process can be constructed as shown below, where B is the auxiliary parameter matrix and δ is the coordinate calculation deviation.

[0122]

[0123]

[0124]

[0125] x ij =x i -x i ,x′ ij =x′ i -x′ j

[0126] Based on this, the rotation matrix R is solved simultaneously, as shown in the following equation.

[0127]

[0128] The third step is to extract any point from the coordinate calculation data set and calculate the offset parameter based on the solved rotation matrix and scaling factor; the calculation formula is shown below.

[0129]

[0130] The fourth step, after calculating the scaling, rotation matrix, and offset parameters, yields the following coordinate registration calculation formula, where x, y, and z are the transformed coordinates, and x', y', and z' are the original coordinates.

[0131]

[0132] The fifth step is to transform the coordinates of each grid feature point that was not extracted in the first step, and calculate the residual between each feature point and its corresponding feature point after transformation.

[0133] Step 6: Repeat steps 3 to 5, and in each repeated calculation, identify points that exceed the residual threshold as defect points and remove them, until the residuals of all feature points are within the threshold range.

[0134] The seventh step is to use the final calculated coordinate transformation parameters to transform all the acquired images to the same coordinate system and store them in the form of a registration matrix that can be queried, as a reference for subsequent information fusion.

[0135] After performing coordinate registration processing on the matched image regions to obtain the registered image of the test piece, step 104 is executed.

[0136] Step 104: Perform fusion processing on the edge region information of the registered image to obtain a digital image of the test piece.

[0137] After performing coordinate registration on the matched image regions to obtain the registered image of the test piece, the edge region information of the registered image can be fused to obtain the digital image of the test piece. Specifically, the image information of the registered image can be extracted in the frequency domain. A low-pass filter is constructed using a scaling function to extract low-frequency information from the registered image, and a high-pass filter is constructed using a wavelet function to extract high-frequency information from the image. The low-frequency information and the high-frequency information are then fused to obtain the digital image of the test piece.

[0138] In practical implementation, a fusion process involving frequency domain information extraction, fusion of information at different scales, and reconstruction can be adopted. For example... Figure 6 As shown, the image fusion process may specifically include the following steps:

[0139] The first step is to extract the image information in the frequency domain. A low-pass filter is constructed using a scaling function to extract low-frequency information, and a high-pass filter is constructed using a wavelet function to extract high-frequency information. The formula for this information extraction is shown below, where H represents the low-pass filter coefficient matrix, G represents the high-pass filter coefficient matrix, A represents the low-frequency information of the image, and D represents the high-frequency information of the image. As shown in the calculation formula, in multiple image information extractions, each extraction is based on the previous low-frequency information, which is further downsampled and decomposed into low-frequency information A. l+1 With horizontal vertical diagonal The high-frequency information in three directions is decomposed three times based on the original image, as follows: Figure 7As shown, corresponding to A l+1 , In the diagram, these are LL, LH, and HH.

[0140]

[0141] The second step involves fusing information at different scales from the results of different image feature extractions. Low-frequency information represents the overall appearance of the image, while high-frequency information represents the edges and details. Since the content represented by low-frequency and high-frequency information is different, low-frequency and high-frequency information are fused for corresponding pixels in the image fusion process. Based on the fusion, further reconstruction calculations are performed.

[0142] When fusing low-frequency information, a weighted average of neighborhood feature coefficients is used. First, for each pixel in the spatial domain, the wavelet coefficients corresponding to the M×N neighborhoods are calculated to obtain the low-frequency neighborhood feature wavelet coefficients M(i,j), as shown in the following formula, where A(i+m,j+n) represents the wavelet coefficients of each point in the neighborhood corresponding to point (i,j) in the image space, and Gu(m,n) represents the Gaussian distribution coefficients of the corresponding neighborhood positions. The neighborhood feature wavelet coefficients are then calculated for each pixel in the edge region.

[0143]

[0144] Next, the weights of each edge region in the two matched images α and β are calculated as shown in the following formula.

[0145]

[0146] Finally, the low-frequency information is weighted and fused to obtain the fusion result γ. The wavelet coefficients of each point in the fusion result are shown in the following formula.

[0147]

[0148] Thresholding is employed when fusing high-frequency information. First, for each pixel's M×N neighborhood in the spatial domain, the high-frequency neighborhood feature wavelet coefficients M(i,j)' are calculated, where La(m,n) is the Gaussian distribution coefficient at the corresponding neighborhood position, and D(i+m,j+n) represents the wavelet coefficients of each point in the neighborhood corresponding to point (i,j) in the image space. Based on this, the contrastive feature values ​​D(i,j) of each point in the edge region are calculated.

[0149]

[0150]

[0151] Finally, thresholding is performed based on the contrast feature values ​​to obtain the fusion result γ(i,j) as shown in the following formula.

[0152]

[0153]

[0154] The third step involves performing a step-by-step inverse transform on the fused frequency domain data to reconstruct the spatial domain data. Specifically, an inverse transform is performed on each extracted frequency domain information, and the calculation formula is shown below, where A... j+1 For in A j The results of extraction and decomposition are obtained based on this.

[0155]

[0156] Example 2

[0157] Reference Figure 8 The diagram shows a schematic representation of a digital image acquisition device according to an embodiment of the present invention. Figure 8 As shown, the digital image acquisition device 800 may include the following modules:

[0158] The region scanning result acquisition module 810 is used to scan the area to be detected of the test piece based on the digital image acquisition device corresponding to the test piece, and obtain the region scanning result corresponding to the test piece.

[0159] The image region acquisition module 820 is used to match the region scanning results to obtain the matching image region corresponding to the test piece;

[0160] The registration image acquisition module 830 is used to perform coordinate registration processing on the matched image region to obtain the registration image of the test piece;

[0161] The digital image acquisition module 840 is used to perform fusion processing on the edge region information of the registered image to obtain a digital image of the test piece.

[0162] Optionally, the region scan result acquisition module 810 includes:

[0163] The image resolution acquisition unit is used to acquire the maximum image resolution covering the detection area of ​​the test piece at a specified accuracy;

[0164] A scan count acquisition unit is used to acquire the number of scans of the detection area at the specified accuracy.

[0165] The region division acquisition unit is used to divide the detection region into N regions; N is a positive integer.

[0166] The region scanning result acquisition unit is used to scan the N divided regions based on the maximum image resolution and the number of scans by the digital image acquisition device to obtain the region scanning result corresponding to the test piece.

[0167] Optionally, the image region acquisition module 820 includes:

[0168] An edge region acquisition unit is used to acquire the edge region of a single region based on the region scanning results.

[0169] A grid region acquisition unit is used to divide the edge region into grid regions to obtain multiple grid regions of the edge region;

[0170] The feature point acquisition unit is used to acquire the coordinates of the feature points of the region point set of each grid region and the coordinates of the feature points of the entire region, as well as the region pixel feature value of each grid region.

[0171] The feature descriptor determination unit is used to determine the edge region feature descriptor of the edge region based on the feature point coordinates and the region pixel feature values;

[0172] The image region acquisition unit is used to perform matching processing on the edge region feature descriptors to obtain the matching image region of the test piece.

[0173] Optionally, the registration image acquisition module 830 includes:

[0174] The coordinate calculation data group generation unit is used to extract grid feature points within the matched image region and generate coordinate calculation data groups.

[0175] The scaling factor acquisition unit is used to acquire the scaling factor of the coordinate data of each feature point in the coordinate calculation data group.

[0176] The rotation matrix calculation unit is used to calculate the coordinate calculation deviation and the rotation matrix based on three non-collinear points in the coordinate calculation data set.

[0177] The offset parameter calculation unit is used to calculate the offset parameter based on the scaling factor, the rotation matrix, and the data calculation data group for any point.

[0178] The transformation parameter calculation unit is used to calculate the coordinate transformation parameters based on the scaling factor, the rotation matrix, and the offset parameter.

[0179] The registration image acquisition unit is used to perform coordinate registration processing on the matched image region based on the coordinate transformation parameters to obtain the registration image of the test piece.

[0180] Optionally, the digital image acquisition module 840 includes:

[0181] The high-frequency information extraction unit is used to extract the image information of the registered image in the frequency domain, construct a low-pass filter using a scaling function to extract low-frequency information in the registered image, and construct a high-pass filter using a wavelet function to extract high-frequency information in the image.

[0182] The digital image acquisition unit is used to perform information fusion processing on the low-frequency information and the high-frequency information to obtain a digital image of the test piece.

[0183] The specific embodiments described in this application are intended to enable those skilled in the art to gain a more comprehensive understanding of this application, but do not limit this application in any way. Therefore, those skilled in the art should understand that modifications or equivalent substitutions can still be made to this application; and all technical solutions and improvements that do not depart from the spirit and technical essence of this application should be covered within the scope of protection of this patent application.

[0184] The contents not described in detail in this specification are common knowledge to those skilled in the art.

Claims

1. A method for acquiring digital images, characterized in that, The method includes: The area to be detected of the test piece is scanned using a digital image acquisition device corresponding to the test piece, and the scanning result of the area corresponding to the test piece is obtained. The scan results of the region are matched to obtain the matching image region corresponding to the test piece; The matched image regions are subjected to coordinate registration processing to obtain the registered image of the test piece; The edge region information of the registered image is fused to obtain a digital image of the test piece; The digital image acquisition device corresponding to the test piece scans the area to be detected of the test piece to obtain the area scanning result corresponding to the test piece, including: Obtain the maximum image resolution covering the detection area of ​​the test piece at a specified accuracy; Obtain the number of scans of the detection area at the specified accuracy; The detection area is divided into N regions; N is a positive integer. Based on the digital image acquisition device, the N divided regions are scanned according to the maximum image resolution and the number of scans to obtain the region scan result corresponding to the test piece; The step of matching the scan results of the region to obtain the matching image region corresponding to the test piece includes: Based on the region scanning results, the edge region of a single region is obtained; The edge region is divided into multiple grid regions to obtain the edge region. Obtain the feature point coordinates of the region point set for each grid region and the feature point coordinates of the entire region, as well as the region pixel feature value of each grid region; Based on the feature point coordinates and the region pixel feature values, determine the edge region feature descriptor of the edge region; The edge region feature descriptors are matched to obtain the matched image region of the test piece; The step of performing coordinate registration processing on the matched image regions to obtain the registered image of the test piece includes: Extract grid feature points within the matched image region to generate a coordinate calculation data set; Obtain the scaling factor of the coordinate data of each feature point in the coordinate calculation data set; Based on the coordinates of three non-collinear points in the data set, the coordinate calculation deviation and the rotation matrix are calculated. Based on the scaling factor, the rotation matrix, and the data, the offset parameter is calculated for any point in the data set. The coordinate transformation parameters are calculated based on the scaling factor, the rotation matrix, and the offset parameter. Based on the coordinate transformation parameters, coordinate registration processing is performed on the matched image region to obtain the registered image of the test piece; The step of fusing the edge region information of the registered image to obtain a digital image of the test piece includes: Frequency domain extraction is performed on the image information of the registered image. A low-pass filter is constructed using a scaling function to extract low-frequency information in the registered image, and a high-pass filter is constructed using a wavelet function to extract high-frequency information in the image. The low-frequency information and the high-frequency information are fused to obtain a digital image of the test piece.

2. A digital image acquisition device, characterized in that, The device includes: The region scanning result acquisition module is used to scan the area to be detected of the test piece based on the digital image acquisition device corresponding to the test piece, and obtain the region scanning result corresponding to the test piece. The image region acquisition module is used to match the region scanning results to obtain the matching image region corresponding to the test piece; The registration image acquisition module is used to perform coordinate registration processing on the matched image region to obtain the registration image of the test piece; The digital image acquisition module is used to perform fusion processing on the edge region information of the registered image to obtain a digital image of the test piece; The region scan result acquisition module includes: The image resolution acquisition unit is used to acquire the maximum image resolution covering the detection area of ​​the test piece at a specified accuracy; A scan count acquisition unit is used to acquire the number of scans of the detection area at the specified accuracy. The region division acquisition unit is used to divide the detection region into N regions; N is a positive integer. The region scanning result acquisition unit is used to scan the N divided regions based on the digital image acquisition device according to the maximum image resolution and the number of scans, and obtain the region scanning result corresponding to the test piece; The image region acquisition module includes: An edge region acquisition unit is used to acquire the edge region of a single region based on the region scanning results. A grid region acquisition unit is used to divide the edge region into grid regions to obtain multiple grid regions of the edge region; The feature point acquisition unit is used to acquire the coordinates of the feature points of the region point set of each grid region and the coordinates of the feature points of the entire region, as well as the region pixel feature value of each grid region. The feature descriptor determination unit is used to determine the edge region feature descriptor of the edge region based on the feature point coordinates and the region pixel feature values; The image region acquisition unit is used to perform matching processing on the edge region feature descriptors to obtain the matching image region of the test piece; The registration image acquisition module includes: The coordinate calculation data group generation unit is used to extract grid feature points within the matched image region and generate coordinate calculation data groups. The scaling factor acquisition unit is used to acquire the scaling factor of the coordinate data of each feature point in the coordinate calculation data group. The rotation matrix calculation unit is used to calculate the coordinate calculation deviation and the rotation matrix based on three non-collinear points in the coordinate calculation data set. The offset parameter calculation unit is used to calculate the offset parameter based on the scaling factor, the rotation matrix, and the data calculation data group for any point. The transformation parameter calculation unit is used to calculate the coordinate transformation parameters based on the scaling factor, the rotation matrix, and the offset parameter. The registration image acquisition unit is used to perform coordinate registration processing on the matched image region based on the coordinate transformation parameters to obtain the registration image of the test piece; The digital image acquisition module includes: The high-frequency information extraction unit is used to extract the image information of the registered image in the frequency domain, construct a low-pass filter using a scaling function to extract low-frequency information in the registered image, and construct a high-pass filter using a wavelet function to extract high-frequency information in the image. The digital image acquisition unit is used to perform information fusion processing on the low-frequency information and the high-frequency information to obtain a digital image of the test piece.