Track and live-action video superposition perspective fusion method and system based on dynamic label
By using the trajectory of dynamic tags and the real-scene video overlay perspective fusion method in video image measurement, the problem of large coordinate transformation calculations in video image measurement is solved, accurate trajectory tracking of dynamic targets and real-time position information processing are achieved, which improves the efficiency Video analytics accuracy and user experience.
Patent Information
- Application Number
- CN202410877765.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-02
AI Technical Summary
The existing technology involves complex coordinate transformations in video image measurement, which requires a large amount of calculations, is difficult to effectively express the real-time position information of dynamic targets, and lacks data processing capabilities for dynamic targets.
Using dynamic label-based trajectory and real-life video overlay perspective fusion methods and systems, by setting multiple calibration objects in the image collection area, obtain its comprehensive world three-dimensional coordinates, determine the coordinate system mapping relationship, and analyze and analyze the real-life video based on this Process and generate dynamic labels and motion trajectories of dynamic targets.
Significantly improves the accuracy and reliability of video analysis, realizes intelligent processing of live video, improves user experience and expands application scenarios, and determines color stable areas within dynamic target activity areas to improve the accuracy and efficiency of calibration object identification .
Smart Images

Figure CN118736022A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for superimposing and perspective fusion of trajectories and real-scene videos based on dynamic tags. Background Art
[0002] With the development of the times and the advancement of science and technology, especially the continuous deepening of artificial intelligence technology, the measurement and positioning technology has been transformed from traditional manual measurement methods and instrument measurement to computer vision measurement methods. Computer vision technology replaces human eyes with cameras and human brains with computers, which improves efficiency and automation. At the same time, computer vision technology has the characteristics of fast speed, large amount of information, and multiple functions, which makes it widely used in detection, measurement and control.
[0003] At present, the measurement targets constructed using video images are all through complex coordinate transformation between the video coordinate system and the actual coordinate system, which requires a lot of calculation. At the same time, there is a lack of data processing capabilities for dynamic targets, and it is impossible to effectively express the real-time position information of the target.
[0004] Therefore, it is necessary to provide a method and system for superimposing and fusion of trajectories and real-scene videos based on dynamic tags, so as to realize trajectory tracking of dynamic targets. Summary of the invention
[0005] The present invention provides a system for superimposing perspective fusion of trajectories and real-scene videos based on dynamic labels, comprising: a calibration object setting module, used to set multiple calibration objects in an image acquisition area and obtain the comprehensive world three-dimensional coordinates of each of the calibration objects; an image acquisition module, used to obtain a calibration image of the image acquisition area, wherein the calibration image includes images of the multiple calibration objects; a forward propagation module, used to determine a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates of each of the calibration objects and the calibration image; the image acquisition module is also used to obtain a real-scene video of the image acquisition area; a reverse reasoning module, used to determine the real position information of a dynamic target in the real-scene image for each frame of the real-scene video based on the coordinate system mapping relationship; a trajectory fusion module, used to generate a dynamic label and a motion trajectory of the dynamic target in each frame of the real-scene image based on the real position information of the dynamic target in the real-scene image, and generate a fused real-scene video based on the dynamic label and the motion trajectory of the dynamic target in each frame of the real-scene image.
[0006] Furthermore, the image acquisition module is also used to acquire a test video of the image acquisition area; the calibration object setting module sets a plurality of calibration objects in the image acquisition area, including: determining a dynamic target activity area of the image acquisition area based on the test video of the image acquisition area; determining a color stable area in the dynamic target activity area based on the test video of the image acquisition area; and setting a plurality of calibration objects based on the color stable area.
[0007] Furthermore, the calibration object setting module determines the color stable area in the dynamic target activity area based on the test video of the image acquisition area, including: sampling the test video of the image acquisition area to obtain multiple frames of test images; for each frame of the test image, dividing the dynamic target activity area image in the test image into multiple image blocks, calculating the RGB value discrete parameters of each image block, and determining the single-frame color stable area corresponding to the test image based on the RGB value discrete parameters of each image block according to a clustering algorithm; determining the color stable area in the dynamic target activity area based on the single-frame color stable area corresponding to each frame of the test image.
[0008] Furthermore, the forward propagation module determines a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates of each of the calibration objects and the calibration image, including: determining a first coordinate system mapping relationship between the comprehensive world three-dimensional coordinate system and the longitude and latitude coordinate system based on the comprehensive world three-dimensional coordinates and longitude and latitude coordinates of each of the calibration objects; and determining a second coordinate system mapping relationship between the camera coordinate system and the comprehensive world three-dimensional coordinate system based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module.
[0009] Furthermore, the forward propagation module determines a second coordinate system mapping relationship between the pixel coordinate system and the camera coordinate system based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module, including: obtaining an initial intrinsic parameter matrix of the image acquisition module through a calibration method; correcting the initial intrinsic parameter matrix based on an environmental adjustment coefficient and a structural adjustment coefficient to obtain an intrinsic parameter matrix; and determining a second coordinate system mapping relationship between the pixel coordinate system and the camera coordinate system based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module.
[0010] Furthermore, the forward propagation module determines the environmental adjustment coefficient and the structural adjustment coefficient, including: establishing a knowledge graph, wherein the knowledge graph is used to record the environmental adjustment coefficients of multiple sample cameras under multiple sample environments and the structural adjustment coefficients corresponding to the multiple sample cameras; obtaining the environmental information and camera structure information of the image acquisition module; and determining the environmental adjustment coefficient and the structural adjustment coefficient based on the environmental information and camera structure information of the image acquisition module and the knowledge graph.
[0011] Furthermore, the forward propagation module determines the environmental adjustment coefficient and the structural adjustment coefficient based on the environmental information and camera structure information of the image acquisition module and the knowledge graph, including: determining the target sample camera from the multiple sample cameras based on the camera structure information of the image acquisition module; determining the structural adjustment coefficient based on the knowledge graph and the target sample camera; determining the target sample environment based on the environmental information of the image acquisition module; determining the environmental adjustment coefficient based on the knowledge graph, the target sample environment and the target sample camera.
[0012] Furthermore, the forward propagation module determines the second coordinate system mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module, including: constructing a nonlinear least squares problem; calculating the reprojection error; establishing a constrained optimization model; solving the constrained optimization model to determine the second coordinate system mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system.
[0013] Furthermore, the reverse reasoning module determines the real position information of the dynamic target in the real-scene image based on the coordinate system mapping relationship, including: converting the pixel coordinates of the dynamic target in the real-scene image into camera coordinates according to the internal parameter matrix of the image acquisition module; converting the camera coordinates of the dynamic target in the real-scene image into comprehensive world three-dimensional coordinates according to the second coordinate system mapping relationship; converting the comprehensive world three-dimensional coordinates of the dynamic target in the real-scene image into longitude and latitude coordinates according to the first coordinate system mapping relationship.
[0014] The present invention provides a method for superimposing perspective fusion of trajectories and real-scene videos based on dynamic labels, comprising: setting a plurality of calibration objects in an image acquisition area, and obtaining a comprehensive world three-dimensional coordinate of each of the calibration objects; obtaining a calibration image of the image acquisition area, wherein the calibration image includes images of the plurality of calibration objects; determining a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinate of each of the calibration objects and the calibration image; obtaining a real-scene video of the image acquisition area; for each frame of the real-scene image of the real-scene video, determining the real position information of the dynamic target in the real-scene image based on the coordinate system mapping relationship; generating a dynamic label and a motion trajectory of the dynamic target in each frame of the real-scene image based on the real position information of the dynamic target in each frame of the real-scene image, and generating a fused real-scene video based on the dynamic label and the motion trajectory of the dynamic target in each frame of the real-scene image.
[0015] Compared with the prior art, the method and system for superimposing and fusion of trajectory and real-scene video based on dynamic tags provided in this specification have at least the following beneficial effects:
[0016] 1. By setting multiple calibration objects in the image acquisition area and obtaining their comprehensive world 3D coordinates, and then determining the coordinate system mapping relationship and applying it to the analysis and processing of real-scene videos, the accuracy and reliability of video analysis can be significantly improved, the intelligent processing of real-scene videos can be realized, and the user experience can be improved and the application scenarios can be expanded.
[0017] 2. By analyzing the test video, the areas where dynamic targets frequently move can be determined, which helps to detect and track these targets more accurately in the subsequent image acquisition process. The color stable areas can be further determined within the dynamic target activity areas, and the stable color features of these areas can be used to set the color features of multiple calibration objects, improving the accuracy and efficiency of calibration object recognition.
[0018] 3. Both the environment and the camera structure may affect the performance of the camera, thereby affecting the stability of the focal length. By determining the environmental adjustment coefficient and the structural adjustment coefficient and adjusting the focal length, the accuracy of the second coordinate system mapping relationship between the camera coordinate system and the comprehensive world three-dimensional coordinate system can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:
[0020] Figure 1 It is a module diagram of a dynamic tag-based trajectory and real-scene video superposition perspective fusion system shown in an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a first coordinate system mapping relationship shown in an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a mapping relationship between a camera coordinate system and a pixel coordinate system shown in an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of a knowledge graph shown in an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a second coordinate system mapping relationship shown in an embodiment of the present application;
[0025] Figure 6 It is a flow chart of a method for superimposing perspective fusion of trajectories and real-scene videos based on dynamic tags in one embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for describing the embodiments.
[0027] Figure 1 is a module diagram of a system for superimposing and fusion of trajectories and real-life video based on dynamic tags in an embodiment of the present application, such as Figure 1 As shown, the dynamic label-based trajectory and real-scene video superposition perspective fusion system can include a calibration object setting module, an image acquisition module, a forward propagation module, a reverse reasoning module and a trajectory fusion module.
[0028] The calibration object setting module can be used to set multiple calibration objects in the image acquisition area.
[0029] The image acquisition module is used to acquire the test video of the image acquisition area.
[0030] In some embodiments, the calibration object setting module sets a plurality of calibration objects in the image acquisition area, including:
[0031] Based on the test video of the image acquisition area, determine the dynamic target activity area of the image acquisition area;
[0032] Based on the test video of the image acquisition area, determine the color stable area in the dynamic target activity area;
[0033] Based on the color stable area, multiple calibration objects are set.
[0034] Specifically, the dynamic target activity area of the image acquisition area can be determined according to the following process:
[0035] Sampling the test video in the image acquisition area to obtain multiple frames of test images;
[0036] For each test image, the dynamic target active area image in the test image is divided into multiple image blocks, and the pixel RGB matrix of each image block is calculated, wherein the row vector of the pixel RGB matrix represents the RGB value of a row of pixels in the image block, and the column vector of the pixel RGB matrix represents the RGB value of a column of pixels in the image block;
[0037] For each image block, based on the matrix difference of the pixel RGB matrix of the image block in any two adjacent frames of the test image, the matrix difference discrete parameter corresponding to the image block is calculated, and the image block whose matrix difference discrete parameter is greater than the preset matrix difference discrete parameter threshold is taken as the target image block;
[0038] Based on the pixel distance between any two target acquired image blocks, the target acquired image blocks are fused to determine the dynamic target activity area.
[0039] For example, the matrix difference can be calculated based on the following formula:
[0040]
[0041] Among them, D (e,e-1) is the matrix difference of the pixel RGB matrix of the image block between the adjacent e-th frame test image and the e-1-th frame test image, RGB (e,(i,j)) is the RGB value of the pixel in the i-th row and j-th column of the pixel RGB matrix of the adjacent e-th frame test image of the image block, RGB (e-1,(i,j)) is the RGB value of the pixel in the i-th row and j-th column of the image block in the pixel RGB matrix of the adjacent e-1-th frame test image, I is the total number of elements of the row vector in the pixel RGB matrix, and J is the total number of elements of the column vector in the pixel RGB matrix.
[0042] The matrix difference discrete parameters are calculated based on the following formula:
[0043]
[0044] Among them, W1 is the matrix difference discrete parameter of the image block, and E is the total number of test images.
[0045] The image blocks acquired from two targets whose pixel distance is less than a preset pixel distance threshold can be fused.
[0046] In some embodiments, the calibration object setting module determines the color stable area in the dynamic target activity area based on the test video of the image acquisition area, including:
[0047] Sampling the test video in the image acquisition area to obtain multiple frames of test images;
[0048] For each test image, the dynamic target activity area image in the test image is divided into multiple image blocks, and the RGB value discrete parameters of each image block are calculated. Based on the RGB value discrete parameters of each image block, the single-frame color stable area corresponding to the test image is determined according to the clustering algorithm;
[0049] Based on the single-frame color stable region corresponding to each frame of the test image, a color stable region in the dynamic target activity region is determined.
[0050] Specifically, the RGB value discrete parameters of the image block can be calculated based on the following formula:
[0051]
[0052] Among them, W2 is the discrete parameter of the RGB value of the image block, RGB f is the RGB value of the fth pixel in the image block, and F is the total number of pixels included in the image block.
[0053] An image block whose RGB value discrete parameter is less than a preset RGB value discrete parameter threshold can be used as a color-stable image block, and color-stable image blocks whose pixel distance is less than a preset pixel distance threshold and whose RGB mean difference is less than a preset RGB mean difference threshold are fused according to a clustering algorithm to determine a single-frame color-stable area corresponding to the test image, wherein the RGB mean difference may be the difference between the RGB means of two image blocks, and the RGB mean may be the mean of the RGB values of the pixels included in the image block.
[0054] The overlapping area in the single-frame color stabilization area corresponding to each test image is determined as the color stabilization area in the dynamic target active area. For example, if there is an overlapping area D between the single-frame color stabilization area A of the first test image, the single-frame color stabilization area B of the second test image, and the single-frame color stabilization area C of the third test image, the overlapping area D is used as the color stabilization area.
[0055] It can be understood that by determining the color stable area, the color of the marker can be better determined so as to quickly determine the position of the marker, while in the area with chaotic colors, it is more difficult to detect the marker.
[0056] The calibration object setting module can also be used to obtain the comprehensive world three-dimensional coordinates of each calibration object.
[0057] For example, the calibration object setting module can obtain the comprehensive world three-dimensional coordinates of each calibration object through a real-time kinematic (RTK) positioning device.
[0058] The image acquisition module can be used to acquire a calibration image of the image acquisition area, wherein the calibration image includes images of multiple calibration objects.
[0059] The forward propagation module can be used to determine the coordinate system mapping relationship based on the comprehensive world 3D coordinates and calibration image of each calibration object.
[0060] In some embodiments, the forward propagation module determines the coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates and the calibration image of each calibration object, including:
[0061] Determine a first coordinate system mapping relationship between the integrated world three-dimensional coordinate system and the longitude and latitude coordinate system based on the integrated world three-dimensional coordinates and the longitude and latitude coordinates of each calibration object;
[0062] Based on the pixel coordinates of each calibration object and the intrinsic parameter matrix of the image acquisition module, a second coordinate system mapping relationship between the camera coordinate system and the comprehensive world three-dimensional coordinate system is determined.
[0063] Figure 2 is a schematic diagram of the first coordinate system mapping relationship shown in an embodiment of the present application, such as Figure 2 As shown, specifically, the point P on the ellipsoid is P0, then according to the properties of vector addition, we have:
[0064] P=P0+H·n
[0065] Where n is the normal unit vector of P0 on the ellipsoid surface.
[0066] The direction of a vector is the same at any position. Assuming there is a unit sphere (the radius of the sphere is unit 1), move the normal unit vector to the center of the sphere, and the normal unit vector is:
[0067]
[0068] So we have:
[0069]
[0070] Among them, B, L, and H represent latitude and longitude and altitude respectively, and a is the major semi-axis of the ellipsoid.
[0071] In some embodiments, the forward propagation module determines a second coordinate system mapping relationship between a pixel coordinate system and a camera coordinate system based on the pixel coordinates of each calibration object and an intrinsic parameter matrix of the image acquisition module, including:
[0072] Obtain the initial internal parameter matrix of the image acquisition module through the calibration method;
[0073] Correcting the initial internal parameter matrix based on the environmental adjustment coefficient and the structural adjustment coefficient to obtain the internal parameter matrix, wherein the internal parameter matrix may include focal length, pixel spacing, etc.;
[0074] Based on the pixel coordinates of each calibration object and the intrinsic parameter matrix of the image acquisition module, a second coordinate system mapping relationship between the pixel coordinate system and the camera coordinate system is determined.
[0075] Figure 3 is a schematic diagram of the mapping relationship between the camera coordinate system and the pixel coordinate system shown in an embodiment of the present application, such as Figure 3 As shown, the mapping relationship between the camera coordinate system and the pixel coordinate system can be:
[0076]
[0077] Among them, x, y represent image coordinates, Xc, Yc, Zc represent camera coordinates, and f represents focal length.
[0078] In some embodiments, the forward propagation module determines the environmental adjustment coefficient and the structural adjustment coefficient, including:
[0079] A knowledge graph is established, wherein the knowledge graph is used to record the environmental adjustment coefficients of various sample cameras under various sample environments and the structural adjustment coefficients corresponding to various sample cameras. Figure 4 is a schematic diagram of a knowledge graph shown in an embodiment of the present application, such as Figure 4 As shown, the structural adjustment coefficient corresponding to the sample camera 1 is k112, the environmental adjustment coefficient of the sample camera 1 in the sample environment 1 is k111, the environmental adjustment coefficient of the sample camera 1 in the sample environment 2 is k121, the structural adjustment coefficient corresponding to the sample camera 2 is k212, the environmental adjustment coefficient of the sample camera 2 in the sample environment 1 is k211, and the environmental adjustment coefficient of the sample camera 2 in the sample environment 3 is k231;
[0080] Obtaining environmental information of the image acquisition module (e.g., environmental humidity, environmental temperature, environmental dust concentration, environmental wind speed, etc.) and camera structure information (e.g., image sensor, aperture number, lens position and sensitivity, etc.);
[0081] Based on the environmental information and camera structure information of the image acquisition module and the knowledge graph, the environmental adjustment coefficient and the structural adjustment coefficient are determined.
[0082] Specifically, the environmental adjustment coefficients of various sample cameras under various sample environments and the structural adjustment coefficients corresponding to the various sample cameras may be determined by an experimental method.
[0083] In some embodiments, the forward propagation module determines the environment adjustment coefficient and the structure adjustment coefficient based on the environment information and camera structure information of the image acquisition module and the knowledge graph, including:
[0084] Determine a target sample camera from a plurality of sample cameras based on the camera structure information of the image acquisition module;
[0085] Determine the structural adjustment coefficient based on the knowledge graph and the target sample camera;
[0086] Determine the target sample environment based on the environmental information of the image acquisition module;
[0087] Based on the knowledge graph, the target sample environment and the target sample camera, the environmental adjustment coefficient is determined.
[0088] Specifically, for each sample camera, the structural similarity determination model can be used to calculate the structural similarity between the sample camera and the image acquisition module based on the camera structure information of the image acquisition module and the camera structure information of the sample camera, and the sample camera whose structural similarity is greater than a preset structural similarity threshold is used as the target sample camera, and the structural adjustment coefficient corresponding to the target sample camera is used as the structural adjustment coefficient of the image acquisition module. If there are sample cameras whose corresponding structural similarities are all greater than the preset structural similarity threshold, the sample camera with the largest structural similarity is selected as the target sample camera, wherein the structural similarity determination model can be a Convolutional Neural Network (CNN) model.
[0089] For each sample environment, the environment similarity determination model can be used to calculate the environment similarity corresponding to the sample environment based on the environment information of the image acquisition module and the sample environment, and the sample environment whose environment similarity is greater than the preset environment similarity threshold is used as the target sample environment, and the environment adjustment coefficient of the target sample environment corresponding to the target sample camera is used as the environment adjustment coefficient of the image acquisition module. Among them, the environment similarity determination model can be a long short-term memory network (Long Short-Term Memory, LSTM) model.
[0090] For example, the initial internal parameter matrix can be corrected based on the environmental adjustment coefficient and the structural adjustment coefficient according to the following formula:
[0091] f=k1×k2×f0
[0092] Among them, f is the corrected focal length, k1 is the environmental adjustment coefficient, k2 is the structural adjustment coefficient, and f0 is the initial focal length.
[0093] In some embodiments, the forward propagation module determines a second coordinate system mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system based on the pixel coordinates of each calibration object and the intrinsic parameter matrix of the image acquisition module, including:
[0094] Construct a nonlinear least squares problem. Specifically, the key to constructing a nonlinear least squares problem is to define an error function that describes the difference between the estimated parameters and the observed data. In camera calibration, this error function is the reprojection error. The goal of nonlinear least squares is to find a set of second coordinate system mapping relationships so that the sum of squared errors between the projection points and the observation points is minimized.
[0095] Calculate the reprojection error. Specifically, the reprojection error measures the difference between the position of a point in three-dimensional space projected onto the image plane by the camera parameters and the actual observed image point. First, the three-dimensional point is projected onto the image plane using the estimated camera parameters, and then the Euclidean distance or normalized distance between the projected point and the observed point is calculated. The sum of the squares of the reprojection errors of all N points is the objective function to be minimized.
[0096] Establish a constrained optimization model. Specifically, in determining the mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system, some constraints usually need to be met. For example, the rotation matrix must be an orthogonal matrix with a determinant of 1. These constraints can be achieved by adding corresponding constraints to the optimization problem. In addition, the reprojection error needs to be minimized. Therefore, an optimization model including these constraints and the reprojection error term can be constructed, which is a constrained optimization model.
[0097] The constrained optimization model is solved to determine the second coordinate system mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system.
[0098] Figure 5 is a schematic diagram of the second coordinate system mapping relationship shown in an embodiment of the present application, such as Figure 5 As shown,
[0099]
[0100] Among them, R is the rotation matrix, T is the translation vector, and Xw, Yw, and Zw represent the comprehensive world three-dimensional coordinates.
[0101] The image acquisition module can also be used to acquire real-scene video of the image acquisition area.
[0102] The reverse reasoning module can be used to determine the real position information of the dynamic target in each frame of the real-scene video based on the coordinate system mapping relationship.
[0103] In some embodiments, the reverse reasoning module determines the real position information of the dynamic target in the real scene image based on the coordinate system mapping relationship, including:
[0104] According to the internal parameter matrix of the image acquisition module, the pixel coordinates of the dynamic target in the real scene image are converted into camera coordinates;
[0105] According to the mapping relationship of the second coordinate system, the camera coordinates of the dynamic target in the real scene image are converted into comprehensive world three-dimensional coordinates;
[0106] According to the mapping relationship of the first coordinate system, the comprehensive world three-dimensional coordinates of the dynamic target in the real scene image are converted into longitude and latitude coordinates.
[0107] The trajectory fusion module can be used to generate dynamic labels and motion trajectories of dynamic targets in each frame of real scene images based on the real position information of dynamic targets in each frame of real scene images, and generate fused real scene videos based on the dynamic labels and motion trajectories of dynamic targets in each frame of real scene images. The dynamic labels can include the real-time latitude and longitude coordinates of the dynamic targets.
[0108] As an example only, the dynamic label-based trajectory and real-scene video superposition perspective fusion system can be applied to a large-scale seaside training ground. The image acquisition module includes a panoramic camera installed on a high tower by the sea to shoot the beach line and the jungle vegetation landforms on the shore, thereby realizing the trajectory tracking of dynamic targets (for example, vehicles, etc.) on the beach line.
[0109] Figure 6 FIG. 1 is a flow chart of a method for superimposing perspective fusion of a trajectory and a real-life video based on dynamic tags in an embodiment of the present application. Figure 6 As shown, the method for superimposing perspective fusion of trajectories and real-scene videos based on dynamic labels may include the following steps.
[0110] Step 610, setting a plurality of calibration objects in the image acquisition area, and obtaining the comprehensive world three-dimensional coordinates of each calibration object;
[0111] Step 620, obtaining a calibration image of the image acquisition area, wherein the calibration image includes images of a plurality of calibration objects;
[0112] Step 630, determining a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates of each calibration object and the calibration image;
[0113] Step 640, obtaining a real-scene video of the image acquisition area;
[0114] Step 650, for each frame of the real scene image of the real scene video, based on the coordinate system mapping relationship, determine the real position information of the dynamic target in the real scene image;
[0115] Step 660, based on the real position information of the dynamic target in each frame of the real scene image, generate the dynamic label and motion trajectory of the dynamic target in each frame of the real scene image, and based on the dynamic label and motion trajectory of the dynamic target in each frame of the real scene image, generate a fused real scene video.
[0116] The method for superimposing perspective fusion of trajectories and real-scene video based on dynamic tags can be executed by a system for superimposing perspective fusion of trajectories and real-scene video based on dynamic tags. For more descriptions of the method for superimposing perspective fusion of trajectories and real-scene video based on dynamic tags, please refer to the relevant description of the system for superimposing perspective fusion of trajectories and real-scene video based on dynamic tags, which will not be repeated here.
[0117] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.
Claims
1. A dynamic label-based trajectory and real-scene video superposition perspective fusion system, It is characterized in that include: A calibration object setting module, used to set a plurality of calibration objects in the image acquisition area and obtain the comprehensive world three-dimensional coordinates of each calibration object; An image acquisition module, used to acquire a calibration image of the image acquisition area, wherein the calibration image includes images of the multiple calibration objects; A forward propagation module, used for determining a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates of each of the calibration objects and the calibration image; The image acquisition module is also used to acquire the real-scene video of the image acquisition area; A reverse reasoning module, used for determining, for each frame of the real-scene image of the real-scene video, the real position information of the dynamic target in the real-scene image based on the coordinate system mapping relationship; The trajectory fusion module is used to generate dynamic labels and motion trajectories of dynamic targets in each frame of the real-scene image based on the real position information of the dynamic targets in each frame of the real-scene image, and to generate fused real-scene videos based on the dynamic labels and motion trajectories of the dynamic targets in each frame of the real-scene image.
2. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 1, It is characterized in that The image acquisition module is also used to acquire a test video of the image acquisition area; The calibration object setting module sets a plurality of calibration objects in the image acquisition area, including: Determining a dynamic target activity area of the image acquisition area based on a test video of the image acquisition area; Determining a color stable area in the dynamic target activity area based on a test video in the image acquisition area; Based on the color stable area, a plurality of calibration objects are set.
3. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 2, It is characterized in that The calibration object setting module determines the color stable area in the dynamic target activity area based on the test video of the image acquisition area, including: Sampling the test video in the image acquisition area to obtain multiple frames of test images; For each frame of the test image, the dynamic target activity area image in the test image is divided into a plurality of image blocks, the RGB value discrete parameter of each image block is calculated, and the single-frame color stable area corresponding to the test image is determined based on the RGB value discrete parameter of each image block according to a clustering algorithm; Based on the single-frame color stable region corresponding to each frame of the test image, a color stable region in the dynamic target activity region is determined.
4. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to any one of claims 1 to 3, It is characterized in that The forward propagation module determines a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates of each calibration object and the calibration image, including: Determine a first coordinate system mapping relationship between the integrated world three-dimensional coordinate system and the longitude and latitude coordinate system based on the integrated world three-dimensional coordinates and the longitude and latitude coordinates of each of the calibration objects; Based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module, a second coordinate system mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system is determined.
5. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 4, It is characterized in that The forward propagation module determines a second coordinate system mapping relationship between a pixel coordinate system and a camera coordinate system based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module, including: Obtaining an initial internal parameter matrix of the image acquisition module by a calibration method; Correcting the initial internal parameter matrix based on the environmental adjustment coefficient and the structural adjustment coefficient to obtain an internal parameter matrix; Based on the pixel coordinates of each of the calibration objects and the intrinsic parameter matrix of the image acquisition module, a second coordinate system mapping relationship between the pixel coordinate system and the camera coordinate system is determined.
6. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 5, It is characterized in that The forward propagation module determines the environmental adjustment coefficient and the structural adjustment coefficient, including: Establishing a knowledge graph, wherein the knowledge graph is used to record environmental adjustment coefficients of multiple sample cameras under multiple sample environments and structural adjustment coefficients corresponding to the multiple sample cameras; Acquire environmental information and camera structure information of the image acquisition module; Based on the environmental information and camera structure information of the image acquisition module and the knowledge graph, the environmental adjustment coefficient and the structure adjustment coefficient are determined.
7. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 6, It is characterized in that The forward propagation module determines the environment adjustment coefficient and the structure adjustment coefficient based on the environment information and camera structure information of the image acquisition module and the knowledge graph, including: Determining a target sample camera from the plurality of sample cameras based on the camera structure information of the image acquisition module; Determining the structure adjustment coefficient based on the knowledge graph and the target sample camera; Determining a target sample environment based on the environmental information of the image acquisition module; The environment adjustment coefficient is determined based on the knowledge graph, the target sample environment and the target sample camera.
8. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 5, It is characterized in that The forward propagation module determines a second coordinate system mapping relationship between a camera coordinate system and a comprehensive world three-dimensional coordinate system based on the pixel coordinates of each of the calibration objects and the internal parameter matrix of the image acquisition module, including: Formulate nonlinear least squares problems; Calculate the reprojection error; Establish constrained optimization models; The constrained optimization model is solved to determine a second coordinate system mapping relationship between the camera coordinate system and the integrated world three-dimensional coordinate system.
9. The system for superimposing and fusion of trajectory and real-scene video based on dynamic tags according to claim 4, It is characterized in that The reverse reasoning module determines the real position information of the dynamic target in the real scene image based on the coordinate system mapping relationship, including: According to the internal parameter matrix of the image acquisition module, the pixel coordinates of the dynamic target in the real scene image are converted into camera coordinates; According to the second coordinate system mapping relationship, the camera coordinates of the dynamic target in the real scene image are converted into comprehensive world three-dimensional coordinates; According to the first coordinate system mapping relationship, the comprehensive world three-dimensional coordinates of the dynamic target in the real scene image are converted into longitude and latitude coordinates.
10. A method of superimposing perspective fusion of trajectory and real-scene video based on dynamic labels, It is characterized in that include: Setting a plurality of calibration objects in the image acquisition area and obtaining the comprehensive world three-dimensional coordinates of each of the calibration objects; Acquire a calibration image of the image acquisition area, wherein the calibration image includes images of the plurality of calibration objects; Determining a coordinate system mapping relationship based on the comprehensive world three-dimensional coordinates of each of the calibration objects and the calibration image; Acquire a real-scene video of the image acquisition area; For each frame of the real-scene image of the real-scene video, based on the coordinate system mapping relationship, determine the real position information of the dynamic target in the real-scene image; Based on the real position information of the dynamic target in each frame of the real-scene image, the dynamic label and motion trajectory of the dynamic target in each frame of the real-scene image are generated, and based on the dynamic label and motion trajectory of the dynamic target in each frame of the real-scene image, a fused real-scene video is generated.
