A method for identifying sealant aging and cracking

By performing grayscale processing and area division of sealant images, calculating crack possibilities and characteristics, and adjusting segmentation thresholds, the problem of difficult to identify sealant aging and cracking of sealant is solved, and the accurate identification of sealant aging and cracking is achieved. System reliability.

CN118762024BActive Publication Date: 2024-12-13NANTONG HAOKE NEW MATERIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411252017.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-13
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

Traditional single threshold segmentation algorithms are difficult to accurately identify cracks in aging and cracking of sealant, especially when the degree of cracking is different at different locations, making it difficult to obtain good segmentation effects.

Method used

By collecting sealant images, performing grayscale image processing and area division, obtaining local areas, calculating the crack possibility of low grayscale areas, judging and decribing it as target areas, performing segmentation and feature evaluation, and adjusting segmentation thresholds to improve segmentation effect , achieve accurate identification of sealant aging and cracking.

Benefits of technology

The partitioning effect of sealant aging cracks is improved, and the accurate identification of sealant aging cracks is achieved, ensuring the reliability and service life of the sealing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762024B_ABST
    Figure CN118762024B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of graphic recognition technology, and in particular to a method for identifying sealant aging and cracking, comprising: collecting a sealant image to obtain a grayscale image; dividing the grayscale image into regions to obtain a plurality of local regions; analyzing each local region to determine whether there is a crack in the local region, and recording the local region with the crack as a target region; segmenting each target region, evaluating the segmentation effect of the target region, recording the target region with a poor segmentation effect as a region to be corrected, and recording the target region with a good segmentation effect as a reference region; adjusting the segmentation threshold of the region to be corrected according to the reference region, obtaining the corrected segmentation threshold of the region to be corrected, and performing threshold segmentation on the region to be corrected to obtain cracks of sealant aging and cracking in the region to be corrected. The present invention corrects the region with a poor effect by segmenting the region with a good effect, thereby improving the overall segmentation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of pattern recognition, and in particular to a method for identifying aging and cracking of sealant. Background Art

[0002] The elasticity of the sealant is greatly reduced after the colloid solidifies. At this time, under the influence of thermal expansion and contraction, the sealant may be at risk of cracking. Identifying the aging and cracking defects of the sealant is to ensure the reliability, performance and service life of the sealing system, as well as to prevent potential problems and damages; but when the traditional threshold segmentation algorithm is used to identify the aging and cracking of the sealant, since the cracking degree of the sealant in different positions is different, the degree of expression of the cracks in different areas of the image is also different, and it is difficult to obtain a good segmentation effect, that is, it is impossible to accurately identify the cracks caused by the aging and cracking of the sealant. Summary of the invention

[0003] The present invention provides a sealant aging cracking identification method to solve the existing problem that it is difficult to accurately segment the cracks caused by sealant aging cracking using a traditional single threshold segmentation method.

[0004] A method for identifying sealant aging and cracking of the present invention adopts the following technical solution:

[0005] The following steps are involved:

[0006] Collect the sealant image and obtain the grayscale image;

[0007] The grayscale image is divided into regions to obtain several local regions; according to the grayscale values ​​of the pixels in the local regions, a low-grayscale region in the local regions is obtained; according to the grayscale values ​​of the low-grayscale region in the local regions, the possibility that the low-grayscale region in the local regions is a crack is calculated; according to the possibility that the low-grayscale region in the local regions is a crack, whether there is a crack in the local regions is determined, and the local regions with cracks are recorded as target regions;

[0008] Each target region is segmented to obtain each foreground connected domain in the target region; the crack feature degree of each foreground connected domain in the target region is calculated according to the shape of the foreground connected domain in the target region and the gray value of the pixel points in the foreground connected domain in the target region; the segmentation effect of the target region is evaluated according to the crack feature degree of each foreground connected domain in the target region to obtain target regions with good segmentation effect and target regions with poor segmentation effect;

[0009] The target area with poor segmentation effect is recorded as the area to be corrected, and the target area with good segmentation effect is recorded as the reference area; the segmentation threshold of the area to be corrected is adjusted according to the reference area to obtain the corrected segmentation threshold of the area to be corrected; the corrected segmentation threshold of the area to be corrected is used to perform threshold segmentation on the area to be corrected to obtain cracks caused by aging of the sealant in the area to be corrected.

[0010] Preferably, the step of collecting the sealant image and obtaining the grayscale image includes the following specific methods:

[0011] The sealant image is collected by a camera, and the obtained sealant image is gray-scaled to obtain a gray-scale image.

[0012] Preferably, the grayscale image is divided into regions to obtain a number of local regions, including the following specific methods:

[0013] Preset one The sliding window size is set to Traverse the grayscale image, take each sliding window as a local area of ​​the grayscale image, and obtain several local areas.

[0014] Preferably, the method of obtaining the low grayscale area in the local area according to the grayscale value of the pixel points in the local area includes the following specific methods:

[0015] For local area, first The pixel with the lowest grayscale value in the local area is recorded as the starting pixel, the grayscale value of the starting pixel and the position of the starting pixel are obtained, and then a maximum grayscale difference threshold is preset. ; Then the gray value difference between the pixel point and the starting pixel point is less than The pixel point is recorded as the target pixel point, and then the target pixel points adjacent to the eight neighborhoods are classified into the same target pixel point area to obtain several target pixel point areas. Finally, the target pixel point area adjacent to the eight neighborhoods of the starting pixel point is recorded as the low grayscale area to obtain the first The low gray area in the local area.

[0016] Preferably, the possibility that the low-grayscale area in the local area is a crack is calculated according to the grayscale value of the low-grayscale area in the local area, and the specific method includes:

[0017] For First, obtain the low grayscale area in the local area. The grayscale values ​​of all pixels in the low grayscale area in the local area are calculated according to the The grayscale values ​​of all pixels in the low grayscale area of ​​the local area are obtained. The probability that the low gray area in a local area is a crack is calculated as follows:

[0018]

[0019] In the formula, Indicates The possibility that the low gray area in the local area is a crack; Indicates The number of pixels in the low grayscale area in a local area; Indicates In the low grayscale area of ​​the local area The gray value of each pixel; Represents an exponential function with a natural constant as base.

[0020] Preferably, judging whether there is a crack in the local area according to the possibility that the low grayscale area in the local area is a crack includes the following specific methods:

[0021] Preset a probability threshold , for the If a local area Greater than or equal to , then If there are cracks in a local area, Less than , then There are no cracks in the local area.

[0022] Preferably, the segmentation of each target region to obtain each foreground connected domain in the target region includes the following specific methods:

[0023] For target area, with the The grayscale mean of the target area is The target area is segmented and the The gray value in the target area is less than The pixel point with the grayscale mean of the target area is taken as the foreground pixel point, and the area composed of all the foreground pixels adjacent to the eight neighborhoods is taken as the foreground connected domain. Several foreground connected regions in a target region.

[0024] Preferably, the method of calculating the crack feature degree of each foreground connected domain in the target area according to the shape of the foreground connected domain in the target area and the grayscale value of the pixel points in the foreground connected domain in the target area includes the following specific methods:

[0025] For In the target area First, obtain the foreground connected area. In the target area The number of pixels in the foreground connected domain and the variance of the grayscale values ​​of all pixels; Welzl algorithm is used to obtain the In the target area The minimum circumscribed circle of the foreground connected domain; In the target area The number of pixels in the minimum circumscribed circle of the foreground connected domain is finally calculated based on the In the target area The number of pixels in the foreground connected domain, the variance of the grayscale values ​​of all pixels, In the target area The number of pixels in the minimum circumscribed circle of the foreground connected region and the The possibility that the low gray area in the target area is a crack; obtain the In the target area The specific calculation formula for the crack characteristic degree of a foreground connected domain is:

[0026]

[0027] In the formula, Indicates In the target area The degree of crack characteristics of the foreground connected domain; Indicates In the target area The number of pixels in the foreground connected domain; Indicates In the target area The number of pixels in the minimum circumscribed circle of the foreground connected domain; Indicates In the target area The variance of the grayscale values ​​of all pixels in the foreground connected domain; Indicates The possibility that the low gray area in the target area is a crack; represents the linear normalization function; Represents an exponential function with a natural constant as base.

[0028] Preferably, the segmentation effect of the target region is evaluated according to the crack feature degree of each foreground connected domain in the target region to obtain the target region with good segmentation effect and the target region with poor segmentation effect, including the specific method of:

[0029] For target area, first The foreground connected domain with the lowest crack feature degree in the target area is recorded as the evaluation connected domain, and the crack feature degree of the evaluation connected domain is used as the segmentation effect of the target area, and then a crack feature degree threshold is preset. , if the segmentation effect is greater than or equal to , then it means target area is good, if the segmentation effect is less than , then it means The target area is not good.

[0030] Preferably, the step of adjusting the segmentation threshold of the area to be corrected according to the reference area to obtain the corrected segmentation threshold of the area to be corrected includes the following specific methods:

[0031] The area to be corrected that is adjacent to the reference area in the eight-neighborhood is recorded as the first-level area to be corrected. The first level to be revised area will be All the reference areas adjacent to the first-level area to be corrected in the eight-neighborhood are recorded as The characteristic area of ​​the first-level area to be corrected; obtain the The possibility that the low gray area in the first level to be corrected area is a crack, The segmentation effect of the first-level area to be corrected, The segmentation threshold of the first-level region to be corrected and the The segmentation threshold of all feature areas in the first-level area to be corrected; adjust the The segmentation threshold of the first-level area to be corrected is calculated as follows:

[0032]

