CN111028275B - Image positioning matching tracking robot PID method based on cross correlation - Google Patents
Image positioning matching tracking robot PID method based on cross correlation Download PDFInfo
- Publication number
- CN111028275B CN111028275B CN201911218372.0A CN201911218372A CN111028275B CN 111028275 B CN111028275 B CN 111028275B CN 201911218372 A CN201911218372 A CN 201911218372A CN 111028275 B CN111028275 B CN 111028275B
- Authority
- CN
- China
- Prior art keywords
- image
- matching
- correlation
- template
- tracking robot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000005070 sampling Methods 0.000 claims description 15
- 238000012937 correction Methods 0.000 claims description 8
- 238000012546 transfer Methods 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 3
- 238000013178 mathematical model Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 230000001105 regulatory effect Effects 0.000 claims description 3
- 230000002087 whitening effect Effects 0.000 claims description 3
- 230000007547 defect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001276 controlling effect Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B11/00—Automatic controllers
- G05B11/01—Automatic controllers electric
- G05B11/36—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential
- G05B11/42—Automatic controllers electric with provision for obtaining particular characteristics, e.g. proportional, integral, differential for obtaining a characteristic which is both proportional and time-dependent, e.g. P. I., P. I. D.
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05D—SYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
- G05D1/00—Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
- G05D1/02—Control of position or course in two dimensions
- G05D1/021—Control of position or course in two dimensions specially adapted to land vehicles
- G05D1/0231—Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Automation & Control Theory (AREA)
- Electromagnetism (AREA)
- Aviation & Aerospace Engineering (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Feedback Control In General (AREA)
- Manipulator (AREA)
Abstract
The invention provides a PID method of a tracking robot based on cross-correlation image positioning matching, which comprises the steps of selecting an image characteristic area, performing correlation matching and establishing a PID control model of the tracking robot. The algorithm has high positioning accuracy and high response speed, and is suitable for the positioning and tracking movement requirements of indoor and outdoor scenes.
Description
Technical Field
The invention relates to the technical field of robots, in particular to a PID method of a tracking robot based on cross-correlation image positioning matching.
Background
In the working process of the tracking robot, on one hand, the higher the required running speed is, the shorter the time spent for completing the task is; on the other hand, the faster the speed, the more difficult the turn, and the greater the likelihood of running out or off the route. In order to solve the contradiction between high-speed and accurate track seeking running, whether track information can be extracted rapidly and accurately becomes the key of success or failure of the competition, a high-precision and high-speed image positioning matching algorithm is necessary, so that route detection is ensured correspondingly, and meanwhile, the whole system realizes high-efficiency detection.
At present, a plurality of tracking positioning methods, such as positioning a matched image by adopting gravity center related information or gray level histogram information and measuring the angle between the advancing direction of a vehicle body and the tangential direction of a track by adopting a gyroscope, can basically meet the requirements when the positioning accuracy requirement is not high, but have the defects of limited positioning accuracy and very low speed under the condition of improving the accuracy.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a PID method of a trace-seeking robot based on cross-correlation image positioning matching. The algorithm has high positioning accuracy and high response speed, and is suitable for the positioning and tracking movement requirements of indoor and outdoor scenes.
The technical scheme of the invention is as follows: a tracking robot PID method based on cross-correlation image positioning matching comprises the following steps:
s1), selecting image characteristic areas
Selecting two image characteristic regions in the template image and the actual image respectively for determining the offset angle theta of the image 1 And theta 2 The included angle θ between the actual image and the template image is:
θ=θ 1 -θ 2 ;
s2), correlation matching
Selecting the center (x 0 ,y 0 ) As a rough control point, the actual image can be obtained according to the characteristic of the included angle theta between the actual image and the template image and the center (x 0 ,y 0 ) RotatingAssuming that a certain point (x, y) in the actual image is (x ', y') after θ rotation, the point is
The offset difference between the two images in the X direction and the Y direction after rotation is X d And y d Obtaining the optimal x by adopting a correlation matching method d And y d ;
S3), PID control model of tracking robot
Discretizing a continuous control algorithm on the basis of the given speed correction value to obtain a position control algorithm, and then obtaining an incremental PID control algorithm; and establishing a relational expression of motor voltage and motor rotating speed, and continuously feeding back the deviation angle of the advancing direction of the vehicle body and the track direction, which are obtained by processing the image obtained by the positioning and matching operator, to the control system.
Preferably, in step S1), the environment image of the trace of the tracking robot during driving is obtained through a sensor, the trace edge information is extracted, and the template of image matching is constructed by using the "standard" trace image stored by the robot.
Preferably, in step S2), the optimal x is obtained by using a correlation matching method d And y d The selected correlation algorithm is as follows:
in order to improve the matching quality, partial gray scale adjustment can be carried out during matching, or a whitening filtering method is adopted to process the image and then relevant search is carried out;
wherein N is 1 、N 2 For the X-direction and Y-direction widths of the image feature region, X, Y are the template and the point pixels in the actual image feature region,is ashThe mean value of the degrees, ρ, is the correlation coefficient.
When the correlation coefficient rho is closest to 1, the matching degree of the template and the actual image is highest, and the projection of the distance between the geometric center of the calculated template and the geometric center of the actual image in the X direction and the Y direction is the X d And y d 。
Preferably, in S2), when selecting the control point during searching, selecting the point with the best matching among the control points, reducing the searching step length and the range by half, performing a second layer of searching, wherein the step length of the layer is 1/2 pixel, selecting the point with the best matching, reducing the searching step length and the range by half again on the basis of the second layer, and compensating the searching of the layer to be 14 pixels.
Preferably, in step S3), the control object of the tracking robot is a dc motor, the driving motor is regulated by a PID controller, the input amount thereof is a difference between the target speed value and the current speed value, and the given speed correction value is calculated as follows:
wherein k is p E is the sampling sequence number k For the offset value, V, input at the kth sampling instant p For the offset value, V, input at the kth sampling instant d For horizontal deviation speed, K D For the variation coefficient of the deviation, T is the sampling period, V l For correction of system given speed, V c A speed value given for the system in different scenarios.
Preferably, in step S3), the continuous control algorithm is discretized to obtain a position control algorithm, and the mathematical model is:
where u (k) is the position of the tracking robot at the kth sampling time, e is the horizontal deviation amount of the tracking robot, and k i Is an integral coefficient, k d Is a differential coefficient.
Preferably, in step S3), the continuous PID control algorithm is discretized, and u (k-1) can be expressed as:
the increment of the control quantity is obtained: incremental PID control algorithm:
Δu(k)=u(k)-u(k-1)
because the control system of the permanent magnet direct current planetary gear motor is a second-order system, the relation between the motor voltage and the motor rotating speed can be obtained, namely, the transfer function expression is as follows:
in which W is D (S) is a transfer function; i is armature current; c (C) e Is an electromotive force coefficient; t (T) m Is a motor constant; t (T) d Is an electromagnetic constant.
The beneficial effects of the invention are as follows:
1. the invention can meet the requirements of the trace searching movement of indoor and outdoor scenes, and has good reliability, high positioning precision and high response speed;
2. the invention adopts a method of image positioning matching based on cross correlation to directly extract scene trace information, obtains the deviation between the robot and the trace position, feeds back deviation signals to a PID control system, and adjusts the running direction of the trace-seeking robot by controlling the rotating speed of a direct current motor so as to realize the accurate tracking of the robot on the scene trace;
3. the invention calculates the correlation degree of the corresponding two layers by using the cross-correlation information in the correlation matching process, and accurately positions each layer of image within the required positioning precision and the allowable error range, thereby finally achieving the aim of high-precision matching.
Drawings
FIG. 1 is a schematic flow chart of the present invention;
FIG. 2 is a flow chart of image feature region selection in accordance with the present invention;
FIG. 3 is a diagram illustrating the search for optimal control points according to the present invention;
FIG. 4 is a diagram of a PID control model of the tracking robot according to the invention.
Detailed Description
The following is a further description of embodiments of the invention, taken in conjunction with the accompanying drawings:
as shown in fig. 1, a tracking robot PID method for image positioning matching based on cross correlation includes the following steps:
s1), the trace environment image is obtained by using a sensor when the trace seeking robot runs, trace edge information is extracted, a template for image matching is constructed by using a standard trace image stored by the robot, and finally, the actually collected image and the template can be subjected to positioning matching, as shown in fig. 2.
Selecting two image characteristic regions in the template image and the actual image respectively for determining the offset angle theta of the image 1 And theta 2 The included angle θ between the actual image and the template image is:
θ=θ 1 -θ 2 。
s2, selecting the center (x) of a certain image characteristic region in the image 0 ,y 0 ) As a rough control point, the actual image can be obtained according to the included angle theta characteristic of the actual image and the template image (x 0 ,y 0 ) When the rotation is performed, a point (x, y) on the actual image is set, and the point (x ', y') after θ rotation is set:
only the offset difference X in the X-direction and the Y-direction exists between the two images after rotation d And y d The algorithm adopts a correlation matching method to obtain the optimal x d And y d The correlation coefficient is calculated as follows:
wherein N is 1 、N 2 For the X-direction and Y-direction widths of the image feature region, X, Y are the template and the point pixels in the actual image feature region,is the gray average value.
When the correlation coefficient rho is closest to 1, the matching degree of the template and the actual image is highest, and the projection of the distance between the geometric center of the calculated template and the geometric center of the actual image in the X direction and the Y direction is the X d And y d 。
In order to improve the quality of matching, partial gray scale adjustment can be performed during matching, or a whitening filtering method is adopted to process the image and then perform related search.
The control point selection process can be illustrated by using fig. 3, where fig. 3 is a search within a range of ±1 pixel from a control point with a minimum accuracy of 1/4 pixel. As shown in fig. 3 (a), the best matching point is found among 9 points, as shown by the black point in fig. 3 (a). The search step size and range is then reduced by half, i.e. the second level search, where the step size is 1/2 pixel and the best matching control point is found out of 15 points (up to 25 points), as shown by the black point in fig. 3 (b). Next, the best matching point is found in the third layer, and the search step is determined to be 0.25 pixel, the predetermined matching accuracy has been reached, the search is ended, and the last control point is shown as a black point in fig. 3 (c).
S3), the control object of the tracking robot is a direct current motor, the driving motor is regulated by a PID controller, and the input quantity of the driving motor is the difference value between the target speed value and the current speed value. The given speed correction value is calculated as follows:
wherein k is p E is the sampling sequence number k For the offset value, V, input at the kth sampling instant p A speed deviation value V for the input of the kth sampling time d Is waterFlat deviation speed, K D For the variation coefficient of the deviation, T is the sampling period, V l For correction of system given speed, V c A speed value given for the system in different scenarios.
Discretizing the continuous control algorithm to obtain a position control algorithm, wherein the mathematical model is as follows:
where u (k) is the position of the tracking robot at the kth sampling time, e is the horizontal deviation amount of the tracking robot, and k i Is an integral coefficient, k d Is a differential coefficient.
Discretizing the continuous PID control algorithm, u (k-1) can be expressed as:
the increment of the control quantity is obtained: incremental PID control algorithm:
Δu(k)=u(k)-u(k-1)
because the control system of the permanent magnet direct current planetary gear motor is a second-order system, the relation between the motor voltage and the motor rotating speed can be obtained, namely, the transfer function expression is as follows:
in which W is D (S) is a transfer function; i is armature current; c (C) e Is an electromotive force coefficient; t (T) m Is a motor constant; t (T) d Is an electromagnetic constant. As can be seen from fig. 4, the feedback loop indicates the deviation angle of the advancing direction of the vehicle body from the track direction obtained by processing the image obtained by the positioning matching operator.
The foregoing embodiments and description have been provided merely to illustrate the principles and best modes of carrying out the invention, and various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (2)
1. The PID method for the tracking robot based on the image positioning matching of the cross correlation is characterized by comprising the following steps:
s1), selecting image characteristic areas
Selecting two image characteristic regions in the template image and the actual image respectively for determining the offset angle theta of the image 1 And theta 2 The included angle θ between the actual image and the template image is:
θ=θ 1 -θ 2 ;
s2), correlation matching
Selecting the center (x 0 ,y 0 ) As a rough control point, the actual image can be obtained according to the characteristic of the included angle theta between the actual image and the template image and the center (x 0 ,y 0 ) Rotating the image to obtain a point (x, y) on the actual image, and rotating the point (x ', y') after θ rotation
The offset difference between the two images in the X direction and the Y direction after rotation is X d And y d Obtaining the optimal x by adopting a correlation matching method d And y d ;
Obtaining the optimal x by adopting a correlation matching method d And y d The selected correlation algorithm is as follows:
in order to improve the matching quality, partial gray scale adjustment can be carried out during matching, or a whitening filtering method is adopted to process the image and then relevant search is carried out;
wherein N is 1 、N 2 For the X-direction and Y-direction widths of the image feature region, X, Y are the template and the point pixels in the actual image feature region,the gray average value is the gray average value, and ρ is the correlation coefficient;
when the correlation coefficient rho is closest to 1, the matching degree of the template and the actual image is highest, and the projection of the distance between the geometric center of the calculated template and the geometric center of the actual image in the X direction and the Y direction is the X d And y d ;
When searching, selecting control points, selecting the point with the best matching among a plurality of control points, reducing the searching step length and the range by half, carrying out second-layer searching, wherein the step length of the layer is 1/2 pixel, selecting the point with the best matching, reducing the searching step length and the range by half again on the basis of the second layer, and compensating the searching of the layer to be 14 pixels;
s3) establishing a PID control model of the tracking robot
Discretizing a continuous control algorithm on the basis of the given speed correction value to obtain a position control algorithm, and then obtaining an incremental PID control algorithm; establishing a relational expression of motor voltage and motor rotating speed, and continuously feeding back the deviation angle of the advancing direction of the vehicle body and the track direction, which are obtained by processing the image obtained by the positioning and matching operator, to the control system;
the control object of the tracking robot is a direct current motor, the driving motor is regulated by a PID controller, the input quantity of the driving motor is the difference value between a target speed value and a current speed value, and a given speed correction value is calculated as follows:
wherein k is p E is the sampling sequence number k For the offset value, V, input at the kth sampling instant p For the offset value, V, input at the kth sampling instant d For horizontal deviation speed, K D For the variation coefficient of the deviation, T is the sampling period, V l For correction of system given speed, V c A speed value given to a system under different scenes;
discretizing the continuous control algorithm to obtain a position control algorithm, wherein the mathematical model is as follows:
where u (k) is the position of the tracking robot at the kth sampling time, e is the horizontal deviation amount of the tracking robot, and k i Is an integral coefficient, k d Is a differential coefficient;
discretizing the continuous PID control algorithm, u (k-1) can be expressed as:
the increment of the control quantity is obtained: incremental PID control algorithm:
△u(k)=u(k)-u(k-1)
because the control system of the permanent magnet direct current planetary gear motor is a second-order system, the relation between the motor voltage and the motor rotating speed can be obtained, namely, the transfer function expression is as follows:
in which W is D (S) is a transfer function; i is armature current; c (C) e Is an electromotive force coefficient; t (T) m Is a motor constant; t (T) d Is an electromagnetic constant.
2. The cross-correlation based image location matching tracking robot PID method of claim 1, characterized in that: in step S1), the environment image of the trace of the tracking robot during running is obtained through a sensor, the trace edge information is extracted, and a template for image matching is constructed by using the standard trace image stored by the robot.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911218372.0A CN111028275B (en) | 2019-12-03 | 2019-12-03 | Image positioning matching tracking robot PID method based on cross correlation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911218372.0A CN111028275B (en) | 2019-12-03 | 2019-12-03 | Image positioning matching tracking robot PID method based on cross correlation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111028275A CN111028275A (en) | 2020-04-17 |
CN111028275B true CN111028275B (en) | 2024-01-30 |
Family
ID=70203997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911218372.0A Active CN111028275B (en) | 2019-12-03 | 2019-12-03 | Image positioning matching tracking robot PID method based on cross correlation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111028275B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114910020B (en) * | 2021-02-09 | 2023-11-21 | 北京小米机器人技术有限公司 | Positioning method and device of movable equipment, movable equipment and storage medium |
CN117076704B (en) * | 2023-10-16 | 2024-01-23 | 北京中遥数创科技有限公司 | Image quality analysis and evaluation method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106985142A (en) * | 2017-04-28 | 2017-07-28 | 东南大学 | A kind of double vision for omni-directional mobile robots feels tracking device and method |
CN207374643U (en) * | 2017-09-05 | 2018-05-18 | 吉林大学 | A kind of quadrotor based on autonomous tracking object-taking transportation system |
CN108181897A (en) * | 2017-12-11 | 2018-06-19 | 华侨大学 | A kind of method of biped robot's automatic tracking |
CN109410207A (en) * | 2018-11-12 | 2019-03-01 | 贵州电网有限责任公司 | A kind of unmanned plane line walking image transmission line faultlocating method based on NCC feature |
CN109709959A (en) * | 2018-12-27 | 2019-05-03 | 合肥泰禾光电科技股份有限公司 | Offset calculation method, device, automatic ride control method and walking mechanism |
-
2019
- 2019-12-03 CN CN201911218372.0A patent/CN111028275B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106985142A (en) * | 2017-04-28 | 2017-07-28 | 东南大学 | A kind of double vision for omni-directional mobile robots feels tracking device and method |
CN207374643U (en) * | 2017-09-05 | 2018-05-18 | 吉林大学 | A kind of quadrotor based on autonomous tracking object-taking transportation system |
CN108181897A (en) * | 2017-12-11 | 2018-06-19 | 华侨大学 | A kind of method of biped robot's automatic tracking |
CN109410207A (en) * | 2018-11-12 | 2019-03-01 | 贵州电网有限责任公司 | A kind of unmanned plane line walking image transmission line faultlocating method based on NCC feature |
CN109709959A (en) * | 2018-12-27 | 2019-05-03 | 合肥泰禾光电科技股份有限公司 | Offset calculation method, device, automatic ride control method and walking mechanism |
Also Published As
Publication number | Publication date |
---|---|
CN111028275A (en) | 2020-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11385062B2 (en) | Map creation method for mobile robot and path planning method based on the map | |
CN102298070B (en) | Method for assessing the horizontal speed of a drone, particularly of a drone capable of hovering on automatic pilot | |
CN110796010B (en) | Video image stabilizing method combining optical flow method and Kalman filtering | |
CN102666032B (en) | Slip detection apparatus and method for a mobile robot | |
CN102656532B (en) | For ground map generalization and the update method of position of mobile robot identification | |
CN111028275B (en) | Image positioning matching tracking robot PID method based on cross correlation | |
CN110675435A (en) | Based on Kalman filtering and chi2Vehicle track tracking method for detecting smoothing processing | |
JP2008146197A (en) | Navigation device and control method therefor | |
CN110018688B (en) | Automatic guided vehicle positioning method based on vision | |
CN108445882B (en) | Automatic guided vehicle with tracking function | |
CN109633664A (en) | Joint positioning method based on RGB-D Yu laser odometer | |
Liu et al. | Dynamic RGB-D SLAM based on static probability and observation number | |
CN106771329B (en) | Method for detecting running speed of unmanned aerial vehicle in deceleration process | |
CN110889353A (en) | Space target identification method based on primary focus large-visual-field photoelectric telescope | |
CN110726402B (en) | Laser point vision guiding method of non-orthogonal shafting laser total station | |
CN110077393B (en) | Automatic parking speed control method based on image vision | |
CN109815812B (en) | Vehicle bottom edge positioning method based on horizontal edge information accumulation | |
CN115482282A (en) | Dynamic SLAM method with multi-target tracking capability in automatic driving scene | |
CN115375767A (en) | Binocular vision odometer method based on event contrast maximization | |
CN112415516B (en) | Method and device for sensing obstacle area in front of vehicle | |
CN114526740A (en) | Monocular automatic driving navigation method, system and device based on natural object | |
CN113673462A (en) | Logistics AGV positioning method based on lane line | |
Liu et al. | An image-based accurate alignment for substation inspection robot | |
CN117930726A (en) | Control method and system for transparent element in automatic assembly | |
CN112489139B (en) | Calibration method for geometric center position of camera and robot based on external identification |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20240101 Address after: Room 305, 306, and 309, Zone C, Third Floor, Comprehensive Service Area, Tiancai Hetao Headquarters Base, Linhe District, Bayannur City, Inner Mongolia Autonomous Region, 015000 Applicant after: Inner Mongolia Huidong Technology Co.,Ltd. Address before: 225000 RMB, 6th Floor, South Half Floor, Building 23, Information Service Industry Base, Guangling District, Yangzhou City, Jiangsu Province Applicant before: Yangzhou houchao Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |