Target object positioning method and apparatus, computer device, and storage medium
By acquiring the tracking trajectory and images of the target object inside the tunnel and calculating its distance from the tunnel's starting point, the problem of inaccurate positioning in tunnels was solved, achieving accurate positioning even in environments with poor signal.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-11
- Publication Date
- 2026-03-10
AI Technical Summary
Due to poor signal strength in tunnels, existing GPS systems are unable to accurately locate target objects.
By acquiring the tracking trajectory of the target object inside the tunnel and the images captured by the target camera, the position coordinates of the target object in the camera coordinate system are determined, and the distance between the target object and the tunnel starting point is calculated. Based on the distance, the positioning information of the target object is determined.
It can still accurately locate objects even when the signal is poor in a tunnel environment, which improves the accuracy of positioning and expands the application scenarios of target object positioning.
Smart Images

Figure CN115760916B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a target object positioning method and device, computer equipment, storage medium and computer program product. BACKGROUND
[0002] With the development of computer technology, global positioning system is widely used in positioning target objects. For example, vehicles on the road are positioned by global positioning system. However, when the target object is in the tunnel, due to poor signal in the tunnel, the target object cannot be accurately positioned by the global positioning system. How to accurately position the target object in the tunnel becomes a problem to be solved. SUMMARY
[0003] Therefore, it is necessary to provide a target object positioning method and device, computer equipment, computer readable storage medium and computer program product capable of improving accuracy in view of the above technical problems.
[0004] In a first aspect, the present application provides a target object positioning method. The method comprises:
[0005] obtaining a tracking trajectory corresponding to a target object in a tunnel, and an image obtained by photographing a road section in the tunnel by a target camera;
[0006] determining a position coordinate of the target object in a coordinate system corresponding to the target camera according to the tracking trajectory and the image;
[0007] calculating a distance between the target object and a starting point of the tunnel according to the position coordinate;
[0008] determining positioning information corresponding to the target object based on the distance.
[0009] In a second aspect, the present application further provides a target object positioning device. The device comprises:
[0010] an acquisition module configured to obtain a tracking trajectory corresponding to a target object in a tunnel, and an image obtained by photographing a road section in the tunnel by a target camera;
[0011] a determination module configured to determine a position coordinate of the target object in a coordinate system corresponding to the target camera according to the tracking trajectory and the image;
[0012] a calculation module configured to calculate a distance between the target object and a starting point of the tunnel according to the position coordinate;
[0013] The determination module is further configured to determine positioning information corresponding to the target object based on the distance.
[0014] In an embodiment, the determining module is further configured to:
[0015] determine candidate position coordinates of each candidate object in a coordinate system corresponding to the target camera in the image; the candidate object includes the target object;
[0016] calculate a predicted coordinate corresponding to the target object according to the tracking trajectory;
[0017] select a position coordinate of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates according to the predicted coordinate.
[0018] In an embodiment, the determining module is further configured to:
[0019] determine a matching region in the image according to the predicted coordinate;
[0020] calculate a matching value between the predicted coordinate and each candidate position coordinate in the matching region;
[0021] select a position coordinate of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates according to the matching value.
[0022] In an embodiment, the determining module is further configured to:
[0023] determine pixel coordinates corresponding to each candidate object in the image;
[0024] determine candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera according to camera parameters corresponding to the target camera and the pixel coordinates; the camera parameters are determined based on calibration points selected in the coordinate system corresponding to the target camera.
[0025] In an embodiment, the tunnel is a straight tunnel; the determining module is further configured to:
[0026] obtain start point positioning information corresponding to a start point of the tunnel and end point positioning information corresponding to an end point of the tunnel;
[0027] determine a difference between the start point positioning information and the end point positioning information;
[0028] determine positioning information corresponding to the target object according to the distance, the difference, and the start point positioning information.
[0029] In an embodiment, the tunnel is a curved tunnel; the apparatus further comprises:
[0030] a segmenting module, configured to segment the curved tunnel to obtain at least two tunnel segments;
[0031] The determining module is further configured to determine segment start point positioning information corresponding to each of the tunnel segments.
[0032] The calculating module is further configured to calculate target point positioning information corresponding to each target point in the tunnel segment according to the segment start point positioning information.
[0033] The generating module is configured to generate a positioning information mapping table based on the target point positioning information and distances between each target point and a start point of the tunnel.
[0034] The determining module is further configured to search for positioning information corresponding to the target object in the target point positioning information in the positioning information mapping table according to the distance.
[0035] In one embodiment, the target camera includes a first camera and a second camera covering adjacent segments in the tunnel; the position coordinates include a first position coordinate of the target object in a target coordinate system corresponding to the first camera and a second position coordinate of the target object in a target coordinate system corresponding to the second camera; and the determining module is further configured to:
[0036] When the distance includes a first distance calculated according to the first position coordinate and a second distance calculated according to the second position coordinate, if the first distance and the second distance satisfy a distance condition, the positioning information corresponding to the target object is determined based on the first distance or the second distance.
[0037] In a third aspect, the present application provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0038] obtaining a tracking trajectory of a target object in a tunnel and an image obtained by photographing a segment in the tunnel by a target camera;
[0039] determining position coordinates of the target object in a coordinate system corresponding to the target camera according to the tracking trajectory and the image;
[0040] calculating a distance between the target object and a start point of the tunnel according to the position coordinates;
[0041] determining positioning information corresponding to the target object based on the distance.
[0042] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0043] The tracking trajectory of the target object inside the tunnel is obtained, as well as the images of the road section inside the tunnel captured by the target camera;
[0044] Based on the tracking trajectory and the image, determine the position coordinates of the target object in the coordinate system corresponding to the target camera;
[0045] Calculate the distance between the target object and the starting point of the tunnel based on the location coordinates;
[0046] The location information corresponding to the target object is determined based on the distance.
[0047] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0048] The tracking trajectory of the target object inside the tunnel is obtained, as well as the images of the road section inside the tunnel captured by the target camera;
[0049] Based on the tracking trajectory and the image, determine the position coordinates of the target object in the coordinate system corresponding to the target camera;
[0050] Calculate the distance between the target object and the starting point of the tunnel based on the location coordinates;
[0051] The location information corresponding to the target object is determined based on the distance.
[0052] The aforementioned target object positioning method, apparatus, computer equipment, storage medium, and computer program product acquire the tracking trajectory of the target object within the tunnel, as well as images captured by a target camera of the tunnel section. Based on the tracking trajectory and images, the position coordinates of the target object in the coordinate system corresponding to the target camera are determined. Then, the distance between the target object and the starting point of the tunnel is calculated based on the position coordinates. Since the positioning information of the tunnel starting point is determined, the positioning information of the target object can be determined based on the distance. The above-mentioned target object positioning process does not require receiving communication signals, and accurate positioning can be performed even when the signal is poor in the tunnel environment, thus improving the accuracy of positioning. Furthermore, the target object positioning process does not rely on the target object pushing data; it can still be located when the target object cannot push positioning-related data, expanding the application scenarios of target object positioning. Attached Figure Description
[0053] Figure 1 This is an application environment diagram of a target object localization method in one embodiment;
[0054] Figure 2 This is a flowchart illustrating a method for locating a target object in one embodiment;
[0055] Figure 3 This is a schematic diagram of a cascaded unit in one embodiment;
[0056] Figure 4 This is a schematic diagram of a position coordinate determination method in one embodiment;
[0057] Figure 5 This is a flowchart illustrating a method for determining location information in one embodiment;
[0058] Figure 6 This is a schematic diagram of a straight tunnel in one embodiment;
[0059] Figure 7 This is a schematic diagram of a curved tunnel in one embodiment;
[0060] Figure 8 This is a flowchart illustrating the target object location method in another embodiment;
[0061] Figure 9 This is a flowchart illustrating the target object location method in yet another embodiment;
[0062] Figure 10 This is a structural block diagram of a target object positioning device in one embodiment;
[0063] Figure 11 This is a structural block diagram of the target object positioning device in another embodiment;
[0064] Figure 12 This is an internal structural diagram of a computer device in one embodiment;
[0065] Figure 13 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0067] The target object positioning method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, computer device 102 acquires the tracking trajectory of the target object inside the tunnel, as well as images of the road section inside the tunnel captured by target camera 104; based on the tracking trajectory and images, it determines the position coordinates of the target object in the coordinate system corresponding to target camera 104; it calculates the distance between the target object and the starting point of the tunnel based on the position coordinates; and it determines the positioning information corresponding to the target object based on the distance.
[0068] The computer device 102 can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server can be a standalone server or a server cluster consisting of multiple servers. The target camera 104 can be various ordinary cameras, wide-angle cameras, or fisheye cameras.
[0069] In one embodiment, such as Figure 2 As shown, a method for locating a target object is provided, which can be applied to... Figure 1 Taking a computer device as an example, the explanation includes the following steps:
[0070] S202, acquire the tracking trajectory of the target object inside the tunnel, and the images of the road section inside the tunnel captured by the target camera.
[0071] The target object is a physical object within the tunnel, which can be either stationary or moving. For example, the target object could be a pedestrian, vehicle, or drone within the tunnel. The tracking trajectory consists of trajectory points along the target object's movement, which can be determined by world coordinates. For instance, if the target object moves from point (x1, y1) to (x2, y2) in the world coordinate system, the tracking trajectory can consist of all trajectory points from (x1, y1) to (x2, y2). The target camera is a camera installed within the tunnel, which can include close-up and long-range cameras. The shooting ranges of the close-up and long-range cameras differ; for example, the shooting range of a close-up camera can be 0-60 meters, while the shooting range of a long-range camera can be 50-150 meters. The tunnel is divided into multiple tunnel segments, each equipped with a set of cameras, including both close-up and long-range cameras. The combined shooting range of the close-up and long-range cameras covers the entire tunnel segment.
[0072] In one embodiment, such as Figure 3As shown, a cascaded unit is deployed at intervals within the tunnel. Each cascaded unit includes a set of close-up and distant cameras. When a target object moves into the field of view of the close-up camera, an image of the target object is acquired. When the target object moves into the field of view of the distant camera, an image of the target object is acquired. When the target object moves into the overlapping field of view of the close-up and distant cameras, the acquired image can be either the one captured by the close-up camera or the one captured by the distant camera. The close-up and distant cameras in the cascaded unit can be installed side-by-side or stacked vertically to avoid decreased detection accuracy and coordinate transformation precision due to different camera angles caused by excessive distance between the two cameras. The cascaded unit can be installed in a position where the camera's field of view completely covers the lane, preferably in a position that covers the center of the lane vertically above it, with the direction of the camera's field of view aligned with the direction of vehicle travel.
[0073] In one embodiment, a computer device acquires video footage of the road inside a tunnel, performs object detection on the video frames, and then uses bounding boxes to define each candidate object detected in the video frames, assigning a sequence number to each bounding box. When the candidate object is a vehicle, license plate recognition and feature extraction are performed, and key-value pairs are used to record the mapping relationship between the bounding box sequence number, the license plate number, and the vehicle features. The computer device then tracks the detected objects, obtaining the tracking trajectory of each target object.
[0074] S204. Based on the tracking trajectory and the image, determine the position coordinates of the target object in the coordinate system corresponding to the target camera.
[0075] The coordinate system corresponding to each target camera is a world coordinate system established for each target camera. Specifically, within the shooting range of the target camera, an arbitrary point is selected as the origin, with the direction of the road inside the tunnel as the Y-direction and the direction perpendicular to the road as the X-direction, to establish the coordinate system corresponding to the target camera. When a group of target cameras includes both close-up and long-range cameras, the selected origin can be any point within the overlapping field of view of the close-up and long-range cameras, and the coordinate systems corresponding to the close-up and long-range cameras are the same. If the position coordinates of the target object determined based on the image taken by the close-up camera are (x1, y1), and the position coordinates of the target object determined based on the image taken by the long-range camera are (x2, y2), (x1, y1) and (x2, y2) coincide or the error is within a preset range.
[0076] Based on the tracking trajectory and the image, the computer device can determine the pixel coordinates of the target object in the image, and then convert the pixel coordinates into the position coordinates of the target object in the coordinate system corresponding to the target camera through coordinate transformation.
[0077] S206, calculate the distance between the target object and the starting point of the tunnel based on the location coordinates.
[0078] Once the position coordinates of the target object in the coordinate system corresponding to the target camera are determined, the distance between the target object and the starting point of the tunnel can be calculated based on the distance between the origin of the coordinate system corresponding to the target camera and the starting point of the tunnel.
[0079] In one embodiment, S206 specifically includes: calculating the distance between the target object and the origin of the coordinate system corresponding to the target camera based on the position coordinates; and calculating the distance between the target object and the starting point of the tunnel based on the distance between the target object and the origin and the distance between the origin and the starting point of the tunnel.
[0080] The distance between the target object and the origin can be a perpendicular distance. When the coordinates of the origin are (0, 0) and the position coordinates of the target object are (x1, y1), the distance between the target object and the origin is y1. Assuming the distance between the origin and the starting point of the tunnel is d, then the distance between the target object and the starting point of the tunnel is d+y1.
[0081] S208, Determine the location information corresponding to the target object based on distance.
[0082] Location information refers to the location of a target object, and can be GPS (Global Positioning System) location information or location information from other positioning systems. Location information includes longitude and latitude information. For example, location information can be (lon, lat), where lon is the longitude of the target object and lat is the latitude of the target object.
[0083] Since the location information of the tunnel starting point is fixed, when the distance between the target object and the tunnel starting point is calculated, the location information of the target object can be obtained based on the distance between the target object and the tunnel starting point and the location information of the tunnel starting point.
[0084] In one embodiment, S208 specifically includes: determining the positioning information corresponding to the target object based on the distance and the lane number where the target object is located. The computer device can determine the lane number where the target object is located according to the position coordinate of the target object on the X-axis. Assuming the position coordinate of the target object is (x1, y1), a straight line parallel to the X-axis is determined through (x1, y1), and the intersection points of this straight line and each lane line are Pn. If x1 > Pn and x1 < Pn+1, then the lane number where the target object is located is n. Since the width of the lane is determined, the offset of the target object in the X-axis direction relative to the tunnel starting point can be determined according to the lane number where the target object is located, and the positioning information of the target object in the X-axis direction is obtained. The computer device can calculate the positioning information of the target object in the Y-axis direction based on the distance and the positioning information of the tunnel starting point, so as to obtain the positioning information of the target object.
[0085] In the above embodiment, the tracking trajectory corresponding to the target object in the tunnel and the image obtained by shooting the section in the tunnel by the target camera are acquired; according to the tracking trajectory and the image, the position coordinate of the target object in the coordinate system corresponding to the target camera is determined. Then, the distance between the target object and the starting point of the tunnel is calculated according to the position coordinate. Since the positioning information of the tunnel starting point is determined, the positioning information corresponding to the target object can be determined based on the distance. The above process of positioning the target object does not need to receive satellite signals, and accurate positioning can also be performed when the signal is poor in the tunnel environment, improving the accuracy of positioning. Moreover, the process of positioning the target object does not need to rely on the target object to push data, and the target object can also be positioned when the target object cannot push positioning-related data, expanding the application scenario of positioning the target object.
[0086] In one embodiment, as Figure 4 shown, S204 specifically includes the following steps:
[0087] S402, determining the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera in the image; the candidate objects include the target object.
[0088] Among them, the candidate object is an object detected in the image, which can be a vehicle, a pedestrian, a drone, etc. The computer device can detect each candidate object in the image through a target detection algorithm. The target detection algorithm can be, for example, a detection algorithm based on deep learning, such as the YOLO detection algorithm.
[0089] In one embodiment, S402 specifically includes: determining the pixel coordinates of each candidate object in the image; according to the camera parameters corresponding to the target camera and the pixel coordinates, determining the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera; the camera parameters are determined based on the calibration points selected in the coordinate system corresponding to the target camera.
[0090] Camera parameters, including intrinsic and extrinsic parameters, are used to transform pixel coordinates. These parameters convert pixel coordinates into coordinates within the target camera's coordinate system. The computer can then select calibration points within the target camera's coordinate system and determine the camera parameters based on the pixel coordinates of these calibration points and their spatial coordinates within the coordinate system. For example, the computer can determine camera parameters using the Zhang Zhengyou calibration method.
[0091] In one embodiment, the computer device can select a plane within the shooting range of the target camera, define a rectangle within the plane, and establish a coordinate system corresponding to the target camera with one corner of the rectangle as the origin, the lane direction as the Y-axis, and the direction perpendicular to the Y-axis as the X-axis. Camera parameters are determined using the four corner points of the rectangle as calibration points.
[0092] S404, calculate the predicted coordinates of the target object based on the tracking trajectory.
[0093] The computer equipment selects target trajectory points in the tracking trajectory and calculates the target object's moving speed based on the coordinates of these points. For example, it selects the last two trajectory points in the tracking trajectory, calculates the distance (DX, DY) between them based on their coordinates, and then calculates the average speed (SPX, SPY) of the target object between the two trajectory points based on the distance (DX, DY) and the time difference DT0. This average speed is used as the target object's moving speed. The product of the current time and the time difference DT1 between the current time and the last trajectory point and the target object's moving speed (SPX, SPY) is calculated to obtain the target object's current moving distance (dhX, dhY) from the last trajectory point. Based on the coordinates of the last trajectory point and the moving distance, the predicted coordinates of the target object are determined.
[0094] S406, In the candidate position coordinates, select the position coordinates of the target object in the coordinate system corresponding to the target camera based on the predicted coordinates.
[0095] In one embodiment, S406 specifically includes: determining a matching region in the image based on the predicted coordinates; calculating the matching value between the predicted coordinates and each candidate position coordinate in the matching region; and selecting the position coordinates of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates based on the matching value.
[0096] The matching region is the area in the image determined based on the predicted coordinates. For example, the matching region can be a rectangular region, a circular region, or a region of other shapes centered on the predicted coordinates. The matching value is a numerical value used to determine the degree of matching between the predicted coordinates and the coordinates of each candidate position; it can be an integer, a decimal, a fraction, or a percentage.
[0097] In one embodiment, the distance between the predicted coordinates and the coordinates of each candidate position in the matching region is calculated to obtain a matching value. The computer device can select the candidate position coordinates corresponding to the smallest matching value as the position coordinates of the target object in the coordinate system corresponding to the target camera.
[0098] In one embodiment, after determining the matching area, the computer device offsets the matching area according to the moving speed of the target object, and the offset amount can be proportional to the moving speed of the target object. Then, it calculates the matching value between the predicted coordinates and the coordinates of each candidate position in the offset matching area; based on the matching value, it selects the position coordinates of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates.
[0099] In the above embodiments, candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera are determined in the image. Then, based on the predicted coordinates calculated from the tracking trajectory, the position coordinates of the target object in the coordinate system corresponding to the target camera are selected from the candidate position coordinates. This allows the spatial position coordinates of the target object to be obtained from the image captured on it. Even when satellite positioning systems are unavailable to locate the target object in a tunnel due to the inability to receive satellite signals, accurate positioning information can still be obtained, improving the accuracy of the positioning.
[0100] In one embodiment, the tunnel is a straight tunnel; such as Figure 5 As shown, S208 specifically includes the following steps:
[0101] S502, obtain the starting point positioning information corresponding to the starting point of the tunnel and the ending point positioning information corresponding to the ending point of the tunnel.
[0102] The starting point positioning information refers to the spatial location information of the tunnel's starting point, including its longitude and latitude, which can be obtained through a satellite positioning system. For example, the starting point positioning information can be obtained through GPS or BDS (BeiDou Navigation Satellite System). The ending point positioning information refers to the spatial location information of the tunnel's ending point, including its longitude and latitude, which can also be obtained through a satellite positioning system.
[0103] S504, determine the difference between the starting point positioning information and the ending point positioning information.
[0104] The difference includes the longitude difference and the latitude difference between the starting point positioning information and the ending point positioning information. For example, if the starting point positioning information is (xin, yin) and the ending point positioning information is (xout, yout), the longitude difference is xin-xout and the latitude difference is yin-yout.
[0105] S506, based on distance, difference, and starting point positioning information, determine the positioning information corresponding to the target object.
[0106] Since the tunnel is a straight tunnel, the direction of the tunnel can be determined based on the starting point location information, the ending point location information, and the difference between the two. Since the target object is inside the tunnel, this direction is also the direction of the target object relative to the tunnel's starting point. When the tunnel is a straight tunnel, the target object's location information can be determined based on the distance between the target object and the tunnel's starting point, its direction relative to the tunnel's starting point, and the tunnel's starting point's location information.
[0107] In one embodiment, such as Figure 6 As shown, when the tunnel is a straight tunnel, it is divided into multiple segments at equal intervals. A set of cameras is installed on each segment, including both close-up and long-range cameras. The combined shooting range of the close-up and long-range cameras can cover that tunnel segment. For each segmented tunnel roadway, the world coordinate system corresponding to the camera in that segment is determined. When a target object moves into a tunnel segment, it is photographed by the target camera deployed within that segment. Based on the target object's tracking trajectory and the captured images, the target object's position coordinates in the coordinate system corresponding to the target camera are determined. The distance between the target object and the starting point of the tunnel is calculated based on these position coordinates.
[0108] In one embodiment, the Earth is considered as a sphere with radius R. When the Earth is divided along longitude, the circumference of the resulting circle is L = R × 2π, and the radian Rad = R × 2π / 360. When the Earth is divided along latitude, the circumference of the resulting circle is L = R × cos(lat) × 2π, and the radian Rad = R × cos(lat) × 2π / 360, where lat is the corresponding longitude of the circle. Assuming the location information of the target object is (x, y), the origin is (x1, y1), the angle between the line connecting the target object and the origin and due north is a, and the length of the line is d, the translation distance along the longitude is d × sin(a), and the change in longitude is d × sin(a) / (R × cos(y) × 2π) / 360. The longitude of the target object can be obtained according to formula (1). The latitude translation distance is d×cos(a). Based on the latitude translation distance, the change in latitude is d×cos(a) / (R×2π) / 360. Therefore, the latitude of the target object can be determined according to formula (2).
[0109] x=x1+d*sin(a) / (R*cos(y1)*2π / 360) (1)
[0110] y=y1+d*cos(a) / (R*2π / 360) (2)
[0111] According to formulas (1) and (2), when the latitude and longitude (x, y) and (x1, y1) of two points are known, the distance between the two points can be determined according to formula (3), where R is the Earth's radius.
[0112] d=R*arccos(sin(x)*sin(x1)+cos(x)*cos(x1)*cos(y-y1))*(π / 180)(3)
[0113] Based on the above derivation, assuming the location information of the tunnel starting point is (xin, yin) and the location information of the tunnel ending point is (xout, yout), the distance d between the tunnel starting point and the tunnel ending point can be calculated according to formula (3). Since xin-xout=d×sin(a) and sin(a)=(xin-xout) / d, the d calculated according to formula (3) can be used to obtain formula (4). According to yin-yout=d×cos(a) and cos(a)=(yin-yout) / d and formula (3), formula (5) can be obtained.
[0114]
[0115]
[0116] Suppose there is a target object p in the straight direction of the tunnel, which is d1 away from the tunnel starting point (xin, yin). The latitude and longitude of p are (x, y). According to formulas (1)-(4), the formula for calculating the longitude of point p, namely formula (6), and the formula for calculating the latitude of point p, namely formula (7), can be derived.
[0117] x=xin+d*((xin-xout)) / (R*arccos(sin(xin)*sin(xout)+cos(xin)*cos(xout)*cos(yin-yout))*(π / 180)) / (R*cos(yin)*2π / 360) (6)
[0118]
[0119] When the tunnel is a straight tunnel, the location information (x, y) of the target object can be obtained based on the location information of the tunnel starting point (xin, yin), the location information of the tunnel ending point (xout, yout), the distance between the target object and the tunnel starting point, and formulas (6) and (7), where R is the Earth's radius.
[0120] In the above embodiments, the starting point positioning information corresponding to the tunnel's starting point and the ending point positioning information corresponding to the tunnel's ending point are obtained; the difference between the starting point positioning information and the ending point positioning information is determined; and the positioning information corresponding to the target object is determined based on the distance, the difference, and the starting point positioning information. Therefore, even when the target object in the tunnel cannot be located via a satellite positioning system due to the inability to receive satellite signals, accurate positioning information of the target object can still be obtained based on the positioning information of the tunnel's starting and ending points and the distance between the target object and the tunnel's starting point, thus improving the accuracy of positioning.
[0121] In one embodiment, the tunnel is a curved tunnel; such as Figure 6 As shown, S208 is preceded by S602-S608, and S208 specifically includes S610:
[0122] S602 divides the curved tunnel into segments, resulting in at least two tunnel sections.
[0123] When the tunnel is curved, it is divided into segments, resulting in at least two tunnel segments. Each tunnel segment can be approximated as a straight segment. For example, ... Figure 7 As shown, the curved tunnel is divided into 5 tunnel segments, each segment being a cross-section. The starting point of the first tunnel segment is the tunnel initiation point, and the ending point of the last tunnel segment is the tunnel end point. A set of cameras, including close-up and long-range cameras, is deployed within each tunnel segment. The origin of the coordinate system corresponding to the camera is determined within the field of view of this set of cameras.
[0124] S604, determine the location information of the starting point of each tunnel section.
[0125] The location information of the starting point of the road segment includes the location information of the starting point and the ending point of each tunnel segment, which can be obtained through satellite maps or calculations. The location information of the starting point includes the longitude and latitude of the starting point of the tunnel segment, and the location information of the ending point includes the longitude and latitude of the ending point of the tunnel segment. For example, the tunnel is divided into n straight segments, resulting in n+1 points containing the starting point and the ending point of the tunnel. The location information of the n-1 non-tunnel starting point and tunnel ending point can be obtained through satellite maps, or starting from the tunnel starting point, the direction and distance of the next point can be measured using a compass and distance measuring tools, and then the location information of the next point can be obtained according to formulas (6) and (7).
[0126] S606, based on the location information of the starting point of the road segment, calculate the location information of each target point within the tunnel segment.
[0127] Each tunnel segment is approximated as a straight segment. Based on the starting point location information of each tunnel segment, the distance between the target point in the tunnel segment and the starting point of the tunnel segment, and formulas (6) and (7), the target point location information corresponding to each target point in the tunnel segment can be calculated.
[0128] S608, generate a positioning information mapping table based on the target point positioning information and the distance between each target point and the starting point of the tunnel.
[0129] The location information mapping table is a mapping table where the distance to the tunnel's starting point is the key, and the location information is the value. For example, as shown in Table 1, the location information mapping table includes two fields: distance and location information. The location information corresponding to each distance can be queried in the table.
[0130] Table 1
[0131] Distance (m) Position information (longitude, latitude) 100 (x1, y1) 200 (x2, y2) 300 (x3, y3) 400 (x4, y4)
[0132] The distance between the target point and the tunnel's starting point can be divided into two segments: the distance between the target point and the origin of the coordinate system within the tunnel segment, and the distance between the origin and the tunnel's starting point. The sum of these two distances is the total distance between the target point and the tunnel's starting point. For example... Figure 7 As shown, the distance between the origin of the coordinate system of tunnel segment 4 and the starting point of the tunnel can be obtained by summing the lengths of tunnel segments 1-3 and the distance between the starting point of tunnel segment 4 and the origin of the coordinate system.
[0133] S610: Based on the distance, search for the location information corresponding to the target object in the target point location information of the location information mapping table.
[0134] Computer devices use distance as the key to search for the location information corresponding to a target object in the target point location information of the location information mapping table. For example, as shown in Table 1, if the distance between the target object and the starting point of the tunnel is 200 meters, then the location information is (x2, y2).
[0135] In the above embodiments, the curved tunnel is segmented to obtain at least two tunnel segments, and the starting point positioning information of each tunnel segment is determined. Based on the starting point positioning information, the target point positioning information corresponding to each target point within the tunnel segment is calculated. A positioning information mapping table is generated based on the target point positioning information and the distance between each target point and the starting point of the tunnel. The positioning information corresponding to the target object is searched in the target point positioning information of the positioning information mapping table according to the distance. Thus, when the tunnel is a curved tunnel, the positioning information of the target object can be easily and quickly determined by looking up the positioning information mapping table, improving the efficiency and accuracy of target object positioning.
[0136] In one embodiment, the target camera includes a first camera and a second camera covering adjacent road sections within the tunnel; the position coordinates include the first position coordinates of the target object in the target coordinate system corresponding to the first camera, and the second position coordinates of the target object in the target coordinate system corresponding to the second camera; S208 specifically includes: when the distance includes a first distance calculated based on the first position coordinates and a second distance calculated based on the second position coordinates, if the first distance and the second distance satisfy the distance condition, the positioning information corresponding to the target object is determined based on the first distance or the second distance.
[0137] The distance condition is used to determine whether the target objects in the first camera and the second camera are the same object based on a first distance and a second distance. For example, the distance condition can be that the difference between the first distance and the second distance is within a preset range; or the distance condition can also be that the absolute value of the difference between the first distance and the second distance is less than a preset threshold. The preset threshold can be a value determined according to actual needs, for example, the preset threshold can be 1 meter.
[0138] Because cameras are deployed at intervals within the tunnel, the shooting ranges of cameras deployed on adjacent road sections may overlap. When a target object moves to a road section with overlapping shooting ranges, the target cameras capturing the target object include the first camera and the second camera. When the distance determined for the target object based on the image captured by the first camera is designated as the first distance, and the distance determined for the target object based on the image captured by the second camera is designated as the second distance, if the first distance and the second distance satisfy a distance condition, it indicates that the difference between the first distance and the second distance is very small, and the target object in both images is the same object. The positioning information corresponding to the target object is then determined based on either the first distance or the second distance.
[0139] In one embodiment, when the first distance and the second distance meet the distance condition, it is determined whether the license plate number or object feature of the target object corresponding to the first distance matches the target object corresponding to the second distance. If they match, it is determined that the two target objects are the same object, and the location information corresponding to the target object is determined based on the first distance or the second distance.
[0140] In the above embodiments, when the target object moves to the overlapping section of the shooting range of two adjacent sets of cameras, the first distance and the second distance are used to determine whether the target object in the two sets of cameras is the same object, thus ensuring the uniqueness of the target object's positioning information.
[0141] In one embodiment, the tunnel is divided into multiple segments, each segment deploying a cascaded unit. Each cascaded unit includes a set of cameras, comprising close-up and distant cameras. Figure 8 As shown, the method for locating the target object includes the following steps:
[0142] S802 determines whether the tunnel is a straight tunnel. If the tunnel is a straight tunnel, execute S806; if the tunnel is not a straight tunnel, execute S804.
[0143] S804, establish a location information mapping table between distance and location information. If the tunnel is a curved tunnel, take n+1 points from the tunnel starting point according to the divided cross-sections, and take one point on each cross-section to divide the tunnel into n straight road segments, where the n+1 points include the tunnel starting point and the tunnel ending point. The location information of the n-1 non-tunnel starting point and tunnel ending point can be obtained through satellite maps, or starting from the tunnel starting point, use a compass and distance measuring tools to measure the direction and distance of the next point, and then obtain the location information of the next point according to formulas (6) and (7). Similarly, the location information of other non-tunnel starting point and ending point can be obtained in sequence. Specifically, each tunnel segment is approximated as a straight road segment. According to the starting point location information of each tunnel segment and the distance between the target point in the tunnel segment and the starting point of the tunnel segment, as well as formulas (6) and (7), the target point location information corresponding to each target point in the tunnel segment can be calculated, and a location information mapping table is established. The computer equipment can perform calculations from both the tunnel starting point and the ending point to improve accuracy.
[0144] S806, acquire video footage of the target object.
[0145] The S808 detects target objects in a video and obtains the pixel coordinates of the target objects.
[0146] S810 converts the pixel coordinates of the target object into position coordinates in the world coordinate system corresponding to the target camera based on the camera parameters.
[0147] S812 establishes tracking trajectories for each target object detected in the video. Each trajectory point includes the target object's position coordinates in the world coordinate system, timestamp, the corresponding detection box number, license plate, speed, and object features. For newly detected objects in the current frame, a new tracking is established. For objects that existed in trajectory points before the current frame but were not detected in the current frame, the predicted coordinates of the target object or the coordinates of the last trajectory point are used as the position coordinates in the current frame, and a marker is added to the target object.
[0148] S814 determines the distance between the target object and the coordinate origin based on the tracking trajectory and the image captured by the target camera. For each cascaded unit, a world coordinate system corresponding to the target camera in that cascaded unit is established. The main control board in the cascaded unit determines the distance between the target object and the coordinate origin based on the tracking trajectory of the target object and the image captured by the target camera in that cascaded unit.
[0149] S816 sums the distance between the target object and the origin of the coordinate system and the distance between the origin of the coordinate system and the starting point of the tunnel to obtain the distance between the target object and the starting point of the tunnel.
[0150] S818: Determine whether the target object is located in the overlapping area of the camera shooting range of adjacent cascaded units. If yes, execute S820; otherwise, execute S822.
[0151] S820, acquire data from each cascade unit. The data from each cascade unit includes the target object's position coordinates in the coordinate system corresponding to that cascade unit, the distance between the target object and the tunnel starting point calculated based on these coordinates, and a timestamp. When the data from each cascade unit is from the same time period, if the absolute value of the difference between the first distance and the second distance calculated by adjacent cascade units is less than a preset threshold, it is determined that the target object corresponding to the first distance and the target object corresponding to the second distance in adjacent cascade units are the same object.
[0152] S822: Determine if the straight line is a straight tunnel. If yes, execute S824; otherwise, execute S826.
[0153] S824, calculate the positioning information of the target object based on the distance between the target object and the tunnel starting point, and the positioning information of the tunnel starting point.
[0154] S826, based on the distance between the target object and the tunnel starting point, look up the location information of the target object in the location information mapping table.
[0155] In one embodiment, such as Figure 9 As shown, the method for locating the target object includes the following steps:
[0156] S902, acquire the tracking trajectory of the target object inside the tunnel, and the images of the road section inside the tunnel captured by the target camera.
[0157] S904, determine the pixel coordinates corresponding to each candidate object in the image.
[0158] S906, based on the camera parameters and pixel coordinates corresponding to the target camera, determines the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera; the camera parameters are determined based on calibration points selected in the coordinate system corresponding to the target camera. Candidate objects include the target object.
[0159] S908 calculates the predicted coordinates of the target object based on the tracking trajectory.
[0160] S910, determine the matching region in the image based on the predicted coordinates.
[0161] S912, calculate the matching value between the predicted coordinates and the coordinates of each candidate position in the matching region.
[0162] S914, based on the matching value, select the position coordinates of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates.
[0163] S916, calculate the distance between the target object and the starting point of the tunnel based on the location coordinates.
[0164] S918, when the tunnel is a straight tunnel, obtain the starting point positioning information corresponding to the starting point of the tunnel and the ending point positioning information corresponding to the ending point of the tunnel; determine the difference between the starting point positioning information and the ending point positioning information; and determine the positioning information corresponding to the target object based on the distance, the difference, and the starting point positioning information.
[0165] S920, when the tunnel is a curved tunnel, the location information corresponding to the target object is searched in the target point location information of the location information mapping table according to the distance.
[0166] For details on S902 to S920, please refer to the specific implementation process described above.
[0167] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0168] Based on the same inventive concept, this application also provides a target object positioning device for implementing the target object positioning method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more target object positioning device embodiments provided below can be found in the limitations of the target object positioning method described above, and will not be repeated here.
[0169] In one embodiment, such as Figure 10 As shown, a target object positioning device is provided, comprising: an acquisition module 1002, a determination module 1004, and a calculation module 1006, wherein:
[0170] The acquisition module 1002 is used to acquire the tracking trajectory corresponding to the target object in the tunnel, as well as the images obtained by the target camera capturing the road section in the tunnel;
[0171] The determination module 1004 is used to determine the position coordinates of the target object in the coordinate system corresponding to the target camera based on the tracking trajectory and the image;
[0172] The calculation module 1006 is used to calculate the distance between the target object and the starting point of the tunnel based on the location coordinates;
[0173] The determination module 1004 is also used to determine the location information corresponding to the target object based on the distance.
[0174] In one embodiment, the determining module 1004 is further configured to:
[0175] Determine the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera in the image; the candidate objects include the target object.
[0176] Calculate the predicted coordinates of the target object based on the tracking trajectory;
[0177] Among the candidate position coordinates, the position coordinates of the target object in the coordinate system corresponding to the target camera are selected based on the predicted coordinates.
[0178] In one embodiment, the determining module 1004 is further configured to:
[0179] The matching region is determined in the image based on the predicted coordinates;
[0180] Calculate the matching value between the predicted coordinates and the coordinates of each candidate position in the matching region;
[0181] Based on the matching value, select the position coordinates of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates.
[0182] In one embodiment, the determining module 1004 is further configured to:
[0183] Determine the pixel coordinates of each candidate object in the image;
[0184] Based on the camera parameters and pixel coordinates corresponding to the target camera, the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera are determined; the camera parameters are determined based on the calibration points selected in the coordinate system corresponding to the target camera.
[0185] In one embodiment, the tunnel is a straight tunnel; the determining module 1004 is further configured to:
[0186] Obtain the starting point location information corresponding to the starting point of the tunnel and the ending point location information corresponding to the ending point of the tunnel;
[0187] Determine the difference between the starting point location information and the ending point location information;
[0188] Based on the distance, difference, and starting point positioning information, determine the positioning information corresponding to the target object.
[0189] In one embodiment, the tunnel is a curved tunnel; such as Figure 11 As shown, the device also includes:
[0190] The segmentation module 1008 is used to segment the curved tunnel to obtain at least two tunnel segments;
[0191] The determination module 1004 is also used to determine the location information of the starting point of each tunnel segment;
[0192] The calculation module 1006 is also used to calculate the target point positioning information corresponding to each target point in the tunnel section based on the starting point positioning information of the road section;
[0193] The generation module 1010 is used to generate a positioning information mapping table based on the target point positioning information and the distance between each target point and the starting point of the tunnel;
[0194] The determination module 1004 is also used to search for the location information corresponding to the target object in the target point location information of the location information mapping table based on the distance.
[0195] In one embodiment, the target camera includes a first camera and a second camera covering adjacent road sections within the tunnel; the position coordinates include the first position coordinates of the target object in the target coordinate system corresponding to the first camera, and the second position coordinates of the target object in the target coordinate system corresponding to the second camera; the determining module 1004 is further configured to:
[0196] When the distance includes a first distance calculated based on the first location coordinates and a second distance calculated based on the second location coordinates, if the first distance and the second distance satisfy the distance condition, the positioning information corresponding to the target object is determined based on the first distance or the second distance.
[0197] Each module in the aforementioned target object positioning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0198] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores location data for target objects. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a method for locating a target object.
[0199] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for locating a target object. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0200] Those skilled in the art will understand that Figure 12 , 13The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0201] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0202] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0203] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0204] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0205] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, 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, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0206] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0207] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A positioning method of a target object, characterized by, The method comprises: acquiring a tracking trajectory corresponding to a target object in a tunnel, and an image obtained by photographing a road section in the tunnel by a target camera; determining a position coordinate of the target object in a coordinate system corresponding to the target camera according to the tracking trajectory and the image; calculating a distance between the target object and a starting point of the tunnel according to the position coordinate, comprising: calculating a distance between the target object and a coordinate origin of the coordinate system corresponding to the target camera according to the position coordinate; calculating the distance between the target object and the starting point of the tunnel according to the distance between the target object and the coordinate origin and the distance between the coordinate origin and the starting point of the tunnel; determining positioning information corresponding to the target object based on the distance, comprising: determining the positioning information corresponding to the target object according to the distance between the target object and the starting point of the tunnel and the positioning information of the starting point of the tunnel; wherein the positioning information corresponding to the target object comprises longitude information and latitude information.
2. The method of claim 1, wherein, The determination of the position coordinate of the target object in the coordinate system corresponding to the target camera according to the tracking trajectory and the image comprises: determining candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera in the image; the candidate object comprises the target object; calculating a predicted coordinate corresponding to the target object according to the tracking trajectory; selecting the position coordinate of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates according to the predicted coordinate.
3. The method of claim 2, wherein, The selection of the position coordinate of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates according to the predicted coordinate comprises: determining a matching region in the image according to the predicted coordinate; calculating a matching value between the predicted coordinate and each candidate position coordinate in the matching region; selecting the position coordinate of the target object in the coordinate system corresponding to the target camera from the candidate position coordinates according to the matching value.
4. The method of claim 2, wherein, The determination of the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera in the image comprises: determining pixel coordinates corresponding to each candidate object in the image; determining the candidate position coordinates of each candidate object in the coordinate system corresponding to the target camera according to camera parameters corresponding to the target camera and the pixel coordinates; the camera parameters are determined based on calibration points selected in the coordinate system corresponding to the target camera.
5. The method of claim 1, wherein, The tunnel is a straight tunnel; the determination of the positioning information corresponding to the target object based on the distance comprises: acquiring starting point positioning information corresponding to a starting point of the tunnel and terminal positioning information corresponding to a terminal point of the tunnel; determining a difference value between the starting point positioning information and the terminal positioning information; determining the positioning information corresponding to the target object according to the distance, the difference value and the starting point positioning information.
6. The method of claim 1, wherein, The tunnel is a curved tunnel; the method further comprises: segmenting the curved tunnel to obtain at least two tunnel road sections; determining road section starting point positioning information corresponding to each tunnel road section; According to the road section start point positioning information, target point positioning information corresponding to each target point in the tunnel road section is calculated; A positioning information mapping table is generated based on the target point positioning information and distances between each target point and the start point of the tunnel; The distance-based determination of the positioning information corresponding to the target object comprises: The positioning information corresponding to the target object is searched in the target point positioning information in the positioning information mapping table according to the distance.
7. The method of claim 1, wherein, The target camera comprises a first camera and a second camera covering adjacent road sections in the tunnel; the position coordinates comprise first position coordinates of the target object in a target coordinate system corresponding to the first camera and second position coordinates of the target object in a target coordinate system corresponding to the second camera; the distance-based determination of the positioning information corresponding to the target object comprises: When the distance comprises a first distance calculated according to the first position coordinates and a second distance calculated according to the second position coordinates, if the first distance and the second distance satisfy a distance condition, the positioning information corresponding to the target object is determined based on the first distance or the second distance.
8. A positioning device of a target object, characterized by The device comprises: An acquisition module configured to acquire a tracking trajectory corresponding to a target object in a tunnel and an image obtained by photographing a road section in the tunnel by a target camera; A determination module configured to determine position coordinates of the target object in a coordinate system corresponding to the target camera according to the tracking trajectory and the image; A calculation module configured to calculate a distance between the target object and a start point of the tunnel according to the position coordinates, comprising: calculating a distance between the target object and a coordinate origin of the coordinate system corresponding to the target camera according to the position coordinates; and calculating the distance between the target object and the start point of the tunnel according to the distance between the target object and the coordinate origin and a distance between the coordinate origin and the start point of the tunnel; The determination module is further configured to determine positioning information corresponding to the target object based on the distance, comprising: determining the positioning information corresponding to the target object according to the distance between the target object and the start point of the tunnel and positioning information of the start point of the tunnel; wherein the positioning information corresponding to the target object comprises longitude information and latitude information. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
Citation Information
Patent Citations
Tunnel target trajectory tracking method based on visual information
CN111145220A