Video-based motion trajectory reproduction system and method

Through video analysis and feature point detection technology, motion trajectories are generated, which solves the difficulty of trajectory recording caused by weak signals or inconvenient portable equipment in the existing technology, and achieves accurate trajectory reproduction and analysis during motion.

CN118429868BActive Publication Date: 2024-08-30GUANGZHOU JOYRUN INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410873928.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-30
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

In the existing technology, motion trajectory analysis and reproduction usually rely on positioning signals such as satellites, base stations, and WiFi, making it difficult to achieve accurate trajectory recording and reproduction when the signal is weak or it is inconvenient to carry a positioning device.

Method used

A video-based motion trajectory reproduction system is used to capture videos through the camera module. The video analysis module analyzes the video frame content, combines feature point detection and optical flow algorithms, calculates the movement direction and speed, generates trajectories, and uses camera parameters and shooting height for correction. , to achieve the reappearance of the trajectory.

Benefits of technology

Without relying on signals such as satellite positioning, it can accurately record and reproduce motion trajectories, solving the problem of missing positioning trajectories caused by weak signals or inconvenient portable equipment, and providing more reliable motion data recording and analysis capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118429868B
    Figure CN118429868B
Patent Text Reader

Abstract

The present invention discloses a video-based motion trajectory reproduction system and method, and relates to the technical field of motion trajectory analysis, comprising a camera module, a video analysis module, a trajectory generation module, a camera parameter acquisition module, a shooting height setting module, and a speed calculation module; the camera module is used to follow the movement of a user to perform horizontal shooting to obtain a moving video; the video-based motion trajectory reproduction system and method, by setting the camera module, the video analysis module, the trajectory generation module, the camera parameter acquisition module, the shooting height setting module, the speed calculation module, etc., can achieve the situation that the camera moves with the user, through the captured moving video, the user's moving trajectory is analyzed, so that when carrying a shooting device such as a sports camera to record the moving process, it is inconvenient to carry a positioning device, or the signal is weak and accurate positioning cannot be achieved, resulting in the loss of the positioning trajectory, the trajectory can be corrected and supplemented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motion trajectory analysis, and in particular to a video-based motion trajectory reproduction system and method. Background Art

[0002] Sports are various activities that have been gradually developed in the process of human development to consciously cultivate one's physical fitness. Various ways of walking, running, cycling, climbing, etc. are adopted to exercise the body. Some athletes will record exercise information such as the trajectory of the exercise during exercise, so that they can check the exercise status after the exercise and adjust the exercise status according to the exercise status to achieve better exercise results.

[0003] The prior art with publication number CN112857357B discloses a trajectory movement analysis system based on data visualization, the trajectory movement analysis system includes a route information acquisition module, a route data storage module, a merchant consumption record retrieval module, a familiar merchant judgment module, a familiar merchant storage module, a merchant input module, a merchant location acquisition module, and a merchant location navigation module, and its beneficial effects are: obtaining the location change information of the user in any time period on each travel route of the user through the user's route information, determining whether any merchant is a merchant familiar to the user based on the location change information and the number of consumption records of the user in any merchant, storing the merchants determined to be familiar to the user, and obtaining the name and location of the merchant that the user wants to go to this time, using the location of the familiar merchant as a reference location, navigating to the location of the merchant that the user wants to go to this time, thereby improving the travel efficiency of the user.

[0004] However, trajectory analysis and reproduction in the prior art are usually achieved by positioning through radio signals such as satellites, base stations, WiFi, etc., and constantly updating the positioning information, or by analyzing the moving speed and direction through acceleration. However, some athletes also like to use video equipment, such as sports cameras, to record the exercise process during exercise. In some cases, it may be inconvenient to carry a positioning device, or the signal is weak and accurate positioning cannot be achieved, resulting in the loss of positioning trajectory. Summary of the invention

[0005] The purpose of the present invention is to provide a video-based motion trajectory reproduction system and method to solve the above-mentioned deficiencies in the prior art.

