Positioning method, device, computer equipment and storage medium

By performing road sign image detection and straight line screening on the images to be detected on mobile devices, accurate positioning of mobile devices is achieved, solving the problem of high hardware requirements of traditional positioning methods, and improving positioning efficiency and accuracy.

CN114494330BActive Publication Date: 2024-10-11SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011162437.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-27
Publication Date
2024-10-11
Estimated Expiration
2040-10-27

AI Technical Summary

Technical Problem

Traditional mobile device positioning methods have high hardware requirements and are difficult to reduce hardware cost and complexity.

Method used

By performing road sign image detection on the image to be detected, the straight lines in the straight line image are screened, mapped to the preset odometer coordinate system, detected and filtered, and the road sign straight lines are obtained, which can be used to correct the pose of the mobile device to achieve accurate positioning.

Benefits of technology

It reduces the hardware requirements for mobile device positioning, improves positioning accuracy and efficiency, and reduces dependence on high-performance hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494330B_ABST
    Figure CN114494330B_ABST
Patent Text Reader

Abstract

The present application relates to a positioning method, device, computer equipment and storage medium. The method comprises: obtaining an image to be detected, performing landmark image detection on the image to be detected; when a straight line image is detected on the image to be detected, color screening the straight lines in the straight line image to obtain the screened candidate straight lines; mapping the candidate straight lines to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight lines in the preset odometer coordinate system; detecting and filtering the candidate straight lines according to the straight line parameters to obtain the landmark straight lines; determining the straight line relocation information according to the straight line parameters of the landmark straight lines; and correcting the mobile device posture according to the straight line relocation information. The present method can realize accurate mobile device positioning by processing the image to be detected, thereby reducing the hardware requirements for mobile device positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a positioning method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of computer technology, mobile devices have emerged, such as mobile robots and mobile devices, which can be applied in many fields. For example, mobile devices can be used as an automatic handling tool and play an important role in logistics transfer yards.

[0003] In traditional technology, when using a mobile device, it is necessary to locate the mobile device. Traditional mobile device positioning methods include laser positioning, electromagnetic guidance positioning, optical guidance positioning, etc.

[0004] However, traditional mobile device positioning methods all have the problem of high hardware requirements. Summary of the invention

[0005] Based on this, it is necessary to provide a positioning method, device, computer equipment and storage medium that can reduce the hardware requirements for positioning a mobile device in response to the above technical problems.

[0006] A positioning method, the method comprising:

[0007] Acquire an image to be detected, and perform road sign image detection on the image to be detected;

[0008] When a straight line image is detected on the image to be detected, the straight lines in the straight line image are color screened to obtain screened candidate straight lines;

[0009] Mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0010] According to the straight line parameters, the candidate straight lines are detected and filtered out to obtain the road sign straight line;

[0011] Determine straight line relocation information according to straight line parameters of the road sign straight line;

[0012] Correct the mobile device’s posture based on the straight line repositioning information.

[0013] In one embodiment, it further includes:

[0014] Obtain a preset number of target images and record the odometer pose each time the target image is obtained;

[0015] Determine the position and posture of the image acquisition device each time the target image is acquired according to the target image and the preset internal parameters of the image acquisition device;

[0016] According to the odometer posture and the image acquisition device posture, a posture conversion parameter between a preset image acquisition device coordinate system and a preset odometer coordinate system is obtained;

[0017] The candidate straight line is mapped to the preset odometer coordinate system, and the straight line parameters of the candidate straight line in the preset odometer coordinate system include:

[0018] The candidate straight line is mapped to the preset odometer coordinate system according to the posture conversion parameters to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system.

[0019] In one embodiment, when the road sign image is a straight line image, the straight lines in the straight line image are color screened, and the screened candidate straight lines include:

[0020] When the road sign image is a straight line image, a mask image corresponding to the straight line image is obtained according to the preset lane line color;

[0021] Annotating the mask image according to the straight lines in the straight line image to obtain an annotated mask image;

[0022] According to the annotated mask image, the screened candidate straight lines are obtained.

[0023] In one embodiment, mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system includes:

[0024] Obtain the pixel coordinates of the candidate straight line in the straight line image;

[0025] According to the pixel coordinates and the internal parameters of the preset image acquisition device, the candidate straight line is mapped to the preset image acquisition device coordinate system to obtain the endpoint coordinates of the candidate straight line in the preset image acquisition device coordinate system;

[0026] According to the endpoint coordinates and the preset posture conversion parameters, the line parameters of the candidate line in the preset odometer coordinate system are obtained.

[0027] In one embodiment, detecting and filtering candidate straight lines according to straight line parameters to obtain a road sign straight line includes:

[0028] Perform a first screening of candidate straight lines according to straight line parameters and a preset lane line length threshold to obtain a screened target straight line set;

[0029] According to the straight line parameters, the straight line width between every two target straight lines in the target straight line set is calculated, and each target straight line in the target straight line set is screened for the second time according to the straight line width and the preset lane line width threshold to obtain a screened target straight line group set;

[0030] Parallel detection is performed on each target straight line group in the target straight line group set to obtain a landmark straight line.

[0031] In one embodiment, determining the straight line relocation information according to the straight line parameters of the road sign straight line includes:

[0032] According to the straight line parameters of the road sign straight line, the road sign straight line is matched with a preset lane line in the world coordinate system to obtain a matching lane line corresponding to the road sign straight line;

[0033] Calculate the attitude angle of the mobile device based on the road sign straight line and the matching lane line;

[0034] According to the attitude angle and the preset projection relationship, the straight line repositioning information is obtained.

[0035] In one embodiment, it further includes:

[0036] When a preset identification image is detected on the image to be detected, obtaining first position information of the preset identification image in the world coordinate system;

[0037] Determine the second pose information of the image acquisition device in the world coordinate system according to the first pose information and the preset internal parameters of the image acquisition device;

[0038] Obtaining identification image relocation information according to the second posture information and preset posture conversion parameters;

[0039] According to the identification image repositioning information, the position and posture of the mobile device are corrected.

[0040] In one embodiment, it further includes:

[0041] When no road sign image is detected on the image to be detected, the current odometer increment information is obtained;

[0042] Correct the mobile device's position and posture based on the current odometer increment information.

[0043] A positioning device, comprising:

[0044] An acquisition module is used to acquire an image to be detected and perform road sign image detection on the image to be detected;

[0045] A color screening module is used to screen the straight lines in the straight line image by color when a straight line image is detected on the image to be detected, so as to obtain the screened candidate straight lines;

