A robot head rotation precision visual testing system and method
Patent Information
- Application Number
- CN202611382575.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-20
AI Technical Summary
[0008]鉴于上述问题,本申请提供了一种机器人头部转动精度视觉测试系统及方法,解决现有的机器人头部转动角度测试方式中采用单摄像头视觉大角度测试时难以稳定捕获显示屏基准线,存在大角度测试盲区的问题
[0037]上述发明内容相关记载仅是本申请技术方案的概述,为了让本领域普通技术人员能够更清楚地了解本申请的技术方案,进而可以依据说明书的文字及附图记载的内容予以实施,并且为了让本申请的上述目的及其它目的、特征和优点能够更易于理解,以下结合本申请的具体实施方式及附图进行说明。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, specifically to a visual testing system and method for robot head rotation accuracy. Background Technology
[0002] With the widespread application of intelligent robots in automotive, service, and industrial fields, the rotational accuracy of the robot's head (neck mechanism) directly affects the human-computer interaction experience, visual perception range, and functional reliability. The head typically possesses the following rotational capabilities:
[0003] Horizontal rotation (Yaw): Left and right head swing, commonly within ±90° or greater;
[0004] Vertical rotation (Pitch): pitching up and down, commonly ranging from 0° to 30° or including negative pitch angle;
[0005] Dual-axis linkage: horizontal + vertical combined motion.
[0006] Factory inspection, rework inspection, and tooling acceptance all require precise, repeatable, and quantifiable testing of the robot head rotation angle.
[0007] Existing methods for testing robot head rotation angles include manual visual inspection, single-camera vision testing, pure sensor reading testing, coordinate measuring machine / laser measurement, and general target measurement. However, manual visual inspection, which involves the operator observing the robot's head position and scale, is highly subjective, inefficient, and lacks quantifiable recording. Single-camera vision testing uses a single camera to capture the display screen's baseline, but when testing at large angles, the baseline may be skewed, weakened, or invisible, making it difficult to reliably capture the display screen's baseline. Pure sensor reading measurement reads the values from internal sensors such as encoders or Hall sensors, but cannot verify the consistency between the actual mechanical position and the displayed position. Coordinate measuring machine / laser measurement uses external precision instruments, which is costly, slow, and unsuitable for production lines. General target detection uses dynamic detection of the display screen position, which is computationally redundant in fixed workstation scenarios and is susceptible to interference. Summary of the Invention
[0008] In view of the above problems, this application provides a visual testing system and method for robot head rotation accuracy, which solves the problem that existing robot head rotation angle testing methods using a single camera are difficult to stably capture the display screen baseline when testing large angles, resulting in blind spots in large-angle testing.
[0009] To achieve the above objectives, the inventors provide a visual testing system for robot head rotation accuracy, comprising:
[0010] Tooling platform;
[0011] A base is mounted on the tooling platform and is used to place the robot under test so that the head of the robot under test is within the test area.
[0012] At least three cameras, including a left camera on the left side of the base, a middle camera in front, and a right camera on the right side, and the three cameras are on the same horizontal plane, with the left and right cameras on the same horizontal line as the test area.
[0013] The processing unit is connected to the three cameras and the robot under test. The processing unit is used to determine the corresponding test camera according to the test angle of the horizontal rotation of the robot's head. After the robot under test rotates to the test angle, the processing unit acquires the head image information of the robot under test through the determined camera, identifies the position information of the reference mark of the robot's head through the acquired head image information, and compares the obtained position information with the standard reference line position corresponding to the test angle to obtain the actual rotation angle of the robot's head.
[0014] In some embodiments, it also includes:
[0015] A calibration gold machine, which is used to connect to the processing unit when the position of the standard reference line is obtained;
[0016] The processing unit is also used to rotate the calibration gold machine to various test angles, and when the calibration gold machine is rotated to the test angle, to collect standard image information of the calibration gold machine under each test angle through the corresponding camera, and to obtain the standard baseline position of each test angle by identifying the reference mark position of the calibration gold machine in each standard image information.
[0017] In some embodiments, the base is detachably mounted on the tooling platform.
[0018] In some embodiments, the reference marker is a black background with a green crosshair or a yellow background with a black line.
[0019] In some embodiments, the processing unit is further configured to, when testing the vertical rotation angle of the head of the robot under test, acquire head image information of the robot under test after the vertical rotation test angle by a camera in front of the test area, identify the position of the reference mark of the head of the robot under test, and then obtain the actual vertical rotation angle of the head of the robot under test.
[0020] In some embodiments, the processing unit is further configured to re-acquire the head image information of the robot under test if a reference identifier is not identified after acquiring the head image information of the robot under test, and output a test failure result if the reference identifier is not identified after a preset number of attempts.
[0021] Another technical solution is also provided: a visual testing method for robot head rotation accuracy, which is applied to the aforementioned visual testing system for robot head rotation accuracy. The method includes the following steps:
[0022] The test involves rotating the head of the robot under test horizontally by a test angle.
[0023] The corresponding camera is determined based on the rotation test angle;
[0024] Once the robot under test has rotated to the test angle, the head image information of the robot under test is captured by a determined camera.
[0025] The position information of the reference mark on the head of the robot under test is identified by collecting head image information;
[0026] The actual rotation angle of the robot's head is obtained by comparing the obtained position information with the standard baseline position corresponding to the test angle.
[0027] In some embodiments, the following steps are also included:
[0028] By rotating the calibration gold machine to various test angles, and capturing standard image information of the calibration gold machine at each test angle through the corresponding camera when the calibration gold machine is rotated to the test angle;
[0029] The standard baseline position for each test angle is obtained by identifying the reference mark position of the calibration machine in each standard image information.
[0030] In some embodiments, the following steps are also included:
[0031] When testing the vertical rotation angle of the robot's head, the camera in front of the test area captures head image information after the robot's head rotates vertically to the test angle.
[0032] The position of the reference mark on the head of the robot under test is identified, and then the actual rotation angle of the head in the vertical direction of the robot under test is obtained.
[0033] In some embodiments, the following steps are also included:
[0034] If the reference marker is not identified after collecting the head image information of the robot under test, the head image information of the robot under test is collected again.
[0035] If the baseline identifier is not recognized after the preset number of attempts, a test failure result will be output.
[0036] Unlike existing technologies, the above technical solution involves setting up at least three cameras on the left, front, and right sides of the base, with all three cameras on the same horizontal plane as the test area. The left and right cameras are aligned with the test area on the same horizontal line. When measuring the accuracy of the head rotation angle of the robot under test, the robot is placed on the base with its head within the test area, directly facing the central camera positioned at the front of the base. During testing, the robot's head is driven to rotate horizontally by the test angle. The corresponding camera is determined based on the rotation angle. Once the robot's head reaches the test angle, the determined camera captures an image of the robot's head. The position of the reference marker on the robot's head is identified based on the captured image. This position is then compared with the position of the standard baseline corresponding to the test angle to obtain the actual rotation angle of the robot. By comparing the actual rotation angle with the test angle, the head rotation accuracy of the robot can be determined. By using at least three cameras in the horizontal direction to identify reference marks at different rotation angles of the robot under test, the robot's head rotation angle can be automatically detected visually. At the same time, it can stably identify the rotation angle of the robot's head when the robot rotates at a large angle horizontally, reducing blind spots in large-angle testing.
[0037] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description
[0038] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of this application and other related content, and should not be considered as limitations on this application.
[0039] In the accompanying drawings of the instruction manual:
[0040] Figure 1 This is a schematic diagram of a vision testing system for robot head rotation accuracy as described in a specific embodiment;
[0041] Figure 2 This is another schematic diagram of the visual testing system for robot head rotation accuracy described in the specific implementation;
[0042] Figure 3 This is another schematic diagram of the visual testing system for robot head rotation accuracy described in the specific implementation;
[0043] Figure 4 This is a schematic diagram of the structure of the robot under test described in a specific implementation.
[0044] Figure 5 This is a schematic diagram of a system architecture for the visual testing system for robot head rotation accuracy described in a specific implementation.
[0045] Figure 6 This is a schematic diagram of a specific implementation of the gold machine calibration process;
[0046] Figure 7 This is a flowchart illustrating one embodiment of the baseline visual recognition algorithm.
[0047] Figure 8 This is a flowchart illustrating one embodiment of the angle calculation method.
[0048] Figure 9 This is a flowchart illustrating the three-camera collaboration and testing determination steps described in a specific implementation method;
[0049] Figure 10 A flowchart illustrating the production testing process described in the specific implementation method;
[0050] Figure 11 This is a flowchart illustrating a visual testing method for the rotation accuracy of a robot's head, as described in a specific implementation.
[0051] The reference numerals used in the above figures are explained as follows:
[0052] 110. Tooling platform; 120. Base; 131. Left camera; 132. Middle camera; 133. Right camera; 200. Robot under test. Detailed Implementation
[0053] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.
[0054] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.
[0055] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.
[0056] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.
[0057] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.
[0058] Unless otherwise specified, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.
[0059] As understood in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments in this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.
[0060] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0061] Unless otherwise expressly specified or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this application, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. For those skilled in the art to which this application pertains, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0062] Please see Figure 1-4 This embodiment provides a visual testing system for robot head rotation accuracy, including:
[0063] Tooling platform 110;
[0064] A base 120 is mounted on the tooling platform 110 and is used to place the robot under test 200 so that the head of the robot under test 200 is within the test area.
[0065] At least three cameras, including a left camera 131 on the left side of the base 120, a middle camera 132 in front, and a right camera 133 on the right side, and the three cameras are on the same horizontal plane, with the left camera 131 and the right camera 133 on the same horizontal line as the test area.
[0066] The processing unit is connected to the three cameras and the robot under test 200. The processing unit is used to determine the corresponding test camera according to the test angle of the horizontal rotation of the head of the robot under test 200. After the robot under test 200 rotates to the test angle, the processing unit acquires the head image information of the robot under test 200 through the determined camera, identifies the position information of the reference mark of the head of the robot under test 200 through the acquired head image information, and compares the obtained position information with the standard reference line position corresponding to the test angle to obtain the actual rotation angle of the head of the robot under test 200.
[0067] At least three cameras are positioned on the left, front, and right sides of the base 120, with all three cameras on the same horizontal plane as the test area. Specifically, the left camera 131 and the right camera 133 are on the same horizontal line as the test area. When measuring the accuracy of the head rotation angle of the robot under test 200, the robot under test 200 is placed on the base 120, ensuring its head is within the test area and directly facing the central camera 132 positioned in front of the base 120. During the test, the robot under test is driven... The head of the robot under test (200) rotates horizontally to a test angle. The corresponding camera is determined based on this test angle. Once the head of the robot under test (200) reaches the test angle, the determined camera captures an image of the robot's head. The position of the reference marker on the robot's head is identified based on the captured image information. This position is then compared with the position of the standard baseline corresponding to the test angle to obtain the actual rotation angle of the robot. The head rotation accuracy of the robot under test (200) is obtained by comparing the actual rotation angle with the test angle. By using at least three cameras horizontally to identify the reference marker at different rotation angles of the robot under test (200), automated visual detection of the robot's head rotation angle is achieved. This allows for stable identification of the robot's head rotation angle even during large-angle horizontal rotations, reducing blind spots during large-angle testing.
[0068] like Figure 4 The robot under test 200 shown has a display screen on its head. A reference marker is displayed on the screen for identification by the three cameras. In this embodiment, the reference marker uses a black background with green crosshairs. In other embodiments, the reference marker can also be affixed to the robot's head.
[0069] In some embodiments, it also includes:
[0070] A calibration gold machine, which is used to connect to the processing unit when the position of the standard reference line is obtained;
[0071] The processing unit is also used to rotate the calibration gold machine to various test angles, and when the calibration gold machine is rotated to the test angle, to collect standard image information of the calibration gold machine under each test angle through the corresponding camera, and to obtain the standard baseline position of each test angle by identifying the reference mark position of the calibration gold machine in each standard image information.
[0072] A calibration gold calibrator, also known as a standard sample, is a product that has undergone precise measurement and has accurate angles. The purpose of calibrating a gold calibrator is to:
[0073] 1. Establish the standard baseline positions under each reference angle;
[0074] 2. Provides a reference point for dual-reference angle interpolation in subsequent angle calculations;
[0075] 3. Ensure the accuracy and traceability of the testing system.
[0076] When calibrating using a calibration gold machine, place the calibration gold machine on base 120, rotate the calibration gold machine to various test angles, acquire the scale image information of the calibration gold machine at each test angle, identify the reference mark position in the standard image information of each test angle to obtain the standard reference line position of each test angle.
[0077] In some embodiments, the base 120 is detachably mounted on the tooling platform 110.
[0078] To accommodate robot timing tests at different heights, a corresponding base 120 is selected based on the height of the robot under test 200 and installed on the tooling platform 110. This ensures that the robot's head remains within the testing area regardless of its height during timing tests. There is no need to adjust the height of the three cameras to accommodate robot timing tests at different heights.
[0079] In some embodiments, the reference marker is a green crosshair on a black background or a black line on a yellow background. Using a green crosshair on a black background or a black line on a yellow background allows for accurate identification of the reference marker. When a green crosshair on a black background is used as the reference marker, the reference marker is detected using a green adaptive threshold mask acquisition method. When a black line on a yellow background is used as the reference marker, the reference marker is identified by extracting the yellow area and detecting the dark line.
[0080] In some embodiments, the processing unit is further configured to, when testing the vertical rotation angle of the head of the robot under test 200, acquire head image information of the robot under test 200 after the head rotates to the test angle in the vertical direction through a camera in front of the test area, identify the position of the reference mark of the head of the robot under test 200, and then obtain the actual vertical rotation angle of the head of the robot under test 200.
[0081] When testing the vertical rotation angle of the robot, the head image information of the robot under test 200 is collected by the camera in front of the base 120. When the head of the robot under test 200 rotates to the test angle in the vertical direction, the head image information of the robot under test 200 is collected by the front camera to obtain the actual rotation angle of the head of the robot under test 200 in the vertical direction.
[0082] In some embodiments, the processing unit is further configured to re-acquire the head image information of the robot under test 200 if a reference identifier is not identified after acquiring the head image information of the robot under test 200, and output a test failure result if the reference identifier is not identified after a preset number of attempts.
[0083] If the reference marker cannot be identified based on the collected head image information, the head image information is re-collected to identify the reference marker. If the reference marker is not identified after a preset number of attempts, a test failure result is output to avoid wasting computing resources.
[0084] In some embodiments, a robot head rotation angle accuracy testing system includes:
[0085] Tooling layer: Three-camera setup, fixed workstations, and zoned coverage;
[0086] Visual layer: baseline detection, angle calculation, and decision output;
[0087] Calibration layer: data acquisition, benchmark establishment, and cache management;
[0088] Control layer: motor drive, process arrangement and result recording.
[0089] System design principles:
[0090] 1. Three-camera arrangement: The three cameras are installed in a triangular structure on the tooling platform 110. The left camera, the robot under test 200 and the right robot are on the same horizontal line (same installation height H); the middle front camera is located in front of the robot (the side where the robot's display screen faces), forming the apex of the triangle.
[0091] 2. Fixed workstation: The robot under test 200 is placed on the replaceable base 120 with the display screen facing the front camera.
[0092] 3. Zoned Coverage: The horizontal rotation range is divided into multiple zones, each zone is covered by a camera with a corresponding viewpoint.
[0093] 4. Equidistant shooting: The left / center / right cameras 133 maintain the designed distance from the robot's head (locked after initial installation and calibration).
[0094] 5. Independent Focus: Each camera has its own independently set focus parameters.
[0095] 6. Not movable: The camera bracket is locked after initial installation and testing and will not be adjusted when changing models.
[0096] like Figure 2 As shown, the three cameras are arranged as follows:
[0097] Left camera 131: Installed on the left side of the horizontal line, covering an angle range of -90° to -45° in the horizontal direction; the main test angle is -90° (extreme left turn), and its viewing angle is side view, enabling test acquisition of large negative angles, such as -90° and -45°.
[0098] Camera 132: Installed at the front vertex of the triangle, covering the horizontal angle range of -45° to +45° and the full vertical range. The main test angle is 0° (directly facing). Its visual characteristics are direct view, covering the return and transition intervals, and the full vertical rotation range.
[0099] Right camera 133: Installed on the right side of the horizontal line, covering a visual range of +45° to +90° in the horizontal direction; the main test angle is +90° (extreme right turn), and its viewing angle is side view, so as to achieve test acquisition of large positive angles, such as +45° and +90°.
[0100] The horizontal angles range from -90 degrees to +90 degrees from left to right.
[0101] The central area is covered by a central camera 132 to ensure 0° alignment accuracy; the large angle is covered by a side-view camera to ensure the baseline can be detected.
[0102] Key structural points:
[0103] On the same horizontal line: the left camera 131, the robot under test 200, and the right camera 133 are collinear and installed at the same height;
[0104] Triangle vertex: The center camera 132 is located directly in front of the robot's display screen, forming a triangle with the left and right cameras 133;
[0105] Display orientation: The robot's display screen faces the central camera 132 (front vertex direction).
[0106] Specifically, the camera hardware configuration requirements are as follows:
[0107] Three cameras are used, all USB cameras (1080p, 1920×1080 recommended); each has a separate USB port; the installation method is a fixed bracket, triangular arrangement, and non-movable; the structure is triangular, with the left camera 131 and right camera 133 on the same horizontal line as the robot, and the middle camera 132 at the front apex; the relative positions are that the left camera 131 and right camera 133 are at opposite ends of the horizontal line, and the middle camera 132 is directly in front of the robot's display screen; the height is the same horizontal height H as the center of the robot's display screen; the distance between the cameras is determined during initial installation and maintains the designed shooting distance from the robot; stable lighting is used to avoid glare on the robot's display screen.
[0108] The system's tooling software configuration is as follows:
[0109] The host computer software provides a tooling configuration interface, and the configuration items include:
[0110] cameraLeft: Left camera device index;
[0111] cameraCenter: Index of camera devices;
[0112] cameraRight: Right camera device index;
[0113] focusLeft: Left camera focus value (0 = Auto, 1-255 = Manual);
[0114] focusCenter: The camera's focus value;
[0115] focusRight: Focus value of the right camera;
[0116] baselineType: Baseline type (green = black background with green line, yellow_black = yellow background with black line);
[0117] collectMode: Gold collection mode (auto=automatic, manual=manual).
[0118] Configure persistent storage so that it is automatically loaded after shift change / restart.
[0119] Replaceable base adaptation structure: To accommodate robot heads of different models and sizes, the fixture adopts a split structure of main platform and replaceable base. Different models of replaceable bases have different heights or load-bearing profiles; after all models of bases are installed in the same area, the center of the display screen of the robot under test is located at the same detection position (test area); when changing models, only the base is replaced, the positions of the three cameras remain unchanged, and the fixed ROI vision algorithm does not require readjustment of the cameras; the base is detachable and installed using positioning pins combined with fasteners (bolts or quick-release locks), ensuring the accuracy of repeated installation. The specific changeover process is as follows: loosen the base fasteners → remove the old base and insert the new model base → lock and confirm the detection position → switch the software-machine solution.
[0120] For larger angle ranges or special structures, the system can be expanded to N cameras. For example, one camera can be added for every additional 90 degrees of range; the coverage areas of adjacent cameras can overlap by 15°-30° to ensure the accuracy of transition angle detection; the camera selection logic is to find the camera that covers the target angle.
[0121] like Figure 5 The system architecture of the robot head rotation accuracy vision testing system shown includes the following:
[0122] Upper computer application layer: tooling configuration module, metal acquisition module, and test execution module;
[0123] Business logic layer: Gold machine solution configuration (solution / steps / steps) and Python script caller (camera / image / comparison);
[0124] Visual analysis layer: image analyzer (baseline detection) and image tester (comparison / angle / baseline display).
[0125] Device control layer: camera service (enumeration / initialization / photo capture) and serial communication (motor rotation / baseline display);
[0126] Hardware layer (triangular three-camera fixture): The central camera is set at the apex in front of the robot, and the left and right cameras are set on both sides of the robot and on the same horizontal line.
[0127] The responsibilities of each module are as follows:
[0128] Tooling configuration module: camera selection, focus settings, baseline type, acquisition mode;
[0129] Gold machine data acquisition module: drives the gold machine calibration process and manages the acquisition and verification of standard diagrams;
[0130] Test execution module: drives the production test process, manages rotation, photo taking, comparison, and judgment;
[0131] Gold machine solution configuration: Define the standard drawing list, data acquisition steps, and comparison reference angles for different products;
[0132] Python script caller: encapsulates Python script calls and manages the camera's lifecycle;
[0133] Image Analyzer: Baseline Detection Core Algorithms (ROI, Mask, Projection, Hough);
[0134] Image tester: compares the test image with the standard image, calculates the angle, and determines the result;
[0135] Camera services: camera enumeration, initialization, single-frame capture, resource release;
[0136] Serial communication: Sending motor rotation commands and baseline display / hide commands.
[0137] The system's data flow is as follows: Test command → Select camera → Motor rotation → Wait for stabilization → Take picture → Test image + Standard Figure 1 +Standard Figure 2 →Baseline detection→Angle calculation→Decision output→PASS / FAIL / FAIL_UNDER / FAIL_OVER.
[0138] The calibration process of the gold machine in this system is as follows: Figure 6 As shown, the calibration gold calibrator (standard prototype) is a reference product that has undergone precise measurement and has accurate angles. The purpose of calibrating the gold calibrator is:
[0139] 1. Establish the standard baseline positions under each reference angle;
[0140] 2. Provides a reference point for dual-reference angle interpolation in subsequent angle calculations;
[0141] 3. Ensure the accuracy and traceability of the testing system.
[0142] The naming convention for standard images is: {camera position}_{rotation direction}_{angle}.jpg. For example, camera position values include: I (left), m (center), r (right); rotation direction values include: h (horizontal), v (vertical); angle values are integers, which can be negative. For instance, m_h_0.jpg represents a standard image using the center camera, with horizontal rotation and 0° rotation; I_h_-90.jpg represents a standard image using the left camera, with horizontal rotation and -90° rotation; and m_v_25.jpg represents a standard image using the center camera, with vertical rotation and 25° rotation.
[0143] Different reference figures have different uses. The specific uses of each standard figure are as follows:
[0144] Horizontal direction:
[0145]
[0146] Vertical direction:
[0147]
[0148] The standard drawing acquisition process is as follows:
[0149] 1. Automatic Acquisition Mode: Start → Backup and clear the current standard drawing directory → Display baseline + reset the metal detector motor to the initial angle → Prompt the operator to place the metal detector at the corresponding angle → Automatically rotate the motor to the target angle (optional) → Wait for the motor to stabilize (600~2000ms) → Take a picture with the corresponding camera → Real-time detection of baseline visibility; when visible, generate a baseline calibration view and cache it; when invisible, terminate the process and report an error → Automatically return to center / initialize the next camera → Write to standard_config.json → Batch check all standard drawing baselines → Metal detector horizontally returns to center + hides the baseline → Complete.
[0150] Example of data collection steps:
[0151]
[0152] 2. Manual acquisition mode: The operator confirms step by step as prompted → manually controls the motor to rotate (or uses the "rotation test" button) → manually clicks the corresponding camera to take a picture → immediately performs baseline detection after each picture is taken → the process terminates if any baseline is not visible.
[0153] Multiple sets of metal structure images can be collected from the same reference angle (paths are separated by commas), and the baseline coordinates are calculated using an arithmetic mean.
[0154] avg_x=Σ(x_i) / n; avg_y=Σ(y_i) / n, where avg_x is the average x-axis coordinate of the baseline coordinates in n sets of metallurgical diagrams, and avg_y is the average y-axis coordinate of the baseline coordinates in n sets of metallurgical diagrams.
[0155] The purpose is to reduce the error of a single metalworking machine and improve calibration stability.
[0156] When caching the baseline position, the baseline position of each standard image is detected during data acquisition, and the result is written to baseline_cache.json. Subsequent tests can directly read from the cache to avoid duplicate detection.
[0157] Once the standard image is acquired, the system will automatically verify it.
[0158] 1. Baseline visibility: All standard map baselines must be visible;
[0159] 2. Angle / pixel ratio: |angle_per_pixel|≤2.0° / px;
[0160] 3. Pixel span: The displacement of the two reference angular baselines is ≥20px.
[0161] If the conditions are not met, a re-collection is required.
[0162] like Figure 7 The baseline visual recognition algorithm shown uses a computer vision algorithm to detect the pixel position of the baseline in the image, and then calculates the actual rotation angle of the robot's head. The baseline is a visual marker displayed on the robot's screen, typically a crosshair or a unidirectional line.
[0163] Core principles of baseline visual recognition:
[0164] 1. Fixed product workstation → Use fixed ROI, no dynamic main body inspection;
[0165] 2. Baseline color is known → Prioritize color mask (green / yellow background with black line);
[0166] 3. Baseline offset during side view → Side view adaptive strategy;
[0167] 4. Detection failure → multi-level rollback mechanism.
[0168] ROI definition: FIXED_PRODUCT_ROI=(x0,y0,x1,y1); Example: (680,230,1288,700).
[0169] Based on the preset installation location of the tooling, the area of the display screen on the head of the robot under test is covered. During actual testing, the ROI area is reduced by 4% to avoid regional interference.
[0170] Compared to dynamic object detection, fixed ROI has lower computational requirements, focuses only on the display screen, has stronger anti-interference capabilities, is suitable for fixed workstation scenarios, and has a faster detection speed.
[0171] Determining camera orientation and angle from image filenames:
[0172] 1. Filename: l_*.jpg Tested robot / Tested robot l.jpg, Parsing result: Left camera, preferred_side='right';
[0173] 2. Filename: r_*.jpg Tested robot / Tested robot r.jpg, Parsing result: Right camera, preferred_side='left';
[0174] 3. Filename: Other; Parsing result: Left camera, preferred_side='right';
[0175] 4. Filename: _(h\|v)_(-?\d+), Parsing result: angle, e.g., tested robot m_v_25 tested robot → tested robot perpendicular to tested robot 25°
[0176] 5. Filename: Unable to be parsed. Parsing result: angle_unknown=True.
[0177] Angle conventions: 0° = center camera looking directly at you; 90° = right camera looking directly at you; -90° = left camera looking directly at you.
[0178] Baseline detection main process:
[0179] 1. Input: Image path, rotation_type (horizontal / vertical);
[0180] 2. Cross detection (OpenV, optional): Skip when viewing horizontally and from the side to avoid pulling back to the center;
[0181] 3. Color mask construction:
[0182] Green uses an adaptive threshold combined with proportional constraints;
[0183] The yellow background with black lines combines color separation with morphology.
[0184] Edge clipping combined with small connected region rules → when directional baseline detection.
[0185] 4. Unidirectional baseline detection:
[0186] horizontal: Select the vertical peak for column projection; when viewing from the side, press preferred_side to select the peak in the half-zone.
[0187] Vertical: For line projection, select the horizontal peak and take the uppermost edge of the main peak.
[0188] 5. Cross-shaped geometric verification: Orthogonal direction detection, geometry_score is used for confidence.
[0189] 6. Rollback mechanism (if the above fails): grayscale quantile threshold binarization, full-image Hough line detection.
[0190] 7. Output baseline_position {x, y}, baseline_visible, success.
[0191] When viewing from a large horizontal angle, the baseline (vertical line) may shift to the edge of the image, weaken in intensity, or be incorrectly pulled back to the center. To avoid these situations, a side-view adaptive strategy is adopted as follows:
[0192]
[0193] The reference identification types used include:
[0194] 1. Green: Black background with green crosshairs; the detection method uses a green adaptive threshold mask.
[0195] 2. yellow_black: Yellow background with black lines. The detection method uses yellow area detection and dark line detection.
[0196] With the aid of desired axis pixels, linear interpolation is performed between two reference angles to obtain the desired baseline pixel position corresponding to the target angle:
[0197] t=(target_angle-ref_angle1) / (ref_angle2-ref_angle1);
[0198] expected_pixel=pixel1+(pixel2-pixel1)*t.
[0199] Used as a baseline for expected_axis_pixel input; assists in projection peak selection to improve accuracy; not used when not viewing or angle_unknown (to avoid bias).
[0200] Debug output: Each test generates a debug file (stored in the temp / directory):
[0201]
[0202] like Figure 8 The angle calculation method shown adopts the principle of dual reference difference, and the basic idea is as follows:
[0203] Given two reference angles θ1 and θ2 and their corresponding baseline pixel coordinates p1 and p2, the actual angle θ_actual is calculated by linear interpolation for the baseline coordinates p_test detected by the test image.
[0204] Calculation formula:
[0205] Horizontal rotation (measuring the x-coordinate of the vertical line):
[0206] angle_per_pixel=(θ2-θ1) / (p2-p1);
[0207] θ_actual=θ_anchor+(p_test-p_anchor)×angle_per_pixel
[0208] Vertical rotation (measuring the y-coordinate of the horizontal line) is calculated using the following formula, but the y-coordinate is used instead.
[0209] Anchor point strategy:
[0210]
[0211] Reference angle configuration in each direction:
[0212]
[0213] Calculation example:
[0214] Scenario: The camera is rotated horizontally to -30° while in use;
[0215] Read the cached baseline positions of the standard images m_h_-45.jpg and m_h_0.jpg;
[0216] Assume p1(x=-45°)=850, p2(x=0°)=984;
[0217] angle_per_pixel=(0-(-45)) / (984-850)=45 / 134≈0.336° / px;
[0218] The test graph detected p_test=920;
[0219] θ_actual=-45+(920-850)×0.336=-45+23.5=-21.5°
[0220] The target angle is -30°, and the error is -21.5 - (-30) = 8.5°.
[0221] Calibration stability verification:
[0222] MAX_ANGLE_PER_PIXEL = 2.0 degrees / pixel
[0223] If |angle_per_pixel|>2.0° / px:
[0224] If the calibration span is too small, it is required to re-acquire a reference map with a larger angle difference. It is recommended that the baseline displacement be ≥20px.
[0225] Compensation for tolerance:
[0226] Test parameter configuration:
[0227] {
[0228] "rotationH":["Angle, tolerance, compensation", ...]
[0229] "rotationV": ["angle, tolerance, compensation", ...]
[0230] }
[0231]
[0232] Decision logic:
[0233] Deviation angle = (actual measured angle + compensation angle) - target angle; if the deviation angle ≤ tolerance, then pass; otherwise, fail.
[0234] like Figure 9 The flowchart shown illustrates the three-camera collaboration and testing / judgment steps.
[0235] 1. Automatic camera selection;
[0236] 1.1 Horizontal rotation:
[0237] Source: If -45° ≤ horizontal test angle ≤ 45°, select the middle camera; if the horizontal test angle < -45°, select the left camera; if the horizontal test angle > 45°, select the right camera.
[0238] 1.2 Vertical rotation:
[0239] Vertical rotation always uses the camera.
[0240] 2. Test result determination:
[0241] Process: Select the target angle for shooting → Take a picture → Compare with image_test.py:
[0242] If the baseline is not visible, try reshooting with the same camera (maximum 2 times) → if it still fails, then FAIL (baseline is not visible).
[0243] The baseline is visible → the actual angle is calculated using the dual reference angles. When |error| ≤ tolerance → PASS; when error < - tolerance → FAIL_UNDER; when error > tolerance → FAIL_OVER.
[0244] The meaning of the judgment is as follows:
[0245]
[0246] There is no logic of "switching to the center camera to judge mechanical limits if it is not visible from the side"; multi-camera collaboration is reflected in the selection of cameras by angle zone, rather than dedicated detection for extreme angles.
[0247] Baseline not visible, retry:
[0248] source:
[0249] 1. Trigger a retry if no baseline is detected;
[0250] 2. Take another photo using the same camera (without switching between center / left / right);
[0251] 3. Retry a maximum of 2 times; if still not visible, throw a failure message.
[0252] like Figure 10 The production testing process is shown below;
[0253] 1. Standard test sequence:
[0254] 1.1 Horizontal Rotation Test
[0255] (1) Initially facing (0°) → center camera → judgment;
[0256] (2) Turn left to -90° → left camera → judgment;
[0257] (3) (Optional) Return to 0° → Center camera → Determine;
[0258] (4) Rotate to +90° → Right camera → Decision;
[0259] (5) Return to 0° → center camera.
[0260] 1.2. Vertical rotation test:
[0261] (1) Eye level (0°) → Center camera → Judgment;
[0262] (2) Tilting up 25° → Center camera → Judgment.
[0263] (Or test multiple angles according to configuration: 5° / 10° / 15° / 20° / 25°)
[0264] 2. Mobile testing process:
[0265] 1. Start testing;
[0266] 2. Verify that the three cameras are configured;
[0267] 3. Analyze the test plan (rotationH / rotationV);
[0268] 4. Camera initialization in progress;
[0269] 5; Display baseline + motor reset (HV 0,0);
[0270] 6. Traverse the following steps:
[0271] 6.1. Rotate vertically to the target angle;
[0272] 6.2 Wait 280ms;
[0273] 6.3. Take photos with the central camera;
[0274] 6.4 Execute Compare;
[0275] 6.5. Determine if it is PASS / FAIL;
[0276] 6.6 If it fails, retry or terminate.
[0277] 7. Traverse the following steps:
[0278] 7.1 Select the camera based on the angle;
[0279] 7.2. Rotate horizontally to the target angle;
[0280] 7.3 Wait 1000ms;
[0281] 7.4 Take a picture with the corresponding camera;
[0282] 7.5 Perform the comparison;
[0283] 7.6 Determine whether to pass or fail.
[0284] 8. Return to horizontal alignment 0°;
[0285] 9. Record test logs (errors at each angle, PASS / FAIL).
[0286] 10. End.
[0287] Example of test parameter configuration:
[0288] Option A:
[0289] {"rotationH":["0,3,-0.51","-90,3,-3.15","90,3,5"],
[0290] "rotationV":["25,3,3.67","0,3,0.25"]}.
[0291] Option B:
[0292] {"rotationH":["0,4,-2.17","-90,3,-0.97","90,3,4.19"],
[0293] "rotationV":["19,3,2.6","-6,3,-0.84"]}.
[0294] Test result output
[0295] {"H_0":{"diff":0.12,"result":"PASS"},
[0296] "H_-90":{"diff":-1.85,"result":"PASS"},
[0297] "H_90":{"diff":2.31,"result":"PASS"},
[0298] "V_0":{"diff":0.08,"result":"PASS"},
[0299] "V_25":{"diff":1.42,"result":"PASS"}}
[0300] Example: A017 vehicle-mounted robot, whose head has: horizontal rotation ±90°, vertical rotation 0° to 25° or -6° or 19°, and display screen baseline: black background with green crosshairs.
[0301] Tooling configuration:
[0302] 1. Camera: 3×1080p USB camera;
[0303] 2. Baseline type: green (black background with green crosshairs);
[0304] Test metrics:
[0305] Horizontal test points: 0°, -90°, +90°;
[0306] Vertical test points: 0°, 25° (Option A) or -6°, 19° (Option B);
[0307] Tolerance: ±3° (configurable);
[0308] Compensation: based on the tooling specification value.
[0309] Test cycle: Initialization and reset steps take about 3 seconds, vertical single-point test takes about 2 seconds, horizontal single-point test takes about 3 seconds, and complete test (5 points) takes about 15 seconds.
[0310] This system can be extended to:
[0311] 1. Service robots: Adjust the ROI to adapt to different display screen sizes, configure different vertical angle ranges, and increase the downward angle test.
[0312] 2. For monitoring PTZ, only a horizontal single-extension is required, which can be simplified to a single / dual camera solution. The reference angle range is configured according to the actual rotation range.
[0313] 3. For robots with a wider angle range, increase the number of cameras (e.g., 4-5 cameras are needed for ±180°), expand the partition coverage logic, and increase the reference angle configuration accordingly.
[0314] 4. For different baseline types, configure the baselineType parameter, adjust the color mask threshold, and support custom baseline detection algorithms.
[0315] The terminology is defined as follows:
[0316] Calibration gold machine: A standard prototype that has undergone precise measurement and is used to establish a testing benchmark;
[0317] Baseline (baseline marker): A visual mark displayed on the robot's screen, used for angle calculation;
[0318] ROI: Region of Interest, the area displayed on the indicator screen here;
[0319] Reference angle: The known precise angle used when calibrating the gold fitting machine.
[0320] Tolerance: The allowable error range for determining a pass;
[0321] Compensation: A correction value for systematic bias;
[0322] Side view: The camera's perspective when viewing the display screen from the side.
[0323] Please see Figure 11 In another embodiment, a visual testing method for robot head rotation accuracy is provided, the method being applied to the robot head rotation accuracy visual testing system described in the above embodiments, the method comprising the following steps:
[0324] Step S210: Drive the head of the robot under test to rotate horizontally by the test angle;
[0325] Step S220: Determine the corresponding camera based on the test angle of rotation;
[0326] Step S230: After the robot under test rotates to the test angle, the head image information of the robot under test is acquired through the determined camera;
[0327] Step S240: Identify the position information of the reference marker on the head of the robot under test by collecting head image information;
[0328] Step S250: Compare the obtained position information with the standard baseline position corresponding to the test angle to obtain the actual rotation angle of the robot's head.
[0329] At least three cameras are set up on the left, front, and right sides of the base, with all three cameras on the same horizontal plane as the test area. Specifically, the left and right cameras are aligned with the test area. When measuring the accuracy of the robot's head rotation angle, the robot is placed on the base with its head within the test area, directly facing the central camera positioned at the front of the base. During testing, the robot's head is driven to rotate horizontally by the test angle. The corresponding camera is determined based on the rotation angle. Once the robot's head reaches the test angle, the determined camera captures an image of the robot's head. The position of the reference marker on the robot's head is identified based on the captured image. This position is then compared with the standard baseline position corresponding to the test angle to obtain the actual rotation angle of the robot. The head rotation accuracy of the robot is obtained by comparing the actual rotation angle with the test angle. By using at least three cameras in the horizontal direction to identify reference marks at different rotation angles of the robot under test, the robot's head rotation angle can be automatically detected visually. At the same time, it can stably identify the rotation angle of the robot's head when the robot rotates at a large angle horizontally, reducing blind spots in large-angle testing.
[0330] In some embodiments, the following steps are also included:
[0331] By rotating the calibration gold machine to various test angles, and capturing standard image information of the calibration gold machine at each test angle through the corresponding camera when the calibration gold machine is rotated to the test angle;
[0332] The standard baseline position for each test angle is obtained by identifying the reference mark position of the calibration machine in each standard image information.
[0333] A calibration gold calibrator, also known as a standard sample, is a product that has undergone precise measurement and has accurate angles. The purpose of calibrating a gold calibrator is to:
[0334] 1. Establish the standard baseline positions under each reference angle;
[0335] 2. Provides a reference point for dual-reference angle interpolation in subsequent angle calculations;
[0336] 3. Ensure the accuracy and traceability of the testing system.
[0337] When calibrating using a calibration gold machine, place the calibration gold machine on the base, rotate the calibration gold machine to various test angles, acquire the scale image information of the calibration gold machine at each test angle, identify the reference mark position in the standard image information of each test angle, and obtain the standard reference line position of each test angle.
[0338] In some embodiments, the following steps are also included:
[0339] When testing the vertical rotation angle of the robot's head, the camera in front of the test area captures head image information after the robot's head rotates vertically to the test angle.
[0340] The position of the reference mark on the head of the robot under test is identified, and then the actual rotation angle of the head in the vertical direction of the robot under test is obtained.
[0341] When testing the vertical rotation angle of the robot, the head image information of the robot under test is collected by the camera directly in front of the base. When the head of the robot under test rotates to the test angle in the vertical direction, the head image information of the robot under test is collected by the front camera to obtain the actual rotation angle of the head of the robot under test in the vertical direction.
[0342] In some embodiments, the following steps are also included:
[0343] If the reference marker is not identified after collecting the head image information of the robot under test, the head image information of the robot under test is collected again.
[0344] If the baseline identifier is not recognized after the preset number of attempts, a test failure result will be output.
[0345] If the reference marker cannot be identified based on the collected head image information, the head image information is re-collected to identify the reference marker. If the reference marker is not identified after a preset number of attempts, a test failure result is output to avoid wasting computing resources.
[0346] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.
Claims
1. A visual testing system for robot head rotation accuracy, characterized in that, include: Tooling platform; A base is mounted on the tooling platform and is used to place the robot under test so that the head of the robot under test is within the test area. At least three cameras, including a left camera on the left side of the base, a middle camera in front, and a right camera on the right side, and the three cameras are on the same horizontal plane, with the left and right cameras on the same horizontal line as the test area. The processing unit is connected to the three cameras and the robot under test. The processing unit is used to determine the corresponding test camera according to the test angle of the horizontal rotation of the robot's head. After the robot under test rotates to the test angle, the processing unit acquires the head image information of the robot under test through the determined camera, identifies the position information of the reference mark of the robot's head through the acquired head image information, and compares the obtained position information with the standard reference line position corresponding to the test angle to obtain the actual rotation angle of the robot's head.
2. The visual testing system for robot head rotation accuracy according to claim 1, characterized in that, Also includes: A calibration gold machine, which is used to connect to the processing unit when the position of the standard reference line is obtained; The processing unit is also used to rotate the calibration gold machine to various test angles, and when the calibration gold machine is rotated to the test angle, to collect standard image information of the calibration gold machine under each test angle through the corresponding camera, and to obtain the standard baseline position of each test angle by identifying the reference mark position of the calibration gold machine in each standard image information.
3. The robot head rotation accuracy visual testing system according to claim 1, characterized in that, The base can be detachably mounted on the tooling platform.
4. The robot head rotation accuracy visual testing system according to claim 1, characterized in that, The reference marker is a black background with a green cross or a yellow background with black lines.
5. The robot head rotation accuracy visual testing system according to claim 1, characterized in that, The processing unit is also used to acquire head image information of the robot under test after the vertical rotation angle of the robot's head is tested by a camera in front of the test area, identify the position of the reference mark of the robot's head, and then obtain the actual vertical rotation angle of the robot's head.
6. The visual testing system for robot head rotation accuracy according to claim 1, characterized in that, The processing unit is also used to re-acquire the head image information of the robot under test if the reference marker is not identified after acquiring the head image information of the robot under test. If the reference marker is not identified after a preset number of attempts, the test failure result is output.
7. A visual testing method for the rotation accuracy of a robot's head, characterized in that, The method is applied to the robot head rotation accuracy visual testing system as described in any one of claims 1-6, and the method includes the following steps: The test involves rotating the head of the robot under test horizontally by a test angle. The corresponding camera is determined based on the rotation test angle; Once the robot under test has rotated to the test angle, the head image information of the robot under test is captured by a determined camera. The position information of the reference mark on the head of the robot under test is identified by collecting head image information; The actual rotation angle of the robot's head is obtained by comparing the obtained position information with the standard baseline position corresponding to the test angle.
8. The visual testing method for robot head rotation accuracy according to claim 7, characterized in that, It also includes the following steps: By rotating the calibration gold machine to various test angles, and capturing standard image information of the calibration gold machine at each test angle through the corresponding camera when the calibration gold machine is rotated to the test angle; The standard baseline position for each test angle is obtained by identifying the reference mark position of the calibration machine in each standard image information.
9. The visual testing method for robot head rotation accuracy according to claim 7, characterized in that, It also includes the following steps: When testing the vertical rotation angle of the robot's head, the camera in front of the test area captures head image information after the robot's head rotates vertically to the test angle. The position of the reference mark on the head of the robot under test is identified, and then the actual rotation angle of the head in the vertical direction of the robot under test is obtained.
10. The visual testing method for robot head rotation accuracy according to claim 7, characterized in that, It also includes the following steps: If the reference marker is not identified after collecting the head image information of the robot under test, the head image information of the robot under test is collected again. If the baseline identifier is not recognized after the preset number of attempts, a test failure result will be output.