[0006] In order to achieve the above-mentioned object, the present invention provides the following technical solutions: a video-based motion trajectory reproduction system, comprising a camera module, a video analysis module, a trajectory generation module, a camera parameter acquisition module, a shooting height setting module, and a speed calculation module;

[0007] The camera module is used to follow the movement of the user to shoot horizontally and obtain a moving video. When shooting, the camera module follows the movement of the user to shoot the video. For example, the camera module can be hung on the chest to shoot a first-person video during exercise, or the camera module can be fixed above the rear of the vehicle through a shooting extension rod when riding to shoot a third-person video, so that the user's moving direction can be captured; horizontal shooting means keeping the camera module horizontal during shooting; the camera module can be a sports camera, a camera phone, etc.

[0008] The video analysis module is used to determine the moving direction of the camera module at the time corresponding to the image of each image frame by analyzing and comparing the image contents of different image frames in the moving video, and obtain the moving direction data;

[0009] The video analysis module is also used to identify roads in the mobile video based on the target detection model, and to determine the passing roads by comparing the image contents of different image frames in the mobile video;

[0010] The trajectory generation module is used to simulate the moving direction of the moving direction data on the passing road to move and generate a moving trajectory;

[0011] The camera parameter acquisition module is used to acquire the camera sensor width of the camera module and the shooting focal length when shooting the mobile video to obtain the camera parameters, wherein the camera sensor width can be acquired by querying the factory detailed parameters of the camera module, and the shooting focal length can be acquired through the shooting parameter information;

[0012] The shooting height setting module is used for the user to input the height for shooting the mobile video, and obtain the height from the ground. For example, when the user places the camera module in front of the chest when shooting the mobile video, the height from the ground is the distance from the ground to the camera module placed in front of the chest;

[0013] The speed calculation module is used to obtain and save the ground pixel width of the ground at a first set pixel distance from the bottom of the image frame of the mobile video captured by the camera module at a height above the ground, and the actual ground width;

[0014] The speed calculation module is also used to obtain the ground distance based on the ground pixel width, the actual ground width, and the shooting focal length, wherein the ground distance is the horizontal distance from the ground at a first set pixel distance from the bottom of the image in the image frame of the mobile video captured by the camera module at a height above the ground to the camera module;

[0015] The speed calculation module is also used to obtain the time of passing the ground distance to obtain the moving time, which can be obtained by marking the ground pixel width of the ground at the first set pixel distance from the bottom of the image in the image of the moving video, and obtaining the marked ground, and calculating the time difference between the time of shooting the marked ground and the time when the camera module moves to the marked ground, and the obtained time length is the moving time;

[0016] The speed calculation module is further used to calculate the moving speed based on the ground distance and the moving time, and the moving speed is the speed of passing the ground distance.

[0017] Furthermore, the video analysis module determines the moving direction of the camera module at the time corresponding to the image of each image frame by analyzing and comparing the image contents of different image frames in the moving video, and obtains the moving direction data, which specifically includes the following steps:

[0018] Select an image frame from the mobile video to obtain a reference image frame;

[0019] Based on a feature point detection algorithm, the image frame is detected to obtain feature points of the image frame, wherein the feature point detection algorithm can use Harris corner point detection, FAST feature detector, ORB feature detector, etc.;

[0020] From the feature points, multiple feature points with the highest contrast are selected to obtain contrast feature points, and the pixel coordinates of the contrast feature points in the reference image frame are obtained to obtain reference coordinates. The purpose is to select stable feature points to facilitate finding the selected feature points in subsequent image frames. Corner points, edges, etc. can also be selected; the number of feature points with high contrast that need to be selected can be customized according to actual needs;

[0021] Select an image frame from the image frames following the reference image frame to obtain a comparison image frame;

[0022] Tracking the position of the contrast feature point in the contrast image frame based on an optical flow algorithm or a feature matching algorithm, obtaining the pixel coordinates of the contrast feature point in the contrast image frame, and obtaining the contrast coordinates, wherein the optical flow algorithm may adopt the Lucas-Kanade optical flow method, and the feature matching algorithm may adopt descriptor-based matching, such as ORB descriptor;