[0033] In the formula, Indicates The segmentation threshold after correction of the first-level region to be corrected; Indicates The segmentation threshold of the first-level area to be corrected; Indicates The possibility that the low gray area in the first-level area to be corrected is a crack; Indicates The segmentation effect of the first-level area to be corrected; Indicates The number of feature areas in the first-level area to be corrected; Indicates The first level of the area to be corrected The segmentation threshold of feature regions; represents the linear normalization function;

[0034] In getting the The segmentation threshold after the correction of the first-level region to be corrected Afterwards, according to For The first level to be corrected area is segmented by threshold value. The gray value of the first-level correction area is less than As foreground pixels, we get several foreground connected domains and obtain the first The segmentation effect of the first-level area to be corrected; if the segmentation effect is good, As the The segmentation threshold of the first-level area to be corrected is completed The correction of the first level to be corrected area; if the segmentation effect is not good, The characteristic regions of the first-level regions to be corrected and , continue to The first level to be corrected area is further corrected until the Until the segmentation effect of the first-level area to be corrected is good, the specific calculation formula is:

[0035]

[0036] In the formula, Indicates The segmentation threshold after further correction of the first-level area to be corrected;

[0037] Then, the adjacent areas to be corrected in the eight-neighborhood of the first-level area to be corrected are recorded as the second-level areas to be corrected. The second level to be revised area will be All the first-level regions to be corrected adjacent to the second-level region to be corrected in the eight-neighborhood are recorded as The characteristic area of ​​the second-level area to be corrected; obtain the The possibility that the low gray area in the second level to be corrected area is a crack, The segmentation effect of the second-level area to be corrected, The segmentation threshold of the second-level region to be corrected and the The segmentation threshold of all feature areas in the second-level area to be corrected; adjust the The segmentation threshold of the second-level area to be corrected is calculated as follows:

[0038]

[0039] In the formula, Indicates The segmentation threshold after correction of the second-level region to be corrected; Indicates The segmentation threshold of the second-level area to be corrected; Indicates The possibility that the low gray area in the second level to-be-corrected area is a crack; Indicates The segmentation effect of the second-level area to be corrected; Indicates The number of feature areas in the secondary area to be corrected; Indicates The second level area to be corrected The segmentation threshold of feature regions; represents the linear normalization function;

[0040] In getting the The segmentation threshold after the correction of the secondary region to be corrected Afterwards, according to For The second level to be corrected area is segmented by threshold value. The gray value of the secondary correction area is less than As foreground pixels, we get several foreground connected domains and obtain the first The segmentation effect of the second-level area to be corrected; if the segmentation effect is good, As the The segmentation threshold of the second-level area to be corrected is completed. If the segmentation effect is not good, then The characteristic regions of the secondary regions to be corrected and , continue to The second level to be corrected area is further corrected until the The segmentation effect of the second-level area to be corrected is good, and the specific calculation formula is:

[0041]

[0042] In the formula, Indicates The segmentation threshold after further correction of the second-level region to be corrected;

[0043] Correct all areas that need correction.

[0044] The beneficial effect of the technical solution of the present invention is: the present invention first divides the grayscale image into regions to obtain several local regions, and obtains the local regions with cracks by analyzing and extracting features from the local regions, and records the local regions with cracks as target regions, and segments each target region separately to preliminarily improve the segmentation effect, and then evaluates the segmentation effect of each target region, corrects the target regions with poor segmentation effect according to the target regions with good segmentation effect, and adjusts the segmentation threshold of the target regions with poor segmentation effect, thereby improving the overall segmentation effect, achieving accurate segmentation and identification of cracks caused by aging and cracking of the sealant, and realizing the purpose of accurately identifying cracks caused by aging and cracking of the sealant. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 A flow chart of the steps of a method for identifying sealant aging and cracking according to the present invention;

[0047] Figure 2 Grayscale image of sealant. DETAILED DESCRIPTION

[0048] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a sealant aging cracking identification method proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0049] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0050] The specific scheme of the sealant aging and cracking identification method provided by the present invention is described in detail below with reference to the accompanying drawings.

[0051] See also Figure 1 , which shows a flow chart of the steps of a sealant aging cracking identification method provided by an embodiment of the present invention, the method comprising the following steps:

[0052] Step S001: Collect a sealant image and obtain a grayscale image.

[0053] It should be noted that this embodiment is a method for identifying sealant aging and cracking, and its purpose is to identify whether the sealant is aged and cracked. In order to identify whether the sealant is aged and cracked, it is necessary to first collect the sealant image. At the same time, in order to better analyze the sealant image, the sealant image also needs to be preprocessed.

[0054] Specifically, the sealant image is captured by the sealant aging and cracking recognition electronic device, and the obtained sealant image is preprocessed to obtain a grayscale image, such as Figure 2 shown.

[0055] The electronic device for identifying sealant aging and cracking includes: a camera, a light source, an embedded device, and an automatic control device. The light source is used to perform exposure compensation for the camera, the camera and the light source are controlled by the automatic control device, the camera is used to capture an image of the sealant surface, the sealant image is processed and analyzed by the embedded device, and the defective parts caused by aging and cracking are identified.

