Detection and metering method and system based on robot
Through machine vision technology and CRNN network, digital tube characters are recognized and combined with collaborative robots to perform automated inspection, the time waste and false detection problems caused by manual operations in metrological product inspection are solved, and a high-precision, stability and high-efficiency detection process is achieved.
Patent Information
- Application Number
- CN202411330715.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-03
AI Technical Summary
The inspection of existing metrological products relies on manual operations, resulting in wasted time, high false detection rate, equipment damage and inaccurate identification of garbled codes, making it difficult to meet complex process flow and high-precision requirements, affecting product quality and output.
Using contactless high-precision detection technology based on machine vision, digital tube characters are recognized through CRNN network, combined with collaborative robots for automated detection, and image processing and signal correction are used to judge whether the product is qualified, reduce manual intervention and improve Detection accuracy.
It realizes automated inspection of metrological products, improves detection speed and accuracy, reduces labor costs, reduces equipment signal interference, and improves production efficiency and product stability.
Smart Images

Figure CN119068489A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of detection technology, and in particular relates to a robot-based detection and measurement method and system. Background Art
[0002] Measuring products need to be tested after production or use. Nowadays, most of the metrological product testing is done manually by sending specified data according to the process flow, and then testing each small function one by one, and finally recording the test results. However, manual testing wastes a lot of time and is prone to missed detection and wrong detection. At the same time, when testing metrological products, it is necessary to ensure that the input data and dial readings of the product test items are within the error range specified by the national standard. Only then can the metrological product be qualified, otherwise it is an unqualified product. Some precision metrological products under manual operation may be damaged due to improper operation, resulting in the damage of the metrological product after testing and cannot be used. With the development of the machine vision industry, it has become a trend to use visual systems to replace manual testing of metrological products. At the same time, the difficulty of the testing process of metrological products is increasing day by day, and higher requirements are also placed on the stability of the test. At the same time, there are garbled numerical codes in the product, which may be due to mechanical vibration, light changes, analog signal interference, digital tube damage, etc., and often require manual re-testing and judgment. However, due to differences in human subjective initiative, the accuracy of product classification varies. In this case, if you want to improve product quality and output, you will need to spend a lot of manpower and material resources, which will affect the final quality of the product; you need to design a set of coding formats that can accurately determine the cause of garbled characters. Therefore, a robot-based detection and measurement system is needed to solve these problems. A non-contact, high-precision measurement and detection technology based on machine vision technology can re-identify garbled characters and finally determine whether the product is qualified. At the same time, it relies on collaborative robot operation to replace manual complex processes, ensure the efficiency of the production line, and improve the accuracy and reliability of the measurement values of non-contact measurement products. Summary of the invention
[0003] The present invention provides a robot-based measurement and metrology method and system, which are used to solve the problems of being unable to meet the requirements of multiple models of measurement products with complex processes and high process technology requirements, low character recognition accuracy, inability to process garbled characters, serious signal interference when multiple devices are running, and unstable signal source data.
[0004] In order to achieve the above object, the present invention is implemented by the following technical solutions:
[0005] The present application provides a robot-based detection and measurement method, comprising the following steps:
[0006] S1. The product to be measured enters the measuring area, the corresponding model of the product is input, and the corresponding product is transported into the camera detection area;
[0007] S2. The robot selects the corresponding data in the database according to the corresponding model, outputs the corresponding data, and waits for the CCD camera to shoot;
[0008] S3. The CCD camera captures the original image, and corrects and processes the original image to form a region of interest;
[0009] S4. Define the model object, generate and save the best digital tube character recognition model through the CRNN network, and then determine whether the character is garbled, otherwise execute step S7;
[0010] S5. Put the image of garbled characters into the CRNN model for recognition;
[0011] S6. Extract the corresponding digital tube area of interest according to the garbled code, and determine whether the calibrator input signal is within the project limit, and compare the garbled code prediction function with the set garbled code model set threshold to determine whether the product is qualified;
[0012] S7. Output the test results and record them. Determine whether the product is qualified by measuring whether the value is within the error range. Mark the unqualified products and put them in the unqualified area.
[0013] Furthermore, in step S3, the original image I0 captured by the CCD camera is firstly subjected to image brightness correction, the original image type is converted from RGB to HSV, and the original image under the HSV threshold is set to I 0H , the image after brightness correction is I 0L , the brightness correction coefficient is ; Start to get the pixel value I of the original image 0L_VB , the formula is:
[0014] I 0 H _ VB = δ 0 H _ V δ 0 L _ V [ ( I 0 L _ V − avg ( I 0 L _ v ) + I 0 H _ V − avg ( I 0 H _ V ) ) ]
[0015] Among them I 0H_V and I 0L_V are the pixel values of the V channel of the original image and the image after brightness correction, and are the standard deviations of the original image and the target image V channel, avg(I 0H_V ) and avg(I 0H_V ) are the average values of the V channels of the original image and the target image, respectively.
[0016] Furthermore, in step S3, the image I in the HSV space after the V channel correction is 0L Reconvert to RGB space L0, complete the correction, and then perform image denoising according to Gaussian distribution noise, the probability density function is:
[0017]
[0018] The random variable w noise has a location parameter , the scale parameter is The probability distribution of the Gaussian noise-removed image I can be obtained L1 , obtain the region of interest and correct the image I according to the center point of the matching template feature LP The pose of the region of interest; the relationship between the region of interest is:
[0019]
[0020] The coordinates of the center point of the dial area matching the template feature are set to (m0, n0), and the angle between the knob area and the horizontal position is calculated. , the coordinates of the center point of the region of interest are (M0, N0), and T0 is the translation matrix.
[0021] Furthermore, in step S3, the denoised image I is obtained. L0 , the center point of the dial is (m1, n1), the coordinates of the center point of the area of interest are (M1, N1), and the angle between the gear position on the dial and the horizontal position is , according to the translation matrix T at this time M and the rotation transformation matrix R M , get the affine transformation matrix H M :
[0022]
[0023] H M = [ 0 0 R 0 1 T ] = T 0 R M T M T 0 − 1
[0024] For all pixels (I0, J0) of the original image, the angle between the gear position on the dial and the horizontal position Multiply by the affine transformation matrix H M , get the coordinate value after positive rotation (I1, J1), the angle between the gear position on the dial and the horizontal position , the relationship is:
[0025] .
[0026] Furthermore, in the step S3, after the region of interest after template matching correction is extracted, the matching template is to allow the 5520A multi-product calibrator to decrease from the range limit in sequence under the condition that the CCD camera and the light source remain unchanged, light up different digital tubes, generate multiple different numbers, wherein the decimal point of the numbers in the characters must appear at each position, and output the character image of the measuring product to the training data set. Specifically, the measuring product can be rotated, the positive and negative limit values can be output, and the region of interest range can be manually added, wherein the region of interest is the reading area of all digital tubes, and the values within the region of interest are marked, and then the training data set is read, and the data set is batch trained through the data loader object.
[0027] Furthermore, in step S4, the composition of the CRNN network from the input end to the output end is a convolution layer, a circulation layer and a transcription layer, respectively. The convolution layer extracts a feature sequence from each input image; the convolution layer and the automatic circulation layer predict each frame of the feature sequence and output it by the convolution layer; then the transcription layer converts the prediction result of each frame of the circulation layer into a label sequence, that is, the RNN predicts each frame to find the label sequence with the highest probability combination; by integrating the pre-input configuration module, the application architecture of the digital tube character recognition model based on the CRNN deep neural network is optimized to make up for the shortcoming of the small number of negative samples of the CRNN deep neural network, and the sample size of each feature can be increased as much as possible. Therefore, in this application architecture, the CRNN deep neural network can identify the detection of abnormal digital tube features (character garbled features), and define the mean square error loss function and Adam (Adaptive Moment Estimation) optimizer and set the learning rate decay strategy; perform iterative training, traverse all the data in the data loader in each round, take the digital tube character picture as input and the label as output, calculate the loss between the model output and the label, and perform backpropagation and gradient update based on the loss; at the end of each epoch, record the accuracy of the current model on the validation set and save the parameters of the current model.
[0028] Furthermore, in the step S5, the image with garbled characters is placed in a CRNN model based on fusion of pre-input garbled character recognition, wherein the matching template data set for garbled character recognition is based on a multi-pose sample size captured by covering the digital tubes a, b, c, d, e, f, g; the main garbled data sets include: L-type garbled characters, 6 missing F tube type garbled characters, 8 missing B tube type garbled characters, 5 missing D tube type garbled characters, and 3 missing A tube type garbled characters; if the recognition satisfies two types of garbled characters at the same time, the digital tube is damaged in more than one place. If it does not meet all garbled data sets or only meets one type of garbled data, step S6 is performed.
[0029] Further, in the step S6, the corresponding digital tube area of interest is extracted according to the garbled code, and it is judged whether the input signal value of the 5520A multi-product calibrator is within the limit of the project at this time. If the input signal value is within the current working range limit, if it is at the maximum value of the positive threshold, the corresponding garbled digital tube begins to decrease, and when it is reduced to 0, the value of the previous digit is reduced by one; if it is at the minimum value of the negative threshold of the working range, the digital tube corresponding to the garbled code begins to decrease, and when it meets the maximum digital tube 0, the value of the previous digit is reduced by one, and it is re-identified again. If the garbled code value is the highest digital tube, it is directly determined that the digital tube is damaged. If it is within the working range, N consecutive values are randomly selected within the range, and the characters are directly identified. The number of garbled codes in the N numbers is recorded, and then the garbled code detection numbers are re-identified, and the model garbled code prediction function is calculated:
[0030]
[0031] Among them, Y (W) is the garbled code prediction function, is the probability of a random value in the first 10 numbers, is the weight of the Wth garbled value, is the probability of the Wth value, Q is the number of input signal values of the 5520A multi-product calibrator, is the signal interference coefficient, is the error detected in the last measurement, To measure the error, if the result of the garbled code prediction function is greater than the threshold set by the corresponding garbled code model, the robot will determine that this is a defective product.
[0032] In some embodiments, a method performed by a computer system is disclosed for achieving more precise control of one or more functions of a robotic device for achieving precise control of a remote robot.
[0033] According to some embodiments, a computing system includes a processor and a memory storing instructions, which when executed cause one or more processors to perform the methods described herein. According to some embodiments, an electronic device includes one or more processors, and a memory storing one or more programs; the one or more programs are configured to be executed by the one or more processors, and the one or more programs include instructions for performing or causing the operations of any method described herein to be performed.
[0034] The present invention is reasonable in design, easy to operate, economical and practical, and is particularly embodied in the following aspects:
[0035] 1. The inspection and measurement system is controlled by the host computer to cooperate with the 5520A multi-product calibrator, collaborative robot and CCD camera. It realizes the automatic inspection, automatic control and verification of unqualified products for different measurement products. It has a complete robot-based measurement and inspection process to improve the speed and accuracy of the entire measurement product inspection.
[0036] 2. The detection and measurement system is based on CRNN character recognition with posture compensation in the region of interest, which can accurately obtain the characters within the field of view of the CCD camera, thus improving the accuracy of system recognition;
[0037] 3. For the recognition of garbled characters, the detection and measurement system adopts the measurement and detection based on the digital tube of garbled characters. The garbled character template is used for multiple measurement and detection to judge the cause of the garbled character recognition, thereby improving the stability of the system.
[0038] 4. The detection and measurement system has no redundant digital signals and relies on the robotic arm to complete the corresponding tasks, which reduces the signal interference between devices and ensures the stability of the system.
[0039] 5. Reduce a lot of labor costs, significantly improve production efficiency per unit time, and be beneficial to the company's large order expansion plan. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 It is a flow chart of a robot-based detection and measurement method;
[0042] Figure 2 A process flow chart of a robot-based inspection and measurement method;
[0043] Figure 3 A process flow chart b of a robot-based inspection and metrology method operation;
[0044] Figure 4 This is the structure diagram of the digital tube;
[0045] Figure 5 This is the structure diagram of the digital tube with values from 0 to 9;
[0046] Figure 6 The following are the structural diagrams of several digital tube damages;
[0047] Figure 7A diagram showing the composition of a robot-based detection and measurement system provided in this embodiment;
[0048] Figure 8 Call the module module diagram for the data;
[0049] Fig. 9 Select a module diagram for the solution;
[0050] Fig.10 Input diagrams for metered product location numbers and processes;
[0051] Fig.11 Graphs of resistance and run time for test items;
[0052] Fig.12 It is the voltage V and running time diagram of the test item;
[0053] Fig.13 It is the voltage mV and running time diagram of the test item;
[0054] Fig.14 This is the test item current A and running time diagram;
[0055] Fig.15 To close the product and run time diagram;
[0056] Fig.16 Display module diagram for text;
[0057] Fig.17 To open the saved file diagram;
[0058] Fig.18 To display the saved file map;
[0059] Fig.19 Displays a module diagram for the data. DETAILED DESCRIPTION
[0060] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0061] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0062] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0063] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be welding, bolt connection, or riveting; it can be fixed connection, detachable connection, or integral connection; it can be mechanical connection or electrical connection; it can be directly connected or indirectly connected through an intermediate medium, or it can be internal communication between two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0064] Example 1
[0065] Please refer to Figure 1-Figure 3 , a measurement detection method and system based on garbled character digital tube is used to determine whether the digital tube is qualified. The host computer controls it, inputs the 5520A standard source, starts testing the measurement product, and uses the CRNN character recognition method with posture compensation in the region of interest to perform garbled code recognition and detection. The detection results are displayed on the touch screen, and then the hand-eye calibration collaborative robot performs target task control system data reception and control. The system receives and sends data from the background database and sends the final results to the host computer.
[0066] In this embodiment, the number of iterations set in the CRNN network is set to 10,000 times, and the iterated model is saved as the optimal digital tube character recognition model.
[0067] like Figure 4 As shown, the position distribution of digital tubes a~g is shown. Figure 5 It is the digital tube structure of the digital tube of numbers 0~9. Figure 6 As shown in the figure, the main garbled data sets include: L tube type garbled code, B tube type garbled code, D tube type garbled code, A tube type garbled code. If the identification meets two types of garbled code at the same time, the digital tube is damaged in more than one place. The figure shows L tube type garbled code, F / B tube type garbled code, D tube type garbled code, and A tube type garbled code.
[0068] In actual industrial applications, there are three main problems: alarms in cameras, CCD photo NG processing, and robot abnormal alarms. The corresponding processing methods are as follows.
[0069] When a pop-up window alarm (continue, exit style) appears in the camera, it means that the space for storing pictures (D drive) is full and needs to be cleared or the CCD needs to be re-registered;
[0070] When processing CCD photo NG, if the robot alarms, it means that garbled characters are recognized, and the robot alarm is cleared; if the host computer alarms, the corresponding data does not meet the test conditions, the product is unqualified, and the host computer alarm is cleared; if the alarm is in the plan, the camera connection is abnormal, and the camera cable is rechecked.
[0071] When the robot alarms abnormally, the corresponding processing methods include: when the robot triggers a collision warning, take an emergency stop and move again; when the robot connection fails, recheck the robot connection cable; when a singular point occurs during the robot operation, restore the robot alarm and re-update the point.
[0072] Example 2
[0073] like Figure 7 As shown, a robot-based detection and measurement system includes a hand-eye calibration robot target task control subsystem, a CRNN character recognition subsystem for posture compensation of the region of interest, a garbled character digital tube detection and measurement subsystem, and a detection data management and analysis subsystem;
[0074] In the robot-based detection and measurement system, the hand-eye calibration robot target task control subsystem includes an interest extraction submodule and a robot control submodule; the CRNN character recognition subsystem for interest region posture compensation includes an interest region extraction submodule and a CRNN character recognition submodule; the garbled character digital tube detection and measurement subsystem includes a garbled digital tube region extraction module and a composite coding secondary recognition submodule; the detection data management and analysis subsystem includes a touch screen and a data management module.
[0075] A robot-based detection and measurement system software is divided into five modules: login module, database call module, solution selection module, text display module, and data display module.
[0076] The login module is for user login. The functions of the database call module are mainly as follows: 1. Check the database points of all metering products 2. Confirm the database robot points of all metering products 3. Load the identification schemes of all metering products. The functions of the scheme selection module are as follows: 1. Add the metering product model and corresponding process for each position 2. Start running scheme 3. Pause running scheme 4. End running scheme 5. Robot emergency stop. The text display module is for displaying the saved data of the metering products and the test functions and corresponding data. The data display module is for displaying the last robot running data and the data results after camera recognition.
[0077] like Figure 8 As shown in the figure, in the data management module, it is divided into two sub-functions. The first function is to confirm the robot running points of all product models. Select the corresponding product model and click the display point button to obtain the robot running points of the product in the database. If you need to modify the corresponding points, you can modify them directly in the corresponding table. It also supports adding and deleting points. Click the clear button to clear the displayed points. The second function is to load the detection schemes for all product models. The confirmation button will go out, and the process schemes under each function will be loaded at the same time. After loading, you can click the ok button to jump to the scheme selection module. It takes a few seconds to call the process scheme.
[0078] like Fig. 9 As shown, the solution selection module includes five sub-functions, including adding the metering product name and operation process on the corresponding position number, the robot starting to run the process of the corresponding metering product, pausing the robot's current action, and the software robot powering off and emergency stopping and exiting the program.
[0079] like Fig.10 As shown, in the function of adding the metering product name and running process on the corresponding position number, the maximum position number is 6. And the position number cannot be filled in repeatedly, otherwise an error will be reported. After filling in, click Insert Data to generate the product process of the position. If the filling is wrong, you can click the Delete Data or Delete All button to eliminate all the contents in the scheme selection table.
[0080] like Fig.11 As shown, in the function where the robot starts to run the process of the corresponding metering product, click the start button and the robot starts to move. For example, the metering product in this process is a 15B voltmeter, and the task flow is according to the test items resistance-voltage V-voltage mV-current A. The first step is to test the resistance item. The robot rotates the dial to the resistance point and returns to the origin. At this time, the 5520A multi-product calibrator outputs the corresponding resistance value, and the visual solution runs to capture the corresponding image to determine whether there is garbled code behavior. If there is a resistance display with a negative value, the robot will identify it as an unqualified product. If the recognition is correct, record the corresponding item and value. After the recognition is completed, record the running time of the resistance test item;
[0081] like Fig.12 As shown, the robot runs from the origin, rotates the dial to the voltage V position, and the 5520A multi-product calibrator outputs the voltage value to be tested and displays the voltage value. After the voltage V value is generated, the running time is recorded;
[0082] like Fig.13As shown, the robot runs from the origin, rotates the dial to the voltage mV position, and the 5520A multi-product calibrator outputs the voltage value to be tested and displays the voltage value. After the voltage mV value is generated, the running time is recorded;
[0083] like Fig.14 As shown, the robot runs from the origin, rotates the dial to the current A position, and the 5520A multi-product calibrator outputs the voltage value to be tested and displays the voltage value. After the current A value is generated, the running time is recorded;
[0084] like Fig.15 As shown, the robot runs from the origin, rotates the dial to the OFF position, and the 5520A multi-product calibrator closes the input and the value is NULL. Put the voltmeter into the test completion area, grab the next voltmeter to be tested, and record the running time after the value is generated.
[0085] In the Pause Robot function, click the Pause button to pause the current task. Press the Pause button again to continue the current task. The current task is still retained and not deleted. The robot does not alarm, but the process may time out and alarm.
[0086] In the software robot power-off emergency stop function, click the emergency stop button, the robot will be powered off, and all axis clicks will be in emergency stop state. At the same time, the process task is cleared, and the running position of this process is not recorded. Manual intervention is required to reset the robot and re-run the program.
[0087] In the exit program function, click the exit button to exit the solution selection module.
[0088] like Figure 16-18 As shown, the text display module can display the saved data. You can try to view the test results of this batch of metering products. Click Open in the file to select the corresponding file. After opening, the corresponding file content can be displayed in the window and can be modified or viewed. Save it to the file again.
[0089] like Fig.19 As shown in the figure, in the data display module, the robot can obtain the last data after running. The data display content includes: shooting status, data source, camera data, symbols, and robot posture. The shooting status is NG and OK. The data source is the current test item. The camera data is the center point coordinates of the area of interest and the depth coordinates in the Z direction. The symbols are "+" and "-" for character recognition. The robot posture is the posture of the robot when it left the center point of the area of interest for the last time.
[0090] The detection and measurement system is controlled by the host computer to cooperate with the 5520A multi-product calibrator, collaborative robot and CCD camera. It realizes the automatic detection, automatic control and verification of defective products for different measurement products. It has a complete robot-based measurement and detection process to improve the speed and accuracy of the entire measurement product detection; CRNN character recognition based on the posture compensation of the region of interest can accurately obtain the characters within the field of view of the CCD camera, which improves the accuracy of system recognition; for the recognition of garbled characters, it adopts the measurement detection based on the digital tube of garbled characters, and judges the cause of garbled character recognition through multiple measurement detections of garbled character templates, which improves the stability of the system; the system detects no redundant digital signals, relies on the robot arm to complete the corresponding tasks, reduces the signal interference between equipment, and ensures the stability of the system; reduces a lot of labor costs, significantly improves production efficiency per unit time, and is conducive to the company's large order expansion plan.
[0091] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A robot-based detection and measurement method, characterized in that: The following steps are involved: S1. The product to be measured enters the measuring area, the corresponding model of the product is input, and the corresponding product is transported into the camera detection area; S2. The robot selects the corresponding data in the database according to the corresponding model, outputs the corresponding data, and waits for the CCD camera to shoot; S3. The CCD camera captures the original image, and corrects and processes the original image to form a region of interest; S4. Define the model object, generate and save the best digital tube character recognition model through the CRNN network, and then determine whether the character is garbled, otherwise execute step S7; S5. Put the image of garbled characters into the CRNN model for recognition; S6. Extract the corresponding digital tube area of interest according to the garbled code, and determine whether the calibrator input signal is within the project limit, and compare the garbled code prediction function with the set garbled code model set threshold to determine whether the product is qualified; S7. Output the test results and record them. Determine whether the product is qualified by measuring whether the value is within the error range. Mark the unqualified products and put them in the unqualified area.
2. A robot-based detection and measurement method according to claim 1, characterized in that: In step S3, the original image I0 captured by the CCD camera is firstly subjected to image brightness correction, the original image type is converted from RGB to HSV, and the original image under the HSV threshold is set to I 0H , the image after brightness correction is I 0L , the brightness correction coefficient is ; Start to get the pixel value I of the original image 0L_VB , the formula is: ; Among them I 0H_V and I 0L_V are the pixel values of the V channel of the original image and the image after brightness correction, and are the standard deviations of the original image and the target image V channel, avg(I 0H_V ) and avg(I 0H_V ) are the average values of the V channels of the original image and the target image, respectively.
3. A robot-based detection and measurement method according to claim 2, characterized in that: In step S3, the image I in the HSV space after the V channel correction is 0L Reconvert to RGB space L0 , complete the correction, and then perform image denoising according to Gaussian distribution noise, the probability density function is: ; The random variable w noise has a location parameter , the scale parameter is The probability distribution of the Gaussian noise-removed image I can be obtained L1 , obtain the region of interest and correct the image I according to the center point of the matching template feature LP The pose of the region of interest; the relationship between the region of interest is: ; The coordinates of the center point of the dial area matching the template feature are set to (m0, n0), and the angle between the knob area and the horizontal position is calculated. , the coordinates of the center point of the region of interest are (M0, N0), and T0 is the translation matrix.
4. A robot-based detection and measurement method according to claim 3, characterized in that: In step S3, the denoised image I is obtained. L0 , the center point of the dial is (m1, n1), the coordinates of the center point of the area of interest are (M1, N1), and the angle between the gear position on the dial and the horizontal position is , according to the translation matrix T at this time M and the rotation transformation matrix R M , get the affine transformation matrix H M : ; ; For all pixels (I0, J0) of the original image, the angle between the gear position on the dial and the horizontal position Multiply by the affine transformation matrix H M , get the coordinate value after positive rotation (I1, J1), the angle between the gear position on the dial and the horizontal position , the relationship is: 。 5. A robot-based detection and measurement method according to claim 4, characterized in that: In the step S3, after the region of interest after template matching correction is extracted, the matching template is to allow the 5520A multi-product calibrator to decrease from the range limit in sequence under the condition that the CCD camera and the light source remain unchanged, light up different digital tubes, generate multiple different numbers, wherein the decimal point of the numbers in the characters must appear at each position, and output the character image of the measuring product to the training data set. Specifically, the measuring product can be rotated, the positive and negative limit values can be output, and the region of interest range can be manually added, wherein the region of interest is the reading area of all digital tubes, and the values within the region of interest are marked, and then the training data set is read, and the data set is batch trained through the data loader object.
6. The robot-based detection and measurement method according to claim 1, characterized in that: In step S4, the components of the CRNN network from the input end to the output end are respectively a convolution layer, a circulation layer and a transcription layer, and the convolution layer extracts a feature sequence from each input image; The convolutional layer automatic circulation layer predicts each frame of the feature sequence and outputs it by the convolutional layer; The transcription layer then converts the prediction results of each frame of the recurrent layer into a label sequence, that is, the RNN predicts each frame to find the label sequence with the highest probability combination; By integrating the pre-input configuration module, the application architecture of the digital tube character recognition model based on the CRNN deep neural network is optimized to make up for the shortcoming of the small number of negative samples of the CRNN deep neural network, and the sample size of each feature can be increased as much as possible. Therefore, in this application architecture, the CRNN deep neural network can identify the detection of abnormal digital tube features, define the mean square error loss function and Adam optimizer, and set the learning rate decay strategy; loop iterative training, each round of iteration traverses all the data in the data loader, takes the digital tube character image as input and the label as output, calculates the loss between the model output and the label, and performs backpropagation and gradient update based on the loss; at the end of each epoch, records the accuracy of the current model on the validation set, and saves the parameters of the current model.
7. The robot-based detection and measurement method according to claim 1, characterized in that: In the step S5, the image with garbled characters is placed in a CRNN model based on fusion of pre-input garbled character recognition, wherein the matching template data set for garbled character recognition is based on a multi-pose sample size captured by covering the digital tubes a, b, c, d, e, f, g; the main garbled data sets include: L-type garbled characters, 6 missing F tube type garbled characters, 8 missing B tube type garbled characters, 5 missing D tube type garbled characters, and 3 missing A tube type garbled characters; if the recognition satisfies two types of garbled characters at the same time, the digital tube is damaged in more than one place. If it does not meet all garbled data sets or only meets one type of garbled data, step S6 is performed.
8. The robot-based detection and measurement method according to claim 1, characterized in that: In the step S6, the digital tube area of interest corresponding to the garbled code is extracted to determine whether the input signal value of the 5520A multi-product calibrator is within the limit of the project. If the input signal value is within the current working range limit, if it is at the maximum value of the positive threshold, the corresponding garbled digital tube begins to decrease. When it is reduced to 0, the value of the previous digit is reduced by one; if it is at the minimum value of the negative threshold of the working range, the digital tube corresponding to the garbled code begins to decrease. When the maximum digital tube 0 is met, the value of the previous digit is reduced by one, and it is re-identified again. If the garbled code value is the highest digit digital tube, it is directly determined that the digital tube is damaged. If it is within the working range, N consecutive values are randomly selected within the range, characters are directly identified, the number of garbled codes in the N numbers is recorded, and the number of garbled codes detected is re-identified, and the model garbled code prediction function is calculated: ; Among them, Y (W) is the garbled code prediction function, is the probability of a random value in the first 10 numbers, is the weight of the Wth garbled value, is the probability of the Wth value, Q is the number of input signal values of the 5520A multi-product calibrator, is the signal interference coefficient, is the error detected in the last measurement, To measure the error, if the result of the garbled code prediction function is greater than the threshold set by the corresponding garbled code model, the robot will determine that this is a defective product.
9. A robot-based detection and measurement system, characterized in that: The system is used to perform the method according to any one of claims 1-8.
10. A readable storage medium storing instructions, characterized in that: The instructions, when executed by one or more processors of a machine, cause the processors to perform a method according to any one of claims 1-8.
