Hardware screw quality detection method and system based on artificial intelligence

Through the hardware screw quality detection system based on artificial intelligence, the types and quality of screws are automatically identified and detected, and the problems of inaccurate and low efficiency of manual inspection in the existing technology are solved, and efficient and accurate screw quality detection is achieved.

CN119125143APending Publication Date: 2024-12-13SHENZHEN SHENG WANG DA HARDWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411104076.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, screw quality inspection has manual subjective judgment, resulting in inaccuracy, appearance and size inspection is time-consuming and error-prone, resulting in low detection efficiency, high cost, and inability to meet the quality requirements of high-precision screws.

Method used

Adopt a hardware screw quality detection system based on artificial intelligence, including image acquisition module, filter processing module, threshold processing module, appearance detection module and performance detection module. The screw image is obtained through a high-definition camera, Gaussian filtering and dual threshold processing are performed, and automatic Identify screw categories and detect appearance quality, and combine performance detection equipment to achieve automated inspection.

Benefits of technology

Automatic identification and quality inspection of screws is realized, production efficiency is improved, production costs are reduced, and the accuracy and consistency of inspection results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119125143A_ABST
    Figure CN119125143A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of hardware screw detection, and provides a hardware screw quality detection control system based on artificial intelligence, which comprises an image acquisition module, a filtering processing module, a threshold value processing module, an appearance detection module, a performance detection module, a wireless communication module, an alarm, a memory, a processing center and an intelligent remote control device. The image acquisition module, the filtering processing module, the threshold value processing module, the appearance detection module, the performance detection module, the wireless communication module, the alarm and the memory are respectively connected with the processing center; the intelligent remote control device comprises an intelligent mobile phone, a tablet personal computer and an intelligent remote controller, and is in automatic networking connection with the wireless communication module within the range of a wireless network or the Internet; the invention further provides a hardware screw quality detection method based on artificial intelligence. According to the invention, the category of the screw can be automatically identified, the appearance quality of the screw can be automatically detected, the performance is measured, manual detection is not needed, the production efficiency is improved, and the production cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of hardware screw detection and control, and more specifically, relates to a hardware screw quality detection method and system based on artificial intelligence. Background Art

[0002] Screws are tools that use the physical and mathematical principles of the circular rotation of an object's inclined surface and friction to fasten objects and mechanical parts. Currently, the inspection of screw production is done manually to check whether the screw's dimensional tolerance meets the standard, whether the appearance is abnormal, and whether the performance meets the standard, and then the quality is evaluated manually. However, the workers' evaluation method may have certain subjective judgments, which leads to inaccurate quality inspection results of the screws; moreover, the inspection of the appearance and size of the screws is very time-consuming, and for very small screws, the size inspection is prone to errors, resulting in a large inspection workload, low inspection efficiency, and high inspection costs.

[0003] The patent publication "A method, device, electronic device and storage medium for detecting screw quality (publication number: CN117147290A)" only detects the performance of the screws, but does not mention the detection of the appearance and size of the screws. It cannot meet the customer's quality requirements for high-precision screws, so there are certain shortcomings. Summary of the invention

[0004] In order to solve the deficiencies in the prior art, the purpose of the present invention is to provide a hardware screw quality detection method and system based on artificial intelligence, which is provided with an image acquisition module, a filtering processing module, a threshold processing module, an appearance detection module, and a performance detection module, which can automatically identify the type of screws, automatically detect the appearance quality and performance measurement of the screws, without the need for manual detection, thereby improving production efficiency and reducing production costs.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0006] A hardware screw quality inspection and control system based on artificial intelligence, comprising an image acquisition module, a filtering processing module, a threshold processing module, an appearance inspection module, a performance inspection module, a wireless communication module, an alarm, a memory, a processing center, and an intelligent remote control device; the image acquisition module, the filtering processing module, the threshold processing module, the appearance inspection module, the performance inspection module, the wireless communication module, the alarm, and the memory are respectively connected to the processing center; the intelligent remote control device comprises a smart phone, a tablet computer, and an intelligent remote control, which are automatically networked and connected to the wireless communication module within the range of a wireless network or the Internet;

[0007] The wireless communication module is provided with a wireless network unit, which is responsible for sending and receiving wireless network signals and automatically networking with the intelligent remote control device within the range of a wireless network or the Internet;

[0008] The alarm device compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory, and automatically sounds an alarm and notifies rework or re-inspection if there is any inconsistency; and compares the performance test data of the hardware screws with the performance test standard of the hardware screws stored in the memory, and automatically sounds an alarm and notifies rework or re-inspection if there is any inconsistency;

[0009] The memory is responsible for storing information of the image acquisition module, the filter processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, and the alarm, as well as the appearance quality standards and performance detection standards of the hardware screws;

[0010] The processing center is responsible for information transmission among the image acquisition module, the filter processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, the alarm, and the memory. It is the hub of the system and compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and a notice is given to rework or re-inspection; and compares the performance detection data of the hardware screws with the performance detection standard of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, they are transmitted to the alarm and a notice is given to rework or re-inspection;

[0011] The image acquisition module includes an image translation unit, a mirror transformation unit, a transposition exchange unit, a zoom processing unit, and a rotation adjustment unit. The image of the hardware screw to be tested is acquired through a set high-definition camera and pre-processed to correct the systematic error and random error of the image, and then transmitted to the filtering processing module;

[0012] The filtering processing module includes a grayscale processing unit, a filtering denoising unit, and a convolution operation unit, and performs Gaussian filtering and smoothing processing on the grayscale image of the hardware screws through a Gaussian filter to reduce the influence of noise for subsequent gradient calculation and pass it to the threshold processing module;

[0013] The threshold processing module includes a gradient calculation unit, a thinning edge unit, a threshold detection unit, and an edge connection unit, which calculates the gradient amplitude and direction of the grayscale image and performs double threshold processing to obtain edge information of strong edges, weak edges, and non-edges, and transmits it to the appearance detection module;

[0014] The appearance detection module includes a peripheral extraction unit, an inner perimeter acquisition unit, an identification and classification unit, and a size confirmation unit. It obtains a complete hardware screw edge image and matches it with a pre-trained hardware screw surface abnormality problem information model to identify and classify the abnormalities in the image and transmit it to the processing center;

[0015] The performance detection module includes a mechanical detection unit, a hardness detection unit, and a corrosion resistance detection unit. The screw performance detection equipment is used to detect the mechanical properties and corrosion properties of screws with qualified appearance and size to obtain the detection data of the mechanical properties and corrosion properties of the screws, and transmit them to the processing center.

[0016] The present invention provides a hardware screw quality detection method based on artificial intelligence, which is applied to a hardware screw quality detection control system based on artificial intelligence, and the method comprises the following steps:

[0017] S10, when detecting screws, the image acquisition module obtains the image of the hardware screw to be tested through the set high-definition camera and performs preprocessing to correct the systematic error and random error of the image, and transmits it to the filtering processing module;

[0018] S20, the filtering processing module performs Gaussian filtering and smoothing processing on the grayscale image of the hardware screws through a Gaussian filter to reduce the influence of noise for subsequent gradient calculation, and transmits it to the threshold processing module;

[0019] S30, the threshold processing module obtains edge information of strong edge, weak edge and non-edge by calculating the gradient amplitude and direction of the grayscale image and performing double threshold processing, and transmits the information to the appearance detection module;

[0020] S40, the appearance inspection module obtains the complete edge image of the hardware screws and matches it with the pre-trained hardware screw surface abnormality problem information model to identify and classify the abnormalities in the image and transmit it to the processing center;

[0021] S50, the processing center compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and notified to rework or re-inspection;

