Data fusion method and system for CCD (Charge Coupled Device) visual inspection

By obtaining the image gradient continuity index in CCD visual detection, marking the breakpoints for interpolation and repair, and combining the signal-to-noise ratio fusion weight, the problems of edge discontinuity and structural dislocation in traditional methods are solved, and the natural transition of image edges and the integrity of local details are achieved.

CN120673213AInactive Publication Date: 2025-09-19SHENZHEN ZHIDING IND CO LTD
View PDF 0 Cites 12 Cited by

Patent Information

Application Number
CN202510834819.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The data fusion method of traditional CCD vision detection is prone to problems such as boundary tearing, structural dislocation, and regional blur in scenes with complex backgrounds or severe target contour overlap, resulting in reduced target edge discrimination accuracy and difficulty in achieving edge continuity reconstruction and effective control of the signal-to-noise ratio of the fusion area.

Method used

By obtaining the gradient direction consistency of the CCD camera image, marking the direction breakpoints for interpolation and repair, calculating the structural similarity index, establishing the signal-to-noise ratio fusion weight, performing Poisson image fusion and contrast equalization, the CCD vision detection data fusion matrix result is generated.

Benefits of technology

The structural fidelity and discrimination stability of the fused image are significantly enhanced, and the natural continuity of image edge transitions and the full preservation of local detail textures are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673213A_ABST
    Figure CN120673213A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of multi-image fusion recognition, in particular to a data fusion method and system for CCD visual detection, and the method comprises the following steps: obtaining a horizontal pixel row calculation gradient construction trend sequence, repairing an edge fracture to generate an integrity index, extracting a gray value to detect feature mutation, and distributing fusion weights to establish a mapping relation. And executing image fusion and balancing the contrast to generate a fusion matrix result. According to the method, the fracture edge region is identified, interpolation compensation is executed, the structural similarity index of the local gray sequence in the image overlapping region and feature direction mutation detection are combined, accurate identification of the edge matching result is guided, and fusion weight factor mapping corresponding to signal-to-noise ratio distribution is introduced; according to the method, the distribution relation between the pixels in the region and the credible weight is effectively established, the edge transition among the multi-source images is more natural through Poisson constraint and contrast balance adjustment of the fusion region, and the structural fidelity and the judgment stability of the fusion image are remarkably enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-image fusion recognition, and in particular to a data fusion method and system for CCD visual detection. Background Art

[0002] The field of multi-image fusion recognition technology lies at the intersection of image recognition and computer vision. It primarily studies how to perform joint analysis based on data from multiple image sources to improve the accuracy and stability of target recognition. Its core issues include image acquisition, image preprocessing, image feature extraction, image matching, and information fusion processing of multi-source images. It covers key links such as multi-view image recognition, heterogeneous image fusion, image alignment and registration, and cross-scale image joint analysis. It is widely used in multiple application scenarios, including security monitoring, industrial inspection, autonomous driving, and medical image analysis. Traditional CCD visual inspection data fusion methods use multiple CCD image sensors to capture image information from different angles or at different times. For fusion processing techniques in overlapping image regions, feature point-based image registration methods are typically used to achieve spatial alignment of images. Furthermore, multi-image information is superimposed using a weighted average fusion strategy or a region-confidence-based method to enhance the integrity and discrimination capabilities of the detected image. Matching and fusion between images are primarily achieved through image grayscale distribution, edge feature extraction, and template-based image correlation metrics.

[0003] In the traditional image data fusion process, regional fusion processing mainly relies on feature point registration and image grayscale distribution. When faced with image areas with discontinuous edges or significant grayscale jumps, the fusion results often have problems such as boundary tearing, structural dislocation, and regional blur due to sparse feature points or unstable grayscale distribution. Especially in scenes with complex backgrounds or severe target contour overlap, registration failure and uneven fusion weights are prone to occur, affecting the accuracy of target edge discrimination and the credibility of the overall image. In cases where there are sudden gradient direction changes or edge occlusions in the overlapping areas of multiple CCD images, this type of fusion strategy that relies on templates and local grayscale is difficult to achieve edge continuity reconstruction and effective control of the signal-to-noise ratio of the fused area. Summary of the Invention

[0004] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a data fusion method for CCD visual detection.

[0005] In order to achieve the above object, the present invention adopts the following technical solution: a data fusion method for CCD visual detection, comprising the following steps: S1: Obtain horizontal pixel rows in the CCD camera image, calculate the gradient amplitude of adjacent pixels, record the gradient direction, construct a trend sequence based on the consistency of edge direction, and generate an image gradient continuity index; S2: Mark the location where the direction of the image gradient continuity index changes as a direction breakpoint, perform bicubic interpolation to replace the original pixel value at the breakpoint, and repair the entire pixel track in sequence to generate an image integrity index; S3: extracting four consecutive pixel grayscale values ​​at the same position from the two CCD images according to the image overlap area located in the image integrity index, calculating the structural similarity index, detecting feature direction histogram mutations, and generating a standard edge consistency report; S4: applying a fusion weight based on the signal-to-noise ratio to the matching area according to the standard edge consistency report, establishing a mapping relationship between the pixel points in each overlapping area and the corresponding fusion weight, and generating a weighted allocation coefficient for the fusion area; S5: Based on the weighted distribution coefficient of the fusion area, perform Poisson image fusion, perform contrast equalization on the mutation area, and generate a CCD visual detection data fusion matrix result.

[0006] As a further solution of the present invention, the image gradient continuity index includes the number of areas with consistent gradient directions, the distribution record of directional discreteness, and the stability of the edge direction trend sequence; the image integrity index includes the breakpoint repair accuracy, the pixel trajectory reconstruction rate, and the degree of edge structure recovery; the standard edge consistency report includes a structural similarity distribution map, feature direction consistency evaluation results, and edge matching effective areas; the fusion area weighted allocation coefficient includes a signal-to-noise ratio distribution map, a weight mapping relationship matrix, and regional fusion confidence; the CCD visual detection data fusion matrix result includes a fusion image grayscale uniformity index, an edge transition smoothness evaluation result, and a contrast enhancement area distribution map.

[0007] As a further solution of the present invention, the steps of obtaining the image gradient continuity index are specifically as follows: S111: Based on the horizontal pixel rows in the CCD camera image, an image grayscale value sequence is collected, and a transverse gradient operation is performed on the grayscale values ​​of adjacent pixels to obtain the transverse gradient response value and the corresponding grayscale difference intensity of each pixel point to obtain a transverse grayscale gradient amplitude sequence; S112: Determine the gradient amplitude change direction between each pixel and its adjacent points based on the horizontal grayscale gradient amplitude sequence, calculate the angle between the grayscale value difference in the horizontal direction and the vertical direction, classify the angle into discrete directions, obtain the edge direction corresponding to each pixel, and acquire a discretized edge direction sequence; S113: Based on the horizontal grayscale gradient amplitude sequence and the discretized edge direction sequence, the absolute change difference of the gradient amplitude in the continuous pixel segments in the same direction is counted, the average deviation of the gradient amplitude of adjacent pixels in the same direction, the sum of the average deviation values ​​in each direction segment, the number of pixels and the number of pixel segments in the same direction are calculated, the discrete intensity of the image directional gradient is calculated, and the image edge continuity performance is judged to obtain the image gradient continuity index.

