Three-axis motor positioning method, device and equipment
Through the binocular camera and Kalman filtering algorithm, the problem of insufficient positioning of the three-axis motor is solved, and the positioning effect with higher accuracy and stability is achieved.
Patent Information
- Application Number
- CN202411705705.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-15
AI Technical Summary
The existing three-axis motor positioning technology is not accurate enough, is susceptible to external interference, is expensive and has poor adaptability.
The feature point pairs of the target object image are collected by a binocular camera, the disparity value is calculated to obtain three-dimensional coordinates, and the state estimation is performed using the Kalman filtering algorithm to confirm the positioning result.
It improves the accuracy and stability of positioning, reduces positioning errors caused by mismatch of feature points, and expands application scenarios and practicality.
Smart Images

Figure CN119832064A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of three-axis motor positioning, and in particular to a three-axis motor positioning method, device and equipment. Background Art
[0002] Three-axis motor positioning technology plays a vital role in industrial automation, precision manufacturing, and robotics. However, despite significant progress, there are still some methodological and performance deficiencies in practical applications.
[0003] The current status and defects of three-axis motor positioning generally include: the positioning method is not accurate enough. In some complex or special application scenarios, the existing positioning method may still not meet the accuracy requirements; it is susceptible to interference. The three-axis motor positioning technology is easily interfered by the external environment, such as electromagnetic interference, vibration interference, etc. These interferences may cause the positioning signal to be distorted or lost, thereby affecting the accuracy and stability of positioning; it is costly. High-precision positioning technology usually requires the use of expensive sensors and control systems; and it has poor adaptability. The existing three-axis motor positioning technology is often designed for specific application scenarios. Summary of the invention
[0004] The main purpose of the present application is to provide a three-axis motor positioning method, device and equipment, aiming to solve the technical problems of the existing three-axis motor positioning being not precise enough and having poor adaptability.
[0005] To achieve the above-mentioned objectives, the present application proposes a three-axis motor positioning method, the method comprising: collecting feature point pairs of the target object image through a binocular camera; obtaining the disparity value of the target object image based on the feature point pairs, and calculating the three-dimensional coordinates of the target object according to the disparity value; performing Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector; and confirming the positioning result of the target object based on the predicted state vector.
[0006] In one embodiment, the step of collecting feature point pairs of the target object image through a binocular camera also includes: obtaining the setting point position of the binocular camera based on the position of the target object; obtaining the setting parameters of the binocular camera; and building a camera three-dimensional coordinate system based on the setting point position and the setting parameters.
[0007] In one embodiment, the step of acquiring feature point pairs of a target object image through a binocular camera includes: acquiring a target object image through a binocular camera; performing dedistortion processing on the target object image to obtain a first image; obtaining feature point information parameters of the first image; and matching feature points of the first image based on the feature point information parameters to obtain feature point pairs.
[0008] In one embodiment, the steps of obtaining the disparity value of the target object image based on the feature point pair and calculating the three-dimensional coordinates of the target object according to the disparity value include: obtaining feature parameters of the feature point pair; obtaining the disparity value of the target object image based on the feature parameters; mapping the disparity value with the camera three-dimensional coordinate system to obtain a mapping result; and calculating the three-dimensional coordinates of the target object based on the mapping result.
[0009] In one embodiment, the step of implementing Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector includes: obtaining an initial vector based on the three-dimensional coordinates; outputting a predicted vector based on a preset prediction model and the initial vector; obtaining a Kalman filter gain based on the initial vector and the predicted vector; and correcting the predicted vector based on the Kalman filter gain to obtain a predicted state vector.
[0010] In one embodiment, the step of confirming the positioning result of the target object based on the predicted state vector further includes: performing error analysis on the positioning result to obtain an error analysis result; and correcting the camera three-dimensional coordinate system, the preset prediction model and the Kalman filter gain based on the error analysis result.
[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a three-axis motor positioning device, which includes: a parameter acquisition module, which is used to collect feature point pairs of the target object image through a binocular camera; a calculation module, which is used to obtain the disparity value of the target object image based on the feature point pairs, and calculate the three-dimensional coordinates of the target object according to the disparity value; it is also used to implement Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector; it is also used to confirm the positioning result of the target object based on the predicted state vector.
[0012] In addition, to achieve the above objectives, the present application also proposes a three-axis motor positioning device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the three-axis motor positioning method described above.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the three-axis motor positioning method described above are implemented.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the three-axis motor positioning method described above are implemented.
[0015] One or more technical solutions proposed in this application have at least the following technical effects:
[0016] The use of binocular cameras makes the collection of feature point pairs more intuitive and accurate, effectively reducing the positioning error caused by mismatching of feature points. Secondly, the process of calculating the disparity value makes full use of the stereo imaging principle of the binocular camera to further improve the accuracy and stability of positioning. The Kalman filter algorithm is introduced to update the state estimate of the target object using the information of the previous state, i.e. the predicted value, and the observed value of the current state. The positioning result is confirmed based on the predicted state vector processed by the Kalman filter. This technical process not only improves the accuracy and reliability of the positioning of the target object, but also expands its application scenarios and practicality, and can achieve accurate tracking and positioning of the target object in complex and changing environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 A schematic diagram of a flow chart provided for an embodiment of a three-axis motor positioning method of the present application;
[0020] Figure 2 This is a schematic diagram of the module structure of the three-axis motor positioning device according to an embodiment of the present application;
[0021] Figure 3 Schematic diagram of the device structure of the hardware operating environment involved in the three-axis motor positioning method in the embodiment of the present application.
[0022] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0023] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0024] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0025] Three-axis positioning is a high-precision positioning technology. Its basic principle is to achieve accurate positioning of the target object by controlling the movement of the three axes of X, Y, and Z. In industrial production, this is usually achieved by controlling the drive devices such as electric motors and pneumatic motors to accurately control the angle and speed of movement, thereby achieving the purpose of precise positioning.
[0026] In the prior art, the encoder recording method is generally used, which involves using an encoder to record the standard position. Some also use the PLC control method: by setting the relevant position parameters and motion parameters on the computer terminal, these parameters are transmitted to the PLC for conversion, and then drive the servo motor to perform precise movement.
[0027] For the former, the size of the components inside the encoder, the manufacturing accuracy, and the material properties will directly affect the accuracy of its output signal. The working environment of the encoder, such as temperature, humidity, vibration, etc., may also affect its accuracy. However, the latter is more affected by cost and environment and has poor scalability.
[0028] Based on this, the embodiment of the present application provides a three-axis motor positioning method, which aims to solve the technical problems of the existing three-axis motor positioning being not accurate enough and having poor adaptability. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the three-axis motor positioning method of the present application.
[0029] In this embodiment, the three-axis motor positioning method includes steps S10 to S50:
[0030] Step S10: collecting feature point pairs of the target object image through a binocular camera.
[0031] It should be noted that a binocular camera is a camera based on the principle of binocular vision. It consists of two cameras, usually RGB lenses, and an image processing unit. It can simulate the way human eyes observe the world and estimate depth distance.
[0032] It should be noted that the target object image refers to an image containing the target object captured by an imaging device such as a camera, a video camera or a binocular camera. In this solution, the target object of particular concern is the three-axis motor, but this concept is not limited to the three-axis motor, but can be widely extended to various other objects.
[0033] Specifically, the target object can be any entity with clear form, characteristics and identification value. These objects can be mechanical equipment such as three-axis motors, robots, conveyor belts, etc., electronic products such as mobile phones, computers, tablets, etc., organisms such as animals, plants, humans, etc., building components such as doors and windows, beams and columns, etc., and even celestial bodies in the sky such as planets and stars. As long as these objects can be clearly captured by imaging equipment and have sufficient characteristics for subsequent processing and analysis, they can become target objects.
[0034] It should be noted that special processing can be performed on the target object, such as adding special marks or patterns to the target object to make it have clear feature points, which is convenient for the binocular vision system to recognize and match. The number and quality of feature points can be improved by optimizing the surface texture of the target object, such as increasing the complexity of the texture, changing the direction and density of the texture, etc.
[0035] It should be noted that the feature point pairs of the target object image refer to the point pairs that have significant features and can represent the shape and structure of the target object extracted from the image through specific algorithms and techniques during the image processing process.
[0036] It can be understood that the feature point pairs of the target object image are collected by the binocular camera, that is, the binocular camera collects the target object image through the camera, and extracts the feature point pairs from the target object image through the image processing unit.
[0037] In a feasible implementation, the present solution provides a method for executing this process, as follows: acquiring an image of a target object through a binocular camera; performing dedistortion processing on the image of the target object to obtain a first image; obtaining feature point information parameters of the first image; matching feature points of the first image based on the feature point information parameters to obtain feature point pairs.
[0038] It should be noted that binocular cameras are used to capture images of the target object at the same time. The two cameras are usually located in different positions to obtain images taken from different perspectives. These images will be used for subsequent feature point extraction and matching.
[0039] It is understandable that since the camera lens usually has distortion such as barrel distortion or pincushion distortion, it is necessary to perform de-distortion processing on the collected image. De-distortion processing usually involves using the camera's internal parameters such as focal length, principal point, distortion coefficient, etc. to perform geometric transformation on the image to eliminate the distortion effect.
[0040] It should be noted that the distorted image can be further enhanced and filtered to improve the image quality and detectability of feature points. Enhancement usually includes adjusting the brightness, contrast, saturation and other aspects of the image, as well as using specific image enhancement algorithms. Among them, the image enhancement algorithm can use histogram equalization, Laplace enhancement and the like. Histogram equalization can enhance the contrast of the image by adjusting the grayscale distribution of the image; Laplace enhancement can enhance the details and sharpness of the image by increasing the high-frequency components of the image.
[0041] It is understood that the image filter changes the appearance of the image by processing the pixel values of the image to eliminate noise, smooth the image or enhance specific frequency components. This is achieved by performing a convolution operation on the image based on a certain filter template or convolution kernel, which usually includes mean filtering, median filtering and Gaussian filtering.
[0042] It should be noted that the image processing in this solution can select appropriate image enhancement and filtering methods according to the characteristics of the image and the needs of subsequent processing. Add image feature judgment. For example, if it is judged that there is a lot of noise in the image, filtering can be performed first to eliminate the noise; if it is judged that the contrast of the image is low, the contrast can be adjusted to enhance the image details. At the same time, multiple image enhancement and filtering methods can also be combined to obtain better processing effects.
[0043] It should be noted that the two sets of target object images of the binocular camera are the first images after a series of dedistortion, enhancement and filtering operations, which can more accurately reflect the true shape and position of the target object and make it easier to extract feature point pairs.
[0044] It should be noted that the first image is processed using a feature point extraction algorithm such as SIFT, SURF, ORB, etc. to identify and extract feature points in the image. These feature points are usually points where the grayscale value in the image changes dramatically or points with some local invariance. While extracting the feature points, description information associated with each feature point is also generated. The description information contains image information around the feature point, such as gradient, direction, intensity, and position.
[0045] It should be noted that after extracting the feature points and description information, a matching algorithm is needed to match the feature points in the left and right camera images. The matching process usually involves calculating the distance or similarity between the description information of the two feature points, and selecting the point pair with the smallest distance or the highest similarity as the matching point pair. These matching point pairs will be used for subsequent depth calculations and three-dimensional reconstruction tasks. Specifically, the Hamming distance algorithm can be used. The Hamming distance refers to the number of different characters in corresponding positions between two strings of equal length. In feature point matching, if the description information is a binary vector (such as ORB description information), the Hamming distance can be used to calculate the similarity between the description information. The smaller the Hamming distance, the more similar the two description information is, and therefore the corresponding feature points are more likely to be matched.
[0046] It should be noted that an adaptive texture enhancement algorithm can also be introduced to pre-process the surface texture of the target object to enhance the extraction accuracy and stability of feature points, integrating the powerful representation ability of deep learning and the fast and efficient ORB algorithm to achieve more accurate and robust feature point detection and description.
[0047] In order to further enhance the accuracy of acquiring feature point pairs, in a feasible implementation, the present solution provides a method for setting a binocular camera, which, before step S10, also includes: acquiring the binocular camera setting point based on the position of the target object; acquiring the setting parameters of the binocular camera; and building a camera three-dimensional coordinate system based on the setting point and the setting parameters.
[0048] It should be noted that by clarifying the location of the target object, appropriate binocular camera setting points are selected based on the characteristics of the target object. This can be achieved through pre-measurement, positioning or marking. Once the location of the target object is determined, appropriate binocular camera setting points can be selected according to actual needs. These points should ensure that the camera can clearly capture the image of the target object and the difference in viewing angle between the two cameras is moderate, so as to facilitate subsequent stereo matching and depth calculation.
[0049] It should be noted that the setting parameters of the binocular camera include the intrinsic parameters and extrinsic parameters of the camera. The intrinsic parameters mainly describe the internal characteristics of the camera, such as focal length, principal point, distortion coefficient, etc. The extrinsic parameters describe the position and posture of the camera in space, including rotation matrix and translation vector. These parameters can be obtained through the camera calibration process, which usually involves taking a set of calibration plate images of known size and using image processing algorithms to solve the intrinsic and extrinsic parameters of the camera.
[0050] It should be noted that after obtaining the setting points and setting parameters of the binocular camera, the camera's three-dimensional coordinate system can be built. This coordinate system uses the camera's optical center as the origin and the camera's imaging plane as the reference plane, and connects the camera's imaging process with objects in three-dimensional space through internal and external parameters. Building a camera's three-dimensional coordinate system helps with subsequent feature point extraction, matching, and depth calculation because it provides a unified reference framework that allows images from different perspectives to accurately correspond.
[0051] Step S20 , obtaining a disparity value of the target object image based on the feature point pair, and calculating the three-dimensional coordinates of the target object according to the disparity value.
[0052] It should be noted that the disparity value of the target object image reflects the image difference produced when the same target object is observed by binocular cameras or from different perspectives. This difference is caused by the different angles at which the two cameras shoot the same object.
[0053] It is understandable that in a binocular vision system, the disparity value is inversely proportional to the distance (depth) from the object to the camera. That is, when the object is closer to the camera, the disparity value in the left and right images is larger; and when the object is farther from the camera, the disparity value is smaller. Therefore, if the baseline distance, focal length and disparity value of the binocular camera are known, the distance from the object to the camera can be estimated by the depth calculation formula. The depth Z can be expressed as a function of the baseline B, focal length f and disparity dx, that is, Z = f × B / dx.
[0054] It is understandable that the three-dimensional reconstruction of the target object can be achieved by using the disparity value of the binocular camera. The three-dimensional model of the target object can be constructed by calculating the depth information of each point.
[0055] In a feasible implementation, the present solution provides a specific method for performing this step, as follows: obtaining feature parameters of feature point pairs; based on the feature parameters, obtaining the disparity value of the target object image; mapping the disparity value with the camera's three-dimensional coordinate system to obtain a mapping result; based on the mapping result, calculating the three-dimensional coordinates of the target object.
[0056] It should be noted that the feature point pair contains the location information of the target object in the left and right images, such as coordinates, and description information, such as direction, scale, etc. Feature parameters usually refer to the collection of these location information and description information. After the above steps, these parameters can be read directly or manually added and modified to increase flexibility.
[0057] It can be understood that this is achieved by comparing the x coordinates of the feature point pairs in the left and right images. Since the baseline distance and focal length of the binocular camera are known, the disparity value can be used to estimate the distance or depth of the target object from the camera.
[0058] It is understandable that each feature point in the camera's three-dimensional coordinate system can be mapped to a point in three-dimensional space. This process requires the use of the camera's internal and external parameters such as focal length, principal point, distortion coefficient, rotation matrix, translation vector, etc., as well as parallax values. Through calculation, the coordinates of the feature point in the three-dimensional coordinate system can be obtained.
[0059] It should be noted that after obtaining the coordinates of the feature points in the three-dimensional coordinate system, the three-dimensional coordinates of the target object can be further calculated. This is usually achieved through fitting, interpolation or averaging. For example, if the target object is a rigid body, its three-dimensional coordinates can be obtained by fitting a plane or a sphere through the least squares method; if the target object is a non-rigid body, more feature points may be needed to construct its three-dimensional model.
[0060] Step S30, performing Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector.
[0061] It should be noted that this solution finally chose Kalman filtering, which is a recursive algorithm for estimating the state of a dynamic system. In target positioning, it can be used to smooth and predict the three-dimensional coordinates of the target object. Kalman filtering uses the information of the previous state, i.e. the predicted value, and the observed value of the current state, i.e. the actual measured value, to update the state estimate of the target object.
[0062] It should be noted that the state vector is usually used to describe the current state of the system, including various parameters and variables of the system. In time series analysis, the state vector can contain a series of linearly independent information in the past, which constitutes the current state through linear combination and is closely related to the endogenous variables in the future. The predicted state vector in this scheme represents the state of the three-axis motor at the next moment, so as to realize the positioning of the three-axis motor.
[0063] It can be understood that a Kalman filter model including multi-state variables such as motor position, speed and acceleration is constructed. This model can predict the motor motion state in real time and perform dynamic correction based on the observation data of the binocular vision system, which can further improve the positioning accuracy and algorithm stability.
[0064] In a feasible implementation, the present solution provides a specific method for performing this step, as follows: based on the three-dimensional coordinates, obtain an initial vector; based on a preset prediction model and the initial vector, output a prediction vector; based on the initial vector and the prediction vector, obtain a Kalman filter gain; based on the Kalman filter gain, correct the prediction vector to obtain a prediction state vector.
[0065] It is understood that information is extracted from the previously calculated three-dimensional coordinates of the target object to form an initial vector. This initial vector may contain state information such as the position, velocity, acceleration, etc. of the target object, depending on your application requirements. For example, if the target object's motion trajectory is of interest, the initial vector may include position coordinates and velocity components.
[0066] It should be noted that the preset prediction model is a mathematical model for predicting future states. It can be a physics-based model such as Newton's laws of motion, or a data-driven model such as a machine learning algorithm. In this step, the initial vector needs to be input into the prediction model to output the prediction vector and its covariance matrix. The prediction vector is an estimate of the future state, which may contain information such as the position and speed of the target object at a certain point in the future. The preset prediction model is not limited in this application.
[0067] It should be noted that after the predicted value and the observed value are determined, the state estimation is performed through Kalman filtering. The Kalman filter gain is a key parameter in the Kalman filter algorithm, which determines the weight distribution between the predicted vector and the initial vector and is obtained by calculating the Kalman filter gain matrix.
[0068] It should be noted that the Kalman filter gain is used to combine the initial vector and the prediction vector to obtain the revised predicted state vector. This process involves weighted averaging of the initial vector and the prediction vector, where the weight is determined by the Kalman filter gain. The revised predicted state vector will more accurately reflect the future state of the target object because it combines the information of the initial state and the information of the prediction model, and takes into account noise and uncertainty.
[0069] Step S40: confirming the positioning result of the target object based on the predicted state vector.
[0070] It is understood that by parsing the predicted state vector, information related to the positioning of the target object, such as the position coordinates, can be extracted. The position coordinates extracted from the predicted state vector are compared with the actual observation values, such as real-time data obtained by sensors, cameras, etc., to verify the accuracy of the prediction results and find out possible errors. If the error between the positioning result and the actual observation value is within an acceptable range, the positioning result can be confirmed.
[0071] In this embodiment, the use of binocular cameras makes the collection of feature point pairs more intuitive and accurate, effectively reducing the positioning error caused by mismatching of feature points. Secondly, the process of calculating the disparity value makes full use of the stereo imaging principle of the binocular camera to further improve the accuracy and stability of positioning. The Kalman filter algorithm is introduced to update the state estimate of the target object using the information of the previous state, i.e., the predicted value, and the observed value of the current state. The positioning result is confirmed based on the predicted state vector after Kalman filtering. This technical process not only improves the accuracy and reliability of target object positioning, but also expands its application scenarios and practicality, and can achieve accurate tracking and positioning of target objects in complex and changing environments.
[0072] In a feasible implementation manner, after confirming the positioning result, it also includes: performing error analysis on the positioning result to obtain an error analysis result; and correcting the camera three-dimensional coordinate system, the preset prediction model and the Kalman filter gain based on the error analysis result.
[0073] It is understood that the positioning result is compared with the actual observation value to calculate the difference between them, that is, the error. The error can be expressed as the difference in position coordinates, distance error, angle error, etc., depending on your application scenario and needs. The calculated error is statistically analyzed, including the error size, distribution, trend, etc. This helps us understand the accuracy of the positioning result and the main source of the error.
[0074] It should be noted that if the error analysis shows that the accuracy of the camera's 3D coordinate system is not high enough or there are systematic errors, then we need to correct the camera's 3D coordinate system. This can be achieved by recalibrating the camera, optimizing camera parameters, adjusting the camera position, etc.
[0075] It should be noted that if the error analysis shows that the prediction accuracy of the preset prediction model is not high enough, or the model parameters do not match the actual situation, then we need to calibrate the prediction model. This can be achieved by adjusting the model parameters, optimizing the model structure, introducing new model features, etc.
[0076] It should be noted that the correction of Kalman filter gain is a key step in adjusting the Kalman filter algorithm based on the error analysis results. If the error analysis shows that the gain matrix of the Kalman filter is not set reasonably, resulting in poor filtering effect, then we need to recalculate or adjust the gain matrix. This can be achieved by optimizing the parameters of the Kalman filter, improving the filtering algorithm, etc.
[0077] In this implementation, the calibrated camera 3D coordinate system, the preset prediction model and the Kalman filter gain can be applied to a new positioning task, and the error analysis can be performed again. By repeatedly iterating this process, the accuracy of the positioning result can be continuously improved, and the performance of the entire positioning system can be optimized.
[0078] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the three-axis motor positioning method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0079] This application also provides a three-axis motor positioning device, please refer to Figure 2 The three-axis motor positioning device includes: a parameter acquisition module 10, which is used to collect feature point pairs of the target object image through a binocular camera; a calculation module 20, which is used to obtain the disparity value of the target object image based on the feature point pairs, and calculate the three-dimensional coordinates of the target object according to the disparity value; it is also used to implement Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector; it is also used to confirm the positioning result of the target object based on the predicted state vector.
[0080] The three-axis motor positioning device provided by the present application adopts the three-axis motor positioning method in the above embodiment, which can solve the technical problems of the existing three-axis motor positioning being not accurate enough and having poor adaptability. Compared with the prior art, the beneficial effects of the three-axis motor positioning device provided by the present application are the same as the beneficial effects of the three-axis motor positioning method provided by the above embodiment, and the other technical features of the three-axis motor positioning device are the same as the features disclosed in the above embodiment method, which will not be described in detail here.
[0081] The present application provides a three-axis motor positioning device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the three-axis motor positioning method in the above-mentioned embodiment one.
[0082] Reference below Figure 3, which shows a schematic diagram of the structure of a three-axis motor positioning device suitable for implementing the embodiment of the present application. The three-axis motor positioning device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The three-axis motor positioning device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0083] like Figure 3 As shown, the three-axis motor positioning device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the three-axis motor positioning device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the three-axis motor positioning device to communicate with other devices wirelessly or by wire to exchange data. Although the three-axis motor positioning device with various systems is shown in the figure, it should be understood that it is not required to be in real time or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0084] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0085] The three-axis motor positioning device provided by the present application adopts the three-axis motor positioning method in the above embodiment, which can solve the technical problems of the existing three-axis motor positioning being not accurate enough and having poor adaptability. Compared with the prior art, the beneficial effects of the three-axis motor positioning device provided by the present application are the same as the beneficial effects of the three-axis motor positioning method provided by the above embodiment, and the other technical features in the three-axis motor positioning device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0086] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0087] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0088] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the three-axis motor positioning method in the above-mentioned embodiment.
[0089] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0090] The computer-readable storage medium may be included in the three-axis motor positioning device; or may exist independently without being assembled into the three-axis motor positioning device.
[0091] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the three-axis motor positioning device, the three-axis motor positioning device: collects feature point pairs of the target object image through a binocular camera; obtains disparity values of the target object image based on the feature point pairs; calculates the three-dimensional coordinates of the target object according to the disparity values; implements Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector; and confirms the positioning result of the target object based on the predicted state vector.
[0092] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0094] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0095] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned three-axis motor positioning method, and can solve the technical problems of the existing three-axis motor positioning being not accurate enough and having poor adaptability. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the three-axis motor positioning method provided by the above-mentioned embodiment, and will not be elaborated here.
[0096] The present application also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the three-axis motor positioning method as described above are implemented.
[0097] The computer program product provided by the present application can solve the technical problems of the existing three-axis motor positioning being not accurate enough and having poor adaptability. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the three-axis motor positioning method provided by the above embodiment, and will not be elaborated here.
[0098] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A three-axis motor positioning method, characterized in that: The method comprises: Collect feature point pairs of the target object image through a binocular camera; Acquire a disparity value of the target object image based on the feature point pair, and calculate the three-dimensional coordinates of the target object according to the disparity value; Applying Kalman filtering to the three-dimensional coordinates to obtain a predicted state vector; Based on the predicted state vector, a positioning result of the target object is confirmed.
2. The three-axis motor positioning method according to claim 1, characterized in that: The step of collecting feature point pairs of the target object image by using a binocular camera also includes: Based on the position of the target object, obtain the setting point of the binocular camera; Get the setting parameters of the binocular camera; Based on the setting points and the setting parameters, a camera three-dimensional coordinate system is established.
3. The three-axis motor positioning method according to claim 1 or 2, characterized in that: The step of collecting feature point pairs of the target object image by using a binocular camera includes: Capture the target object image through a binocular camera; Performing dedistortion processing on the target object image to obtain a first image; Acquire feature point information parameters of the first image; The feature points of the first image are matched based on the feature point information parameters to obtain feature point pairs.
4. The three-axis motor positioning method according to claim 3, characterized in that: The step of obtaining the disparity value of the target object image based on the feature point pair and calculating the three-dimensional coordinates of the target object according to the disparity value comprises: Get the feature parameters of the feature point pair; Based on the characteristic parameters, obtaining a disparity value of the target object image; Mapping is performed based on the disparity value and the camera three-dimensional coordinate system to obtain a mapping result; Based on the mapping result, the three-dimensional coordinates of the target object are calculated.
5. The three-axis motor positioning method according to claim 4, characterized in that: The step of performing Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector comprises: Based on the three-dimensional coordinates, obtaining an initial vector; Outputting a prediction vector based on a preset prediction model and the initial vector; Based on the initial vector and the prediction vector, obtaining a Kalman filter gain; The prediction vector is corrected based on the Kalman filter gain to obtain a prediction state vector.
6. The three-axis motor positioning method according to claim 5, characterized in that: After the step of confirming the positioning result of the target object based on the predicted state vector, the following step is further included: Performing error analysis on the positioning result to obtain an error analysis result; The camera three-dimensional coordinate system, the preset prediction model and the Kalman filter gain are corrected based on the error analysis result.
7. A three-axis motor positioning device, characterized in that: The device comprises: A parameter acquisition module, used to collect feature point pairs of the target object image through a binocular camera; A calculation module is used to obtain the disparity value of the target object image based on the feature point pair, and calculate the three-dimensional coordinates of the target object according to the disparity value; it is also used to implement Kalman filtering on the three-dimensional coordinates to obtain a predicted state vector; it is also used to confirm the positioning result of the target object based on the predicted state vector.
8. A three-axis motor positioning device, characterized in that: The three-axis motor positioning device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the three-axis motor positioning method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the three-axis motor positioning method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the three-axis motor positioning method according to any one of claims 1 to 6 are implemented.