[0046] A mapping module, used to map the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0047] A detection and filtering module is used to detect and filter the candidate straight lines according to the straight line parameters to obtain the road sign straight line;

[0048] A positioning module, used for determining straight line repositioning information according to straight line parameters of the road sign straight line;

[0049] The correction module is used to correct the posture of the mobile device according to the straight line repositioning information.

[0050] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0051] Acquire an image to be detected, and perform road sign image detection on the image to be detected;

[0052] When a straight line image is detected on the image to be detected, the straight lines in the straight line image are color screened to obtain screened candidate straight lines;

[0053] Mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0054] According to the straight line parameters, the candidate straight lines are detected and filtered out to obtain the road sign straight line;

[0055] Determine straight line relocation information according to straight line parameters of the road sign straight line;

[0056] Correct the mobile device’s posture based on the straight line repositioning information.

[0057] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0058] Acquire an image to be detected, and perform road sign image detection on the image to be detected;

[0059] When a straight line image is detected on the image to be detected, the straight lines in the straight line image are color screened to obtain screened candidate straight lines;

[0060] Mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0061] According to the straight line parameters, the candidate straight lines are detected and filtered out to obtain the road sign straight line;

[0062] Determine straight line relocation information according to straight line parameters of the road sign straight line;

[0063] Correct the mobile device’s posture based on the straight line repositioning information.

[0064] The above-mentioned positioning method, device, computer equipment and storage medium perform landmark image detection on the image to be detected. When a straight line image is detected on the image to be detected, the straight lines in the straight line image are firstly color-filtered to select candidate straight lines that meet the color requirements, and then the candidate straight lines are mapped to a preset odometer coordinate system. The candidate straight lines are detected and filtered according to the straight line parameters of the candidate straight lines in the preset odometer coordinate system, and the landmark straight lines that can represent the landmarks are selected, so that accurate straight line repositioning information can be obtained according to the straight line parameters of the landmark straight line. According to the straight line repositioning information, the posture of the mobile device is corrected to achieve accurate positioning. In the whole process, accurate mobile device positioning can be achieved by processing the image to be detected, which reduces the hardware requirements for mobile device positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 A diagram of an application environment of a positioning method in an embodiment;

[0066] Figure 2 is a flow chart of a positioning method in one embodiment;

[0067] Figure 3 is a schematic diagram of a positioning method in an embodiment;

[0068] Figure 4 is a flow chart of a positioning method in another embodiment;

[0069] Figure 5 is a structural block diagram of a positioning device in an embodiment;

[0070] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0072] The positioning method provided in this application can be applied to Figure 1In the application environment shown. Among them, the image acquisition device 102 and the odometer 104 set on the mobile device 10 communicate with the processor 106 through the network. The processor 106 obtains the image to be detected through the image acquisition device 102, performs landmark image detection on the image to be detected, and when a straight line image is detected on the image to be detected, the straight line in the straight line image is color-filtered to obtain the filtered candidate straight line, and the candidate straight line is mapped to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system, and the candidate straight line is detected and filtered according to the straight line parameters to obtain the landmark straight line, and the straight line relocation information is determined according to the straight line parameters of the landmark straight line, and the mobile device posture is corrected according to the straight line relocation information.

[0073] In one embodiment, Figure 2 As shown, a positioning method is provided, which is applied to Figure 1 Taking the processor on the mobile device in FIG. 1 as an example, the method includes the following steps:

[0074] Step 202: Acquire the image to be detected, and perform road sign image detection on the image to be detected.

[0075] The image to be detected refers to an image captured by an image acquisition device provided on a mobile device. For example, the mobile device may specifically refer to an automatic guided vehicle, and the image acquisition device may specifically refer to an image acquisition device provided on the automatic guided vehicle, and the image to be detected may specifically refer to an image of the site captured by the image acquisition device provided on the automatic guided vehicle. A road sign image refers to an image that can be used as a road sign. For example, a road sign image may specifically refer to a straight line image representing a lane line. For another example, a road sign image may specifically refer to a preset identification image. Furthermore, a preset identification image may specifically refer to a QR code image.

[0076] Specifically, the processor acquires the image to be detected taken by the image acquisition device, performs road sign image detection on the image to be detected, and detects whether there is a road sign image on the image to be detected. The method of performing road sign image detection is not limited in this embodiment. For example, road sign image detection can be implemented by calling open source code. For example, the open source ARUCO in OpenCV can be used to perform preset logo image detection. For another example, LSD in OpenCV can be used to perform straight line image detection.

[0077] Step 204 , when a straight line image is detected on the image to be detected, color screening is performed on the straight lines in the straight line image to obtain screened candidate straight lines.

[0078] Specifically, when a straight line image is detected on the image to be detected, the processor will perform color screening on the straight lines in the straight line image to screen out candidate straight lines that meet the color requirements. Among them, meeting the color requirements means that the area indicated by the two straight lines is the same color as the preset lane line. For example, when the preset lane line is yellow, meeting the color requirements means that the area indicated by the two straight lines is yellow.

[0079] Step 206 , mapping the candidate straight line to a preset odometer coordinate system, and obtaining the straight line parameters of the candidate straight line in the preset odometer coordinate system.

[0080] The preset odometer coordinate system refers to a coordinate system based on the odometer. The line parameter is used to characterize the properties of the candidate line. For example, the line parameter may specifically refer to the endpoint coordinates.

[0081] Specifically, the server determines the pixel coordinates of the candidate straight line in the straight line image, performs coordinate transformation on the candidate straight line according to the pixel coordinates, and obtains the straight line parameters of the candidate straight line in a preset odometer coordinate system.

[0082] Step 208, detecting and filtering out candidate straight lines according to straight line parameters to obtain road sign straight lines.

[0083] Among them, detection and filtering refers to detecting whether the length of the straight line, the width between each two straight lines meet the requirements, and whether each two straight lines that meet the length and width requirements are parallel, and filtering the straight lines based on the detection results. Road sign straight lines refer to the straight line group obtained after detection and filtering, which corresponds to the actual lane line.

[0084] Specifically, the processor will first perform length detection and filtering on the candidate straight lines according to the straight line parameters, filter out the straight lines that do not meet the length requirements, then calculate the width between every two straight lines that meet the length requirements, and screen out multiple groups of straight lines that meet the width requirements. Finally, the processor will detect whether each group of straight lines in the multiple groups are parallel, and obtain a group of straight lines that meet the length, width and parallel requirements as the road sign straight line.