[0008] As a further solution of the present invention, the steps of obtaining the image integrity index are specifically as follows: S211: Based on the change position of the pixel direction angle in the image gradient continuity index, extract the direction angle category difference value between adjacent pixels, determine whether there is a jump in the direction of consecutive pixels, mark the direction break point, and extract the direction mutation coordinate sequence by comparing the position index of the break point and the non-break point to obtain the edge break position sequence; S212: Based on the edge break position sequence, extract two sets of pixel values ​​before and after the break point according to the pixel grayscale values, gradient amplitudes, and edge direction angles of each pair of positions before and after the break point to form an interpolation window, obtain the gradient change rate and direction angle spacing of the corresponding pixels in the window, calculate the interpolated grayscale value of the break point, use it as the replacement pixel grayscale value of the break position, and insert it into the corresponding position to generate an interpolated replacement grayscale value sequence; S213: According to the interpolation replacement grayscale value sequence, the original grayscale value of each break point is replaced with the interpolated grayscale value, the pixel grayscale matrix is ​​updated, and all positions with directional breaks are traversed in sequence. After point-by-point replacement, the entire pixel trajectory is continuously completed to obtain an image integrity index.

[0009] As a further solution of the present invention, the steps for obtaining the standard edge consistency report are specifically as follows: S311: Locate the image overlapping area based on the image integrity index, extract the pixel rows of the same coordinate points in the two CCD images respectively, obtain the four consecutive pixel grayscale values ​​corresponding to the starting position of each pixel point, form two grayscale vector groups of the same length, calculate the average, variance and covariance of the two groups of grayscale values ​​at the corresponding positions, and obtain the image grayscale structure comparison parameter group; S312: Based on the image grayscale structure comparison parameter group, perform a structural hierarchy evaluation on the grayscale blocks extracted from the same pixel row, calculate the brightness mean, standard deviation, and absolute mean of the difference between the corresponding pixel pairs for each pair of grayscale value sequences in the reference and target images, calculate the fusion structure similarity index, and analyze the local grayscale structure change trend and the overall deviation degree; S313: According to the fusion structure similarity index, extract the SIFT feature histogram data in the corresponding area, detect the change amplitude of the adjacent directional gradient distribution in the directional histogram of each key point item by item, calculate the direction angle change value, filter the key points whose change angle exceeds the baseline value and mark the coordinate index, establish a regional integrity evaluation, and generate a standard edge consistency report.

[0010] As a further solution of the present invention, the steps for obtaining the weighted allocation coefficient of the fusion region are specifically as follows: S411: Based on the image overlapping area marked in the standard edge consistency report, the coordinate values ​​of the pixels in the marked area are read row by row, and the corresponding pixel grayscale values ​​are obtained. For each pixel, the signal intensity and background noise value at the corresponding position are extracted, and the signal-to-noise ratio value is calculated. The pixels are organized according to their spatial position and signal-to-noise ratio value to establish a signal-to-noise ratio distribution sequence; S412: According to the signal-to-noise ratio distribution sequence, the signal-to-noise ratio value of each pixel point is judged item by item and a weight value is assigned, and the spatial index of the pixel point is paired with the corresponding weight value to obtain a fused pixel point mapping weight value group; S413: According to the fusion pixel point mapping weight value group, pixel coordinate information and corresponding fusion weight group are grouped into mapping records, all mapping records are classified and summarized by region number, and fusion region weighted allocation coefficients are generated.

[0011] As a further solution of the present invention, the steps for obtaining the CCD visual detection data fusion matrix result are specifically as follows: S511: Based on the weighted distribution coefficient of the fusion area, the spatial coordinates and fusion weights corresponding to the pixels in each overlapping area are read one by one, the grayscale difference of each pixel is weighted, a Poisson boundary constraint structure is constructed based on the fusion area, the pixel gradient and neighborhood structure are extracted respectively, and Poisson interpolation calculation is performed on the edge area. The grayscale values ​​of all pixels in the area are updated through continuous grayscale field reconstruction operations to generate a gradient-constrained fusion grayscale matrix; S512: Based on the gradient-constrained fusion grayscale matrix, the mutation areas in the image where the grayscale gradient change amplitude exceeds the mutation threshold are marked, the image is divided into equal sub-grid structures, a grayscale histogram is constructed for each sub-grid separately, the original grayscale of each pixel is mapped to the assigned new grayscale value interval, and local image enhancement is performed through grayscale normalization and mapping reconstruction to obtain a histogram clipping equalization result; S513: Based on the histogram clipping equalization result, all sub-grid areas that have completed the equalization processing are screened, the corresponding pixel coordinates are spatially restored and sequentially arranged, and all grayscale distribution information and coordinate mapping relationships before and after enhancement are retained to generate a CCD visual detection data fusion matrix result.

[0012] A CCD visual detection data fusion system, comprising: The gradient direction trend module acquires CCD camera images, extracts horizontal pixel rows, calculates gradient amplitudes, constructs trend sequences based on edge direction consistency, and generates image gradient continuity indicators; The edge break repair module detects directional break points based on the image gradient continuity index, extracts adjacent grayscale values, replaces the original values ​​using bicubic interpolation, and generates an image integrity index; The edge consistency analysis module extracts the grayscale values ​​of the same coordinates of the two images based on the image integrity index, calculates the structural similarity index, determines the mutation direction and locates the mutation position, and generates a standard edge consistency report; The weight factor mapping module extracts grayscale values ​​according to the standard edge consistency report coordinates, calculates the fusion weight of the signal-to-noise ratio, establishes pixel and weight mapping, and generates a weighted allocation coefficient for the fusion area; The contrast fusion output module performs Poisson image fusion according to the weighted distribution coefficient of the fusion area, performs contrast equalization on the mutation area, and generates a CCD visual detection data fusion matrix result.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are: In the present invention, by identifying the broken edge area and performing interpolation compensation, the effective reconstruction of the image structure coherence is achieved. Combined with the structural similarity index of the local grayscale sequence in the overlapping area of ​​the image and the feature direction mutation detection, the accurate identification of the edge matching result is guided. At the same time, the fusion weight factor mapping corresponding to the signal-to-noise ratio distribution is introduced in the fusion process to effectively establish the distribution relationship between the pixels and the trustworthy weights in the area. Through the Poisson constraint and contrast balance adjustment of the fusion area, the edge transition between multi-source images is more natural, the overall grayscale distribution of the fused image is more consistent, the local detail texture is more fully retained, and the broken area filling is more continuous, which significantly enhances the structural fidelity and discrimination stability of the fused image. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a flow chart of the main steps of the present invention; Figure 2 This is a flow chart for obtaining the image gradient continuity index of the present invention; Figure 3 A flowchart for obtaining an image integrity indicator according to the present invention; Figure 4 Obtaining a flow chart for the standard edge consistency report of the present invention; Figure 5 A flow chart for obtaining weighted allocation coefficients for fusion regions of the present invention; Figure 6 This is a flow chart for obtaining CCD visual detection data fusion matrix results of the present invention. DETAILED DESCRIPTION

