Method for pre-judging main body pose of 3D sound effect
Technical Field
The invention relates to the field of 3D sound effects, in particular to a method for prejudging a main body pose of a 3D sound effect.
Background
The main body pose prejudging method 3D technology is the biggest difference from the traditional method in that a set of loudspeakers or earphones can be used for generating vivid stereo effect and positioning sound sources surrounding different positions of the user. This ability to track the source, known as the localization effect, uses the current HRTF functionality to achieve this surprising effect.
The full name of the HRTF is He main body pose pre-judging method d-Rel main body pose pre-judging method ted Tr main body pose pre-judging method nsfer function (head related position conversion), which is a method for monitoring and distinguishing sound sources of human ears in a three-dimensional space. Briefly, sound waves are transmitted to your ear successively at a distance of a few millionths of a second, and our brain can distinguish these subtle differences, and use these differences to distinguish the form of the sound waves, which are then converted into the location of the sound in space.
On most of the existing sound cards with 3D sound effects, the sound effect in the game is converted by using an HRTF (head related transfer function) conversion method, and the brain of a user is misled to hear the sound from different places. Games that support sound source localization combine sounds with the game's objects, characters, or other sources of sound, and the sound card adjusts the transmission of sound signals based on relative position as these sounds and your position in the game change.
At present, along with the popularization and application of 3D glasses technology, the pose of the head of a main body can be sampled, the original 3D sound effect method firstly needs to determine a sound source, then carries out conversion according to the position of the sound source and the content of the sound source and the position of the main body, and then carries out conversion according to the pose of the main body to obtain sound data output by different power amplification units, so that time delay is easy to occur and user experience is influenced due to large calculated amount, at present, the sound data are obtained in advance through preprocessing to ensure the continuity of the data, the principle is to calculate the possible pose of the main body in advance and then the actual pose of the main body, if the actual pose of the main body is the same as the predicted pose, the calculation result can be directly output, the processing time is shortened, the continuity of the sound is ensured, but the accuracy of the prediction is a big problem, if the continuous prediction is wrong, a large time delay is caused, and the sound effect is influenced.
Disclosure of Invention
In view of the above, the present invention provides a method for predicting the main pose of a 3D sound effect to solve the above problems.
In order to solve the technical problems, the technical scheme of the invention is as follows: a main body pose prejudging method of a 3D sound effect comprises the steps of providing a main body pose capturing device, a left power amplifier corresponding to a left ear of a main body, a right power amplifier corresponding to a right ear of the main body and a sound model, wherein the main body pose capturing device is used for capturing pose information of the main body, the pose information of the main body is input into the sound model to obtain sound playing information, and the left power amplifier and the right power amplifier are used for playing the sound playing information;
the method specifically comprises the following steps:
a first acquisition step of acquiring pose information of the subject at that time;
a pose prejudging step, generating direction prejudging information by a random weight distribution algorithm according to the pose information of the main body at the moment and the current moment, wherein each direction prejudging information comprises a direction prejudging angle range, the direction prejudging angle range reflects the rotation angle of the main body, the prejudging pose information of the main body at the next moment is generated according to the direction prejudging information, the random weight distribution algorithm is distributed with a corresponding weight value according to each direction prejudging information at the moment, and the larger the corresponding weight value is, the more easily the direction prejudging information is selected by the random weight distribution algorithm;
a pre-judging calculation step, namely inputting the pre-judging pose information into the sound model to obtain pre-judging sound playing information;
a second acquisition step of acquiring pose information of the main body at the next moment;
a pose judgment step of calculating the rotation direction of the main body according to the pose information obtained in the first acquisition step and the pose information obtained in the second acquisition step, and if the rotation direction of the main body is within the direction pre-judgment angle range, playing the pre-judged sound playing information and increasing the weight value of the direction pre-judgment information; and if the rotating direction of the main body is out of the direction pre-judging angle range, inputting the pose information of the main body at the next moment into the sound model, playing the sound playing information output by the sound model, and reducing the weight value of the direction pre-judging information.
Further, at each time, the rotation angle of the main body is the rotation angle of the main body in the three-dimensional space in the acoustic model, the number of the corresponding direction pre-judging information is set to be 16, and the direction pre-judging angle range corresponding to each direction pre-judging information is set to be 90 degrees.
Further, the rotation angle of the main body is an equivalent rotation angle of a preset plane of the main body in the acoustic model.
Further, at each time, the corresponding direction anticipation information is set to be 12, and the direction anticipation angle range corresponding to each direction anticipation information is set to be 30 degrees.
Further, the pose determination step is configured with a division substep, the division substep is configured with a division weight threshold, when a weight value corresponding to one direction prejudgment information exceeds the weight threshold, the direction prejudgment information is divided into at least two new direction prejudgment information, and each new direction prejudgment information is divided into the weight value of the original direction prejudgment information and a direction prejudgment angle range.
The technical effects of the invention are mainly reflected in the following aspects: through the arrangement, the turning habit of the main body under the preset scene and moment is judged in a self-learning algorithm mode to be optimized to obtain the turning direction of the pre-judged main body at the next moment, corresponding sound information is obtained in advance, and the precision is improved.
Detailed Description
The embodiments of the present invention are described in further detail to make the technical solutions of the present invention easier to understand and master.
A main body pose pre-judging method for a 3D sound effect comprises the steps of providing a main body pose capturing device, a left power amplifier corresponding to a left ear of a main body, a right power amplifier corresponding to a right ear of the main body and a sound model, wherein the main body pose capturing device is used for capturing pose information of the main body, the pose information of the main body is input into the sound model to obtain sound playing information, and the left power amplifier and the right power amplifier are used for playing the sound playing information. The invention aims to construct habits according to original facing information, namely, under a specific scene, the pose habits of a user certainly have a certain rule, and therefore, the sound information obtained by calculation in advance is more likely to accord with the actual rotation direction of the user, so that a prejudgment effect can be achieved.
The method specifically comprises the following steps:
a first acquisition step of acquiring pose information of the subject at that time;
a pose prejudging step, generating direction prejudging information by a random weight distribution algorithm according to the pose information of the main body at the moment and the current moment, wherein each direction prejudging information comprises a direction prejudging angle range, the direction prejudging angle range reflects the rotation angle of the main body, the prejudging pose information of the main body at the next moment is generated according to the direction prejudging information, the random weight distribution algorithm is distributed with a corresponding weight value according to each direction prejudging information at the moment, and the larger the corresponding weight value is, the more easily the direction prejudging information is selected by the random weight distribution algorithm; in one embodiment, at each time, the rotation angle of the main body is the rotation angle of the main body in the three-dimensional space in the acoustic model, the number of the corresponding direction anticipation information is set to 16, and the range of the direction anticipation angle corresponding to each direction anticipation information is set to 90 degrees. Firstly, in theory, the pose information of the main body is three-dimensional pose information, and the relative rotation direction is also realized in a three-dimensional space, so that the acquisition of the direction is realized through 16 pieces of direction prejudgment information.
In another embodiment, the rotation angle of the main body is an equivalent rotation angle of a preset plane of the main body in the acoustic model. At each moment, the number of the corresponding direction pre-judging information is set to be 12, and the direction pre-judging angle range corresponding to each direction pre-judging information is set to be 30 degrees. It should be noted that the ability of the human ear to distinguish the upper position from the lower position is poor, so the present invention preferably equalizes the upper and lower rotation directions to the plane, that is, only judges the circumferential rotation of the main body, so that the data processing efficiency can be optimized, and the precision can be improved.
A pre-judging calculation step, namely inputting the pre-judging pose information into the sound model to obtain pre-judging sound playing information;
a second acquisition step of acquiring pose information of the main body at the next moment; the pose information of the subject at the next moment can be obtained by the second obtaining step.
A pose judgment step of calculating the rotation direction of the main body according to the pose information obtained in the first acquisition step and the pose information obtained in the second acquisition step, and if the rotation direction of the main body is within the direction pre-judgment angle range, playing the pre-judged sound playing information and increasing the weight value of the direction pre-judgment information; and if the rotating direction of the main body is out of the direction pre-judging angle range, inputting the pose information of the main body at the next moment into the sound model, playing the sound playing information output by the sound model, and reducing the weight value of the direction pre-judging information. If the judgment is correct, outputting the calculated audio information, and if the judgment is wrong, not outputting the audio information, and increasing or decreasing the corresponding weight value according to the correct or wrong result. Thus, under the condition of multiple sample training, the judgment tends to be accurate, and it needs to be explained that multiple steps can be executed under the condition of time permission, and the judgment information is not only one direction.
The pose judgment step is configured with a division substep, the division substep is configured with a division weight threshold, when the weight value corresponding to one direction prejudgment information exceeds the weight threshold, the direction prejudgment information is divided into at least two new direction prejudgment information, and each new direction prejudgment information is divided into the weight value of the original direction prejudgment information and the direction prejudgment angle range. In this way a more reliable effect is achieved, which is more accurate under training in the direction of rotation.
The above are only typical examples of the present invention, and besides, the present invention may have other embodiments, and all the technical solutions formed by equivalent substitutions or equivalent changes are within the scope of the present invention as claimed.