[0085] Step 210, determining the straight line relocation information according to the straight line parameters of the road sign straight line.

[0086] The straight line relocation information refers to the odometer positioning information calculated based on the straight line image.

[0087] Specifically, after obtaining the road sign straight line, the processor will match the road sign straight line with the preset lane line in the world coordinate system according to the straight line parameters of the road sign straight line, determine the matching lane line corresponding to the road sign straight line, and calculate the straight line repositioning information based on the road sign straight line and the matching lane line.

[0088] Step 212, correcting the posture of the mobile device according to the straight line repositioning information.

[0089] Specifically, the processor will directly correct the odometer posture according to the straight line repositioning information, accumulate the corrected odometer posture to the pre-recorded mobile device posture at the previous moment, update the mobile device posture, and obtain a new mobile device posture.

[0090] The above positioning method performs landmark image detection on the image to be detected. When a straight line image is detected on the image to be detected, the straight lines in the straight line image are firstly color-filtered to select candidate straight lines that meet the color requirements, and then the candidate straight lines are mapped to a preset odometer coordinate system. The candidate straight lines are detected and filtered according to their line parameters in the preset odometer coordinate system, and landmark straight lines that can represent landmarks are selected. Therefore, accurate straight line repositioning information can be obtained based on the line parameters of the landmark straight line. Based on the straight line repositioning information, the posture of the mobile device is corrected to achieve accurate positioning. In the whole process, accurate mobile device positioning can be achieved by processing the image to be detected, thereby reducing the hardware requirements for mobile device positioning.

[0091] In one embodiment, the positioning method further includes:

[0092] Obtain a preset number of target images and record the odometer pose each time the target image is obtained;

[0093] Determine the position and posture of the image acquisition device each time the target image is acquired according to the target image and the preset internal parameters of the image acquisition device;

[0094] According to the odometer posture and the image acquisition device posture, a posture conversion parameter between a preset image acquisition device coordinate system and a preset odometer coordinate system is obtained;

[0095] The candidate straight line is mapped to the preset odometer coordinate system, and the straight line parameters of the candidate straight line in the preset odometer coordinate system include:

[0096] The candidate straight line is mapped to the preset odometer coordinate system according to the posture conversion parameters to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system.

[0097] Among them, the preset number can be set as needed, and the target image refers to a pre-set road sign image. For example, the target image can specifically refer to a preset identification image. Further, the preset identification image here can specifically refer to a QR code image. The odometer pose refers to the pose of the odometer in the preset odometer coordinate system. The preset image acquisition device internal parameters refer to the image acquisition device parameters set when the image acquisition device is calibrated in advance, which are used to characterize the correspondence between the image acquisition device and the image taken by the image acquisition device. The image acquisition device internal parameters can eliminate distortion and determine the projection relationship, and realize the conversion between the pixel coordinates of the image and the coordinate points of the preset image acquisition device coordinate system. The preset image acquisition device coordinate system refers to the coordinate system with the image acquisition device as a reference. The image acquisition device pose refers to the pose of the image acquisition device in the world coordinate system. The pose conversion parameter is used to characterize the conversion relationship between the point in the image acquisition device coordinate system and the point in the odometer coordinate system. For example, the pose conversion parameter can specifically refer to the conversion matrix that characterizes the conversion relationship between the point in the image acquisition device coordinate system and the point in the odometer coordinate system.

[0098] Specifically, the processor will first control the mobile device to move around the target image so that the image acquisition device set on the mobile device and communicating with the processor can observe the target image, and when observing the target image, the odometer position and posture when each target image is acquired are recorded by the odometer set on the mobile device and communicating with the processor, and then the image acquisition device position and posture when each target image is acquired are determined according to the position of the target image in the world coordinate system and the preset internal parameters of the image acquisition device, and finally, the position and posture conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system are obtained according to the odometer position and the image acquisition device position. After obtaining the position and posture conversion parameters, the processor will map the candidate straight line to the preset odometer coordinate system according to the position and posture conversion parameters, and obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system. Among them, because the target image refers to a pre-set road sign image, its coordinate position in the world coordinate system can be directly obtained, so that the image acquisition device position and posture when each target image is acquired can be determined according to the coordinate position of the target image in the world coordinate system and the preset internal parameters of the image acquisition device.

[0099] For example, according to the odometer pose and the image acquisition device pose, obtaining the pose conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system is actually the process of external parameter calibration. Assume that the odometer pose is [O1, O2...O n ], the image acquisition device posture is [C1,C2...C n ], where n represents the preset number. First, calibrate the roll angle and pitch angle to obtain q yx ,qyx It refers to the rotation matrix corresponding to the roll angle and pitch angle of the image acquisition device. The hand-eye calibration formula can be obtained: Among them refers to the matrix corresponding to the odometer posture, It refers to the matrix corresponding to the image acquisition device posture, which is rewritten as a matrix equation:

[0100] in

[0101] For n poses, we have n-1 motions Among them is the difference between any two poses, so we can get:

[0102] Perform singular value decomposition on T, T = USV T , and finally get q yx =λ1v3+λ2v4, where v3 and v4 are the last two columns of V, and λ1 and λ2 are the first two eigenvalues. q can be calculated yx , and converted to R yx , R yx It refers to q yx The corresponding rotation matrix.

[0103] Recalibrate yaw,t x ,t y :

[0104] Let R(q) be the rotation matrix corresponding to the quaternion q, which is available:

[0105]

[0106] Among them, t C Refers to the displacement of an image acquisition device in motion. It refers to the displacement of the odometer in a motion, where a motion refers to the motion between two pose points, and φ is The corresponding angle change in the odometer coordinate system, α is the yaw angle between the camera coordinate system and the odometer coordinate system. is the x and y offset of the camera in the odometer coordinate system, s j is the scale factor, for The first two elements of .

[0107] After finishing, we get: in

[0108] For n-1>=2, we can solve: R z ,t x ,t y By measuring the height of the image acquisition device from the ground, we can get t z From this we get the pose conversion parameters between the image acquisition device and the odometer

[0109] In this embodiment, by recording the odometer posture each time the target image is acquired, the image acquisition device posture each time the target image is acquired is determined according to the target image and the preset internal parameters of the image acquisition device, and the posture conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system are obtained according to the odometer posture and the image acquisition device posture, thereby realizing the acquisition of the posture conversion parameters.