[0015] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0016] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.

[0017] See also Figure 1 , a data fusion method for CCD visual detection, comprising the following steps: S1: Obtain horizontal pixel rows in the CCD camera image, calculate the Sobel gradient magnitude of adjacent pixels (using a 3×3 convolution kernel (Gx=[-101;-202;-101])), record the gradient direction (0-180°), and construct a trend sequence based on Canny edge direction consistency (edge ​​direction angles are discretized into four directions: 0°, 45°, 90°, and 135°) to generate an image gradient continuity index; S2: Mark the location where the direction changes in the image gradient continuity index as a direction breakpoint, use the bicubic interpolation algorithm to calculate the interpolation, reinsert the interpolation result into the break position and replace the original pixel value, and repair the entire pixel track in sequence to generate the image integrity index; S3: Based on the image overlap area located in the image integrity index, extract the grayscale values ​​of four consecutive pixels at the same position from the two CCD images, calculate the SSIM structural similarity index (structural similarity metric), detect the SIFT feature direction histogram mutation (over 30° is considered a mutation), and generate a standard edge consistency report; S4: Based on the standard edge consistency report, apply a signal-to-noise ratio-based fusion weight to the matching area (0.7 for SNR>20dB, 0.3 for SNR<10dB), establish a mapping relationship between the pixels in each overlapping area and the corresponding fusion weight, and generate a weighted allocation coefficient for the fusion area; S5: Based on the weighted distribution coefficient of the fusion area, Poisson image fusion is performed, and CLAHE contrast equalization (limited contrast histogram equalization, default parameters: histogram bin number 256, contrast limit threshold 2.0, grid division 8×8) is performed on the mutation area to generate the CCD visual detection data fusion matrix result.

[0018] Image gradient continuity indicators include the number of areas with consistent gradient directions, directional discreteness distribution records, and edge direction trend sequence stability. Image integrity indicators include breakpoint repair accuracy, pixel trajectory reconstruction rate, and edge structure recovery degree. Standard edge consistency reports include structural similarity distribution maps, feature direction consistency evaluation results, and edge matching effective areas. The weighted allocation coefficients of fusion areas include signal-to-noise ratio distribution maps, weight mapping relationship matrices, and regional fusion confidence. The CCD visual detection data fusion matrix results include fusion image grayscale uniformity indicators, edge transition smoothness evaluation results, and contrast enhancement area distribution maps.

[0019] See also Figure 2 , S1 step is: S111: Based on the horizontal pixel rows in the CCD camera image, an image grayscale value sequence is collected, and a transverse gradient operation is performed on the grayscale values ​​of adjacent pixels to obtain the transverse gradient response value and the corresponding grayscale difference intensity of each pixel point to obtain a transverse grayscale gradient amplitude sequence; Based on the horizontal pixel rows in the CCD camera image, after obtaining the complete image grayscale matrix, the grayscale value sequence of each row in the image is extracted pixel by pixel. For example, for a certain image row, the extracted grayscale value sequence is , and then the sequence is input into the 3×3 convolution kernel , the convolution kernel is used to calculate the Sobel gradient in the horizontal direction of the image. First, a 3-row data window is constructed between the current row and the two adjacent rows above and below it. For each pixel point, a 3×3 grayscale block is constructed with it as the center position. The grayscale block is expanded into a matrix by row and the corresponding element multiplication and addition operations are performed. For example, the grayscale block corresponding to the 3×3 window centered on the third column is ,application The kernel is weighted and the product matrix is , and the sum of the horizontal gradients is Then repeat the above operation for all pixel positions to obtain the horizontal gradient value sequence of each pixel, and take the absolute value to obtain the horizontal grayscale gradient amplitude sequence. For the current row, we can get , the edge pixels can be ignored due to insufficient coverage of the convolution kernel. This sequence is used as the basic data input for subsequent gradient direction determination and continuity calculation, and the final result is a horizontal grayscale gradient amplitude sequence.

[0020] S112: Determine the direction of change of the gradient amplitude between each pixel and its adjacent points based on the horizontal grayscale gradient amplitude sequence, calculate the angle between the grayscale value difference in the horizontal direction and the vertical direction, classify the angle into discrete directions, obtain the edge direction corresponding to each pixel, and acquire a discretized edge direction sequence; According to the horizontal grayscale gradient amplitude sequence, the edge direction calculation is performed on each pixel in the image in the area where the gradient value exists. First, the Sobel response in the x and y directions is calculated with a single pixel as the center, respectively. and Two convolution kernels, still sliding based on the 3×3 window, perform convolution operations in two directions on the center position of each pixel, for example, for grayscale blocks , respectively calculated The convolution result is 140, The convolution result is 60, so the pixel gradient direction angle is given by the formula Substituting the numerical value into it, we can get , the angle is discretized into the four main directions defined by the Canny rule, that is, if the angle is within 0°±22.5°, it is classified as 0°, 22.5° to 67.5° is classified as 45°, 67.5° to 112.5° is 90°, 112.5° to 157.5° is 135°, and the rest are returned to 0°, so the angle is classified as 45°. After the above process is performed on the entire row of pixels, the direction angle category corresponding to each pixel position is obtained, forming a discretized edge direction sequence. For example, the discrete direction sequence of the fourth row of the image is , and the final result is a discretized edge direction sequence.

[0021] S113: Based on the horizontal grayscale gradient amplitude sequence and the discretized edge direction sequence, the absolute change difference of the gradient amplitude in the continuous pixel segments in the same direction is counted, and the average deviation of the gradient amplitude of adjacent pixels in the same direction, the sum of the average deviation values ​​in each direction segment, the number of pixels, and the number of pixel segments in the same direction are calculated using the formula: ; Calculate the discrete intensity of the image directional gradient, and judge the continuity of the image edge to obtain the image gradient continuity index, where: Represents the discrete intensity of the image directional gradient, Indicates the direction segment The gradient amplitude of the inner starting pixel, Indicates the direction segment The mean deviation value, represents the sum of pixel gradient amplitudes in all direction segments, Indicates the total number of pixels in the direction segment, Indicates the total number of identified direction segments; According to the horizontal gray gradient amplitude sequence and the discretized edge direction sequence obtained above, the continuous pixel segments with the same direction angle category are grouped in the entire row image. For example, for the sequence The available direction segments are: [0°, 0°], [45°, 45°, 45°], [0°], [90°, 90°], and the starting pixel gradient amplitude of each direction segment is counted. , calculate the relative The gradient difference , and then calculate the average difference For example, for the direction segment [45°, 45°, 45°], the corresponding gradient value is [135, 130, 128]. , , and then calculate the synthetic expression value for each direction segment , the composite value of each direction segment and the overall average gradient amplitude Perform deviation calculation, take the absolute value and average to get the image direction continuity evaluation index , the calculation samples and intermediate parameters are listed in the following table: Table 1 Image direction segment continuity calculation data table As shown in Table 1, the initial gradient value and average difference of each direction segment are counted segment by segment to construct a synthetic index, which is further compared with the average gradient value of the entire image. Finally, the following formula is used for comprehensive evaluation: ; Finally, compared with the empirical threshold, if It is considered that there is a direction jump in the image. This result shows that there are multiple areas with drastic local edge changes in the image, and the corresponding result is the image gradient continuity index.

