Three-dimensional trajectory smoothing method, device, equipment and storage medium
By calculating the initial signal-to-noise ratio of the three-dimensional data trajectory and cyclically performing dimensional reduction estimation and smoothing of matrix P, the problems of data volume loss and high-frequency information filtering in the prior art are solved, and efficient three-dimensional trajectory smoothing processing is achieved.
Patent Information
- Application Number
- CN202111238325.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-15
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2039-08-15
AI Technical Summary
The existing three-dimensional trajectory smoothing processing methods are prone to loss of data volume, especially when the target object moves fast and has a large amplitude, the digital filtering method mistakenly believes that high-frequency information is filtered as noise, and the nonlinear optimization method has a large calculation amount and high power consumption.
By calculating the initial signal-to-noise ratio of the target three-dimensional data trajectory, if it is greater than the threshold SNR, the matrix P is dimensionally reduced and the smoothing process is performed, and the signal-to-noise ratio after the smoothing process is greater than the threshold SNR until it stops when it is not greater than the threshold SNR.
It realizes smoothing processing while keeping the signal-to-noise ratio greater than the threshold, avoids filtering of high-frequency information, reduces data loss, and controls processing power consumption.
Smart Images

Figure CN114037621B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional technology, and in particular to a three-dimensional trajectory smoothing processing method, device, equipment and computer-readable storage medium. Background Art
[0002] At present, three-dimensional technology is used to build scenes and even record the movement trajectories of some targets. However, due to noise interference, the collected data may be highly volatile. In order to solve this problem, the commonly used method is to perform noise reduction (i.e., smoothing) on the collected data, such as digital filtering methods and nonlinear optimization methods. However, digital filtering can easily mistake feature points of high-frequency information for noise and filter them out. For example, when the target object moves too fast and with a large amplitude, these data information are often easily lost during the data noise reduction process, resulting in the loss of some important information and the inability to obtain an accurate three-dimensional trajectory. Nonlinear operations have a large amount of computation and will take up more processing power. Therefore, it is necessary to develop a smoothing method that can avoid the above problems. Summary of the invention
[0003] The main purpose of the present invention is to provide a three-dimensional trajectory smoothing processing method, device, equipment and computer-readable storage medium, aiming to solve the technical problem that the current smoothing processing method will cause data loss.
[0004] To achieve the above object, the present invention provides a three-dimensional trajectory smoothing method, the method comprising the following steps:
[0005] Tracking target 3D data trajectory c , extract the F frame data information to be processed r c,1 、r c,2 …r c,F ;
[0006] Calculate the original trajectory energy according to the F frame data information, and construct the corresponding matrix P, wherein the original trajectory energy is the energy of the three-dimensional data trajectory that has not been smoothed;
[0007] Setting a threshold SNR and an initial noise trajectory energy, and calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy;
[0008] When the initial signal-to-noise ratio is greater than the threshold SNR, a dimension reduction estimation is performed on the matrix P, and a smoothing process is performed on the three-dimensional data trajectory according to the estimation, and it is determined whether the signal-to-noise ratio after the smoothing process is greater than the threshold SNR;
[0009] If the signal-to-noise ratio is greater than the threshold SNR, the smoothing process is performed repeatedly;
[0010] If the signal-to-noise ratio is not greater than the threshold SNR, the loop ends and the final smoothed data is output.
[0011] In another embodiment of the present invention, the F frame data information includes three-dimensional space coordinate values.
[0012] In another embodiment of the present invention, the matrix P is constructed as follows: Among them, when F is an odd frame number, When F is an even frame number,
[0013] In another embodiment of the present invention, calculating the original trajectory energy according to the F frame data information includes:
[0014] According to the average energy calculation formula, the original trajectory energy is calculated The formula is: Where F is the number of frames, r c,i is the 3D trajectory data of the i-th frame, ‖ ‖ F is the Frobenius norm.
[0015] In another embodiment of the present invention, the setting of the threshold SNR and the initial noise trajectory energy, and calculating the initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy comprises:
[0016] Let the initial noise trajectory energy be eps, where eps is the floating point spacing;
[0017] Calculate the energy value of the original trajectory The ratio between the energy value of the initial noise trajectory and the energy value of the initial noise trajectory is used to obtain the initial signal-to-noise ratio.
[0018] In another embodiment of the present invention, the performing dimension reduction estimation on the matrix P includes:
[0019] Perform singular value decomposition on the matrix P to obtain L singular values and corresponding left singular vectors and right singular vectors; estimate the matrix P according to the singular values and singular vectors to obtain an estimated value in, σ i is a singular value, u i is the left singular vector, v i are right singular vectors, v i is the transpose of , L is the number of singular values, the initial value of C is 0, and it increases by 1 in each loop.
[0020] In another embodiment of the present invention, the smoothing of the three-dimensional data trajectory according to the estimation and determining whether the signal-to-noise ratio after the smoothing is greater than the threshold SNR comprises:
[0021] When F is an odd frame number, according to Smoothing the F frame data;
[0022] When F is an even frame number, according to Smoothing the F frame data;
[0023] Among them, the That is, the three-dimensional trajectory data of the i-th frame after smoothing. Obtaining noise trajectory data The r c,i is the original 3D trajectory data of the i-th frame, then the noise trajectory energy is obtained according to the average energy calculation formula And the energy of the smoothed 3D data trajectory The signal-to-noise ratio after smoothing is
[0024] In order to solve the above technical problems, the present invention further provides a device, which includes:
[0025] Capture module, used to track the target's three-dimensional data trajectory;
[0026] A processing module configured to:
[0027] Extract the F frame data information to be processed;
[0028] Calculate the original trajectory energy according to the F frame data information, and construct the corresponding matrix P, wherein the original trajectory energy is the energy of the three-dimensional data trajectory that has not been smoothed;
[0029] Setting a threshold SNR and an initial noise trajectory energy, and calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy;
[0030] When the initial signal-to-noise ratio is greater than the threshold SNR, a dimension reduction estimation is performed on the matrix P, and a smoothing process is performed on the three-dimensional data trajectory according to the estimation, and it is determined whether the signal-to-noise ratio after the smoothing process is greater than the threshold SNR;
[0031] If the signal-to-noise ratio is greater than the threshold SNR, the smoothing process is performed repeatedly;
[0032] If the signal-to-noise ratio is not greater than the threshold SNR, the loop ends and the final smoothed data is output.
[0033] In another embodiment of the present invention, when extracting the F-frame data information of the data point, the processing module includes extracting the three-dimensional space coordinate value of the data point.
[0034] In another embodiment of the present invention, when configuring and constructing the matrix P, the processing module configures the matrix P as follows: Among them, when F is an odd frame number, When F is an even frame number,
[0035] In another embodiment of the present invention, configuring the processing module to calculate the original trajectory energy includes:
[0036] Configure the calculation formula of average energy to calculate the energy of the original trajectory The formula is: Where F is the number of frames, r c,i is the 3D trajectory data of the i-th frame, ‖ ‖ F is the Frobenius norm.
[0037] In another embodiment of the present invention, configuring the processing module to set a threshold SNR and an initial noise trajectory energy, and calculating the initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy includes:
[0038] Let the initial noise trajectory energy be eps, where eps is the floating point spacing;
[0039] Calculate the energy value of the original trajectory The ratio between the energy value of the initial noise trajectory and the energy value of the initial noise trajectory is used to obtain the initial signal-to-noise ratio.
[0040] In another embodiment of the present invention, configuring the processing module to perform dimension reduction estimation on the matrix P includes:
[0041] Configure the processing module to perform singular value decomposition on the matrix P to obtain L singular values and corresponding left singular vectors and right singular vectors; estimate the matrix P according to the singular values and singular vectors to obtain an estimated value in, σ i is a singular value, u i is the left singular vector, v i are right singular vectors, v i, L is the number of singular values, the initial value of C is 0, and it increases by 1 in each cycle. In another embodiment of the present invention, when configuring the processing module to perform smoothing on the three-dimensional data trajectory according to the estimation, determining whether the signal-to-noise ratio after smoothing is greater than the threshold SNR includes:
[0042] When F is an odd frame number, according to Smoothing the F frame data;
[0043] When F is an even frame number, according to Smoothing the F frame data;
[0044] Among them, the That is, the three-dimensional trajectory data of the i-th frame after smoothing. Obtaining noise trajectory data The r c,i is the original 3D trajectory data of the i-th frame, then the noise trajectory energy is obtained according to the average energy calculation formula And the energy of the smoothed trajectory The signal-to-noise ratio after smoothing is
[0045] In addition, to achieve the above-mentioned purpose, the present invention also provides a three-dimensional trajectory smoothing processing device, which includes: a memory, a processor, and a three-dimensional trajectory smoothing processing program stored in the memory and executable on the processor, wherein the three-dimensional trajectory smoothing processing program implements the steps of the three-dimensional trajectory smoothing processing method as described in any one of the above-mentioned items when executed by the processor.
[0046] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a three-dimensional trajectory smoothing processing program is stored. When the three-dimensional trajectory smoothing processing program is executed by a processor, the steps of the three-dimensional trajectory smoothing processing method as described in any one of the above items are implemented.
[0047] The three-dimensional trajectory smoothing method provided by the present invention determines the current initial signal-to-noise ratio by calculating the energy value of the data point in the target three-dimensional data trajectory, and compares the initial signal-to-noise ratio with a preset signal-to-noise ratio threshold. If it is determined that the data point needs to be estimated and smoothed, it is determined whether cyclic smoothing is needed by comparing the signal-to-noise ratio after smoothing with the signal-to-noise ratio threshold, and the smoothing is stopped when the signal-to-noise ratio after smoothing is not greater than the signal-to-noise ratio threshold. Through the above implementation, it is possible to monitor in real time whether the signal-to-noise ratio in the smoothing process reaches the required value, thereby avoiding a significant loss of high-frequency information in the trajectory data, and by comparing with the set threshold signal-to-noise ratio, the effect of finely processing the data one by one is achieved, thereby avoiding filtering out the high-frequency information. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of the structure of the operating environment of the trajectory tracking device involved in the embodiment of the present invention;
[0049] Figure 2 A schematic diagram of a flow chart of an embodiment of a three-dimensional trajectory smoothing method provided by the present invention;
[0050] Figure 3 A schematic diagram of functional modules of a device provided by the present invention.
[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0053] The invention provides a trajectory tracking device.
[0054] Reference Figure 1 , Figure 1 It is a schematic diagram of the structure of the trajectory tracking device operating environment involved in the embodiment of the present invention.
[0055] like Figure 1As shown, the trajectory tracking device includes: a processor 101, such as a CPU, a communication bus 102, a user interface 103, a network interface 104, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 103 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the network interface 104 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 105 can be a high-speed RAM memory, or it can be a stable memory (non-volatile memory), such as a disk memory. The memory 105 can also be a storage device independent of the aforementioned processor 101.
[0056] Those skilled in the art can understand that after the trajectory tracking device captures and tracks the target three-dimensional trajectory, the processor 101 can perform noise reduction and smoothing processing on the data points in the three-dimensional trajectory, so the three-dimensional trajectory smoothing processing device can become a component of the trajectory tracking device. Figure 1 The hardware structure of the trajectory tracking device shown in the figure does not constitute a limitation on the three-dimensional trajectory smoothing processing device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently. In practical applications, the three-dimensional trajectory smoothing processing device can be used as a plug-in in a mobile terminal, that is, based on Figure 1 The mobile terminal implemented with hardware can also be used to develop and implement a three-dimensional trajectory smoothing processing function, which is specifically implemented by the three-dimensional trajectory smoothing processing method provided by an embodiment of the present invention.
[0057] like Figure 1 As shown, the memory 105 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a three-dimensional trajectory smoothing processing program. The operating system is a program for managing and controlling three-dimensional trajectory smoothing processing equipment and software resources, and supports the operation of the three-dimensional trajectory smoothing processing program and other software and / or programs.
[0058] exist Figure 1 In the hardware structure of the trajectory tracking device shown, the network interface 104 is mainly used to access the network; the user interface 103 is mainly used to connect to the acquisition unit, such as a camera, to obtain the data of the three-dimensional trajectory, and the processor 101 can be used to call the three-dimensional trajectory smoothing processing program stored in the memory 105 and perform the operations of the following embodiments of the three-dimensional trajectory smoothing processing method.
[0059] In the embodiment of the present invention, for Figure 1The implementation may also be a mobile terminal, wherein a processor of the mobile terminal performs smoothing (noise reduction) processing on the data points on the collected three-dimensional trajectory by reading a program code that can implement the three-dimensional trajectory smoothing processing method stored in a buffer or a storage unit.
[0060] Based on the hardware structure of the trajectory tracking device described above, various embodiments of the three-dimensional trajectory smoothing processing method of the present invention are proposed.
[0061] Reference Figure 2 , Figure 2 A flowchart of a three-dimensional trajectory smoothing method provided by an embodiment of the present invention. In this embodiment, the three-dimensional trajectory smoothing method specifically includes the following steps:
[0062] Step S210, tracking the target three-dimensional data trajectory r c , extract the F frame data information to be processed r c,1 、r c,2 …r c,F .
[0063] In this step, after the motion trajectory of the target object is tracked by the corresponding equipment, it can be input into the computer to form a corresponding data trajectory diagram. The computer system can determine the data information with more noise that needs to be processed, such as the F frame data information r c,1 、r c,2 …r c,F The extracted F frame data information is specifically the three-dimensional space coordinate value, and the tracking here can be understood as a process of collecting data, recording the motion record generated by the movement of the object in the three-dimensional space in real time, wherein the target three-dimensional data trajectory includes the data points of the F frame in sequence, and the three-dimensional data trajectory can be collected by the camera on the device, such as a motion capture camera, or by a modeling system built based on a three-dimensional coordinate system, to monitor and collect the trajectory of the object's movement in real time, and the trajectory is reflected by the movement form of the above data points.
[0064] In practical applications, the three-dimensional data trajectory specifically represents the motion change situation composed of the data trajectory information of each frame captured by the camera.
[0065] Step S220, calculating the original trajectory energy according to the F frame data information, and constructing the corresponding matrix P, wherein the original trajectory energy is the energy of the three-dimensional data trajectory that has not been smoothed.
[0066] In this embodiment, the original trajectory energy is the energy of the three-dimensional data trajectory obtained by initial tracking without smoothing. When calculating the original trajectory energy, it is specifically calculated according to the average energy calculation formula, which is: Where F is the number of frames, rc,i is the 3D trajectory data of the i-th frame, ‖ ‖ F is the Frobenius norm.
[0067] In this step, when constructing the matrix P, it also includes judging whether the total number of frames of the three-dimensional data trajectory to be processed is an odd number or an even number, and calculating the number of rows and columns of the matrix according to the judgment result, so as to construct the matrix.
[0068] In this embodiment, the matrix P may be a square matrix or a square matrix close to order l, which is specifically determined by the number of frames F of the three-dimensional trajectory. The number of rows and columns of the matrix P is l and F-l+1 respectively. When F is an odd number of frames, When F is an even frame number, The matrix P is constructed as follows: The data elements therein are the three-dimensional trajectory data of a corresponding frame in the F frame.
[0069] Step S230 , setting a threshold SNR and an initial noise trajectory energy, and calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy.
[0070] In this embodiment, the threshold SNR is the desired minimum signal-to-noise ratio threshold, and the desired SNR can be set according to the requirements, so the signal-to-noise ratio of the data point cannot be less than the threshold SNR. In this embodiment, the initial value of the number of cycles C=0 is set during initialization, and the initial noise trajectory energy can be eps, where eps is the floating point spacing, which is a very small value. By calculating the original trajectory energy value The initial signal-to-noise ratio can be obtained by calculating the ratio r of the energy of the initial noise trajectory. In this embodiment, since the value of eps is very small, the ratio r will be larger. Therefore, in general, r will be greater than the threshold SNR at the beginning.
[0071] Step S240, when the initial signal-to-noise ratio is greater than the threshold SNR, the matrix P is estimated by dimensionality reduction, the three-dimensional data trajectory is smoothed according to the estimation, and it is determined whether the signal-to-noise ratio after smoothing is greater than the threshold SNR. When the initial signal-to-noise ratio satisfies the condition of being greater than the threshold SNR, it means that further smoothing can be performed to achieve the desired value, as long as the signal-to-noise ratio is not less than the threshold SNR.
[0072] In this embodiment, the process of performing dimensionality reduction estimation on the matrix P is specifically to perform singular value decomposition on the matrix P to obtain L singular values and corresponding left singular vectors and right singular vectors; the matrix P is estimated according to the singular values and singular vectors to obtain an estimated value in, σi is a singular value, u i is the left singular vector, v i are right singular vectors, v i is the transpose of , L is the number of singular values, C is initialized to 0 and increases by 1 each time through the loop. Using this estimate A smoothing operation can be performed on the three-dimensional data trajectory, and the signal-to-noise ratio obtained after each smoothing will gradually become smaller, because the more times the three-dimensional data trajectory is smoothed, the more noise information is processed, and the trajectory energy obtained after smoothing is smaller, and the noise trajectory energy is larger.
[0073] Step S250, if the signal-to-noise ratio after smoothing is greater than the threshold SNR, the smoothing process is looped. At this time, if the signal-to-noise ratio after smoothing is still greater than the threshold SNR, it indicates that the signal-to-noise ratio is not less than the expected minimum value. At this time, the trajectory data can continue to be smoothed to obtain a better three-dimensional effect.
[0074] Step S260: If the signal-to-noise ratio is not greater than the threshold SNR, the loop ends and the final smoothed data is output. This indicates that the signal-to-noise ratio is at the lowest value and smoothing cannot be continued. The loop operation process needs to be exited to output each frame of data after the final smoothing process. Each frame of data constitutes the final smoothed three-dimensional data trajectory according to the frame sequence.
[0075] In this embodiment, steps S250 and S260 are used to check whether the target three-dimensional data trajectory after smoothing meets the expected conditions, that is, the signal-to-noise ratio is calculated based on the data point information in the adjusted target three-dimensional data trajectory, and the signal-to-noise ratio is compared with the preset signal-to-noise ratio. If it is not greater than, it is considered that the smoothing process meets the conditions. Otherwise, it is not satisfied and it is necessary to perform smoothing again. This cycle is repeated until the signal-to-noise ratio of the trajectory after smoothing does not meet the conditions.
[0076] In this embodiment, the cyclic smoothing process is implemented in the following manner:
[0077] When F is an odd frame number, according to Smoothing the F frame data;
[0078] When F is an even frame number, according to Smoothing the F frame data;
[0079] Among them, the That is, the three-dimensional trajectory data of the i-th frame after smoothing. Obtaining noise trajectory data The r c,i is the original 3D trajectory data of the i-th frame, then the noise trajectory energy is obtained according to the average energy calculation formula And the energy of the smoothed 3D data trajectory The signal-to-noise ratio after smoothing is
[0080] The calculated signal-to-noise ratio is compared with a threshold, and the processes of steps S250 and S260 are performed to obtain a final three-dimensional trajectory.
[0081] Above Can form smoothed trajectory data information The noise trajectory R N =R C -R S , R C is the original data trajectory. Substituting the noise trajectory data information into the average energy calculation formula can obtain the noise trajectory energy So as to obtain the signal-to-noise ratio after smoothing In practical applications, the above-mentioned dimensionality reduction estimation process can be controlled by writing it into code. If smooth adjustment is required again, C is adjusted to C+1, that is, it automatically increases by 1 each time the cycle occurs, which means that the above steps are executed again. However, the trajectory data to be processed should be the trajectory data obtained after the previous smooth adjustment.
[0082] In the embodiment of the present invention, the smoothing and denoising processing of the data is controlled according to the real-time frame energy value of the three-dimensional data trajectory and the preset signal-to-noise ratio. In this way, it is possible to monitor in real time whether the signal-to-noise ratio in the smoothing process reaches the required value, thereby avoiding a significant loss of high-frequency information in the trajectory data. Moreover, by comparing with the set threshold signal-to-noise ratio, the effect of finely processing the data one by one is achieved, thereby avoiding filtering out the high-frequency information.
[0083] In order to solve the above problems, an embodiment of the present invention further provides a device, which is a device for implementing a three-dimensional trajectory smoothing method, referring to Figure 3 , Figure 3 A schematic diagram of functional modules of a device provided in an embodiment of the present invention. In this embodiment, the device includes:
[0084] Capture module 31, used to track the target three-dimensional data trajectory r c ;
[0085] The processing module 32 is configured to:
[0086] Extract the F frame data information to be processedc,1 、r c,2 …r c,F ;
[0087] Calculate the original trajectory energy according to the F frame data information, and construct the corresponding matrix P, wherein the original trajectory energy is the energy of the three-dimensional data trajectory that has not been smoothed;
[0088] Setting a threshold SNR and an initial noise trajectory energy, and calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy;
[0089] When the initial signal-to-noise ratio is greater than the threshold SNR, a dimension reduction estimation is performed on the matrix P, and a smoothing process is performed on the three-dimensional data trajectory according to the estimation, and it is determined whether the signal-to-noise ratio after the smoothing process is greater than the threshold SNR;
[0090] If the signal-to-noise ratio is greater than the threshold SNR, the smoothing process is performed repeatedly;
[0091] If the signal-to-noise ratio is not greater than the threshold SNR, the loop ends and the final smoothed data is output.
[0092] The capture module 31 in the above device may be a motion capture camera, which can track the three-dimensional motion trajectory of the target object through the optical capture principle, and it and the processing module 32 can form a complete motion capture system.
[0093] Since the description of the embodiment is the same as that of the three-dimensional trajectory smoothing method in the above embodiment of the present invention, the present embodiment will not elaborate on the description of the embodiment of the three-dimensional trajectory smoothing device.
[0094] In an embodiment of the present invention, a trajectory tracking device is also provided, which includes: a memory, a processor, and a three-dimensional trajectory smoothing processing program stored in the memory and executable on the processor, wherein when the three-dimensional trajectory smoothing processing program is executed by the processor, the steps of any one of the three-dimensional trajectory smoothing processing methods provided in the above embodiments are implemented.
[0095] The present invention also provides a computer-readable storage medium.
[0096] In this embodiment, the computer-readable storage medium stores a three-dimensional trajectory smoothing processing program, and when the three-dimensional trajectory smoothing processing program is executed by the processor, the steps of the three-dimensional trajectory smoothing processing method described in any of the above embodiments are implemented. The method implemented when the three-dimensional trajectory smoothing processing program is executed by the processor can refer to the various embodiments of the three-dimensional trajectory smoothing processing method of the present invention, so it will not be described in detail.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM) and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0098] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims. All equivalent structures or equivalent process changes made using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, are protected by the present invention.
Claims
1. A three-dimensional trajectory smoothing method, characterized in that: The method comprises the following steps: Tracking target 3D data trajectory c , extract the F frame data information to be processed r c,1 、r c,2 …r c,F ; Wherein, the target three-dimensional data trajectory includes F frames of data points in a sequential order; Calculating the original trajectory energy according to the F frame data information, and constructing the corresponding matrix P, wherein the original trajectory energy is the energy of the three-dimensional data trajectory that has not been smoothed; when constructing the matrix P, it also includes determining whether the total number of frames of the three-dimensional data trajectory to be processed is an odd number or an even number, and calculating the number of rows and columns of the matrix according to the result of the determination, thereby constructing the matrix; Calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy; Performing dimensionality reduction estimation on the matrix P according to the initial signal-to-noise ratio calculation result, performing smoothing processing on the three-dimensional data trajectory according to the estimation, and determining whether the signal-to-noise ratio after smoothing processing is greater than a preset threshold value SNR; If the signal-to-noise ratio is greater than the threshold SNR, the smoothing process is performed repeatedly; The smoothing of the three-dimensional data trajectory according to the estimation and determining whether the signal-to-noise ratio after the smoothing is greater than the threshold SNR comprises: When F is an odd frame number, according to Smoothing the F frame data; When F is an even frame number, according to Smoothing the F frame data; Among them, the That is, the original three-dimensional trajectory data of the i-th frame after smoothing. Obtaining noise trajectory data The r c,i is the original 3D trajectory data of the i-th frame, then the noise trajectory energy is obtained according to the average energy calculation formula And the energy of the smoothed 3D data trajectory The signal-to-noise ratio after smoothing is 2. The three-dimensional trajectory smoothing method according to claim 1, characterized in that: Also includes: If the signal-to-noise ratio is not greater than the threshold SNR, the loop ends and the final smoothed data is output.
3. The three-dimensional trajectory smoothing method according to claim 1, characterized in that: The matrix P is constructed as Among them, when F is an odd frame number, When F is an even frame number, The number of rows of the matrix P is l.
4. The three-dimensional trajectory smoothing method according to claim 1, characterized in that: Calculating the original trajectory energy according to the F frame data information includes: According to the average energy calculation formula, the original trajectory energy is calculated The formula is: Where F is the number of frames, r c,i is the original 3D trajectory data of the i-th frame, ‖‖ F is the Frobenius norm.
5. The three-dimensional trajectory smoothing method according to claim 1, characterized in that: Setting a threshold SNR and an initial noise trajectory energy, and calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy includes: Let the initial noise trajectory energy be eps, where eps is the floating point spacing; Calculate the energy of the original trajectory The ratio between the energy of the initial noise trajectory and the energy of the initial noise trajectory is used to obtain the initial signal-to-noise ratio.
6. The three-dimensional trajectory smoothing method according to any one of claims 1 to 5, characterized in that: The dimensionality reduction estimation of the matrix P comprises: Perform singular value decomposition on the matrix P to obtain L singular values and corresponding left singular vectors and right singular vectors; perform dimensionality reduction estimation on the matrix P according to the singular values and singular vectors to obtain an estimated value in, σ i is a singular value, u i is the left singular vector, v i are right singular vectors, v i is the transpose of , L is the number of singular values, C is the initial value of the loop, the initial value of C is 0, and it increases by 1 in each loop.
7. A device, characterized in that: include: Capture module, used to track the target 3D data trajectory c ; Wherein, the target three-dimensional data trajectory includes F frames of data points in a sequential order; A processing module configured to: Extract the F frame data information to be processed c,1 、r c,2 …r c,F ; Calculating the original trajectory energy according to the F frame data information, and constructing the corresponding matrix P, wherein the original trajectory energy is the energy of the three-dimensional data trajectory that has not been smoothed; when constructing the matrix P, it also includes determining whether the total number of frames of the three-dimensional data trajectory to be processed is an odd number or an even number, and calculating the number of rows and columns of the matrix according to the result of the determination, thereby constructing the matrix; Setting a threshold SNR and an initial noise trajectory energy, and calculating an initial signal-to-noise ratio of the three-dimensional data trajectory according to the original trajectory energy and the initial noise trajectory energy; When the initial signal-to-noise ratio is greater than the threshold SNR, a dimension reduction estimation is performed on the matrix P, and a smoothing process is performed on the three-dimensional data trajectory according to the estimation, and it is determined whether the signal-to-noise ratio after the smoothing process is greater than the threshold SNR; If the signal-to-noise ratio is greater than the threshold SNR, the smoothing process is repeated; If the signal-to-noise ratio is not greater than the threshold SNR, the loop ends and the final smoothed data is output; The smoothing of the three-dimensional data trajectory according to the estimation and determining whether the signal-to-noise ratio after the smoothing is greater than the threshold SNR comprises: When F is an odd frame number, according to Smoothing the F frame data; When F is an even frame number, according to Smoothing the F frame data; Among them, the That is, the original three-dimensional trajectory data of the i-th frame after smoothing. Obtaining noise trajectory data The r c,i is the original 3D trajectory data of the i-th frame, then the noise trajectory energy is obtained according to the average energy calculation formula And the energy of the smoothed 3D data trajectory The signal-to-noise ratio after smoothing is 8. An apparatus, characterized in that it comprises: A memory, a processor, and a three-dimensional trajectory smoothing processing program stored in the memory and executable on the processor, wherein the three-dimensional trajectory smoothing processing program, when executed by the processor, implements the steps of the three-dimensional trajectory smoothing processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a three-dimensional trajectory smoothing processing program, and when the three-dimensional trajectory smoothing processing program is executed by the processor, the steps of the three-dimensional trajectory smoothing processing method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Three-dimensional trajectory smoothing processing method, apparatus, equipment and storage medium
CN110458782B
Three-dimensional trajectory smoothing method and device, equipment and storage medium
CN113902634A