[0110] In one embodiment, when the road sign image is a straight line image, the straight lines in the straight line image are color screened, and the screened candidate straight lines include:

[0111] When the road sign image is a straight line image, a mask image corresponding to the straight line image is obtained according to the preset lane line color;

[0112] Annotating the mask image according to the straight lines in the straight line image to obtain an annotated mask image;

[0113] According to the annotated mask image, the screened candidate straight lines are obtained.

[0114] The mask is a binary image composed of 0 and 1. In this embodiment, the mask image corresponding to the straight line image refers to a mask image set according to the preset lane line color, in which the color that is the same as the preset lane line color is set to 1, and the color that is different from the preset lane line color is set to 0.

[0115] Specifically, when the road sign image is a straight line image, the processor will obtain a mask image corresponding to the straight line image according to the preset lane line color, mark the straight lines in the straight line image in the mask image, and obtain the marked mask image, and then count the pixel values ​​and the number of pixels between every two straight lines in the straight line image based on the marked mask image, and screen every two straight lines by comparing the pixel values ​​and the number of pixels to obtain the screened candidate straight lines.

[0116] The method for counting the pixel value and the number of pixels between every two straight lines in the straight line image may be: using the endpoints of the straight lines to mark the image area between every two straight lines, and performing statistics based on the connecting lines used for marking. Figure 3As shown, straight line 1 includes endpoints A and B, straight line 2 includes endpoints C and D, and small circles represent pixels. Labeling can be achieved by connecting endpoints A and D and endpoints B and C. Counting the number of pixels between each two straight lines is to count the number of pixels passed by the connecting line for labeling, and the pixel value refers to the sum of the pixel values ​​of the pixels passed by the connecting line for labeling. Because in the mask image, some pixels have a pixel value of 1 and some have a pixel value of 0, so the pixel value obtained by statistics will be less than or equal to the number of pixels. By comparing the pixel value and the number of pixels, when screening each two straight lines, the ratio of the pixel value to the number of pixels will be calculated. When the calculated ratio meets the preset ratio threshold, it can be considered that the color between the corresponding two straight lines meets the requirements and can be used as an alternative straight line. Among them, the preset ratio threshold can be set as needed.

[0117] In this embodiment, a mask image corresponding to a straight line image is obtained according to a preset lane line color, the mask image is annotated according to the straight lines in the straight line image to obtain an annotated mask image, and filtered candidate straight lines are obtained according to the annotated mask image, so that straight line filtering can be achieved according to the preset lane line color.

[0118] In one embodiment, mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system includes:

[0119] Obtain the pixel coordinates of the candidate straight line in the straight line image;

[0120] According to the pixel coordinates and the internal parameters of the preset image acquisition device, the candidate straight line is mapped to the preset image acquisition device coordinate system to obtain the endpoint coordinates of the candidate straight line in the preset image acquisition device coordinate system;

[0121] According to the endpoint coordinates and the preset posture conversion parameters, the line parameters of the candidate line in the preset odometer coordinate system are obtained.

[0122] The pixel coordinates refer to the coordinates of the two endpoints of the candidate straight line in the straight line image. The preset pose conversion parameters refer to the parameters that are calculated before acquiring the image to be detected and characterize the conversion relationship between the points in the image acquisition device coordinate system and the points in the odometer coordinate system. For example, the preset pose conversion parameters may specifically refer to the conversion matrix that characterizes the conversion relationship between the points in the image acquisition device coordinate system and the points in the odometer coordinate system.

[0123] Specifically, the processor will directly obtain the pixel coordinates of the candidate straight line in the straight line image, map the candidate straight line to the preset image acquisition device coordinate system according to the pixel coordinates and the preset internal parameters of the image acquisition device, and obtain the endpoint coordinates of the candidate straight line in the preset image acquisition device coordinate system, and convert the endpoint coordinates to the preset odometer coordinate system according to the endpoint coordinates and the preset posture conversion parameters to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system.

[0124] In this embodiment, by obtaining the pixel coordinates of the alternative straight line in the straight line image, the alternative straight line is mapped to the preset image acquisition device coordinate system according to the pixel coordinates and the preset internal parameters of the image acquisition device, and the endpoint coordinates of the alternative straight line in the preset image acquisition device coordinate system are obtained. According to the endpoint coordinates and the preset posture conversion parameters, the line parameters of the alternative straight line in the preset odometer coordinate system are obtained, thereby achieving the mapping of the alternative straight line.

[0125] In one embodiment, detecting and filtering candidate straight lines according to straight line parameters to obtain a road sign straight line includes:

[0126] Perform a first screening of candidate straight lines according to straight line parameters and a preset lane line length threshold to obtain a screened target straight line set;

[0127] According to the straight line parameters, the straight line width between every two target straight lines in the target straight line set is calculated, and each target straight line in the target straight line set is screened for the second time according to the straight line width and the preset lane line width threshold to obtain a screened target straight line group set;

[0128] Parallel detection is performed on each target straight line group in the target straight line group set to obtain a landmark straight line.

[0129] The preset lane line length threshold refers to the preset shortest lane line length, which can be set as needed. The preset lane line width threshold refers to the preset standard lane line width, which can be set as needed.

[0130] Specifically, the processor will first calculate the line length of each candidate straight line according to the line parameters, perform a first screening of the candidate straight lines by comparing the line length with the preset lane line length threshold, and screen out a set of target straight lines whose line length is greater than or equal to the preset lane line length threshold, and then calculate the line width between every two target straight lines in the target straight line set according to the line parameters, and perform a second screening of each target straight line in the target straight line set by comparing the line width with the preset lane line width threshold, and screen out a target straight line group whose line width is close to the preset lane line width threshold, to obtain a target straight line group set.

[0131] Among them, the straight line width is close to the preset lane line width threshold means that the difference between the straight line width and the preset lane line width threshold is less than the preset width error value, and the preset width error value can be set as needed. After obtaining the target straight line group set, the processor will perform parallel detection on each target straight line group in the target straight line group set, detect mutually parallel target straight line groups, and use the mutually parallel target straight line groups as road sign straight lines. Among them, the method of performing parallel detection on the target straight line group can be specifically: respectively calculate the slopes of two straight lines in the target straight line group, when the slopes of the two straight lines are less than the preset slope error value, it can be considered that the two straight lines in the target straight line group are parallel, wherein the preset slope error value can be set as needed.

[0132] In this embodiment, by detecting and filtering the length, width and parallelism of candidate straight lines according to straight line parameters, a landmark straight line is obtained, thereby enabling the screening of straight lines and the acquisition of landmark straight lines.

[0133] In one embodiment, determining the straight line relocation information according to the straight line parameters of the road sign straight line includes:

[0134] According to the straight line parameters of the road sign straight line, the road sign straight line is matched with a preset lane line in the world coordinate system to obtain a matching lane line corresponding to the road sign straight line;

[0135] Calculate the attitude angle of the mobile device based on the road sign straight line and the matching lane line;

[0136] According to the attitude angle and the preset projection relationship, the straight line repositioning information is obtained.

[0137] The preset lane line refers to the actual lane line that has been preset in the world coordinate system. The attitude angle of the mobile device in this embodiment refers to the yaw angle. The preset projection relationship refers to the relationship that is preset based on the projection relationship between the world coordinate system and the preset odometer coordinate system.

[0138] Specifically, the processor will map the road sign line to the world coordinate system based on the line parameters of the road sign line and the pre-set conversion parameters between the preset odometer coordinate system and the world coordinate system, and then match the road sign line mapped to the world coordinate system with the preset lane line in the world coordinate system to obtain the matching lane line corresponding to the road sign line, that is, the actual lane line in the world coordinate system that matches the road sign line in the preset odometer coordinate system. After obtaining the matching lane line corresponding to the road sign line, the processor will calculate the attitude angle of the mobile device based on the first endpoint coordinate of the road sign line and the second endpoint coordinate corresponding to the first endpoint coordinate on the matching lane line, and then bring the attitude angle, the first endpoint coordinate and the second endpoint coordinate into the preset projection relationship, and obtain the line relocation information by solving the matrix equation.

[0139] For example, for a road sign line, if the coordinates of its first endpoint in the preset odometer coordinate system are (where l1…l n Indicates that there are n road sign lines). By matching, we can know that the actual position of the road sign line in the world coordinate system is For each road sign straight line, there is Here Refers to the coordinates corresponding to the road sign line, where odom represents the preset odometer coordinate system and world represents the world coordinate system. The yaw angle of the mobile device can be obtained: in It refers to the yaw angle calculated based on the coordinates of the second endpoint. It refers to the yaw angle calculated based on the coordinates of the first endpoint. The preset projection relationship obtained based on the projection relationship is:

[0140] Among them, F refers to the direction vector of the landmark line, which can be calculated by the coordinates of the first endpoint, θ refers to the yaw angle of the mobile device, and x and y refer to the required straight line repositioning information. It should be noted that when there are multiple landmark lines, θ here refers to the average value of the yaw angle of the mobile device calculated based on multiple lines. The above preset projection relationship can obtain a unique solution for n≥2 non-parallel lines, otherwise multiple solutions can be obtained, and the current position needs to be projected onto the obtained straight line constraint.

[0141] In this embodiment, the road sign straight line is matched with the preset lane line in the world coordinate system according to the straight line parameters of the road sign straight line to obtain the matching lane line corresponding to the road sign straight line. The attitude angle of the mobile device is calculated according to the road sign straight line and the matching lane line. The straight line repositioning information is obtained according to the attitude angle and the preset projection relationship, thereby realizing the acquisition of the straight line repositioning information.

[0142] In one embodiment, it further includes:

[0143] When a preset identification image is detected on the image to be detected, obtaining first position information of the preset identification image in the world coordinate system;

[0144] Determine the second pose information of the image acquisition device in the world coordinate system according to the first pose information and the preset internal parameters of the image acquisition device;

[0145] Obtaining identification image relocation information according to the second posture information and preset posture conversion parameters;

[0146] According to the identification image repositioning information, the position and posture of the mobile device are corrected.

[0147] The identification image relocation information refers to the odometer relocation information obtained by using a preset identification image.

[0148] Specifically, the preset identification image is pre-set in the world coordinate system. When the preset identification image is detected on the image to be detected, the processor will query the preset database according to the preset identification image, obtain the first pose information of the preset identification image in the world coordinate system from the preset database, determine the second pose information of the image acquisition device in the world coordinate system according to the first pose information and the internal parameters of the preset image acquisition device, obtain the identification image repositioning information according to the second pose information and the preset pose conversion parameters, and correct the mobile device posture according to the identification image repositioning information.

[0149] Among them, the corresponding relationship between the preset identification image and its posture information in the world coordinate system is stored in the preset database. The processor can obtain the corresponding first posture information through the preset database as long as it queries according to the preset identification image. Furthermore, if the preset identification image and the straight line image are detected on the image to be detected at the same time, the processor will preferably reposition according to the preset identification image, suspend the thread of repositioning according to the straight line image, and directly use the identification image repositioning information obtained by repositioning the preset identification image to correct the posture of the mobile device.

[0150] Among them, correcting the mobile device posture according to the identification image repositioning information includes: correcting the odometer posture according to the identification image repositioning information, accumulating the corrected odometer posture to the pre-recorded mobile device posture at the previous moment, updating the mobile device posture, and obtaining a new mobile device posture.

[0151] In this embodiment, by using a preset identification image to obtain identification image repositioning information, the posture of the mobile device is corrected according to the identification image repositioning information, and the preset identification image can be used to achieve posture correction.

[0152] In one embodiment, it further includes:

[0153] When no road sign image is detected on the image to be detected, the current odometer increment information is obtained;

[0154] Correct the mobile device's position and posture based on the current odometer increment information.

[0155] Among them, the current odometer increment information can be directly obtained through the odometer.

[0156] Specifically, when no road sign image is detected on the image to be detected, the processor obtains the current odometer increment information, accumulates the current odometer increment information to the posture of the mobile device at the last moment, and corrects the posture of the mobile device.

[0157] In this embodiment, when no road sign image is detected on the image to be detected, the current odometer increment information is obtained, and the posture of the mobile device is corrected according to the current odometer increment information, so that the posture correction can be achieved according to the current odometer increment information.

[0158] In one embodiment, Figure 4 As shown, a flow chart is provided to illustrate the positioning method of the present application.

[0159] like Figure 4 As shown, the positioning method of the present application includes two threads, thread 1 is used to obtain the camera image (i.e., the image to be detected), perform landmark image detection on the image to be detected, and thread 2 is used to obtain the odom increment (i.e., the current odometer increment information). For thread 1, it also includes two sub-threads, among which sub-thread 1 is mainly lane line detection and lane line matching. When the lane line matching is successful, the camera pose in the camera coordinate system (i.e., the image acquisition device coordinate system) and the AGV (Automated Guided Vehicle) pose in the odometer coordinate system are further calculated, and then the visual repositioning information is output, the odometer pose is corrected according to the visual repositioning information, and then the AGV pose is corrected according to the corrected odometer pose (i.e., when a straight line image is detected on the image to be detected, the straight lines in the straight line image are color-filtered to obtain the filtered candidate straight lines, the candidate straight lines are mapped to the preset odometer coordinate system, the line parameters of the candidate straight lines in the preset odometer coordinate system are obtained, the candidate straight lines are detected and filtered according to the line parameters to obtain the road sign straight line, the line repositioning information is determined according to the line parameters of the road sign straight line, and the mobile device pose is corrected according to the line repositioning information). Sub-thread 2 is mainly for QR code detection and QR code matching. When the QR code is matched successfully, the camera pose in the camera coordinate system and the AGV pose in the odometer coordinate system are further calculated, and then the visual repositioning information is output. The odometer pose is corrected according to the visual repositioning information, and then the AGV pose is corrected according to the corrected odometer pose (that is, when a preset identification image is detected, the first pose information of the preset identification image in the world coordinate system is obtained, and the second pose information of the image acquisition device in the world coordinate system is determined according to the first pose information and the internal parameters of the preset image acquisition device. According to the second pose information and the preset pose conversion parameters, the identification image repositioning information is obtained, and the mobile device pose is corrected according to the identification image repositioning information).

[0160] It should be understood that although Figure 2 and Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 4 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0161] In one embodiment, Figure 5 As shown, a positioning device is provided, including: an acquisition module 502, a color screening module 504, a mapping module 506, a detection and filtering module 508, a positioning module 510 and a correction module 512, wherein:

[0162] An acquisition module 502 is used to acquire an image to be detected and perform road sign image detection on the image to be detected;

[0163] A color screening module 504 is used to screen the straight lines in the straight line image to obtain the screened candidate straight lines when the straight line image is detected on the image to be detected;

[0164] A mapping module 506 is used to map the candidate straight line to a preset odometer coordinate system to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0165] A detection and filtering module 508 is used to detect and filter the candidate straight lines according to the straight line parameters to obtain the road sign straight line;

[0166] A positioning module 510, for determining straight line repositioning information according to straight line parameters of the road sign straight line;

[0167] The correction module 512 is used to correct the posture of the mobile device according to the straight line repositioning information.

[0168] The above-mentioned positioning device performs landmark image detection on the image to be detected. When a straight line image is detected on the image to be detected, it first performs color screening on the straight lines in the straight line image to screen out candidate straight lines that meet the color requirements, and then maps the candidate straight lines to a preset odometer coordinate system. The candidate straight lines are detected and filtered out according to their straight line parameters in the preset odometer coordinate system, and landmark straight lines that can represent landmarks are screened out. Therefore, accurate straight line repositioning information can be obtained based on the straight line parameters of the landmark straight line. Based on the straight line repositioning information, the posture of the mobile device is corrected to achieve accurate positioning. In the whole process, accurate mobile device positioning can be achieved by processing the image to be detected, thereby reducing the hardware requirements for mobile device positioning.

[0169] In one embodiment, the positioning device also includes a parameter calibration module, which is used to obtain a preset number of target images and record the odometer posture each time the target image is obtained, determine the image acquisition device posture each time the target image is obtained based on the target image and the preset internal parameters of the image acquisition device, and obtain the posture conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system based on the odometer posture and the image acquisition device posture.

[0170] In one embodiment, the mapping module is further used to map the candidate straight line to a preset odometer coordinate system according to the posture conversion parameters to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system.

[0171] In one embodiment, the color screening module is also used to obtain a mask image corresponding to the straight line image according to a preset lane line color when the road sign image is a straight line image, annotate the mask image according to the straight lines in the straight line image to obtain the annotated mask image, and obtain the screened candidate straight lines according to the annotated mask image.

[0172] In one embodiment, the mapping module is also used to obtain the pixel coordinates of the alternative straight line in the straight line image, map the alternative straight line to the preset image acquisition device coordinate system according to the pixel coordinates and the preset internal parameters of the image acquisition device, obtain the endpoint coordinates of the alternative straight line in the preset image acquisition device coordinate system, and obtain the straight line parameters of the alternative straight line in the preset odometer coordinate system according to the endpoint coordinates and the preset posture transformation parameters.

[0173] In one embodiment, the detection and filtering module is also used to perform a first screening of candidate straight lines according to straight line parameters and a preset lane line length threshold to obtain a screened target straight line set, calculate the straight line width between every two target straight lines in the target straight line set according to the straight line parameters, perform a second screening of each target straight line in the target straight line set according to the straight line width and a preset lane line width threshold to obtain a screened target straight line group set, perform parallel detection on each target straight line group in the target straight line group set to obtain a road sign straight line.

[0174] In one embodiment, the positioning module is also used to match the road sign line with a preset lane line in the world coordinate system according to the straight line parameters of the road sign line to obtain a matching lane line corresponding to the road sign line, calculate the attitude angle of the mobile device according to the road sign line and the matching lane line, and obtain the straight line repositioning information according to the attitude angle and the preset projection relationship.

[0175] In one embodiment, the positioning device also includes a QR code positioning module, which is used to obtain the first pose information of the preset identification image in the world coordinate system when a preset identification image is detected, determine the second pose information of the image acquisition device in the world coordinate system based on the first pose information and the internal parameters of the preset image acquisition device, obtain the identification image repositioning information based on the second pose information and the preset pose conversion parameters, and correct the mobile device posture based on the identification image repositioning information.

[0176] In one embodiment, the positioning device further includes an incremental positioning module, which is used to obtain current odometer increment information when no road sign image is detected on the image to be detected, and to correct the position and posture of the mobile device according to the current odometer increment information.

[0177] For the specific definition of the positioning device, please refer to the definition of the positioning method above, which will not be repeated here. Each module in the above positioning device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0178] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding relationship between the preset identification image and its posture information in the world coordinate system. The network interface of the computer device is used to communicate with an image acquisition device and an odometer through a network connection. When the computer program is executed by the processor, a positioning method is implemented.

[0179] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0180] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0181] Acquire an image to be detected, and perform road sign image detection on the image to be detected;

[0182] When a straight line image is detected on the image to be detected, the straight lines in the straight line image are color screened to obtain screened candidate straight lines;

[0183] Mapping the candidate straight line to a preset odometer coordinate system to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0184] According to the straight line parameters, the candidate straight lines are detected and filtered out to obtain the road sign straight line;