[0023] Calculate the vector from the comparison coordinate to the reference coordinate to obtain the displacement vector; if only one comparison feature point is selected to calculate the displacement vector, the displacement vector is directly output; if multiple comparison feature points are selected to calculate the displacement vectors respectively, the vector obtained by adding all the displacement vectors and dividing by the number of displacement vectors is output;

[0024] The direction angle of the displacement vector is calculated to obtain the moving direction data from the reference image frame to the comparison image frame. When calculating the direction angle of the displacement vector, the top of the image frame is regarded as north and the right is regarded as east. When the direction angle is converted into moving direction data, north is forward, south is backward, west is left, and east is right.

[0025] Furthermore, the comparison image frame and the reference image frame are separated by a set number of frames, wherein the set number of frames can be set according to actual needs. If the set number of frames is 0, it means that the comparison image frame and the reference image frame are adjacent frames.

[0026] Furthermore, the speed calculation module is also used to perform regression analysis on the height above the ground and the actual width of the ground under each camera parameter when the camera parameters are known, so as to obtain a calculation model for the actual width of the ground under the corresponding camera parameters, and to calculate the actual width of the ground based on the height above the ground under the corresponding camera parameters, that is, the parameters of the corresponding actual width calculation model under different camera parameters are also different, that is, there are multiple actual width calculation models for the ground.

[0027] Furthermore, the speed calculation module is also used to obtain the time to pass the ground distance to obtain the moving time, which specifically includes the following steps:

[0028] Select an image frame as an initial image frame;

[0029] Acquire a contrast feature point in the initial image frame that is greater than a first set pixel distance from the bottom of the image to obtain a speed feature point;

[0030] Acquire the position of the speed feature point in the initial image frame, continue to acquire the position of the speed feature point in each subsequent image frame, calculate the pixel distance between the position of the speed feature point in each subsequent image frame and the position in the initial image frame, and obtain the pixel movement distance;

[0031] When the pixel moving distance is just greater than or equal to the first set pixel distance, the image frame where the velocity feature point is located at this time is obtained to obtain a node image frame;

[0032] Get the number of frames and frame rate between the node image frame and the initial image frame;

[0033] Based on the number of frames between the node image frame and the initial image frame, and the frame rate, the duration from the initial image frame to the node image frame is calculated to obtain the movement time.

[0034] Furthermore, the system also includes a positioning module and a map matching module;

[0035] The positioning module is used to obtain the coordinate information of the location of the camera module;

[0036] The map matching module is used to obtain the electronic map corresponding to the coordinate information of the camera module;

[0037] The map matching module is also used to obtain the moving track and the moving speed and moving time corresponding to each part of the moving track, calculate the length of each part of the moving track, and match the moving track after the calculated length to the electronic map.

[0038] Furthermore, the system also includes a positioning correction module, which is used to detect whether the positioning module is abnormal, and when the positioning module is abnormal, correct and supplement the positioning by calculating the moving trajectory after the length.

[0039] The video-based motion trajectory reproduction method includes the following steps:

[0040] Acquire the camera parameters of the camera module, test the relationship between the actual ground width and the height of the camera module from the ground under various camera parameters, and obtain a calculation model for the actual ground width;

[0041] Wear the camera module so that it can shoot horizontally, and input the height of the camera module from the ground during shooting;

[0042] Start shooting;

[0043] The speed calculation module obtains the actual ground width based on the actual ground width calculation model and the height above the ground;

[0044] The image content of the image frame of the moving video is analyzed by the video analysis module to obtain the moving direction of the camera module;

[0045] Generate a moving trajectory based on the moving direction and the time corresponding to the moving direction through a trajectory generation module;

[0046] The moving speed at each point of the moving trajectory is calculated through the speed calculation module.

[0047] Compared with the prior art, the video-based motion trajectory reproduction system and method provided by the present invention, by setting a camera module, a video analysis module, a trajectory generation module, a camera parameter acquisition module, a shooting height setting module, a speed calculation module, etc., can analyze the user's movement trajectory through the captured moving video when the camera moves with the user, so as to correct and supplement the trajectory when carrying a shooting device such as a sports camera to record the movement process, and it is inconvenient to carry a positioning device, or the signal is weak and accurate positioning cannot be achieved, resulting in the loss of the positioning trajectory. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0049] Figure 1 A system structure block diagram provided for an embodiment of the present invention;

[0050] Figure 2 A diagram of the method steps provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0052] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0053] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined. In addition, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0054] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.

[0055] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0056] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0057] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.

[0058] The embodiments described herein may be described with reference to plan views and / or cross-sectional views by means of idealized schematic diagrams of the present disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the accompanying drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the accompanying drawings have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.

[0059] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0060] See also Figure 1-Figure 2 ,The motion trajectory reproduction system based on video includes a camera module, a video analysis module, a trajectory generation module, a camera parameter acquisition module, a shooting height setting module, and a speed calculation module;

[0061] The camera module is used to shoot horizontally following the movement of the user to obtain a moving video. When shooting, the camera module follows the movement of the user to shoot the video. For example, the camera module can be hung on the chest to shoot a first-person video during exercise, or the camera module can be fixed above the rear of the vehicle through a shooting extension rod when riding to shoot a third-person video, so that the user's moving direction can be captured; horizontal shooting means keeping the camera module horizontal during shooting; the camera module can be a sports camera, a camera phone, etc.

[0062] The video analysis module is used to determine the moving direction of the camera module at the time corresponding to the image of each image frame by analyzing and comparing the image content of different image frames in the moving video, and obtain the moving direction data, which specifically includes the following steps:

[0063] (1) Select an image frame from the moving video to obtain a reference image frame;

[0064] (2) Based on the feature point detection algorithm, the image frame is detected to obtain the feature points of the image frame. The feature point detection algorithm can use Harris corner detection, FAST feature detector, ORB feature detector, etc.

[0065] (3) Select multiple feature points with the highest contrast from the feature points to obtain contrast feature points, and obtain the pixel coordinates of the contrast feature points in the reference image frame to obtain reference coordinates. The purpose is to select stable feature points to facilitate finding the selected feature points in subsequent image frames. Corner points, edges, etc. can also be selected. The number of feature points with high contrast to be selected can be customized according to actual needs.

[0066] (4) selecting an image frame from the image frames after the reference image frame to obtain a comparison image frame, wherein the comparison image frame and the reference image frame are separated by a set number of frames, wherein the set number of frames can be set according to actual needs. If the set number of frames is 0, it means that the comparison image frame and the reference image frame are adjacent frames;

[0067] (5) Tracking the position of the contrast feature point in the contrast image frame based on an optical flow algorithm or a feature matching algorithm, obtaining the pixel coordinates of the contrast feature point in the contrast image frame, and obtaining the contrast coordinates, wherein the optical flow algorithm may adopt the Lucas-Kanade optical flow method, and the feature matching algorithm may adopt descriptor-based matching, such as ORB descriptor;

[0068] (6) Calculate the vector from the comparison coordinate to the reference coordinate to obtain the displacement vector; if only one comparison feature point is selected to calculate the displacement vector, the displacement vector is directly output; if multiple comparison feature points are selected to calculate the displacement vectors respectively, the vector obtained by adding all the displacement vectors and dividing by the number of displacement vectors is output;

[0069] (7) Calculate the direction angle of the displacement vector to obtain the moving direction data from the reference image frame to the comparison image frame. When calculating the direction angle of the displacement vector, the top of the image frame is regarded as north and the right is regarded as east. When the direction angle is converted into moving direction data, north is forward, south is backward, west is left, and east is right. For example, the displacement vector = , then the direction angle is due north, and the moving direction data is forward; displacement vector = , the direction angle is 45 degrees north-east, and the moving direction data is moving 45 degrees forward and to the right.

[0070] The video analysis module is also used to identify roads in the mobile video based on the target detection model, and to judge the passing roads by comparing the image contents of different image frames in the mobile video. For example, an image frame captures a three-way intersection ahead, and the three forks are Fork 1, Fork 2, and Fork 3. Fork 1 is the road where the camera module is located. A subsequent image frame captures Fork 2 in the middle of the image frame, and Fork 3 is located on the left or right of the image frame. Fork 1 is a road that has been passed and is located behind the camera module and cannot be captured. A subsequent image frame captures only Fork 2 among the three forks. It can be judged that the vehicle is moving towards Fork 2, and the passing roads are Fork 1 and Fork 2. At the same time, the moving direction at the same time can be obtained when entering a new fork to determine the position and direction relationship between the forks. The target monitoring model is a pre-trained model.

[0071] The trajectory generation module is used to simulate the moving direction of the moving direction data on the passing road to generate a moving trajectory;

[0072] The camera parameter acquisition module is used to obtain the camera sensor width of the camera module and the shooting focal length when shooting mobile video to obtain the camera parameters, wherein the camera sensor width can be obtained by querying the factory detailed parameters of the camera module, and the shooting focal length can be obtained through the shooting parameter information;

[0073] The shooting height setting module is used for the user to input the height for shooting the mobile video, and obtain the height from the ground. For example, when the user places the camera module in front of the chest when shooting the mobile video, the height from the ground is the distance from the ground to the camera module placed in front of the chest;

[0074] The speed calculation module is used to obtain and save the ground pixel width of the ground at the first set pixel distance at the bottom of the image frame of the moving video captured by the camera module at the height above the ground, and the actual ground width;

[0075] The speed calculation module is also used to obtain the ground distance based on the ground pixel width, the actual ground width, and the shooting focal length, where the ground distance is the horizontal distance from the ground at a first set pixel distance from the bottom of the image in the image frame of the mobile video captured by the camera module at the height above the ground to the camera module;

[0076] The speed calculation module is also used to obtain the time of passing the ground distance to obtain the moving time. The ground pixel width of the ground at the first set pixel distance from the bottom of the image in the image of the moving video is marked to obtain the marked ground. The time difference between the time of shooting the marked ground and the time when the camera module moves to the marked ground is calculated. The obtained duration is the moving time, which specifically includes the following steps:

[0077] (1) Select an image frame as the initial image frame;

[0078] (2) obtaining, in the initial image frame, a contrast feature point whose distance from the bottom of the image is greater than a first set pixel distance, and obtaining a velocity feature point;

[0079] (3) Obtaining the position of the velocity feature point in the initial image frame, continuously obtaining the position of the velocity feature point in each subsequent image frame, calculating the pixel distance between the position of the velocity feature point in each subsequent image frame and the position in the initial image frame, and obtaining the pixel movement distance;

[0080] (4) When the pixel moving distance is just greater than or equal to the first set pixel distance, the image frame where the velocity feature point is located at this time is obtained to obtain the node image frame;

[0081] (5) Obtain the number of frames and frame rate between the node image frame and the initial image frame;

[0082] (6) Based on the number of frames between the node image frame and the initial image frame, and the frame rate, the duration from the initial image frame to the node image frame is calculated to obtain the movement time.

[0083] The speed calculation module is also used to calculate the moving speed based on the ground distance and the moving time. The moving speed is the speed of passing through the ground distance. Because when the focal length and other parameters of the camera module are known, and the actual width of the photographed object and the pixel width in the photographed image are known, the distance of the photographed object can be calculated by the formula, which is equivalent to calculating the length of the road between the camera module and the photographed object; and at this time, the height above the ground when the camera module is photographed is obtained to determine the actual width of the ground corresponding to the ground pixel width, because under the same shooting parameters, the ground at the same distance photographed by the camera module, when the height of the camera module is different when the camera module is photographed, the pixel distance from the bottom of the image in the captured image is different, that is, when the height of the camera module is different when the camera module is photographed, the actual width of the ground corresponding to the set distance from the bottom of the image in the captured image is also different, so it is necessary to determine the actual width of the ground corresponding to the ground pixel width by obtaining the height above the ground when the camera module is photographed. The relationship between the actual width of the ground and the height above the ground of the camera module can be analyzed by testing the ground at each height above the ground of the camera module, and the ground at the set distance from the bottom of the image in the captured image corresponds to the actual width of the ground.

