Movement error correction method and movement device for machine vision equipment
By determining the hitting pattern in a machine vision device, acquiring camera and gyroscope parameters, and combining multi-dimensional data for error correction, the problems of inflexible device position adjustment and inaccurate parameter acquisition in traditional methods are solved, thereby improving the accuracy and performance of the device in different modes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional machine vision equipment motion positioning and error correction methods cannot flexibly adjust the equipment position according to different usage modes, and it is difficult to accurately obtain the parameter information of the camera and gyroscope, resulting in poor accuracy and effect.
A movement error correction method is adopted, which obtains camera and gyroscope parameters by determining the target hitting pattern, and combines multi-dimensional data to correct the camera parameters. This includes taking images before and after the sensing device moves and extracting the coordinates of reference points, and using the gyroscope parameters to construct a correction matrix for precise correction.
This improves the accuracy and effectiveness of machine vision equipment in different ball-hitting modes, and solves the problems of insufficient flexibility and accuracy in traditional methods.
Smart Images

Figure CN121746479A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motion error correction for machine vision equipment, and more particularly to a method and a motion device for motion error correction of machine vision equipment. Background Technology
[0002] In the field of machine vision equipment, with the continuous advancement of technology in recent years, its application scope has become increasingly wide, playing an important role in many industries. For example, in sports simulation scenarios, machine vision equipment can provide athletes with a more realistic and accurate simulation experience, helping them to train better and improve their skills. At the same time, machine vision equipment also plays an indispensable role in industrial production, security monitoring, and other fields. It can improve production efficiency, ensure production safety, and bring significant value to the development of various industries.
[0003] There are several traditional methods for solving the problems of motion positioning and error correction in machine vision equipment. One common approach is to pre-set fixed position parameters and move the device directly to the designated location. However, this method lacks flexibility and is difficult to adapt to different usage scenarios. Another approach is to use simple sensors to perform approximate position sensing and then manually adjust based on the sensing results. This method relies on manual operation, is inefficient, and is prone to human error. Yet another method is to determine and correct position based on data from a single gyroscope. However, data from a single gyroscope may lack sufficient accuracy and cannot accurately reflect the actual state of the device.
[0004] The drawback of existing technologies is that traditional motion positioning and error correction methods cannot flexibly adjust the device position according to different usage modes (such as left-handed hitting mode and right-handed hitting mode). Furthermore, it is difficult to accurately obtain camera parameter information and gyroscope parameters during device movement, resulting in the inability to effectively correct camera parameters and thus affecting the accuracy and effectiveness of machine vision equipment. Summary of the Invention
[0005] The purpose of this application is to overcome the above-mentioned technical problems and provide a method and device for correcting movement errors in machine vision equipment. This method can flexibly adjust the position of the equipment according to different ball-hitting patterns and accurately acquire the parameter information of the camera and gyroscope during the sensing of the equipment's movement, thereby effectively correcting the camera parameters and greatly improving the accuracy and effectiveness of the machine vision equipment.
[0006] Firstly, one embodiment of this application discloses a method for correcting movement errors in machine vision equipment, which employs the following scheme: A method for correcting movement errors in a machine vision device includes: determining a target hitting pattern and moving a sensing device to the corresponding target position, wherein the target hitting pattern is either a left-hand hitting pattern or a right-hand hitting pattern; The camera calibration process begins by acquiring camera parameter information and first gyroscope parameters, including the camera's intrinsic and extrinsic parameters. Then, the camera parameter correction process begins. Before the sensing device moves, the camera captures a first scene image and extracts a target reference point from the first scene image, obtaining the corresponding first coordinates. After the sensing device moves, the moving distance and the camera's current second gyroscope parameters are acquired. The camera captures a second scene image and extracts the target reference point from the second scene image, obtaining the corresponding second coordinates. Based on the parameter information, the first gyroscope parameters, the first coordinates, the moving distance, the second coordinates, and the second gyroscope parameters, error correction is performed on the camera parameters.
[0007] By adopting the above technical solution, the sensing device is moved to the corresponding target position according to different target hitting modes, which can adapt to the different needs of left-handed and right-handed hitting modes, enabling the machine vision device to work in different hitting modes. The camera calibration process acquires the camera's intrinsic and extrinsic parameters, as well as the parameters of the first gyroscope, providing basic data for subsequent error correction and ensuring the accuracy of the correction. Scene images are captured before and after the sensing device moves, and the coordinates of the target reference point are extracted. Combined with the moving distance and the second gyroscope parameters, the camera parameters can be corrected based on this multi-dimensional data, effectively reducing camera errors caused by the movement of the sensing device, improving the detection accuracy and reliability of the machine vision device, and thus ensuring accurate visual detection in different hitting modes.
[0008] Optionally, the step of correcting camera parameters based on the parameter information, the first gyroscope parameters, the first coordinates, the travel distance, the second coordinates, and the second gyroscope parameters includes: obtaining a first correction matrix based on the first gyroscope parameters and the second gyroscope parameters to compensate for and correct the camera's extrinsic parameters, wherein the first correction matrix contains the pitch angle and roll angle of the sensing device; and obtaining a second correction matrix based on the parameter information, the first coordinates, the travel distance, and the second coordinates to further correct the camera's extrinsic parameters.
[0009] By adopting the above technical solution, a first correction matrix containing the pitch and roll angles of the sensing device is obtained based on the first and second gyroscope parameters, which can compensate and correct the camera's extrinsic parameters and improve the accuracy of the camera's extrinsic parameters. A second correction matrix is obtained based on parameter information, the first coordinate, the moving distance, the second coordinate, and the second gyroscope parameters, which can further correct the camera's extrinsic parameters and improve the accuracy of the camera's extrinsic parameters, thereby achieving more accurate error correction for the camera.
[0010] Optionally, the first correction matrix R imu include: R imu =Rotation(g0,g1); Wherein, the first gyroscope parameter g0 = (x0, y0, z0), the second gyroscope parameter g1 = (x1, y1, z1), θ is the pitch angle, and φ is the roll angle.
[0011] By adopting the above technical solution, a first correction matrix is constructed based on the parameters of the first and second gyroscopes. The pitch and roll angles of the sensing device can be used to compensate and correct the extrinsic parameters of the camera. By calculating the pitch and roll angles using specific formulas and incorporating them into the first correction matrix, the influence of the sensor's attitude change on the camera's extrinsic parameters can be considered more accurately, improving the accuracy of the camera's extrinsic parameter compensation and correction, thereby enhancing the imaging accuracy and error correction effect of the machine vision device.
[0012] Optionally, the step of obtaining a second correction matrix based on the parameter information, the first coordinate, the movement distance, and the second coordinate to further correct the camera's extrinsic parameters further includes: calculating a yaw angle that minimizes the reprojection distance based on the parameter information, the first coordinate, the movement distance, and the second coordinate; and obtaining the second correction matrix based on the yaw angle and the first correction matrix to further correct the camera's extrinsic parameters.
[0013] By adopting the above technical solution, the yaw angle that minimizes the reprojection distance is calculated based on parameter information, the first coordinate, the moving distance, and the second coordinate. The optimal value of the yaw angle can be accurately determined, providing key data for the accurate correction of camera extrinsic parameters. Based on the yaw angle and the first correction matrix, a second correction matrix is obtained to further correct the camera extrinsic parameters, which can further improve the correction accuracy of the camera extrinsic parameters, thereby improving the positioning and imaging accuracy of machine vision equipment.
[0014] Optionally, the second correction matrix R rec include: P tee0=K*R*p tee ; s*p tee =R -1 *K -1 *P tee0 ; P′ tee1 =K*R*(R yaw *R imu *p tee +T); R rec =R yaw *R imu ; Where ρ is the yaw angle, {ρ|ρ∈[-10,10]∧ρ∈N}, and the reprojection distance d=distance(P′) tee1 ,P tee1 Find the ρ that minimizes d and substitute it into R. yaw .
[0015] By adopting the above technical solution, based on the relevant formulas, and combining the first correction matrix and the yaw angle correlation matrix, considering the influence of the attitude change of the sensing device on the camera extrinsic parameters, a matrix related to the yaw angle can be constructed for further correction of the camera extrinsic parameters. The second correction matrix is obtained by combining the yaw angle correlation matrix with the first correction matrix, which can further correct the camera extrinsic parameters. By taking the yaw angle ρ in the range of -10° to 10° at 1° intervals, and obtaining the ρ that minimizes the reprojection distance d = distance(Ptee1', Ptee1) and substituting it into Ryaw, the appropriate yaw angle can be accurately determined, thereby improving the accuracy of camera extrinsic parameter correction and thus improving the accuracy of machine vision equipment motion error correction.
[0016] Optionally, before entering the camera calibration process, the method further includes: checking whether the sensing device has moved to the actual predetermined position; if not, obtaining the position error between the target position and the actual predetermined position to correct the position of the target position.
[0017] By adopting the above technical solution, it is possible to check whether the sensing device has moved to the actual predetermined position and to promptly detect situations where the sensing device has not accurately reached the predetermined position. If the sensing device has not moved to the actual predetermined position, the positional error between the target position and the actual predetermined position can be obtained to clarify the degree of positional deviation of the sensing device. Positional correction of the target position can enable the sensing device to subsequently move to a more accurate target position, thereby improving the positioning accuracy and measurement accuracy of the machine vision device.
[0018] Optionally, determining the target hitting pattern and moving the sensing device to the corresponding target position further includes: receiving a selection instruction for the hitting pattern, determining the target hitting pattern, and obtaining the target position corresponding to the target hitting pattern to drive the sensing device to move to the target position.
[0019] By adopting the above technical solution, the target hitting mode can be accurately determined by receiving the selection instruction of the hitting mode, avoiding errors and confusion in mode selection; by determining the target position corresponding to the target hitting mode and driving the sensing device to move to that position, the sensing device can accurately reach the working position corresponding to the hitting mode, providing an accurate initial position for subsequent calibration and error correction operations, and ensuring the normal operation of the machine vision equipment under different hitting modes.
[0020] Optionally, determining the target hitting pattern and moving the sensing device to the corresponding target position further includes: identifying the user's workstation position, determining the target hitting pattern, wherein when the user is at the left-handed hitting workstation, the target hitting pattern is a left-handed hitting pattern, and when the user is at the right-handed hitting workstation, the target hitting pattern is a right-handed hitting pattern; and obtaining the target position corresponding to the target hitting pattern to drive the sensing device to move to the target position.
[0021] By adopting the above technical solution, the target hitting pattern can be determined by identifying the user's workstation location. This allows for accurate matching of the corresponding hitting pattern to the user's actual hitting position, improving the accuracy of hitting pattern determination. Furthermore, by obtaining the corresponding target position based on the target hitting pattern and driving the sensing device to that position, the sensing device can accurately reach a position that matches the user's hitting pattern, thus providing a more precise positional basis for subsequent operations such as golf data acquisition.
[0022] Optionally, before entering the camera calibration process, the method further includes: acquiring a drive signal and determining whether the sensing device is currently in a stationary state; if so, determining whether the sensing device has been calibrated; if so, entering the correction process; if not, entering the calibration process.
[0023] By adopting the above technical solution, before entering the camera calibration process, the drive signal is first obtained to determine whether the sensing device is stationary, which can ensure that subsequent operations are carried out in a stable state; then it is determined whether the sensing device has been calibrated. If it has been calibrated, the camera parameter correction process is entered, avoiding repeated calibration, improving efficiency, rationally planning the process, and reducing unnecessary operation steps.
[0024] Secondly, another embodiment of this application discloses a mobile device for a machine vision equipment, which adopts the following solution: A moving device for a machine vision equipment, used to perform the method described above, includes: a slide rail drive assembly, including a slide rail, a drive member, and a slider platform, wherein the slide rail and the drive member are disposed on a golf simulation frame, and the slider platform is driven by the drive member to perform reciprocating linear movement on the slide rail; a sensing device, including a sensor fixed on the slider platform, for moving to a target position as the slider platform moves, the target position being either a left-hand hitting position or a right-hand hitting position, wherein the left-hand hitting position corresponds to a right-hand hitting mode, and the right-hand hitting position corresponds to a left-hand hitting mode; a magnetic scale, disposed on the slider platform, for acquiring the movement position of the sensing device; and a control unit electrically connected to the slide rail drive assembly, the sensing device, and the magnetic scale.
[0025] By adopting the above technical solution, a slide rail drive assembly is set up in the golf simulation scenario. The slide rail and drive components are installed on the golf simulation frame, allowing the slider platform to move reciprocally in a straight line on the slide rail driven by the drive component. This enables the sensing device to move flexibly between different positions to adapt to the needs of different hitting modes. The sensing device is fixed on the slider platform, allowing it to move with the slider platform to the left or right hitting position. The left hitting position corresponds to the right-hand hitting mode, and the right hitting position corresponds to the left-hand hitting mode, accurately matching the actual needs of different hitting modes. A magnetic scale is set on the slider platform to accurately collect the movement position of the sensing device, providing a precise data basis for subsequent error correction and other operations, thereby improving the measurement and analysis accuracy of machine vision equipment in the golf simulation scenario. The control unit can uniformly control the slide rail drive assembly, sensing device, and magnetic scale, achieving effective management of the movement of the sensing device.
[0026] In summary, this application includes at least one of the following beneficial technical effects: 1. The sensing device can be moved to the corresponding target position according to different target hitting modes (left-hand hitting mode, right-hand hitting mode), which solves the problem that traditional methods cannot flexibly adjust the device position according to different usage modes and improves the flexibility of device use; 2. During the calibration process, the camera parameter information and the first gyroscope parameter are acquired. During the correction process, multiple sets of data are combined to correct the camera parameter error. This solves the problem that existing technologies are difficult to accurately acquire camera parameters and gyroscope parameters and perform effective error correction, thus improving the accuracy of machine vision equipment. 3. Verify whether the sensing device has moved to the actual predetermined position and correct the target position to avoid the problem of inaccurate device movement and further ensure the effectiveness of the device. Attached Figure Description
[0027] Figure 1This is a schematic flowchart of a motion error correction method for machine vision equipment disclosed in an embodiment of this application; Figure 2 This is a flowchart illustrating a motion error correction method for a machine vision device disclosed in another embodiment of this application; Figure 3 This is a schematic diagram of the structural state of a mobile device for a machine vision device, which is mounted on a golf simulation frame to perform a left-hand hitting mode, according to another embodiment of this application. Figure 4 This is a schematic diagram of the structural state of a mobile device for a machine vision equipment, installed on a golf simulation frame, in a right-hand hitting mode, as disclosed in another embodiment of this application. Detailed Implementation
[0028] The present application will be further described in detail below with reference to the accompanying drawings.
[0029] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.
[0030] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a” and “the” as used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0031] It should be understood that although the terms "first," "second," etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0032] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0033] [First Embodiment] See Figure 1The first embodiment of this application discloses a method for correcting movement errors in a machine vision device, which includes the following steps: S10. Determine the target hitting mode and move the sensing device to the corresponding target position; the target hitting mode is either the left-hand hitting mode or the right-hand hitting mode.
[0034] Determining the target hitting pattern can include the following two methods: One approach involves receiving a command to select a hitting mode. The user selects either a left-handed or right-handed hitting mode via the interface, then determines the target hitting mode. The system then acquires the target position corresponding to that mode and drives the sensing device to move to that position. This movement can be achieved using a motor or similar drive mechanism, which propels the sensing device along a corresponding track via a transmission mechanism.
[0035] Another method is to identify the user's workstation location. When the user is at the left-handed workstation, the target hitting pattern is determined to be the left-handed hitting pattern (see...). Figure 3 When the user is at the right-handed hitting station, the target hitting mode is determined to be the right-handed hitting mode. Then, the target position corresponding to the target hitting mode is determined, and the sensing device is moved (see...). Figure 4 Identifying the user's workstation location can be achieved using infrared sensors integrated into sensing devices. Infrared sensors can detect the approximate area where the user is located, thus determining whether the user is at the left or right workstation. Of course, the above example uses infrared recognition; other methods, such as image recognition or radar recognition, can also be used, without limitation.
[0036] In this embodiment, the sensing device is a device that integrates sensors such as cameras and gyroscopes, which can provide the necessary data for the motion error correction method.
[0037] See Figure 2 Before performing step S20, i.e., before entering the camera calibration process, the following is also included: S11. Check whether the sensing device has moved to the actual predetermined position. If it has not moved to the actual predetermined position, obtain the position error between the target position and the actual predetermined position to correct the position of the target position.
[0038] In order to improve the accuracy error, cumulative error, resistance error, inertial error, sensor error, and error caused by misoperation of the driving components that drive the sensing device to move, such as stepper motors (not limited to this type of motor, such as servo motors and brushless motors), which cause the sensing device to not move to the correct position, this embodiment uses step S11 to correct the position of the target position.
[0039] Specifically, in terms of hardware, real-time position feedback of the sensing device can be achieved using a magnetic grating ruler (0.01mm resolution). This ruler collects the actual position data of the sensing device in real time and feeds it back to the lower-level computer. If the detected deviation between the actual position and the target coordinates is ≥0.5mm, automatic fine-tuning is initiated, ultimately controlling the positioning accuracy within ±0.3mm, ensuring precise alignment between the sensor's detection area and the hitting area. Of course, the above example uses a magnetic grating ruler; other methods can also be used, such as laser rangefinders, optical grating rulers, encoders, etc., without limitation.
[0040] S12. Obtain the drive signal and determine whether the sensing device is currently stationary.
[0041] The stationary state is determined using an accelerometer, which detects changes in the acceleration of the sensing device. When the acceleration is zero, the sensing device is considered stationary. If stationary, the system checks if the sensing device has been calibrated. If it has, the camera parameter correction process begins.
[0042] S20. Enter the camera calibration process and obtain the camera's parameter information and the first gyroscope parameters. The parameter information includes the camera's intrinsic and extrinsic parameters.
[0043] The calibration process involves using a calibration board to calculate the camera's intrinsic parameters K and extrinsic parameters (rotation matrix from the camera coordinate system to the calibration board's plane coordinate system) R, and recording the gyroscope readings g0 = (x0, y0, z0) through the gyroscope sensor. S30. Enter the camera parameter correction process. Before the sensing device moves, control the internal camera to capture the first scene image and extract the target reference point in the first scene image to obtain the corresponding first coordinates.
[0044] Among them, the extraction of target reference points adopts image processing algorithms, such as feature extraction algorithms. These algorithms can identify specific feature points in the image as target reference points and corresponding coordinate points.
[0045] S40. After the sensing device moves, acquire the moving distance and the current second gyroscope parameters of the camera.
[0046] In step S40, the correction process continues. The movement distance of the sensing device can be determined using a device such as a magnetic scale, which can accurately measure the movement position of the sensing device to obtain the movement distance. The second gyroscope parameters are also obtained through a gyroscope sensor.
[0047] S50: Control the camera to capture a second scene image, extract the target reference point in the second scene image, and obtain the corresponding second coordinates.
[0048] In this step S50, the correction process can still be carried out. Similarly, the target reference point can be extracted using image processing algorithms, such as feature extraction algorithms. These algorithms can identify specific feature points in the image as target reference points and determine the corresponding coordinate points.
[0049] S60. Based on parameter information, first gyroscope parameters, first coordinates, movement distance, second coordinates, and second gyroscope parameters, perform error correction on camera parameters.
[0050] Specifically, step S60 includes: S61. Based on the first gyroscope parameters and the second gyroscope parameters, obtain a first correction matrix to compensate and correct the camera's extrinsic parameters. The first correction matrix contains the pitch angle and roll angle of the sensing device.
[0051] Wherein, the first correction matrix R imu include: R imu =Rotation(g0,g1); Wherein, the first gyroscope parameter g0 = (x0, y0, z0), the second gyroscope parameter g1 = (x1, y1, z1), θ is the pitch angle, and φ is the roll angle.
[0052] S62. Based on the parameter information, the first coordinate, the movement distance, and the second coordinate, obtain the second correction matrix to further correct the camera's extrinsic parameters.
[0053] The specific steps are as follows: First, based on the parameter information, the first coordinate, the movement distance, and the second coordinate, calculate the yaw angle that minimizes the reprojection distance; then, based on the yaw angle and the first correction matrix, obtain the second correction matrix to further correct the camera's extrinsic parameters.
[0054] Second correction matrix R rec include: P tee0 =K*R*p tee ; s*p tee =R -1 *K -1 *P tee0 ; P′ tee1 =K*R*(R yaw *R imu *p tee +T); R rec =R yaw *R imu ; Where ρ is the yaw angle, {ρ|ρ∈[-10,10]∧ρ∈N}, and the reprojection distance d=distance(P′) tee1 ,P tee1 Find the ρ that minimizes d and substitute it into R. yaw .
[0055] The implementation principle of this embodiment is as follows: This method determines the target hitting pattern and moves the sensing device through multiple means. Image capture and parameter acquisition are performed before and after the movement. A first correction matrix is calculated using the parameters of the first and second gyroscopes, and a second correction matrix is calculated by combining other parameters. This process repeatedly corrects the camera's extrinsic parameters. This method can flexibly adjust the device position according to different hitting patterns and accurately acquire camera and gyroscope parameter information during device movement, thereby effectively correcting camera parameters and greatly improving the accuracy and effectiveness of machine vision equipment. It overcomes the shortcomings of traditional methods, such as lack of flexibility, reliance on manual operation, and insufficient accuracy.
[0056] [Second Embodiment] See Figure 3 and Figure 4 The second embodiment of this application discloses a mobile device for a machine vision device, which includes a slide rail drive assembly 10, a sensing device 20, a magnetic scale, and a control unit.
[0057] The slide rail drive assembly 10 includes a slide rail component, a drive component, and a slider platform. The slide rail component and drive component are mounted on the golf simulation frame. The slider platform moves reciprocally in a linear fashion on the slide rail component, driven by the drive component. The slide rail component uses a synchronous belt linear module to ensure smooth movement of the slider platform. The drive component is a stepper motor paired with a microstepping driver (e.g., 16 microstepping mode). Based on the synchronous belt linear module parameters (pitch 2mm, reduction ratio 1:1), the pulse equivalent (0.16mm / pulse) is calculated. The lower-level computer controls the stepper motor speed and displacement through pulse + direction signals to achieve a three-stage ladder-like movement of "acceleration-uniform speed-deceleration" or S-curve movement, avoiding positioning deviations caused by start-stop shocks.
[0058] The sensing device 20 is fixed to the slider platform and moves to the target station as the slider platform moves. The target station is either a left-handed hitting station or a right-handed hitting station, where the left-handed hitting station corresponds to the right-handed hitting mode and the right-handed hitting station corresponds to the left-handed hitting mode. The sensing device 20 integrates sensors such as cameras and gyroscopes, which can provide the necessary data for the movement error correction method.
[0059] A magnetic scale (resolution 0.01mm) is set on the slider platform to collect the current actual position of the sensing device 20 and feed it back to the lower computer. If the actual position is detected to be ≥0.5mm away from the target coordinates, a fine adjustment (correction pulse number) is automatically started. The final positioning accuracy is controlled within ±0.3mm, ensuring that the detection area of the sensing device 20 is accurately aligned with the hitting area.
[0060] The mobile device, after being installed on the golf simulation frame, serves as a golf simulation device. The absolute Y-axis coordinates of the left and right workstations can be calibrated using a laser rangefinder. The lower-level machine stores the coordinate parameters and sets them as the "reference workstations". Photoelectric limit switches are installed on the outside of the two workstations to prevent overtravel, and origin sensors are installed on the inside to automatically return to the original position for calibration each time the machine is turned on.
[0061] The control unit is electrically connected to the slide rail drive assembly 10, the sensing device 20, and the magnetic scale. The control unit can be a microcontroller, PLC, or other controller. It receives position information from the magnetic scale and controls the drive components of the slide rail drive assembly 10 according to a preset program, causing the sensing device 20 to move to the target position. Simultaneously, the control unit can also process and analyze the data collected by the sensing device 20, providing support for operations such as camera error correction.
[0062] The entire golf simulation equipment adopts a three-layer control architecture of "upper computer software - lower computer controller - actuator" to realize automated and precise control of equipment movement, and is used to execute a movement error correction method for machine vision equipment disclosed in the above embodiments.
[0063] Regarding the communication protocol and link design: The host computer uses golf simulator client software (which supports custom instruction extensions), and the slave computer is equipped with an ARM series microcontroller (or PLC). The two communicate via Ethernet or Modbus RTU serial port to establish a real-time data interaction link. The host computer is responsible for sending "movement instructions, target workstation, and emergency stop signals", and the slave computer provides feedback on "current position, running status, and fault alarm".
[0064] The execution of left-hand and right-hand hitting modes includes the following two trigger modes: Manual triggering: When the user selects the "left-handed hitting" or "right-handed hitting" mode in the golf simulator client software, the software automatically matches the corresponding target station (Y-axis coordinate L of the left hitting station and Y-axis coordinate R of the right hitting station, which are pre-calibrated and stored in the lower-level machine register) and sends the movement command. Automatic triggering: The human body induction lamp (infrared or radar) on the sensing device 20 detects the user's standing area (left / right hitting area ≥ 2.6 meters safety range). The sensor transmits the standing signal to the lower computer. After the lower computer confirms with the upper computer, the movement process of the sensing device 20 on the slide rail is automatically started (no manual operation by the user is required). For scenarios involving alternating shots in the same game, the system supports a "preset shot order" function: users pre-enter the left and right hand attributes and shot order of the participants, and the system automatically cycles according to the sequence of "left cue shot → device moves to right workstation → right cue shot → device moves to left workstation". The movement process overlaps with the shot interval (without extra waiting time), ensuring the continuous progress of the game.
[0065] In addition, it is worth mentioning that the golf simulator with this mobile device can accommodate both right-handed and left-handed users (commonly known as left-handed people) to hit the ball on the same course at the same time, without the need to install two golf simulator devices in the same space, and the course width does not need to be designed to be more than 5.2 meters (the safe swing distance of a normal golf simulator device needs to be ≥2.6 meters). It can save space and costs while accommodating different users.
[0066] The implementation principle of this embodiment is as follows: the mobile device drives the sensing device 20 to the target workstation via a slide rail drive assembly, and the magnetic scale collects the movement position of the sensing device 20, providing a hardware foundation for the movement error correction method. This device has a simple structure and stable operation, and can effectively realize the movement and position acquisition of the sensing device 20. Combined with the movement error correction method, it improves the accuracy and reliability of the movement positioning and error correction of the machine vision equipment, providing strong support for the use of machine vision equipment in different ball-hitting modes.
[0067] [Third Embodiment] A computer-readable storage medium is disclosed in the third embodiment of this application. The computer-readable storage medium is, for example, a non-volatile memory, such as magnetic media (e.g., hard disks, floppy disks, and magnetic tapes), optical media (e.g., CD-ROMs and DVDs), magneto-optical media (e.g., optical discs), and hardware devices specifically configured to store and execute computer-executable instructions (e.g., read-only memory (ROM), random access memory (RAM), flash memory, etc.). A computer program is stored on the computer-readable storage medium. The computer-readable storage medium can be executed by one or more processors or processing devices to implement the motion error correction method for machine vision equipment described in the foregoing embodiments.
[0068] Furthermore, it is understood that the foregoing embodiments are merely illustrative examples of the present invention. Provided that the technical features do not conflict, the structure is not contradictory, and the purpose of the invention is not violated, the technical solutions of the various embodiments can be arbitrarily combined and used.
[0069] In the embodiments provided by this invention, it should be understood that the disclosed methods, systems, and measuring devices can be implemented in other ways. For example, the modules included in the systems described above are merely illustrative, and the division of modules is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0070] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0071] Furthermore, in the various embodiments of the present invention, the functional units / modules can be integrated into one processing unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated into one unit / module. The integrated unit / module described above can be implemented in hardware or in the form of hardware plus software functional units / modules.
[0072] The integrated units / modules implemented as software functional units / modules described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause one or more processors of a computer measurement device (which may be a personal computer, server, or network measurement device, etc.) to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for mobile error correction for a machine vision device, the method comprising: The method comprises the following steps: determining a target hitting mode, moving a sensing device to a corresponding target position, the target hitting mode being one of a left-handed hitting mode and a right-handed hitting mode; entering a camera calibration process to obtain parameter information of a camera and first gyroscope parameters, the parameter information comprising intrinsic parameters and extrinsic parameters of the camera; entering a camera parameter correction process, before the sensing device is moved, controlling an internal camera to capture a first scene image, and extracting a target reference point in the first scene image to obtain corresponding first coordinates; after the sensing device is moved, obtaining a moving distance and second gyroscope parameters of the camera at present; controlling the camera to capture a second scene image, and extracting the target reference point in the second scene image to obtain corresponding second coordinates; based on the parameter information, the first gyroscope parameters, the first coordinates, the moving distance, the second coordinates and the second gyroscope parameters, correcting errors of camera parameters.
2. The method of claim 1, wherein, The error correction of the camera parameters based on the parameter information, the first gyroscope parameters, the first coordinates, the moving distance, the second coordinates and the second gyroscope parameters comprises: based on the first gyroscope parameters and the second gyroscope parameters, obtaining a first correction matrix to compensate and correct extrinsic parameters of the camera, the first correction matrix containing a pitch angle and a roll angle of the sensing device; based on the parameter information, the first coordinates, the moving distance and the second coordinates, obtaining a second correction matrix to correct the extrinsic parameters of the camera again.
3. The method of claim 2, wherein, The first correction matrix R imu comprises: R imu = Rotation(g0, g1); Wherein, the first gyroscope parameters g0=(x0, y0, z0), the second gyroscope parameters g1=(x1, y1, z1), θ is the pitch angle, and φ is the roll angle.
4. The method of claim 3, wherein, The error correction of the camera parameters based on the parameter information, the first coordinates, the moving distance and the second coordinates to correct the extrinsic parameters of the camera again further comprises: based on the parameter information, the first coordinates, the moving distance and the second coordinates, calculating a yaw angle that minimizes the re-projection distance; based on the yaw angle and the first correction matrix, obtaining the second correction matrix to correct the extrinsic parameters of the camera again.
5. The method of claim 4, wherein, The second correction matrix R rec comprises: P tee0 = K * R * p tee ; s*p tee = r -1 *k -1 * p tee0 ; P' tee1 = K * R * (R yaw *R imu *p tee + T); R rec = R yaw * R imu ; Wherein, ρ is the yaw angle, {ρ | ρ ∈ [-10, 10] ∧ ρ ∈ N}, the re-projection distance d = distance(P tee1 , P tee1 ) is calculated, ρ that makes d minimum is obtained, and R yaw is brought in.
6. The method of claim 1, wherein, Before the camera calibration process is entered, the method further comprises: checking whether the sensing device is moved to an actual predetermined position, if not, obtaining a position error between the target position and the actual predetermined position to correct the position of the target position.
7. The method of claim 1, wherein, The determination of the target hitting mode and the moving of the sensing device to the corresponding target position comprises: receiving a selection instruction of a hitting mode to determine the target hitting mode; obtaining the target position corresponding to the target hitting mode to drive the sensing device to move to the target position.
8. The method of claim 1, wherein, The determination of the target hitting mode and the moving of the sensing device to the corresponding target position comprises: identifying a position of a work station where a user is located to determine the target hitting mode, wherein when the user is at a left hitting work station, the target hitting mode is a left-handed hitting mode, and when the user is at a right hitting work station, the target hitting mode is a right-handed hitting mode. The target position corresponding to the target hitting mode is acquired to drive the sensing device to move to the target position.
9. The method of claim 1, wherein, Before entering the camera calibration process, further comprising: acquiring a driving signal to determine whether the sensing device is currently in a stationary state; if yes, determining whether the sensing device has been calibrated; if yes, entering the correction process; if no, entering the calibration process.
10. A mobile device for a machine vision apparatus, characterized by, comprising: a slide rail driving assembly (10) comprising a slide rail piece, a driving piece and a slide block platform, the slide rail piece and the driving piece being arranged on a golf simulation frame, the slide block platform being driven to move back and forth linearly on the slide rail piece through the driving piece; a sensing device (20) comprising a fixing on the slide block platform, for moving to a target work station along with the movement of the slide block platform, the target work station being one of a left hitting work station and a right hitting work station, wherein the left hitting work station corresponds to a right-handed hitting mode and the right hitting work station corresponds to a left-handed hitting mode; a magnetic grating ruler arranged on the slide block platform, for collecting the moving position of the sensing device; a control unit electrically connected to the slide rail driving assembly (10), the sensing device (20) and the magnetic grating ruler.