[0185] Determine straight line relocation information according to straight line parameters of the road sign straight line;

[0186] Correct the mobile device’s posture based on the straight line repositioning information.

[0187] In one embodiment, when the processor executes the computer program, the following steps are also implemented: acquiring a preset number of target images and recording the odometer posture each time the target image is acquired; determining the posture of the image acquisition device each time the target image is acquired based on the target image and the preset internal parameters of the image acquisition device; and obtaining the posture conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system based on the odometer posture and the image acquisition device posture.

[0188] In one embodiment, the processor further implements the following steps when executing the computer program: when the road sign image is a straight line image, obtaining a mask image corresponding to the straight line image according to a preset lane line color; annotating the mask image according to the straight lines in the straight line image to obtain an annotated mask image; and obtaining filtered candidate straight lines according to the annotated mask image.

[0189] In one embodiment, when the processor executes the computer program, it also implements the following steps: obtaining the pixel coordinates of the alternative straight line in the straight line image; mapping the alternative straight line to the preset image acquisition device coordinate system based on the pixel coordinates and the preset internal parameters of the image acquisition device, and obtaining the endpoint coordinates of the alternative straight line in the preset image acquisition device coordinate system; obtaining the straight line parameters of the alternative straight line in the preset odometer coordinate system based on the endpoint coordinates and the preset posture conversion parameters.

[0190] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the candidate straight lines are first screened according to the straight line parameters and the preset lane line length threshold to obtain a screened target straight line set; the straight line width between every two target straight lines in the target straight line set is calculated according to the straight line parameters, and each target straight line in the target straight line set is secondly screened according to the straight line width and the preset lane line width threshold to obtain a screened target straight line group set; each target straight line group in the target straight line group set is parallelly detected to obtain a road sign straight line.

[0191] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the straight line parameters of the road sign straight line, the road sign straight line is matched with the preset lane line in the world coordinate system to obtain the matching lane line corresponding to the road sign straight line; according to the road sign straight line and the matching lane line, the attitude angle of the mobile device is calculated; according to the attitude angle and the preset projection relationship, the straight line repositioning information is obtained.

[0192] In one embodiment, the processor further implements the following steps when executing the computer program: when a preset identification image is detected, obtaining the first pose information of the preset identification image in the world coordinate system; determining the second pose information of the image acquisition device in the world coordinate system based on the first pose information and the internal parameters of the preset image acquisition device; obtaining the identification image repositioning information based on the second pose information and the preset pose conversion parameters; and correcting the mobile device pose based on the identification image repositioning information.

[0193] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when no road sign image is detected on the image to be detected, current odometer increment information is obtained; and according to the current odometer increment information, the posture of the mobile device is corrected.

[0194] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0195] Acquire an image to be detected, and perform road sign image detection on the image to be detected;

[0196] When a straight line image is detected on the image to be detected, the straight lines in the straight line image are color screened to obtain screened candidate straight lines;

[0197] Mapping the candidate straight line to a preset odometer coordinate system to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0198] According to the straight line parameters, the candidate straight lines are detected and filtered out to obtain the road sign straight line;

[0199] Determine straight line relocation information according to straight line parameters of the road sign straight line;

[0200] Correct the mobile device’s posture based on the straight line repositioning information.

[0201] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: acquiring a preset number of target images and recording the odometer posture each time the target image is acquired; determining the posture of the image acquisition device each time the target image is acquired based on the target image and the preset internal parameters of the image acquisition device; and obtaining the posture conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system based on the odometer posture and the image acquisition device posture.

[0202] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the road sign image is a straight line image, a mask image corresponding to the straight line image is obtained according to a preset lane line color; the mask image is annotated according to the straight lines in the straight line image to obtain an annotated mask image; and based on the annotated mask image, a screened candidate straight line is obtained.

[0203] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the pixel coordinates of the alternative straight line in the straight line image; mapping the alternative straight line to the preset image acquisition device coordinate system based on the pixel coordinates and the preset internal parameters of the image acquisition device, and obtaining the endpoint coordinates of the alternative straight line in the preset image acquisition device coordinate system; obtaining the straight line parameters of the alternative straight line in the preset odometer coordinate system based on the endpoint coordinates and the preset posture conversion parameters.

[0204] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the candidate straight lines are first screened according to the straight line parameters and the preset lane line length threshold to obtain a screened target straight line set; the straight line width between every two target straight lines in the target straight line set is calculated according to the straight line parameters, and each target straight line in the target straight line set is secondly screened according to the straight line width and the preset lane line width threshold to obtain a screened target straight line group set; each target straight line group in the target straight line group set is parallelly detected to obtain a road sign straight line.

[0205] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the straight line parameters of the road sign straight line, the road sign straight line is matched with the preset lane line in the world coordinate system to obtain the matching lane line corresponding to the road sign straight line; according to the road sign straight line and the matching lane line, the attitude angle of the mobile device is calculated; according to the attitude angle and the preset projection relationship, the straight line repositioning information is obtained.

[0206] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when a preset identification image is detected, the first pose information of the preset identification image in the world coordinate system is obtained; based on the first pose information and the internal parameters of the preset image acquisition device, the second pose information of the image acquisition device in the world coordinate system is determined; based on the second pose information and the preset pose conversion parameters, the identification image repositioning information is obtained; and based on the identification image repositioning information, the mobile device posture is corrected.

[0207] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when no road sign image is detected on the image to be detected, current odometer increment information is obtained; and according to the current odometer increment information, the posture of the mobile device is corrected.

[0208] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0209] Acquire an image to be detected, and perform road sign image detection on the image to be detected;

[0210] When a straight line image is detected on the image to be detected, the straight lines in the straight line image are color screened to obtain screened candidate straight lines;

[0211] Mapping the candidate straight line to a preset odometer coordinate system to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system;

[0212] According to the straight line parameters, the candidate straight lines are detected and filtered out to obtain the road sign straight line;

[0213] Determine straight line relocation information according to straight line parameters of the road sign straight line;

[0214] Correct the mobile device’s posture based on the straight line repositioning information.

[0215] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: acquiring a preset number of target images and recording the odometer posture each time the target image is acquired; determining the posture of the image acquisition device each time the target image is acquired based on the target image and the preset internal parameters of the image acquisition device; and obtaining the posture conversion parameters between the preset image acquisition device coordinate system and the preset odometer coordinate system based on the odometer posture and the image acquisition device posture.

