Mechanical part quality detection method based on artificial intelligence
Through the mechanical parts quality detection method based on artificial intelligence, using adaptive image enhancement and characteristic matrix calculation, the problems of inefficiency and low accuracy of traditional detection methods are solved, and more efficient and reliable mechanical parts quality detection is achieved.
Patent Information
- Application Number
- CN202411754018.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional mechanical parts quality inspection methods rely on manual visual inspection, are inefficient and susceptible to human factors, making it difficult to guarantee the accuracy and reliability of the inspection results.
Using the mechanical parts quality detection method based on artificial intelligence, by obtaining the image of the mechanical parts to be detected, using an adaptive image enhancement model for image enhancement, calculating the grayscale values between pixel points in the image that meet the preset position relationship, generating a correlation characteristic matrix, calculating the energy index, contrast index and correlation index of the surface texture of the mechanical parts, and finally generating the mechanical parts quality detection results.
It improves the efficiency and accuracy of mechanical parts quality inspection, enhances the reliability of inspection results, and can be used for the detection of various types of mechanical parts, including micro-size, large-scale mechanical dimensions, complex mechanical structures and special-shaped tooth surfaces.
Smart Images

Figure CN119693323A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mechanical parts quality detection, and in particular to a mechanical parts quality detection method based on artificial intelligence. Background Art
[0002] With the rapid development of modern industry, mechanical parts play a vital role in the production process. The quality of mechanical parts directly affects the performance and reliability of the entire product. Therefore, it is very important to effectively detect the quality of mechanical parts. Traditional mechanical parts inspection methods often rely on manual visual inspection, which is not only inefficient but also easily affected by human factors, making it difficult to ensure the accuracy and reliability of the inspection results.
[0003] In order to solve the problems existing in traditional detection methods, mechanical parts detection technology based on image processing came into being. This technology realizes the automated detection of mechanical parts through image acquisition and analysis, greatly improving the detection efficiency and accuracy. Image processing technology uses cameras and other devices to capture images of mechanical parts and obtain visual information of mechanical parts. Then, the collected images are preprocessed, including grayscale, filtering, enhancement and other steps to improve the accuracy of subsequent processing. Next, the key features in the image, such as edges, textures, etc., are extracted through feature extraction algorithms. These features will be used for subsequent classification and recognition. Finally, according to the pre-established models and algorithms, the mechanical parts are classified and judged to realize the detection of defects and anomalies. Summary of the invention
[0004] The purpose of the present invention is to provide a mechanical parts quality inspection method based on artificial intelligence: to solve the technical problem that traditional mechanical parts quality inspection methods often rely on manual visual inspection, which is not only inefficient but also easily affected by human factors, resulting in the accuracy and reliability of the inspection results being difficult to guarantee.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] The quality inspection method of mechanical parts based on artificial intelligence includes:
[0007] Acquire an image of a mechanical part to be detected, and perform adaptive image enhancement on the image of the mechanical part to be detected based on an adaptive image enhancement model to obtain an image of the mechanical part to be detected after image enhancement;
[0008] Calculate the grayscale values between all two pixel points that meet the preset position relationship in the image based on the image of the mechanical part to be inspected after image enhancement, and generate a correlation characteristic matrix corresponding to the image grayscale space according to the grayscale values;
[0009] Calculate the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part and the correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix;
[0010] The mechanical part quality inspection result is generated based on the energy index of the mechanical part surface texture, the contrast index of the mechanical part surface texture and the correlation index of the mechanical part surface texture.
[0011] Furthermore, based on the adaptive image enhancement model, the image of the mechanical part to be detected is adaptively enhanced to obtain the enhanced image of the mechanical part to be detected, which specifically includes the following process:
[0012] Obtain the grayscale value I(x, y) of each pixel of the image of the mechanical part to be detected;
[0013] Construct an adaptive image enhancement model based on the gray value I(x, y):
[0014] R SSR (x, y)=log I(x, y)-log[F(x, y)*I(x, y)];
[0015]
[0016] Among them, R SSR (x, y) represents the gray value of each pixel after enhancement processing, F(x, y) represents the center surround function, which is defined by the Gaussian function, σ is the standard deviation of the Gaussian function, and K is the coefficient to ensure ∫∫F(x, y)dxdy=1;
[0017] Based on R SSR (x, y) calculates the brightness map Y(x, y) of the corresponding image:
[0018] Y(x, y)=0.299R(x, y)+0.587G(x, y)+0.114B(x, y);
[0019] Where R(x, y) represents R SSR (x, y) corresponds to the component value of the color R channel, G(x, y) represents R SSR (x, y) corresponds to the color G channel corresponding to the component value, B (x, y) represents the R SSR (x, y) corresponds to the component value of the color B channel;
[0020] Calculate the probability that the pixel of Y(x, y) belongs to the extremely bright area, the extremely dark area, and the medium brightness area:
[0021]
[0022] Among them, ρ1(x, y) represents the probability that the pixel belongs to the extremely bright area, ρ2(x, y) represents the probability that the pixel belongs to the extremely dark area, ρ3(x, y) represents the probability that the pixel belongs to the medium brightness area, σ0=σ1=σ2=σ3=32, and max represents the maximum value operation;
[0023] Calculate the enhancement coefficient W of the adaptive model corresponding to the pixel point of Y(x, y) s (x, y):
[0024]
[0025] Among them, the value of s is 1, 2, 3;
[0026] Enhancement coefficient W based on the adaptive model corresponding to the pixel point s (x, y) enhances the pixel points of Y(x, y) to obtain the pixel points of the image of the mechanical part to be detected after image enhancement:
[0027]
[0028] Y SSR (x, y) is restored to the RGB color channel to obtain the image of the mechanical part to be inspected after image enhancement.
[0029] Furthermore, calculating the grayscale values between all two pixel points satisfying the preset position relationship in the image based on the image of the mechanical part to be detected after image enhancement specifically includes the following process:
[0030] Obtaining an image size M×N of the image of the mechanical part to be inspected after image enhancement, wherein M represents the image length and N represents the image width;
[0031] Get the gray value of each pixel as f(i, j), where f(i, j) = k, where i = 1, 2, ..., M; j = 1, 2, ..., M;
[0032] Each pixel is displaced according to the preset position relationship δ=(a, b) to obtain the gray value of pixel f(i+a, j+b is l;
[0033] The grayscale value of the pixel pair that satisfies the preset position relationship is recorded as (k, l).
[0034] Furthermore, generating a correlation characteristic matrix corresponding to the image grayscale space according to the grayscale value specifically includes the following process:
[0035] The number of pixel pairs (k, l) with the same displacement relationship is counted and the probability is calculated. The probability is recorded as the relevant characteristic frequency. The probability is calculated as follows:
[0036]
[0037] Wherein, C(k, l) is the number of occurrences of the gray value pair (k, l), and T is the total number of two pixel points separated by a preset position relationship δ=a, b);
[0038] Based on the relevant characteristic frequency, the probability of occurrence of all gray value pairs is counted and arranged into a square matrix F δ :
[0039]
[0040] The square matrix F δ Denoted as the correlation characteristic matrix corresponding to the image grayscale space.
[0041] Furthermore, the energy index of the surface texture of the mechanical parts is calculated based on the relevant characteristic matrix, which specifically includes the following process:
[0042]
[0043] Among them, ASM is the energy index of the surface texture of mechanical parts, L is the gray level of the image, P δ (i, j are elements in the correlation characteristic matrix.
[0044] Furthermore, the calculation of the contrast index of the surface texture of the mechanical part based on the correlation characteristic matrix specifically includes the following process:
[0045]
[0046] Among them, CON is the contrast index of the surface texture of the mechanical parts, L is the gray level of the image, P δ (i, j) is an element in the correlation characteristic matrix.
[0047] Furthermore, the calculation of the correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix specifically includes the following process:
[0048]
[0049] Among them, COR is the correlation index of the surface texture of mechanical parts, L is the gray level of the image, P δ (i, j) is an element in the correlation characteristic matrix.
[0050] Further, generating the mechanical part quality inspection result based on the energy index of the mechanical part surface texture, the contrast index of the mechanical part surface texture and the correlation index of the mechanical part surface texture specifically includes the following process:
[0051] Substitute the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part and the correlation index of the surface texture of the mechanical part into the calculation formula of the quality coefficient of the mechanical part to obtain the quality coefficient of the mechanical part. The calculation formula is as follows:
[0052]
[0053] Among them, LMS is the quality coefficient of mechanical parts, β and γ are weight coefficients, with values of 0.3, 0.2, and 0.5, respectively;
[0054] The mechanical part quality coefficient threshold is loaded to determine whether the mechanical part quality coefficient exceeds the mechanical part quality coefficient threshold. If so, a test result indicating that the mechanical part quality is qualified is generated; if not, a test result indicating that the mechanical part quality is unqualified is generated.
[0055] Compared with the existing solutions, the present invention achieves the following beneficial effects:
[0056] The present invention obtains an image of a mechanical part to be detected, and adaptively enhances the image of the mechanical part to be detected based on an adaptive image enhancement model to obtain the image of the mechanical part to be detected after image enhancement; calculates the grayscale values between all two pixel points in the image that meet a preset position relationship based on the image of the mechanical part to be detected after image enhancement, and generates a correlation characteristic matrix corresponding to the grayscale space of the image according to the grayscale values; calculates an energy index of a surface texture of the mechanical part, a contrast index of the surface texture of the mechanical part, and a correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix; generates a mechanical part quality detection result based on the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part, and the correlation index of the surface texture of the mechanical part; and can improve the detection efficiency of the quality of mechanical parts, and improve the accuracy and reliability of the detection results.
[0057] Furthermore, the present invention has the characteristics of non-contact, and can detect the geometric accuracy and positioning accuracy of various types of mechanical parts. In particular, when detecting some mechanical parts with tiny size, large mechanical size, complex mechanical structure and special-shaped tooth surface, it can complete the detection task more efficiently and with high quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0059] Figure 1It is a workflow diagram of a mechanical parts quality detection method based on artificial intelligence according to an embodiment of the present invention;
[0060] Figure 2 It is a workflow diagram of another mechanical parts quality detection method based on artificial intelligence according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, well-known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0063] This embodiment provides a mechanical parts quality detection method based on artificial intelligence. Figure 1 is a workflow diagram of a mechanical parts quality detection method based on artificial intelligence according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0064] Step S101: acquiring an image of a mechanical part to be detected, and performing adaptive image enhancement on the image of the mechanical part to be detected based on an adaptive image enhancement model to obtain an enhanced image of the mechanical part to be detected;
[0065] Step S102: calculating the grayscale values between all two pixel points that satisfy a preset position relationship in the image based on the image of the mechanical part to be inspected after image enhancement, and generating a correlation characteristic matrix corresponding to the image grayscale space according to the grayscale values;
[0066] Step S103: calculating the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part, and the correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix;
[0067] Step S104: Generate a mechanical part quality inspection result based on the energy index of the mechanical part surface texture, the contrast index of the mechanical part surface texture and the correlation index of the mechanical part surface texture.
[0068] In summary, the present invention obtains an image of a mechanical part to be inspected, and adaptively enhances the image of the mechanical part to be inspected based on an adaptive image enhancement model to obtain the image of the mechanical part to be inspected after image enhancement; calculates the grayscale values between all two pixel points in the image that satisfy a preset position relationship based on the image of the mechanical part to be inspected after image enhancement, and generates a correlation characteristic matrix corresponding to the grayscale space of the image according to the grayscale values; calculates an energy index of the surface texture of the mechanical part, a contrast index of the surface texture of the mechanical part, and a correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix; generates a mechanical part quality inspection result based on the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part, and the correlation index of the surface texture of the mechanical part; can improve the inspection efficiency of the quality of mechanical parts, and improve the accuracy and reliability of the inspection results.
[0069] In some embodiments, adaptively enhancing the image of the mechanical part to be inspected based on the adaptive image enhancement model to obtain the enhanced image of the mechanical part to be inspected specifically includes the following process:
[0070] Obtain the grayscale value I(x, y) of each pixel of the image of the mechanical part to be detected;
[0071] Construct an adaptive image enhancement model based on the gray value I(x, y):
[0072] R SSR (x, y)=log I(x, y)-log[F(x, y)*I(x, y)];
[0073]
[0074] Among them, R SSR (x, y) represents the gray value of each pixel after enhancement processing, F(x, y) represents the center surround function, which is defined by the Gaussian function, σ is the standard deviation of the Gaussian function, and K is the coefficient to ensure ∫∫F(x, y)dxdy=1;
[0075] Based on R SSR (x, y) calculates the brightness map Y(x, y) of the corresponding image:
[0076] Y(x, y)=0.299R(x, y)+0.587G(x, y)+0.114B(x, y);
[0077] Where R(x, y) represents R SSR(x, y) corresponds to the component value of the color R channel, G(x, y) represents R SSR (x, y) corresponds to the color G channel corresponding to the component value, B (x, y) represents the R SSR (x, y) corresponds to the component value of the color B channel;
[0078] Calculate the probability that the pixel of Y(x, y) belongs to the extremely bright area, the extremely dark area, and the medium brightness area:
[0079]
[0080] Among them, ρ1(x, y) represents the probability that the pixel belongs to the extremely bright area, ρ2(x, y) represents the probability that the pixel belongs to the extremely dark area, ρ3(x, y) represents the probability that the pixel belongs to the medium brightness area, σ0=σ1=σ2=σ3=32, and max represents the maximum value operation;
[0081] Calculate the enhancement coefficient W of the adaptive model corresponding to the pixel point of Y(x, y) s (x, y):
[0082]
[0083] Among them, the value of s is 1, 2, 3;
[0084] Enhancement coefficient W based on the adaptive model corresponding to the pixel point s (x, y) enhances the pixel points of Y(x, y) to obtain the pixel points of the image of the mechanical part to be detected after image enhancement:
[0085]
[0086] Y SSR (x, y) is restored to the RGB color channel to obtain the image of the mechanical part to be inspected after image enhancement.
[0087] In some embodiments, calculating the grayscale values between all two pixel points in the image that satisfy a preset position relationship based on the image of the mechanical part to be inspected after image enhancement specifically includes the following process:
[0088] Obtaining an image size M×N of the image of the mechanical part to be inspected after image enhancement, wherein M represents the image length and N represents the image width;
[0089] Get the gray value of each pixel as f(i, j), where f(i, j) = k, where i = 1, 2, ..., M; j = 1, 2, ..., M;
[0090] Each pixel is displaced according to the preset position relationship δ=(a, b) to obtain the gray value of pixel f(i+a, j+b is l;
[0091] The grayscale value of the pixel pair that satisfies the preset position relationship is recorded as (k, l).
[0092] In some embodiments, generating a correlation characteristic matrix corresponding to the image grayscale space according to the grayscale value specifically includes the following process:
[0093] The number of pixel pairs (k, l) with the same displacement relationship is counted and the probability is calculated. The probability is recorded as the relevant characteristic frequency. The probability is calculated as follows:
[0094]
[0095] Wherein, C(k, l) is the number of occurrences of the gray value pair (k, l), and T is the total number of two pixel points separated by a preset position relationship δ=a, b);
[0096] Based on the relevant characteristic frequency, the probability of occurrence of all gray value pairs is counted and arranged into a square matrix F δ :
[0097]
[0098] The square matrix F δ Denoted as the correlation characteristic matrix corresponding to the image grayscale space.
[0099] In some embodiments, calculating the energy index of the surface texture of the mechanical part based on the correlation characteristic matrix specifically includes the following process:
[0100]
[0101] Among them, ASM is the energy index of the surface texture of mechanical parts, L is the gray level of the image, P δ (i, j are elements in the correlation characteristic matrix.
[0102] In some embodiments, calculating the contrast index of the surface texture of the mechanical part based on the correlation characteristic matrix specifically includes the following process:
[0103]
[0104] Among them, CON is the contrast index of the surface texture of the mechanical parts, L is the gray level of the image, P δ (i, j) is an element in the correlation characteristic matrix.
[0105] In some embodiments, calculating the correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix specifically includes the following process:
[0106]
[0107] Among them, COR is the correlation index of the surface texture of mechanical parts, L is the gray level of the image, P δ (i, j) is an element in the correlation characteristic matrix.
[0108] In some embodiments, Figure 2 FIG. 1 is a flowchart of another method for detecting quality of mechanical parts based on artificial intelligence according to an embodiment of the present invention. Figure 2 As shown, generating a mechanical part quality inspection result based on an energy index of a mechanical part surface texture, a contrast index of a mechanical part surface texture, and a correlation index of a mechanical part surface texture specifically includes the following steps:
[0109] Step S201: Substitute the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part, and the correlation index of the surface texture of the mechanical part into the mechanical part quality coefficient calculation formula to obtain the mechanical part quality coefficient. The calculation formula is as follows:
[0110]
[0111] Among them, LMS is the quality coefficient of mechanical parts, β and γ are weight coefficients, with values of 0.3, 0.2, and 0.5, respectively;
[0112] Step S202: Loading the mechanical parts quality coefficient threshold;
[0113] Step S203: determine whether the mechanical part quality coefficient exceeds the mechanical part quality coefficient threshold, if yes, proceed to step S204, if no, proceed to step S205;
[0114] Step S204: generating a test result of the qualified quality of the mechanical parts;
[0115] Step S205: Generate a test result indicating that the quality of the mechanical parts is unqualified.
[0116] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only some logical function divisions. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A mechanical parts quality inspection method based on artificial intelligence, characterized in that: Methods include: Acquire an image of a mechanical part to be detected, and perform adaptive image enhancement on the image of the mechanical part to be detected based on an adaptive image enhancement model to obtain an image of the mechanical part to be detected after image enhancement; Calculate the grayscale values between all two pixel points that meet the preset position relationship in the image based on the image of the mechanical part to be inspected after image enhancement, and generate a correlation characteristic matrix corresponding to the image grayscale space according to the grayscale values; Calculate the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part and the correlation index of the surface texture of the mechanical part based on the correlation characteristic matrix; The mechanical part quality inspection result is generated based on the energy index of the mechanical part surface texture, the contrast index of the mechanical part surface texture and the correlation index of the mechanical part surface texture.
2. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 1, characterized in that: Based on the adaptive image enhancement model, the image of the mechanical part to be inspected is adaptively enhanced to obtain the enhanced image of the mechanical part to be inspected, which specifically includes the following processes: Obtain the grayscale value I(x, y) of each pixel of the image of the mechanical part to be detected; Construct an adaptive image enhancement model based on the gray value I(x, y): R SSR (x,y)=logI(x,y)-log[F(x,y)*I(x,y)]; Among them, R SSR (x, y) represents the gray value of each pixel after enhancement processing, F(x, y) represents the center surround function, which is defined by the Gaussian function, σ is the standard deviation of the Gaussian function, and K is the coefficient to ensure ∫∫F(x, y)dxdy=1; Based on R SSR (x, y) calculates the brightness map Y(x, y) of the corresponding image: Y(x, y)=0.299R(x, y)+0.587G(x, y)+0.114B(x, y); Where R(x, y) represents R SSR (x, y) corresponds to the component value of the color R channel, G(x, y) represents R SSR (x, y) corresponds to the color G channel corresponding to the component value, B (x, y) represents the R SSR (x, y) corresponds to the component value of the color B channel; Calculate the probability that the pixel of Y(x, y) belongs to the extremely bright area, the extremely dark area, and the medium brightness area: Among them, ρ1(x, y) represents the probability that the pixel belongs to the extremely bright area, ρ2(x, y) represents the probability that the pixel belongs to the extremely dark area, ρ3(x, y) represents the probability that the pixel belongs to the medium brightness area, σ0=σ1=σ2=σ3=32, and max represents the maximum value operation; Calculate the enhancement coefficient W of the adaptive model corresponding to the pixel point of Y(x, y) s (x, y): Among them, the value of s is 1, 2, 3; Enhancement coefficient W based on the adaptive model corresponding to the pixel point s (x, y) enhances the pixel points of Y(x, y) to obtain the pixel points of the image of the mechanical part to be detected after image enhancement: Y SSR (x, y) is restored to the RGB color channel to obtain the image of the mechanical part to be inspected after image enhancement.
3. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 1, characterized in that: The grayscale values between all two pixel points in the image that meet the preset position relationship are calculated based on the image of the mechanical part to be detected after image enhancement, which specifically includes the following process: Obtaining an image size M×N of the image of the mechanical part to be inspected after image enhancement, wherein M represents the image length and N represents the image width; Get the gray value of each pixel as f(i, j), where f(i, j) = k, where i = 1, 2, ..., M; j = 1, 2, ..., M; Each pixel is displaced according to the preset position relationship δ=(a, b) to obtain the gray value of pixel f(i+a, j+b is l; The grayscale value of the pixel pair that satisfies the preset position relationship is recorded as (k, l).
4. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 3 is characterized in that: Generate the relevant characteristic matrix corresponding to the image grayscale space according to the grayscale value The process includes: The number of pixel pairs (k, l) with the same displacement relationship is counted and the probability is calculated. The probability is recorded as the relevant characteristic frequency. The probability is calculated as follows: Wherein, C(k, l) is the number of occurrences of the gray value pair (k, l), and T is the total number of two pixel points separated by a preset position relationship δ=a, b); Based on the relevant characteristic frequency, the probability of occurrence of all gray value pairs is counted and arranged into a square matrix F δ : The square matrix F δ Denoted as the correlation characteristic matrix corresponding to the image grayscale space.
5. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 4 is characterized in that: The energy index of the surface texture of mechanical parts calculated based on the relevant characteristic matrix specifically includes the following processes: Among them, ASM is the energy index of the surface texture of mechanical parts, L is the gray level of the image, P δ (i, j are elements in the correlation characteristic matrix.
6. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 4, characterized in that: The calculation of the contrast index of the surface texture of mechanical parts based on the correlation characteristic matrix specifically includes the following processes: Among them, CON is the contrast index of the surface texture of the mechanical parts, L is the gray level of the image, P δ (i, j) is an element in the correlation characteristic matrix.
7. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 4 is characterized in that: The calculation of the correlation index of the surface texture of mechanical parts based on the correlation characteristic matrix specifically includes the following processes: Among them, COR is the correlation index of the surface texture of mechanical parts, L is the gray level of the image, P δ (i, j) is an element in the correlation characteristic matrix.
8. The method for quality inspection of mechanical parts based on artificial intelligence according to claim 1, characterized in that: Generating mechanical parts quality inspection results based on the energy index of mechanical parts surface texture, the contrast index of mechanical parts surface texture and the correlation index of mechanical parts surface texture specifically includes the following processes: Substitute the energy index of the surface texture of the mechanical part, the contrast index of the surface texture of the mechanical part and the correlation index of the surface texture of the mechanical part into the calculation formula of the quality coefficient of the mechanical part to obtain the quality coefficient of the mechanical part. The calculation formula is as follows: Among them, LMS is the quality coefficient of mechanical parts, β and γ are weight coefficients, with values of 0.3, 0.2, and 0.5, respectively; The mechanical part quality coefficient threshold is loaded to determine whether the mechanical part quality coefficient exceeds the mechanical part quality coefficient threshold. If so, a test result indicating that the mechanical part quality is qualified is generated; if not, a test result indicating that the mechanical part quality is unqualified is generated.
Citation Information
Patent Citations
Water surface wave scale monitoring method based on image texture features
CN102878985A
Facial image feature extraction method based on gray level co-occurrence matrix
CN110837802A
Adaptive low-illumination image enhancement method and system based on MSRCR
CN113256533A
Quality detection method and device for thick pure yarn-dyed tape, electronic equipment and medium
CN116958109A
Product label detection method based on machine vision multi-level features
CN117092129A