[0022] The discrete intensity of image directional gradient is used to measure the degree of change in the spatial distribution of the grayscale gradient amplitude within a continuous pixel segment with the same edge direction in the image. This indicator constructs a composite gradient expression by the average deviation value between the starting gradient of each directional segment and its internal pixels, and compares it with the average gradient amplitude of the entire image, thereby reflecting the volatility of the directional segment relative to the overall gradient level of the image. A larger value indicates a more unstable gradient value distribution under the same edge direction, with stronger local fluctuations and edge changes. Conversely, a smaller value indicates that the edge structure has higher consistency and stability in this direction. Therefore, this intensity indicator can quantitatively reveal the local consistency and overall continuity characteristics of image edges in different directions.

[0023] The calculation logic used in the above formula is mainly based on the performance law of gradient features in spatial continuity. First, the starting gradient amplitude of each direction segment is The average deviation from the direction segment The purpose of performing the square sum operation is to consider both the gradient strength and the gradient fluctuation of the direction segment, emphasize the contribution of larger values ​​through the square operation, and perform the square root operation after adding the two. , which can maintain dimensional consistency and normalize the overall gradient characteristics of the direction segment. This value reflects the comprehensive performance of the structural strength and degree of change in a certain direction segment; then the composite value is compared with the average gradient amplitude of the whole map. Subtraction is performed to measure the degree of deviation of each direction segment from the overall average level, and then the absolute value operation is performed. Avoid the offset of positive and negative differences, ensure that all deviations are included in the total index, and finally sum up the deviation values ​​of all directional segments and divide them by the number of directional segments , that is, to find the average deviation value and construct the discreteness measurement index of the overall directional gradient of the image Structurally, this formula constructs composite features using square-addition-square root, and then calculates the degree of discreteness using subtraction-absolute value-average, thereby comprehensively reflecting the continuity of the image edge direction in the two dimensions of intensity and stability.

[0024] See also Figure 3 , step S2 is: S211: Based on the change position of the pixel direction angle in the image gradient continuity index, extract the direction angle category difference value between adjacent pixels, determine whether there is a jump in the direction of consecutive pixels, mark the direction break point, and extract the direction mutation coordinate sequence by comparing the position index of the break point and the non-break point to obtain the edge break position sequence; Based on the position where the direction angle jumps in the image gradient continuity index, the discretized direction angle sequence between consecutive pixels is first extracted. This sequence is generated by the previous step, and the value range is limited to 0°, 45°, 90°, and 135°. Each pair of adjacent direction angles on the horizontal pixel row of the image is subjected to difference operation to determine whether the absolute difference exceeds the direction jump threshold Δθ threshold. The threshold Δθ threshold is set to 45° and used as the reference value for breaking point determination. When the difference between the direction angles of any two adjacent pixels is ≥45°, the pixel position is marked as a breaking point. For example, a certain row of direction angle sequence is , it can be obtained that the jump points are located at the 2nd to 3rd, 4th to 5th and 6th to 7th positions, with corresponding position indexes of 3, 5 and 7, which are used as the initial fracture candidate points. On this basis, the grayscale amplitude discrimination method is further used to eliminate the directional jump but grayscale continuous segments. If the grayscale value difference between two points is less than the grayscale threshold Δg threshold, the fracture is not marked. The grayscale threshold value is set to 20 based on the grayscale statistical average standard deviation of the reference image. In the example, if the grayscale value difference of the 3rd and 5th positions is 22 and 34 respectively, it is retained, and if the difference of the 7th position is 15, it is removed. The final output fracture point coordinate indexes are 3 and 5, and the edge fracture position sequence is obtained.

[0025] S212: Based on the edge break position sequence, and according to the pixel grayscale values, gradient amplitudes, and edge direction angles of each pair of positions before and after the break point, extract two groups of pixel values ​​before and after the break point to form an interpolation window, and obtain the gradient change rate and direction angle spacing of the corresponding pixels in the window using the formula: ; Calculate the interpolated grayscale value of the break point as the replacement pixel grayscale value at the break position, insert it into the corresponding position, and generate an interpolated replacement grayscale value sequence, where: Indicates the breaking point Interpolate the grayscale value at For neighboring points The grayscale gradient amplitude at Interpolation points and neighboring points Pixel distance, is the direction angle difference between the point and the interpolation point, the numerator is the interpolation weighted sum, and the denominator is the weighted distance sum; According to the edge break position sequence, the two pixel values ​​before and after each break point are located in turn, and the gray value, direction angle and gradient amplitude of the position are extracted to form an interpolation window with a length of 4. For example, taking the break point index 5 as an example, the gray values ​​of the surrounding 4 pixels are , and its corresponding gradient amplitude is , the direction angle is , where "?" represents the position to be interpolated. The distance weight between each known point and the interpolation point needs to be calculated. Difference from the direction angle For example, if the pixel spacing is 1, 2, and 1, and the corresponding direction differences are 45°, 45°, and 45°, the gradient amplitude, angle difference, and distance of each point are substituted into the interpolation calculation formula to obtain the weighted contribution value of each point and add them up. The result is: ; The interpolated grayscale value is 1023.75. However, since the grayscale value of the image ranges from [0 to 255], the result mapping needs to be compressed. The effective maximum value of the interpolation is set to 200 through the linear normalization operation. The linear mapping result is , which is the grayscale update value of the interpolation point. It is inserted into the image matrix as a replacement for the original pixel value to obtain an interpolation replacement grayscale value sequence.

[0026] The interpolated grayscale value refers to the missing pixel position in the image caused by edge breakage or directional discontinuity. It is obtained by numerically calculating the grayscale, gradient and directional information of the known pixels around it. This value is used to fill the pixel positions that cannot be directly obtained or are distorted in the original image, so as to make the overall grayscale distribution smooth and consistent while maintaining the continuity of the local structure of the image. The interpolated grayscale value not only considers the spatial distance between the surrounding pixels and the target point, but also integrates the directional consistency and edge change intensity of each point. During construction, the three factors are comprehensively considered and the most representative numerical expression of the break point is generated through weighted summation. It is the core parameter for subsequent image completion, structural repair and visual perception continuity restoration.

[0027] The calculation logic of the formula is based on the fact that multiple sources of influence must be considered in the image interpolation process. , pixel distance Difference from the direction angle The three parameters are multiplied to form a weight factor, which expresses the contribution intensity of neighboring pixels to the interpolation point. Among them, the gradient amplitude reflects the intensity of edge change, the pixel distance reflects the degree of spatial proximity, and the directional angle difference measures the similarity of structural direction. These three factors jointly affect the interpolation result. The product form is used to avoid a single factor dominating the interpolation and reflect its interactivity. Then, the absolute value of the contribution value of each point is calculated to avoid the positive and negative fluctuations caused by the directional deviation and ensure that the interpolation grayscale value is a non-negative valid value. The numerator of the formula is the sum of weighted contributions, and the denominator is the sum of distance factors. The division operation is equivalent to normalizing all neighborhood contributions to construct a reasonable interpolation ratio so that the final interpolation value It is in the grayscale trend of the neighborhood structure, achieving the goal of balanced interpolation among the three dimensions of space, direction and grayscale change.