[0084] The speed calculation module is also used to perform regression analysis on the height above the ground and the actual width of the ground under various camera parameters when the camera parameters are known, so as to obtain a calculation model for the actual width of the ground under the corresponding camera parameters, and to calculate the actual width of the ground based on the height above the ground under the corresponding camera parameters, that is, the parameters of the corresponding actual width calculation model under different camera parameters are also different, that is, there are multiple actual width calculation models for the ground.

[0085] The system also includes a positioning module and a map matching module;

[0086] The positioning module is used to obtain the coordinate information of the location of the camera module;

[0087] The map matching module is used to obtain the electronic map corresponding to the coordinate information of the camera module;

[0088] The map matching module is also used to obtain the moving track and the moving speed and moving time corresponding to each part of the moving track, calculate the length of each part of the moving track, and match the moving track after the calculated length to the electronic map.

[0089] The system also includes a positioning correction module, which is used to detect whether the positioning module is abnormal, and when the positioning module is abnormal, correct and supplement the positioning by calculating the moving trajectory after the length.

[0090] The video-based motion trajectory reproduction method includes the following steps:

[0091] Obtaining the camera parameters of the camera module, testing the relationship between the actual ground width and the height of the camera module from the ground under various camera parameters, and obtaining a calculation model for the actual ground width;

[0092] Wear the camera module so that it can shoot horizontally, and input the height of the camera module from the ground during shooting;

[0093] Start shooting;

[0094] The speed calculation module obtains the actual ground width based on the ground actual width calculation model and the height above the ground;

[0095] The image content of the image frame of the moving video is analyzed by the video analysis module to obtain the moving direction of the camera module;

[0096] Generate a moving trajectory based on the moving direction and the time corresponding to the moving direction through a trajectory generation module;

[0097] The moving speed at each point of the moving trajectory is calculated through the speed calculation module.

[0098] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A video-based motion trajectory reproduction system, characterized by: It includes a camera module, a video analysis module, a trajectory generation module, a camera parameter acquisition module, a shooting height setting module, and a speed calculation module; The camera module is used to follow the movement of the user to perform horizontal shooting and obtain moving video; The video analysis module is used to determine the moving direction of the camera module at the time corresponding to the image of each image frame by analyzing and comparing the image contents of different image frames in the moving video, and obtain the moving direction data; The video analysis module is also used to identify roads in the mobile video based on the target detection model, and to determine the passing roads by comparing the image contents of different image frames in the mobile video; The trajectory generation module is used to simulate the moving direction of the moving direction data on the passing road to move and generate a moving trajectory; The camera parameter acquisition module is used to acquire the camera sensor width of the camera module and the shooting focal length when shooting the mobile video to obtain the camera parameters; The shooting height setting module is used for the user to input and set the height when shooting the mobile video to obtain the height above the ground; The speed calculation module is used to obtain and save the ground pixel width of the ground at a first set pixel distance from the bottom of the image frame of the mobile video captured by the camera module at a height above the ground, and the actual ground width; The speed calculation module is also used to obtain the ground distance based on the ground pixel width, the actual ground width, and the shooting focal length, wherein the ground distance is the horizontal distance from the ground at a first set pixel distance from the bottom of the image in the image frame of the mobile video captured by the camera module at a height above the ground to the camera module; The speed calculation module is also used to obtain the time of passing the ground distance to obtain the moving time; The speed calculation module is further used to calculate the moving speed based on the ground distance and the moving time, and the moving speed is the speed of passing the ground distance.

