An image enhancement method and system for aerospace and aviation part inspection

By constructing clusters of local texture features and gray values ​​and correcting gray frequency, the problem of distinguishing between background and defects in traditional methods is solved, realizing adaptive enhancement of part inspection images and improving detection accuracy.

CN120746849BActive Publication Date: 2025-11-07BAOJI AEROSPACE XINGYU ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511205522.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-11-07
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

Traditional histogram equalization algorithms cannot effectively distinguish between background and defect areas in part inspection, resulting in insufficient or excessive contrast enhancement and difficulty in preserving key details.

Method used

By constructing local texture features of pixels, clustering is performed based on grayscale values ​​and texture features, the frequency of grayscale values ​​is corrected, and a mapping strategy between local texture features and grayscale values ​​is adopted to achieve frequency decoupling between background and defects while preserving texture structure.

Benefits of technology

It achieves adaptive enhancement of texture details in part inspection images, significantly improving the accuracy and robustness of part defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120746849B_ABST
    Figure CN120746849B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of image data processing, and particularly relates to an image enhancement method and system for aerospace and aviation part inspection, which comprises the following steps: dividing pixel points into multiple categories based on gray values and local texture features, and then dividing the pixel points into basic gray values and non-basic gray values; correcting the initial frequency of the non-basic gray values according to the number of categories involved by the non-basic gray values, and performing histogram equalization; constructing a mapping selection interval of each category involved by the non-basic gray values according to the correction frequency and mapping result of the non-basic gray values and adjacent gray values; calculating the loss degree when each value of the mapping selection interval is used as the mapping result of the category according to the relative position of the non-basic gray value in the reference basic gray value range of each pixel point in the category; and using the value with the minimum loss degree as the mapping result of the category to enhance the part inspection image. The application realizes the preservation of texture details and the adaptive enhancement of contrast in the part inspection image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video transmission. More particularly, the present application relates to an image enhancement method and system for aerospace parts inspection. BACKGROUND

[0002] In the field of automatic inspection of industrial parts, image enhancement is a key link to improve defect detection accuracy.

[0003] Traditional global histogram equalization algorithm, by redistributing the gray frequency to expand the dynamic range, realizes image enhancement; but often ignores the local texture structure of the image, resulting in false image, blurred details or contrast distortion after enhancement, in the scene of part detection, leading to the detection of scratches or micro-cracks on the surface of metal parts, the gray distribution of the background area representing the uniform metal surface and the defect area representing the complex texture of the scratch may overlap, the traditional method cannot distinguish between the two, and the background noise is easy to be enhanced as a defect signal, or the real defect is over-smoothed.

[0004] Traditional local histogram equalization algorithm tries to retain texture by local window processing, but its window size is fixed and cannot adapt to the size difference between background and defect area in part image.

[0005] In summary, in the part inspection image, the part background often presents a single gray uniform texture, while the defect area has a complex texture of multiple categories. The traditional histogram correction only relies on gray frequency statistics and does not consider the semantic contribution of texture category to gray distribution, resulting in insufficient contrast enhancement of non-background area and excessive enhancement of background area, which is difficult to enhance contrast while retaining such key details. SUMMARY

[0006] To solve the technical problem that the traditional histogram equalization algorithm only relies on gray frequency statistics and is difficult to enhance contrast while retaining such key details, the present application provides solutions in the following aspects.

[0007] In a first aspect, the present application provides an image enhancement method for aerospace part inspection, comprising: constructing local texture features of a pixel point in a part inspection image; dividing all pixel points into multiple categories based on the gray value of the pixel point and the local texture features; dividing the gray value into a basic gray value and a non-basic gray value according to the category to which the pixel point corresponding to the gray value belongs; correcting the initial frequency of the non-basic gray value according to the number of categories involved by the non-basic gray value; performing histogram equalization according to the corrected frequency of all gray values to obtain the mapping result of each gray value; obtaining the reference basic gray value range of the pixel point according to the basic gray values in the neighborhood of the pixel point; for the non-basic gray value: constructing the mapping selection interval of each category involved by the non-basic gray value according to the corrected frequency and the mapping result of the non-basic gray value and its adjacent gray values; for any value in the mapping selection interval of the category: calculating the loss degree of the value as the mapping result of the category according to the difference between the relative position of the non-basic gray value in the reference basic gray value range of each pixel point in the category and the relative position in the interval composed of the mapping result of the reference basic gray value range of each pixel point in the category; taking the value with the smallest loss degree as the mapping result of the category; and enhancing the part inspection image according to the mapping result of the basic gray value and the mapping result of each category of the non-basic gray value to obtain an enhanced part inspection image.

