A blade casting intelligent detection method and system
By constructing local ranges in the blade casting images, calculating mutations and local density, and adjusting the target grayscale value, the problem of low detection accuracy caused by dust interference is solved, and more accurate defect area segmentation and quality detection are achieved.
Patent Information
- Application Number
- CN202510260755.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The prior art has low accuracy in the detection of blade castings due to dust interference in the accuracy of defect detection results.
By constructing the local range of pixel points in the red channel grayscale map of the blade casting, mutability is calculated and suspected dust points are divided using the Otsu threshold method, local density is obtained by combining Euclidean distance, target grayscale value of pixel points is adjusted, and the impact of dust on the image is reduced, and accurate defect area segmentation is achieved.
It improves the accuracy of blade casting quality inspection and reduces the impact of dust interference on the detection results.
Smart Images

Figure CN119741303B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of casting image data processing, and in particular to a blade casting intelligent detection method and system. Background Art
[0002] Blade castings are metal molded objects obtained by various casting methods. Due to their high strength, high heat resistance, corrosion resistance, etc., they can be used in fields such as wind power generation and aircraft engines. Defects in blade castings will affect the friction and aerodynamic properties of the blades and increase the friction resistance between the blades and the air. In order to ensure the normal operation and work efficiency of related equipment, it is necessary to conduct quality inspections on blade castings.
[0003] The casting inspection methods provided in the prior art mostly perform defect detection by collecting casting images. For example, the patent application document with publication number CN111429454A discloses an intelligent casting non-destructive inspection system and method. The application autonomously learns the corresponding defect rules from the existing casting defect images, discovers the defects in the casting image to be inspected, and the quality assessment module conducts quality assessment on the defects in the casting and generates a quality report. The model management module automatically updates the digital radiographic image of the casting non-destructive inspection system, thereby achieving the purpose of intelligently detecting defects in castings and automatically updating digital radiographic images.
[0004] The above-mentioned prior art detects casting defects by learning the laws of casting defects. However, there are usually other influencing factors in the casting image besides the defective part, such as dust, etc., which causes the grayscale expression of some areas in the casting image to be different from the defect, affecting the accuracy of defect learning, and the obtained defect detection results are less accurate.
[0005] Based on this, how to accurately obtain blade casting inspection results is a problem that technical personnel in this field need to solve urgently. Summary of the invention
[0006] In order to solve the technical problem of how to accurately obtain blade casting detection results, the present invention provides a blade casting intelligent detection method and system.
[0007] In a first aspect, the present invention provides a blade casting intelligent detection method, which adopts the following technical solution:
[0008] A blade casting intelligent detection method comprises the following steps:
[0009] The local range of the pixel point is constructed with the pixel point in the grayscale image of the red channel of the blade casting as the center, and the mutation of the pixel point is obtained by the grayscale difference between the pixel point and the corresponding 8-neighborhood. The mutation in the local range of the pixel point is divided into suspected dust points using the Otsu threshold method, and the local density of each suspected dust point is obtained by the Euclidean distance between the suspected dust points.
[0010] ; is the interference degree of the pixel in the red channel grayscale image, is the mutation of the pixel, is the number of suspected dust points in the local range of the pixel, is the local density of the jth suspected dust point in the local range of the pixel; obtain the interference degree of the pixel in the green channel grayscale image and the blue channel grayscale image, take the negative number of the interference degree of the pixel in each channel grayscale image as the exponent of the exponential function with e as the base, and obtain the weight of each channel grayscale image; the weighted sum of the grayscale value of the pixel in the channel grayscale image is recorded as the target grayscale value of the pixel; after graying the blade casting image according to the target grayscale value of each pixel, the Otsu threshold method is used for segmentation to obtain the blade casting image detection result.
[0011] When obtaining the blade casting inspection result, the present invention segments the blade casting image by the Otsu threshold method, and can accurately segment the defect area in the blade casting image, thereby obtaining the blade casting inspection result. In this process, the present invention takes into account that the grayscale characteristics of dust in the blade casting are relatively close to the defects, and the dust may be identified as a defect; based on this, the present invention analyzes the grayscale performance of each pixel point in the blade casting image in each channel grayscale image, and obtains the possibility that the pixel point is interfered by dust in each channel grayscale image, thereby determining the target grayscale value of the pixel point and adjusting it, reducing the influence of dust on the blade casting image after grayscale processing, so that the defect area can be accurately segmented, and the accuracy of blade casting quality inspection is effectively improved.
[0012] According to a blade casting intelligent detection method provided by the present invention, the local range of the pixel point is constructed with the pixel point in the red channel grayscale image of the blade casting as the center, and the method also includes: collecting the RGB image of the blade casting for preprocessing to obtain the red channel grayscale image, green channel grayscale image and blue channel grayscale image of the blade casting image.
[0013] The present invention takes into account the possible presence of noise interference and other factors in the originally collected RGB image of the blade casting, and therefore improves the overall quality of the image through preprocessing to facilitate subsequent data processing.
[0014] According to a blade casting intelligent detection method provided by the present invention, the mutation of the pixel point is obtained through the grayscale difference between the pixel point and the corresponding 8-neighborhood, including: normalizing the absolute value of the difference between the grayscale value of the pixel point and the grayscale mean within the 8-neighborhood of the pixel point to obtain the mutation of the pixel point.
[0015] The present invention takes into account that the grayscale performance of dust pixels is more prominent than that of other pixels in its neighborhood, and therefore the mutation of the pixel is accurately obtained by calculating the difference between the grayscale mean of the pixel and its neighborhood.
[0016] According to a blade casting intelligent detection method provided by the present invention, the mutation in the local range of pixel points is divided using the Otsu threshold method to obtain suspected dust points, including: taking any pixel point as a target pixel point, and taking the mutation of the pixel points in the local range of the target pixel point as a segmentation point to segment the local range of the target pixel point to obtain a suspected dust point class and a normal class; calculating the inter-class variance of the suspected dust point class and the normal class, taking the suspected dust point class and the normal class corresponding to the maximum value of the inter-class variance as the target classification result, and taking the pixel points in the suspected dust point class of the target classification result as suspected dust points.
[0017] The present invention takes into account that dust pixels not only have mutation but also present a discrete distribution. Therefore, the present invention can accurately obtain the suspected dust point class with large mutation in the local range by segmenting the mutation of pixel points in the local range, so as to prepare for the subsequent analysis of the discrete distribution of the suspected dust points.
[0018] According to a blade casting intelligent detection method provided by the present invention, the local density of each suspected dust point is obtained by the Euclidean distance between the suspected dust points, including: sorting the Euclidean distances between a suspected dust point and other suspected dust points in the local range of the pixel point in ascending order, obtaining a preset number of Euclidean distance means in the ascending sorting results; and using the negative of the Euclidean distance mean as the exponent of an exponential function with e as the base to obtain the local density of the suspected dust point.
[0019] According to a blade casting intelligent detection method provided by the present invention, the blade casting image detection result is obtained by segmenting using the Otsu threshold method, including: recording the blade casting image after grayscale processing as a target image, and using the Otsu threshold method to segment the target image into a defect area and a background area; if the defect area of the target image is larger than a preset threshold, the blade casting image detection result is abnormal; otherwise, the blade casting image detection result is normal.
[0020] According to a blade casting intelligent detection method provided by the present invention, the blade casting image detection result is obtained, and then the method further comprises: in response to the blade casting image detection result being abnormal, generating a report on the defective area and the abnormal detection result.
[0021] The present invention takes into account that the quality of blade castings plays an important role in the normal use of related equipment. Therefore, by generating reports for each batch of blade castings and corresponding test results, it is convenient for staff to conduct quality analysis and improvement.
[0022] In a second aspect, the present invention provides a blade casting intelligent detection system, which adopts the following technical solution:
[0023] A blade casting intelligent detection system comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned blade casting intelligent detection method is implemented.
[0024] By adopting the above technical solution, the above-mentioned blade casting intelligent detection method 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 for easy use.
[0025] The present invention has the following technical effects:
[0026] Based on the above technical scheme, the present invention provides a blade casting intelligent detection method and system. When obtaining the blade casting detection result, the blade casting image is segmented by the Otsu threshold method, and the defect area in the blade casting image can be accurately segmented, thereby obtaining the blade casting detection result. In this process, the present invention takes into account that the grayscale characteristics of dust in the blade casting are relatively close to the defects, and the dust may be identified as a defect; based on this, the present invention analyzes the grayscale performance of each pixel in the blade casting image in each channel grayscale image, and obtains the possibility that the pixel is disturbed by dust in each channel grayscale image, thereby determining the target grayscale value of the pixel and adjusting it, reducing the influence of dust on the blade casting image after grayscale processing, so that the defect area can be accurately segmented, and the accuracy of blade casting quality detection is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.
[0028] Figure 1 A schematic diagram of a flow chart of a blade casting intelligent detection method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0030] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.
[0031] Blade castings are metal molded objects obtained by various casting methods. Due to their high strength, high heat resistance, corrosion resistance, etc., they can be used in fields such as wind power generation and aircraft engines. Defects in blade castings will affect the friction and aerodynamic properties of the blades and increase the friction resistance between the blades and the air. In order to ensure the normal operation and work efficiency of related equipment, it is necessary to conduct quality inspections on blade castings.
[0032] The Otsu threshold method is an image segmentation algorithm that divides the image into two parts by taking the value of each pixel as a possible segmentation threshold. The segmentation point corresponding to the maximum inter-class variance is the optimal threshold, and the segmentation result corresponding to the optimal threshold is the final segmentation result. Therefore, the Otsu threshold method can be used to perform threshold segmentation on the casting image to obtain the blade casting detection result.
[0033] However, there are usually other influencing factors in the blade casting image besides the defective part, such as dust, which causes the grayscale expression of some areas in the blade casting image to be different from the defect. Over-segmentation or under-segmentation may occur during the segmentation process of the Otsu threshold method, and the obtained defect detection results are less accurate.
[0034] Based on this, an embodiment of the present invention discloses an intelligent detection method for blade castings. This method grayscales pixel points according to the degree to which the pixel points are interfered by dust in different channels, thereby reducing the influence of dust on the blade casting image after grayscale processing, so that the blade casting image after grayscale processing can accurately reflect the surface characteristics of the blade casting, thereby accurately obtaining the blade casting detection results.
[0035] For details, please see Figure 1 As shown, Figure 1 A schematic flow chart of a blade casting intelligent detection method provided in an embodiment of the present invention specifically includes the following steps.
[0036] S1: Obtain the red channel grayscale image, green channel grayscale image and blue channel grayscale image of the blade casting.
[0037] For example, in an embodiment of the present invention, obtaining a red channel grayscale image, a green channel grayscale image, and a blue channel grayscale image of a blade casting includes: collecting an RGB image of the blade casting and performing preprocessing to obtain a red channel grayscale image, a green channel grayscale image, and a blue channel grayscale image of the blade casting.
[0038] Among them, the preprocessing can be blade casting RGB image enhancement, filtering and denoising, etc., which can be specifically set according to actual needs, and the embodiment of the present invention does not impose too many restrictions here.
[0039] It should be noted that the red channel grayscale image, green channel grayscale image and blue channel grayscale image in the blade casting image can be used to describe the image color information, wherein the red channel grayscale image is the grayscale representation of the red component in the blade casting image, the green channel grayscale image is the grayscale representation of the green component in the blade casting image, and the blue channel grayscale image is the grayscale representation of the blue component in the blade casting image. The composition and size of dust particles are of various types, and their performance in the red, green and blue channel grayscale images may also be different. Some dust points may appear as bright areas in one channel and dark areas in other channels.
[0040] Based on this, the embodiment of the present invention analyzes the grayscale features of each pixel in the red channel grayscale image, the green channel grayscale image and the blue channel grayscale image to obtain the possibility of the pixel being interfered with by grayscale in each channel, thereby accurately obtaining the target grayscale value of each pixel and performing grayscale processing.
[0041] For ease of understanding, the embodiment of the present invention is described by taking the processing of the red channel grayscale image of a blade casting as an example, but it does not mean that the embodiment of the present invention is limited to this.
[0042] S2: The mutation of the pixel is obtained by the grayscale difference between the pixel and the corresponding 8-neighborhood.
[0043] It should be noted that during the shooting process of the blade casting, the pixels in the collected blade casting image may be interfered by dust particles in the environment or on the blade surface. The grayscale features of the pixels interfered by dust particles are quite different from those in the neighborhood, and the grayscale changes caused by defects in the blade casting usually appear as clusters.
[0044] Based on this, the embodiment of the present invention obtains the mutation of the pixel by analyzing the grayscale prominence of the pixel compared with other pixels in its 8-neighborhood. The greater the prominence, the higher the possibility that the pixel is a dust pixel.
[0045] By way of example, in an embodiment of the present invention, the mutation of the pixel point is obtained by the grayscale difference between the pixel point and the corresponding 8-neighborhood, including: normalizing the absolute value of the difference between the grayscale value of the pixel point and the grayscale mean in the 8-neighborhood of the pixel point to obtain the mutation of the pixel point.
[0046] It is understandable that the number of pixels in the 8-neighborhood of a pixel is usually 8. However, for some pixels at the edge, the number of pixels in the 8-neighborhood is less than 8. For such pixels, the calculation is based on the actual number of pixels collected.
[0047] For example, the mutation of a pixel point is calculated, and the specific relationship can be seen in the following formula:
[0048] ;
[0049] is the mutation of the pixel point, is the gray value of the pixel, is the number of pixels in the 8-neighborhood of the pixel, is the gray value of the i-th pixel in the 8-neighborhood of the pixel, is the hyperbolic tangent function, is the absolute value symbol.
[0050] In the above formula, the hyperbolic tangent function is used to normalize the absolute value of the difference between the grayscale value of the pixel point and the grayscale mean value in the 8-neighborhood of the pixel point.
[0051] Indicates the grayscale difference between the current pixel and the corresponding 8-neighborhood. The larger the value, the greater the difference between the grayscale value of the current pixel and the grayscale mean of the pixels in its 8-neighborhood, and the greater the possibility that the current pixel is disturbed by dust.
[0052] It should be noted that, based on the above steps, the mutation of each pixel can be obtained by analyzing the grayscale difference between each pixel and its neighborhood. However, the mutation of the pixel may also be caused by defects. The defective part is usually concentrated, while dust is usually distributed discretely in a local range. Based on this, the embodiment of the present invention can also obtain suspected dust points that may be dust in the local range by analyzing the mutation of each pixel in the local range of the current pixel, and obtain the possible degree of interference of the current pixel by dust based on the mutation of the pixel and the distribution of the suspected dust points in the local range of the pixel, that is, continue to execute the following steps.
[0053] S3: The local range of the pixel point is constructed with the pixel point in the grayscale image of the red channel of the blade casting as the center. The mutation in the local range of the pixel point is divided by the Otsu threshold method to obtain suspected dust points. The local density of each suspected dust point is obtained by the Euclidean distance between the suspected dust points.
[0054] The size of the local range is , The value can be set to 5; The value of can be set according to actual needs, and the embodiment of the present invention does not impose too many restrictions on this. The local range of the current pixel point finally obtained at least includes the current pixel point itself.
[0055] By way of example, in an embodiment of the present invention, the Otsu threshold method is used to divide the mutation in a local range of pixels to obtain suspected dust points, including: taking any pixel as a target pixel, and taking the mutation of pixels in a local range of the target pixel as a segmentation point to segment the local range of the target pixel to obtain a suspected dust point class and a normal class; calculating the inter-class variance of the suspected dust point class and the normal class, taking the suspected dust point class and the normal class corresponding to the maximum inter-class variance as the target classification result, and taking the pixel in the suspected dust point class of the target classification result as the suspected dust point.
[0056] Among them, the mutation of pixels in the local range of target pixels is used as a segmentation point to segment the local range of target pixels. When the suspected dust point class and the normal class are obtained, the segmentation point divides the pixels in the local range of target pixels into two categories, and the class with higher mutation is recorded as the suspected dust point class, and the class with lower mutation is recorded as the normal class.
[0057] It can be understood that the pixel points in the suspected dust point class corresponding to the target classification result are suspected dust points, and the pixel points in the normal class are normal pixels.
[0058] It should be noted that, based on the above steps, the suspected dust points in the local range of each pixel can be obtained, and by analyzing the Euclidean distance between the suspected dust points, the distribution of the suspected dust points can be obtained, thereby obtaining the discreteness of the suspected dust points in the local range of the pixel.
[0059] By way of example, in an embodiment of the present invention, the local density of each suspected dust point is obtained by using the Euclidean distance between the suspected dust points, including: sorting the Euclidean distances between a suspected dust point and other suspected dust points in a local range of a pixel point in ascending order, and obtaining a preset number of mean values of the Euclidean distances in the ascending sorting results; and using the negative of the mean value of the Euclidean distance as the exponent of an exponential function with e as the base to obtain the local density of the suspected dust point.
[0060] Among them, the preset number can be set to 2; the preset number can be set specifically according to actual needs, and the embodiment of the present invention does not impose too many restrictions on this.
[0061] It can be understood that the number of Euclidean distances obtained in the ascending sorting result of the Euclidean distances between the current suspected dust point and other suspected dust points in the local range of the pixel point is the number of other suspected dust points whose Euclidean distances are close to the current suspected dust point. The closer the Euclidean distance between the current suspected dust point and other suspected dust points is in the ascending sorting result, the closer the distance between the other suspected dust points and the current suspected dust point is.
[0062] The larger the mean value of the Euclidean distance, the larger the Euclidean distance between the current suspected dust point and other suspected dust points in the local range of the pixel point, the smaller the local density of the corresponding current suspected dust point will be, the greater the degree of discreteness, the higher the possibility that the suspected dust point is dust, and the lower the possibility that it is a defect.
[0063] After obtaining the mutation of each pixel and the local density of each suspected dust point in the local range of the pixel based on the above steps, the degree of dust interference of each pixel in the red channel grayscale image can be accurately obtained, that is, continue to perform the following steps.
[0064] S4: Calculate the interference degree of the pixel points in the red channel grayscale image, the green channel grayscale image and the blue channel grayscale image respectively.
[0065] For example, in an embodiment of the present invention, the interference degree of a pixel point in a red channel grayscale image is calculated, and the specific details can be referred to the following relationship:
[0066] ;
[0067] is the interference degree of the pixel in the red channel grayscale image, is the mutation of the pixel, is the number of suspected dust points in the local range of the pixel, is the local density of the jth suspected dust point in the local range of the pixel.
[0068] In the above formula, It is the local density mean of the suspected dust points in the local range of the current pixel. The smaller the value, the more discrete the suspected dust points in the local range of the pixel are. The greater the degree of dust interference on the current pixel, the higher the possibility of dust.
[0069] In summary, the higher the mutation of the current pixel and the stronger the discreteness of the suspected dust points in the local range, the greater the possibility that the current pixel is dust, and the greater the interference degree of the current pixel in the red channel grayscale image.
[0070] Similarly, based on the above steps S2 and S3, the mutation and discreteness of the current pixel in the green channel grayscale image and the blue channel grayscale image can be obtained respectively. The mutation and discreteness of the current pixel in the green channel grayscale image and the blue channel grayscale image are substituted into the above formulas respectively to obtain the interference degree of the current pixel in the green channel grayscale image and the blue channel grayscale image. For details, please refer to the above steps, and the embodiments of the present invention will not be described in detail here.
[0071] After obtaining the interference degree of each pixel point in the red channel grayscale image, the green channel grayscale image and the blue channel grayscale image of the blade casting based on the above steps, continue to perform the following steps.
[0072] S5: Obtain the interference degree of the pixel in the green channel grayscale image and the blue channel grayscale image, calculate the weight of the pixel in each channel grayscale image, and record the weighted sum of the weight of each channel grayscale image to the grayscale value of the pixel in the channel grayscale image as the target grayscale value of the pixel.
[0073] It should be noted that, based on the above steps, the interference degree of pixels in the red channel grayscale image, green channel grayscale image and blue channel grayscale image of the blade casting can be obtained respectively, and the corresponding weights are set based on the interference degree of pixels in different channels. For channels with greater interference from dust, smaller weights are set to reduce the impact on the grayscale processing of the blade casting image, thereby improving the accuracy of Otsu threshold segmentation.
[0074] For example, in an embodiment of the present invention, when calculating the weight of a pixel point in a grayscale image of each channel, the negative number of the interference degree of the pixel point in the grayscale image of each channel can be used as the exponent of an exponential function with e as the base to obtain the weight of the grayscale image of each channel.
[0075] Based on the above steps, the weight of the current pixel in each channel grayscale image can be obtained. In order to avoid the influence of the distribution difference of pixels in different channel grayscale images on the calculation of the target grayscale value, the weight value can also be normalized to accurately obtain the target grayscale value of the pixel.
[0076] For example, in the embodiment of the present invention, the target grayscale value of a pixel is calculated, and the specific relationship can be as follows:
[0077] ;
[0078] is the target grayscale value of the pixel, is the weight of the pixel in the red channel grayscale image, is the weight of the pixel in the green channel grayscale image, is the weight of the pixel in the blue channel grayscale image, is the grayscale value of the pixel in the red channel grayscale image, is the grayscale value of the pixel in the green channel grayscale image, is the grayscale value of the pixel in the blue channel grayscale image.
[0079] In the above formula, Used to normalize the weights of pixels in each channel grayscale image.
[0080] After obtaining the target grayscale value of each pixel point based on the above steps, each pixel point in the blade casting image can be adjusted to the target grayscale value, thereby accurately obtaining the blade casting image detection result.
[0081] S6: After graying the blade casting image according to the target gray value of each pixel point, the blade casting image is segmented using the Otsu threshold method to obtain the blade casting image detection result.
[0082] It should be noted that after analyzing the degree of dust interference on each pixel in each channel grayscale image based on the above steps to obtain the target grayscale value of each pixel, the grayscale value of each pixel in the blade casting image can be adjusted to the target grayscale value, thereby reducing the influence of dust on the blade casting image after grayscale processing.
[0083] For example, in an embodiment of the present invention, the Otsu threshold method is used for segmentation to obtain a blade casting image detection result, including: recording the blade casting image after grayscale processing as a target image, and using the Otsu threshold method to segment the target image into a defect area and a background area.
[0084] It should be noted that blade castings are usually silver in color with a high grayscale value, so the grayscale value of defects in the blade casting image is low, and the grayscale value of the normal background area is high.
[0085] For example, the target image is segmented into a defect area and a background area using the Otsu threshold method, including: taking the target grayscale values of all pixels in the target image as possible segmentation thresholds, traversing each possible segmentation threshold to segment the target image into two categories; dividing the pixels greater than or equal to the segmentation threshold into an initial background area, dividing the pixels less than the segmentation threshold into an initial defect area, and calculating the inter-class variance between the initial background area and the initial defect area; taking the initial background area and the initial defect area corresponding to the maximum inter-class variance as the background area and the defect area of the target image.
[0086] After the background area and the defect area in the target image of the blade casting are obtained based on the above steps, the blade casting detection result can be obtained based on the size of the defect area in the target image.
[0087] For example, in an embodiment of the present invention, if the defect area of the target image is larger than a preset threshold, the blade casting image detection result is abnormal; otherwise, the blade casting image detection result is normal.
[0088] The preset threshold may be set to 0.03; the preset threshold may be set specifically according to actual needs, and the embodiment of the present invention does not impose too many restrictions on this.
[0089] It can be understood that if the defect area of the target image is larger than the preset threshold, it means that the defect area in the blade casting image is large and the quality of the blade casting is poor. A report can be generated for the blade casting and the corresponding test results to facilitate subsequent analysis by the staff.
[0090] For example, in an embodiment of the present invention, after obtaining the blade casting image detection result, the method further includes: in response to the blade casting image detection result being abnormal, generating a report of the defective area and the abnormal detection result.
[0091] It can be seen that in the embodiment of the present invention, when obtaining the blade casting detection result, the local range of the pixel point can be constructed with the pixel point in the grayscale image of the red channel of the blade casting as the center, and the mutation of the pixel point is obtained by the grayscale difference between the pixel point and the corresponding 8 neighborhoods; the mutation in the local range of the pixel point is divided by the Otsu threshold method to obtain suspected dust points, and the local density of each suspected dust point is obtained by the Euclidean distance between the suspected dust points;
[0092] ; is the interference degree of the pixel in the red channel grayscale image, is the mutation of the pixel, is the number of suspected dust points in the local range of the pixel, is the local density of the jth suspected dust point in the local range of the pixel; obtain the interference degree of the pixel in the green channel grayscale image and the blue channel grayscale image, take the negative number of the interference degree of the pixel in each channel grayscale image as the exponent of the exponential function with e as the base, and obtain the weight of each channel grayscale image; the weighted sum of the grayscale value of the pixel in the channel grayscale image is recorded as the target grayscale value of the pixel; after graying the blade casting image according to the target grayscale value of each pixel, the Otsu threshold method is used for segmentation to obtain the blade casting image detection result.
[0093] In this way, the embodiment of the present invention can accurately segment the defective area in the blade casting image by using the Otsu threshold method to segment the blade casting image, thereby obtaining the blade casting detection result. In this process, the embodiment of the present invention takes into account that the grayscale characteristics of dust in the blade casting are relatively close to those of the defect, and the dust may be identified as a defect; based on this, the embodiment of the present invention analyzes the grayscale performance of each pixel in the blade casting image in each channel grayscale image, and obtains the possibility that the pixel is disturbed by dust in each channel grayscale image, thereby determining the target grayscale value of the pixel and adjusting it, reducing the influence of dust on the blade casting image after grayscale processing, so that the defective area can be accurately segmented, and the accuracy of blade casting quality detection is effectively improved.
[0094] An embodiment of the present invention further discloses a blade casting intelligent detection system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a blade casting intelligent detection method provided by the present invention is implemented.
[0095] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0096] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM, a dynamic random access memory DRAM, a static random access memory SRAM, an enhanced dynamic random access memory EDRAM, a high bandwidth memory HBM, a hybrid memory cube HMC, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.
[0097] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
[0098] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A blade casting intelligent detection method, characterized in that: include: The local range of the pixel point is constructed with the pixel point in the grayscale image of the red channel of the blade casting as the center, and the mutation of the pixel point is obtained through the grayscale difference between the pixel point and the corresponding 8-neighborhood. The mutation in the local range of the pixel point is divided by using the Otsu threshold method to obtain suspected dust points, including: taking any pixel point as the target pixel point, taking the mutation in the local range of the target pixel point as the segmentation point to segment the local range of the target pixel point, and obtaining a suspected dust point class and a normal class; calculating the inter-class variance of the suspected dust point class and the normal class, taking the suspected dust point class and the normal class corresponding to the maximum value of the inter-class variance as the target classification result, and taking the pixel point in the suspected dust point class of the target classification result as the suspected dust point; The local density of each suspected dust point is obtained by the Euclidean distance between the suspected dust points; ; is the interference degree of the pixel in the red channel grayscale image, is the mutation of the pixel, is the number of suspected dust points in the local range of the pixel, is the local density of the jth suspected dust point in the local range of the pixel; Obtain the interference degree of the pixel in the green channel grayscale image and the blue channel grayscale image, use the negative number of the interference degree of the pixel in each channel grayscale image as the exponent of the exponential function with e as the base, and obtain the weight of each channel grayscale image; The weighted sum of the grayscale values of the pixels in the channel grayscale images is recorded as the target grayscale value of the pixel; After the blade casting image is grayed out according to the target grayscale value of each pixel, the Otsu threshold method is used for segmentation to obtain the blade casting image detection result.
2. The intelligent detection method for blade castings according to claim 1 is characterized in that: The local range of the pixel point is constructed with the pixel point in the grayscale image of the red channel of the blade casting as the center, and the method also includes: The RGB image of the blade casting is collected and preprocessed to obtain the red channel grayscale image, green channel grayscale image and blue channel grayscale image of the blade casting image.
3. The intelligent detection method for blade castings according to claim 1 is characterized in that: The step of obtaining the mutation of the pixel point by using the grayscale difference between the pixel point and the corresponding 8-neighborhood includes: The absolute value of the difference between the gray value of the pixel and the gray mean in the 8-neighborhood of the pixel is normalized to obtain the mutation of the pixel.
4. The intelligent detection method for blade castings according to claim 1 is characterized in that: The method of obtaining the local density of each suspected dust point by using the Euclidean distance between the suspected dust points includes: The Euclidean distances between a suspected dust point and other suspected dust points in the local range of the pixel point are sorted in ascending order, and the mean values of the Euclidean distances of a preset number are obtained from the ascending sorting results; the negative number of the mean Euclidean distance is used as the exponent of an exponential function with e as the base to obtain the local density of the suspected dust point.
5. The intelligent detection method for blade castings according to claim 1, characterized in that: The Otsu threshold method is used for segmentation to obtain the blade casting image detection result, including: The blade casting image after grayscale processing is recorded as the target image, and the target image is segmented into a defect area and a background area using the Otsu threshold method; if the defect area of the target image is larger than the preset threshold, the blade casting image detection result is abnormal; otherwise, the blade casting image detection result is normal.
6. The intelligent detection method for blade castings according to claim 5 is characterized in that: The method further comprises: obtaining the blade casting image detection result; and then: In response to the blade casting image detection result being abnormal, a report is generated of the defective area and the abnormal detection result.
7. A blade casting intelligent detection system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a blade casting intelligent detection method according to any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Intelligent casting nondestructive testing system and method
CN111429454A
Visual inspection method for production quality of anti-slip gasket
CN117455801A
Crushing and grinding detection method and device for quartz sand
CN118115497A