[0056] At this point, a grayscale image is obtained.

[0057] Step S002: Divide the grayscale image into regions to obtain several local regions; obtain the low-grayscale region in the local region according to the grayscale value of the pixel point in the local region; calculate the possibility that the low-grayscale region in the local region is a crack according to the grayscale value of the low-grayscale region in the local region; determine whether there is a crack in the local region according to the possibility that the low-grayscale region in the local region is a crack, and record the local region with the crack as the target region.

[0058] It should be noted that, since the cracking degree of sealants at different positions is different in the grayscale image, the expression degree of cracks at different positions in the grayscale image is also different. If the grayscale image is simply segmented with a single threshold, it is difficult to obtain a good segmentation effect, that is, it is impossible to accurately identify the cracks caused by aging and cracking of the sealant. Therefore, this embodiment proposes a method for identifying aging and cracking of sealants. First, the grayscale image is divided into regions, and then whether cracks may exist in each region is analyzed. Then, the regions where cracks may exist are segmented, and the segmentation effect of each region is evaluated. Finally, the regions with poor segmentation effect are corrected according to the regions with good segmentation effect, so as to improve the segmentation effect of the regions with poor segmentation effect and achieve accurate identification of sealant cracking.

[0059] Specifically, preset a The sliding window size is set to Traverse the grayscale image, The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. Describe, take each sliding window as a local area of ​​the grayscale image, and obtain several local areas.

[0060] It should be noted that, based on prior knowledge, the grayscale values ​​of the pixels at the locations where the sealant is aged and cracked in the grayscale image are low, and the cracks of the sealant are continuous. Therefore, this can be used as a basis to analyze whether cracks may exist in each local area.

[0061] Specifically, for local area, first The pixel with the lowest grayscale value in the local area is recorded as the starting pixel, the grayscale value of the starting pixel and the position of the starting pixel are obtained, and then a maximum grayscale difference threshold is preset. , The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. Then the difference between the gray value of the starting pixel and the gray value of the starting pixel is less than The pixel point is recorded as the target pixel point, and then the target pixel points adjacent to the eight neighborhoods are classified into the same target pixel point area to obtain several target pixel point areas. Finally, the target pixel point area adjacent to the eight neighborhoods of the starting pixel point is recorded as the low grayscale area to obtain the first The low gray area in the local area.

[0062] It should be further explained that, since the grayscale values ​​of the pixels at the sealant aging and cracking locations in the image are low, and the cracks caused by sealant aging and cracking have coherent characteristics, this can be used as a basis to determine the possibility that the low grayscale area in each local area is a crack.

[0063] Specifically, for First, obtain the low grayscale area in the local area. The grayscale values ​​of all pixels in the low grayscale area in the local area are calculated according to the The grayscale values ​​of all pixels in the low grayscale area of ​​the local area are extracted The probability that the low gray area in a local area is a crack is calculated as follows:

[0064]

[0065] In the formula, Indicates The possibility that the low gray area in the local area is a crack; Indicates The number of pixels in the low grayscale area in a local area; Indicates In the low grayscale area of ​​the local area The gray value of each pixel; Represents an exponential function with a natural constant as base.

[0066] It should be noted that The larger the value of The lower the grayscale area in a local area, the more likely it is a crack.

[0067] It should be further explained that this embodiment extracts the possibility feature that the low grayscale area in each local area is a crack through a sliding window. Since the low grayscale area in each local area is the area most likely to be a crack in each local area, the lower the possibility that the low grayscale area in the local area is a crack, the lower the possibility that a crack exists in the local area. Therefore, this can be used as a basis for judging whether there is a crack in each local area.

[0068] Specifically, set a probability threshold , The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. To narrate, for If a local area Greater than or equal to , then If there are cracks in a local area, Less than , then There are no cracks in the local area.

[0069] At this point, the local area where the crack exists in the grayscale image is obtained, and the local area where the crack exists in the grayscale image is recorded as the target area.

[0070] Step S003: Segment each target area to obtain each foreground connected domain in the target area; calculate the degree of crack characteristics of each foreground connected domain in the target area according to the shape of the foreground connected domain in the target area and the grayscale value of the pixel points in the foreground connected domain in the target area; evaluate the segmentation effect of the target area according to the degree of crack characteristics of each foreground connected domain in the target area to obtain target areas with good segmentation effects and target areas with poor segmentation effects.

[0071] It should be noted that the present embodiment is a method for identifying sealant aging and cracking, and its purpose is to identify whether the sealant is aged and cracked, and further locate the position of the sealant aging and cracking; that is, after obtaining the target area in the grayscale image through step S002, the cracks need to be accurately segmented from the target area.

[0072] Specifically, for target area, with the The grayscale mean of the target area is The target area is segmented and the The gray value in the target area is less than The pixel point with the grayscale mean of the target area is taken as the foreground pixel point, and the area composed of all the foreground pixels adjacent to the eight neighborhoods is taken as the foreground connected domain. Several foreground connected regions in a target region.