[0008] Preferably, the constructing local texture features of a pixel point comprises: for each pixel point in the part inspection image, obtaining a neighborhood window centered on the pixel point and with a size of 5x5, constructing four complementary local texture features of the pixel point based on the gray distribution in the neighborhood window, the four complementary local texture features including LBP features, Gabor energy features, structural tensor anisotropy features, and contrast.

[0009] Preferably, the dividing the gray value into a basic gray value and a non-basic gray value according to the category to which the pixel point corresponding to the gray value belongs comprises: taking any one gray value as a target gray value, in the category set involved by the target gray value, calculating the ratio of the number of all pixel points equal to the target gray value in each two categories to the number of all pixel points equal to the target gray value in the part inspection image, if there is a ratio greater than a preset proportion threshold, determining that the target gray value belongs to the basic gray value, otherwise, determining that the target gray value belongs to the non-basic gray value.

[0010] Preferably, the acquisition method of the category set involved by the target gray value comprises: taking the category to which all pixel points equal to the target gray value belong as the category involved by the target gray value, and then statistically obtaining the category set involved by the target gray value.

[0011] Preferably, the correcting the initial frequency of the non-basic gray value according to the number of categories involved by the non-basic gray value comprises: ;in, Non-basic grayscale values The correction frequency, Non-basic grayscale values The number of categories involved; Non-basic grayscale values The initial frequency; This refers to the Sigmoid function in the sigmoid function family; Non-basic grayscale values The first Correction coefficients for each category: when When, correction factor ;when When, correction factor ; Non-basic grayscale values The first The grayscale value in each category is equal to The total number of all pixels; Non-basic grayscale values The first The number of all pixels in each category.

[0012] Preferably, obtaining the reference base grayscale value range of a pixel based on the base grayscale values ​​in the pixel's neighborhood includes: for non-base grayscale values The first The grayscale value in each category is equal to For each pixel: By continuously expanding the neighborhood size of a pixel, until at least one pixel with a grayscale value less than 1 is obtained among all the pixels in its neighborhood. The base gray value and at least one greater than The base grayscale value; will be less than Among all the basic grayscale values, and non-basic grayscale values The base gray value with the smallest difference is used as the reference base gray value for the pixel. The grayscale value is greater than Among all the basic grayscale values, and non-basic grayscale values The base gray value with the smallest difference is used as the reference base gray value for the pixel. Reference base grayscale value and The reference base grayscale value range that makes up a pixel .

[0013] Preferably, the step of constructing mapping selection intervals for various categories involving non-base grayscale values ​​based on the correction frequencies and mapping results of non-base grayscale values ​​and their adjacent grayscale values ​​includes: for grayscale values The first The first category is constructed The mapping selection interval of the first category Wherein, the left boundary And the right boundary The calculation formula is: ; ; In the formula, , , The mapping results of the gray values , , ; , , The correction frequency of the gray values , , .

[0014] Preferably, the loss degree of the calculation value as the mapping result of the category includes: ; In the formula, The loss degree of the relative relationship of the gray value As the mapping result of the first category ; The number of all pixel points in the first category Involving the gray value equal to ; , , The left and right boundaries of the reference basic gray value range of the first pixel point in the first category In which the gray value is equal to ; , , The mapping results of , ; Indicates to take the absolute value.

[0015] Preferably, the correction frequency of the basic gray value is equal to the initial frequency of the basic gray value.

[0016] In the second aspect, the present application provides an image enhancement system for aerospace part inspection, comprising a processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, the above-mentioned image enhancement method for aerospace part inspection is realized.

[0017] By adopting the above technical scheme, the above-mentioned image enhancement method for aerospace part inspection is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is made according to the memory and the processor, and convenient use is facilitated.

[0018] The present application has the advantages of:

[0019] The present application ensures the consistency of physical features in the obtained categories by constructing pixel-level local texture features, clustering based on texture and grayscale with double constraints, and laying a foundation for subsequent semantic analysis; the initial frequency of the non-basic grayscale value is corrected according to the number of categories involved by the non-basic grayscale value, which is a histogram correction based on semantic perception and category saliency, realizes the frequency decoupling of background and defects, and avoids the semantic confusion of traditional methods; the loss degree of the value when used as the mapping result of the category is calculated according to the difference between the relative position of the value in the interval composed of the relative position of the non-basic grayscale value in the reference basic grayscale value range of each pixel point in the category and the mapping result of the value in the reference basic grayscale value range of each pixel point in the category, which is a mapping strategy based on local grayscale relationship preservation, enhances the contrast while preserving the texture structure, and eliminates the distortion of enhancement.

[0020] In summary, the present application realizes the preservation of texture details and adaptive enhancement of contrast in the part inspection image, and can significantly improve the accuracy and robustness of part defect detection. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 is a flowchart schematically showing an image enhancement method for aerospace part inspection in the present application;

[0022] Figure 2 is a schematic diagram schematically showing a part inspection image;

[0023] Figure 3 is an enhanced part inspection image obtained by performing image enhancement on Figure 2 using a traditional global histogram equalization algorithm;

[0024] Figure 4 is an enhanced part inspection image obtained by performing image enhancement on Figure 2 using the method of the present application. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0026] The specific embodiments of the present application will be described in detail below with reference to the drawings.

[0027] The embodiment of the application discloses an image enhancement method for aerospace part inspection Figure 1 , comprising steps S1 to S5:

[0028] S1, for the pixel points in the part inspection image, construct the local texture features of the pixel points; based on the gray value and the local texture features of the pixel points, cluster all the pixel points to obtain multiple categories.

[0029] It should be noted that a single feature is easily disturbed by noise, and multi-feature fusion can reduce the misjudgment rate, therefore, based on the gray distribution in the neighborhood window, four complementary local texture features of the pixel points are constructed, wherein the LBP feature is used to capture the micro pattern and is robust to light; the Gabor energy feature can represent the macro directionality and is sensitive to defect direction; the structure tensor anisotropy feature quantifies the anisotropy and can be used to distinguish uniform background and chaotic defects; the contrast reflects the edge strength and can highlight the defect boundary; the four complementary local texture features cover the uniformity, directionality, anisotropy and abruptness of the texture, forming a complete feature set.

[0030] Specifically, for each pixel point in the part inspection image, a neighborhood window with the pixel point as the center and a size of 5*5 is obtained, and based on the gray distribution in the neighborhood window, four complementary local texture features of the pixel point are constructed, including:

[0031] (1) the LBP feature of the pixel point is obtained through the local binary pattern algorithm.

[0032] Specifically, the LBP operator is defined as follows: in the neighborhood window of the pixel point, the gray values of the neighborhood pixels are compared with the gray value of the pixel point as the threshold value: if the gray value of the neighborhood pixel is greater than the threshold value, the position of the neighborhood pixel is marked as 1, otherwise, it is marked as 0, in this way, 24 neighborhood pixels in the 5*5 neighborhood window can generate a 24-bit binary number after comparison, which is the LBP value of the pixel point, and the LBP value can reflect the texture information of the region where the pixel point is located.

[0033] (2) the Gabor energy feature of the pixel point is obtained by convolving the pixel point with a Gabor filter.

[0034] Specifically, after the neighborhood window of the pixel point is convolved with four-direction Gabor filters, the energy amplitude of the response of each direction is obtained, which constitutes the Gabor energy feature of the pixel point, and the energy feature reflects the texture intensity of the local region where the pixel point is located in a specific direction and scale; wherein the four directions are 0° direction, 45° direction, 90° direction and 135° direction.

[0035] (3) the structure tensor anisotropy feature of the pixel point is obtained.

[0036] Specifically, a neighborhood window of the pixel point is acquired, a gradient covariance matrix of the neighborhood window is obtained, two eigenvalues of the gradient covariance matrix are calculated, and a ratio of the two eigenvalues is taken as a structure tensor anisotropy feature of the pixel point. The structure tensor anisotropy feature is an effective measure for describing the structure directionality and consistency of the local region where the pixel point is located, and can determine whether the local region where the pixel point is located is anisotropic (such as an edge, a stripe, etc. with a clear direction) or isotropic (such as a uniform region, noise, a corner point).