[0022] S60, the performance detection module detects the mechanical properties and corrosion properties of screws with qualified appearance and size through screw performance detection equipment to obtain the detection data of the mechanical properties and corrosion properties of the screws, and transmits the data to the processing center;

[0023] S70. The processing center compares the performance test data of the hardware screws with the performance test standards of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, the alarm is transmitted to the alarm and the rework or re-inspection is notified.

[0024] Further, the step S10 comprises the following steps:

[0025] S11, the image translation unit translates all the pixels in the image of the hardware screw horizontally or vertically according to a predetermined translation amount according to the image translation rule to obtain a translated screw image, and transmits it to the mirror transformation unit;

[0026] S12, the mirror transformation unit performs left-right and up-down axisymmetric transformation on the translated hardware screw image with the vertical and horizontal central axes as the center to obtain a mirrored screw image, and transmits it to the transposition exchange unit;

[0027] S13, the transposition exchange unit exchanges the height and width of the mirrored hardware screw image x coordinate and y coordinate according to the following transposition transformation formula (1) to obtain a transposed screw image, and transmits it to the scaling processing unit;

[0028]

[0029] S14, the scaling processing unit enlarges or reduces the size of the transposed hardware screw image according to the following scaling ratio formulas (2) and (3) according to a specified ratio to obtain a scaled screw image, and transmits it to the rotation adjustment unit;

[0030]

[0031] In the formula, S x is the image x-axis scaling ratio, S y is the scaling ratio in the y-axis direction

[0032] S15. The rotation adjustment unit rotates the scaled hardware screw image around a specified point by a certain angle according to the following rotation calculation formulas (4) and (5) to meet the requirements of subsequent filtering.

[0033]

[0034] Further, the step S20 comprises the following steps:

[0035] S21, the grayscale processing unit calculates the grayscale according to the grayscale calculation formula "Ig = 0.299*I R +0.587*I G +0.114*I B , Ig is the pixel value after grayscale conversion, I R ,I G ,I B The pixel values ​​on the red, green and blue channels of the corresponding pixels of the original image are obtained respectively, and the grayscale pixel values ​​are processed and passed to the filtering and denoising unit;

[0036] S22, the filtering and denoising unit calculates the Gaussian filter formula "G(x,y)=1 / (2πσ 2 )*exp(-(x2+y2) / 2σ2 ), G(x,y) is the Gaussian function, σ is the standard deviation of the filter, exp(-(x 2 +y 2 ) / 2σ 2 ) is an exponential function to obtain the denoised image and pass it to the convolution operation unit;

[0037] S23, the convolution operation unit calculates the gradient value in the horizontal direction of the image and the gradient value in the vertical direction of the image according to the following Sobel operator calculation formula (6) for subsequent double threshold processing.

[0038]

[0039] In the formula, Gx and Gy are the gradient values ​​in the horizontal and vertical directions respectively, and * is the convolution operator.

[0040] Further, the step S30 comprises the following steps:

[0041] S31, the gradient calculation unit calculates the gradient brightness according to the formula " θ(x,y)=tan -1 (Gy(x,y) / Gx(x,y)), M(x,y) is the gradient intensity of the pixel, θ(x,y) is the gradient direction of the pixel" to obtain the intensity and direction of the pixel brightness and pass it to the refined edge unit;

[0042] S32, the edge refinement unit obtains the pixel point with the maximum local gradient value in the image after refinement according to the following non-maximum suppression calculation formula (7) to eliminate the blur effect on the edge to make it clearer, and transmits it to the threshold detection unit;

[0043]

[0044] In the formula, M L is the low threshold of the gradient intensity in the image, δ x ,δ y are the offset values ​​in the gradient direction of the image respectively.

[0045] S33, the threshold detection unit obtains a refined edge image in the image according to the following double threshold calculation formula (8), removes non-edge points in the image to determine real and potential edge information, and transmits it to the edge connection unit;

[0046]

[0047] In the formula, M H is the high threshold of gradient strength, Strong, Weak, and Non-edge are strong edge, weak edge, and non-edge respectively.

[0048] S34, the edge connection unit uses high and low thresholds to determine strong edges and weak edges and perform edge connection to form a final hardware screw edge image for subsequent extraction of image feature information.

[0049] Further, the step S40 comprises the following steps:

[0050] S41, the peripheral extraction unit uses the peripheral edge line of the hardware screw as the contour line to extract the appearance shape of the screw and the feature information of the tip, thread, handle, and head, and transmits it to the inner periphery acquisition unit;

[0051] S42, the inner perimeter acquisition unit extracts the shapes of the holes, thread grooves, and countersunk grooves of the hardware screws through a scanning line seed filling algorithm for subsequent recognition and classification, and transmits them to the recognition and classification unit;

[0052] S43, the recognition and classification unit matches the image of the screw surface with pre-trained images of various abnormal problems on the surface of hardware screws and identifies the category of the screw and its appearance abnormality, and transmits it to the size detection unit;

[0053] S44. The dimension detection unit obtains the dimension data information of the diameter, pitch, length, and depth and width of the hole, thread groove, and countersunk groove of the hardware screw through a three-dimensional scanner.

[0054] Further, the step S60 comprises the following steps:

[0055] S61. The mechanical testing unit performs mechanical property tests on the screws using a universal testing machine to obtain the tensile strength, yield strength, and tightening torque of the screws to ensure the service life of the screws, and transmits the results to the hardness testing unit;

[0056] S62, the hardness detection unit performs a hardness performance test on the screw through a hardness sensor to obtain corresponding hardness data of the Rockwell hardness, Brinell hardness, or Vickers hardness of the screw, and transmits the data to the corrosion resistance detection unit;

[0057] S63. The corrosion resistance testing unit conducts a copper salt accelerated acetic acid salt spray test (CASS test) on the hardware screws in a salt spray chamber or a salt spray corrosion resistance test box to obtain the corrosion resistance performance data of the screws to ensure the corrosion resistance of the screws.

[0058] The present invention provides a hardware screw quality detection and control system based on artificial intelligence, which also includes a computer device and a computer-readable storage medium; the computer device includes a memory and various functional modules, the memory stores a computer program, and when the various functional modules execute the computer program, the steps of the hardware screw quality detection method based on artificial intelligence are implemented in any one of the above; the computer-readable storage medium stores a computer program, and when the computer program is executed by the various functional modules, the steps of the hardware screw quality detection method based on artificial intelligence are implemented in any one of the above.

[0059] The present invention provides a hardware screw quality detection and control system based on artificial intelligence, which also includes a hardware screw quality detection and control device based on artificial intelligence, and is implemented by using the above-mentioned hardware screw quality detection and control system based on artificial intelligence and the above-mentioned hardware screw quality detection method based on artificial intelligence.

[0060] The beneficial effects of the present invention compared with the prior art are as follows:

[0061] By setting up an image acquisition module, a filtering processing module, a threshold processing module, an appearance detection module, and a performance detection module, the type of screws can be automatically identified, and the appearance quality and performance measurement of the screws can be automatically detected without manual inspection, thereby improving production efficiency and reducing production costs. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0063] Figure 1 It is a schematic diagram of the screw structure of the present invention;

[0064] Figure 2 It is a schematic diagram of the system module of the present invention;

[0065] Figure 3 It is a schematic diagram of the image acquisition module of the present invention;

[0066] Figure 4 It is a schematic diagram of the filtering processing module of the present invention;

[0067] Figure 5 This is a schematic diagram of a threshold processing module of the present invention;

[0068] Figure 6 It is a schematic diagram of the appearance detection module of the present invention;

[0069] Figure 7 It is a schematic diagram of a performance detection module of the present invention;

[0070] Figure 8 It is a schematic diagram of the method flow of the present invention;

[0071] Fig. 9 This is a schematic diagram of the process decomposition of step S10 in the method flow of the present invention;

[0072] Fig.10 This is a schematic diagram of the process decomposition of step S20 in the method flow of the present invention;

[0073] Fig.11 This is a schematic diagram of the process decomposition of step S30 in the method flow of the present invention;

[0074] Fig.12 This is a schematic diagram of the process decomposition of step S40 in the method flow of the present invention;

[0075] Fig.13 It is a schematic diagram of the program decomposition of step S60 in the method flow of the present invention. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0077] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments:

[0078] In order to make the technical problems, technical solutions and beneficial effects to be solved by this application more clearly understood, the application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0079] It should be noted that when a module is referred to as being "set" or "set on" another module, it can be directly on the other module or indirectly on the other module. When a module is referred to as being "connected" or "connected to" another module, it can be directly connected to the other module or indirectly connected to the other module.

[0080] In the description of this application, "multiple" means two or more, unless otherwise clearly and specifically defined. "Several" means one or more, unless otherwise clearly and specifically defined. "User", "Consumer" and "Customer" in this application have the same meaning, and all refer to customers who shop on the e-commerce platform.

[0081] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0082] Please refer to Figure 1 As shown, the hardware screw involved in the present invention, also called a screw (screw), a screw rod (screw rod), includes a tip 1, a thread 2, a handle 3, and a head 4, wherein the tip 1, also called a pointed head, is the tip of the screw, which is narrower than other parts and can penetrate hard drilled materials, and is divided into round head, semi-circular head, flat head, square head, countersunk head, and cone head; the thread 2 is the part of the spiral ridge, which can enter the drilled material and fix it without detaching, and is divided into triangle, trapezoid, square, V-shaped, etc.; the handle 3 is a non-threaded part, which penetrates into the middle of the material to produce a more secure fixation; the head 4 is the top of the screw, which is provided with a countersunk groove 41 with one or more notches. To screw the pointed head into the surface of the material, the screwdriver must be pressed into these countersunk grooves, and then the screwdriver can be turned to screw into the material and flush with the surface of the material; Figure 1 The hardware cross head screws described in this application are just one of the embodiments of the present invention. There are also anti-slip head screws (with textures or grooves on the head), hexagon head screws, and flat head screws, which are not limited by the claims.

[0083] Please refer to Figure 2 As shown, the present invention provides an artificial intelligence-based hardware screw quality inspection and control system, comprising an image acquisition module, a filter processing module, a threshold processing module, an appearance inspection module, a performance inspection module, a wireless communication module, an alarm, a memory, a processing center, and an intelligent remote control device; the image acquisition module, the filter processing module, the threshold processing module, the appearance inspection module, the performance inspection module, the wireless communication module, the alarm, and the memory are respectively connected to the processing center; the intelligent remote control device includes a smart phone, a tablet computer, and an intelligent remote control, which are automatically networked and connected to the wireless communication module within the range of a wireless network or the Internet.

[0084] The wireless communication module is provided with a wireless network unit, which is responsible for sending and receiving wireless network signals and automatically networking with the intelligent remote control device within the range of a wireless network or the Internet.

[0085] Furthermore, the wireless network unit includes but is not limited to wireless networks such as Bluetooth, WiFi, mobile communications, the Internet, wireless local area networks, and communication modules with receiving and sending functions of Internet of Things such as ZigBee, Z-Wave, MQTT (Message Queuing Telemetry Transport), CoAP (Constrained Application Protocol), HTTP (Hypertext Transfer Protocol), LoRaWAN (Long Range Wide Area Network), etc., and also includes narrowband wireless communication subunits and broadband wireless routers, and has self-organizing network capabilities to realize communication and wireless network transmission, image transmission and data transmission functions.

[0086] The alarm compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory, and automatically sounds an alarm and notifies rework or re-inspection if there is any inconsistency; and compares the performance test data of the hardware screws with the performance test standard of the hardware screws stored in the memory, and automatically sounds an alarm and notifies rework or re-inspection if there is any inconsistency.

[0087] Furthermore, the appearance quality standards of the hardware screws include smooth appearance, uniform color, no deformation, no foreign matter, no bubbles, no black spots, no scratches, no rust spots, and no other abnormalities in appearance, and all dimensions meet the standards; the performance testing standards of the hardware screws include the tensile strength, yield strength, tightening torque, hardness, corrosion resistance and other performance indicators of the screws meet the quality standards of the state, industry, enterprise or customer.

[0088] The length of the screw, the diameter of the nut, the pitch of the thread, the depth and width of the fixing groove, the major diameter of the external thread, the minor diameter of the internal thread, whether the thread is uniform, whether there is a lack of material, whether there is excess material, whether there is oil pollution

[0089] The memory is responsible for storing information of the image acquisition module, the filter processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, and the alarm, as well as the appearance quality standards and performance detection standards of the hardware screws.

[0090] The processing center is responsible for information transmission among the image acquisition module, the filtering processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, the alarm, and the memory. It is the hub center of the system and compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and a notice is given to rework or re-inspection; and the performance detection data of the hardware screws are compared with the performance detection standard of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, they are transmitted to the alarm and a notice is given to rework or re-inspection.

[0091] See also Figure 3 As shown, the image acquisition module includes an image translation unit, a mirror transformation unit, a transposition exchange unit, a zoom processing unit, and a rotation adjustment unit. The image of the hardware screw to be tested is obtained through a set high-definition camera and pre-processed to correct the systematic error and random error of the image, and then transmitted to the filtering processing module.

[0092] Further, the image translation unit translates all the pixels in the image of the hardware screw horizontally or vertically according to the predetermined translation amount according to the image translation law to obtain the translated screw image, and transmits it to the mirror transformation unit; the mirror transformation unit performs left-right and up-down axisymmetric transformation on the translated hardware screw image with the vertical and horizontal central axis as the center to obtain the mirrored screw image, and transmits it to the transposition exchange unit; the transposition exchange unit exchanges the height and width of the x-coordinate and y-coordinate of the mirrored hardware screw image according to the following transposition transformation formula (1) to obtain the transposed screw image, and transmits it to the scaling processing unit; the scaling processing unit enlarges or reduces the size of the transposed hardware screw image according to the specified ratio according to the following scaling ratio formula (2) (3) to obtain the scaled screw image, and transmits it to the rotation adjustment unit; the rotation adjustment unit rotates the scaled hardware screw image around a specified point by a certain angle according to the following rotation calculation formula (4) (5) to meet the filtering requirements. The relevant calculation formulas are as follows:

[0093]

[0094] In the formula, S x is the image x-axis scaling ratio, S y is the scaling ratio along the y-axis.

[0095]

[0096] See also Figure 4As shown, the filtering processing module includes a grayscale processing unit, a filtering denoising unit, and a convolution operation unit. The grayscale image of the hardware screws is subjected to Gaussian filtering and smoothing processing through a Gaussian filter to reduce the influence of noise for subsequent gradient calculation and pass it to the threshold processing module.

[0097] Further, the grayscale processing unit is based on the grayscale calculation formula "Ig = 0.299 * I R +0.587*I G +0.114*I B , Ig is the pixel value after grayscale conversion, I R ,I G ,I B The pixel values ​​on the red, green and blue channels of the corresponding pixels of the original image are obtained by graying the pixel values, and then graying the pixel values ​​and passing them to the filtering and denoising unit; the filtering and denoising unit calculates the pixel values ​​according to the Gaussian filtering formula "G(x, y) = 1 / (2πσ 2 )*exp(-(x2+y2) / 2σ 2 ), G(x,y) is the Gaussian function, σ is the standard deviation of the filter, exp(-(x 2 +y 2 ) / 2σ 2 ) is an exponential function” to obtain a denoised image and pass it to a convolution operation unit; the convolution operation unit calculates the gradient value in the horizontal direction of the image and the gradient value in the vertical direction of the image according to the following Sobel operator calculation formula (6) for subsequent double threshold processing.

[0098]

[0099] In the formula, Gx and Gy are the gradient values ​​in the horizontal and vertical directions respectively, and * is the convolution operator.

[0100] See also Figure 5 As shown, the threshold processing module includes a gradient calculation unit, a thinning edge unit, a threshold detection unit, and an edge connection unit, which calculates the gradient amplitude and direction of the grayscale image and performs double threshold processing to obtain edge information of strong edges, weak edges, and non-edges, and transmits it to the appearance detection module;

[0101] Further, the gradient calculation unit calculates the gradient brightness according to the formula " ,θ(x,y)=tan -1(Gy(x,y) / Gx(x,y)), M(x,y) is the gradient intensity of the pixel, θ(x,y) is the gradient direction of the pixel" to obtain the intensity and direction of the pixel brightness, and pass it to the refinement edge unit; the refinement edge unit obtains the pixel point with the local gradient maximum value after image refinement according to the following non-maximum suppression calculation formula ⑺ to eliminate the blur effect on the edge to make it clearer, and passes it to the threshold detection unit. The calculation formula is as follows:

[0102]

[0103] In the formula, M L is the low threshold of the gradient intensity in the image, δ x ,δ y are the offset values ​​of the gradient direction in the image respectively; the threshold detection unit obtains the refined edge image in the image according to the following double threshold calculation formula (8), removes the non-edge points in the image to determine the real and potential edge information, and transmits it to the edge connection unit. The calculation formula is as follows:

[0104]

[0105] Wherein, MH is the high threshold of gradient intensity, Strong, Weak, and Non-edge are strong edge, weak edge, and non-edge, respectively; the edge connection unit uses the high and low thresholds to determine the strong edge and the weak edge and perform edge connection to form the final hardware screw edge image for subsequent extraction of image feature information.

[0106] See also Figure 6 As shown, the appearance detection module includes a peripheral extraction unit, an inner periphery acquisition unit, an identification and classification unit, and a size confirmation unit. By acquiring a complete hardware screw edge image and matching it with a pre-trained hardware screw surface abnormality problem information model, the abnormalities in the image are identified and classified, and then transmitted to a processing center.

[0107] Furthermore, the peripheral extraction unit uses a boundary tracking algorithm to use the peripheral edge line of the hardware screw as a contour line to extract the appearance shape of the screw and the characteristic information of its tip, thread, handle, and head, and transmits it to the inner periphery acquisition unit; the inner periphery acquisition unit extracts the shapes of the holes, thread grooves, and countersunk grooves of the hardware screws through a scan line seed filling algorithm for subsequent recognition and classification, and transmits them to the recognition and classification unit; the recognition and classification unit matches the image of the screw surface with pre-trained images of various abnormal problems on the surface of the hardware screws and identifies the category of the screw and its appearance abnormality, and transmits it to the size detection unit; the size detection unit obtains the diameter, pitch, length of the hardware screw and the size data information of the depth and width of its holes, thread grooves, and countersunk grooves through a three-dimensional scanner.

[0108] See also Figure 7 As shown, the performance detection module includes a mechanical detection unit, a hardness detection unit, and a corrosion resistance detection unit. The screw performance detection equipment is used to detect the mechanical properties and corrosion properties of screws with qualified appearance and size to obtain the detection data of the mechanical properties and corrosion properties of the screws, and transmit them to the processing center.

[0109] Furthermore, the mechanical detection unit performs a mechanical property test on the screw using a universal testing machine to obtain the tensile strength, yield strength, and tightening torque of the screw to ensure the service life of the screw, and transmits the data to the hardness detection unit; the hardness detection unit performs a hardness performance test on the screw using a hardness sensor to obtain the corresponding hardness data of the Rockwell hardness, Brinell hardness, or Vickers hardness of the screw, and transmits the data to the corrosion resistance detection unit; the corrosion resistance detection unit performs a copper salt accelerated acetic acid salt spray test (CASS test) on the hardware screws through a salt spray chamber or a salt spray corrosion resistance test box to obtain the corrosion resistance performance data of the screw to ensure the corrosion resistance of the screw.

[0110] How the system works:

[0111] During screw detection, the image acquisition module obtains the image of the hardware screw to be tested through the set high-definition camera and performs preprocessing to correct the systematic error and random error of the image, and passes it to the filtering processing module; then the filtering processing module uses a Gaussian filter to smooth the grayscale image of the hardware screw to reduce the influence of noise for subsequent gradient calculation, and passes it to the threshold processing module; the control threshold processing module calculates the gradient amplitude and direction of the grayscale image and performs double threshold processing to obtain strong edge, weak edge, and non-edge edge information, and passes it to the appearance detection module; then the appearance detection module obtains the complete hardware screw edge image and matches it with the pre-trained hardware screw surface abnormality problem information model and identifies the image The anomalies in the image are detected and classified, and transmitted to the processing center; the processing center compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and notified to rework or re-inspection; then the performance detection module uses the screw performance detection equipment to detect the mechanical properties and corrosion properties of the screws with qualified appearance and size to obtain the detection data of the mechanical properties and corrosion properties of the screws, and transmits it to the processing center; the processing center compares the performance detection data of the hardware screws with the performance detection standard of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, they are transmitted to the alarm and notified to rework or re-inspection.

[0112] When the operator or production manager is outdoors or out of town, he or she can use a smart phone to automatically connect to the wireless communication module within the range of a wireless network or the Internet, thereby controlling or monitoring the production of hardware screws, thus realizing intelligent and networked production management and improving the production management efficiency of hardware screws.

[0113] See also Figure 8 As shown, the present invention provides a hardware screw quality detection method based on artificial intelligence, which is applied to a hardware screw quality detection control system based on artificial intelligence, and the method comprises the following steps:

[0114] S10. When detecting screws, the image acquisition module obtains a number of images of the hardware screws to be tested from different angles, different directions and different time periods through the set high-definition camera and performs pre-processing to correct the systematic error and random error of the image, and transmits them to the filtering processing module;

[0115] Furthermore, the high-definition camera can shoot at a 360-degree angle, and can capture images of various positions of the hardware screws to be inspected from multiple different angles, identify different positions on the surface of the hardware screws at different angles, and thus more accurately and comprehensively identify various positions on the surface of the hardware screws and their shapes, or based on multiple images of positions on the surface of the hardware screws captured from different angles, identify the surface quality information of the hardware screws by multi-angle matching, and then determine the shapes of various positions on the surface of the hardware screws, their types, and whether the surface meets the quality requirements.

[0116] See also Fig. 9 As shown, the step S10 includes the following steps:

[0117] S11, the image translation unit translates all the pixels in the image of the hardware screw horizontally or vertically according to a predetermined translation amount according to the image translation rule to obtain a translated screw image, and transmits it to the mirror transformation unit;

[0118] Furthermore, the image translation rules include: horizontal translation rules along the x-axis: when translating a units to the left, the x in the analytical expression is replaced by x+a, and when translating a units to the right, the x in the original analytical expression is replaced by xa; vertical translation rules along the y-axis: when translating a units upward, the y in the analytical expression is replaced by y+a, and when translating a units downward, the y in the analytical expression is replaced by y+a.

[0119] S12, the mirror transformation unit performs left-right and up-down axisymmetric transformation on the translated hardware screw image with the vertical and horizontal central axes as the center to obtain a mirrored screw image, and transmits it to the transposition exchange unit;

[0120] Furthermore, the mirror transformation includes: horizontal mirroring refers to the transformation of the left and right halves of the translated hardware screw image into an axisymmetric shape with the vertical central axis of the image as the center. Since the transformation relationship of horizontal mirroring is: Then we invert the matrix to get: Vertical mirroring refers to the axial symmetric transformation of the upper and lower halves of the translated hardware screw image with the horizontal central axis of the image as the center. The relationship of vertical mirroring is: , then the matrix inversion is:

[0121] S13, the transposition exchange unit exchanges the height and width of the mirrored hardware screw image x coordinate and y coordinate according to the following transposition transformation formula (1) to obtain a transposed screw image, and transmits it to the scaling processing unit;

[0122]

[0123] S14, the scaling processing unit enlarges or reduces the size of the transposed hardware screw image according to the following scaling ratio formulas (2) and (3) according to a specified ratio to obtain a scaled screw image, and transmits it to the rotation adjustment unit;

[0124]

[0125] In the formula, S x is the image x-axis scaling ratio, S y is the scaling ratio along the y-axis.

[0126] To further explain, in the screw image obtained by the scaling formula, since some of the original mapped coordinates may not be integers and the corresponding pixel position cannot be found, the grayscale of the pixel at its nearest integer coordinate position (0,0) or (0,1) is assigned to it, which is the so-called nearest neighbor interpolation.

[0127] S15. The rotation adjustment unit rotates the scaled hardware screw image around a specified point by a certain angle according to the following rotation calculation formulas (4) and (5) to meet the requirements of subsequent filtering.

[0128]

[0129] To further illustrate, the above steps S11 to S15 are implemented by selecting one or more steps according to the actual image effect of each hardware screw. Not every image must go through steps S11 to S15. If some images have good effects, there is no need to implement steps S11 to S15, and step S20 can be directly entered without preprocessing. Some images may go through one or more of these steps.

[0130] S20, the filtering processing module performs Gaussian filtering and smoothing processing on the grayscale image of the hardware screws through a Gaussian filter to reduce the influence of noise for subsequent gradient calculation, and transmits it to the threshold processing module;

[0131] See also Fig.10 As shown, the step S20 includes the following steps:

[0132] S21, the grayscale processing unit calculates the grayscale according to the grayscale calculation formula "Ig = 0.299*I R +0.587*I G +0.114*I B , Ig is the pixel value after grayscale conversion, I R ,I G ,I B The pixel values ​​on the red, green and blue channels of the corresponding pixels of the original image are obtained respectively, and the grayscale pixel values ​​are processed and passed to the filtering and denoising unit;

[0133] It is further explained that the present invention adopts the weighted average grayscale method to grayscale the hardware screw image, which can effectively convert the color image into a gray image to retain the main information in the image and remove some irrelevant interference information in the image. By weighted averaging the RGB value of each pixel in the color image of the color hardware screw according to a certain ratio, a grayscale value is obtained, which can reflect the degree of human eye's perception of different colors, thereby obtaining a more realistic grayscale image.

[0134] S22, the filtering and denoising unit calculates the Gaussian filter formula "G(x,y)=1 / (2πσ 2 )*exp(-(x2+y2) / 2σ 2 ), G(x,y) is the Gaussian function, σ is the standard deviation of the filter, exp(-(x 2 +y 2 ) / 2σ 2 ) is an exponential function to obtain the denoised image and pass it to the convolution operation unit;

[0135] It is further explained that since the acquired hardware screw image generates noise during the collection, transmission and processing due to errors in the imaging equipment, external environment or digitization process, the hardware screw image is smoothed using a Gaussian filter to reduce the impact of noise in the original hardware screw image, making it convenient for subsequent convolution with a Gaussian smoothing template, so that the processed hardware screw image is slightly blurred compared to the original hardware screw image, thereby reducing the impact of noise on the edge detection results.

[0136] S23, the convolution operation unit calculates the gradient value in the horizontal direction of the image and the gradient value in the vertical direction of the image according to the following Sobel operator calculation formula (6) for subsequent double threshold processing.

[0137]

[0138] In the formula, Gx and Gy are the gradient values ​​in the horizontal and vertical directions respectively, and * is the convolution operator.

[0139] Furthermore, the convolution operation refers to starting from the upper left corner of the hardware screw image, opening an active window of the same size as the template, multiplying and adding the window image and the corresponding numerical value on the template, and using the calculation result to replace the pixel brightness value in the center of the window, and the active window moves one column to the right, and performs the same operation, and so on, from left to right, from top to bottom, to obtain a new image; that is, using the convolution kernel (product template) to slide on the hardware screw image, multiplying the pixel grayscale value on the image point with the corresponding numerical value on the convolution kernel, and then adding all the multiplied values ​​as the grayscale value of the pixel on the image corresponding to the middle pixel of the convolution kernel, and finally sliding all the images.

[0140] S30, the threshold processing module obtains edge information of strong edge, weak edge and non-edge by calculating the gradient amplitude and direction of the grayscale image and performing double threshold processing, and transmits the information to the appearance detection module;

[0141] See also Fig.11 As shown, the step S30 includes the following steps:

[0142] S31, the gradient calculation unit calculates the gradient brightness according to the formula " θ(x,y)=tan -1 (Gy(x,y) / Gx(x,y)), M(x,y) is the gradient intensity of the pixel, θ(x,y) is the gradient direction of the pixel" to obtain the intensity and direction of the pixel brightness and pass it to the refined edge unit;

[0143] It is further explained that the image gradient calculation is a derivation process of a two-dimensional discrete function, which is used to detect images. The derivative is approximated by calculating the change in pixel values ​​in the image to obtain the edge information of the image. The edge of the image usually has a large grayscale value change, so its gradient value is also large; while the smoother part of the image has a smaller grayscale value change, and the corresponding gradient value is also smaller; the direction of the gradient is usually perpendicular to the boundary. The edge information of the image can be further analyzed by calculating the direction and size of the gradient, which helps to determine the specific direction and strength of the edge.

[0144] S32, the edge refinement unit obtains the pixel point with the maximum local gradient value in the image after refinement according to the following non-maximum suppression calculation formula (7) to eliminate the blur effect on the edge to make it clearer, and transmits it to the threshold detection unit;

[0145]

[0146] In the formula, M L is the low threshold of the gradient intensity in the image, δ x ,δ y are the offset values ​​in the gradient direction of the image respectively.

[0147] Further, the non-maximum suppression refers to assuming that there are 6 rectangular boxes, which are sorted according to the category classification probability of the classifier, and assuming that the probabilities of belonging to hardware screws from small to large are A, B, C, D, E, and F, respectively, so as to eliminate the stray response from edge detection, suppress isolated weak edges and finally complete the detection, including: S321, starting from the maximum probability rectangular box F, respectively determine whether the overlap IOU of A~E and F is greater than a certain set threshold; S322, if the overlap of B, D and F exceeds the threshold, remove B and D, and mark the first rectangular box F; S323, from the remaining rectangular boxes A, C, and E, select E with the largest probability, and then determine the overlap of E with A and C. If the overlap is greater than a certain threshold, remove it and mark the second rectangular box E; and so on, all the retained rectangular boxes are found; for each pixel point, compare the gradient values ​​of the two adjacent pixel points in the gradient direction, and only retain the pixel points with the largest gradient value in the gradient direction, which is conducive to eliminating the blurring effect on the edge.

[0148] S33, the threshold detection unit obtains a refined edge image in the image according to the following double threshold calculation formula (8), removes non-edge points in the image to determine real and potential edge information, and transmits it to the edge connection unit;

[0149] Where MH is the high threshold of gradient strength, Strong, Weak, and Non-edge are strong edge, weak edge, and non-edge, respectively.