[0073] It should be further explained that since threshold segmentation is a well-known prior art, it will not be described in detail in this embodiment; and from prior knowledge, it can be known that the grayscale values ​​of the pixels at the aging and cracking locations of the sealant in the grayscale image are low, so there must be connected domains composed of cracks in several foreground connected domains in the target area; in order to ensure the segmentation effect of the threshold segmentation, it is also necessary to evaluate the segmentation effect of the target area; that is, it is necessary to calculate the degree of crack characteristics of each foreground connected domain in the target area.

[0074] Specifically, for In the target area First, get the foreground connected area. In the target area The number of pixels in the foreground connected domain and the variance of the grayscale values ​​of all pixels; Welzl algorithm is used to obtain the In the target area The minimum circumscribed circle of the foreground connected domain. Since the specific process of obtaining the minimum circumscribed circle by the Welzl algorithm is a well-known prior art, it will not be described in detail in this embodiment. In the target area The number of pixels in the minimum circumscribed circle of the foreground connected domain is finally calculated based on the In the target area The number of pixels in the foreground connected domain, the variance of the grayscale values ​​of all pixels, In the target area The number of pixels in the minimum circumscribed circle of the foreground connected region and the The possibility that the low gray area in the target area is a crack; extract the In the target area The specific calculation formula for the crack characteristic degree of a foreground connected domain is:

[0075]

[0076] In the formula, Indicates In the target area The degree of crack characteristics of the foreground connected domain; Indicates In the target area The number of pixels in the foreground connected domain; Indicates In the target area The number of pixels in the minimum circumscribed circle of the foreground connected domain; Indicates In the target area The variance of the grayscale values ​​of all pixels in the foreground connected domain; Indicates The possibility that the low gray area in the target area is a crack; represents the linear normalization function; Represents an exponential function with a natural constant as base.

[0077] It should be noted that, in this embodiment, the contour features of the foreground connected domain of the target area are combined to extract features, and the degree of crack features of each foreground connected domain in each target area is obtained. Since the cracks caused by the aging of the sealant are continuous and have elongated features, the elongated features of the foreground connected domain are measured by making the minimum circumscribed circle of the foreground connected domain and according to the ratio of the number of pixels in the foreground connected domain to the number of pixels in the minimum circumscribed circle of the foreground connected domain. The smaller the ratio of the number of pixels in the foreground connected domain to the number of pixels in the minimum circumscribed circle of the foreground connected domain, the elongated foreground connected domain is, that is, the more crack features the foreground connected domain has. At the same time, since the grayscale values ​​of the pixels in the cracks of the grayscale image are concentrated, The smaller the value of , the more crack characteristics the foreground connected domain has; therefore The larger the value of In the target area The more foreground connected regions have crack characteristics.

[0078] Similarly, the crack feature degrees of all foreground connected domains in all target regions are obtained.

[0079] It should be noted that if the segmentation effect of the target region is good, the crack feature degree of all foreground connected domains in the target region is high; therefore, the segmentation effect of the target region can be judged according to the foreground connected domain with the lowest crack feature degree in the target region.

[0080] Specifically, for target area, first The foreground connected domain with the lowest crack feature degree in the target area is recorded as the evaluation connected domain, and the crack feature degree of the evaluation connected domain is used as the segmentation effect of the target area, and then a crack feature degree threshold is preset. , The specific value of can be set according to the actual situation. This embodiment does not make a hard requirement. Describe; if the segmentation effect is greater than or equal to , then it means target area is good, if the segmentation effect is less than , then it means The target area is not good.

[0081] At this point, the evaluation of the segmentation effect of the target area is completed.

[0082] Step S004: record the target area with poor segmentation effect as the area to be corrected, and record the target area with good segmentation effect as the reference area; adjust the segmentation threshold of the area to be corrected according to the reference area to obtain the corrected segmentation threshold of the area to be corrected; use the corrected segmentation threshold of the area to be corrected to perform threshold segmentation on the area to be corrected, and obtain cracks caused by aging and cracking of the sealant in the area to be corrected.

[0083] It should be noted that, since this embodiment is a method for identifying sealant aging and cracking, it is necessary to be able to accurately segment the cracks caused by sealant aging and cracking; therefore, after completing the evaluation of the segmentation effect of the target area through step S003, it is also necessary to correct the segmentation threshold of the target area with poor segmentation effect.

[0084] Specifically, the target area with a poor segmentation effect is recorded as the area to be corrected, and the target area with a good segmentation effect is recorded as the reference area.

[0085] It should be further explained that the higher the possibility that the low grayscale area in the area to be corrected is a crack and the lower the segmentation effect of the area to be corrected, the more the segmentation threshold of the area to be corrected should be adjusted; at the same time, since the grayscale values ​​of internal pixels between adjacent local areas in the grayscale image are similar, the segmentation threshold of the area to be corrected can be adjusted according to the reference area adjacent to the area to be corrected.