[0037] (4) Based on a gray level co-occurrence matrix, a contrast of the pixel point is obtained.

[0038] Specifically, a gray level co-occurrence matrix with a distance of 1 and a direction of 0° is constructed based on the neighborhood window of the pixel point, and the maximum gray level in the gray level co-occurrence matrix is 16. The contrast is calculated according to the gray level co-occurrence matrix, and taken as the contrast of the pixel point. The contrast reflects the definition and the groove depth of the texture of the local region where the pixel point is located, and the more clear the texture is, the greater the contrast is.

[0039] It should be noted that the local binary pattern algorithm, the Gabor filter, the structure tensor anisotropy feature and the contrast calculated based on the gray level co-occurrence matrix are all known technologies, and will not be described here.

[0040] It should be further noted that the constructed local texture feature provides a high-discriminative input for subsequent clustering, and avoids texture misclassification caused by the limitation of a single feature.

[0041] Further, all the pixel points are clustered based on the gray values and the local texture features of the pixel points by using a K-means algorithm, and a plurality of categories are obtained, wherein the number of categories in the K-means algorithm is The contour coefficient is automatically optimized.

[0042] S2, according to the categories to which all the pixel points equal to each gray value belong, the gray values are divided into basic gray values and non-basic gray values.

[0043] Specifically, any one gray value is taken as a target gray value, the categories to which all the pixel points equal to the target gray value belong are taken as the categories related to the target gray value, and then a category set related to the target gray value is obtained by statistics. In the category set, the ratio of the number of all the pixel points equal to the target gray value in each two categories to the number of all the pixel points equal to the target gray value in the part inspection image is calculated. If there is a ratio greater than a preset proportion threshold, it is determined that the target gray value belongs to the basic gray value, otherwise the target gray value belongs to the non-basic gray value.

[0044] It should be noted that the basis gray value definition is based on the fact that the background area in the part inspection image usually has the characteristics of single gray and uniform texture, for example, a polished metal surface, the gray value of the pixel points of which belongs to only 1 to 2 categories; and the defect area has the characteristics of mixed texture, for example, crack edge type and pit center type, so that the same gray value involves multiple categories.

[0045] wherein the value range of the proportion threshold is determined to be [0.85, 1) through a large number of part image statistics, and the proportion threshold selected in the range can ensure that the basis gray value corresponds to the global background, the local background or the specific stable texture, and the proportion threshold is set to 0.9 in the application.

[0046] S3, correcting the initial frequency of the non-basis gray value according to the number of categories involved by the non-basis gray value; and performing histogram equalization according to the corrected frequency of all gray values to obtain a mapping result of each gray value.

[0047] Specifically, the gray values of the pixel points in the part inspection image are counted to obtain a gray histogram of the part inspection image, and the gray histogram includes the initial frequencies of all gray values.

[0048] Further, the initial frequency of the gray value is corrected, including:

[0049] (1) For the basis gray value, the corrected frequency of the basis gray value is equal to the initial frequency of the basis gray value.

[0050] Specifically, for the basis gray value , the corrected frequency of the gray value ; is the initial frequency of the gray value .

[0051] (2) For the non-basis gray value: the initial frequency of the non-basis gray value is corrected according to the number of categories involved by the non-basis gray value, and the more the number of categories involved by the non-basis gray value and the greater the proportion of the number of pixel points equal to the non-basis gray value in the involved categories, the greater the corrected frequency of the non-basis gray value.

[0052] Specifically, the corrected frequency of the non-basis gray value is calculated according to the following formula:

[0053] ;

[0054] wherein is the corrected frequency of the non-basis gray value , and is the number of categories involved by the non-basis gray value ​​The number of categories involved The initial frequency of the non-basic gray value Sigmoid function represents a sigmoid function in S-type function The initial frequency of the non-basic gray value The correction coefficient of the first category involved is defined as: when , the correction coefficient ; when , the correction coefficient ; The initial frequency of the non-basic gray value The number of all pixel points in the first category involved whose gray value is equal to ; The initial frequency of the non-basic gray value The number of all pixel points in the first category involved.