[0028] S213: According to the interpolation replacement grayscale value sequence, the original grayscale value of each break point is replaced with the interpolated grayscale value, the pixel grayscale matrix is ​​updated, and all positions with directional breaks are traversed in sequence. After point-by-point replacement, the entire pixel trajectory is continuously completed to obtain the image integrity index; According to the interpolation replacement gray value sequence, the value replacement operation is performed on the pixel positions marked as breakpoints in the horizontal pixel row of the image, and each interpolation result is written into the original gray value matrix according to its corresponding index position to construct a new image gray row matrix. Then, the gray trend matching calculation is performed on the entire row of pixels after all breakpoints are processed. The gray difference curves before and after processing are extracted in turn, and the difference between each pixel is compared to construct a pixel gray trend difference sequence. The matching index is formed by averaging the difference sequence. For example, the original gray value is , after repair , the difference sequence is , the mean is 0.5, and it is judged whether it is lower than the set trend consistency threshold Δμ threshold. The threshold is set to 3. Since 0.5<3, it means that there is no sudden change in the trend. The patch integrity status of this section is recorded as "passed". Trend consistency judgment is performed on each processing trajectory and the results are summarized.

[0029] Table 2 Interpolation position and trend matching test data table As shown in Table 2, after performing interpolation replacement on the two breakpoint positions, the image integrity index is generated.

[0030] See also Figure 4 , S3 steps are: S311: Locate the image overlapping area based on the image integrity index, extract the pixel rows of the same coordinate points in the two CCD images, obtain the four consecutive pixel grayscale values ​​corresponding to the starting position of each pixel point, form two grayscale vector groups of the same length, calculate the average, variance and covariance of the two groups of grayscale values ​​at the corresponding positions, and obtain the image grayscale structure comparison parameter group; According to the structure score data extracted from the image integrity index, first select the image area with a continuity score greater than the set benchmark value, set the benchmark value to 0.85, extract the area number that meets the conditions in the scoring result, and obtain the corresponding coordinate position of the area. For example, the area block from the 4th to the 6th row and the 50th to the 54th column meets the scoring requirements, then extract the grayscale data of the two CCD images at the above coordinates, read the grayscale values ​​of four consecutive pixels in each row and column in turn, and classify them into the reference image grayscale sequence and the target image grayscale sequence, for example, the reference image grayscale sequence is , the target image grayscale sequence is ,This extraction operation processes all pixel blocks in all specified areas at one time, forming the grayscale structure matching data of the two images at the corresponding coordinates of the same area, and counting the brightness mean and standard deviation of each grayscale sequence, constructing a basic comparison data set, and obtaining the image grayscale structure comparison parameter group.

[0031] Table 3 Image grayscale contrast parameter sample table As shown in Table 3, the pixel block at the coordinate position (4, 50) extracts the continuous grayscale sequences of the two images and calculates statistical indicators to provide basic reference data for subsequent similarity calculations.

[0032] S312: Based on the image grayscale structure comparison parameter group, perform structural hierarchy evaluation on the grayscale blocks extracted from the same pixel row. For each pair of grayscale value sequences in the reference and target images, calculate the brightness mean, standard deviation, and absolute mean of the difference between the corresponding pixel pairs using the formula: ; Calculate the fusion structure similarity index and analyze the local grayscale structure change trend and overall deviation degree, among which, represents the fusion structure similarity index, Indicates the number of pixel blocks, and are the mean brightness values ​​of the reference image and the target image, 、 is the standard deviation in the corresponding image area, For the The absolute value of the grayscale difference between pixel pairs, represents the sum of all pixel blocks, is the normalization factor of the difference term, and “+1” is a constant correction term to prevent the denominator from being zero; According to the sample data listed in the image grayscale structure comparison parameter group, the difference sequence of the extracted reference and target image grayscale sequences is calculated respectively, which is recorded as According to the two groups of gray values ​​in Table 9, we can get , and then calculate the square of each difference as , for the brightness difference , product of standard deviations , then the normalization correction term is , the squared difference term is normalized to , divide the brightness difference by the standard deviation and get the first term , each square difference is divided by the square root term to get the second term respectively , and the sum is , and finally obtain the fusion structure similarity index , which indicates that the overall grayscale difference between the reference and target structures in this area of ​​the image fluctuates little, and the local consistency is relatively stable.

[0033] The fusion structural similarity index is a numerical indicator used to evaluate whether the local grayscale structures of two images in the same coordinate area are consistent. This index comprehensively considers multidimensional parameters such as the brightness mean difference, contrast standard deviation, and grayscale difference between pixels between image blocks. It expresses the similarity of images at the structural level by superimposing brightness normalization and local difference energy. The lower the value, the closer the images are in terms of brightness distribution, contrast intensity, and pixel response in the area, and the more consistent the structure. Conversely, the higher the value, the more obvious grayscale deviation or texture difference exists in the area. Therefore, the fusion structural similarity index can be used as a core indicator in image matching, edge consistency detection, and stitching accuracy judgment to finely distinguish the local structural differences of images.

[0034] The operational logic of the formula reflects the joint modeling of image structure consistency from multiple dimensions of brightness, contrast and pixel difference. First, the difference in the mean brightness of the reference image and the target image is calculated. The sum of the two standard deviations The ratio term is used as the normalized expression of the overall brightness deviation, where the addition of 1 is to avoid the denominator being zero and to buffer the instability caused by extremely small values. Then, the absolute value of the grayscale difference between each pixel pair is calculated. The square operation reflects the energy difference of the local structure, and then the energy difference is divided by the normalization term , where the product root form is used to measure the coupling relationship between the local structural changes of the reference image and the target image. Finally, the brightness normalization term is added to the square difference term and the average of each pixel block is taken to construct a unified similarity evaluation index. This structure ensures that the three factors of overall brightness offset, small-scale grayscale changes and structural coupling fluctuations are reflected together under a unified index, thereby achieving accurate quantification of the structural consistency of the local area of ​​the image.

[0035] S313: Based on the fusion structural similarity index, extract the SIFT feature histogram data in the corresponding area, detect the change amplitude of the adjacent directional gradient distribution in the directional histogram of each key point item by item, calculate the directional angle change value, select the key points whose change angle exceeds the reference value and mark the coordinate index, establish the regional integrity evaluation, and generate a standard edge consistency report; According to the fusion structure similarity index, the coordinates of the region with an index less than the similarity threshold of 0.6 are screened and located, and the SIFT key point gradient direction histogram data is extracted in the same region. The direction angle of each key point is discretized into 8 direction intervals, each direction width is 45°, and the main direction values ​​of the adjacent direction histograms of the key points are compared to calculate the angle change. If the angle mutation exceeds 30°, the point is marked as a mutation point. For example, a key point is 90° in the reference image and 135° in the target image. The angle change is 45°, which is greater than the mutation judgment threshold of 30°. The point is included in the mutation statistics. All mutation point coordinates are intersected with the low structural similarity region to screen effective structural breakpoints. The region statistics are then divided according to their position, angle mutation value, and corresponding similarity index. Finally, a numbered regional edge consistency summary table is compiled to generate a standard edge consistency report. Table 4 Regional edge consistency report table As shown in Table 4, a total of two edge points with angle mutations were detected in the low-similarity region. Together with the similarity index, they characterized the consistency characteristics of the edge structure in the region. The relevant data have been included in the standard edge consistency report for reference in edge judgment.