[0086] Specifically, the area to be corrected that is adjacent to the reference area in the eight neighborhoods is recorded as the first-level area to be corrected. The first level to be revised area will be All the reference areas adjacent to the first-level area to be corrected in the eight-neighborhood are recorded as The characteristic area of ​​the first-level area to be corrected; obtain the The possibility that the low gray area in the first level to be corrected area is a crack, The segmentation effect of the first-level area to be corrected, The segmentation threshold of the first-level region to be corrected and the The segmentation threshold of all feature areas in the first-level area to be corrected; adjust the The segmentation threshold of the first-level area to be corrected is calculated as follows:

[0087]

[0088] In the formula, Indicates The segmentation threshold after correction of the first-level region to be corrected; Indicates The segmentation threshold of the first-level area to be corrected; Indicates The possibility that the low gray area in the first-level area to be corrected is a crack; Indicates The segmentation effect of the first-level area to be corrected; Indicates The number of feature areas in the first-level area to be corrected; Indicates The first level of the area to be corrected The segmentation threshold of feature regions; represents the linear normalization function.

[0089] In getting the The segmentation threshold after the correction of the first-level region to be corrected Afterwards, according to For The first level to be corrected area is segmented by threshold value. The gray value of the first-level correction area is less than As foreground pixels, several foreground connected domains are obtained, and then the method described in step S003 is used to determine the first The segmentation effect of the first-level area to be corrected; if the segmentation effect is good, As the The segmentation threshold of the first-level area to be corrected is completed The correction of the first level to be corrected area; if the segmentation effect is not good, The characteristic regions of the first-level regions to be corrected and , continue to The first level to be corrected area is further corrected until the Until the segmentation effect of the first-level area to be corrected is good, the specific calculation formula is:

[0090]

[0091] In the formula, Indicates The segmentation threshold after further correction of the first-level area to be corrected; Indicates The segmentation threshold after correction of the first-level region to be corrected; Indicates The possibility that the low gray area in the first-level area to be corrected is a crack; Indicates The segmentation effect of the first-level area to be corrected; Indicates The number of feature areas in the first-level area to be corrected; Indicates The first level of the area to be corrected The segmentation threshold of feature regions; represents the linear normalization function.

[0092] Then, the adjacent areas to be corrected in the eight-neighborhood of the first-level area to be corrected are recorded as the second-level areas to be corrected. The second level to be revised area will be All the first-level regions to be corrected adjacent to the second-level region to be corrected in the eight-neighborhood are recorded as The characteristic area of ​​the second-level area to be corrected; obtain the The possibility that the low gray area in the second level to be corrected area is a crack, The segmentation effect of the second-level area to be corrected, The segmentation threshold of the second-level region to be corrected and the The segmentation threshold of all feature areas in the second-level area to be corrected; adjust the The segmentation threshold of the second-level area to be corrected is calculated as follows:

[0093]

[0094] In the formula, Indicates The segmentation threshold after correction of the second-level region to be corrected; Indicates The segmentation threshold of the second-level area to be corrected; Indicates The possibility that the low gray area in the second level to-be-corrected area is a crack; Indicates The segmentation effect of the second-level area to be corrected; Indicates The number of feature areas in the secondary area to be corrected; Indicates The second level area to be corrected The segmentation threshold of feature regions; represents the linear normalization function.

[0095] In getting the The segmentation threshold after the correction of the secondary region to be corrected Afterwards, according to For The second level to be corrected area is segmented by threshold value. The gray value of the secondary correction area is less than As foreground pixels, several foreground connected domains are obtained, and then the method described in step S003 is used to determine the first The segmentation effect of the second-level area to be corrected; if the segmentation effect is good, As the The segmentation threshold of the second-level area to be corrected is completed. If the segmentation effect is not good, then The characteristic regions of the secondary regions to be corrected and , continue to The second level to be corrected area is further corrected until the The segmentation effect of the second-level area to be corrected is good, and the specific calculation formula is:

[0096]

[0097] In the formula, Indicates The segmentation threshold after further correction of the second-level region to be corrected; Indicates The segmentation threshold after correction of the second-level region to be corrected; Indicates The possibility that the low gray area in the second level to-be-corrected area is a crack; Indicates The segmentation effect of the second-level area to be corrected; Indicates The number of feature areas in the secondary area to be corrected; Indicates The second level area to be corrected The segmentation threshold of feature regions; represents the linear normalization function.

[0098] And so on, correct all the areas to be corrected.

[0099] It should be further explained that if a certain area to be corrected does not have a characteristic area of ​​the area to be corrected in the eight neighborhoods, several areas to be corrected or reference areas that have been corrected closest to the area to be corrected will be used as the characteristic areas of the area to be corrected.

[0100] Finally, each target area is segmented according to the segmentation threshold of each target area, and the obtained result can accurately identify the cracks caused by aging and cracking of the sealant.