[0055] Among them, the correction frequency of the non-basic gray value should reflect its significance in the key texture category, therefore, the more categories involved, that is , and the larger the proportion of the number of pixel points equal to the non-basic gray value in the involved categories, that is , the more likely the non-basic gray value is associated with defects, and its frequency needs to be improved to enhance the contrast; for the correction coefficient : when , , linearly reflects the proportion of the non-basic gray value in the first category, the higher the proportion, the greater the contribution of the first category to the non-basic gray value , when , it indicates that the non-basic gray value dominates the category, for example, the core area of the defect; for the summation term , the contributions of all involved categories to the non-basic gray value are accumulated, the larger the value, the more significant the non-basic gray value in more categories; the output is compressed to the interval [0.5, 1) through the sigmoid function, ensuring the correction smooth, and the output is expanded to the interval [1, 2) through the coefficient 2, so that the correction frequency is greater than the initial frequency .

[0056] It should be noted that the correction frequency quantifies the gray value on the basis of the initial frequencyThe semantic importance of the non-basic gray values ​​is amplified, while the basic gray values ​​remain unchanged, thus achieving "background frequency suppression and defect frequency enhancement".

[0057] It should be noted that by correcting the initial frequency of non-basic gray values, semantically aware weights are provided for subsequent equalization, avoiding the over-enhancement of the background by traditional methods.

[0058] Finally, histogram equalization is performed based on the correction frequency of all gray values ​​to obtain the mapping result for each gray value, which ensures that the gray dynamic range of the output image is maximized while keeping the order of the gray values ​​of the pixels unchanged.

[0059] S4. Based on the correction frequency and mapping results of non-base gray values ​​and their adjacent gray values, construct mapping selection intervals for each category involving non-base gray values; obtain the reference base gray values ​​of each pixel in the category based on the base gray values ​​in the neighborhood of the pixel; for any value in the mapping selection interval of the category: calculate the degree of loss when the value is used as the mapping result of the category based on the difference between the relative position of the non-base gray value in the range of reference base gray values ​​of each pixel in the category and the relative position of the value in the interval formed by the mapping results of the reference base gray values ​​of each pixel in the category; take the value with the smallest loss as the mapping result of the category.

[0060] Specifically, for non-basic gray values The categories involved: based on non-base grayscale values and its adjacent gray values and Based on the correction frequency and mapping results, construct non-basic grayscale values. The mapping selection ranges involved in each category.

[0061] Among them, for non-basic gray values The first The first category, constructing the second Mapping selection range for each category Wherein, the left boundary of the mapping selection interval and right boundary The calculation formula is:

[0062] ;

[0063] ;

[0064] In the formula, , These are the non-basic grayscale values. The mapping results and correction frequencies; , These are grayscale values. the mapping result and the correction frequency of the gray value , the mapping result and the correction frequency of the gray value .

[0065] wherein, for the left boundary : the frequency weight of the non-basic gray value relative to its adjacent gray value , if , close to , the left boundary of the interval is right-shifted, avoiding the adjacent gray value of the low frequency to pull down the mapping result; on the contrary, the left boundary is left-shifted, which can ensure that the interval width reflects the frequency distribution of the neighborhood.

[0066] It should be noted that the obtained mapping selection interval realizes width self-adaptation by focusing on the semantic neighborhood of the gray value, for example, the defect area is wide, while the background area is narrow.

[0067] Further, for the non-basic gray value , the gray value of each pixel point in the first category is equal to , the reference basic gray value range of each pixel point is obtained according to the basic gray value in the neighborhood of each pixel point, and the specific obtaining method is as follows: for any one pixel point, the neighborhood size of the pixel point is continuously expanded, starting from a 3×3 neighborhood and expanding to 5×5, 7×7, etc. layer by layer, until at least one basic gray value less than and at least one basic gray value less than can be obtained among the gray values of all pixel points in its neighborhood; at this time, the basic gray value with the smallest difference from the non-basic gray value among all the basic gray values less than is taken as the reference basic gray value of the pixel point, and the basic gray value with the smallest difference from the non-basic gray value among all the basic gray values less than is taken as the reference basic gray value of the pixel point; the reference basic gray value and constitute the reference basic gray value range of the pixel point.

[0068] It should be noted that the basic gray value represents stable background or texture, and constitute the local reference framework of the gray value .