[0036] See also Figure 5 , step S4 is: S411: Based on the image overlapping area marked in the standard edge consistency report, the pixel coordinate values ​​within the marked area are read row by row, and the corresponding pixel grayscale value is obtained. For each pixel, the signal intensity and background noise value at the corresponding position are extracted, and the signal-to-noise ratio value is calculated. The data are organized according to their spatial position and signal-to-noise ratio value to establish a signal-to-noise ratio distribution sequence; According to the overlapping area coordinates provided in the standard edge consistency report, read the row and column numbers of the pixels in each area row by row, and obtain their grayscale values ​​in the original CCD image. At the same time, call the signal intensity and background noise data of each pixel at the same position. If the grayscale of a point in the reference image is 218 and the noise is 2.18, the signal intensity can be defined as the grayscale value, and the signal-to-noise ratio calculation result is 20dB. After the signal and noise values ​​of all pixels are brought into the calculation, the calculated results and the original coordinates need to be bound into value pairs according to the row and column positions of each pixel and classified by area number. After completing the signal-to-noise ratio calculation, its legitimacy and range distribution should be judged item by item. Sample points with signal-to-noise ratios outside the reasonable value range (such as below 0 or above 80dB) should be eliminated to ensure that all calculated results are within the range of 0-40dB. After the calculation is completed, the row and column numbers, signal intensity, noise intensity, and corresponding signal-to-noise ratio results of each pixel need to be recorded uniformly. The following table lists 5 groups of sample data in the overlapping area. The collected data example is shown in Table 5: Table 5 Pixel signal-to-noise ratio collection table for image overlap area As shown in Table 5, the signal intensity of all pixels is based on the original grayscale value, and the noise value is the interference component value of the corresponding pixel. Finally, the signal-to-noise ratio distribution sequence can be obtained.

[0037] S412: According to the signal-to-noise ratio distribution sequence, the signal-to-noise ratio value of each pixel point is judged item by item and a weight value is assigned, and the spatial index of the pixel point is paired with the corresponding weight value to obtain a fused pixel point mapping weight value group; According to the obtained signal-to-noise ratio distribution sequence, the SNR value of each pixel is read in turn. The initial weight judgment is performed according to the set weight division rule. If the SNR is greater than 20dB, it is assigned a value of 0.7, and if it is less than 10dB, it is assigned a value of 0.3. The remaining range is 10-20dB and the weight is linearly assigned. The pixel with an SNR of 15dB is assigned a weight of 0.5 using piecewise interpolation. The initial weight result is further combined with the pixel grayscale distribution feature data. The average grayscale of the pixels in its four neighborhoods is collected as its surrounding brightness context. The standard deviation of the neighborhood grayscale value is then collected to define the texture complexity index of the point. The standard deviation distribution is normalized to the range of [0, 1] and used to correct the initial weight. If the grayscale mean of a pixel neighborhood is 210, the standard deviation is 25, and the texture coefficient after normalization is 0.71, then the initial weight of 0.5 is adjusted to 0.5×0.71≈0.355. The fusion weight of each pixel is structurally bound to its coordinate information to generate the following weight group array example, see Table 6.

[0038] Table 6 Pixel fusion weight sample table As shown in Table 6, the fusion weight value is calculated based on the initial value after the signal-to-noise ratio is judged and combined with the neighborhood brightness characteristics, and is used to establish the fusion pixel mapping weight value group.

[0039] S413: According to the fusion pixel mapping weight value group, pixel coordinate information and corresponding fusion weight group are combined into mapping records, all mapping records are classified and summarized by region number, and fusion region weighted allocation coefficients are generated; According to the row and column coordinates recorded in the fusion pixel mapping weight value group and the corresponding fusion weight value information, they are merged point by point into a spatial weight mapping table structure, and classified and sorted according to the regional numbers recorded in the standard edge consistency report to form a regional fusion weighted mapping structure. When constructing the mapping table, a two-dimensional matrix weight table entry is generated for each region, where each pixel position corresponds to a specific fusion weight value. The regional matrix structure is composed of rows and columns. For example, the number 001 region is a 6×6 pixel block, and the weight matrix is ​​a 6×6 weight array. Finally, all regional matrices are unified to generate the overall weighted configuration set of the fusion region. The configuration set structuredly stores the pixel weight parameters of all regions to be fused. The schematic output is shown in Table 7 below: Table 7 Example of regional weighted allocation matrix As shown in Table 7, the regional weighted allocation matrix clearly records the pixel position of each overlapping area and its corresponding fusion weight value, which is used to finally generate the fusion region weighted allocation coefficient.

[0040] See also Figure 6 , step S5 is: S511: Based on the weighted distribution coefficient of the fusion area, the spatial coordinates and fusion weights corresponding to the pixels in each overlapping area are read one by one, the grayscale difference of each pixel is weighted, and a Poisson boundary constraint structure is constructed based on the fusion area. The pixel gradient and neighborhood structure are extracted respectively, and Poisson interpolation calculation is performed on the edge area. The grayscale values ​​of all pixels in the area are updated through continuous grayscale field reconstruction operations to generate a gradient-constrained fusion grayscale matrix; Based on the weighted distribution coefficient of the fusion area, the overlapping area defined in the image is read, and the grayscale values ​​of the corresponding pixels in the reference image and the target image in each area are extracted as the fusion source. The weight is determined by the result of the previous stage. For example, the corresponding weight of the pixel in the 10th row and 15th column of the image is 0.6, the grayscale of the reference image is 180, and the grayscale of the target image is 200, then the fusion grayscale value is , and so on, all overlapping pixels are calculated. During the processing, gradient sampling operations are performed on the pixels in the boundary area, and the grayscale difference of the pixel in the horizontal and vertical directions is read. For example, the grayscale of the left neighbor of the pixel in the 11th row and 15th column is 186, the right neighbor is 192, the upper neighbor in the vertical direction is 185, and the lower neighbor is 190. The horizontal gradient is 6, the vertical gradient is 5, and the corresponding gradient modulus is 7.8. This value is recorded as the boundary condition of Poisson interpolation. During the Poisson processing, the gradient modulus at the boundary pixel is passed in, and the grayscale reconstruction operation is gradually performed in its internal neighborhood. For example, for the internal pixel in the 12th row and 16th column, the initial grayscale is set to unknown, and the gradient of the neighboring pixels and the boundary gradient are iterated to converge and update, and finally all pixel values ​​in the target area are generated. After all fusion areas are completed, the results are merged according to the row and column coordinates, and the following structure grayscale matrix data is output: Table 8 Example of grayscale calculation for fused regions As shown in Table 8, after fusion and Poisson processing, the regional grayscale values ​​are fully reconstructed to obtain the gradient constrained fusion grayscale matrix.

