Crane crack image feature enhancement and identification method based on infrared and visible light fusion
By using infrared and visible light image fusion technology, combined with image registration, matrix transformation and genetic computing, the problem of low accuracy in crack identification of cranes has been solved, and accurate correction of crack location and reduction of interference from external factors have been achieved.
Patent Information
- Application Number
- CN202511738674.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-17
AI Technical Summary
Existing methods for identifying cracks in cranes cannot be corrected based on previous test results, resulting in low accuracy and susceptibility to interference from external factors.
By fusing infrared and visible light images, and employing image registration, matrix transformation, matrix overlay fusion, and genetic computation, combined with comparison of historical detection results, the location of cracks is corrected, thereby improving the accuracy of identification.
It enhances the prominence of crack locations, reduces the impact of external factors on identification results, and improves the accuracy and anti-interference ability of identification.
Smart Images

Figure CN121544573A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of crane technology, specifically to a method for enhancing and recognizing crane crack image features based on the fusion of infrared and visible light. Background Technology
[0002] During long-term service, cranes are prone to fatigue cracks in their metal structures due to frequent exposure to heavy loads, complex stresses, and environmental corrosion. If these cracks are not identified and repaired in time, they may propagate and lead to fracture, resulting in equipment damage or even personal injury. Therefore, crack identification in cranes is of paramount importance: early detection of micro-cracks and implementation of repair measures can effectively prevent catastrophic accidents, extend equipment life, reduce maintenance costs, and ensure operational safety, meeting the core requirements of high reliability and safety in industrial production.
[0003] During the long-term service of cranes, crack identification is necessary to ensure engineering safety. For example, the crane component crack identification method and its application and system (patent publication number CN118134899A) includes: S1: acquiring multiple optical and infrared images of the same crane target component and performing noise reduction processing on the acquired optical and infrared images; S2: distinguishing the target component from the background from the noise-reduced optical and infrared images using a target filter; S3: separating and extracting the target component from the optical and infrared images, and registering the target component in the infrared image with the target component in the optical image; S4: preprocessing the registered infrared and optical images, and inputting the preprocessed image into a trained crack identification model for crane component crack identification. This method has good perception capability for micro-cracks on crane components and can accurately identify cracks on crane components, making it suitable for further promotion and application.
[0004] Crack identification in long-term service cranes allows for timely repairs before accidents occur, improving the reliability and safety of industrial production. However, the methods mentioned above and existing crack identification methods all rely on synthesizing and enhancing multiple images to highlight cracks. This approach cannot be corrected based on previous detection results, resulting in low accuracy in crack identification. Summary of the Invention
[0005] The purpose of this invention is to provide a method for enhancing and recognizing features of crane crack images based on the fusion of infrared and visible light, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for enhancing and recognizing crane crack images based on infrared and visible light fusion, comprising: Several infrared and visible light images were acquired and preprocessed. Image registration is performed using an image registration method, which involves pixel matching of all infrared and visible light images to align them spatially. The registered visible light image is converted into a basic matrix using an image conversion method, and the registered infrared image is converted into a weighted matrix. The feature enhancement matrix is obtained by combining and calculating the basic matrix and the weighted matrix through matrix superposition and fusion. The characteristic parameter values are calculated using the characteristic parameter calculation method; If it is the first measurement, the value of each element of the feature enhancement matrix is compared with the feature parameter value, the feature enhancement matrix is converted back into a grayscale image, and the grayscale values of the corresponding positions of the elements with different comparison results are converted to 0 and 255 respectively to obtain the crack sharpening image and indicate the crack location. If it is not the first measurement, the current crack sharpening map is corrected using historical detection images through genetic calculations to indicate the crack location.
[0007] Preferably, the image registration method includes: Choose either a visible light image or an infrared image as the registration base; Each visible light and infrared image is converted to grayscale to a single-channel image, reducing the computational load. To perform feature sharpening on a single-channel image, first calculate the average pixel value of each single-channel image, then divide the pixel values into several levels and compile a cumulative histogram of pixel values, and finally use the maximum pixel value of the pixel level with a cumulative number exceeding 70% as the boundary point. Pixel values larger than the boundary pixel value are converted to the maximum pixel value, and pixel values smaller than the boundary pixel value are converted to the minimum pixel value to obtain the sharpened image. Mark the closed areas in the sharpened image and calculate the position of the geometric center point of each area. Select the two geometric center points that are farthest apart and align the two geometric center points on each sharpened image with the two geometric center points on the registration base sharpened image by stretching and rotating. Then, bilinear interpolation is used to fill in the missing pixel values, thereby achieving pixel matching between infrared and visible light images and aligning them in space.
[0008] Preferably, the image conversion method includes: For visible light images, first obtain a single-channel image of the visible light image, then convert the single-channel image into a fundamental matrix, matching the pixel positions with the coordinates of the fundamental matrix and the pixel values with the element values of the fundamental matrix; For infrared images, first, a single-channel image of the infrared image is acquired, and then the single-channel pixel histogram is calculated. Pixel values in the histogram that are less than 13% of the total number of pixels are ignored. The remaining pixel values are calculated using a formula, specifically: ; in For the element values in the feature enhancement matrix, These are the pixel values of a single-channel pixel image. The total number of possible pixel values; Given values between 0 and 1, obtain the weighted matrix.
[0009] Preferably, the matrix overlay and fusion method includes: Randomly pair the fundamental matrix with the weighted matrix; Choose any set of weighted matrices and base matrices, and multiply the base matrices element-wise with the paired weighted matrices to obtain the preliminary fusion matrix; Then calculate the average matrix of several preliminary fusion matrices. While calculating the average matrix, arrange all element values of each element and calculate the average value in turn. Remove the maximum or minimum value and calculate the average value again until the average value changes by less than 3%. Select the average value calculated in the previous calculation as the element value of the average matrix. The average matrix is used as the feature enhancement matrix.
[0010] Preferably, the method for calculating the feature parameters includes: Assume the initial feature parameter values are ; Calculate grayscale values higher than and grayscale values lower than The probability of this is as follows: , ; in This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates the initial feature parameter values. The grayscale value is The probability, Indicates a grayscale value higher than The probability of grayscale value, Indicates the total number of possible grayscale values; Then calculate the grayscale value higher than and grayscale values lower than The average gray value of the region is as follows: , ; in Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates the initial feature parameter values. The grayscale value is The probability, Indicates a grayscale value higher than The probability of grayscale value, Indicates the total number of possible grayscale values; The minimum optimization factor is calculated according to the optimization formula, specifically as follows: ; in Represents the optimization factor. Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates a grayscale value higher than The probability of grayscale value; Traverse all Value, selection The largest The value is used as the feature parameter value.
[0011] Preferably, the method for calculating the feature parameters includes: The feature enhancement matrix is divided into several regions, and the feature parameter values for each region are calculated separately. The Gaussian weight of each block is calculated using the following formula: ; in Represents a block Gaussian weights Represents a block Distance from the center point of the feature enhancement matrix Indicates the attenuation factor; The feature parameter values of the entire feature enhancement matrix are obtained by weighting and summing the feature parameter values of each block using Gaussian weights.
[0012] Preferably, the attenuation factor is calculated as follows: Using the center point of the feature enhancement matrix as the origin, the matrix is diffused outward by one pixel position each time, and the average pixel value of the diffused region is calculated and marked as the attenuation base. Arrange the attenuation bases sequentially and calculate the rate of change between two adjacent attenuation bases; Adjacent attenuation bases with a change rate of less than 5% are grouped together. After dividing the attenuation bases into several groups, the proportion of attenuation bases in each group is counted, and the average change rate of attenuation bases in each group is calculated. The attenuation factor is obtained by summing the average rate of change after weighting the average rate of change according to the proportion of each attenuation base.
[0013] Preferably, the genetic computation method includes: Acquire several historical detection images, calculate the historical minimum distance between each crack in the historical detection images, and count the historical length of the shorter crack between the two cracks with the historical minimum distance. The historical minimum distance is divided into several groups based on the different lengths of the historical period; Calculate the length of each crack in the crack sharpening map, and calculate the minimum distance between each crack and the remaining cracks; Based on the obtained crack length, the cracks are grouped into one of the groups, and the minimum distance is compared with the historical minimum distance. If the minimum distance is less than the historical minimum distance, the gray value of the pixel where the crack is located in the crack sharpening image will be set to another specific gray value; if the minimum distance is greater than the historical minimum distance, the gray value will not be changed. The existence of a crack with a specific grayscale value is determined again by other detection methods. If it exists, the historical minimum distance is updated; otherwise, the historical minimum distance is not updated.
[0014] Compared with the prior art, the beneficial effects of the present invention are: Infrared and visible light images are used to further enhance the detection of cracks in the crane, highlighting their locations. Then, using a genetic algorithm, the detection results from historical images are compared with the current results. The interference between closely spaced cracks is used to verify the current detection results, thereby improving the accuracy of the detection.
[0015] Meanwhile, by using a matrix overlay fusion method to overlay multiple sets of visible light and infrared images, deviations caused by external factors such as shooting problems or lighting issues in some images are further eliminated, thereby further improving the accuracy of crack representation by the fusion of visible light and infrared images.
[0016] Moreover, when calculating the feature parameter values to ultimately reveal the crack, different feature parameter values can be set according to the different feature enhancement matrices for each detection. This can avoid the influence of the overall parameters of the image being captured at different times (the overall brightness and light angle are different when the image is captured in the morning and at noon) on the final result, and further reduce external interference to the image. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the crane crack image feature enhancement and recognition method of the present invention; Figure 2 This is a schematic diagram of the image registration method in this invention; Figure 3 This is a flowchart illustrating the matrix overlay and fusion method in this invention; Figure 4 This is a schematic diagram of the calculation method for the attenuation factor in this invention; Figure 5 This is a schematic diagram of the genetic computation method in this invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Example 1: Correcting the results based on previous tests can improve the resistance to interference from external factors and increase the accuracy of identification.
[0020] like Figures 1-3 , Figure 5 As shown, the present invention provides a technical solution: a method for enhancing and recognizing crane crack image features based on infrared and visible light fusion, comprising: Several infrared and visible light images were acquired and preprocessed. Image registration is performed using an image registration method, which involves pixel matching of all infrared and visible light images to align them spatially. The registered visible light image is converted into a basic matrix using an image conversion method, and the registered infrared image is converted into a weighted matrix. The feature enhancement matrix is obtained by combining and calculating the basic matrix and the weighted matrix through matrix superposition and fusion. The characteristic parameter values are calculated using the characteristic parameter calculation method; If it is the first measurement, the value of each element of the feature enhancement matrix is compared with the feature parameter value, the feature enhancement matrix is converted back into a grayscale image, and the grayscale values of the corresponding positions of the elements with different comparison results are converted to 0 and 255 respectively to obtain the crack sharpening image and indicate the crack location. If it is not the first measurement, the current crack sharpening map is corrected using historical detection images through genetic calculations to indicate the crack location.
[0021] It should be noted that image preprocessing includes operations such as noise reduction, deduplication, and edge sharpening, which can be performed using methods such as the Laplacian operator or the Sobel operator. These are existing technologies and will not be discussed further here. Moreover, obtaining grayscale images of infrared and visible light images is also an existing technology and will not be elaborated upon here.
[0022] like Figure 2 As shown, the image registration methods include: Choose either a visible light image or an infrared image as the registration base; Each visible light and infrared image is converted to grayscale to a single-channel image, reducing the computational load. To perform feature sharpening on a single-channel image, first calculate the average pixel value of each single-channel image, then divide the pixel values into several levels and compile a cumulative histogram of pixel values, and finally use the maximum pixel value of the pixel level with a cumulative number exceeding 70% as the boundary point. Pixel values larger than the boundary pixel value are converted to the maximum pixel value, and pixel values smaller than the boundary pixel value are converted to the minimum pixel value to obtain the sharpened image. Mark the closed areas in the sharpened image and calculate the position of the geometric center point of each area. Select the two geometric center points that are farthest apart and align the two geometric center points on each sharpened image with the two geometric center points on the registration base sharpened image by stretching and rotating. Then, bilinear interpolation is used to fill in the missing pixel values, thereby achieving pixel matching between the infrared and visible light images and aligning them spatially. It should be noted that, for ease of understanding, the following simulated data is used: Assume the pixel values of the registration base are: 10 20 30 40 50 20 30 40 50 60 30 40 50 60 70 40 50 60 70 80 50 60 70 80 90 Taking the registration base as an example, the average pixel value of all pixel values is first calculated to be 50; Then, the levels are divided into 5 levels. In practice, the more levels there are, the more accurate the calculation will be, but the more calculations will be required. You can choose the number of levels yourself. Level 1: 0-19, 1 pixel (cumulative 1 in front); Level 1: 20-39 pixels, 6 pixels (7 pixels total). Level 1: 40-59, 9 pixels (cumulative total of 16 pixels, first time exceeding 70%). Level 1: 60-70 pixels, 7 pixels (23 in total). Level 1: 80-99 pixels, 2 pixels (25 pixels in total).
[0023] After selecting 59 as the boundary point and sharpening, the following results were obtained: 0 0 0 00 0 0 0 0 99 0 0 0 99 99 0 0 99 99 99 0 99 99 99 99 This allows us to obtain two regions (the region with a value of 0 and the region with a value of 99), then calculate the geometric center points of the two regions, and process the remaining images in the same way. The two farthest midpoints of the remaining images are aligned with the two center points of the registration base by translation and rotation. Then, bilinear interpolation is used to fill the pixel value gaps. If pixels overlap, the average value is calculated instead. Translation, rotation and bilinear interpolation are all existing technologies and will not be demonstrated here.
[0024] Image conversion methods include: For visible light images, first obtain a single-channel image of the visible light image, then convert the single-channel image into a fundamental matrix, matching the pixel positions with the coordinates of the fundamental matrix and the pixel values with the element values of the fundamental matrix; For infrared images, first, a single-channel image of the infrared image is acquired, and then the single-channel pixel histogram is calculated. Pixel values in the histogram that are less than 13% of the total number of pixels are ignored. The remaining pixel values are calculated using a formula, specifically: ; in For the element values in the feature enhancement matrix, These are the pixel values of a single-channel pixel image. The total number of possible pixel values; Given values between 0 and 1, obtain the weighted matrix.
[0025] It should be noted that, for ease of understanding, the following simulated data is used: The grayscale image of the registration base described above is used as the single-channel image: 10 20 30 40 50 20 30 40 50 60 30 40 50 60 70 40 50 60 70 80 50 60 70 80 90 Transformed into a fundamental matrix: .
[0026] Assume the single-channel image (grayscale image) of the infrared image is as follows: 10 10 10 10 10 10 20 20 30 30 10 20 35 30 30 10 30 30 40 40 10 30 40 40 40 There is only one pixel with a value of 35, accounting for less than 13%, so it is ignored and is supplemented to 30 by the mode of the values of several surrounding pixels (8 in this case); Then, the weighted matrix is calculated using the formula, substituting 10, 20, 30, and 40 respectively, and the final weighted matrix is (assuming here). =41 indicates that the pixel value ranges from 0 to 40): .
[0027] like Figure 3 As shown, the matrix overlay and fusion method includes: Randomly pair the fundamental matrix with the weighted matrix; Choose any set of weighted matrices and base matrices, and multiply the base matrices element-wise with the paired weighted matrices to obtain the preliminary fusion matrix; Then calculate the average matrix of several preliminary fusion matrices. While calculating the average matrix, arrange all element values of each element and calculate the average value in turn. Remove the maximum or minimum value and calculate the average value again until the average value changes by less than 3%. Select the average value calculated in the previous calculation as the element value of the average matrix. The average matrix is used as the feature enhancement matrix.
[0028] It should be noted that, for ease of understanding, the following simulated data is used: Suppose that one set of fundamental matrices and weighting matrices are as follows: and ; After performing element-wise multiplication (single element multiplication is a current technique and will not be elaborated further), the preliminary fusion matrix can be obtained as follows: .
[0029] Several preliminary fusion matrices were calculated using the same method. Let these preliminary fusion matrices be: , , , (This is demonstrated using a simplified matrix.)
[0030] Taking the element at coordinates (1, 3) (first row, third column) as an example, calculate the average matrix: First, calculate the average value of the element at this position in each preliminary fusion matrix, which is 3.75. Then, remove the maximum or minimum value (here, the maximum value of 6 is removed), and calculate the average value again, which is 3. At this point, the change range (0.75 ÷ 3.75) is 0.2, which is greater than 3%. Continue the calculation, and then take the minimum value of 3, and calculate the average value again, which is 3. At this point, the change range is 0, which is less than 3%, so stop the calculation. Use the average value of the previous calculation (also 3) as the element value at this position. Therefore, the average matrix (i.e., the feature enhancement matrix) can be obtained by calculating multiple preliminary fusion matrices as follows:
[0031] The methods for calculating characteristic parameters include: Assume the initial feature parameter values are ; Calculate grayscale values higher than and grayscale values lower than The probability of this is as follows: , ; in This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates the initial feature parameter values. The grayscale value is The probability, Indicates a grayscale value higher than The probability of grayscale value, Indicates the total number of possible grayscale values; Then calculate the grayscale value higher than and grayscale values lower than The average gray value of the region is as follows: , ; in Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates the initial feature parameter values. The grayscale value is The probability, Indicates a grayscale value higher than The probability of grayscale value, Indicates the total number of possible grayscale values; The overall average grayscale value of the image is: ; in Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates a grayscale value higher than The probability of grayscale value, This represents the overall average grayscale value; The minimum optimization factor is calculated according to the optimization formula, specifically as follows: ; in Represents the optimization factor. Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates a grayscale value higher than The probability of grayscale value; Traverse all Value, selection The largest The value is used as the feature parameter value.
[0032] It should be noted that, for ease of understanding, the following simulated data is used: Assume the feature enhancement matrix is: .
[0033] Of the 25 pixels, 13 have a grayscale value of 30, with a probability of 0.52; and 12 have a grayscale value of 180, with a probability of 0.48. Calculate in sequence =0 to =255 for all optimization factors, =29 and =30 as an example when =29 hours: =0 (because there are no pixels with gray levels between 0 and 29). =1; Meaningless ( =0, use 0 for calculation). = (13 × 30 + 12 × 180) ÷ 25 = 102 =102; =0; when =30: =0.52, =0.48; =30, =180; =102; =5616; Calculate all using the same calculation method and calculate the corresponding The largest value corresponding The value is the characteristic parameter value.
[0034] like Figure 5 As shown, genetic computation methods include: Acquire several historical detection images, calculate the historical minimum distance between each crack in the historical detection images, and count the historical length of the shorter crack between the two cracks with the historical minimum distance. The historical minimum distance is divided into several groups based on the different lengths of the historical period; Calculate the length of each crack in the crack sharpening map, and calculate the minimum distance between each crack and the remaining cracks; Based on the obtained crack length, the cracks are grouped into one of the groups, and the minimum distance is compared with the historical minimum distance. If the minimum distance is less than the historical minimum distance, the grayscale value of the pixel containing the crack in the crack sharpening image is set to another specific grayscale value; if the minimum distance is greater than the historical minimum distance, the grayscale value is not changed. The existence of a crack with a specific grayscale value is determined again by other detection methods. If it exists, the historical minimum distance is updated; otherwise, the historical minimum distance is not updated.
[0035] It should be noted that, for ease of understanding, the following simulated data is used: Assuming there are 1000 historical detection images, the grouped data is shown in Table 1 below (the number of groups can vary; more groups result in more accurate calculations, but also increase computational complexity. The appropriate number of groups should be selected based on the specific circumstances): Indicate 1: Historical detection data
[0036] In the currently detected crack sharpening images, there are three crack data points as shown in Table 2 below (unit: mm): Table 2: Current Detection Data
[0037] Crack 1 is grouped into group one, and cracks 2 and 3 are grouped into group two. The minimum distance between crack 1 and other cracks is 6, which is greater than 4 and can exist. However, the distance between crack 2 and crack 3 is only 7, which is significantly less than 8. Therefore, in this case, crack 2 and crack 3 will theoretically interfere (it would be better to have cracks connecting them). At this point, in the crack sharpening image, the gray value of crack 2 can be changed to 128 (it can be changed to other gray values, mainly those that are significantly different from 0 and 255; changing the gray value here is only to reflect the color difference for the operator to distinguish). Then, the part is re-identified through other means (such as manual identification). If a crack is found, the minimum historical distance in group two is changed to 7 or higher. If no crack is found, the minimum historical distance is not updated. The database is continuously updated to improve the accuracy of subsequent detection.
[0038] Example 2: When the gray values of the feature enhancement matrix are relatively dispersed, partitioned calculation can be performed, and then the feature parameter values of multiple partitions can be merged into the overall feature parameter value. The weight of each partition can be gradually reduced to improve the accuracy of the overall feature parameter value. Based on this, this embodiment provides another feature parameter value calculation method based on embodiment one.
[0039] The methods for calculating characteristic parameters include: The feature enhancement matrix is divided into several regions, and the feature parameter values for each region are calculated separately. The Gaussian weight of each block is calculated using the following formula: ; in Represents a block Gaussian weights Represents a block Distance from the center point of the feature enhancement matrix Indicates the attenuation factor; The feature parameter values of the entire feature enhancement matrix are obtained by weighting and summing the feature parameter values of each block using Gaussian weights.
[0040] It should be noted that, for ease of understanding, the following simulated data is used: Suppose the feature enhancement matrix is divided into 6 segments, and the information of the segments is shown in Table 1: Table 1: Block Information
[0041] Assumption The value is 2, obtained through the formula. The Gaussian weights of the six blocks are calculated to be 0.15, 0.15, 0.57, 0.57, 0.15, and 0.15, respectively. After weighted summation, the feature parameter value of the entire feature enhancement matrix is 2.5.
[0042] like Figure 4 As shown, the attenuation factor is calculated as follows: Using the center point of the feature enhancement matrix as the origin, the matrix is diffused outward by one pixel position each time, and the average pixel value of the diffused region is calculated and marked as the attenuation base. Arrange the attenuation bases sequentially and calculate the rate of change between two adjacent attenuation bases; Adjacent attenuation bases with a change rate of less than 0.5% are grouped together. After dividing the attenuation bases into several groups, the proportion of attenuation bases in each group is counted, and the average change rate of attenuation bases in each group is calculated. The attenuation factor is obtained by summing the average rate of change after weighting the average rate of change according to the proportion of each attenuation base.
[0043] It should be noted that, for ease of understanding, the following simulated data is used: Assume the feature enhancement matrix is: ; The center pixel is 9, the average value is 9, after expanding outward by one pixel, the average value is 7.2, and after further expansion, the average values are 6.04 and 5.8 respectively, arranged as follows: 9, 7.2, 6.04, 5.8; The rates of change of two adjacent attenuation bases are 0.2, 0.16, and 0.04, respectively. Therefore: The first decay base is a separate group with an average rate of change of 0 and a decay base number of 1. The first decay base is a separate group with an average rate of change of 0 and a decay base number of 1. The last two decay bases are grouped together, with an average rate of change of 0.04 and a number of decay bases of 2. The calculated attenuation factor is 0.08. Based on the distribution change of the feature enhancement matrix during each recognition, a suitable attenuation factor can be calculated, thereby improving the accuracy of feature parameter value calculation.
[0044] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended embodiments and their equivalents.
Claims
1. A method for enhancing and recognizing features of crane crack images based on the fusion of infrared and visible light, characterized in that: include: Several infrared and visible light images were acquired and preprocessed. Image registration is performed using an image registration method, which involves pixel matching of all infrared and visible light images to align them spatially. The registered visible light image is converted into a basic matrix using an image conversion method, and the registered infrared image is converted into a weighted matrix. The feature enhancement matrix is obtained by combining and calculating the basic matrix and the weighted matrix through matrix superposition and fusion. The characteristic parameter values are calculated using the characteristic parameter calculation method; If it is the first measurement, the value of each element of the feature enhancement matrix is compared with the feature parameter value, the feature enhancement matrix is converted back into a grayscale image, and the grayscale values of the corresponding positions of the elements with different comparison results are converted to 0 and 255 respectively to obtain the crack sharpening image and indicate the crack location. If it is not the first measurement, the current crack sharpening map is corrected using historical detection images through genetic calculations to indicate the crack location.
2. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 1, characterized in that: The image registration method includes: Choose either a visible light image or an infrared image as the registration base; Each visible light and infrared image is converted to grayscale to a single-channel image, reducing the computational load. To perform feature sharpening on a single-channel image, first calculate the average pixel value of each single-channel image, then divide the pixel values into several levels and compile a cumulative histogram of pixel values, and finally use the maximum pixel value of the pixel level with a cumulative number exceeding 70% as the boundary point. Pixel values larger than the boundary pixel value are converted to the maximum pixel value, and pixel values smaller than the boundary pixel value x are converted to the minimum pixel value to obtain the sharpened image. Mark the closed areas in the sharpened image and calculate the position of the geometric center point of each area. Select the two geometric center points that are farthest apart and align the two geometric center points on each sharpened image with the two geometric center points on the registration base sharpened image by stretching and rotating. Then, bilinear interpolation is used to fill in the missing pixel values, thereby achieving pixel matching between infrared and visible light images and aligning them in space.
3. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 1, characterized in that: The image conversion method includes: For visible light images, first obtain a single-channel image of the visible light image, then convert the single-channel image into a fundamental matrix, matching the pixel positions with the coordinates of the fundamental matrix and the pixel values with the element values of the fundamental matrix; For infrared images, first, a single-channel image of the infrared image is acquired, and then the single-channel pixel histogram is calculated. Pixel values in the histogram that are less than 13% of the total number of pixels are ignored. The remaining pixel values are calculated using a formula, specifically: ; in For the element values in the feature enhancement matrix, These are the pixel values of a single-channel pixel image. This represents the total number of pixel values. Given values between 0 and 1, obtain the weighted matrix.
4. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 1, characterized in that: The matrix overlay and fusion method includes: Randomly pair the fundamental matrix with the weighted matrix; Choose any set of weighted matrices and base matrices, and multiply the base matrices element-wise with the paired weighted matrices to obtain the preliminary fusion matrix; Then calculate the average matrix of several preliminary fusion matrices. While calculating the average matrix, arrange all element values of each element and calculate the average value in turn. Remove the maximum or minimum value and calculate the average value again until the average value changes by less than 3%. Select the average value calculated in the previous calculation as the element value of the average matrix. The average matrix is used as the feature enhancement matrix.
5. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 1, characterized in that: The method for calculating the feature parameters includes: Assume the initial feature parameter values are ; Calculate grayscale values higher than and grayscale values lower than The probability of this is as follows: , ; in This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates the initial feature parameter values. The grayscale value is The probability, Indicates a grayscale value higher than The probability of grayscale value, Indicates the total number of possible grayscale values; Then calculate the grayscale value higher than and grayscale values lower than The average gray value of the region is as follows: , ; in Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates the initial feature parameter values. The grayscale value is The probability, Indicates a grayscale value higher than The probability of grayscale value, Indicates the total number of possible grayscale values; The minimum optimization factor is calculated according to the optimization formula, specifically as follows: ; in Represents the optimization factor. Indicates grayscale value is lower than The average gray value of the region. Indicates a grayscale value higher than The average gray value of the region. This indicates that the grayscale value is less than or equal to The probability of grayscale value, Indicates a grayscale value higher than The probability of grayscale value; Traverse all Value, selection The largest The value is used as the feature parameter value.
6. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 5, characterized in that: The method for calculating the feature parameters includes: The feature enhancement matrix is divided into several regions, and the feature parameter values for each region are calculated separately. The Gaussian weight of each block is calculated using the following formula: ; in Represents a block Gaussian weights Represents a block Distance from the center point of the feature enhancement matrix Indicates the attenuation factor; The feature parameter values of the entire feature enhancement matrix are obtained by weighting and summing the feature parameter values of each block using Gaussian weights.
7. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 6, characterized in that: The attenuation factor is calculated as follows: Using the center point of the feature enhancement matrix as the origin, the matrix is diffused outward by one pixel position each time, and the average pixel value of the diffused region is calculated and marked as the attenuation base. Arrange the attenuation bases sequentially and calculate the rate of change between two adjacent attenuation bases; Adjacent attenuation bases with a change rate of less than 5% are grouped together. After dividing the attenuation bases into several groups, the proportion of attenuation bases in each group is counted, and the average change rate of attenuation bases in each group is calculated. The attenuation factor is obtained by summing the average rate of change after weighting the average rate of change according to the proportion of each attenuation base.
8. The method for enhancing and recognizing crane crack images based on infrared and visible light fusion according to claim 1, characterized in that: The genetic computation method includes: Acquire several historical detection images, calculate the historical minimum distance between each crack in the historical detection images, and count the historical length of the shorter crack between the two cracks with the historical minimum distance. The historical minimum distance is divided into several groups based on the different lengths of the historical period; Calculate the length of each crack in the crack sharpening map, and calculate the minimum distance between each crack and the remaining cracks; Based on the obtained crack length, the cracks are grouped into one of the groups, and the minimum distance is compared with the historical minimum distance. If the minimum distance is less than the historical minimum distance, the gray value of the pixel where the crack is located in the crack sharpening image will be set to another specific gray value; if the minimum distance is greater than the historical minimum distance, the gray value will not be changed. The existence of a crack with a specific grayscale value is determined again by other detection methods. If it exists, the historical minimum distance is updated; otherwise, the historical minimum distance is not updated.
Citation Information
Patent Citations
Crane component crack identification method and application and system thereof
CN118134899A