[0069] Further, for non-base gray values The first category of mapping selection interval The value in the interval The relative position of the reference base gray value range of each pixel point in the first category, and the difference in the relative position of the mapping result of the value The relative position of the reference base gray value range of each pixel point in the first category, the loss degree of the value as the mapping result of the category; wherein the value is an integer in the mapping selection interval Finally, the value with the smallest loss degree is taken as the mapping result of the category, wherein the efficient solution can be obtained by grid search, and the step size is set to 1.

[0070] The value as the mapping result of the first category is the loss degree of the gray relative relationship, and the calculation formula is:

[0071] ;

[0072] In the formula, is the loss degree of the gray relative relationship when the value is taken as the mapping result of the first category; is the number of all pixel points in the first category whose gray values are equal to ; , is the left and right boundary of the reference base gray value range of the first pixel point in the first category whose gray value is equal to ; , is the mapping result of ; , ; represents taking the absolute value.

[0073] Among them, for the item , it represents the relative position of the non-base gray value in the reference base gray value range of each pixel point in the first category, which reflects the local gradual change characteristics, such as the transition slope of scratches from background to highlight; for the item , it represents the difference in the relative position of the mapping result of the value In the The relative position of each pixel within the interval formed by the mapping results of the reference base grayscale value range of each pixel in each category, that is, the numerical value As the first When mapping results for each category are obtained, the mapping result is in the th category. The relative positions of pixels within the interval formed by the mapping results of the reference base grayscale value range of each pixel in each category; the loss degree is the sum of the absolute differences between the two, and the difference between the two is minimized by minimizing the loss degree to ensure that the mapping result can maintain the original local grayscale relationship; and the loss degree can measure the degree of destruction of the local texture structure by the mapping result, so that the mapping result can dynamically adapt to the first category. Local structure of each category.

[0074] It should be noted that by calculating the difference in the relative position of the gray values ​​of pixels before and after mapping within their reference base gray value range, the loss degree when the numerical value is used as the category mapping result is calculated. The mapping result selected based on the loss degree can avoid abrupt changes in the mapping result at the interval boundary while preserving texture continuity. This eliminates the blocky effect common in traditional methods and suppresses artifacts.

[0075] S5. Based on the mapping results of the base gray values ​​and the mapping results of each category of non-base gray values, enhance the part inspection image to obtain the enhanced part inspection image.

[0076] Specifically, for pixels in the part inspection image that have a base gray value, the gray value in the enhanced part inspection image is the result of mapping the base gray value to the base gray value; for pixels in the part inspection image that have a non-base gray value, their category is denoted as category. In the enhanced part inspection image, the grayscale value is equal to the category among the non-base grayscale values. The mapping results are used to enhance the part inspection image and obtain the enhanced part inspection image.

[0077] It should be noted that the enhanced part inspection image preserves texture details while suppressing background noise; for example, for... Figure 2 The diagram shown illustrates the inspection images of the parts, processed using a traditional global histogram equalization algorithm. Figure 2 Image enhancement is performed, and the enhanced part inspection image obtained is as follows: Figure 3 As shown, the method of the present invention is used to... Figure 2 Image enhancement is performed, and the enhanced part inspection image obtained is as follows: Figure 4 As shown; for Figure 3 and Figure 4 Comparison: Figure 4The scratch on the surface of the middle part is clearly visible, the uniform metal area is smooth without artifacts, and is more in line with the industrial inspection standard.

[0078] The embodiment of the application further discloses an image enhancement system for aerospace and aviation part inspection, comprising a processor and a memory, and the memory stores computer program instructions.

[0079] The above system further comprises other components such as a communication bus and a communication interface which are well known to those skilled in the art, and the setting and functions thereof are known in the art, so the description is not repeated here.

Claims

