CN115205341A - Motion trajectory generation method based on A-Star - Google Patents
Motion trajectory generation method based on A-Star Download PDFInfo
- Publication number
- CN115205341A CN115205341A CN202211112747.7A CN202211112747A CN115205341A CN 115205341 A CN115205341 A CN 115205341A CN 202211112747 A CN202211112747 A CN 202211112747A CN 115205341 A CN115205341 A CN 115205341A
- Authority
- CN
- China
- Prior art keywords
- star
- camera
- position points
- integrating
- calculating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000005070 sampling Methods 0.000 claims abstract description 18
- 238000012544 monitoring process Methods 0.000 claims abstract description 15
- 238000012795 verification Methods 0.000 claims abstract description 10
- 238000009434 installation Methods 0.000 claims description 16
- 238000001514 detection method Methods 0.000 claims description 6
- 238000011156 evaluation Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/292—Multi-camera tracking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30232—Surveillance
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of computer autonomous navigation, in particular to a motion trail generation method based on A-Star, which comprises the steps of reading the positions of a plurality of persons through a camera to obtain a plurality of position information; integrating a plurality of position information on a map to obtain a plurality of position points; calculating and integrating a plurality of position points by an A-Star algorithm to obtain a partial path track; drawing part of path tracks in a monitoring picture of a camera, and performing random sampling to obtain sampling information; the method and the device have the advantages that the sampling information is compared and verified, the verification is passed, and partial path tracks are integrated into the whole path track.
Description
Technical Field
The invention relates to the technical field of computer autonomous navigation, in particular to a motion trail generation method based on A-Star.
Background
The monitoring of the personnel can be realized by acquiring the movement track of the personnel.
At present, the prior art discloses a trajectory generation algorithm, where a person needs to wear a positioning system such as a radar, and obtains position information of the corresponding person by using the positioning system such as the radar, and calculates the position information to obtain a motion trajectory of the corresponding person.
By adopting the mode, under the condition that more personnel need to be monitored, the hardware overhead of positioning systems such as radars and the like is higher, and the cost is higher.
Disclosure of Invention
The invention aims to provide a motion trajectory generation method based on A-Star, and aims to solve the problem that the hardware cost of the existing trajectory generation algorithm is high.
In order to achieve the purpose, the invention provides a motion trail generation method based on A-Star, which comprises the following steps:
s1, reading positions of a plurality of persons through a camera to obtain a plurality of position information;
s2, integrating the position information to a map to obtain a plurality of position points;
s3, calculating and integrating the position points through an A-Star algorithm to obtain a partial path track;
s4, drawing the partial path track in a monitoring picture of the camera, and performing random sampling to obtain sampling information;
and S5, comparing and verifying the sampling information, integrating the partial path tracks into the whole path track when the verification is passed, and returning to the step S3 when the verification is not passed.
Wherein, before the step of reading the positions of the plurality of persons through the camera to obtain the information of the plurality of positions, the method further comprises the following steps:
s101, acquiring a monitoring area;
s102, determining installation positions and installation quantity based on the monitoring area;
s103, selecting cameras with the same number as the installation number, and installing the cameras at the corresponding installation positions.
Wherein, after the step of selecting the cameras with the same number as the installation number and installing the cameras on the corresponding installation positions, the method further comprises the following steps:
s104, performing dustproof treatment on the installed camera;
s105, verifying the definition detection of the camera after the dustproof treatment, and executing the step S1 after the detection is passed.
The specific way of obtaining the partial path trajectory by calculating and integrating the plurality of position points through the A-Star algorithm is as follows:
s31, calculating the priority of each position point one by one through an A-Star algorithm until all the position points are traversed to obtain a plurality of shortest paths;
s32, connecting the shortest paths to obtain a partial path track.
The specific way of calculating the priority of each position point one by one through an A-Star algorithm until all the position points are traversed to obtain a plurality of shortest paths is as follows:
s311, calculating an evaluation function between the two position points within a preset time through an A-Star algorithm;
s312, judging the minimum value of the valuation function, if the valuation function is the minimum value, executing the step S313, and if the valuation function is not the minimum value, returning to the step S311;
s313, connecting the two corresponding position points according to the valuation function to obtain a shortest path;
s314 loops steps S311 to S313 until all the position points are traversed to obtain a plurality of shortest paths.
The invention discloses a motion trail generation method based on A-Star.A camera is used for reading the positions of a plurality of persons to obtain a plurality of position information; integrating a plurality of position information to a map to obtain a plurality of position points; calculating and integrating a plurality of position points by an A-Star algorithm to obtain a partial path track; drawing the partial path track in a monitoring picture of the camera, and performing random sampling to obtain sampling information; comparing and verifying the sampling information, and integrating the partial path track into the whole path track after verification is passed; the positions of the personnel are displayed in real time, and the visual feeling is given to the client; when the position information within a certain time is acquired, the track information is automatically generated to carry out real-time feedback, and the problem that the hardware cost of the conventional track generation algorithm is high is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a motion trajectory generation method based on a-Star according to the present invention.
FIG. 2 is a flow chart of a partial path trajectory obtained by integrating the computation of a plurality of the location points by the A-Star algorithm.
Fig. 3 is a flow chart of calculating the priority of each position point one by one through the a-Star algorithm until all the position points are traversed to obtain a plurality of shortest paths.
Fig. 4 is a step diagram of a motion trajectory generation method based on a-Star provided by the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout.
The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
Referring to fig. 1 to 4, the present invention provides a method for generating a motion trajectory based on a-Star, comprising the following steps:
s1, reading positions of a plurality of persons through a camera to obtain a plurality of position information;
specifically, before the step of reading the positions of the plurality of persons by the camera to obtain the information of the plurality of positions, the method further comprises:
s101, acquiring a monitoring area;
s102, determining installation positions and installation quantity based on the monitoring area;
specifically, the whole monitoring area is covered by the picture acquisition range after the camera is installed.
S103, selecting cameras with the same number as the installation number, and installing the cameras at the corresponding installation positions.
Specifically, the camera adopts a Haokawav monitoring camera.
S104, performing dustproof treatment on the installed camera;
specifically, be favorable to behind the dustproof processing the long-term work of camera avoids the dust to the definition of the picture that the camera was gathered causes the influence.
S105, the definition detection of the camera after the dustproof processing is verified, the detection is passed, and the step S1 is executed.
S2, integrating the position information to a map to obtain a plurality of position points;
s3, calculating and integrating the position points through an A-Star algorithm to obtain a partial path track;
the concrete mode is as follows:
s31, calculating the priority of each position point one by one through an A-Star algorithm until all the position points are traversed to obtain a plurality of shortest paths;
the concrete mode is as follows:
s311, calculating an evaluation function f (n) between two position points in a preset time (within a close time) by an A-Star algorithm;
specifically, the A-star algorithm: the core of the A-star algorithm is to compute the priority of each node by this function as follows.
Wherein: f (n) is the overall priority of node n.
When we select the next node to traverse, we always choose the node with the highest composite priority (smallest value).
g (n) is the cost of node n from the starting point.
h (n) is the predicted cost of node n from the end point, which is the heuristic function of the A-star algorithm.
S312, judging the minimum value of the valuation function, if the valuation function is the minimum value, executing the step S313, and if the valuation function is not the minimum value, returning to the step S311;
specifically, in the operation process of the A-star algorithm, the node with the minimum f (n) value (with the highest priority) is selected from the priority queue each time to be used as the next node to be traversed.
S313, connecting the two corresponding position points according to the valuation function to obtain a shortest path;
specifically, the distance is calculated as follows: if only four directions of movement up, down, left, and right are allowed in the graph, the heuristic function may use the Manhattan distance.
The function for computing the manhattan distance is as follows, where D refers to the cost of movement between two neighboring nodes, usually a fixed constant.
S314 loops steps S311 to S313 until all the position points are traversed to obtain a plurality of shortest paths.
In particular, the A-star algorithm uses two sets to represent the nodes to be traversed, versus the nodes that have already been traversed, which are commonly referred to as open _ set and close _ set.
Therefore, the core of the A-star algorithm is that the heuristic function h (n) is in an extreme case, when the heuristic function h (n) is always 0, the priority of the node is determined by g (n), and the algorithm is degraded into the Dijkstra algorithm.
If h (n) is always less than or equal to the cost from the node n to the end point, the A-star algorithm ensures that the shortest path can be found certainly.
But as the value of h (n) is smaller, the more nodes the algorithm will traverse, resulting in a slower algorithm.
If h (n) is exactly equal to the cost of node n to the end point, the A-star algorithm will find the best path and it is fast.
Unfortunately, this is not possible in all scenarios.
Because it is difficult to figure out exactly how far from the end point we are before the end point is reached.
If the value of h (n) is more costly than node n to the end point, the a-star algorithm cannot guarantee that the shortest path is found, but this time it is fast.
S32 connects the shortest paths to obtain a partial path trajectory (a large path).
S4, drawing the partial path track in a monitoring picture of the camera, and performing random sampling to obtain sampling information;
and S5, comparing and verifying the sampling information, integrating the partial path tracks into an integral path track (large track) after verification is passed, and returning to the step S3 after verification is not passed.
The invention discloses a motion trail generation method based on A-Star.A camera is used for reading the positions of a plurality of persons to obtain a plurality of position information; integrating a plurality of position information to a map to obtain a plurality of position points; calculating and integrating a plurality of position points by an A-Star algorithm to obtain a partial path track; drawing the partial path track in a monitoring picture of the camera, and performing random sampling to obtain sampling information; comparing and verifying the sampling information, and integrating the partial path track into the whole path track after verification is passed, wherein the information is stored in a map aiming at the position information of a plurality of persons acquired by a camera, the position information points in the map are extracted, algorithm is realized by every 2 adjacent point positions, and some verification calculation and correction are added to generate the path track; when people appear under different cameras, the position information of the people is integrated according to the multiple cameras, algorithm optimization between two independent points is carried out in a blind area and a large remote area of the cameras, only the multiple cameras are needed to carry out real-time video acquisition, hardware cost is low, and compared with the existing track generation algorithm, positioning systems such as radars are not used, and the position information is obtained only through vision; the positions of the personnel are displayed in real time, and visual feeling is provided for customers; when the position information within a certain time is acquired, the track information is automatically generated for real-time feedback, and the problem that the hardware cost of the existing track generation algorithm is high is solved.
Although the above disclosure is only a preferred embodiment of the motion trajectory generation method based on a-Star, it is needless to say that the scope of the present invention is not limited thereby, and those skilled in the art can understand that all or part of the procedures of the above embodiment can be implemented, and the equivalent changes made according to the claims of the present invention still belong to the scope covered by the present invention.
Claims (5)
1. A motion trail generation method based on A-Star is characterized by comprising the following steps:
s1, reading positions of a plurality of persons through a camera to obtain a plurality of position information;
s2, integrating the position information to a map to obtain a plurality of position points;
s3, calculating and integrating the position points through an A-Star algorithm to obtain a partial path track;
s4, drawing the partial path tracks in a monitoring picture of the camera, and performing random sampling to obtain sampling information;
and S5, comparing and verifying the sampling information, integrating the partial path tracks into the whole path track after the verification is passed, and returning to the step S3 after the verification is not passed.
2. The A-Star based motion trajectory generation method of claim 1,
before the step of reading the positions of the plurality of persons through the camera to obtain the information of the plurality of positions, the method further comprises the following steps:
s101, acquiring a monitoring area;
s102, determining installation positions and installation quantity based on the monitoring area;
s103, selecting cameras with the same number as the installation number, and installing the cameras at the corresponding installation positions.
3. The method of generating a motion trajectory based on an A-Star of claim 2,
after the step of selecting the cameras with the same number as the installation number and installing the cameras on the corresponding installation positions, the method further comprises the following steps:
s104, performing dustproof treatment on the installed camera;
s105, verifying the definition detection of the camera after the dustproof treatment, and executing the step S1 after the detection is passed.
4. The A-Star based motion trajectory generation method of claim 3,
the specific way of obtaining the partial path trajectory by calculating and integrating the plurality of position points through the A-Star algorithm is as follows:
s31, calculating the priority of each position point one by one through an A-Star algorithm until all the position points are traversed to obtain a plurality of shortest paths;
s32, connecting the shortest paths to obtain a partial path track.
5. The method of generating a motion trajectory based on an A-Star of claim 4,
the specific way of calculating the priority of each position point one by one through an A-Star algorithm until all the position points are traversed to obtain a plurality of shortest paths is as follows:
s311, calculating a valuation function between the two position points in the preset time through an A-Star algorithm;
s312, judging the minimum value of the valuation function, if the valuation function is the minimum value, executing the step S313, and if the valuation function is not the minimum value, returning to the step S311;
s313, connecting the two corresponding position points according to the valuation function to obtain a shortest path;
s314 loops steps S311 to S313 until all the position points are traversed to obtain a plurality of shortest paths.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211112747.7A CN115205341A (en) | 2022-09-14 | 2022-09-14 | Motion trajectory generation method based on A-Star |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211112747.7A CN115205341A (en) | 2022-09-14 | 2022-09-14 | Motion trajectory generation method based on A-Star |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115205341A true CN115205341A (en) | 2022-10-18 |
Family
ID=83571983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211112747.7A Pending CN115205341A (en) | 2022-09-14 | 2022-09-14 | Motion trajectory generation method based on A-Star |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115205341A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521328A (en) * | 2011-12-06 | 2012-06-27 | 上海京颐信息科技有限公司 | Optimization method for track playback function in indoor positioning system |
CN111145223A (en) * | 2019-12-16 | 2020-05-12 | 盐城吉大智能终端产业研究院有限公司 | Multi-camera personnel behavior track identification analysis method |
CN112200106A (en) * | 2020-10-16 | 2021-01-08 | 中国计量大学 | Cross-camera pedestrian re-identification and tracking method |
CN112464757A (en) * | 2020-11-16 | 2021-03-09 | 复旦大学 | High-definition video-based target real-time positioning and track reconstruction method |
CN114937060A (en) * | 2022-04-26 | 2022-08-23 | 南京北斗创新应用科技研究院有限公司 | Monocular pedestrian indoor positioning prediction method guided by map meaning |
-
2022
- 2022-09-14 CN CN202211112747.7A patent/CN115205341A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521328A (en) * | 2011-12-06 | 2012-06-27 | 上海京颐信息科技有限公司 | Optimization method for track playback function in indoor positioning system |
CN111145223A (en) * | 2019-12-16 | 2020-05-12 | 盐城吉大智能终端产业研究院有限公司 | Multi-camera personnel behavior track identification analysis method |
CN112200106A (en) * | 2020-10-16 | 2021-01-08 | 中国计量大学 | Cross-camera pedestrian re-identification and tracking method |
CN112464757A (en) * | 2020-11-16 | 2021-03-09 | 复旦大学 | High-definition video-based target real-time positioning and track reconstruction method |
CN114937060A (en) * | 2022-04-26 | 2022-08-23 | 南京北斗创新应用科技研究院有限公司 | Monocular pedestrian indoor positioning prediction method guided by map meaning |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6828044B2 (en) | Route deviation recognition method, terminal, and storage medium | |
US8532367B2 (en) | System and method for 3D wireframe reconstruction from video | |
Hofmann et al. | Hypergraphs for joint multi-view reconstruction and multi-object tracking | |
US8180107B2 (en) | Active coordinated tracking for multi-camera systems | |
JP2022031902A (en) | Detection method, device and apparatus and storage medium for road events | |
KR20150124396A (en) | System and Method for Location Determination, Mapping, and Data Management through Crowdsourcing | |
US20150248759A1 (en) | Bundle Adjustment Based on Image Capture Intervals | |
CN107454108B (en) | A kind of network safety evaluation method based on Attack Defence effectiveness | |
CN112507953B (en) | Target searching and tracking method, device and equipment | |
Liu et al. | On directional k-coverage analysis of randomly deployed camera sensor networks | |
CN106780567B (en) | Immune particle filter extension target tracking method fusing color histogram and gradient histogram | |
JP4558600B2 (en) | Wake correlation integration device | |
JP2005353004A (en) | Vehicle traveling measurement system and vehicle tracking method | |
CN108495090A (en) | A kind of localization method of user equipment, device and its system | |
CN113887411A (en) | Personnel tracking method and device and personnel archiving method and device | |
CN115205341A (en) | Motion trajectory generation method based on A-Star | |
CN108957438B (en) | Random distance-based lag track association fusion method and system and application | |
Amanatiadis et al. | A fuzzy multi-sensor architecture for indoor navigation | |
RU2461019C1 (en) | Method of coordinate-connected identification using statistical evaluation of difference of spatial coordinates | |
WO2017101437A1 (en) | Inertial navigation cooperative locating method and locating device | |
KR101483549B1 (en) | Method for Camera Location Estimation with Particle Generation and Filtering and Moving System using the same | |
CN112344966B (en) | Positioning failure detection method and device, storage medium and electronic equipment | |
CN116996760A (en) | Video data processing method and device, computer readable medium and electronic equipment | |
US8149161B1 (en) | Method and system for azimuthal containment using largest gap method | |
CN117270692B (en) | Sight state prediction method, device and application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221018 |
|
RJ01 | Rejection of invention patent application after publication |