2. The video-based motion trajectory reproduction system according to claim 1, characterized in that: The video analysis module determines the moving direction of the camera module at the time corresponding to the image of each image frame by analyzing and comparing the image contents of different image frames in the moving video, and obtains the moving direction data, which specifically includes the following steps: Select an image frame from the mobile video to obtain a reference image frame; Based on a feature point detection algorithm, the image frame is detected to obtain feature points of the image frame; Selecting a plurality of feature points with the highest contrast from the feature points to obtain contrast feature points, and acquiring pixel coordinates of the contrast feature points in the reference image frame to obtain reference coordinates; Select an image frame from the image frames following the reference image frame to obtain a comparison image frame; Tracking the position of the contrast feature point in the contrast image frame based on an optical flow algorithm or a feature matching algorithm, acquiring the pixel coordinates of the contrast feature point in the contrast image frame, and obtaining the contrast coordinates; Calculate the vector from the comparison coordinate to the reference coordinate to obtain the displacement vector; The direction angle of the displacement vector is calculated to obtain the moving direction data from the reference image frame to the comparison image frame.

3. The video-based motion trajectory reproduction system according to claim 2, characterized in that: The comparison image frame and the reference image frame are separated by a set number of frames.

4. The video-based motion trajectory reproduction system according to claim 1, characterized in that: The speed calculation module is also used to perform regression analysis on the height above the ground and the actual width of the ground under each camera parameter when the camera parameters are known, so as to obtain a calculation model for the actual width of the ground under the corresponding camera parameters, and to calculate the actual width of the ground based on the height above the ground under the corresponding camera parameters.

5. The video-based motion trajectory reproduction system according to claim 2, characterized in that: The speed calculation module is also used to obtain the time of passing the ground distance to obtain the moving time, which specifically includes the following steps: Select an image frame as an initial image frame; Acquire a contrast feature point in the initial image frame that is greater than a first set pixel distance from the bottom of the image to obtain a speed feature point; Acquire the position of the speed feature point in the initial image frame, continue to acquire the position of the speed feature point in each subsequent image frame, calculate the pixel distance between the position of the speed feature point in each subsequent image frame and the position in the initial image frame, and obtain the pixel movement distance; When the pixel moving distance is just greater than or equal to the first set pixel distance, the image frame where the velocity feature point is located at this time is obtained to obtain a node image frame; Get the number of frames and frame rate between the node image frame and the initial image frame; Based on the number of frames between the node image frame and the initial image frame, and the frame rate, the duration from the initial image frame to the node image frame is calculated to obtain the movement time.

6. The video-based motion trajectory reproduction system according to claim 1, characterized in that: The system also includes a positioning module and a map matching module; The positioning module is used to obtain the coordinate information of the location of the camera module; The map matching module is used to obtain the electronic map corresponding to the coordinate information of the camera module; The map matching module is also used to obtain the moving track and the moving speed and moving time corresponding to each part of the moving track, calculate the length of each part of the moving track, and match the moving track after the calculated length to the electronic map.

7. The video-based motion trajectory reproduction system according to claim 6, characterized in that: The system also includes a positioning correction module, which is used to detect whether the positioning module is abnormal, and when the positioning module is abnormal, correct and supplement the positioning by calculating the moving trajectory after the length.

8. A video-based motion trajectory reproduction method, applicable to the video-based motion trajectory reproduction system according to any one of claims 1 to 7, characterized in that: The following steps are involved: Acquire the camera parameters of the camera module, test the relationship between the actual ground width and the height of the camera module from the ground under various camera parameters, and obtain a calculation model for the actual ground width; Wear the camera module so that it can shoot horizontally, and input the height of the camera module from the ground during shooting; Start shooting; The speed calculation module obtains the actual ground width based on the actual ground width calculation model and the height above the ground; The image content of the image frame of the moving video is analyzed by the video analysis module to obtain the moving direction of the camera module; Generate a moving trajectory based on the moving direction and the time corresponding to the moving direction through a trajectory generation module; The moving speed at each point of the moving trajectory is calculated through the speed calculation module.

Citation Information

Patent Citations

  • A trajectory movement analysis system based on data visualization

    CN112857357B

  • Method for recognizing human motion behavior in video

    CN105069434A

  • Driver lane-changing behavior analysis method based on aerial photography video vehicle trajectory

    CN109544909A