Visual line patrol positioning method, system and computer readable storage medium
By acquiring and analyzing the images collected by the image acquisition device, calculating the robot's travel distance and correcting the sensor data, the problem of accumulated errors in the visual dotted line gap detection and positioning method is solved, and high-precision global positioning is achieved.
Patent Information
- Application Number
- CN202111146491.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2041-09-28
AI Technical Summary
The existing visual dotted line gap detection and positioning method cannot maintain high-precision positioning for a long time, and sensors such as odometers and IMUs will produce cumulative errors, resulting in a decrease in positioning accuracy.
By acquiring the first image and the second image collected by the image acquisition device at a predetermined time interval, the distance information of the target line segment and the interval is used to calculate the traveling distance of the robot, and the traveling distance obtained by the sensor is corrected, thereby obtaining high-precision positioning information.
It effectively reduces the cumulative error generated by the sensor, avoids missed detection intervals, and achieves high-precision global positioning.
Smart Images

Figure CN114001738B
Abstract
Description
Technical Field
[0001] The present application relates to the field of navigation and positioning technology, and in particular to a visual line patrol positioning method, system and computer-readable storage medium. Background Art
[0002] Commonly used robot positioning solutions include laser SLAM positioning, QR code positioning, texture navigation positioning, and visual line patrol positioning. Laser SLAM positioning is greatly affected by dynamic environmental changes and has high requirements for the surrounding environment; QR code positioning is mainly used for indoor robot positioning, and the early layout and later maintenance of QR codes require a lot of manpower; texture navigation positioning has higher requirements for the texture and cleanliness of the ground, and has fewer application scenarios; the current visual dotted line gap detection positioning method mainly provides lateral (perpendicular to the robot's forward direction) distance and angle positioning, and longitudinal (robot forward direction) positioning is performed through other sensors.
[0003] Sensors generally use odometers or inertial measurement units (IMUs). Although both odometers and IMUs can realize robot positioning, both odometers and IMUs will produce cumulative positioning errors over time, making it impossible to maintain higher-precision positioning for a long time. Therefore, a new visual line inspection method is urgently needed to solve the above problems. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a visual line patrol positioning method, system and computer-readable storage medium, which can reduce the cumulative positioning error.
[0005] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a visual line patrol positioning method, comprising: acquiring a first image and a second image acquired by an image acquisition device at a predetermined interval, wherein the first image and the second image contain multiple target line segments located on the same straight line, and a gap is set between two adjacent target line segments; the travel direction of the robot is parallel to the straight line; obtaining a first distance between the robot and the closest gap in the travel direction from the first image, and obtaining a second distance between the robot and the closest gap in the travel direction from the second image; determining a first travel distance of the robot according to the first distance, the second distance, a first length of the target line segment in the travel direction, and a second length of the gap in the travel direction; using the first travel distance to correct a second travel distance obtained by a sensor located on the robot, and obtaining first positioning information of the robot in its travel direction according to the corrected second travel distance.
[0006] Among them, the step of determining the first traveling distance of the robot according to the first distance, the second distance, the first length of the target line segment in the traveling direction and the second length of the interval in the traveling direction includes: obtaining a first sum of the first distance, the first length and the second length, and taking the difference between the first sum and the second distance as the first traveling distance.
[0007] Among them, the step of using the first traveling distance to correct the second traveling distance obtained by the sensor located on the robot includes: obtaining a second difference between the second traveling distance and the first traveling distance; judging whether the second difference is less than the second sum of the first length and the second length; if so, correcting the value of the second traveling distance to the first traveling distance; if not, obtaining a third difference between the second difference and the second sum, rounding the ratio of the third difference to the second sum to obtain a first parameter, and correcting the second traveling distance to the sum of the product of the second sum and the first parameter and the first traveling distance.
[0008] Wherein, in the traveling direction, each of the intervals has a first side away from the starting point of traveling, and the steps of obtaining a first distance between the robot and the interval closest to it in the traveling direction from the first image, and obtaining a second distance between the robot and the interval closest to it in the traveling direction from the second image, include: obtaining a first position of the robot in the first image, and obtaining a first distance between the first position and the first side closest to the first position in the traveling direction; and, obtaining a second position of the robot in the second image, and obtaining a second distance between the second position and the first side closest to the second position in the traveling direction.
[0009] Wherein, the first image and the second image respectively contain at least one mark, and after the step of acquiring the first image and the second image acquired by the image acquisition device at a predetermined interval, the method further includes: obtaining a first relative distance between the robot and the mark from the first image, and obtaining a second relative distance between the robot and the mark from the second image; obtaining a third travel distance of the robot in its travel direction according to the first relative distance and the second relative distance; and obtaining second positioning information of the robot in its travel direction using the third travel distance.
[0010] Among them, the step of using the third traveling distance to obtain the second positioning information of the robot in its traveling direction includes: in response to the difference between the third traveling distance and the second traveling distance obtained by the sensor on the robot being greater than or equal to a first preset threshold, correcting the value of the second traveling distance to the third traveling distance, and obtaining the second positioning information of the robot in its traveling direction based on the corrected second traveling distance.
[0011] Among them, before the step of obtaining the first distance between the robot and the closest interval in its traveling direction from the first image, and the step of obtaining the second distance between the robot and the closest interval in its traveling direction from the second image, it includes: initializing the first image to obtain a reference line segment; tracking the target line segment according to the reference line segment and obtaining the third positioning information of the robot perpendicular to its traveling direction; after the step of obtaining the first positioning information of the robot in its traveling direction according to the corrected second traveling distance, and / or the step of obtaining the second positioning information of the robot in its traveling direction using the third traveling distance, it includes: obtaining the final positioning information of the robot according to the third positioning information and the first positioning information and / or the second positioning information.
[0012] Among them, the step of initializing the first image to obtain reference line segments includes: using Hough transform to extract multiple line segments in the preprocessed first image; obtaining a target line segment set from the multiple line segments according to a first preset attribute of the line segment; wherein the target line segment set includes at least one reference line segment, and the first preset attribute includes the grayscale of the line segment and the width of the line segment; extracting the reference line segment from the target line segment set according to a second preset attribute of the line segment; wherein the second preset attribute includes the color of the line segment and the contrast between the line segment and the ground.
[0013] Among them, the step of tracking the target line segment according to the reference line segment and obtaining the third positioning information of the robot perpendicular to its traveling direction includes: in response to the attribute similarity between the target line segment in the second image and the reference line segment being less than a second preset threshold, obtaining the first position information of the reference line segment; obtaining the second position information of the target line segment in the second image according to the first position information; and obtaining the third positioning information of the robot perpendicular to its traveling direction according to the second position information.
[0014] Among them, the step of tracking the target line segment according to the reference line segment also includes: in response to the attribute similarity between the target line segment in the second image and the reference line segment being greater than or equal to a second preset threshold, expanding the search range of the second image according to the position of the target line segment in the first image until the target line segment in the second image is successfully tracked; in response to unsuccessful tracking of the target line segment in the second image after expanding the search range of the second image according to the position of the target line segment in the first image, performing a full-area search on the second image until the target line segment in the second image is successfully tracked; in response to unsuccessful tracking of the target line segment in the second image after performing a full-area search on the second image, determining that tracking of the target line segment in the second image has failed.
[0015] To solve the above technical problems, another technical solution adopted in the present application is: to provide a visual line patrol positioning system, comprising a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the visual line patrol positioning method mentioned in any of the above embodiments.
[0016] In order to solve the above technical problems, another technical solution adopted in the present application is: providing a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to implement the visual line patrol positioning method mentioned in any of the above embodiments.
[0017] Different from the prior art, the beneficial effects of the present application are as follows: the image acquisition device in the present application acquires the first image and the second image at a predetermined interval, wherein the first image and the second image contain multiple target line segments located on the same straight line, and an interval is set between two adjacent target line segments, and the travel direction of the robot is parallel to the straight line, and the first distance between the robot and the closest interval in the travel direction is obtained from the first image, and the second distance between the robot and the closest interval in the travel direction is obtained from the second image; the first travel distance of the robot is determined according to the first distance, the second distance, the first length of the target line segment in the travel direction, and the second length of the interval in the travel direction, and the first travel distance is used to correct the second travel distance obtained by the sensor on the robot, and finally the first positioning information of the robot in its travel direction is obtained according to the corrected second travel distance. The first travel distance obtained by the interval detection can optimize the cumulative error generated by the second travel distance obtained by the sensor, and the second travel distance can also avoid the situation of missed detection of the interval, thereby obtaining high-precision global positioning information. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0019] Figure 1 It is a flow chart of an implementation method of the visual line patrol positioning method of the present application;
[0020] Figure 2 is a schematic diagram of robot positioning;
[0021] Figure 3 yes Figure 1 A schematic diagram of a flow chart of an implementation method corresponding to step S4;
[0022] Figure 4 It is a schematic diagram of the logo;
[0023] Figure 5 yes Figure 1 A schematic diagram of a flow chart of an implementation method after step S1;
[0024] Figure 6 yes Figure 5 A schematic diagram of a flow chart of an implementation method of step S22;
[0025] Figure 7 yes Figure 1 A schematic diagram of a process flow of an implementation method before step S2;
[0026] Figure 8 yes Figure 7 A schematic flow chart of an implementation method of step S30;
[0027] Fig. 9 yes Figure 7 A schematic flow chart of an implementation method of step S31;
[0028] Fig.10 This is a structural diagram of an implementation scheme of the visual line patrol positioning system of the present application;
[0029] Fig.11 It is a schematic diagram of the framework of an implementation method of the visual line patrol positioning system of the present application;
[0030] Fig.12 It is a schematic diagram of a framework of an implementation scheme of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] See also Figure 1 and Figure 2 , Figure 1 This is a flow chart of an implementation method of the visual line patrol positioning method of the present application. Figure 2 This is a schematic diagram of robot positioning. The visual line patrol positioning method includes:
[0033] S1: An image acquisition device acquires a first image and a second image at a predetermined interval.
[0034] Specifically, if Figure 2 As shown, the first image and the second image contain multiple target line segments located on the same straight line, and when arranging the guide line or lane line, a gap is set between two adjacent target line segments. Figure 2 In this embodiment, the robot detects the interval based on patrolling the real line, that is, if two consecutive large grayscale mutations occur at a certain distance (the second length L2 of the interval) in the direction parallel to the target line segment inside the target line segment, the interval detection is considered successful.
[0035] S2: Obtain a first distance between the robot and the closest interval in the traveling direction from the first image, and obtain a second distance between the robot and the closest interval in the traveling direction from the second image.
[0036] For more details, please refer to Figure 2 , in the traveling direction, each interval has a first side far from the traveling starting point. Specifically, in this embodiment, after the interval detection is successful, step S2 includes: obtaining a first position of the robot in the first image, and obtaining a first distance d1 between the first position and the first side closest to the first position in the traveling direction; and obtaining a second position of the robot in the second image, and obtaining a second distance d2 between the second position and the first side closest to the second position in the traveling direction.
[0037] S3: Determine a first travel distance of the robot according to the first distance, the second distance, a first length of the target line segment in the travel direction, and a second length of the interval in the travel direction.
[0038] For more details, please refer to Figure 2After accumulating and detecting two intervals, step S3 specifically includes: obtaining a first sum d1+L1+L2 of the first distance d1, the first length L1, and the second length L2, and taking the difference between the first sum and the second distance d2 as the first travel distance S G , the specific formula is as follows: S G =d1+L1+L2-d2.
[0039] S4: using the first travel distance to correct the second travel distance obtained by the sensor on the robot, and obtaining first positioning information of the robot in its travel direction according to the corrected second travel distance.
[0040] Through this design, the first travel distance obtained by interval detection can optimize the cumulative error of the second travel distance obtained by the sensor. At the same time, the second travel distance can also avoid the situation of missed detection intervals, thereby obtaining high-precision global positioning information.
[0041] Specifically, in this embodiment, please refer to Figure 3 , Figure 3 yes Figure 1 Specifically, the step of using the first travel distance in step S4 to correct the second travel distance obtained by the sensor on the robot includes:
[0042] S10: Obtain a second difference between the second travel distance and the first travel distance.
[0043] Specifically, the sensor may be an odometer or an inertial measurement unit (IMU), or other sensors, as long as the robot's travel distance can be obtained in real time, and this application does not limit this. When the sensor is an odometer or an inertial measurement unit (IMU), the second travel distance is the robot's travel distance S between the two intervals. odom or S IMU , the second travel distance and the first travel distance S are obtained by calculation G The second difference between .
[0044] S11: Determine whether the second difference is smaller than the second sum of the first length and the second length.
[0045] Specifically, the second travel distance and the first travel distance S are determined. G Is the second difference between the first length L1 and the second length L2 smaller than the second sum L1+L2 of the first length L1 and the second length L2?
[0046] S12: If yes, the value of the second travel distance is corrected to the first travel distance.
[0047] Specifically, if the second difference is less than L1+L2, it means that the detection of the interval is accurate and there is no missed detection. The first travel distance S G There is no error. At this time, you only need to correct the value of the second travel distance to the first travel distance S G .
[0048] S13: If not, obtain a third difference between the second difference and the second sum, round the ratio of the third difference to the second sum to obtain the first parameter, and correct the second travel distance to the sum of the product of the second sum and the first parameter and the first travel distance.
[0049] Specifically, if the second difference is greater than or equal to the second sum L1+L2, it means that the detection of the interval has been missed, and the first travel distance S obtained is G There is an error, at this time, the third difference between the second difference and the second sum L1+L2 is obtained, and the ratio of the third difference to the second sum is rounded to obtain the first parameter n. In this embodiment, the first parameter n is the number of missed intervals. In addition, in this embodiment, the second travel distance is corrected to the product of the second sum and the first parameter and the first travel distance S G Sum: n(L1+L2)+S G .
[0050] In this way, by comparing the second travel distance measured by the sensor with the first travel distance, it is possible to avoid the situation where missed detection of the interval leads to a large error in the first travel distance, and the error can be eliminated through calculation, thereby improving the accuracy of global positioning.
[0051] Although the accumulated error of the odometer or IMU can be reduced to a certain extent through interval detection, this is only a local error correction and cannot achieve global error correction. The robot requires higher positioning accuracy in certain positions (such as turning intersections, mission points, etc.), so the signs are generally placed in these specific positions, and the global position information of the signs will be calibrated in advance to obtain the precise positioning information of the robot through the position of the signs. In one embodiment, the first image and the second image each contain at least one sign. In this embodiment, the signs in the first image and the second image may be the same or different.
[0052] In addition, in this embodiment, see Figure 4 , Figure 4It is a schematic diagram of the logo. In order to improve the real-time and accuracy of logo detection, the logo is designed to be a square or a circle. Symbols such as numbers or letters can be set inside the square or the circle, and the interior of the logo can be distinguished by shadows or blanks. When performing logo detection, the position of the square and the circle can be quickly located to quickly locate the position of the logo and identify it, thereby improving the speed of logo detection and recognition. In addition, when calculating the position of the logo, a certain point of the logo is generally selected as a reference point (such as the center of the circle or the vertex and center of the square), and the square or circle is also conducive to the selection of the reference point. Of course, in other embodiments, the logo can also be designed as other shapes, which is not limited in this application.
[0053] See also Figure 5 , Figure 5 yes Figure 1 Schematic diagram of a flow chart of an implementation method after step S1. Specifically, after step S1, the following may also be included:
[0054] S20: Obtain a first relative distance between the robot and the marker from the first image, and obtain a second relative distance between the robot and the marker from the second image.
[0055] S21: Obtain a third travel distance of the robot in its travel direction according to the first relative distance and the second relative distance.
[0056] Specifically, by detecting and identifying the mark, the relative position between the robot and the mark can be calculated, and the third travel distance of the robot in its travel direction can be calculated by combining the relative position with the global position information of the mark. In this way, more accurate global positioning information can be obtained.
[0057] S22: Using the third travel distance, obtain second positioning information of the robot in its travel direction.
[0058] Specifically, in this embodiment, please refer to Figure 6 , Figure 6 yes Figure 5 Schematic diagram of a flow chart of an implementation method of step S22 in FIG. Specifically, step S22 includes:
[0059] S220: Determine whether a difference between the third travel distance and the second travel distance obtained by the sensor on the robot is greater than or equal to a first preset threshold.
[0060] Specifically, the first preset threshold value can be set according to actual conditions, and this application does not limit it. In this way, the error value between the third travel distance calculated by the mark and the second travel distance obtained by the sensor on the robot can be obtained, and then the second travel distance can be corrected.
[0061] S221: If yes, correct the value of the second travel distance to the third travel distance, and obtain the second positioning information of the robot in its travel direction according to the corrected second travel distance.
[0062] Specifically, if the difference between the third traveling distance and the second traveling distance obtained by the sensor on the robot is greater than or equal to the first preset threshold, the value of the second traveling distance is corrected to the third traveling distance, and the second positioning information of the robot in its traveling direction is obtained based on the corrected second traveling distance.
[0063] S222: If not, obtain second positioning information of the robot in its traveling direction according to the second traveling distance.
[0064] Specifically, if the difference between the third travel distance and the second travel distance obtained by the sensor on the robot is less than a first preset threshold, the second positioning information of the robot in its travel direction is obtained according to the second travel distance.
[0065] In this way, the error value between the third travel distance calculated by the marker and the second travel distance obtained by the sensor on the robot can be obtained, and then the second travel distance can be corrected to reduce the cumulative error of sensor positioning, thereby achieving global error correction and improving the accuracy of robot positioning.
[0066] Of course, in other embodiments, the second travel distance obtained by the sensor may not be used in this process, and therefore the second travel distance does not need to be corrected, and the second positioning information of the robot in its travel direction is directly obtained according to the third travel distance obtained from the global position information, thereby improving the accuracy of the robot positioning. This application is not limited here.
[0067] In one embodiment, step S4 and / or step S22 specifically include: obtaining the final positioning information of the robot according to the third positioning information and the first positioning information; obtaining the final positioning information of the robot according to the third positioning information and the second positioning information; obtaining the final positioning information of the robot according to the third positioning information and the first positioning information and the second positioning information. Specifically, in this embodiment, the third positioning information, the first positioning information, and the second positioning information are passed through a Kalman filter to obtain the optimal global positioning information, thereby improving the accuracy of the robot positioning.
[0068] Specifically, in this embodiment, please refer to Figure 7 , Figure 7 yes Figure 1 Schematic diagram of a flow chart of an implementation method before step S2. Before step S2 specifically includes:
[0069] S30: Performing initialization processing on the first image to obtain a reference line segment.
[0070] Specifically, in this embodiment, please refer to Figure 8 , Figure 8 yes Figure 7 Schematic diagram of a flow chart of an implementation method of step S30 in FIG. Step S30 specifically includes:
[0071] S300: extracting a plurality of line segments from the preprocessed first image using Hough transform.
[0072] Specifically, firstly, preprocessing operations such as dedistortion, grayscale, smoothing filtering, perspective transformation and binarization are performed on the image captured by the camera to obtain a first image, and then a plurality of line segments in the first image are extracted using Hough transform.
[0073] S301: Obtain a target line segment set from a plurality of line segments according to a first preset attribute of the line segment.
[0074] Specifically, the target line segment set includes at least one reference line segment, and the first preset attribute includes grayscale and width. In this embodiment, each target line segment is composed of a pair of parallel line segments.
[0075] S302: extracting reference line segments from the target line segment set according to a second preset attribute of the line segment.
[0076] Specifically, the second preset attribute includes color and contrast with the ground. In this embodiment, initialization is successful when a reference line segment is extracted, and the process proceeds to step S31.
[0077] S31: Track the target line segment according to the reference line segment and obtain the third positioning information of the robot perpendicular to the moving direction of the robot.
[0078] Specifically, in this embodiment, please refer to Fig. 9 , Fig. 9 yes Figure 7 Schematic diagram of a flow chart of an implementation method of step S31 in FIG. Step S31 specifically includes:
[0079] S310: Determine whether the attribute similarity between the target line segment in the second image and the reference line segment is less than a second preset threshold.
[0080] S311: If yes, obtain the first position information of the reference line segment.
[0081] In order to take into account the real-time and robustness of target line segment tracking, this application adopts the uniform motion assumption to achieve fast tracking of lane lines. Specifically, when the attribute similarity between the target line segment in the second image and the reference line segment is less than the second preset threshold, the attributes here include width and grayscale contrast. Specifically, when the width change is less than 2cm and the grayscale contrast change is less than 10, it means that the target line segment is tracked successfully and the first position information of the reference line segment is obtained. Of course, the attributes here can also be other, and the second preset threshold can also adopt other parameters according to the attributes, which is not limited in this application.
[0082] S312: Obtain second position information of the target line segment in the second image according to the first position information.
[0083] Specifically, in this embodiment, the uniform motion assumption assumes that the movement of the robot in adjacent moments is uniform motion. The position information of the reference line segment in the first image can be used to predict the approximate position information of the target line segment in the second image, mainly to obtain the distance threshold and the angle threshold, which narrows the search and matching range for tracking the target line segment, greatly improves the real-time and success rate of target line segment tracking, and thus obtains the second position information of the target line segment with higher accuracy in the second image.
[0084] S313: Obtain third positioning information of the robot perpendicular to its moving direction according to the second position information.
[0085] S314: If not, the search range of the second image is expanded according to the position of the target line segment in the first image to determine whether the target line segment in the second image is tracked successfully.
[0086] In general, the uniform motion assumption can quickly solve the tracking problem of the target line segment most of the time, but the situation where the target line segment cannot be matched in the specified area will occasionally occur, thereby affecting the robustness of the target line segment tracking. Specifically, when the attribute similarity between the target line segment in the second image and the reference line segment is greater than or equal to the second preset threshold, the search range (mainly the angle range) of the second image is expanded according to the position of the target line segment in the first image, and it is determined whether the target line segment in the second image is tracked successfully.
[0087] S315: If yes, go to step S311.
[0088] Specifically, if the target line segment in the second image is tracked successfully after the search range of the second image is expanded according to the position of the target line segment in the first image, the step of obtaining the first position information of the reference line segment is entered.
[0089] S316: If not, perform a full-area search on the second image to determine whether the target line segment in the second image is tracked successfully.
[0090] Specifically, in this embodiment, after the search range of the uniform motion hypothesis is increased three times respectively, if the target line segment in the second image is still not tracked successfully, a full-area search is performed on the second image to determine whether the target line segment in the second image is tracked successfully.
[0091] S317: If yes, go to step S311.
[0092] Specifically, if the target line segment in the second image is tracked successfully after the full-area search of the second image, the process proceeds to the step of obtaining the first position information of the reference line segment.
[0093] S318: If not, it is determined that the tracking of the target line segment in the second image fails.
[0094] Specifically, in this embodiment, if the target line segment in the second image is still not tracked successfully after a full-area search of the second image, it means that the tracking of the target line segment in the second image has failed. The second image is abandoned and a new image is selected to track the target line segment, thereby avoiding wasting computing resources and improving the efficiency and accuracy of robot positioning.
[0095] In addition, in this embodiment, the process of the above steps S314-S318 will greatly increase the tracking time. When executing the above operations, if a timeout occurs, the global positioning of the robot is temporarily completed by the sensor.
[0096] See also Fig.10 , Fig.10 This is a schematic diagram of the structure of an embodiment of the visual line patrol positioning system of the present application. The visual line patrol positioning system specifically includes:
[0097] The acquisition module 10 is used to acquire a first image and a second image acquired by an image acquisition device at a predetermined interval, wherein the first image and the second image contain multiple target line segments located on the same straight line, and a gap is set between two adjacent target line segments; the moving direction of the robot is parallel to the straight line.
[0098] The processing module 12 is coupled to the acquisition module 10, and is used to obtain a first distance between the robot and the closest interval in the travel direction from the first image, and to obtain a second distance between the robot and the closest interval in the travel direction from the second image. The processing module 12 is also used to determine the first travel distance of the robot according to the first distance, the second distance, the first length of the target line segment in the travel direction, and the second length of the interval in the travel direction. In addition, the processing module 12 is also used to obtain the first positioning information of the robot in its travel direction according to the corrected second travel distance.
[0099] The correction module 14 is coupled to the processing module 12 and is used to correct the second travel distance obtained by the sensor located on the robot using the first travel distance.
[0100] See also Fig.11 , Fig.11 1 is a schematic diagram of a framework of an embodiment of the visual line patrol positioning system of the present application. The visual line patrol positioning system includes a memory 20 and a processor 22 coupled to each other. Specifically, in this embodiment, the memory 20 stores program instructions, and the processor 22 is used to execute the program instructions to implement the visual line patrol positioning method mentioned in any of the above embodiments.
[0101] Specifically, the processor 22 may also be referred to as a CPU (Central Processing Unit). The processor 22 may be an integrated circuit chip having the ability to process signals. The processor 22 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 22 may be implemented by a plurality of integrated circuit chips.
[0102] See also Fig.12 , Fig.12 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 30 stores a computer program 300, which can be read by a computer, and the computer program 300 can be executed by a processor to implement the visual line patrol positioning method mentioned in any of the above embodiments. Among them, the computer program 300 can be stored in the above-mentioned computer-readable storage medium 30 in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The computer-readable storage medium 30 with a storage function can be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, RandomAccess Memory), a disk or an optical disk, etc., which can store program codes, or a terminal device such as a computer, a server, a mobile phone, and a tablet.
[0103] In summary, different from the prior art, the image acquisition device in the present application acquires the first image and the second image at a predetermined interval, wherein the first image and the second image contain multiple target line segments located on the same straight line, and an interval is set between two adjacent target line segments, and the travel direction of the robot is parallel to the straight line, and the first distance between the robot and the interval closest to it in the travel direction is obtained from the first image, and the second distance between the robot and the interval closest to it in the travel direction is obtained from the second image; the first travel distance of the robot is determined according to the first distance, the second distance, the first length of the target line segment in the travel direction, and the second length of the interval in the travel direction, and the first travel distance is used to correct the second travel distance obtained by the sensor on the robot, and finally the first positioning information of the robot in its travel direction is obtained according to the corrected second travel distance. The first travel distance obtained by the interval detection can optimize the cumulative error generated by the second travel distance obtained by the sensor, and the second travel distance can also avoid the situation of missed detection of the interval, thereby obtaining high-precision global positioning information.
[0104] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A visual line patrol positioning method, characterized in that: include: The image acquisition device acquires a first image and a second image at a predetermined interval, wherein the first image and the second image contain a plurality of target line segments located on the same straight line, and a gap is provided between two adjacent target line segments; and the moving direction of the robot is parallel to the straight line; Obtaining a first distance between the robot and the closest interval in its traveling direction from the first image, and obtaining a second distance between the robot and the closest interval in its traveling direction from the second image; determining a first travel distance of the robot according to the first distance, the second distance, a first length of the target line segment in the travel direction, and a second length of the interval in the travel direction; Obtaining a second difference between a second travel distance and the first travel distance, wherein the second travel distance is obtained by a sensor on the robot; comparing a second sum value with the second difference, wherein the second sum value is the sum of the first length and the second length, to determine whether a missed interval is detected; if a missed interval is detected, correcting the second travel distance using a first parameter, a first length, a second length, and a first travel distance, wherein the first parameter is obtained by rounding off a ratio of a third difference value to the second sum value, and the third difference is the difference between the second difference and the second sum value; The first positioning information of the robot in its traveling direction is obtained according to the corrected second traveling distance.
2. The visual line patrol positioning method according to claim 1, characterized in that: The step of determining the first travel distance of the robot according to the first distance, the second distance, the first length of the target line segment in the travel direction, and the second length of the interval in the travel direction comprises: A first sum of the first distance, the first length, and the second length is obtained, and a difference between the first sum and the second distance is used as the first travel distance.
3. The visual line patrol positioning method according to claim 2, characterized in that: The step of comparing the second sum and the second difference, where the second sum is the sum of the first length and the second length, to determine whether an interval is missed includes: determining whether the second difference is less than the second sum of the first length and the second length; if so, no missed interval occurs; if not, a missed interval occurs; The method further includes: if no missed detection interval occurs, correcting the value of the second travel distance to the first travel distance; The correcting the second travel distance by using the first parameter, the first length, the second length and the first travel distance includes: correcting the second travel distance to the sum of the product of the second sum value and the first parameter and the first travel distance.
4. The visual line patrol positioning method according to claim 1, characterized in that: In the traveling direction, each of the intervals has a first side away from a traveling starting point, and the steps of obtaining a first distance between the robot and the interval closest to it in the traveling direction from the first image, and obtaining a second distance between the robot and the interval closest to it in the traveling direction from the second image, include: obtaining a first position of the robot in the first image, and obtaining a first distance between the first position and the first side closest to the first position in the traveling direction; and, A second position of the robot in the second image is obtained, and a second distance between the second position and the first side closest to the second position in the traveling direction is obtained.
5. The visual line patrol positioning method according to claim 1, characterized in that: The first image and the second image each contain at least one mark, and after the step of acquiring the first image and the second image acquired by the image acquisition device at a predetermined interval, the method further includes: obtaining a first relative distance between the robot and the marker from the first image, and obtaining a second relative distance between the robot and the marker from the second image; Obtaining a third travel distance of the robot in its travel direction according to the first relative distance and the second relative distance; The second positioning information of the robot in the traveling direction is obtained by using the third traveling distance.
6. The visual line patrol positioning method according to claim 5, characterized in that: The step of obtaining second positioning information of the robot in its traveling direction by using the third traveling distance comprises: In response to the difference between the third travel distance and the second travel distance obtained by the sensor on the robot being greater than or equal to a first preset threshold, the value of the second travel distance is corrected to the third travel distance, and the second positioning information of the robot in its travel direction is obtained based on the corrected second travel distance.
7. The visual line patrol positioning method according to claim 6, characterized in that: Before the steps of obtaining a first distance between the robot and the closest interval in its traveling direction from the first image, and obtaining a second distance between the robot and the closest interval in its traveling direction from the second image, the method further comprises: Performing initialization processing on the first image to obtain a reference line segment; Tracking the target line segment according to the reference line segment and obtaining third positioning information of the robot perpendicular to the moving direction of the robot; After the step of obtaining the first positioning information of the robot in its traveling direction according to the corrected second traveling distance, and / or the step of obtaining the second positioning information of the robot in its traveling direction by using the third traveling distance, the method further comprises: The final positioning information of the robot is obtained according to the third positioning information and the first positioning information and / or the second positioning information.
8. The visual line patrol positioning method according to claim 7, characterized in that: The step of initializing the first image to obtain a reference line segment comprises: Extracting a plurality of line segments from the preprocessed first image using Hough transform; Obtaining a target line segment set from the plurality of line segments according to a first preset attribute of the line segment; wherein the target line segment set includes at least one reference line segment, and the first preset attribute includes a grayscale of the line segment and a width of the line segment; The reference line segment is extracted from the target line segment set according to a second preset attribute of the line segment; wherein the second preset attribute includes a color of the line segment and a contrast between the line segment and the ground.
9. The visual line patrol positioning method according to claim 7, characterized in that: The step of tracking the target line segment according to the reference line segment and obtaining the third positioning information of the robot perpendicular to the traveling direction of the robot comprises: In response to the attribute similarity between the target line segment in the second image and the reference line segment being less than a second preset threshold, obtaining first position information of the reference line segment; Obtaining second position information of the target line segment in the second image according to the first position information; The third positioning information of the robot perpendicular to the moving direction of the robot is obtained according to the second position information.
10. The visual line patrol positioning method according to claim 7, characterized in that: The step of tracking the target line segment according to the reference line segment further includes: In response to the attribute similarity between the target line segment in the second image and the reference line segment being greater than or equal to a second preset threshold, expanding the search range of the second image according to the position of the target line segment in the first image until the target line segment in the second image is successfully tracked; In response to failure to track the target line segment in the second image after expanding the search range of the second image according to the position of the target line segment in the first image, performing a full-area search on the second image until the target line segment in the second image is successfully tracked; In response to failure to track the target line segment in the second image after performing a full-area search on the second image, it is determined that tracking of the target line segment in the second image has failed.
11. A visual line patrol positioning system, characterized in that: It comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the visual line patrol positioning method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is used to implement the visual line patrol positioning method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Target tracking method, target tracking system and first electronic device
CN106682572A
Vision-based AGV patrolling navigation and positioning method
CN107121981A