[0101] This embodiment traverses the sealant image through a sliding window and extracts multiple image features of the sealant image, which effectively improves the accuracy of subsequent identification of aging and cracking defects, so that the sealant aging and cracking identification electronic device can identify the sealant aging and cracking area with low power consumption, high efficiency and high accuracy.

[0102] At this point, this embodiment is completed.

[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying sealant aging and cracking, characterized in that: The method comprises the following steps: Collect the sealant image and obtain the grayscale image; The grayscale image is divided into regions to obtain several local regions; according to the grayscale values ​​of the pixels in the local regions, a low-grayscale region in the local regions is obtained; according to the grayscale values ​​of the low-grayscale region in the local regions, the possibility that the low-grayscale region in the local regions is a crack is calculated; according to the possibility that the low-grayscale region in the local regions is a crack, whether there is a crack in the local regions is determined, and the local regions with cracks are recorded as target regions; Each target region is segmented to obtain each foreground connected domain in the target region; the crack feature degree of each foreground connected domain in the target region is calculated according to the shape of the foreground connected domain in the target region and the gray value of the pixel points in the foreground connected domain in the target region; the segmentation effect of the target region is evaluated according to the crack feature degree of each foreground connected domain in the target region to obtain target regions with good segmentation effect and target regions with poor segmentation effect; The target area with poor segmentation effect is recorded as the area to be corrected, and the target area with good segmentation effect is recorded as the reference area; the segmentation threshold of the area to be corrected is adjusted according to the reference area to obtain the corrected segmentation threshold of the area to be corrected; the area to be corrected is threshold segmented using the corrected segmentation threshold of the area to be corrected to obtain cracks caused by aging of the sealant in the area to be corrected; The method of calculating the crack feature degree of each foreground connected domain in the target area according to the shape of the foreground connected domain in the target area and the grayscale value of the pixel points in the foreground connected domain in the target area includes the following specific methods: For In the target area First, get the foreground connected area. In the target area The number of pixels in the foreground connected domain and the variance of the grayscale values ​​of all pixels; Welzl algorithm is used to obtain the In the target area The minimum circumscribed circle of the foreground connected domain; In the target area The number of pixels in the minimum circumscribed circle of the foreground connected domain is finally calculated based on the In the target area The number of pixels in the foreground connected domain, the variance of the grayscale values ​​of all pixels, In the target area The number of pixels in the minimum circumscribed circle of the foreground connected region and the The possibility that the low gray area in the target area is a crack; obtain the In the target area The specific calculation formula for the crack characteristic degree of a foreground connected domain is: In the formula, Indicates In the target area The degree of crack characteristics of the foreground connected domain; Indicates In the target area The number of pixels in the foreground connected domain; Indicates In the target area The number of pixels in the minimum circumscribed circle of the foreground connected domain; Indicates In the target area The variance of the grayscale values ​​of all pixels in the foreground connected domain; Indicates The possibility that the low gray area in the target area is a crack; represents the linear normalization function; Represents an exponential function with a natural constant as base.

2. A sealant aging cracking identification method according to claim 1, characterized in that: The specific method of collecting the sealant image and obtaining the grayscale image includes: The sealant image is collected by a camera, and the obtained sealant image is gray-scaled to obtain a gray-scale image.

3. A sealant aging cracking identification method according to claim 1, characterized in that: The grayscale image is divided into regions to obtain a number of local regions, including the following specific methods: Preset one The sliding window size is set to Traverse the grayscale image, take each sliding window as a local area of ​​the grayscale image, and obtain several local areas.

4. A sealant aging cracking identification method according to claim 1, characterized in that: The specific method of obtaining the low grayscale area in the local area according to the grayscale value of the pixel point in the local area includes: For First, the local area The pixel with the lowest grayscale value in the local area is recorded as the starting pixel, the grayscale value of the starting pixel and the position of the starting pixel are obtained, and then a maximum grayscale difference threshold is preset. ; Then the gray value difference between the pixel point and the starting pixel point is less than The pixel point is recorded as the target pixel point, and then the target pixel points adjacent to the eight neighborhoods are classified into the same target pixel point area to obtain several target pixel point areas. Finally, the target pixel point area adjacent to the eight neighborhoods of the starting pixel point is recorded as the low grayscale area to obtain the first The low gray area in the local area.

5. A sealant aging cracking identification method according to claim 1, characterized in that: The method of calculating the possibility that the low grayscale area in the local area is a crack according to the grayscale value of the low grayscale area in the local area includes: For First, obtain the low grayscale area in the local area. The grayscale values ​​of all pixels in the low grayscale area in the local area are calculated according to the The grayscale values ​​of all pixels in the low grayscale area of ​​the local area are obtained. The probability that the low gray area in a local area is a crack is calculated as follows: In the formula, Indicates The possibility that the low gray area in the local area is a crack; Indicates The number of pixels in the low grayscale area in a local area; Indicates In the low grayscale area of ​​the local area The gray value of a pixel.

6. A sealant aging cracking identification method according to claim 5, characterized in that: The method of judging whether there is a crack in the local area according to the possibility that the low grayscale area in the local area is a crack includes: Preset a probability threshold , for the If a local area Greater than or equal to , then If there are cracks in a local area, Less than , then There are no cracks in the local area.

7. A sealant aging cracking identification method according to claim 1, characterized in that: The specific method of segmenting each target area to obtain each foreground connected domain in the target area includes: For target area, with the The grayscale mean of the target area is The target area is segmented and the The gray value in the target area is less than The pixel point with the grayscale mean of the target area is taken as the foreground pixel point, and the area composed of all the foreground pixels adjacent to the eight neighborhoods is taken as the foreground connected domain. Several foreground connected regions in a target region.

8. A sealant aging cracking identification method according to claim 1, characterized in that: The method of evaluating the segmentation effect of the target region according to the degree of crack characteristics of each foreground connected domain in the target region to obtain the target region with good segmentation effect and the target region with poor segmentation effect includes the following specific methods: For target area, first The foreground connected domain with the lowest crack feature degree in the target area is recorded as the evaluation connected domain, and the crack feature degree of the evaluation connected domain is used as the segmentation effect of the target area, and then a crack feature degree threshold is preset. , if the segmentation effect is greater than or equal to , then it means target area is good, if the segmentation effect is less than , then it means The target area is not good.

9. A sealant aging cracking identification method according to claim 1, characterized in that: The method of adjusting the segmentation threshold of the area to be corrected according to the reference area to obtain the corrected segmentation threshold of the area to be corrected includes: The area to be corrected that is adjacent to the reference area in the eight-neighborhood is recorded as the first-level area to be corrected. The first level to be revised area will be All the reference areas adjacent to the first-level area to be corrected in the eight-neighborhood are recorded as The characteristic area of ​​the first-level area to be corrected; Get the The possibility that the low gray area in the first level to be corrected area is a crack, The segmentation effect of the first-level area to be corrected, The segmentation threshold of the first-level region to be corrected and the The segmentation threshold of all feature areas in the first-level area to be corrected; adjust the The segmentation threshold of the first-level area to be corrected is calculated as follows: In the formula, Indicates The segmentation threshold after correction of the first-level region to be corrected; Indicates The segmentation threshold of the first-level area to be corrected; Indicates The possibility that the low gray area in the first-level area to be corrected is a crack; Indicates The segmentation effect of the first-level area to be corrected; Indicates The number of feature areas in the first-level area to be corrected; Indicates The first level of the area to be corrected The segmentation threshold of feature regions; In getting the The segmentation threshold after the correction of the first-level region to be corrected Afterwards, according to For The first level to be corrected area is segmented by threshold value. The gray value of the first-level correction area is less than As foreground pixels, we get several foreground connected domains and obtain the first The segmentation effect of the first-level area to be corrected; If the segmentation effect is good, As the The segmentation threshold of the first-level area to be corrected is completed The correction of the first-level pending correction area; If the segmentation effect is not good, The characteristic regions of the first-level regions to be corrected and , continue to The first level to be corrected area is further corrected until the Until the segmentation effect of the first-level area to be corrected is good, the specific calculation formula is: In the formula, Indicates The segmentation threshold after further correction of the first-level area to be corrected; Then, the adjacent areas to be corrected in the eight-neighborhood of the first-level area to be corrected are recorded as the second-level areas to be corrected. The second level to be revised area will be All the first-level regions to be corrected adjacent to the second-level region to be corrected in the eight-neighborhood are recorded as The characteristic area of ​​the second level to be corrected area; Get the The possibility that the low gray area in the second level to be corrected area is a crack, The segmentation effect of the second-level area to be corrected, The segmentation threshold of the second-level region to be corrected and the The segmentation threshold of all feature areas in the second-level area to be corrected; adjust the The segmentation threshold of the second-level area to be corrected is calculated as follows: In the formula, Indicates The segmentation threshold after correction of the second-level region to be corrected; Indicates The segmentation threshold of the second-level area to be corrected; Indicates The possibility that the low gray area in the second level to-be-corrected area is a crack; Indicates The segmentation effect of the second-level area to be corrected; Indicates The number of feature areas in the secondary area to be corrected; Indicates The second level area to be corrected The segmentation threshold of feature regions; In getting the The segmentation threshold after the correction of the secondary region to be corrected Afterwards, according to For The second level to be corrected area is segmented by threshold value. The gray value of the secondary correction area is less than As foreground pixels, we get several foreground connected domains and obtain the first The segmentation effect of the second-level area to be corrected; If the segmentation effect is good, As the The segmentation threshold of the second-level area to be corrected is completed. The correction of the second-level pending correction area; If the segmentation effect is not good, The characteristic regions of the secondary regions to be corrected and , continue to The second level to be corrected area is further corrected until the The segmentation effect of the second-level area to be corrected is good, and the specific calculation formula is: In the formula, Indicates The segmentation threshold after further correction of the second-level region to be corrected; Correct all areas that need correction.