An intelligent evaluation method and system for judging the balance of a debugging tray balance
By calculating the angle between the first and second straight lines on the balance and combining it with image distortion correction, and using a deep learning model to process the image, the problem of accuracy in judging the balance of the pan balance from a distance is solved, and efficient balance judgment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 上海锡鼎智能科技有限公司
- Filing Date
- 2023-03-10
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies make it difficult to accurately determine whether a pan balance is balanced from a distance, especially during the debugging process. Large camera recognition errors and changes in the balance position lead to complex judgments, and distortion has a serious impact.
Using object detection and key point detection models, the balance state of the balance is determined by calculating the angle between a first straight line parallel to the platform and a second straight line related to the balance of the tray, combined with distortion correction during photography. The model is then trained using a deep learning network for image processing and key point extraction.
It improves the accuracy of balance judgment, eliminates unbalanced states, and ensures the accuracy and effectiveness of the judgment through multiple sampling and duration determination.
Smart Images

Figure CN116309420B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent assessment technology, and in particular to an intelligent assessment method and system for evaluating the balance of a calibrated tray balance. Background Technology
[0002] Currently, the method for judging the balance of a pan balance is to check if the top pointer is pointing to the middle of the scale. This is feasible when using the balance at close range. However, if it is necessary to judge whether the balance is balanced from a distance, such as in an experiment to test the balance, cameras are set up on the top and front of the balance to film. However, the pointer is very thin in the video footage and is difficult to detect accurately, making it difficult to judge the balance accurately. A front-view camera can judge the balance by recognizing the height of the two pans, but the error is relatively large. Even if the balance can be judged to be balanced, in actual use, if the pans swing slightly to the left and right with the same amplitude, the teacher will also consider it balanced. Moreover, if the student is still adjusting the balance and only sees that the balance is balanced, it cannot be considered balanced. The actual situation is complex and variable, and the distortion of the straight line caused by the camera varies depending on the position of the balance, making the balance state seen by the camera also different.
[0003] Therefore, how to judge whether the pan balance is balanced is an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide an intelligent evaluation method and system for assessing the balance of a pan balance. This method establishes a target detection model and a key point detection model. The balance is determined by the angle between a first straight line parallel to the platform and a second straight line related to the pan balance. The balance angle is then corrected by combining distortion from the front view and the balance placement angle determined from the top view during real-time testing. During real-time testing, the key point detection model acquires key points from both the front and top views. The positions of the two pans on the top of the balance are obtained from the key points in the top view, and the first and second straight lines of the balance are obtained from the key points in the front view. The real-time angle between the first and second straight lines is calculated, and the difference between the real-time angle and the corrected balance angle is calculated. This difference is compared with an unbalanced threshold, and unbalanced states are eliminated. The balance is determined to be balanced when the difference or the average of multiple differences is less than the balance threshold and the duration is greater than or equal to a first set time, thus improving the accuracy of balance determination.
[0005] Firstly, the above-mentioned objective of this invention is achieved through the following technical solution:
[0006] A method for determining the balance of a pan balance includes finding a first straight line parallel to the ground when the balance is in a balanced state, drawing a line connecting the same positions on two pans to obtain a second straight line, calculating a first included angle between the first and second straight lines, and determining that the balance is in a balanced state when the first included angle is less than a first set value and the duration is greater than a first threshold time; otherwise, the balance is in an unbalanced state.
[0007] The invention is further configured such that: the line connecting the center points of the two holes on the balance base is taken as the first straight line, and the line connecting the center points of the bottoms of the two tray supports is taken as the second straight line.
[0008] Secondly, the above-mentioned objective of this invention is achieved through the following technical solution:
[0009] An intelligent evaluation method for assessing the balance of a test tray balance includes establishing a target detection model and a key point detection model; capturing video of the test process; correcting image distortion based on the balance position in the front and top view images to obtain the corrected balance angle; acquiring the real-time angle between the first and second straight lines of the balance during the test; calculating the difference between the real-time angle and the corrected balance angle; comparing the difference with an unbalanced threshold; eliminating data from unbalanced states; calculating the mean of the collected data; comparing the mean with a balance threshold; and determining the balance is balanced when the mean is less than the balance threshold and the duration is greater than or equal to a first set time.
[0010] The present invention is further configured as follows: Targets related to the leveling process in the image are labeled, a target training set and a validation set are constructed, the target training set is input into a deep learning target detection network for training, a trained target detection network is obtained, and after validation with a validation set, a target detection model is obtained; key points in the image are labeled, and the key points are used to construct a first straight line and a second straight line for detecting the balance, determining whether the balance is balanced, a target training set and a validation set are constructed, the target training set is input into a deep learning key point detection network for training, a trained key point detection network is obtained, and after validation with a validation set, a key point detection model is obtained.
[0011] The invention is further configured as follows: using a key point detection model to extract key points of the balance, establishing the first and second straight lines of the balance, and based on the position of the balance tray from the center of the image in the front view and the tilt angle of the balance tray relative to the table in the top view, the angle under the combined influence of distortion caused by the camera and tilt of the balance when it is in a balanced state is corrected to obtain the corrected balance angle.
[0012] The present invention is further configured to: calculate the real-time angle between the first straight line and the second straight line, obtain the position of the center point of the balance in the image, calculate the distance between the center of the balance in the front view and the center of the image and the placement angle between the balance in the top view and the bottom of the table, and obtain the corrected balance angle which is positively correlated with both the distance and the placement angle.
[0013] The invention is further configured as follows: the coordinates between the midpoints of the first straight line are (x, y), the distance from the center of the balance to the center of the image in the front view is d = xw / 2, the angle between the line connecting the centers of the two pans of the balance and the bottom of the table in the top view is Q, and the corrected balance ∠B = (d / (w / 2)) × M + a × Q, where w represents the width of the image, M represents the distortion angle when the balance is located at the edge of the image, and a represents the influence coefficient of the placement angle on the balance angle.
[0014] The present invention is further configured such that the calculation process includes the following steps:
[0015] S1, Begin;
[0016] S2. Before debugging, when the balance is in a balanced state, the target detection model is used to detect targets in the still image of the video image to obtain the balance image. The key point detection model is used to detect key points on the balance and extract the coordinates of the key points.
[0017] S3. Take the line connecting the key points on the balance base as the first straight line, which is parallel to the surface of the platform on which the balance is placed, as the baseline when the balance is balanced. Take the line connecting the key points on the two pan supports of the balance as the second straight line, as the test line for whether the balance is balanced.
[0018] S4. Calculate the distortion angle between the first and second straight lines caused by the camera's position on the balance in the image, and use it as the corrected balance angle.
[0019] S5. Define the data queue, balance threshold, unbalance threshold, and first set time. The data queue is used to store the difference between the real-time angle and the modified balance angle.
[0020] S6. Obtain the video stream during the debugging process;
[0021] S7. Use a target detection model to perform target detection on the current frame of the video stream, and detect the position and status information of the target during the debugging process;
[0022] S8. Use a key point detection model to detect key points in the current frame, extract the coordinates of key points, obtain the first and second lines of the balance, and calculate the real-time angle between the first and second lines.
[0023] S9. Calculate the difference between the real-time included angle and the corrected equilibrium angle;
[0024] S10. Determine if the absolute value of the difference is less than or equal to the imbalance threshold. If not, clear the data queue. If yes, proceed to the next step.
[0025] S11. Determine if the data queue is full. If yes, proceed to the next step. If no, add the new data to the data queue. S12. Remove the oldest data and add the new data to the data queue.
[0026] S13. Using a target detection model, detect the positional relationship between the debugging hand and the balancing nut in the current frame, and determine whether the debugging is over. If yes, proceed to the next step; if no, clear the duration record.
[0027] S14. Determine if the data volume in the data queue has reached the set quantity. If yes, proceed to the next step; otherwise, go to S8.
[0028] S15. Calculate the average value of all data in the data queue;
[0029] S16. Determine whether the absolute value of the average is less than or equal to the equilibrium threshold. If yes, proceed to the next step; otherwise, clear the duration record.
[0030] S17. Record the duration;
[0031] S18. Determine if the duration is less than the first set time. If yes, go to S8; otherwise, proceed to the next step.
[0032] S19. Determine if the balance is in equilibrium.
[0033] S20, End.
[0034] Thirdly, the above-mentioned objectives of this invention are achieved through the following technical solutions:
[0035] An intelligent evaluation system for assessing the balance of a pan balance includes a camera device and a computing device. The camera device is used to record the process of adjusting the balance, and the computing device is used to calculate whether the balance is balanced after adjustment based on the recorded images and the method described in this application.
[0036] Fourthly, the above-mentioned objective of this invention is achieved through the following technical solutions:
[0037] An intelligent assessment terminal for evaluating the balance of a test pan balance is characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in this application when executing the computer program.
[0038] Compared with the prior art, the beneficial technical effects of this application are as follows:
[0039] 1. This application uses a static line and a moving line related to the balance to calculate the angle between the static line and the moving line to determine whether the balance is balanced, thereby expanding the angle for balance judgment and improving the accuracy of balance judgment;
[0040] 2. Furthermore, this application corrects the deviation caused by image distortion to correct the actual value of the real-time angle, thus ensuring the accuracy and effectiveness of the judgment;
[0041] 3. Furthermore, this application improves the accuracy of judgment by performing multiple sampling operations and determining the duration of the balance through multiple aspects of the judgment. Attached Figure Description
[0042] Figure 1 This is a schematic diagram of a balance judgment according to a specific embodiment of this application;
[0043] Figure 2 This is a schematic diagram of image distortion according to a specific embodiment of this application;
[0044] Figure 3 This is a schematic diagram of the horizontal tilt of a balance scale in a top-view view according to a specific embodiment of this application;
[0045] Figure 4 This is a schematic diagram of the horizontal tilt angle of a balance placed in a top view of a specific embodiment of this application. Detailed Implementation
[0046] The present invention will be further described in detail below with reference to the accompanying drawings.
[0047] This application provides a method for determining the balance of a pan balance, such as... Figure 1 As shown, a first straight line parallel to the ground is found as the static line of the balance scale in its stationary state. A second straight line is drawn connecting the two pans at the same position, serving as the moving line related to the balance scale's state. The first angle between the first and second straight lines is calculated. When the first angle is less than a first preset value, the balance scale is considered to be in a state of undetermined equilibrium. The duration of this undetermined equilibrium state is recorded. If the duration is greater than a first threshold time, the balance scale is considered to be in equilibrium. Conversely, when the first angle is greater than or equal to the first preset value, the balance scale is considered to be in an unbalanced state. The tilt direction of the balance scale is determined based on the value of the first angle and adjusted accordingly. Alternatively, if the first angle is less than the first preset value but the duration is less than the first threshold time, the balance scale is in a swinging state and is considered unbalanced.
[0048] The first straight line is obtained by connecting two points on the base. Then, a point is selected at the corresponding position on each of the two trays and connected to form the second straight line.
[0049] In one specific embodiment of this application, a first straight line is obtained by connecting the center points C and D of the two holes on the base, and a second straight line is obtained by connecting the center points A and B of the bottom of the two tray supports.
[0050] When the first line is parallel to the second line, the angle between the two lines is the equilibrium angle, and the value of the equilibrium angle is 0.
[0051] This application discloses an intelligent assessment system for evaluating the balance of a pan balance, comprising a camera device and a computing device. The camera device is used to acquire images of the examinee adjusting the pan balance, and the computing device is used to calculate whether the pan balance is balanced after adjustment based on the images acquired by the camera device.
[0052] The camera device includes a front-view camera and / or a top-view camera. The top-view camera, the front-view camera and the table are perpendicular to each other. The bottom of the front-view image is parallel to the bottom of the table, and the bottom of the top-view image is parallel to the bottom of the table. The front-view camera is used to acquire images of the debugging process from in front of the examinee, and the top-view camera is used to acquire images of the debugging process from above the balance.
[0053] The computational process of the computing device includes establishing a target detection model and a key point detection model. The target detection model is used to extract targets from the image and determine whether the balance calibration is complete. The key point detection model is used to extract the coordinates of key points in the image, and based on the key point coordinates, calculate the real-time angle between the first and second straight lines of the balance.
[0054] In one specific embodiment of this application, targets related to the leveling process in the image are labeled, a target training set and a validation set are constructed, the target training set is input into a deep learning target detection network for training, a trained target detection network is obtained, and after validation with the validation set, it is used as a target detection model.
[0055] Similarly, key points in the image are labeled. The role of key points is to form a straight line on a scale to determine whether the scale is balanced. A target training set and a validation set are constructed. The target training set is input into a deep learning key point detection network for training to obtain a trained key point detection network. After validation with the validation set, it is used as a key point detection model.
[0056] The process images are acquired, and a target detection model is used to detect targets in the front and top view images, including the balance, hand, leveling nut, and tray. The debugging is considered complete when the target detection model detects that at least one hand has left the leveling nut.
[0057] After debugging, the key point coordinates are extracted from the image using a key point detection model. The angle between the straight line of the tray support and the straight line of the base of the balance is calculated, and the balance is judged to be balanced.
[0058] In the front view image, the center points of the two holes on the base of the pan balance are selected and connected to obtain the first straight line. The center point of the bottom of the pan support is connected to obtain the second straight line. The position of the pan balance in the image may not be in the center. Considering the distortion during the image shooting process, the balance angle when the first and second straight lines are parallel needs to be corrected.
[0059] When the balance is actually balanced and placed parallel to the bottom edge of the table, take a picture. If the balance is in the center of the image from the front view and is placed parallel to the bottom edge of the table, the first straight line, the second straight line, and the bottom line of the image are parallel to each other. The distortion angle between the second straight line and the first straight line caused by distortion is 0, and the angle Q between the balance and the reference line at the bottom edge of the table is also 0.
[0060] If the scale is off-center in the front view, such as Figure 2 As shown, the first and second straight lines of the balance are not parallel to the bottom line of the image due to distortion. The second straight line and the first straight line have a distortion angle due to distortion. The more off the position of the balance in the image, the larger the distortion angle.
[0061] When the balance scale is actually balanced but the scale is placed at an angle to the bottom edge of the table, such as Figure 3 As shown, in the top-view image, the line connecting the centers of the two pans of the balance is not parallel to the bottom edge of the top view. If the balance is at an angle relative to the bottom edge of the table in the top-view image, such as... Figure 4 As shown, the larger the angle between the line connecting the centers of the two pans of the balance and the bottom edge of the top viewpoint, the greater the impact on the balance angle. Here, the reference line L of the top viewpoint is defined as parallel to the bottom edge of the viewpoint, and the angle between the line connecting the centers of the two pans of the balance and the reference line L represents the positional relationship between the balance and the bottom edge of the table.
[0062] Let the distortion angle be M when the balance is at its maximum deviation from the center in the front view image, i.e. when the balance is at the very edge of the front view image. Let the width of the front view image be w, and the coordinates of the midpoint of the first straight line (the line connecting points C and D) be (x, y). Then the distance from the center M2 of the balance to the center M1 of the front view image is d, and d = xw / 2.
[0063] When d is positive, it means that the center of the balance is to the right of the center point of the front view image; when d is negative, it means that the center of the balance is to the left of the center point of the front view image.
[0064] In the top-view image, let Q be the angle between the line connecting the centers of the two pans of the balance and the reference line L. Q can be positive or negative. If the right pan is higher than the left pan, it is positive, and vice versa.
[0065] Approximately, the corrected equilibrium angle ∠B is proportional to the distance, expressed by the following formula:
[0066] ∠B=(d / (w / 2))×M+ a × Q (1).
[0067] In the formula, 'a' is the horizontal tilt effect coefficient in the top-view image caused by the angle between the balance and the bottom edge of the table when the balance is placed.
[0068] Using an object detection model, the position coordinates of the centers of the two trays are detected from the top view, and the angle between the line connecting the centers of the two trays and the reference line L of the top view is calculated.
[0069] A key point detection model is used to extract the coordinates of four key points A, B, C, and D of the balance in the front view image to obtain the first and second straight lines, and calculate the real-time angle ∠A between the first and second straight lines.
[0070] Calculate the difference between the real-time included angle ∠A and the corrected balance angle ∠B. Set a balance threshold and an unbalance threshold. Compare the difference with the balance threshold and the unbalance threshold. Based on the comparison result, determine whether the balance is in a state of pending balance. If the balance is in a state of pending balance, determine the duration of the pending balance state. If the duration exceeds the set time threshold, determine that the balance is balanced.
[0071] In one specific embodiment of this application, four key points of the balance are extracted from N image frames, the real-time angle ∠A between the first line and the second line is calculated to obtain N real-time angle values, the difference between the N real-time angle values and the corrected balance angle is calculated to obtain N difference values, and the N difference values are compared with the unbalance threshold. If any difference value is greater than or equal to the unbalance threshold, the balance is determined to be in an unbalanced state.
[0072] If all the differences are less than the unbalance threshold, calculate the average of all the differences and compare the average with the balance threshold. If the average is less than the balance threshold, the balance is determined to be in a state of unbalanced equilibrium. Record the duration of the unbalanced equilibrium state. If the duration is greater than the first set time, the balance is determined to be balanced; otherwise, the balance is considered unbalanced.
[0073] This application discloses an intelligent assessment method for evaluating the balance of a pan balance during an examination. This method determines whether the examinee has balanced the balance during a balance adjustment experiment. The adjustment process requires simultaneous adjustment and result monitoring. During this time, the image captured by the camera is a video stream. Due to the camera's position, the balance will appear distorted in the image during shooting. The balance angle caused by this distortion needs to be corrected. The computing device calculates the corrected balance angle from the image frames of the video stream. It defines a data queue, a balance threshold, an unbalanced threshold, and a first set time. It calculates the real-time angle and the difference between the real-time angle and the corrected balance angle. The real-time angle and the corrected balance angle can be positive or negative. Assuming the balance is balanced, the balance angle is 0. An angle greater than 0 indicates the left pan is upward, and a balance angle less than 0 indicates the right pan is upward. Alternatively, an angle greater than 0 indicates the right pan is upward, and a balance angle less than 0 indicates the left pan is upward.
[0074] Similarly, the real-time angle data also has positive and negative values. The degree of tilt of the balance is judged based on the difference. When the difference is greater than the unbalance threshold, it indicates that the balance swings too much. At this time, the data is no longer meaningful compared with the previous data and needs to be re-measured. At this time, the collected data should be cleared. When the difference is less than the balance threshold and the adjustment has ended, the duration of the balance in this state is recorded. If the duration is greater than the first set time, it means that the balance has been adjusted to balance. When the difference is greater than or equal to the balance threshold, it indicates that the balance is still unbalanced.
[0075] The calculation process includes the following steps:
[0076] S1, Begin;
[0077] S2. Before debugging, when the balance is in a balanced state, the target detection model is used to detect targets in the still image of the video image to obtain the balance image. The key point detection model is used to detect key points on the balance and extract the coordinates of the key points.
[0078] S3. Take the line connecting the key points on the balance base as the first straight line, which is parallel to the surface of the platform on which the balance is placed, as the baseline when the balance is balanced. Take the line connecting the key points on the two pan supports of the balance as the second straight line, as the test line for whether the balance is balanced.
[0079] S4. Calculate the distortion angle between the first and second straight lines caused by the camera's position on the balance in the image, and use it as the corrected balance angle.
[0080] S5. Define the data queue, balance threshold, unbalance threshold, and first set time. The data queue is used to store the difference between the real-time angle and the modified balance angle.
[0081] S6. Obtain the video stream during the debugging process;
[0082] S7. Use a target detection model to perform target detection on the current frame of the video stream, and detect the position and status information of the target during the debugging process;
[0083] S8. Use a key point detection model to detect key points in the current frame, extract the coordinates of key points, obtain the first and second lines of the balance, and calculate the real-time angle between the first and second lines.
[0084] S9. Calculate the difference between the real-time included angle and the corrected equilibrium angle;
[0085] S10. Determine if the absolute value of the difference is less than or equal to the imbalance threshold. If not, clear the data queue. If yes, proceed to the next step.
[0086] S11. Determine if the data queue is full. If yes, proceed to the next step. If no, add the new data to the data queue. S12. Discard the earliest added data and add the new data to the data queue.
[0087] S13. Using a target detection model, detect the positional relationship between the debugging hand and the balancing nut in the current frame, and determine whether the debugging is over. If yes, proceed to the next step; if no, clear the duration record.
[0088] S14. Determine if the data volume in the data queue has reached the set quantity. If yes, proceed to the next step; otherwise, go to S8.
[0089] S15. Calculate the average value of all data in the data queue;
[0090] S16. Determine if the average value is less than or equal to the equilibrium threshold. If yes, proceed to the next step. If no, clear the duration record.
[0091] S17. Record the duration;
[0092] S18. Determine if the duration is less than the first set time. If yes, go to S8; otherwise, proceed to the next step.
[0093] S19. Determine if the balance is in equilibrium.
[0094] S20, End.
[0095] In one specific embodiment of this application, the data volume of the data queue is half of the processing image frame rate, the balance threshold is less than or equal to 1.5, the unbalanced threshold is greater than or equal to 3.5, the first set time is greater than or equal to 0.5 seconds, and the maximum distortion angle is 2-6 degrees.
[0096] This application discloses an intelligent assessment terminal device for evaluating the balance of a pan balance. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a balance detection program. When the processor executes the computer program, it implements the balance judgment method of this application.
[0097] Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as a calculation module and a judgment module.
[0098] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the intelligent assessment terminal device used to evaluate the balance of a test pan balance. For example, the computer program can be divided into multiple modules, each with the following specific functions:
[0099] 1. Establish a model module for building object detection models and keypoint detection models;
[0100] 2. Calculation module, used to calculate the balance data of the balance and determine whether the balance is balanced.
[0101] The intelligent assessment terminal device for evaluating and adjusting the balance of a tray balance can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The intelligent assessment terminal device for evaluating and adjusting the balance of a tray balance may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above examples are merely examples of the intelligent assessment terminal device for evaluating and adjusting the balance of a tray balance and do not constitute a limitation on the intelligent assessment terminal device for evaluating and adjusting the balance of a tray balance. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the intelligent assessment terminal device for evaluating and adjusting the balance of a tray balance may also include input / output devices, network access devices, buses, etc.
[0102] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the intelligent assessment terminal device for evaluating and adjusting the balance of a pallet scale, and connects all parts of the intelligent assessment terminal device for evaluating and adjusting the balance of a pallet scale using various interfaces and lines.
[0103] The memory can be used to store the computer program and / or modules. The processor implements various functions of the intelligent assessment terminal device for evaluating and adjusting the balance of a pan balance by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0104] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. An intelligent evaluation method for assessing and adjusting the balance of a pan balance based on a pan balance judgment method, characterized in that: The method for determining the balance of a pan balance includes finding a first straight line parallel to the ground when the balance is in a balanced state, drawing a line connecting the same positions on the two pans to obtain a second straight line, calculating a first included angle between the first and second straight lines, and determining that the balance is in a balanced state when the first included angle is less than a first set value and the duration is greater than a first threshold time; otherwise, the balance is in an unbalanced state. The first straight line is the line connecting the center points of the two openings on the balance base, and the second straight line is the line connecting the center points of the bottom of the two pan supports. This includes establishing target detection models and key point detection models, taking videos of the debugging process, correcting image distortion based on the balance positions of the front and top viewpoints in the video images, obtaining the corrected balance angle, acquiring the real-time angle between the first and second straight lines of the balance during the debugging process, calculating the difference between the real-time angle and the corrected balance angle, comparing the difference with the non-balance threshold, eliminating data in non-balanced states, calculating the mean of the collected data, comparing the mean with the balance threshold, and determining that the balance is balanced when the mean is less than the balance threshold and the duration is greater than or equal to a first set time. The key points of the balance are extracted using a key point detection model. The first and second straight lines of the balance are established. Based on the position of the balance tray from the center of the image in the front view and the tilt angle of the balance tray relative to the table in the top view, the angle under the combined influence of distortion caused by the camera and tilt is corrected when the balance is in a balanced state, so as to obtain the corrected balance angle. Calculate the real-time angle between the first and second straight lines, obtain the position of the center point of the balance in the image, calculate the distance between the center of the balance and the center of the image from the front view and the placement angle of the balance and the bottom of the table from the top view, and obtain the corrected balance angle, which is positively correlated with both the distance and the placement angle. The coordinates of the midpoints of the first straight line are (x, y). The distance from the center of the balance to the center of the image in the front view is d = xw / 2. The angle between the line connecting the centers of the two pans of the balance and the bottom of the table in the top view is Q. The corrected balance ∠B = (d / (w / 2)) × M + a × Q, where w represents the width of the image, M represents the distortion angle when the balance is located at the edge of the image, and a represents the influence coefficient of the placement angle on the balance angle.
2. The intelligent evaluation method for assessing the balance of a pan balance according to claim 1, characterized in that: Targets related to the leveling process in the image are labeled, and a target training set and a validation set are constructed. The target training set is input into a deep learning target detection network for training, resulting in a trained target detection network. After validation with the validation set, a target detection model is obtained. Keypoints in the image are labeled, and the keypoints are used to construct the first and second straight lines for detecting the balance. The balance is then determined to be balanced. A target training set and a validation set are constructed, and the target training set is input into a deep learning keypoint detection network for training, resulting in a trained keypoint detection network. After validation with the validation set, a keypoint detection model is obtained.
3. The intelligent evaluation method for assessing the balance of a pan balance according to claim 1, characterized in that: The calculation process includes the following steps: S1, Begin; S2. Before debugging, when the balance is in a balanced state, the target detection model is used to detect targets in the still image of the video image to obtain the balance image. The key point detection model is used to detect key points on the balance and extract the coordinates of the key points. S3. Take the line connecting the key points on the balance base as the first straight line, which is parallel to the surface of the platform on which the balance is placed, as the baseline when the balance is balanced. Take the line connecting the key points on the two pan supports of the balance as the second straight line, as the test line for whether the balance is balanced. S4. Calculate the distortion angle between the first and second straight lines caused by the camera's position on the balance in the image, and use it as the corrected balance angle. S5. Define the data queue, balance threshold, unbalance threshold, and first set time. The data queue is used to store the difference between the real-time angle and the modified balance angle. S6. Obtain the video stream during the debugging process; S7. Use a target detection model to perform target detection on the current frame of the video stream, and detect the position and status information of the target during the debugging process; S8. Use a key point detection model to detect key points in the current frame, extract key point coordinates, obtain the first and second straight lines of the balance, and calculate the real-time angle between the first and second straight lines. S9. Calculate the difference between the real-time included angle and the corrected equilibrium angle; S10. Determine if the absolute value of the difference is less than or equal to the imbalance threshold. If not, clear the data queue. If yes, proceed to the next step. S11. Determine if the data queue is full. If yes, proceed to the next step. If no, add new data to the data queue. S12. Remove the earliest stored data and add the new data to the data queue; S13. Using a target detection model, detect the positional relationship between the debugging hand and the balancing nut in the current frame, and determine whether the debugging is over. If yes, proceed to the next step; if no, clear the duration record. S14. Determine if the data volume in the data queue has reached the set quantity. If yes, proceed to the next step; otherwise, go to S8. S15. Calculate the average value of all data in the data queue; S16. Determine whether the absolute value of the average is less than or equal to the equilibrium threshold. If yes, proceed to the next step; otherwise, clear the duration record. S17. Record the duration; S18. Determine if the duration is less than the first set time. If yes, go to S8; otherwise, proceed to the next step. S19. Determine if the balance is in equilibrium. S20, End.
4. An intelligent evaluation system for assessing the balance of a pan balance, characterized in that: It includes a camera device and a computing device. The camera device is used to record the process of adjusting the balance, and the computing device is used to calculate whether the balance is balanced after adjustment based on the recorded image, using the method described in any one of claims 1-3.
5. An intelligent assessment terminal for evaluating the balance of a pan balance, characterized in that: The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: when the processor executes the computer program, it implements the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Video-based scoring method and apparatus, and electronic device
CN111144172A