[0150] Further explanation: the dual threshold detection refers to setting a high threshold and a low threshold for the pixel points of the hardware screw image. When the gradient value of the edge pixel point is greater than the high threshold, the edge is determined to be a strong edge; when the gradient value of the edge pixel point is lower than the lower threshold, it is determined to be a non-edge; when the gradient value of the edge pixel point is between the high threshold and the low threshold, it is determined to be a weak edge. Through the subsequent weak edge connection, the weak edge may be identified as an edge or may be ignored; the edge pixel points are divided into strong edges and weak edges, the high threshold is used to determine obvious edges, and the low threshold is used to help determine edges that may be caused by noise, thereby bringing better detection effects.

[0151] S34, the edge connection unit uses high and low thresholds to determine strong edges and weak edges and perform edge connection to form a final hardware screw edge image for subsequent extraction of image feature information.

[0152] Furthermore, the edge connection refers to connecting adjacent edge points to form a continuous edge line, and different connection strategies such as line segment connection and curve fitting can be used, that is, by connecting strong edge pixels and weak edge pixels adjacent to them; and using a high threshold to determine the main edge contour (strong edge), and using the weak edge obtained by the low threshold connected to the strong edge to fill the missing edge, and prevent the introduction of noise (weak edges not connected to the strong edge are zeroed), that is, connecting the weak edge with the strong edges around it to obtain a complete edge, thereby ensuring the continuity and integrity of the edge.

[0153] S40, the appearance inspection module obtains the complete edge image of the hardware screws and matches it with the pre-trained hardware screw surface abnormality problem information model to identify and classify the abnormalities in the image and transmit it to the processing center;

[0154] See also Fig.12 As shown, the step S40 includes the following steps:

[0155] S41, the peripheral extraction unit uses the peripheral edge line of the hardware screw as the contour line to extract the appearance shape of the screw and the feature information of the tip, thread, handle, and head, and transmits it to the inner periphery acquisition unit;

[0156] Furthermore, the boundary tracking algorithm refers to starting from a boundary point in the hardware screw image, searching for the next boundary point according to a certain discrimination criterion, so as to track the target boundary, including: 1) determining the starting search point of the boundary, the boundary discrimination criterion for judging whether a point is a boundary point, the search criterion for how to search for the next edge point, and the termination condition of the search; 2) starting from the lower left corner of the screw image, scanning point by point, and when encountering an edge point, tracking until the subsequent point returns to the starting point (for a closed line) or its subsequent point has no new subsequent point (for a non-closed line); 3) if it is a non-closed line, after tracking one side, it is necessary to start from the starting point and track in the opposite direction to the other end point; 4) if there is more than one subsequent point, the point with the closest distance is selected as the subsequent point according to the above connection criterion, and the other subsequent point that is closer is tracked separately as a new edge tracking point; 5) if a line is tracked, scan the next untracked point until all edges are tracked.

[0157] S42, the inner perimeter acquisition unit extracts the shapes of the holes, thread grooves, and countersunk grooves of the hardware screws through a scanning line seed filling algorithm for subsequent recognition and classification, and transmits them to the recognition and classification unit;

[0158] Furthermore, the scan line seed filling algorithm is a region filling algorithm used in computer graphics, starting from a given seed point, first filling an interval within a given region on the scan line where the seed point is located, then determining the intervals to be filled on the upper and lower scan lines adjacent to the interval, taking a seed point from each of these intervals and saving them in turn as the seed point for the next filling, repeating this process until all the saved intervals are filled, including: 1) establishing a stack for storing the right endpoints of each filling segment of each scan line, initially pushing the seed pixel into the stack; 2) filling the left and right pixels of the pixel popped out of the stack along the scan line until a boundary pixel is encountered, that is, for each pixel popped out of the stack, filling the entire continuous segment of the region containing the pixel; 3) checking whether the relevant pixels of the upper and lower scan lines adjacent to the current scan line are all boundary pixels or filled pixels; 4) if there are non-boundary, unfilled pixels, then pushing the leftmost pixel of each unfilled continuous segment into the stack as a new seed pixel until all areas are filled.

[0159] To further explain, the hole refers to a recessed text pattern such as a manufacturer's nameplate or trademark embedded on the surface of the screw; the threaded groove refers to a spiral linear groove, which can be tightly combined with the material structure after entering the material, thereby improving the firmness of the screw insertion; the countersunk groove is a groove with one or more notches set on the top of the screw head, which is divided into a slot, a cross slot, a square slot, a round slot, a hexagonal slot, etc., and can support the use of a screwdriver.

[0160] S43, the recognition and classification unit matches the image of the screw surface with pre-trained images of various abnormal problems on the surface of hardware screws and identifies the category of the screw and its appearance abnormality, and transmits it to the size detection unit;

[0161] Furthermore, the "pre-trained images of various abnormal problems on the surface of hardware screws" refer to the classification of various abnormal appearance problems such as surface scratches, rust, missing corners, burrs, etc. found in the production of hardware screws, and the establishment of an image database of abnormal problems. When abnormal problems are found during production, they can be compared with the previous historical abnormal problem images in the database to obtain the type of screws and their various abnormal appearance problems, and classify and collect the quality information of the screws, including various abnormal problems; the screw categories are divided into anti-slip head screws (with texture or grooves on the head), hexagonal head screws, cross head screws, and flat head screws according to the shape of the head.

[0162] S44. The dimension detection unit obtains the dimension data information of the diameter, pitch, length, and depth and width of the hole, thread groove, and countersunk groove of the hardware screw through a three-dimensional scanner.

[0163] Furthermore, the diameter, pitch and length of the hardware screws are the dimensional specifications required by national or industry standards; the depth and width of the holes, thread grooves and countersunk grooves of the screws are the dimensional specifications required by enterprises or customers, but are subject to compliance with national or industry standards, otherwise they are prohibited from entering the market for sale.

[0164] S50, the processing center compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and notified to rework or re-inspection;

[0165] Furthermore, the appearance quality standards of the hardware screws include smooth appearance, uniform color, no deformation, no foreign matter, no bubbles, no black spots, no scratches, no rust spots, and no other abnormalities in appearance, as well as compliance with various dimensions.

[0166] S60, the performance detection module detects the mechanical properties and corrosion properties of screws with qualified appearance and size through screw performance detection equipment to obtain the detection data of the mechanical properties and corrosion properties of the screws, and transmits the data to the processing center;

[0167] See also Fig.13 As shown, the step S60 includes the following steps:

[0168] S61. The mechanical testing unit performs mechanical property tests on the screws using a universal testing machine to obtain the tensile strength, yield strength, and tightening torque of the screws to ensure the service life of the screws, and transmits the results to the hardness testing unit;

[0169] Furthermore, the mechanical property test includes various mechanical property tests such as tension, compression, bending, torsion, impact, alternating stress, etc. of hardware screws to obtain corresponding tensile strength, yield strength, tightening torque, etc., wherein the tensile strength of the screw refers to the maximum tensile force of the screw when it is damaged by axial tension, which is generally between 300-1000 Newtons, and high-strength screws are above 1000 Newtons. Its size is proportional to the material hardness and diameter of the screw, and inversely proportional to the length of the screw, and is also related to the geometric shape of the thread and the thread processing technology; the yield strength of the screw refers to the critical point at which the screw begins to undergo plastic deformation when it is subjected to tension, which is generally between 180-480 Newtons, and its size is affected by factors such as the material, processing technology, and hardness of the screw; the tightening torque of the screw refers to the force required for the screw to be normally screwed into the workpiece material, which is generally between 1.6-35 kilograms of force, and its size is related to factors such as the material, hardness, hardness of the workpiece surface, and tip size of the screw.

[0170] S62, the hardness detection unit performs a hardness performance test on the screw through a hardness sensor to obtain corresponding hardness data of the Rockwell hardness, Brinell hardness, or Vickers hardness of the screw, and transmits the data to the corrosion resistance detection unit;