[0216] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the road sign image is a straight line image, a mask image corresponding to the straight line image is obtained according to a preset lane line color; the mask image is annotated according to the straight lines in the straight line image to obtain an annotated mask image; and based on the annotated mask image, a screened candidate straight line is obtained.

[0217] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the pixel coordinates of the alternative straight line in the straight line image; mapping the alternative straight line to the preset image acquisition device coordinate system based on the pixel coordinates and the preset internal parameters of the image acquisition device, and obtaining the endpoint coordinates of the alternative straight line in the preset image acquisition device coordinate system; obtaining the straight line parameters of the alternative straight line in the preset odometer coordinate system based on the endpoint coordinates and the preset posture conversion parameters.

[0218] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the candidate straight lines are first screened according to the straight line parameters and the preset lane line length threshold to obtain a screened target straight line set; the straight line width between every two target straight lines in the target straight line set is calculated according to the straight line parameters, and each target straight line in the target straight line set is secondly screened according to the straight line width and the preset lane line width threshold to obtain a screened target straight line group set; each target straight line group in the target straight line group set is parallelly detected to obtain a road sign straight line.

[0219] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the straight line parameters of the road sign straight line, the road sign straight line is matched with the preset lane line in the world coordinate system to obtain the matching lane line corresponding to the road sign straight line; according to the road sign straight line and the matching lane line, the attitude angle of the mobile device is calculated; according to the attitude angle and the preset projection relationship, the straight line repositioning information is obtained.

[0220] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when a preset identification image is detected, the first pose information of the preset identification image in the world coordinate system is obtained; based on the first pose information and the internal parameters of the preset image acquisition device, the second pose information of the image acquisition device in the world coordinate system is determined; based on the second pose information and the preset pose conversion parameters, the identification image repositioning information is obtained; and based on the identification image repositioning information, the mobile device posture is corrected.

[0221] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when no road sign image is detected on the image to be detected, current odometer increment information is obtained; and according to the current odometer increment information, the posture of the mobile device is corrected.

[0222] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0223] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0224] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A positioning method, It is characterized in that The method comprises: Acquire an image to be detected, and perform road sign image detection on the image to be detected; When a straight line image is detected on the image to be detected, color screening is performed on the straight lines in the straight line image to obtain screened candidate straight lines; Mapping the candidate straight line to a preset odometer coordinate system to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system; Detect and filter the candidate straight lines according to the straight line parameters to obtain a road sign straight line; Determining straight line relocation information according to straight line parameters of the road sign straight line; The position and posture of the mobile device is corrected according to the straight line repositioning information.

2. The method according to claim 1, It is characterized in that Also includes: Acquire a preset number of target images, and record the odometer pose each time the target image is acquired; Determining the position and posture of the image acquisition device each time the target image is acquired according to the target image and preset internal parameters of the image acquisition device; According to the odometer posture and the image acquisition device posture, obtaining posture conversion parameters between a preset image acquisition device coordinate system and a preset odometer coordinate system; Mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system includes: The candidate straight line is mapped to a preset odometer coordinate system according to the posture conversion parameters to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system.

3. The method according to claim 1, It is characterized in that When the road sign image is a straight line image, the straight lines in the straight line image are color screened, and the screened candidate straight lines include: When the road sign image is a straight line image, acquiring a mask image corresponding to the straight line image according to a preset lane line color; Annotating the mask image according to the straight lines in the straight line image to obtain an annotated mask image; According to the annotated mask image, a screened candidate straight line is obtained.

4. The method according to claim 1, It is characterized in that Mapping the candidate straight line to a preset odometer coordinate system to obtain the straight line parameters of the candidate straight line in the preset odometer coordinate system includes: Obtaining pixel coordinates of the candidate straight line in the straight line image; According to the pixel coordinates and the internal parameters of the preset image acquisition device, the candidate straight line is mapped to a preset image acquisition device coordinate system to obtain the endpoint coordinates of the candidate straight line in the preset image acquisition device coordinate system; According to the endpoint coordinates and the preset posture conversion parameters, the straight line parameters of the candidate straight line in the preset odometer coordinate system are obtained.

5. The method according to claim 1, It is characterized in that The detecting and filtering the candidate straight lines according to the straight line parameters to obtain the road sign straight line comprises: Performing a first screening of the candidate straight lines according to the straight line parameters and a preset lane line length threshold to obtain a screened target straight line set; Calculating the straight line width between every two target straight lines in the target straight line set according to the straight line parameters, and performing a second screening on each target straight line in the target straight line set according to the straight line width and a preset lane line width threshold to obtain a screened target straight line group set; Parallel detection is performed on each target straight line group in the target straight line group set to obtain a road sign straight line.

6. The method according to claim 1, It is characterized in that Determining the straight line relocation information according to the straight line parameters of the road sign straight line includes: According to the straight line parameters of the road sign straight line, the road sign straight line is matched with a preset lane line in the world coordinate system to obtain a matching lane line corresponding to the road sign straight line; Calculating the attitude angle of the mobile device according to the road sign straight line and the matching lane line; According to the attitude angle and the preset projection relationship, straight line relocation information is obtained.

7. The method according to claim 1, It is characterized in that Also includes: When a preset identification image is detected on the image to be detected, obtaining first position information of the preset identification image in the world coordinate system; Determine second posture information of the image acquisition device in the world coordinate system according to the first posture information and preset internal parameters of the image acquisition device; Obtaining identification image relocation information according to the second posture information and preset posture conversion parameters; The position and posture of the mobile device is corrected according to the identification image repositioning information.

8. The method according to claim 1, It is characterized in that Also includes: When no road sign image is detected on the image to be detected, obtaining current odometer increment information; The position and posture of the mobile device is corrected according to the current odometer increment information.

9. A positioning device, It is characterized in that The device comprises: An acquisition module, used for acquiring an image to be detected and performing road sign image detection on the image to be detected; A color screening module is used to, when a straight line image is detected on the image to be detected, perform color screening on the straight lines in the straight line image to obtain screened candidate straight lines; A mapping module, used for mapping the candidate straight line to a preset odometer coordinate system to obtain straight line parameters of the candidate straight line in the preset odometer coordinate system; A detection and filtering module, used for detecting and filtering the candidate straight lines according to the straight line parameters to obtain a road sign straight line; A positioning module, used for determining straight line repositioning information according to the straight line parameters of the road sign straight line; The correction module is used to correct the posture of the mobile device according to the straight line repositioning information.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.