[0041] S512: Based on the gradient constraint fusion grayscale matrix, the mutation areas in the image where the grayscale gradient change amplitude exceeds the mutation threshold are marked, the image is divided into equal sub-grid structures, a grayscale histogram is constructed for each sub-grid separately, the original grayscale of each pixel is mapped to the assigned new grayscale value range, and the image is locally enhanced through grayscale normalization and mapping reconstruction to obtain the histogram clipping equalization result; Based on the gradient constraint fusion grayscale matrix, the image is scanned for local gradient changes, and the mutation judgment threshold is set to 15%. If the maximum grayscale change in a certain grid is greater than 15% of the average change value, it is marked as an enhancement candidate area. For example, the maximum grayscale value in the 4th row and 2nd column sub-grid is 240, the minimum value is 120, and the average value is 180. The maximum change amplitude is 33%, which meets the mutation condition. The image is divided into 8×8 sub-grids, each grid contains 128×128 pixels, and the grayscale distribution histogram of each grid is statistically analyzed. For example, the number of pixels with grayscale 128 in the first grid is 1800, the total number of pixels is 16384, the average frequency is 256, and the frequency upper limit is set to 512. The frequency of grayscale 128 exceeds the threshold, and a compression operation is performed. The frequency of grayscale 128 is set to 512, and the frequencies of the remaining 129 to 132 segments are adjusted to compensate for the compression loss. After that, all grayscale segments are cumulatively mapped, and the original grayscale values ​​are mapped to the range of 0 to 255 according to the frequency ratio. The image enhancement process is completed, and the grayscale distribution range of each grid and the span of the enhanced interval are statistically analyzed. The results are as follows: Table 9 CLAHE subgrid enhancement parameters As shown in Table 9, the clipping operation is completed for each subgrid and the corresponding equalization range index is output. After summarizing the statistics, the histogram clipping equalization result is obtained.

[0042] S513: Based on the histogram clipping equalization result, all sub-grid areas that have completed the equalization process are screened, and the corresponding pixel coordinates are spatially restored and sequentially arranged. The grayscale distribution information and coordinate mapping relationship before and after the enhancement are retained, and the CCD vision detection data fusion matrix result is generated; According to the histogram clipping equalization results, all sub-grid areas with equalization index values ​​greater than 1.2 after CLAHE processing are screened and set as the threshold for evaluating the local enhancement effect of the image. If the original contrast range of a sub-grid is 120 and is expanded to 240 after processing, the equalization index is 2.0, which meets the retention condition. The enhanced pixel block corresponding to the grid is restored to the row and column structure of the original image. All sub-grids that meet the conditions are restored one by one and then the regional splicing operation is performed. The splicing process is sorted in the order of the original coordinate positioning. If the sub-grid is in the 3rd row and 4th column, its pixel area is 384511 rows on the Y axis and 512639 columns on the X axis. After merging, the boundary grayscale comparison is uniformly performed. Linear interpolation smooth transition is performed on all areas where the difference in pixel value between the boundaries of the regions exceeds 10. For example, if the grayscale of the boundaries of two grids is 190 and 210 respectively, a grayscale value of 200 is inserted between the boundaries as an intermediate band. Finally, all grayscale blocks are merged and a complete two-dimensional image matrix is ​​constructed to generate the CCD visual detection data fusion matrix result.

[0043] A CCD visual detection data fusion system, comprising: The gradient direction trend module acquires CCD camera images, extracts horizontal pixel rows, calculates gradient amplitudes, constructs trend sequences based on edge direction consistency, and generates image gradient continuity indicators; The edge break repair module detects directional breakpoints based on the image gradient continuity index, extracts adjacent grayscale values, and uses bicubic interpolation to replace the original values ​​to generate an image integrity index; The edge consistency analysis module extracts the grayscale values ​​of the same coordinates of two images based on the image integrity index, calculates the structural similarity index, determines the mutation direction and locates the mutation position, and generates a standard edge consistency report; The weight factor mapping module extracts grayscale values ​​according to the standard edge consistency report coordinates, calculates the fusion weight of the signal-to-noise ratio, establishes pixel and weight mapping, and generates the weighted allocation coefficient of the fusion area; The contrast fusion output module performs Poisson image fusion according to the weighted distribution coefficient of the fusion area, and performs contrast equalization on the mutation area to generate the CCD visual detection data fusion matrix result.

[0044] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A data fusion method for CCD visual detection, characterized in that: The following steps are involved: S1: Obtain horizontal pixel rows in the CCD camera image, calculate the gradient amplitude of adjacent pixels, record the gradient direction, construct a trend sequence based on the consistency of edge direction, and generate an image gradient continuity index; S2: Mark the location where the direction of the image gradient continuity index changes as a direction breakpoint, perform bicubic interpolation to replace the original pixel value at the breakpoint, and repair the entire pixel track in sequence to generate an image integrity index; S3: extracting four consecutive pixel grayscale values ​​at the same position from the two CCD images according to the image overlap area located in the image integrity index, calculating the structural similarity index, detecting feature direction histogram mutations, and generating a standard edge consistency report; S4: applying a fusion weight based on the signal-to-noise ratio to the matching area according to the standard edge consistency report, establishing a mapping relationship between the pixel points in each overlapping area and the corresponding fusion weight, and generating a weighted allocation coefficient for the fusion area; S5: Based on the weighted distribution coefficient of the fusion area, perform Poisson image fusion, perform contrast equalization on the mutation area, and generate a CCD visual detection data fusion matrix result.

2. The data fusion method for CCD visual detection according to claim 1, characterized in that: The image gradient continuity index includes the number of areas with consistent gradient directions, the distribution record of directional dispersion, and the stability of the edge direction trend sequence. The image integrity index includes the breakpoint repair accuracy, the pixel trajectory reconstruction rate, and the degree of edge structure recovery. The standard edge consistency report includes a structural similarity distribution map, feature direction consistency evaluation results, and edge matching effective areas. The fusion area weighted allocation coefficient includes a signal-to-noise ratio distribution map, a weight mapping relationship matrix, and regional fusion confidence. The CCD visual detection data fusion matrix result includes a fusion image grayscale uniformity index, an edge transition smoothness evaluation result, and a contrast enhancement area distribution map.