[0171] Furthermore, the Rockwell hardness refers to the hardness value determined by the depth of plastic deformation of the indentation, with 0.002 mm as the unit. The indentation is very small and the measurement value is limited. It belongs to non-destructive testing and is generally suitable for hardness testing of small screws; the Brinell hardness refers to the hardness value determined by the indentation diameter. The measurement value is accurate and does not belong to non-destructive testing. It is generally used for hardness testing of large screws or random inspection of small screws; the Vickers hardness refers to using a diamond right pyramid indenter with an angle of 136 degrees between the opposite faces to press into the surface of the material under test under a load of 120 kg, maintain the load for a certain period of time, remove the load, measure the diagonal length of the indentation, calculate the surface area of ​​the indentation, and divide the load value by the surface area of ​​the indentation to obtain the average pressure on the indentation surface, which is the Vickers hardness value (HV) of the screw, which is suitable for hardness measurement of extra-large screws.

[0172] S63. The corrosion resistance testing unit conducts a copper salt accelerated acetic acid salt spray test (CASS test) on the hardware screws in a salt spray chamber or a salt spray corrosion resistance test box to obtain the corrosion resistance performance data of the screws to ensure the corrosion resistance of the screws.

[0173] Furthermore, the copper salt accelerated acetic acid salt spray test (CASS test) refers to a test temperature of 50°C, in which a small amount of copper salt - copper chloride is added to the salt solution, which strongly induces corrosion on the surface of the screws. The corrosion rate is 8 times that of the neutral salt spray test (NSS test). The solution concentration should be 50g / L, the pH value should be in the range of 3.1 to 3.3, and the average speed of collecting the solution is measured after at least 24 hours. For every 2000px2 area, it should be 1 to 2ml / h. Under the simulated environment, the hardware screws can be used for a long time in a humid and corrosive environment without being damaged.

[0174] S70. The processing center compares the performance test data of the hardware screws with the performance test standards of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, the alarm is transmitted to the alarm and the rework or re-inspection is notified.

[0175] Furthermore, the performance testing standards for the hardware screws include tensile strength, yield strength, tightening torque, hardness, corrosion resistance and other performance indicators of the screws, which must comply with national or industry quality standards, and must also comply with the quality standards of the enterprise or customers, but must comply with national or industry quality standards first, otherwise they cannot be sold on the market; if the performance of the screws themselves is unqualified, they will be scrapped if the problem is serious, reworked if the problem is minor, and retested if it is for food testing.

[0176] It is further explained that the various steps are displayed in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows, unless clearly stated in this document. There is no strict order restriction for the execution of these steps, and these steps can also be executed according to other orders, and some steps can include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed and completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0177] The present invention provides a hardware screw quality detection and control system based on artificial intelligence, which also includes a computer device and a computer-readable storage medium; the computer device includes a memory and various functional modules, the memory stores a computer program, and when the various functional modules execute the computer program, the steps of the hardware screw quality detection method based on artificial intelligence are implemented in any one of the above; the computer-readable storage medium stores a computer program, and when the computer program is executed by the various functional modules, the steps of the hardware screw quality detection method based on artificial intelligence are implemented in any one of the above.

[0178] It is further explained that the computer-readable storage medium includes a memory, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program and instructions corresponding to a hardware screw quality detection method based on artificial intelligence in an embodiment of the present invention, including information transmission instructions of each module; the memory executes various functional applications and data processing of each module by running the stored non-volatile software programs and instructions, that is, realizes a hardware screw quality detection method based on artificial intelligence in the above method embodiment; one or more units are stored in the memory, and when executed by the one or more modules, a hardware screw quality detection method based on artificial intelligence in any of the above method embodiments is executed; the computer-readable storage medium stores computer executable instructions, which are executed by one or more modules, and can also be a hardware screw quality detection method based on artificial intelligence in any of the above method embodiments.

[0179] Further explanation, the present invention is described according to the content implemented by a software program of a hardware screw quality detection control system based on artificial intelligence. For each hardware screw quality detection method based on artificial intelligence, it is divided into several modules or units to implement the software program instructions generated by each step. The software program instructions include the above-mentioned hardware screw quality detection method based on artificial intelligence.

[0180] The present invention provides a hardware screw quality inspection and control system based on artificial intelligence, which also includes a hardware screw quality inspection and control device based on artificial intelligence, which is implemented by using the above-mentioned hardware screw quality inspection and control system based on artificial intelligence and the above-mentioned hardware screw quality inspection method based on artificial intelligence; this device can be designed as a whole screw quality automatic inspection production line according to the needs of production costs, and can also be designed as independent automatic inspection equipment for each process, and then transmitted to each other through a transmission device.

[0181] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the attached claims rather than the above description, and therefore it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present application.

[0182] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application can be modified or replaced by equivalents, and all of these should be included in the scope of protection of the present application.

Claims

1. A hardware screw quality detection and control system based on artificial intelligence, characterized by: The detection control system includes an image acquisition module, a filter processing module, a threshold processing module, an appearance detection module, a performance detection module, a wireless communication module, an alarm, a memory, a processing center, and an intelligent remote control device; the image acquisition module, the filter processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, the alarm, and the memory are respectively connected to the processing center; the intelligent remote control device includes a smart phone, a tablet computer, and an intelligent remote control, which are automatically networked and connected to the wireless communication module within the range of a wireless network or the Internet; The wireless communication module is provided with a wireless network unit, which is responsible for sending and receiving wireless network signals and automatically networking with the intelligent remote control device within the range of a wireless network or the Internet; The alarm device compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory, and automatically sounds an alarm and notifies rework or re-inspection if there is any inconsistency; and compares the performance test data of the hardware screws with the performance test standard of the hardware screws stored in the memory, and automatically sounds an alarm and notifies rework or re-inspection if there is any inconsistency; The memory is responsible for storing information of the image acquisition module, the filter processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, and the alarm, as well as the appearance quality standards and performance detection standards of the hardware screws; The processing center is responsible for information transmission among the image acquisition module, the filtering processing module, the threshold processing module, the appearance detection module, the performance detection module, the wireless communication module, the alarm, and the memory. It is the hub of the system and compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and a notice is given to rework or re-inspection; and the performance detection data of the hardware screws are compared with the performance detection standard of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, they are transmitted to the alarm and a notice is given to rework or re-inspection; The image acquisition module includes an image translation unit, a mirror transformation unit, a transposition exchange unit, a zoom processing unit, and a rotation adjustment unit. The image of the hardware screw to be tested is obtained through a set high-definition camera and pre-processed to correct the systematic error and random error of the image, and then transmitted to the filtering processing module; The filtering processing module includes a grayscale processing unit, a filtering denoising unit, and a convolution operation unit. The grayscale image of the hardware screws is subjected to Gaussian filtering and smoothing processing through a Gaussian filter to reduce the influence of noise, so as to facilitate subsequent gradient calculation and pass it to the threshold processing module; The threshold processing module includes a gradient calculation unit, a thinning edge unit, a threshold detection unit, and an edge connection unit. It calculates the gradient amplitude and direction of the grayscale image and performs double threshold processing to obtain edge information of strong edges, weak edges, and non-edges, and transmits it to the appearance detection module; The appearance detection module includes a peripheral extraction unit, an inner perimeter acquisition unit, an identification and classification unit, and a size confirmation unit. It obtains a complete hardware screw edge image and matches it with a pre-trained hardware screw surface abnormality problem information model to identify and classify the abnormalities in the image and transmit it to the processing center; The performance testing module includes a mechanical testing unit, a hardness testing unit, and a corrosion resistance testing unit. The screw performance testing equipment is used to test the mechanical properties and corrosion properties of screws that meet the requirements of appearance and size to obtain the test data of the mechanical properties and corrosion properties of the screws, and transmit the data to the processing center.

