Method and system for dimension detection of aircraft engine parts based on machine vision
Through a machine vision-based aircraft engine component size detection method, the regions are divided by gradient amplitude difference, the superpixel block and seed points are determined, the comprehensive distance is calculated and the superpixel blocks are connected, and the problems of low detection accuracy and efficiency in the prior art are solved, achieving high accuracy and high efficiency detection.
Patent Information
- Application Number
- CN202510139133.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2045-02-08
AI Technical Summary
In the prior art, when performing dimension detection of aircraft engine components, the accuracy is poor and the efficiency is low. The traditional SLIC algorithm uniformly divides the area on the grayscale image, resulting in large edge extraction errors, and the need to build a three-dimensional model, resulting in low detection efficiency.
A method of detecting components of aircraft engines based on machine vision is adopted. By acquiring grayscale images and dividing them into multiple regions, calculating the gradient amplitude difference, further dividing the areas with large gradient amplitude differences, determining the superpixel block and seed points, calculating the comprehensive distance between pixel points and seed points, and connecting the superpixel blocks according to the color difference to calculate the component size.
It improves the accuracy and efficiency of aircraft engine component size detection, reduces edge extraction errors, and eliminates the need to build a three-dimensional model, which improves detection efficiency.
Smart Images

Figure CN119579670B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more specifically, to a method and system for detecting the dimensions of aircraft engine parts based on machine vision. Background Art
[0002] The size detection of aircraft engine parts is one of the key links to ensure the performance and safety of aircraft engines. With the continuous development of aviation technology and the improvement of precision requirements, traditional manual detection methods can no longer meet the needs of efficiency and accuracy. Machine vision technology has become an important means of size detection of aircraft engine parts due to its high precision, high efficiency and non-contact characteristics. In the prior art, when machine vision technology is used to detect the size of aircraft engine parts, the usual practice is: first, an industrial camera is used to capture high-definition images of aircraft engine parts, and then the SLIC algorithm is used to perform super-pixel segmentation on the aircraft engine parts image, so as to locate the boundaries of the parts based on the segmentation results, and detect the size of the parts based on the located boundaries. However, the traditional SLIC algorithm evenly divides the area on the grayscale image and initializes the cluster center, which will cause large edge extraction errors of parts.
[0003] A Chinese patent application document with application publication number CN114119495A discloses a method for detecting the size of battery components. When using this method to detect the size of components, it is first necessary to collect multiple photos of the components to be detected in different directions or videos of the components to be detected as a digital image signal set, and then perform three-dimensional modeling based on the digital image signal set to obtain a three-dimensional image of the components to be detected, and finally obtain the size of the components to be detected based on the three-dimensional image. However, this method requires taking a large number of pictures and building a three-dimensional model, resulting in low size detection efficiency. Summary of the invention
[0004] In order to solve the technical problems of poor accuracy and low efficiency in dimensional inspection of aircraft engine parts in the prior art, the present invention provides solutions in the following aspects.
[0005] In a first aspect, the present invention provides a method for detecting the size of aircraft engine parts based on machine vision, comprising: obtaining a grayscale image of an aircraft engine part; dividing the grayscale image into a plurality of first regions, and obtaining the gradient amplitude difference of pixel points in each first region; dividing the first region whose gradient amplitude difference is greater than a preset difference threshold into a plurality of second regions; using the undivided first region and each second region as an initial superpixel block; and determining the seed point of each initial superpixel block;
[0006] The probability that each pixel is an edge pixel is obtained, and the comprehensive distance from the pixel to each seed point is calculated based on the probability, and the superpixel block corresponding to the minimum comprehensive distance is selected as the superpixel block of the pixel. The calculation expression of the comprehensive distance is:
[0007] ;
[0008] Where D i,j , d c and d s Respectively represent the comprehensive distance, color distance and spatial distance from pixel i to seed point j, E i represents the probability that pixel i is an edge pixel, B i Represents the grayscale gradient amplitude of pixel i, is the average value of the gray gradient amplitude in the neighborhood of seed point j;
[0009] The color difference between adjacent super pixel blocks is obtained, the super pixel blocks whose difference is less than a preset difference threshold are connected together, and the component size is calculated based on the connected super pixel blocks.
[0010] The traditional SLIC algorithm evenly divides the region on the grayscale image and initializes the cluster center, which will cause the edge extraction error of the parts to be large. After the method of the present invention preliminarily divides the region, further divides the first region with a large difference in gradient amplitude to increase the number of superpixel blocks in the region, thereby updating the preliminarily divided superpixel blocks and seed points, thereby effectively improving the accuracy of superpixel block division, and then improving the edge division accuracy; in addition, when calculating the comprehensive distance from the pixel point to each seed point, the method of the present invention adaptively adjusts the weight of the color distance according to the probability that the pixel point is an edge pixel point, and comprehensively considers the difference in color characteristics between the pixel point and the seed point and the difference in spatial position between the pixel point and the seed point, so that the calculated comprehensive distance between the pixel point and the seed point is more accurate, thereby more accurately characterizing the probability size of the superpixel block that the pixel point does not belong to the seed point, thereby accurately dividing the pixel point into the corresponding superpixel block.
[0011] When calculating the size of parts, the color difference between pixels on the same part is considered to be close, and the super pixel blocks with similar color difference and adjacent to each other are connected together, and the size of the parts is calculated based on the connected super pixel blocks, thereby further improving the accuracy of the parts size detection results; in addition, the method of the present invention does not need to build a three-dimensional model when detecting parts, and the detection efficiency is high. Therefore, the method of the present invention can effectively improve the accuracy and efficiency of the size detection of aircraft engine parts.
[0012] Preferably, obtaining a grayscale image of an aircraft engine component includes:
[0013] An industrial camera is used to capture an image of an aircraft engine component and grayscale the image to obtain a first grayscale image;
[0014] Gaussian filtering is used to denoise the first grayscale image, thereby obtaining a grayscale image of aircraft engine parts.
[0015] By using Gaussian filtering to denoise the first grayscale image, the first grayscale image can be effectively smoothed to remove high-frequency noise in the image, thereby improving the quality and details of the grayscale image of the aircraft engine parts.
[0016] Preferably, the preset difference threshold value is 50.
[0017] Preferably, the calculation expression of the gradient amplitude difference of the pixel points in the first area is:
[0018] ;
[0019] In the formula, represents the gradient amplitude difference of the first region, N represents the number of pixels in the first region, Indicates that the first region The gradient amplitude of each pixel is is the average gradient magnitude of the entire image.
[0020] When calculating the gradient amplitude difference of pixel points in the first area, the present invention first calculates the difference between the gradient amplitude of each pixel point in the first area and the gradient amplitude average value of the entire image, and then averages the calculated differences, so that the gradient amplitude difference of the pixel points in the first area can be calculated more accurately.
[0021] Preferably, the determination of the seed points of each initial superpixel block includes: if an initial superpixel block is a first area, the central pixel point of the initial superpixel block is used as the corresponding seed point; if an initial superpixel block is a second area, the pixel point with the smallest gradient amplitude in the neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point.
[0022] Preferably, if an initial superpixel block is a second region with an even number of columns, the pixel point with the smallest gradient amplitude within a 2×2 neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point; if an initial superpixel block is a second region with an odd number of columns, the pixel point with the smallest gradient amplitude within a 3×3 neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point.
[0023] Preferably, for a certain pixel point, the calculation expression of the probability that it is an edge pixel point is:
[0024] ;
[0025] In the formula, E Indicates the probability that the pixel is an edge pixel, B a Indicates the number of pixels in the 3×3 neighborhood centered on the pixel. The gray value gradient amplitude of each pixel, Indicates that the pixel is the center The average value of the grayscale gradient amplitude of the pixels in the neighborhood, C a Indicates the number of pixels in the 3×3 neighborhood centered on the pixel. The color gradient amplitude of each pixel, Indicates that the pixel is the center The color gradient amplitude average value in the neighborhood, where the color gradient amplitude is used to characterize the difference between a pixel and its adjacent pixels in the x-direction and the y-direction in the color channel.
[0026] Indicates the grayscale difference between pixels in the neighborhood of a pixel. The larger the value, the greater the change in the grayscale value around the pixel, and the greater the possibility that the pixel is an edge pixel. Represents the color characteristics between pixels in the neighborhood of a pixel. The larger the value, the greater the color change around the pixel, and the greater the possibility that the pixel is an edge pixel. The method of the present invention can more accurately calculate the probability that a pixel is an edge pixel.
[0027] Preferably, the calculation expression of the color distance is:
[0028] ;
[0029] Where, d c Represents the color distance from pixel i to seed point j, represents the LAB channel value of seed point j, Indicates the LAB channel value of pixel i.
[0030] Preferably, the calculation expression of the component size is:
[0031] ;
[0032] In the formula, Indicates the size of the component, l p It represents the length of an edge of the connected super pixel block. The length of the edge is the number of pixels on the edge. Indicates the width of a pixel. Indicates the distance from the aircraft engine parts to the camera lens, Indicates the focal length of the camera.
[0033] When calculating the size of components, the present invention not only takes into account the length of a certain edge of the connected superpixel block, but also further takes into account the width of a pixel in the superpixel block, the distance from the aircraft engine component to the camera lens, and the focal length of the camera, thereby further improving the accuracy of the component size detection results.
[0034] In a second aspect, the present invention provides an aircraft engine component size detection system based on machine vision, comprising a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the aircraft engine component size detection method based on machine vision of the present invention is implemented.
[0035] In summary, the beneficial effect of the present invention is that the aircraft engine component size detection method based on machine vision of the present invention can effectively improve the accuracy and efficiency of aircraft engine component size detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, 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-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0037] Figure 1 is a flow chart schematically showing a method for detecting dimensions of aircraft engine parts based on machine vision according to an embodiment of the present invention;
[0038] Figure 2 is a schematic diagram schematically showing a preliminary region division result according to an embodiment of the present invention;
[0039] Figure 3 is a schematic diagram schematically showing a final region division result according to an embodiment of the present invention;
[0040] Figure 4 is a schematic diagram schematically showing a 2×2 neighborhood of a central pixel point in a second area according to an embodiment of the present invention;
[0041] Figure 5 is a schematic diagram schematically showing a 3×3 neighborhood of a central pixel point in a second area according to an embodiment of the present invention;
[0042] Figure 6 The figure schematically shows the structure of an aircraft engine component size detection system based on machine vision according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] 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.
[0044] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0045] Embodiment of the method for detecting the size of aircraft engine parts based on machine vision:
[0046] like Figure 1 As shown, the method for detecting the size of aircraft engine parts based on machine vision of the present invention comprises:
[0047] S101, obtaining a grayscale image of aircraft engine parts and determining superpixel blocks and seed points, specifically: obtaining a grayscale image of aircraft engine parts; dividing the grayscale image into a plurality of first regions, and obtaining the gradient amplitude difference of pixel points in each first region; dividing the first region with a gradient amplitude difference greater than a preset difference threshold into a plurality of second regions; using the undivided first region and each second region as an initial superpixel block; and determining the seed point of each initial superpixel block.
[0048] For a grayscale image of a component containing N pixels, it is divided into K regions of the same size, and the number of pixels in each region is N / K. In this embodiment, K≥4.
[0049] When K=4, the grayscale image is equally divided into four first regions. The region division result is as follows: Figure 2 As shown; if only one of the first regions has a gradient amplitude difference greater than the preset difference threshold, the final region division result is as follows Figure 3 shown.
[0050] In this embodiment, the preset difference threshold value is 50. In other embodiments, other suitable values may be used. The grayscale image may be evenly divided according to the size of the grayscale image to obtain each first region. In this embodiment, the shape of each first region is a rectangle. The shape of each second region is also a rectangle.
[0051] The gradient amplitude difference of the pixel points in the first region refers to the difference between the gradient amplitudes of different pixel points in the first region.
[0052] Since aircraft engine parts have high dimensional accuracy requirements, the traditional SLIC algorithm evenly divides the grid on the grayscale image and initializes the cluster center, which will lead to large edge extraction errors of parts.
[0053] A region with a large difference in gradient amplitude between pixel points indicates that it may contain more part features. In this embodiment, the first region with a large difference in gradient amplitude is further divided to increase the number of superpixel blocks in the region, thereby effectively improving the accuracy of edge division. When determining the seed points of the first region and the second region, the pixel point at the center of the region can be directly used as the seed point, or other suitable methods can be used to determine the seed point.
[0054] S102, dividing each pixel into a corresponding superpixel block, specifically: obtaining the probability that each pixel is an edge pixel, and calculating the comprehensive distance from the pixel to each seed point based on the probability, and selecting the superpixel block corresponding to the minimum comprehensive distance as the superpixel block of the pixel. The calculation expression of the comprehensive distance is:
[0055] ;
[0056] Where D i,j , d c and d s Respectively represent the comprehensive distance, color distance and spatial distance from pixel i to seed point j, E i represents the probability that pixel i is an edge pixel, B i Represents the grayscale gradient amplitude of pixel i, is the average value of the grayscale gradient amplitude in the neighborhood of seed point j.
[0057] Due to the color difference between engine parts and background, as the probability of a pixel being an edge pixel increases, the weight of the color distance when calculating the distance between the pixel and the seed point should be larger so that the pixel can be accurately divided into superpixel blocks.
[0058] The larger the color distance between the pixel and the seed point, the greater the difference in color features between the pixel and the seed point, and the smaller the probability that the pixel belongs to the superpixel block of the seed point; the larger the spatial distance between the pixel and the seed point, the greater the difference in spatial position between the pixel and the seed point, and the smaller the probability that the pixel belongs to the superpixel block of the seed point; by calculating the comprehensive distance by weighted summation of the color distance and spatial distance between the pixel and the seed point, the probability that the pixel does not belong to the superpixel block of the seed point can be more accurately represented, thereby accurately dividing the pixel into the corresponding superpixel block.
[0059] Since the grayscale gradient of the boundary pixels is quite different from that of the pixels in the center of the superpixel, When , it means that the pixel may be a pixel near the boundary area or a boundary pixel. It can be regarded as a pixel near the boundary. When calculating the distance between the pixel and the seed point, the difference between the grayscale gradient of the pixel and the grayscale gradient of the pixels in the neighborhood of the seed point is further considered, so that the pixels near the boundary and the edge pixels can be more accurately divided into the corresponding superpixel blocks.
[0060] Since the grayscale gradient amplitude difference and color gradient amplitude difference between edge pixels and pixels in their neighborhood are relatively large, the probability that a pixel is an edge pixel can be calculated based on the grayscale gradient amplitude difference and color gradient amplitude difference between the pixel and pixels in its neighborhood.
[0061] S103, obtaining the connected superpixel blocks and calculating the component size, specifically: obtaining the color difference between adjacent superpixel blocks, connecting the superpixel blocks whose difference is less than a preset difference threshold, and calculating the component size based on the connected superpixel blocks.
[0062] Since superpixel blocks with similar color difference values are likely to belong to the same component, adjacent superpixel blocks with differences less than a preset difference threshold are connected together to form connected superpixel blocks, which can represent the same component. The size of the component can be calculated more accurately based on the number of edge pixels in the connected superpixel blocks.
[0063] The traditional SLIC algorithm evenly divides the grayscale image into regions and initializes the cluster centers, which will lead to large edge extraction errors of parts. After the preliminary division of the region, the method of this embodiment further divides the first region with a large difference in gradient amplitude to increase the number of superpixel blocks in the region, thereby updating the preliminary divided superpixel blocks and seed points, thereby effectively improving the accuracy of superpixel block division, and further improving the accuracy of edge division; in addition, when calculating the comprehensive distance from the pixel point to each seed point, the method of this embodiment adaptively adjusts the weight of the color distance according to the probability that the pixel point is an edge pixel point, and comprehensively considers the difference in color characteristics between the pixel point and the seed point and the difference in spatial position between the pixel point and the seed point, so that the calculated comprehensive distance between the pixel point and the seed point is more accurate, thereby more accurately characterizing the probability that the pixel point does not belong to the superpixel block of the seed point, thereby accurately dividing the pixel point into the corresponding superpixel block; when calculating the size of the component, considering that the color difference between the pixels on the same component is relatively close, the superpixel blocks with similar color difference and adjacent are connected together, and the size of the component is calculated based on the connected superpixel blocks, thereby further improving the accuracy of the component size detection result; in addition, the method of the present invention does not need to construct a three-dimensional model when detecting the component, and the detection efficiency is high. Therefore, the method of this embodiment can effectively improve the accuracy and efficiency of dimensional detection of aircraft engine parts.
[0064] In one embodiment, obtaining a grayscale image of an aircraft engine component includes:
[0065] S201, using an industrial camera to capture an image of an aircraft engine component and grayscale the image to obtain a first grayscale image;
[0066] S202: Use Gaussian filtering to denoise the first grayscale image, thereby obtaining a grayscale image of aircraft engine parts.
[0067] Gaussian filter is a linear filter. Its basic principle is to achieve the effect of smoothing the image by weighted averaging the image pixels. It uses the normal distribution function (also called Gaussian function) to calculate the weights of the pixels around each pixel, so that the pixels closer to the center have larger weights and the pixels farther away have smaller weights, thus achieving a smoother and more natural transition effect.
[0068] By using Gaussian filtering to denoise the first grayscale image, the first grayscale image can be effectively smoothed to remove high-frequency noise in the image, thereby improving the quality and details of the grayscale image of the aircraft engine parts.
[0069] In one embodiment, the calculation expression of the gradient amplitude difference of the pixel points in the first area is:
[0070] ;
[0071] In the formula, represents the gradient amplitude difference of the first region, N represents the number of pixels in the first region, Indicates that the first region The gradient amplitude of each pixel is is the average gradient magnitude of the entire image.
[0072] When calculating the gradient amplitude difference of the pixel points in the first area, this embodiment first calculates the difference between the gradient amplitude of each pixel point in the first area and the average gradient amplitude of the entire image, and then averages the calculated differences, so that the gradient amplitude difference of the pixel points in the first area can be calculated more accurately.
[0073] It can be seen from the above embodiments that when determining the seed points of the first area and the second area, the pixel point at the center of the area can be directly used as the seed point, or other suitable methods can be used to determine the seed point. In one embodiment, the determination of the seed points of each initial superpixel block includes: if an initial superpixel block is the first area, the central pixel point of the initial superpixel block is used as the corresponding seed point; if an initial superpixel block is the second area, the pixel point with the smallest gradient amplitude in the neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point.
[0074] By using the pixel point at the center of the first region as the corresponding seed point, it can be ensured that the seed points are relatively evenly distributed in space, thus avoiding the situation where the seed points are too concentrated or sparse; this distribution method helps the algorithm converge faster during the iteration process and improves the segmentation efficiency. The gradient amplitude reflects the rate of change of the pixel value in the image. The pixel value at the edge or contour changes greatly, so the gradient amplitude is also large; by using the pixel point with the smallest gradient amplitude in the neighborhood of the central pixel point of the second region as the corresponding seed point, it can avoid the seed point falling on the edge or contour of the image, thereby ensuring the accuracy of the subsequent clustering results.
[0075] In one embodiment, if an initial superpixel block is a second region with an even number of columns, the pixel point with the smallest gradient amplitude within a 2×2 neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point; if an initial superpixel block is a second region with an odd number of columns, the pixel point with the smallest gradient amplitude within a 3×3 neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point.
[0076] like Figure 4 As shown in , for the second region with 4 rows and 4 columns, the 2×2 neighborhood of the central pixel of the second region is the box area in the figure. Figure 5As shown, for the second region with 5 rows and 5 columns, the 3×3 neighborhood of the central pixel point of the second region is the box area in the figure, and A in the figure is the central pixel point of the region.
[0077] From the above embodiments, it can be known that the probability that a pixel is an edge pixel can be calculated based on the grayscale gradient amplitude difference and color gradient amplitude difference between the pixel and the pixels in its neighborhood. In one embodiment, for a certain pixel, the calculation expression for the probability that it is an edge pixel is:
[0078] ;
[0079] In the formula, E Indicates the probability that the pixel is an edge pixel, B a Indicates the number of pixels in the 3×3 neighborhood centered on the pixel. The gray value gradient amplitude of each pixel, Indicates that the pixel is the center The average value of the grayscale gradient amplitude of the pixels in the neighborhood, C a Indicates the number of pixels in the 3×3 neighborhood centered on the pixel. The color gradient amplitude of each pixel, Indicates that the pixel is the center The color gradient amplitude average value in the neighborhood, where the color gradient amplitude is used to characterize the difference between a pixel and its adjacent pixels in the x-direction and the y-direction in the color channel.
[0080] Indicates the grayscale difference between pixels in the neighborhood of a pixel. The larger the value, the greater the change in the grayscale value around the pixel, and the greater the possibility that the pixel is an edge pixel. Represents the color characteristics between pixels in the neighborhood of the pixel. The larger the value, the greater the color change around the pixel, and the greater the possibility that the pixel is an edge pixel. When the color characteristic value and grayscale characteristic value of the pixel are 0, the edge strength of the pixel is 0. The method of this embodiment can more accurately calculate the probability that the pixel is an edge pixel.
[0081] In one embodiment, the calculation expression of the color distance is:
[0082] ;
[0083] Where, d c Represents the color distance from pixel i to seed point j, represents the LAB channel value of seed point j, Indicates the LAB channel value of pixel i.
[0084] In one embodiment, the calculation expression of the spatial distance is:
[0085] ;
[0086] Where, d s yes The spatial distance from pixel i to seed point j, x j ,y j are the horizontal and vertical coordinates of the seed point j, respectively, i and i are the horizontal and vertical coordinates of pixel i respectively.
[0087] In one embodiment, the calculation expression of the component size is:
[0088] ;
[0089] In the formula, Indicates the size of the component, l p It represents the length of an edge of the connected super pixel block. The length of the edge is the number of pixels on the edge. Indicates the width of a pixel. Indicates the distance from the aircraft engine parts to the camera lens, Indicates the focal length of the camera.
[0090] In this embodiment, when using an industrial camera to photograph aircraft engine parts, The value can be set to 100. The value can be set to 50mm. The value can be set to 200mm.
[0091] After calculating the size of the component, compare the component size with the standard size of the component to detect whether the size of the component is qualified.
[0092] When calculating the size of components, this embodiment not only takes into account the length of a certain edge of the connected superpixel block, but also further takes into account the width of a pixel in the superpixel block, the distance from the aircraft engine component to the camera lens, and the focal length of the camera, thereby further improving the accuracy of the component size detection results.
[0093] Example of aircraft engine parts size detection system based on machine vision:
[0094] The present invention also provides a machine vision-based aircraft engine parts size detection system. Figure 6As shown, the aircraft engine component size detection system based on machine vision includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, a method for detecting the size of aircraft engine components based on machine vision described in the above embodiment is implemented.
[0095] The machine vision-based aircraft engine parts dimension detection system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose settings and functions are known in the art and 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 appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), 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. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0097] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0098] 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.
Claims
1. A method for detecting the size of aircraft engine parts based on machine vision, characterized in that: include: Obtaining a grayscale image of an aircraft engine component; dividing the grayscale image into a plurality of first regions, and obtaining a gradient amplitude difference of pixel points in each first region; Divide the first region whose gradient amplitude difference is greater than a preset difference threshold into a plurality of second regions; and use the undivided first region and each second region as an initial super pixel block; Determine the seed point of each initial superpixel block; The probability that each pixel is an edge pixel is obtained, and the comprehensive distance from the pixel to each seed point is calculated based on the probability, and the superpixel block corresponding to the minimum comprehensive distance is selected as the superpixel block of the pixel. The calculation expression of the comprehensive distance is: ; Where D i,j , d c and d s Respectively represent the comprehensive distance, color distance and spatial distance from pixel i to seed point j, E i represents the probability that pixel i is an edge pixel, B i Represents the grayscale gradient amplitude of pixel i, is the average value of the gray gradient amplitude in the neighborhood of seed point j; The color difference between adjacent super pixel blocks is obtained, the super pixel blocks whose difference is less than a preset difference threshold are connected together, and the component size is calculated based on the connected super pixel blocks.
2. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 1, characterized in that: Obtaining grayscale images of aircraft engine parts includes: An industrial camera is used to capture an image of an aircraft engine component and grayscale the image to obtain a first grayscale image; Gaussian filtering is used to denoise the first grayscale image, thereby obtaining a grayscale image of aircraft engine parts.
3. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 1, characterized in that: The preset difference threshold value is 50.
4. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 1, characterized in that: The calculation expression of the gradient amplitude difference of the pixel points in the first area is: ; In the formula, represents the gradient amplitude difference of the first region, N represents the number of pixels in the first region, Indicates that the first region The gradient amplitude of each pixel is is the average gradient magnitude of the entire image.
5. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 1, characterized in that: The method of determining the seed points of each initial superpixel block includes: if an initial superpixel block is a first area, the central pixel point of the initial superpixel block is used as the corresponding seed point; if an initial superpixel block is a second area, the pixel point with the smallest gradient amplitude in the neighborhood of the central pixel point of the initial superpixel block is used as the corresponding seed point.
6. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 5, characterized in that: If an initial superpixel block is a second region with an even number of columns, the pixel with the smallest gradient amplitude in the 2×2 neighborhood of the central pixel of the initial superpixel block is used as the corresponding seed point; if an initial superpixel block is a second region with an odd number of columns, the pixel with the smallest gradient amplitude in the 3×3 neighborhood of the central pixel of the initial superpixel block is used as the corresponding seed point.
7. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 1, characterized in that: For a certain pixel point, the calculation expression of the probability that it is an edge pixel point is: ; In the formula, E Indicates the probability that the pixel is an edge pixel, B a Indicates the number of pixels in the 3×3 neighborhood centered on the pixel. The gray value gradient amplitude of each pixel, Indicates that the pixel is the center The average value of the grayscale gradient amplitude of the pixels in the neighborhood, C a Indicates the number of pixels in the 3×3 neighborhood centered on the pixel. The color gradient amplitude of each pixel, Indicates that the pixel is the center The color gradient amplitude average value in the neighborhood, where the color gradient amplitude is used to characterize the difference between a pixel and its adjacent pixels in the x-direction and the y-direction in the color channel.
8. The method for detecting dimensions of aircraft engine parts based on machine vision according to claim 1, characterized in that: The calculation expression of the color distance is: ; Where, d c Represents the color distance from pixel i to seed point j, represents the LAB channel value of seed point j, Indicates the LAB channel value of pixel i.
9. The method for detecting dimensions of aircraft engine parts based on machine vision according to any one of claims 1 to 8, characterized in that: The calculation expression of the component size is: ; In the formula, Indicates the size of the component, l p It represents the length of an edge of the connected super pixel block. The length of the edge is the number of pixels on the edge. Indicates the width of a pixel. Indicates the distance from the aircraft engine parts to the camera lens, Indicates the focal length of the camera.
10. A machine vision-based aircraft engine component size detection system, comprising a memory and a processor, wherein the memory stores computer program instructions, characterized in that: When the computer program instructions are executed by the processor, the method for detecting dimensions of aircraft engine parts based on machine vision as described in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method, device and system for detecting size of storage battery component
CN114119495A
Automobile cooling fin production quality detection method and system
CN114943736A
Metal fastener corrosion area segmentation method
CN115294159A