3. The data fusion method for CCD visual detection according to claim 1, characterized in that: The steps for obtaining the image gradient continuity index are specifically as follows: S111: Based on the horizontal pixel rows in the CCD camera image, an image grayscale value sequence is collected, and a transverse gradient operation is performed on the grayscale values ​​of adjacent pixels to obtain the transverse gradient response value and the corresponding grayscale difference intensity of each pixel point to obtain a transverse grayscale gradient amplitude sequence; S112: Determine the gradient amplitude change direction between each pixel and its adjacent points based on the horizontal grayscale gradient amplitude sequence, calculate the angle between the grayscale value difference in the horizontal direction and the vertical direction, classify the angle into discrete directions, obtain the edge direction corresponding to each pixel, and acquire a discretized edge direction sequence; S113: Based on the horizontal grayscale gradient amplitude sequence and the discretized edge direction sequence, the absolute change difference of the gradient amplitude in the continuous pixel segments in the same direction is counted, the average deviation of the gradient amplitude of adjacent pixels in the same direction, the sum of the average deviation values ​​in each direction segment, the number of pixels and the number of pixel segments in the same direction are calculated, the discrete intensity of the image directional gradient is calculated, and the image edge continuity performance is judged to obtain the image gradient continuity index.

4. The data fusion method for CCD visual detection according to claim 1, characterized in that: The steps for obtaining the image integrity index are specifically as follows: S211: Based on the change position of the pixel direction angle in the image gradient continuity index, extract the direction angle category difference value between adjacent pixels, determine whether there is a jump in the direction of consecutive pixels, mark the direction break point, and extract the direction mutation coordinate sequence by comparing the position index of the break point and the non-break point to obtain the edge break position sequence; S212: Based on the edge break position sequence, extract two sets of pixel values ​​before and after the break point according to the pixel grayscale values, gradient amplitudes, and edge direction angles of each pair of positions before and after the break point to form an interpolation window, obtain the gradient change rate and direction angle spacing of the corresponding pixels in the window, calculate the interpolated grayscale value of the break point, use it as the replacement pixel grayscale value of the break position, and insert it into the corresponding position to generate an interpolated replacement grayscale value sequence; S213: According to the interpolation replacement grayscale value sequence, the original grayscale value of each break point is replaced with the interpolated grayscale value, the pixel grayscale matrix is ​​updated, and all positions with directional breaks are traversed in sequence. After point-by-point replacement, the entire pixel trajectory is continuously completed to obtain an image integrity index.

5. The data fusion method for CCD visual detection according to claim 1, characterized in that: The steps for obtaining the standard edge consistency report are as follows: S311: Locate the image overlapping area based on the image integrity index, extract the pixel rows of the same coordinate points in the two CCD images respectively, obtain the four consecutive pixel grayscale values ​​corresponding to the starting position of each pixel point, form two grayscale vector groups of the same length, calculate the average, variance and covariance of the two groups of grayscale values ​​at the corresponding positions, and obtain the image grayscale structure comparison parameter group; S312: Based on the image grayscale structure comparison parameter group, perform a structural hierarchy evaluation on the grayscale blocks extracted from the same pixel row, calculate the brightness mean, standard deviation, and absolute mean of the difference between the corresponding pixel pairs for each pair of grayscale value sequences in the reference and target images, calculate the fusion structure similarity index, and analyze the local grayscale structure change trend and the overall deviation degree; S313: According to the fusion structure similarity index, extract the SIFT feature histogram data in the corresponding area, detect the change amplitude of the adjacent directional gradient distribution in the directional histogram of each key point item by item, calculate the direction angle change value, filter the key points whose change angle exceeds the baseline value and mark the coordinate index, establish a regional integrity evaluation, and generate a standard edge consistency report.

6. The data fusion method for CCD visual detection according to claim 1, characterized in that: The steps for obtaining the weighted allocation coefficient of the fusion region are specifically as follows: S411: Based on the image overlapping area marked in the standard edge consistency report, the coordinate values ​​of the pixels in the marked area are read row by row, and the corresponding pixel grayscale values ​​are obtained. For each pixel, the signal intensity and background noise value at the corresponding position are extracted, and the signal-to-noise ratio value is calculated. The pixels are organized according to their spatial position and signal-to-noise ratio value to establish a signal-to-noise ratio distribution sequence; S412: According to the signal-to-noise ratio distribution sequence, the signal-to-noise ratio value of each pixel point is judged item by item and a weight value is assigned, and the spatial index of the pixel point is paired with the corresponding weight value to obtain a fused pixel point mapping weight value group; S413: According to the fusion pixel point mapping weight value group, pixel coordinate information and corresponding fusion weight group are grouped into mapping records, all mapping records are classified and summarized by region number, and fusion region weighted allocation coefficients are generated.

7. The data fusion method for CCD visual detection according to claim 1, characterized in that: The steps for obtaining the CCD visual detection data fusion matrix result are specifically as follows: S511: Based on the weighted distribution coefficient of the fusion area, the spatial coordinates and fusion weights corresponding to the pixels in each overlapping area are read one by one, the grayscale difference of each pixel is weighted, a Poisson boundary constraint structure is constructed based on the fusion area, the pixel gradient and neighborhood structure are extracted respectively, and Poisson interpolation calculation is performed on the edge area. The grayscale values ​​of all pixels in the area are updated through continuous grayscale field reconstruction operations to generate a gradient-constrained fusion grayscale matrix; S512: Based on the gradient-constrained fusion grayscale matrix, the mutation areas in the image where the grayscale gradient change amplitude exceeds the mutation threshold are marked, the image is divided into equal sub-grid structures, a grayscale histogram is constructed for each sub-grid separately, the original grayscale of each pixel is mapped to the assigned new grayscale value interval, and local image enhancement is performed through grayscale normalization and mapping reconstruction to obtain a histogram clipping equalization result; S513: Based on the histogram clipping equalization result, all sub-grid areas that have completed the equalization processing are screened, the corresponding pixel coordinates are spatially restored and sequentially arranged, and all grayscale distribution information and coordinate mapping relationships before and after enhancement are retained to generate a CCD visual detection data fusion matrix result.

8. A CCD visual detection data fusion system, characterized in that: The system is used to implement the data fusion method of CCD visual detection according to any one of claims 1 to 7, comprising: The gradient direction trend module acquires CCD camera images, extracts horizontal pixel rows, calculates gradient amplitudes, constructs trend sequences based on edge direction consistency, and generates image gradient continuity indicators; The edge break repair module detects directional break points based on the image gradient continuity index, extracts adjacent grayscale values, replaces the original values ​​using bicubic interpolation, and generates an image integrity index; The edge consistency analysis module extracts the grayscale values ​​of the same coordinates of the two images based on the image integrity index, calculates the structural similarity index, determines the mutation direction and locates the mutation position, and generates a standard edge consistency report; The weight factor mapping module extracts grayscale values ​​according to the standard edge consistency report coordinates, calculates the fusion weight of the signal-to-noise ratio, establishes pixel and weight mapping, and generates a weighted allocation coefficient for the fusion area; The contrast fusion output module performs Poisson image fusion according to the weighted distribution coefficient of the fusion area, performs contrast equalization on the mutation area, and generates a CCD visual detection data fusion matrix result.

Citation Information

Cited By

  • Heat exchanger fin deformation degree detection method and system based on machine vision

    CN121074030A

  • Elevator monitoring image splicing method for behavior monitoring

    CN121095057A

  • Distributed data processing method and system for color sorting equipment

    CN121166384A

  • Bridge construction crack dynamic detection method and system based on AI visual identification

    CN121639703A

  • A Dynamic Detection Method and System for Bridge Construction Cracks Based on AI Visual Recognition

    CN121639703B