2. A hardware screw quality detection method based on artificial intelligence, characterized in that: Applied to a hardware screw quality detection and control system based on artificial intelligence, the detection method comprises the following steps: S10, when detecting screws, the image acquisition module obtains the image of the hardware screw to be tested through the set high-definition camera and performs preprocessing to correct the systematic error and random error of the image, and transmits it to the filtering processing module; S20, the filtering processing module performs Gaussian filtering and smoothing processing on the grayscale image of the hardware screws through a Gaussian filter to reduce the influence of noise for subsequent gradient calculation, and transmits it to the threshold processing module; S30, the threshold processing module calculates the gradient amplitude and direction of the grayscale image and performs double threshold processing to obtain edge information of strong edge, weak edge and non-edge, and transmits it to the appearance detection module; S40, the appearance inspection module obtains a complete hardware screw edge image and matches it with a pre-trained hardware screw surface abnormality problem information model to identify and classify the abnormalities in the image and transmit it to the processing center; S50, the processing center compares the appearance / size quality information of the hardware screws with the appearance quality standard of the hardware screws stored in the memory: if they are consistent, they are transmitted to the performance detection module; if they are inconsistent, they are transmitted to the alarm and notified to rework or re-inspection; S60, the performance detection module detects the mechanical properties and corrosion properties of screws with qualified appearance and size through screw performance detection equipment to obtain the detection data of the mechanical properties and corrosion properties of the screws, and transmits the data to the processing center; S70, the processing center compares the performance test data of the hardware screws with the performance test standards of the hardware screws stored in the memory: if they are consistent, it means that the screws are qualified and placed in the qualified area; if they are inconsistent, the alarm is transmitted to the alarm and the rework or re-inspection is notified; Described step S10, comprises the following steps: S11, the image translation unit translates all the pixels in the image of the hardware screw horizontally or vertically according to a predetermined translation amount according to the image translation rule to obtain a translated screw image, and transmits it to the mirror transformation unit; S12, the mirror transformation unit performs left-right and up-down axisymmetric transformation on the translated hardware screw image with the vertical and horizontal central axes as the center to obtain a mirrored screw image, and transmits it to the transposition exchange unit; S13, the transposition exchange unit exchanges the height and width of the mirrored hardware screw image x coordinate and y coordinate according to the following transposition transformation formula (1) to obtain a transposed screw image, and transmits it to the scaling processing unit. S14, the scaling processing unit enlarges or reduces the size of the transposed hardware screw image according to the specified ratio according to the following scaling ratio formulas (2) and (3) to obtain a scaled screw image, and transmits it to the rotation adjustment unit. Where Sx is the scaling ratio of the image in the x-axis direction, and Sy is the scaling ratio in the y-axis direction; S15, the rotation adjustment unit rotates the scaled hardware screw image around a specified point by a certain angle according to the following rotation calculation formulas (4) and (5) to meet the requirements of subsequent filtering. Described step S20, comprises the following steps: S21, the grayscale processing unit obtains the grayscale pixel value according to the grayscale calculation formula "Ig=0.299*IR+0.587*IG+0.114*IB, Ig is the grayscale pixel value, IR, IG, IB are the pixel values ​​on the red, green, and blue channels of the corresponding pixel of the original image respectively", performs grayscale processing, and passes it to the filtering and denoising unit; S22, the filtering and denoising unit calculates the Gaussian filter formula "G(x, y) = 1 / (2πσ 2 )*exp(-(x2+y2) / 2σ 2 ), G(x, y) is the Gaussian function, σ is the standard deviation of the filter, exp(-(x 2 +y 2 ) / 2σ 2 ) is an exponential function to obtain the denoised image and pass it to the convolution operation unit; S23, the convolution operation unit calculates the gradient value in the horizontal direction of the image and the gradient value in the vertical direction of the image according to the following Sobel operator calculation formula (6) for subsequent double threshold processing. In the formula, Gx and Gy are the gradient values ​​in the horizontal and vertical directions respectively, and * is the convolution operator; Described step S30, comprises the following steps: S31, the gradient calculation unit calculates the gradient brightness according to the formula " θ(x, y) = tan -1 (Gy(x, y) / Gx(x, y)), M(x, y) is the gradient intensity of the pixel, θ(x, y) is the gradient direction of the pixel" to obtain the intensity and direction of the pixel brightness and pass it to the refined edge unit; S32, the edge refinement unit obtains the pixel point with the maximum local gradient value in the image after refinement according to the following non-maximum suppression calculation formula (7) to eliminate the blur effect on the edge to make it clearer, and transmits it to the threshold detection unit; Where ML is the lower threshold of the gradient intensity in the image, and δx and δy are the offset values ​​of the gradient direction in the image. S33, the threshold detection unit obtains a refined edge image in the image according to the following double threshold calculation formula (8), removes non-edge points in the image to determine the real and potential edge information, and transmits it to the edge connection unit, Where MH is the high threshold of gradient strength, Strong, Weak, and Non-edge are strong edge, weak edge, and non-edge, respectively; S34, the edge connection unit uses high and low thresholds to determine strong edges and weak edges and perform edge connection to form a final hardware screw edge image for subsequent extraction of image feature information; The step S40 comprises the following steps: S41, the peripheral extraction unit uses the peripheral edge line of the hardware screw as the contour line to extract the appearance shape of the screw and the feature information of the tip, thread, handle, and head of the screw through the boundary tracking algorithm, and transmits it to the inner periphery acquisition unit; S42, the inner perimeter acquisition unit extracts the shapes of the holes, thread grooves, and countersunk grooves of the hardware screws through a scanning line seed filling algorithm for subsequent recognition and classification, and transmits them to the recognition and classification unit; S43, the recognition and classification unit matches the image of the screw surface with pre-trained images of various abnormal problems on the surface of hardware screws, recognizes the category of the screw and its appearance abnormality, and transmits it to the size detection unit; S44, the dimension detection unit obtains the dimension data information of the diameter, pitch, length, and depth and width of the hole, thread groove, and countersunk groove of the hardware screw through a three-dimensional scanner; The step S60 comprises the following steps: S61, the mechanical testing unit performs mechanical property tests on the screws using a universal testing machine to obtain the tensile strength, yield strength, and tightening torque of the screws to ensure the service life of the screws, and transmits the results to the hardness testing unit; S62, the hardness detection unit performs a hardness performance test on the screw through a hardness sensor to obtain corresponding hardness data of the Rockwell hardness, Brinell hardness, or Vickers hardness of the screw, and transmits the hardness data to the corrosion resistance detection unit; S63. The corrosion resistance testing unit conducts a copper salt accelerated acetic acid salt spray test (CASS test) on the hardware screws in a salt spray chamber or a salt spray corrosion resistance test box to obtain the corrosion resistance performance data of the screws to ensure the corrosion resistance of the screws.

3. According to the artificial intelligence-based hardware screw quality detection and control system of claim 1, it is characterized by: The detection and control system also includes a computer device and a computer-readable storage medium; the computer device includes a memory and various functional modules, the memory stores a computer program, and when the various functional modules execute the computer program, the steps of the metal screw quality detection method based on artificial intelligence described in claim 2 are implemented; the computer-readable storage medium stores a computer program, and when the computer program is executed by the various functional modules, the steps of the metal screw quality detection method based on artificial intelligence described in claim 2 are implemented.

4. According to the artificial intelligence-based hardware screw quality detection and control system of claim 1, it is characterized by: The detection and control system also includes an artificial intelligence-based hardware screw quality detection and control device, which is implemented by the artificial intelligence-based hardware screw quality detection and control system described in claims 1 and 3 and the artificial intelligence-based hardware screw quality detection method described in claim 2.

Citation Information

Patent Citations

  • Screw quality detection method and device, electronic equipment and storage medium

    CN117147290A