1. An image enhancement method for aerospace part inspection, characterized by, The method comprises the following steps: For a pixel point in a part inspection image, a local texture feature of the pixel point is constructed; Based on the gray value and the local texture feature of the pixel point, all the pixel points are divided into multiple categories; According to the category to which the pixel point corresponding to the gray value belongs, the gray value is divided into a basic gray value and a non-basic gray value, including: taking any one gray value as a target gray value, taking the category to which all pixel points equal to the target gray value belong as the category involved by the target gray value, and then obtaining a category set involved by the target gray value by statistics, in the category set involved by the target gray value, calculating the ratio of the number of all pixel points equal to the target gray value in each two categories to the number of all pixel points equal to the target gray value in the part inspection image, if there is a ratio greater than a preset proportion threshold, it is determined that the target gray value belongs to the basic gray value, otherwise, it is determined that the target gray value belongs to the non-basic gray value; according to the number of categories involved by the non-basic gray value, the initial frequency of the non-basic gray value is corrected , , the number of categories involved by the non-basic gray value ; the initial frequency of the non-basic gray value ; Sigmoid function in S-shaped function the correction coefficient of the first category involved by the non-basic gray value ; when , the correction coefficient ; when , the correction coefficient ; ; the number of all pixel points in the first category involved by the non-basic gray value ; the number of all pixel points in the first category involved by the non-basic gray value ; the number of all pixel points in the first category involved by the non-basic gray value ; according to the correction frequency of all gray values, histogram equalization is performed to obtain the mapping result of each gray value; According to the basic gray values in the neighborhood of the pixel point, a reference basic gray value range of the pixel point is obtained; For non-base grayscale values: Based on the correction frequencies and mapping results of the non-base grayscale values ​​and their adjacent grayscale values, construct mapping selection intervals for each category involving the non-base grayscale values; For any value within the mapping selection interval of a category: Based on the difference between the relative position of the non-base grayscale value within the reference base grayscale value range of each pixel in the category and the relative position of the value within the interval formed by the mapping results of the reference base grayscale value range of each pixel in the category, calculate the loss degree when the value is used as the mapping result of the category. As the first The degree of loss in the gray-level relative relationship when mapping the categories , , For the first The grayscale value in each category is equal to The The left and right boundaries of the reference base grayscale value range for each pixel; , for , The mapping result; This indicates taking the absolute value; the value with the smallest loss is used as the mapping result for the category. According to the mapping result of the basic gray value and the mapping result of each category of the non-basic gray value, the part inspection image is enhanced to obtain an enhanced part inspection image.

2. The image enhancement method for aerospace parts inspection according to claim 1, characterized in that, The construction of the local texture feature of the pixel point comprises: For each pixel point in the part inspection image, a neighborhood window with a size of 5*5 centered on the pixel point is obtained, and based on the gray distribution in the neighborhood window, four complementary local texture features of the pixel point are constructed, including LBP feature, Gabor energy feature, structural tensor anisotropy feature and contrast.

3. The image enhancement method for aerospace parts inspection according to claim 1, characterized in that, The reference basic gray value range of the pixel point is obtained according to the basic gray values in the neighborhood of the pixel point, comprising: For non-basic gray values The first The grayscale value in each category is equal to For each pixel: By continuously expanding the neighborhood size of a pixel, until at least one pixel with a grayscale value less than 1 is obtained among all the pixels in its neighborhood. The base gray value and at least one greater than The base grayscale value; will be less than Among all the basic grayscale values, and non-basic grayscale values The base gray value with the smallest difference is used as the reference base gray value for the pixel. The grayscale value is greater than Among all the basic grayscale values, and non-basic grayscale values The base gray value with the smallest difference is used as the reference base gray value for the pixel. Reference base grayscale value and The reference base grayscale range that makes up a pixel .

4. The image enhancement method for aerospace parts inspection according to claim 1, wherein, The mapping selection interval of each category involved by the non-basic gray value is constructed according to the correction frequency and the mapping result of the non-basic gray value and its adjacent gray value, comprising: For the gray value The first category involved: constructing the mapping selection interval of the first category Wherein, the calculation formula of the left boundary and the right boundary is: ; ; In the formula, , , are the mapping results of the gray values , , respectively; , , are the correction frequencies of the gray values , , respectively.

5. The method of claim 1, wherein the method is used for aerospace part inspection. The correction frequency of the basic gray value is equal to the initial frequency of the basic gray value.

6. An image enhancement system for aerospace part inspection, comprising: The method comprises the following steps: A processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, a spaceflight and aviation part inspection image enhancement method according to any one of claims 1-5 is realized.

Citation Information

Patent Citations

  • Thermal power plant header welding defect detection method and system

    CN118015003A

  • Printed matter quality visual inspection system based on image features

    CN120525822A