3D visual detection system and method for coupler knuckle and storage medium
Through the hook tongue 3D visual detection system, 3D vision sensors and convolutional neural networks are used to realize automated detection of the hook tongue, which solves the problems of low detection efficiency and poor accuracy in the existing technology and improves the efficiency and accuracy of hook tongue detection.
Patent Information
- Application Number
- CN202410603091.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-30
AI Technical Summary
It is difficult to achieve efficient and accurate automated detection of railway freight car knuckles with existing technology, especially because the knuckle aperture detection accuracy is poor and manual detection efficiency is low.
A 3D visual inspection system for hook and tongue is designed, including an inspection table, an automatic conveyor device, a robot arm, an image acquisition device and a controller. It uses 3D visual sensors and convolutional neural networks to identify hook and tongue codes and parameters to achieve automated detection.
It improves the efficiency and accuracy of hook and tongue detection, realizes automated and intelligent detection, reduces manual input fatigue, and ensures the accuracy of the factory quality of hook and tongue.
Smart Images

Figure CN118565334A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hook tongue detection, and in particular to a hook tongue 3D visual detection system, method and storage medium. Background Art
[0003] The hook tongue of railway freight cars is a key component for the safe operation of vehicles at high speed and with heavy loads. Automatic three-dimensional quality inspection of the hook tongue has always been an urgent problem to be solved. The existing measurement technology is manual sample comparison measurement or three-dimensional coordinate measuring machine measurement. The efficiency of manual sample inspection is low, and the dimensional inspection accuracy is difficult to control. The three-dimensional coordinate inspection has high accuracy, but it cannot meet the on-site inspection requirements. In addition, the on-site inspection of the hook tongue aperture usually uses a universal gauge, which is inconvenient to inspect and has poor accuracy. Summary of the invention
[0004] In response to the above technical problems, the present invention creates a hook tongue 3D visual detection system, method and storage medium, which can automatically transport and detect the hook tongue and identify the hook tongue coding information, improve the detection efficiency and accuracy, and realize automation and intelligence.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention includes four aspects.
[0006] In a first aspect, a hook tongue 3D visual detection system is provided, comprising:
[0007] A testing table with testing stations;
[0008] An automatic conveying device provided on the testing table is used to convey the hook tongue to the testing station;
[0009] A robot is arranged at the inspection station; the arm of the robot can move along a preset inspection path;
[0010] An image acquisition device is arranged on the robot arm; the image acquisition device follows the movement of the robot arm to perform 3D visual scanning on the hook tongue;
[0011] And a controller connected to the image acquisition device; the controller includes an image processing module for processing the acquired image, a code recognition module for identifying the hook tongue code, and a hook tongue recognition module for identifying whether the hook tongue parameters are qualified.
[0012] In some embodiments, the detection path of the robot arm moves along the front of the hook tongue, above the hook tongue, the right side of the hook tongue, and the upper and lower left side of the hook tongue in sequence; the image acquisition device collects image information from the front, above, right side, and upper and lower left side of the hook tongue in sequence, and converts the image information into three-dimensional point cloud data information of the hook tongue.
[0013] In some embodiments, the coding recognition module is used to recognize the character number according to the scanning information of the right side of the hook tongue; the hook tongue recognition module includes:
[0014] A hook knuckle S-surface information recognition unit for measuring the hook knuckle S-surface width and S-surface height difference based on the hook knuckle front scanning information, so as to determine the hook knuckle model and whether the hook knuckle is bulging;
[0015] A hook knuckle locking surface thickness identification unit for measuring whether the hook knuckle thickness is qualified based on the scanning information above the hook knuckle;
[0016] A hook knuckle lock iron penetration amount identification unit for measuring whether the hook knuckle lock iron penetration amount is qualified according to the scanning information on the upper left side of the hook knuckle;
[0017] And a hook tongue S-surface thickness and pin hole diameter identification unit for measuring whether the hook tongue S-surface thickness and the pin hole diameter are qualified according to the lower left side of the hook tongue.
[0018] In some embodiments, the encoding recognition module includes:
[0019] A character recognition model building unit, used for building an optical character recognition model through a convolutional neural network;
[0020] The attention mechanism unit is used to add the attention mechanism to the convolutional neural network to obtain a convolutional neural network model based on attention memory;
[0021] A data set determination unit, used for taking a plurality of hook-tongue coding sample data as a hook-tongue coding recognition training set;
[0022] The training unit is used to perform data augmentation on the hook-tongue code recognition training set by using one or more methods of rotation, noise addition, brightness adjustment and contrast adjustment, so as to use the hook-tongue code recognition training set to train the convolutional neural network model based on the attention mechanism, and compare the various training results to select appropriate model parameters to obtain the hook-tongue code recognition model.
[0023] In some embodiments, the image acquisition device includes a 3D vision sensor; the 3D vision sensor has a built-in calibration file for performing coordinate transformation on the scanned hook tongue image to acquire three-dimensional point cloud data information of the hook tongue.
[0024] In some embodiments, the image processing module includes:
[0025] A preprocessing unit for preprocessing the three-dimensional point cloud data information of the hook tongue;
[0026] A hook tongue three-dimensional model building unit connected to the preprocessing unit is used to triangulate the preprocessed three-dimensional point cloud data to obtain a hook tongue three-dimensional network model;
[0027] And a registration unit connected to the hook-tongue three-dimensional model building unit is used to register the hook-tongue three-dimensional network model using the hook-tongue sample model.
[0028] In some embodiments, the inspection station is provided with a photoelectric detector for detecting whether the hook tongue is delivered to the position, and the photoelectric detector is connected to the controller. When the controller receives the hook tongue detection signal from the photoelectric detector, it controls the automatic conveying device to stop and controls the robot to scan the hook tongue along the transportation inspection path.
[0029] In a second aspect, a hook tongue 3D visual detection method is provided, the detection method is implemented by the aforementioned detection system, and the detection method comprises the following steps:
[0030] Obtain the signal that the hook tongue reaches the detection station to send an execution signal to the robot;
[0031] Control the robot to move along a preset detection path to drive the image acquisition device to perform 3D scanning on the hook tongue to obtain hook tongue image information;
[0032] The hook tongue image information is converted into coordinates through a preset calibration file to form three-dimensional point cloud data information of the hook tongue in 3D visual coordinates;
[0033] Processing the three-dimensional point cloud data information to remove discrete point clouds from the three-dimensional point cloud data information;
[0034] According to the pre-processed three-dimensional point cloud data information, the hook tongue parameter information is identified, whether the identified hook tongue parameters are qualified is determined, and the identification result is output;
[0035] Performing detection processing on the pre-processed three-dimensional point cloud data information to determine the target area containing the hook-tongue character;
[0036] The target area is identified to obtain the hook-tongue character information content and determine the hook-tongue coding information.
[0037] In some embodiments, the controlling the robot to move along a preset detection path includes: controlling the robot to move along the detection path along the front of the hook tongue, above the hook tongue, the right side of the hook tongue, and above and below the left side of the hook tongue in sequence;
[0038] The method of identifying hook tongue parameter information according to the pre-processed three-dimensional point cloud data information, determining whether the hook tongue parameters are qualified, and outputting the identification result includes:
[0039] Determine the S-surface width and S-surface height difference of the hook tongue according to the front data of the hook tongue in the preprocessed three-dimensional point cloud data information;
[0040] Determine the thickness of the locking surface of the hook tongue according to the upper scanning information of the hook tongue in the pre-processed three-dimensional point cloud data information;
[0041] According to the scanning information of the upper and lower left sides of the hook tongue in the pre-processed three-dimensional point cloud data information, the insertion amount of the hook tongue lock iron, the thickness of the hook tongue S surface and the pin hole diameter are determined;
[0042] Compare the S-surface width with the hook knuckle models pre-stored in the database one by one to determine the model of the identified hook knuckle;
[0043] Compare the height difference of the S surface with the preset height difference to determine whether the hook tongue bulges outward;
[0044] The locking surface thickness, S surface thickness and pin hole diameter of the hook tongue are compared with the hook tongue parameters of this model to determine whether the identified hook tongue is qualified and output the identification result.
[0045] In some embodiments, the identifying the target area to obtain the hook-tongue character information content and determine the hook-tongue coding information includes:
[0046] Add attention mechanism to convolutional neural network, and then build a convolutional neural network model based on attention mechanism;
[0047] Acquire multiple hook-tongue coding sample data and use them as hook-tongue coding recognition training sets;
[0048] The hook-tongue coding recognition training set is augmented by one or more methods including rotation, noise addition, brightness adjustment and contrast adjustment, so as to train the convolutional neural network model based on the attention mechanism using the hook-tongue coding recognition training set, and the various training results are compared to select appropriate model parameters, so as to obtain the hook-tongue coding recognition model;
[0049] The target area is identified through the hook-tongue coding recognition model to obtain the hook-tongue character information content and determine the hook-tongue coding information.
[0050] In some embodiments, the hook tongue image information is converted into coordinates through a preset calibration file to form three-dimensional point cloud data information of the hook tongue in 3D visual coordinates, including:
[0051] Calibrate the image acquisition device to obtain an intrinsic parameter matrix, a selection matrix and a translation vector;
[0052] Calibrate the light plane to obtain the light plane equation;
[0053] Calibrate the automatic conveying device to obtain the cosine value of the angle between the moving direction of the automatic conveying device and the three coordinate axes of the coordinate system of the image acquisition device;
[0054] Extract the pixel coordinates of the center line of the hook tongue according to the hook tongue image information and convert them into homogeneous coordinates;
[0055] Calculate the normalized coordinates of the three-dimensional image acquisition device according to the homogeneous coordinates and the internal parameter matrix;
[0056] Substituting the coordinates of the three-dimensional image acquisition device into the light plane equation to determine the actual coordinates of the image acquisition device;
[0057] Adding the image acquisition device coordinates to the parameters obtained by calibration of the automatic conveying device to be aligned to the same image acquisition device coordinate system;
[0058] The image acquisition device coordinate system is converted into the world coordinate system by using the translation vector according to the rotation matrix to form the three-dimensional point cloud data information of the hook tongue in the 3D visual coordinates.
[0059] According to a third aspect, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the aforementioned detection method are performed.
[0060] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program that can be executed by one or more processors, and the computer program can be used to implement the steps of the aforementioned detection method.
[0061] Compared with the prior art, one or more embodiments of the above scheme may have the following advantages or beneficial effects:
[0062] The present application provides a hook tongue 3D visual inspection system, method and storage medium, which can realize the automatic inspection and conveying operation of the hook tongue, and can enter the inspection process as soon as the inspection is carried out. The inspection work efficiency is high, and the inspection process is automated and intelligent, realizing the "machine instead of people" inspection process, speeding up the hook tongue inspection progress, and combining with 3D visual monitoring technology to realize all-round inspection and monitoring, improve the quality of the hook tongue before leaving the factory, and the inspection accuracy is accurate and error-free; not only the basic information of the hook tongue is detected, but also the coding information of the hook tongue can still be identified in a complex background, realizing the automation and intelligence of the hook tongue information entry process, and solving the problem of fatigue of staff in manual entry. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Hereinafter, the present application will be described in more detail based on embodiments and with reference to the accompanying drawings;
[0064] Figure 1 This is a schematic diagram of an exemplary structure of a hook-knuckle 3D visual detection system in Embodiment 1 of the present invention;
[0065] Figure 2A schematic diagram of the connection relationship of the controller of the detection system in an embodiment of the present invention;
[0066] Figure 3 A schematic diagram of the connection relationship of the image processing modules in the detection system in an embodiment of the present invention;
[0067] Figure 4 A schematic diagram of the connection relationship of the code recognition module in the detection system in an embodiment of the present invention;
[0068] Figure 5 Schematic diagram of the connection relationship of the hook tongue recognition module in the detection system in the embodiment of the present invention;
[0069] Figure 6 It is a schematic flow chart of a hook tongue 3D visual detection method in Embodiment 2 of the present invention;
[0070] Figure 7 In the embodiment of the present invention, Figure 6 An exemplary flow chart of step S3 shown in FIG.
[0071] Figure 8 In the embodiment of the present invention, Figure 6 An exemplary flow chart of step S4 shown in;
[0072] Fig. 9 In the embodiment of the present invention, Figure 6 An exemplary flow chart of step S5 shown in;
[0073] Fig.10 In the embodiment of the present invention, Figure 6 An exemplary flow chart of step S7 shown in FIG.
[0074] Fig.11 A schematic block diagram of an electronic device provided in Embodiment 3 of the invention;
[0075] Fig.12 This is a schematic diagram of a readable storage medium provided in Embodiment 4 of the invention.
[0076] In the figure, 1. testing table; 2. automatic conveying device; 3. robot; 4. image acquisition device; 41. 3D visual sensor; 5. controller; 51. image processing module; 511. preprocessing unit; 512. hook tongue three-dimensional model building unit; 513. registration unit; 52. encoding recognition module; 521. character recognition model building unit; 522. attention mechanism unit; 523. data set determination unit; 524. training unit; 53. hook tongue recognition module; 531. hook tongue S-surface information recognition unit; 532. hook tongue lock surface thickness recognition unit; 533. hook tongue lock iron penetration recognition unit; 534. hook tongue S-surface thickness and pin hole diameter recognition unit; 6. photoelectric detector; 7. hook tongue; 21. memory; 22. processor; 31. computer program.
[0077] In the drawings, the same reference numerals are used for the same components, and the drawings are not drawn to scale. DETAILED DESCRIPTION
[0078] The present disclosure is further described below in conjunction with the embodiments shown in the accompanying drawings.
[0079] Embodiment 1:
[0080] The embodiment of the present invention discloses a hook tongue 3D visual detection system, such as Figure 1 and Figure 2 As shown, the detection system includes a detection platform 1, an automatic conveying device 2, a robot 3, an image acquisition device 4 and a controller 5; the detection platform 1 is provided with a detection station for detecting the hook tongue 7, the automatic conveying device 2 is arranged on the detection platform 1, and can sequentially deliver multiple hook tongues 7 to the detection station for detection; the robot 3 is arranged on the detection station, and its arm can move along a preset detection path; the image acquisition device 4 is installed on the arm of the robot 3, so that when the robot 3 moves, the image acquisition device 4 drives the image acquisition device 4 to perform 3D visual scanning on the hook tongue 7; the controller 5 is connected to the image acquisition device 4, and is used to receive information sent by the image acquisition device 4. The controller 5 includes an image processing module 51 for processing the captured image, a code recognition module 52 for identifying the code of the hook tongue 7, and a hook tongue recognition module 53 for identifying whether the parameters of the hook tongue 7 are qualified. Through the detection system, the hook tongue 7 can be automatically conveyed and detected, and the coding information of the hook tongue 7 can be identified, so as to improve the detection efficiency and accuracy, and realize automation and intelligence.
[0081] In some embodiments, a photoelectric detector 6 for detecting whether the hook tongue 7 is delivered to the detection station is provided, and the photoelectric detector 6 is connected to the controller 5. When the controller 5 receives the signal of the photoelectric detector 6 detecting the hook tongue 7, it controls the automatic conveying device 2 to stop, and controls the robot 3 to scan the hook tongue 7 along the transportation detection path. Specifically, the photoelectric detector 6 is a photoelectric proximity sensor, and the photoelectric proximity sensor detects that the hook tongue 7 has arrived at the detection station, and the robot 3's mechanical arm and the image acquisition device 4 can be driven to scan all the data on the surface of the hook tongue 7, so as to realize high-precision automatic scanning of the hook tongue 7 and improve automation.
[0082] In some embodiments, the automatic conveying device 2 includes a conveyor belt and a servo motor, and the servo motor is connected to the conveyor belt so as to drive the conveyor belt to convey the hook tongue 7. The servo motor is connected to and controlled by the controller 5. When the controller 5 obtains the detection signal that the hook tongue 7 reaches the detection station, the controller 5 controls the servo motor to shut down. After the image acquisition device 4 and the controller 5 complete the detection of the hook tongue 7 at the detection station, the controller 5 controls the servo motor to turn on, so as to convey the next hook tongue 7 to the detection station for detection.
[0083] In some embodiments, Figure 2 As shown, the image acquisition device 4 includes a 3D vision sensor 41; the 3D vision sensor 41 has a built-in calibration file for performing coordinate conversion on the scanned image of the hook tongue 7 to collect three-dimensional point cloud data information of the hook tongue 7. Specifically, the image acquisition device 4 uses a SCHNOKA SNK-SV-200 series high-precision 3D vision sensor 41, which scans the hook tongue 7 and supports high-speed surface data acquisition of up to 64K per second. The number of point clouds per second exceeds 1.2 billion pixel data, and each subtle feature of the hook tongue 7 is clearly presented without missing any defects. The built-in calibration file can be used to convert the acquired image through the calibration file to form 3D three-dimensional point cloud data information, which is convenient for subsequent recognition operations.
[0084] Furthermore, in the present embodiment, the detection path of the robot 3 arm moves in sequence along the front of the hook tongue 7, above the hook tongue 7, the right side of the hook tongue 7, and the upper and lower left sides of the hook tongue 7; the image acquisition device 4 acquires image information of the front, above, right side, and upper and lower left sides of the hook tongue 7 in sequence, and converts the image information into three-dimensional point cloud data information of the hook tongue 7. Among them, the controller 5 determines the S surface width and S surface height difference of the hook tongue 7 by scanning the front side of the hook tongue 7 through the image acquisition device 4, so as to first judge the model of the hook tongue 7 by the S surface width of the hook tongue 7, and then compare the S surface height difference with the standard S surface height difference of the model of the hook tongue 7 to judge whether the detected hook tongue 7 is bulging; then the controller 5 measures the thickness of the lock surface of the hook tongue 7 through the information collected above the hook tongue 7, and then judges whether the lock surface thickness of the hook tongue 7 is within the normal threshold range; then, the controller 5 identifies the character number of the hook tongue 7 through the information on the right side of the hook tongue 7, so as to facilitate the direct entry of the coded characters of the hook tongue 7; finally, the controller 5 measures whether the locking iron seating amount of the hook tongue 7 is qualified through the upper left side of the hook tongue 7, and measures whether the S surface thickness and the pin hole diameter of the hook tongue 7 are qualified through the lower left side of the hook tongue 7. By setting the scanning path, not only the basic parameters of the hook tongue 7 can be scanned, but also the character code of the hook tongue 7 can be identified, so that the character code of the hook tongue 7 and the parameter value of the hook tongue 7 are recorded synchronously, thereby realizing the automation and intelligent input of character information of the hook tongue 7 casting, avoiding the repetitive labor of staff in visually reading and manually entering characters.
[0085] In some embodiments, Figure 3 As shown, the image processing module 51 includes:
[0086] A preprocessing unit 511 for preprocessing the three-dimensional point cloud data information of the hook tongue 7;
[0087] A hook tongue three-dimensional model building unit 512 connected to the preprocessing unit 511 is used to triangulate the preprocessed three-dimensional point cloud data to obtain a three-dimensional network model of the hook tongue 7;
[0088] And the registration unit 513 connected to the hook tongue three-dimensional model building unit 512 is used to register the hook tongue 7 three-dimensional network model using the hook tongue 7 sample model.
[0089] Among them, the preprocessing unit 511 is connected to the image acquisition device 4, and can receive the three-dimensional point cloud data information of the hook tongue 7 fed back by the image acquisition device 4. After the preprocessing unit 511 preprocesses the three-dimensional point cloud data information of the hook tongue 7, it removes discrete point clouds from the three-dimensional point cloud data information, and then triangulates the preprocessed data information. Finally, it further uses the hook tongue 7 sample model for alignment, and can accurately determine the recognition area in the three-dimensional point cloud data, so as to combine the deep learning algorithm to perform real-time analysis and recognition, thereby realizing automated analysis and accurately obtaining the effect of analysis results.
[0090] In some embodiments, the code recognition module 52 is used to recognize the character number according to the scanning information on the right side of the hook tongue 7; Figure 5 As shown, the hook tongue identification module 53 includes:
[0091] A hook knuckle S surface information identification unit 531 for measuring the S surface width and S surface height difference of the hook knuckle 7 according to the front scanning information of the hook knuckle 7, so as to determine the model of the hook knuckle 7 and whether the hook knuckle 7 is bulging;
[0092] A hook tongue locking surface thickness identification unit 532 for measuring whether the thickness of the hook tongue 7 is qualified according to the scanning information above the hook tongue 7;
[0093] A hook tongue locking iron penetration amount identification unit 533 for measuring whether the locking iron penetration amount of the hook tongue 7 is qualified according to the scanning information on the upper left side of the hook tongue 7;
[0094] And a hook tongue S surface thickness and pin hole diameter identification unit 534 is used to measure the hook tongue 7 S surface thickness and pin hole diameter based on the lower left side of the hook tongue 7 to determine whether they are qualified.
[0095] Among them, Figure 5 As shown, the hook tongue identification module 53 also includes a hook tongue basic parameter identification unit for determining various basic parameters of the hook tongue based on the hook tongue scanning information. In this embodiment, the hook tongue S-surface information identification unit 531, the hook tongue lock surface thickness identification unit 532, the hook tongue lock iron penetration amount identification unit 533 and the hook tongue S-surface thickness and pin hole diameter identification unit 534 are all connected to the hook tongue 7 basic parameter identification unit, so that it is possible to quickly determine whether the various basic parameters of the hook tongue 7 are qualified, and then directly feedback to the staff for viewing through the display device, so as to facilitate timely identification of unqualified hook tongues 7.
[0096] In some embodiments, in order to improve the accuracy of hook tongue 7 coding recognition, as Figure 4 As shown, the coding identification module 52 of the hook tongue 7 includes:
[0097] A character recognition model building unit 521, used to build an optical character recognition model through a convolutional neural network;
[0098] An attention mechanism unit 522, used for adding an attention mechanism to the convolutional neural network to obtain a convolutional neural network model based on attention memory;
[0099] A data set determination unit 523, used to use a plurality of hook tongue 7 coding sample data as a hook tongue 7 coding recognition training set;
[0100] The training unit 524 is used to perform data augmentation on the hook-tongue 7 code recognition training set by using one or more methods such as rotation, noise addition, and adjustment of brightness and contrast, so as to train the convolutional neural network model based on the attention mechanism using the hook-tongue 7 code recognition training set, and compare the various training results to select appropriate model parameters to obtain the hook-tongue 7 code recognition model.
[0101] Furthermore, the optical character recognition model is constructed end-to-end based on convolutional recurrent neural network and connected time domain classification. The convolution layer of the recognition model is simplified and improved based on VGGNet16. The data augmentation method of rotation, noise addition, brightness and contrast adjustment is used to solve the problem of small number of samples. By comparing and selecting appropriate model parameters, the recognition of the identification characters of casting workpieces under low contrast is realized. Combined with the attention mechanism of deep learning based on tense flow, it is used for text recognition. The attention mechanism is used to model the sequence, and image features can be selectively used, and end-to-end training can be performed using the standard back propagation algorithm to improve the detection and recognition accuracy.
[0102] Embodiment 2:
[0103] This embodiment provides a hook tongue 3D visual detection method, which is implemented by a detection system of embodiment 1, such as Figure 6 As shown, the detection method includes: obtaining a signal that the hook tongue reaches the detection station to send an execution signal to the robot; controlling the robot to move along a preset detection path to drive the image acquisition device to perform 3D scanning on the hook tongue to obtain hook tongue image information; performing coordinate conversion on the hook tongue image information through a preset calibration file to form three-dimensional point cloud data information of the hook tongue on the 3D visual coordinates; processing the three-dimensional point cloud data information to remove discrete point clouds from the three-dimensional point cloud data information; identifying hook tongue parameter information based on the preprocessed three-dimensional point cloud data information, judging whether the identified hook tongue parameters are qualified, and outputting the identification result; detecting and processing the preprocessed three-dimensional point cloud data information to determine the target area containing the hook tongue characters; identifying the target area to obtain the hook tongue character information content and determine the hook tongue coding information. Through this detection method, the transportation and detection of the hook tongue can be automatically controlled, and when detecting and identifying the hook tongue, it not only detects whether the basic information of the hook tongue is qualified, but also identifies the coding information of the hook tongue, thereby facilitating the one-to-one recording of the identified hook tongue information, realizing automation and intelligence, reducing manual entry and operation risks, improving maintenance efficiency, and realizing high-precision and high-efficiency detection of the hook tongue.
[0104] Some embodiments and examples of the present disclosure are described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the disclosure and are not used to limit the present disclosure.
[0105] Reference Figure 6 As shown, the hook tongue 3D visual detection method includes the following steps S1 to S7.
[0106] S1. Obtain the signal that the hook tongue reaches the detection station to send an execution signal to the robot.
[0107] In some embodiments, the hook tongue is transported to the inspection station by an automatic conveying device, and a photoelectric sensor on one side of the inspection station is used to detect whether the hook tongue has reached the inspection station. When the hook tongue reaches the inspection station, the photoelectric sensor sends a signal to the controller, and the controller obtains the hook tongue arrival information and sends an execution signal to the robot to realize automatic conveyance of the hook tongue and automatic inspection of the hook tongue, thereby improving the automation effect.
[0108] S2. Control the robot to move along a preset detection path to drive the image acquisition device to perform 3D scanning on the hook tongue to obtain hook tongue image information.
[0109] In some embodiments, step S2 specifically includes: controlling the detection path of the robot to move sequentially along the front of the hook tongue, above the hook tongue, the right side of the hook tongue, and the upper and lower sides of the left side of the hook tongue.
[0110] When the robot moves along the steps of step S2, the image acquisition device uses 2.5D biased light technology to acquire the hook tongue code at multiple angles, so as to facilitate the subsequent accurate recognition of the hook tongue code.
[0111] S3. The image information of the hook tongue is converted into coordinates through a preset calibration file to form three-dimensional point cloud data information of the hook tongue in the 3D visual coordinates.
[0112] In some embodiments, step S3, such as Figure 7 As shown, including:
[0113] S31, calibrating the image acquisition device to obtain an intrinsic parameter matrix, a selection matrix, and a translation vector;
[0114] S32, calibrating the light plane to obtain a light plane equation;
[0115] S33, calibrating the automatic conveying device to obtain the cosine value of the angle between the moving direction of the automatic conveying device and the three coordinate axes of the coordinate system of the image acquisition device;
[0116] S34, extracting the pixel coordinates of the center line of the hook tongue according to the hook tongue image information, and converting them into homogeneous coordinates;
[0117] S35, calculating the normalized coordinates of the three-dimensional image acquisition device according to the homogeneous coordinates and the internal parameter matrix;
[0118] S36, substituting the coordinates of the three-dimensional image acquisition device into the light plane equation to determine the real coordinates of the image acquisition device;
[0119] S37, adding the image acquisition device coordinates to the parameters obtained by calibration of the automatic conveying device to unify them into the same image acquisition device coordinate system;
[0120] S38. Convert the image acquisition device coordinate system into a world coordinate system using a translation vector according to the rotation matrix to form three-dimensional point cloud data information of the hook tongue in the 3D visual coordinate system.
[0121] Specifically, the internal parameter matrix is recorded as M, the rotation matrix is recorded as R, and the translation vector is recorded as T; the light plane equation obtained after step S32 is AX C +BY C +CZ C +D=0, where A, B, C, D are the coefficients of the target light plane equation, and (Xc, Yc, Zc) are the three-dimensional point coordinates. The pixel coordinates (u, v) of the center line of the hook tongue under test are extracted and converted into homogeneous coordinates (u, v, 1).
[0122] The calculation station for calculating the normalized coordinates of the three-dimensional image acquisition device according to the homogeneous coordinates and the internal parameter matrix is:
[0123] Wherein, the normalized coordinates of the three-dimensional image acquisition device are (Xc', Yc', Zc');
[0124] Substitute the coordinates of the 3D image acquisition device into the light plane equation to determine the actual coordinates of the image acquisition device. The calculation formula for this step is:
[0125] The image acquisition device coordinates are added to the parameters obtained by the automatic conveyor device calibration to unify them into the same image acquisition device coordinate system, and the uniform conversion is performed using the following calculation formula:
[0126]
[0127] Where s is the interval between every two frames of images, n represents the nth captured image, and (θx, θy, θz) is the angle between the moving direction of the automatic conveying device and the three coordinate axes of the coordinate system of the image acquisition device.
[0128] According to the rotation matrix, the image acquisition device coordinate system is converted into the world coordinate system by using the translation vector to form the three-dimensional point cloud data information of the hook tongue in the 3D visual coordinates, which is converted by the following calculation formula:
[0129]
[0130] In the formula, R is the rotation matrix of the image acquisition device, and T is the translation vector of the image acquisition device.
[0131] S4. Processing the three-dimensional point cloud data information to remove discrete point clouds from the three-dimensional point cloud data information.
[0132] In some embodiments, Figure 8 As shown, step S4 includes,
[0133] S41, preprocessing the three-dimensional point cloud data information;
[0134] S42, triangulating the preprocessed three-dimensional point cloud data to obtain a three-dimensional network model of the hook tongue;
[0135] S43. Use the hook tongue sample model to align the hook tongue three-dimensional network model.
[0136] By processing the three-dimensional point cloud data information, a three-dimensional network model can be formed that can be recognized by both the coding recognition module and the hook tongue recognition module, thereby facilitating the accurate recognition of the hook tongue coding and the basic information of the hook tongue.
[0137] S5, identifying hook tongue parameter information according to the pre-processed three-dimensional point cloud data information, judging whether the hook tongue parameters are qualified, and outputting the identification result;
[0138] In some embodiments, Fig. 9 As shown, step S5 includes:
[0139] S51, determining the S-surface width and S-surface height difference of the hook tongue according to the front data of the hook tongue in the preprocessed three-dimensional point cloud data information;
[0140] S52, determining the thickness of the locking surface of the hook tongue according to the upper scanning information of the hook tongue in the preprocessed three-dimensional point cloud data information;
[0141] S53, determining the insertion amount of the hook tongue lock iron, the hook tongue S surface thickness, and the pin hole diameter according to the scanning information of the upper and lower left sides of the hook tongue in the preprocessed three-dimensional point cloud data information;
[0142] S54, comparing the width of the S surface with the hook tongue models pre-stored in the database one by one to determine the model of the identified hook tongue;
[0143] S55, comparing the height difference of the S surface with the preset height difference to determine whether the hook tongue has an outward expansion phenomenon;
[0144] S56, comparing the hook tongue locking surface thickness, S surface thickness and pin hole diameter with the hook tongue parameters of this model, determining whether the identified hook tongue is qualified, and outputting the identification result.
[0145] By identifying the parameter information of the hook tongue, it is possible to quickly determine whether the basic parameters of the hook tongue are qualified, and then directly feedback to the staff for review through the display device, so as to facilitate timely identification of unqualified hook tongues.
[0146] S6. Detect and process the preprocessed three-dimensional point cloud data information to determine the target area containing the hook-tongue character.
[0147] In some embodiments, when the pre-processed three-dimensional point cloud data information is detected and processed, a model pre-trained by a deep learning algorithm is used to identify the hook-tongue character encoding area to obtain a bounding box classified as a recognition target as the recognition area, thereby locating the recognition target area of the recognition area image, and determining that the area containing the hook-tongue character is the target area.
[0148] S7, identifying the target area to obtain hook-tongue character information content and determine hook-tongue coding information.
[0149] In some embodiments, Fig.10 As shown, step S7 includes:
[0150] S71. Add an attention mechanism to the convolutional neural network, and then construct a convolutional neural network model based on the attention mechanism;
[0151] S72, obtaining a plurality of hook-tongue coding sample data, and using the sample data as a hook-tongue coding recognition training set;
[0152] S73, performing data augmentation on the hook-tongue code recognition training set by using one or more methods of rotation, noise addition, brightness adjustment and contrast adjustment, so as to train the convolutional neural network model based on the attention mechanism by using the hook-tongue code recognition training set, and compare the various training results to select appropriate model parameters, so as to obtain the hook-tongue code recognition model;
[0153] S74, identifying the target area through the hook-tongue coding recognition model to obtain the hook-tongue character information content and determine the hook-tongue coding information.
[0154] In this embodiment, by adding the attention mechanism, the target character text can be recognized, and the image features can be selectively utilized, and the standard back-propagation algorithm can be used for end-to-end training, so that the network model modeled based on the deep learning attention mechanism can recognize the surface scene text of the casting without dictionary constraints, thereby solving the problem of difficult hook tongue character recognition under complex backgrounds, accurately identifying the coding information of the target hook tongue, and realizing the recognition of casting workpiece identification characters under low contrast.
[0155] The embodiment of the present application discloses a system and method for 3D visual inspection of a hook tongue, which can realize automated inspection and conveying operations of the hook tongue, and can achieve inspection and detection process as soon as the inspection is carried out. The inspection work efficiency is high, and the inspection process is automated and intelligent, realizing the inspection process of "replacing people with machines", speeding up the inspection progress of the hook tongue, and combining with 3D visual monitoring technology to realize all-round inspection and monitoring, improve the quality of the hook tongue before leaving the factory, and the inspection accuracy is accurate and error-free; not only the basic information of the hook tongue is detected, but also the coding information of the hook tongue can still be identified in a complex background, realizing the automation and intelligence of the hook tongue information entry process, and solving the problem of fatigue of staff in manual entry.
[0156] Embodiment three:
[0157] At least some embodiments of the present disclosure also provide an electronic device, such as Fig.11 As shown, the electronic device includes a memory 21 and a processor 22, wherein the memory 21 stores a computer program, and when the computer program is executed by the processor, the steps of the detection method provided in any embodiment of the present disclosure are performed.
[0158] In some embodiments, the processor 22 is used to execute all or part of the steps in the detection method of any embodiment of the present disclosure. The memory 21 is used to store various types of data, which may include instructions of any application or method in the electronic device, and data related to the application.
[0159] The processor 22 can be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components, and is used to execute the detection method in the above-mentioned embodiment 1.
[0160] The memory 21 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0161] Embodiment 4:
[0162] At least some embodiments of the present disclosure also provide a computer-readable storage medium, such as Fig.12 As shown, a computer program 31 is stored on the readable storage medium, and when the computer program 31 is executed by a processor, the steps of the detection method provided by any embodiment of the present disclosure are implemented.
[0163] In some embodiments, the storage medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0165] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0166] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0167] Embodiment five:
[0168] The embodiment of the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the detection method provided in any embodiment of the present disclosure.
[0169] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0170] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
[0171] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0172] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
Claims
1. A hook tongue 3D visual inspection system, characterized in that: include: A testing table with testing stations; An automatic conveying device provided on the testing table is used to convey the hook tongue to the testing station; A robot is arranged at the inspection station; the arm of the robot can move along a preset inspection path; An image acquisition device is arranged on the robot arm; the image acquisition device follows the movement of the robot arm to perform 3D visual scanning on the hook tongue; And a controller connected to the image acquisition device; the controller includes an image processing module for processing the acquired image, a code recognition module for identifying the hook tongue code, and a hook tongue recognition module for identifying whether the hook tongue parameters are qualified.
2. A hook tongue 3D visual inspection system according to claim 1, characterized in that: The detection path of the robot arm moves along the front of the hook tongue, the top of the hook tongue, the right side of the hook tongue, and the upper and lower left side of the hook tongue in sequence; the image acquisition device collects image information of the front, top, right side, and upper and lower left side of the hook tongue in sequence, and converts the image information into three-dimensional point cloud data information of the hook tongue.
3. A hook-knuckle 3D visual inspection system according to claim 2, characterized in that: The coding recognition module is used to recognize the character number according to the scanning information of the right side of the hook tongue; the hook tongue recognition module includes: A hook knuckle S-surface information recognition unit for measuring the hook knuckle S-surface width and S-surface height difference based on the hook knuckle front scanning information, so as to determine the hook knuckle model and whether the hook knuckle is bulging; A hook knuckle locking surface thickness identification unit for measuring whether the hook knuckle thickness is qualified based on the scanning information above the hook knuckle; A hook knuckle lock iron penetration amount identification unit for measuring whether the hook knuckle lock iron penetration amount is qualified according to the scanning information on the upper left side of the hook knuckle; And a hook tongue S-surface thickness and pin hole diameter identification unit for measuring whether the hook tongue S-surface thickness and the pin hole diameter are qualified according to the lower left side of the hook tongue.
4. A hook tongue 3D visual inspection system according to claim 1, characterized in that: The coding recognition module comprises: A character recognition model building unit, used for building an optical character recognition model through a convolutional neural network; The attention mechanism unit is used to add the attention mechanism to the convolutional neural network to obtain a convolutional neural network model based on attention memory; A data set determination unit, used for taking a plurality of hook-tongue coding sample data as a hook-tongue coding recognition training set; The training unit is used to perform data augmentation on the hook-tongue code recognition training set by using one or more methods of rotation, noise addition, brightness adjustment and contrast adjustment, so as to use the hook-tongue code recognition training set to train the convolutional neural network model based on the attention mechanism, and compare the various training results to select appropriate model parameters to obtain the hook-tongue code recognition model.
5. A hook tongue 3D visual inspection system according to claim 1 or 2, characterized in that: The image acquisition device includes a 3D vision sensor; the 3D vision sensor has a built-in calibration file for performing coordinate transformation on the scanned hook tongue image to acquire three-dimensional point cloud data information of the hook tongue.
6. A hook-knuckle 3D visual inspection system according to claim 3, characterized in that: The image processing module comprises: A preprocessing unit for preprocessing the three-dimensional point cloud data information of the hook tongue; A hook tongue three-dimensional model building unit connected to the preprocessing unit is used to triangulate the preprocessed three-dimensional point cloud data to obtain a hook tongue three-dimensional network model; And a registration unit connected to the hook-tongue three-dimensional model building unit is used to register the hook-tongue three-dimensional network model using the hook-tongue sample model.
7. A hook-knuckle 3D visual inspection system according to claim 2, characterized in that: The detection station is provided with a photoelectric detector for detecting whether the hook tongue is delivered to the right position. The photoelectric detector is connected to the controller. When the controller receives the hook tongue detection signal from the photoelectric detector, it controls the automatic conveying device to stop and controls the robot to scan the hook tongue along the transportation detection path.
8. A hook tongue 3D visual detection method, characterized in that: The detection method is implemented by the detection system of any one of claims 1 to 7, and the detection method comprises the following steps: Obtain the signal that the hook tongue reaches the detection station to send an execution signal to the robot; Control the robot to move along a preset detection path to drive the image acquisition device to perform 3D scanning on the hook tongue to obtain hook tongue image information; The hook tongue image information is converted into coordinates through a preset calibration file to form three-dimensional point cloud data information of the hook tongue in 3D visual coordinates; Processing the three-dimensional point cloud data information to remove discrete point clouds from the three-dimensional point cloud data information; According to the pre-processed three-dimensional point cloud data information, the hook tongue parameter information is identified, whether the identified hook tongue parameters are qualified is determined, and the identification result is output; Performing detection processing on the pre-processed three-dimensional point cloud data information to determine the target area containing the hook-tongue character; The target area is identified to obtain the hook-tongue character information content and determine the hook-tongue coding information.
9. A hook tongue 3D visual detection method according to claim 8, characterized in that: The controlling robot to move along a preset detection path includes: controlling the detection path of the robot to move in sequence along the front of the hook tongue, above the hook tongue, the right side of the hook tongue, and above and below the left side of the hook tongue; The method of identifying hook tongue parameter information according to the pre-processed three-dimensional point cloud data information, determining whether the hook tongue parameters are qualified, and outputting the identification result includes: Determine the S-surface width and S-surface height difference of the hook tongue according to the front data of the hook tongue in the preprocessed three-dimensional point cloud data information; Determine the thickness of the locking surface of the hook tongue according to the upper scanning information of the hook tongue in the pre-processed three-dimensional point cloud data information; According to the scanning information of the upper and lower left sides of the hook tongue in the pre-processed three-dimensional point cloud data information, the insertion amount of the hook tongue lock iron, the thickness of the hook tongue S surface and the pin hole diameter are determined; Compare the S-surface width with the hook knuckle models pre-stored in the database one by one to determine the model of the identified hook knuckle; Compare the height difference of the S surface with the preset height difference to determine whether the hook tongue bulges outward; The locking surface thickness, S surface thickness and pin hole diameter of the hook tongue are compared with the hook tongue parameters of this model to determine whether the identified hook tongue is qualified and output the identification result.
10. A hook tongue 3D visual detection method according to claim 8, characterized in that: The step of identifying the target area to obtain hook-tongue character information content and determining hook-tongue coding information includes: Add attention mechanism to convolutional neural network, and then build a convolutional neural network model based on attention mechanism; Acquire multiple hook-tongue coding sample data and use them as hook-tongue coding recognition training sets; The hook-tongue coding recognition training set is augmented by one or more methods including rotation, noise addition, brightness adjustment and contrast adjustment, so as to train the convolutional neural network model based on the attention mechanism using the hook-tongue coding recognition training set, and the various training results are compared to select appropriate model parameters, so as to obtain the hook-tongue coding recognition model; The target area is identified through the hook-tongue coding recognition model to obtain the hook-tongue character information content and determine the hook-tongue coding information.
11. A hook tongue 3D visual detection method according to claim 8, characterized in that: The hook tongue image information is converted into coordinates through the preset calibration file to form the three-dimensional point cloud data information of the hook tongue in the 3D visual coordinates, including: Calibrate the image acquisition device to obtain an intrinsic parameter matrix, a selection matrix and a translation vector; Calibrate the light plane to obtain the light plane equation; Calibrate the automatic conveying device to obtain the cosine value of the angle between the moving direction of the automatic conveying device and the three coordinate axes of the coordinate system of the image acquisition device; Extract the pixel coordinates of the center line of the hook tongue according to the hook tongue image information and convert them into homogeneous coordinates; Calculate the normalized coordinates of the three-dimensional image acquisition device according to the homogeneous coordinates and the internal parameter matrix; Substituting the coordinates of the three-dimensional image acquisition device into the light plane equation to determine the actual coordinates of the image acquisition device; Adding the image acquisition device coordinates to the parameters obtained by calibration of the automatic conveying device to be aligned to the same image acquisition device coordinate system; The image acquisition device coordinate system is converted into the world coordinate system by using the translation vector according to the rotation matrix to form the three-dimensional point cloud data information of the hook tongue in the 3D visual coordinates.
12. An electronic device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the detection method according to any one of claims 8 to 11 are performed.
13. A computer-readable storage medium, characterized in that: The computer program stored in the storage medium can be executed by one or more processors, and the computer program can be used to implement the steps of the detection method as described in any one of claims 8 to 11.
Citation Information
Cited By
Lock clamp detection method and device, detection equipment and computer storage medium
CN121475010A
