Method, device and storage medium for controlling video image output

文档序号:1966067 发布日期:2021-12-14 浏览:19次 中文

阅读说明:本技术 一种控制视频图像输出的方法、装置及存储介质 (Method, device and storage medium for controlling video image output ) 是由 肖兵 陈宇 许汉龙 于 2021-11-16 设计创作,主要内容包括:本申请公开了一种控制视频图像输出的方法、装置及存储介质,用于使特写画面的计算更加准确、可靠,提升用户体验。本申请方法包括:开启视频预览;并行接收音画信息,所述音画信息包括声源定位信息和目标检测信息;在预设时间段内对所述音画信息进行统计分析,判断是否有稳定的发言者;若是,则根据所述音画信息计算并输出第一视频图像结果。(The application discloses a method, a device and a storage medium for controlling video image output, which are used for enabling the calculation of a close-up picture to be more accurate and reliable and improving the user experience. The method comprises the following steps: starting video preview; receiving sound and picture information in parallel, wherein the sound and picture information comprises sound source positioning information and target detection information; performing statistical analysis on the sound and picture information within a preset time period, and judging whether a stable speaker exists or not; and if so, calculating and outputting a first video image result according to the sound and picture information.)

1. A method of controlling output of video images, the method comprising:

starting video preview;

receiving sound and picture information in parallel, wherein the sound and picture information comprises sound source positioning information and target detection information;

performing statistical analysis on the sound and picture information within a preset time period, and judging whether a stable speaker exists or not;

and if the change of the sound source angle is within the effective range and the number of the effective sound and picture information reaches a set proportion, determining that a stable speaker exists, and calculating and outputting a first video image result according to the sound and picture information.

2. The method according to claim 1, wherein the sound source localization information includes an audio time stamp, and the target detection information includes a picture time stamp;

before the statistical analysis is performed on the sound and picture information within the preset time period and whether a stable speaker exists is judged, the method further comprises the following steps:

configuring a pre-created sound and picture information unit according to the audio time stamp;

determining a matched target audio-visual information unit according to the visual time stamp;

updating the target detection information to the target sound and picture information unit;

the statistical analysis of the sound and picture information in the preset time period and the judgment of whether a stable speaker exists or not comprise the following steps:

and carrying out statistical analysis on the sound and picture information in the target sound and picture information unit in a preset time period, and judging whether a stable speaker exists.

3. The method of claim 2, wherein after configuring the pre-created units of voice-and-picture information according to the audio timestamps, the method further comprises:

storing the sound and picture information unit into a target queue;

the step of determining the matched target audio-visual information unit according to the visual time stamp comprises the following steps:

and determining a matched target audio-video information unit from the target queue according to the video time stamp.

4. The method of claim 2, wherein determining a matching target voice-picture information unit from the target queue based on the picture time stamp comprises:

traversing the target queue in a reverse order, and calculating sound and picture time differences of all sound and picture information units in the target queue through a target formula according to the picture time stamps and the audio time stamps;

and determining the sound-picture information unit at the extreme point position with the sound-picture time difference from small to large as a target sound-picture information unit.

5. The method of claim 4, wherein the target formula is:

whereinIn order to obtain the time difference between the sound and the picture,the number of the sound and picture information unit is,a picture time stamp in the object detection information is represented,is shown asThe audio time stamp of the individual units of audiovisual information,and compensating for the preset sound and picture time.

6. The method of claim 1, wherein said computing and outputting a first video image result based on said audio-visual information comprises:

and when a video updating request is received, calculating and outputting a first video image result according to the sound and picture information.

7. The method of claim 1, wherein said computing and outputting a first video image result based on said audio-visual information comprises:

calculating and outputting a first video image result according to a preset time interval;

or the like, or, alternatively,

calculating a first video image result according to a preset time interval on time;

and outputting the first video image result when the first video image result changes.

8. The method of claim 1, wherein computing and outputting a first video image result based on the audio-visual information comprises:

determining the position of the speaker according to the sound and picture information;

calculating a target picture subregion according to the position of the speaker;

and outputting the target picture subregion.

9. The method of claim 8, wherein after said outputting the target picture subregion, the method further comprises:

judging whether the receiving state of the sound and picture information is normal or not and judging whether an effective target exists in the picture or not according to the sound and picture information;

and if the receiving state of the sound and picture information is abnormal or no effective target exists in the picture, outputting the whole picture area.

10. The method of claim 9, further comprising:

if the receiving state of the sound and picture information is normal and an effective target exists in the picture, further judging whether the position of the speaker exceeds a set range and the duration time reaches preset time;

and if the position of the speaker exceeds the set range and the duration time reaches the preset time, recalculating according to the position of the speaker and outputting the target picture subregion.

11. The method according to claim 1, wherein after the statistical analysis of the sound and picture information within the preset time period and the determination of whether there is a stable speaker, the method further comprises:

if the angle change of the sound source is out of the effective range or the number of the effective sound and picture information does not reach the set proportion, determining that no stable speaker exists, and outputting the whole picture area.

12. The method according to any one of claims 1 to 11, wherein after determining that there is a stable speaker, prior to said outputting the first video image result, the method comprises:

determining a second video image result;

the outputting the first video image result comprises:

and simultaneously outputting the first video image result and the second video image result.

13. The method of claim 12, wherein determining the second video image result comprises:

determining a second video image result based on the position of the last stable speaker;

or the like, or, alternatively,

and determining a second video image result according to the speaking content of the stable speaker.

14. The method of claim 13, wherein determining a second video image result from the speaking content of the stable speaker comprises:

analyzing the speaking content of the stable speaker and determining the name of the target user in the speaking content;

determining the position of the target user according to the name of the target user;

and determining a second video image result according to the position of the target user.

15. An apparatus for controlling output of video images, the apparatus comprising:

the starting unit is used for starting the video preview;

the receiving unit is used for receiving sound and picture information in parallel, and the sound and picture information comprises sound source positioning information and target detection information;

the first judgment unit is used for carrying out statistical analysis on the sound and picture information within a preset time period and judging whether a stable speaker exists or not;

and the close-up output unit is used for determining that a stable speaker exists when the angle change of the sound source is within the effective range and the number of the effective sound and picture information reaches a set proportion, and calculating and outputting a first video image result according to the sound and picture information.

16. An apparatus for controlling output of video images, the apparatus comprising:

the device comprises a processor, a memory, an input and output unit and a bus;

the processor is connected with the memory, the input and output unit and the bus;

the memory holds a program that the processor calls to perform the method of any of claims 1 to 14.

17. A computer-readable storage medium having a program stored thereon, which when executed on a computer performs the method of any one of claims 1 to 14.

Technical Field

The present application relates to the field of video image processing technologies, and in particular, to a method and an apparatus for controlling video image output, and a storage medium.

Background

When a video conference is popularized, some intelligent conference systems in the market can automatically provide close-up pictures for speakers in the pictures in the video conference process, so that other participants can clearly see facial expressions and body actions of the speakers, and the conference effect is greatly improved.

Among these, how to determine the position of the speaker in the screen is particularly critical. In the prior art, an array microphone sound source positioning technology is adopted, and image recognition technologies such as portrait detection, mouth opening and closing degree judgment, standing motion detection, face motion information identification and the like are also utilized.

However, in an actual scene, the sound source positioning information may have abnormal values due to noise, reverberation, and other factors, and a short pause of the speaker during speaking may also cause a certain fluctuation in the sound source direction, and in addition, target detection may also occasionally cause missing detection or false detection, and these unstable factors all combine to affect the close-up picture calculation result, which affects user experience.

Disclosure of Invention

The application provides a method, a device and a storage medium for controlling video image output, which are used for enabling the calculation of a close-up picture to be more accurate and reliable and improving the user experience.

A first aspect of the present application provides a method of controlling video image output, comprising:

starting video preview;

receiving sound and picture information in parallel, wherein the sound and picture information comprises sound source positioning information and target detection information;

performing statistical analysis on the sound and picture information within a preset time period, and judging whether a stable speaker exists or not;

and if so, calculating and outputting a first video image result according to the sound and picture information.

Optionally, the performing statistical analysis on the sound and picture information within a preset time period to determine whether there is a stable speaker includes:

and carrying out statistical analysis on the sound and picture information in a preset time period, and determining that a stable speaker exists if the angle change of the sound source is within an effective range and the number of the effective sound and picture information reaches a set proportion.

Optionally, the sound source positioning information includes an audio time stamp, and the target detection information includes a picture time stamp;

before the statistical analysis is performed on the sound and picture information within the preset time period and whether a stable speaker exists is judged, the method further comprises the following steps:

configuring a pre-created sound and picture information unit according to the audio time stamp;

determining a matched target audio-visual information unit according to the visual time stamp;

updating the target detection information to the target sound and picture information unit;

the statistical analysis of the sound and picture information in the preset time period and the judgment of whether a stable speaker exists or not comprise the following steps:

and carrying out statistical analysis on the sound and picture information in the target sound and picture information unit in a preset time period, and judging whether a stable speaker exists.

Optionally, after configuring the pre-created sound and picture information unit according to the audio time stamp, the method further includes:

storing the sound and picture information unit into a target queue;

determining a matched target sound-picture information unit according to the picture time stamp comprises the following steps:

and determining a matched target audio-video information unit from the target queue according to the video time stamp.

Optionally, the determining a matched target audio-visual information unit from the target queue according to the visual time stamp includes:

traversing the target queue in a reverse order, and calculating sound and picture time differences of all sound and picture information units in the target queue through a target formula according to the picture time stamps and the audio time stamps;

determining the sound-picture information unit at the extreme point position with the sound-picture time difference from small to large as a target sound-picture information unit;

optionally, the target formula is:

whereinIn order to obtain the time difference between the sound and the picture,the number of the sound and picture information unit is,a picture time stamp in the object detection information is represented,is shown asThe audio time stamp of the individual units of audiovisual information,and compensating for the preset sound and picture time.

Optionally, the calculating and outputting the first video image result according to the sound and picture information includes:

and when the video updating request is received, calculating and outputting a first video image result according to the sound and picture information.

Optionally, the calculating and outputting the first video image result according to the sound and picture information includes:

calculating and outputting a first video image result according to a preset time interval;

or the like, or, alternatively,

calculating a first video image result according to a preset time interval on time;

and outputting the first video image result when the first video image result changes.

Optionally, calculating and outputting a first video image result according to the sound and picture information includes:

determining the position of the speaker according to the sound and picture information;

calculating a target picture subregion according to the position of the speaker;

and outputting the target picture subregion.

Optionally, after the outputting the target picture sub-region, the method further includes:

judging whether the receiving state of the sound and picture information is normal or not and judging whether an effective target exists in the picture or not according to the sound and picture information;

if the receiving state of the sound and picture information is abnormal or no effective target exists in the picture, outputting the whole picture area;

optionally, if the sound and picture information receiving state is normal and an effective target exists in the picture, further determining whether the position of the speaker exceeds a set range and the duration time reaches a preset time;

and if the position of the speaker exceeds the set range and the duration time reaches the preset time, recalculating according to the position of the speaker and outputting the target picture subregion.

Optionally, after performing statistical analysis on the sound and picture information within the preset time period and determining whether there is a stable speaker, the method further includes:

if not, outputting the whole picture area.

Optionally, after determining that there is a stable speaker, before the outputting the first video image result, the method includes:

determining a second video image result;

the outputting the first video image result comprises:

and simultaneously outputting the first video image result and the second video image result.

Optionally, the determining the second video image result includes:

determining a second video image result based on the position of the last stable speaker;

or the like, or, alternatively,

and determining a second video image result according to the speaking content of the stable speaker.

Optionally, the determining a second video image result according to the speaking content of the stable speaker includes:

analyzing the speaking content of the stable speaker and determining the name of the target user in the speaking content;

determining the position of the target user according to the name of the target user;

and determining a second video image result according to the position of the target user.

A second aspect of the present application provides an apparatus for controlling output of a video image, comprising:

the starting unit is used for starting the video preview;

the receiving unit is used for receiving sound and picture information in parallel, and the sound and picture information comprises sound source positioning information and target detection information;

the first judgment unit is used for carrying out statistical analysis on the sound and picture information within a preset time period and judging whether a stable speaker exists or not;

and the close-up output unit is used for calculating and outputting a first video image result according to the sound and picture information when the first judgment unit determines that the stable speaker exists.

Optionally, the first determining unit is specifically configured to:

and carrying out statistical analysis on the sound and picture information in a preset time period, and determining that a stable speaker exists if the angle change of the sound source is within an effective range and the number of the effective sound and picture information reaches a set proportion.

Optionally, the sound source positioning information includes an audio time stamp, and the target detection information includes a picture time stamp; the device further comprises: a sound and picture synchronization unit;

the sound and picture synchronization unit specifically comprises:

the configuration module is used for configuring a pre-created sound and picture information unit according to the audio time stamp;

the matching module is used for determining a matched target audio-visual information unit according to the image time stamp;

the updating module is used for updating the target detection information to the target sound and picture information unit;

the first judging unit is specifically configured to:

and carrying out statistical analysis on the sound and picture information in the target sound and picture information unit in a preset time period, and judging whether a stable speaker exists.

Optionally, the sound and picture synchronization unit further includes:

the storage module is used for storing the sound and picture information unit into a target queue;

the matching module is specifically configured to:

and determining a matched target audio-video information unit from the target queue according to the video time stamp.

Optionally, the matching module is specifically configured to:

traversing the target queue in a reverse order, and calculating sound and picture time differences of all sound and picture information units in the target queue through a target formula according to the picture time stamps and the audio time stamps;

and determining the sound-picture information unit at the extreme point position with the sound-picture time difference from small to large as a target sound-picture information unit.

Optionally, the target formula is:

whereinIn order to obtain the time difference between the sound and the picture,the number of the sound and picture information unit is,a picture time stamp in the object detection information is represented,is shown asThe audio time stamp of the individual units of audiovisual information,and compensating for the preset sound and picture time.

Optionally, the close-up output unit is specifically configured to:

and when a video updating request is received, calculating and outputting a first video image result according to the sound and picture information.

Optionally, the close-up output unit is specifically configured to:

calculating and outputting a first video image result according to a preset time interval;

or the like, or, alternatively,

calculating a first video image result according to a preset time interval on time;

and outputting the first video image result when the first video image result changes.

Optionally, the close-up output unit is specifically configured to:

determining the position of the speaker according to the sound and picture information;

calculating a target picture subregion according to the position of the speaker;

and outputting the target picture subregion.

Optionally, the apparatus further comprises:

the second judging unit is used for judging whether the receiving state of the sound and picture information is normal or not and judging whether an effective target exists in the picture or not according to the sound and picture information;

and the original picture output unit is used for outputting the whole picture area when the second judgment unit determines that the receiving state of the sound and picture information is abnormal or no effective target exists in the picture.

Optionally, the apparatus further comprises:

a third judging unit, configured to further judge whether the position of the speaker exceeds a set range and a duration reaches a preset time when the second judging unit determines that the sound and picture information receiving state is normal and an effective target exists in the picture;

the close-up output unit is further specifically configured to:

and when the third judging unit determines that the position of the speaker exceeds the set range and the duration time reaches the preset time, recalculating according to the position of the speaker and outputting the target picture subregion.

Optionally, the original image output unit is further specifically configured to:

when the first judgment unit determines that there is no stable speaker, the entire screen area is output.

Optionally, the apparatus further comprises:

a determining unit for determining a second video image result;

the close-up output unit is further specifically configured to:

and simultaneously outputting the first video image result and the second video image result.

Optionally, the determining unit is specifically configured to:

determining a second video image result based on the position of the last stable speaker;

or the like, or, alternatively,

and determining a second video image result according to the speaking content of the stable speaker.

Optionally, the determining unit is specifically configured to:

analyzing the speaking content of the stable speaker and determining the name of the target user in the speaking content;

determining the position of the target user according to the name of the target user;

and determining a second video image result according to the position of the target user.

A third aspect of the present application provides an apparatus for controlling output of a video image, the apparatus comprising:

the device comprises a processor, a memory, an input and output unit and a bus;

the processor is connected with the memory, the input and output unit and the bus;

the memory holds a program that the processor calls to perform the method of controlling video image output as optional for any of the first aspect and the first aspect.

A fourth aspect of the present application provides a computer-readable storage medium having a program stored thereon, where the program is executed on a computer to perform the method for controlling video image output according to the first aspect and any one of the first aspect.

According to the technical scheme, the method has the following advantages:

by adopting the scheme of combining sound source positioning and image recognition and simultaneously utilizing audio and video information, the position of a speaker is more accurately and reliably determined in an actual application scene. And statistical analysis is carried out within a period of time based on the sound and picture information, and better tolerance is provided for abnormal values of sound source positioning and image identification when whether a stable speaker exists or not is judged, so that the calculation of the close-up picture is more accurate and reliable, and the user experience is greatly improved.

Drawings

In order to more clearly illustrate the technical solutions in the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.

FIG. 1 is a flowchart illustrating an embodiment of a method for controlling video image output according to the present disclosure;

FIG. 2 is a schematic flow chart illustrating a method for controlling video image output according to another embodiment of the present disclosure;

FIG. 3 is a graph showing a relationship between a sound-picture information unit and a sound-picture time difference in the method for controlling video image output according to the present application;

FIG. 4 is another graph showing the relationship between the sound and picture information units and the sound and picture time differences in the method for controlling video image output according to the present application;

FIG. 5 is a schematic structural diagram illustrating an embodiment of an apparatus for controlling video image output according to the present application;

FIG. 6 is a schematic structural diagram illustrating an apparatus for controlling video image output according to another embodiment of the present disclosure;

fig. 7 is a schematic structural diagram of an embodiment of an entity apparatus for controlling video image output according to the present application.

Detailed Description

The application provides a method, a device and a storage medium for controlling video image output, which are used for enabling the calculation of a close-up picture to be more accurate and reliable and improving the user experience.

It should be noted that the method for controlling video image output provided by the present application may be applied to a terminal, and may also be applied to a server, for example, the terminal may be a fixed terminal such as a conference television, a conference computer, a conference tablet, a smart phone or a computer, a tablet computer, a smart television, a portable computer terminal, or a desktop computer. For convenience of explanation, the terminal is taken as an execution subject for illustration in the present application.

Referring to fig. 1, fig. 1 is a block diagram illustrating an embodiment of a method for controlling video image output according to the present application, the method including:

101. starting video preview;

at present, video conferences are popularized, some intelligent conference systems on the market can automatically give close-up pictures to speakers in the pictures in the video conference process, so that other participants can clearly see facial expressions and body actions of the speakers, and the key of the close-up pictures lies in accurately positioning the positions of the speakers. The conference system generally comprises a camera, a microphone, a processor and a video playing device, wherein the camera is used for collecting conference images, the microphone is used for collecting conference sounds, and the processor is used for processing the conference images and the conference sounds and then sending the processed conference images and the processed conference sounds to the video playing device for displaying.

In this embodiment, the terminal classifies the pictures of the video output into two types: original painting and close-up. When the type is the original picture, the target picture area is the whole picture area; when the type is close-up, the target picture area is a local sub-area containing the speaker. The terminal sets the current picture type as an original picture, namely the terminal controls a video image to output a whole picture area, wherein the whole picture area specifically refers to all picture areas shot by a camera.

102. Receiving sound and picture information in parallel, wherein the sound and picture information comprises sound source positioning information and target detection information;

in this embodiment, the terminal receives audio information through the microphone device and determines sound source positioning information in the audio information according to a sound source positioning technology, and simultaneously receives video information through the camera device and determines target detection information in the video information according to an image recognition technology, and the purpose of parallel reception is to improve the processing efficiency of the terminal, and the sound source positioning information and the target detection information are collectively referred to as sound and picture information hereinafter.

The sound source localization information in the sound-picture information is information such as the direction and angle of the audio information received by the terminal, and the position of the speaker can be roughly specified by the sound source localization information. The target detection information is a face detection result and/or a head detection result and/or a human body detection result in the video information received by the terminal, and is preferably a face detection result.

It should be noted that, because the microphone and the camera may have different delays during actual operation, after receiving the sound and picture information, before performing statistical analysis on the sound and picture information, the sound and picture information needs to be synchronized, and the synchronization method may be to synchronize the sound and picture information by using an audio time stamp in the sound source localization information and a picture time stamp in the target detection information, or synchronize the sound and picture information by using a fixed sound and picture delay difference, which is not limited herein.

103. Performing statistical analysis on the sound and picture information within a preset time period, judging whether a stable speaker exists, and if so, executing a step 104;

the terminal carries out statistical analysis on the received sound and picture information in a preset time period, judges whether a stable speaker exists in the preset time period, and if the stable speaker exists, executes step 104 to output a close-up picture of the speaker.

In some specific embodiments, whether a stable speaker exists may be determined by determining whether the change of the sound source angle within the preset time period is within an effective range, and determining whether the number of the effective sound and picture information within the preset time period reaches a set ratio. Wherein, the sound source angle change in the effective range specifically means: if the sound source angle fluctuation range does not exceed the effective range (for example, 30 °), it is considered that the sound source angle is relatively stable and effective. The valid sound-picture information is specifically sound-picture information in which the valid target is not 0 and the sound source angle is within a valid range. The terminal determines whether the number of the valid sound and picture information reaches a set proportion, specifically, the terminal counts the number Nv of the valid sound and picture information within a preset time period (for example, 3 s), where the total number of the sound and picture information in the time period is Nt, and if Nv > = k × Nt (where k is the preset proportion, for example, set to 0.8), it indicates that the number of the valid sound and picture information within the time period reaches the set proportion. If both of the above two conditions are satisfied, it is determined that there is a stable speaker, and if either of the above two conditions is not satisfied, it is determined that there is no stable speaker.

It should be noted that the effective range of the sound source angle change and the specific value of the setting ratio corresponding to the number of the effective sound image information may be specifically set according to the actual requirement, and this is not limited here.

104. And calculating and outputting a first video image result according to the sound and picture information.

When a stable speaker is determined to exist, outputting a close-up picture of the speaker, calculating the position of the speaker by the terminal according to the received sound and picture information, namely the sound source positioning information and the target detection information, determining a first video image result according to the position of the speaker, and outputting the first video image result, wherein the first video image result is the close-up picture of the speaker. Specifically, the terminal needs to calculate the actual frame data of the close-up view or the cropping zoom parameter corresponding to the close-up view to determine the first video image result.

In the embodiment, the position of the speaker is determined more accurately and reliably in an actual application scene by adopting a scheme of combining sound source positioning and image recognition and simultaneously utilizing audio and video information. And statistical analysis is carried out within a period of time based on the sound and picture information, and better tolerance is provided for abnormal values of sound source positioning and image identification when whether a stable speaker exists or not is judged, so that the calculation of the close-up picture is more accurate and reliable, and the user experience is greatly improved.

Referring to fig. 2, fig. 2 is a block diagram illustrating another embodiment of a method for controlling video image output according to the present application, the method comprising:

201. starting video preview;

in this embodiment, step 201 is similar to step 101 of the previous embodiment, and is not described herein again.

202. Receiving sound and picture information in parallel, wherein the sound and picture information comprises sound source positioning information and target detection information;

in this embodiment, the terminal receives audio information through the microphone device and determines sound source positioning information in the audio information according to a sound source positioning technology, and simultaneously receives video information through the camera device and determines target detection information in the video information according to an image recognition technology, and the purpose of parallel reception is to improve the processing efficiency of the terminal, and the sound source positioning information and the target detection information are collectively referred to as sound and picture information hereinafter.

The sound source localization information in the sound-picture information is information such as the direction and angle of the audio information received by the terminal, and the position of the speaker can be roughly specified by the sound source localization information. The target detection information is a face detection result and/or a head detection result and/or a human body detection result in the video information received by the terminal, and is preferably a face detection result.

It should be noted that the sound source positioning information received by the terminal includes an audio time stamp, where the audio time stamp may be a sound source time stamp or a time stamp of the received sound source positioning information, and the sound source positioning information further includes a sound source bearing, where the sound source bearing may be a one-dimensional sound source angle or a two-dimensional or three-dimensional sound source position, and is not limited herein.

It should be noted that the target detection information received by the terminal includes a picture timestamp, where the picture timestamp may be a capture timestamp of the video frame, or a timestamp of the video frame before being detected by the target, and the target detection information further includes a target detection bounding box set, and specifically, the target detection type is face detection and/or head detection and/or body detection, and is preferably face detection.

In practical applications, since the microphone and the camera may have different delays in actual operation, after receiving the sound and picture information, before performing statistical analysis on the sound and picture information, synchronization of the sound and picture information is also required, which may be implemented based on an audio time stamp in the sound source localization information and a picture time stamp in the target detection information, and in some specific embodiments, the terminal performs steps 203 to 205 to perform synchronization of the sound and picture information, which is described in detail below:

203. configuring a pre-created sound and picture information unit according to the audio time stamp;

the terminal is pre-created with a plurality of sound and picture information units which are carriers for storing time stamps, sound source directions and valid target detection results, and the terminal writes and stores the processed sound source positioning information and target detection information into the sound and picture information units through a series of processing, so that the time stamps, the sound source directions and the valid target detection results can be read from the sound and picture information units when the terminal needs to calculate close-up pictures, and output video image results can be calculated by taking the data as the basis.

Specifically, the terminal sets a time stamp in the sound-picture information unit as an audio time stamp of the received sound source localization information, and the audio time stamp may be a sound source time stamp in the sound source localization information or a time stamp when the sound source localization information is received. In addition, the terminal needs to set the sound source bearing stored in the sound-picture information unit as the sound source bearing of the received sound source positioning information, and initialize the valid target detection result stored in the sound-picture information unit to an invalid value, so as to prepare for next storing the target detection information received by the terminal.

It should be noted that the audio time stamp in the sound source localization information acquired by the terminal may be a sound source time stamp, or may be a time stamp when the sound source localization information is received by the terminal. The former is closer to the true timestamp than the latter, with less theoretical bias, but is often not readily available. The latter is more theoretically biased but can be easily obtained. In the embodiment, the process of calculating the sound-picture time difference further includes sound-picture time compensation, and the deviation can be corrected according to actual conditions. Therefore, no matter any one of the two timestamps is selected, the invention can obtain more accurate results. Similarly, the picture timestamp in the target detection information acquired by the terminal may be a capture timestamp of the video frame, or may be a timestamp of the video frame before the target detection. The former is closer to the real time than the latter, and the theoretical deviation is smaller, but it is not always possible to obtain the same, so the latter is generally used in practice. As described above, the audio and video synchronization method provided in this embodiment can compensate for audio and video time deviation well, so that which timestamp is specifically selected has no significant influence on the final video processing result.

In some specific embodiments, the terminal stores the audio and video information unit in a target queue, the length of the target queue is fixed, a new audio and video information unit is added from the tail of the queue, and before adding, it is necessary to determine whether the length of the target queue has reached a set value (preset length) or not, if not, step a is executed, and if so, step b is executed.

a) And if the length of the target queue does not reach the set value, directly adding a new sound and picture information unit into the target queue from the tail of the target queue.

b) If the length of the target queue reaches the set value, a sound and picture information unit is deleted from the head of the target queue, and then a new sound and picture information unit is added into the target queue from the tail of the target queue.

204. Determining a matched target audio-visual information unit according to the visual time stamp;

and the terminal matches the sound-picture information unit with the nearest time in the sound-picture information units according to the picture timestamp of the received target detection information, and determines the sound-picture information unit as the target sound-picture information unit.

In some specific embodiments, before determining the matching target sound-picture information unit, the target detection information and the status of the target queue need to be checked, which is described in detail below:

firstly, checking input target detection information:

the terminal detects the number of targets detected in the input target detection information, namely the number of detected faces and/or heads and/or bodies, and if the number of targets is 0, the terminal directly returns to receive new sound source positioning information and target detection information. And if the target number is not 0, matching the target sound and picture information units.

Secondly, checking a target queue:

and if the target queue has no sound and picture information unit, directly returning and receiving new sound source positioning information and target detection information. And if the sound and picture information units exist in the target queue, matching the target sound and picture information units.

It should be noted that the above two states are not sequential and can be performed simultaneously. After the condition check is passed, the terminal matches the sound-picture information unit with the nearest time from the sound-picture information units according to the picture time stamp in the target detection information.

In some specific embodiments, the terminal traverses the target queue in a reverse order, calculates the sound-picture time difference of all sound-picture information units in the target queue through a target formula according to the picture time stamp and the audio time stamp, and determines a matched target sound-picture unit according to the sound-picture time difference.

Specifically, the terminal traverses the sound and picture information units in the target queue in a reverse order, and for each sound and picture information unit, the terminal calculates the sound and picture time difference according to a target formulaIf, ifIf the preset maximum audio time interval is exceeded, directly returning to re-receive new sound source positioning information and target detection information, otherwise, continuously traversing until finding outAnd starting from the position of the extreme value point which is changed from small to big, the sound and picture information unit at the corresponding position is the matched target sound and picture information unit. The preset maximum audio time intervalThe interval can be specifically set according to the recording conditions of different devices.

Further, the target formula is as follows:

whereinIn order to obtain the time difference between the sound and the picture,the number of the sound and picture information unit is,a picture time stamp in the object detection information is represented,is shown asThe audio time stamp of the individual units of audiovisual information,and compensating for the preset sound and picture time.

In particular, theFor compensating for the problem of picture-in-sound asynchronism, and can be set and adjusted according to the actual conditions of different devices, and if the audio time stamp lags behind the picture time stamp, the audio time stamp is adjustedIs positive and vice versaNegative, and when the audio timestamp is relatively close to the picture timestamp delay,it approaches 0.

The terminal determines the extreme point position with the sound-picture time difference from small to large as the position to be matched, because in the process of traversing the sound-picture information units in the target queue in the reverse order, because the new sound-picture information units are added from the tail of the queue, the corresponding audio time stamp is from new to old, namely, the earlier the audio time stamp is traversed, the earlier the audio time stamp is.In the case that the preset maximum audio time interval is not exceeded, as shown in fig. 3 and 4, there are only two trends from right to left:

1) as shown in figure 3 of the drawings,firstly, the size is reduced and then the size is increased;

2) as shown in figure 4 of the drawings,and is increased step by step.

Therefore, only when the sound-picture time difference is at an extreme point (lowest point) with the difference from small to large, the actual time of the audio and the picture is the closest, and the position is taken as a matching point of the sound-picture synchronization, namely, the sound-picture information unit of the position is determined as the target sound-picture information unit.

205. Updating the target detection information to a target sound and picture information unit;

and for the matched target sound and picture information unit, the terminal updates the target detection information to the target sound and picture information unit. The sound source positioning information and the target detection information stored in the target sound-picture information unit can reduce or eliminate the sound-picture time difference of the sound-picture data in the target sound-picture information unit due to the calibration of the audio time stamp and the picture time stamp, so that the calibrated sound-picture data can be read from the target sound-picture information unit when a terminal needs to output a video image result, and the output video image result can be calculated according to the sound-picture data.

Further, the sound source positioning information received by the terminal includes a sound source position, and the sound source position may be a one-dimensional sound source angle, or a two-dimensional or three-dimensional sound source position, which is not limited herein. For the matched target sound and picture information units, the terminal counts target detection results within a preset range of the sound source azimuth (sound source angle) of the terminal as effective target detection results. The terminal only updates the effective target detection result to the target sound and picture information unit, and the target detection result outside the preset range is not considered, so that the accuracy of close-up picture calculation is further improved.

In some specific embodiments, the valid target detection result in the sound and picture information unit stores a set of valid target bounding boxes, i.e. target bounding boxes within the azimuth range of the statistical sound source, and determines it as a valid target detection result. The object bounding box refers to a rectangular object detection frame generated in object detection, which is used for positioning the position of an object in an image and is generally determined by using the horizontal and vertical coordinates of the center point of the object in combination with the length and width of the bounding box.

In other specific embodiments, the valid target detection result in the sound and picture information unit stores the number of valid targets, that is, the number of targets detected in the azimuth range of the statistical sound source, and determines it as the valid target detection result. For example, the target detection task is to detect face information, the sound source direction is 60 ° direction in the video image, the preset range is 30 °, the terminal counts the target detection results (the number of detected faces) in the range of 30 ° to 90 ° in the video image, and if there are 2 target detection results in the range, the number of valid target detection results is 2. Preferably, the valid target detection result stored in the sound and picture information unit is the number of valid targets.

206. Performing statistical analysis on the sound and picture information in the target sound and picture information unit within a preset time period, judging whether a stable speaker exists, if not, executing a step 207, and if so, directly executing a step 208;

the terminal carries out statistical analysis on the sound and picture information in the target sound and picture information unit in a preset time period, namely, the sound and picture information after sound and picture synchronous correction is carried out, whether a stable speaker exists in the preset time period is judged, if the stable speaker does not exist, step 207 is executed, the whole picture area is continuously output, and if the stable speaker exists, step 208 and the subsequent steps are directly executed to output the close-up picture of the speaker.

In some specific embodiments, whether a stable speaker exists may be determined by determining whether the change of the sound source angle within the preset time period is within an effective range, and then determining whether the number of effective sound-picture information (specifically, sound-picture information units) within the preset time period reaches a set ratio. Wherein, the sound source angle change in the effective range specifically means: if the sound source angle fluctuation range does not exceed the effective range (for example, 30 °), it is considered that the sound source angle is relatively stable and effective. The valid sound-picture information is specifically sound-picture information in which the number of valid targets in the sound-picture information is not 0 and the angle of the sound source is within a valid range. Specifically, the step of the terminal determining whether the number of the valid sound and picture information reaches the set ratio means that the terminal counts the number Nv of the valid sound and picture information within a preset time period (for example, 3 s), where the total number of the sound and picture information in the time period is Nt, and if Nv > = k × Nt (where k is the preset ratio, for example, set to 0.8), it indicates that the number of the valid sound and picture information within the time period reaches the set ratio. If both of the above two conditions are satisfied, it is determined that there is a stable speaker, and if either of the above two conditions is not satisfied, it is determined that there is no stable speaker.

It should be noted that the effective range of the sound source angle change and the specific value of the setting ratio corresponding to the number of the effective sound image information may be specifically set according to the actual requirement, and this is not limited here.

207. Outputting the whole picture area;

the terminal determines whether a stable speaker exists or not by performing statistical analysis on the sound and picture information in the preset time period, specifically by determining whether the angle change of a sound source in the preset time period is within an effective range or not and by determining whether the number of effective sound and picture information reaches a set proportion or not, and if not, continuously outputting the whole picture area.

It should be noted that when the terminal outputs the whole picture area, step 202 is continuously executed to receive the real-time audio and video information, and then step 203 and the subsequent steps are executed until the video preview is finished.

208. Determining the position of a speaker according to the sound and picture information;

if the terminal determines that a stable speaker currently exists, it is necessary to determine the position of the speaker first.

In some specific embodiments, the terminal first finds an average sound source angle as an initial horizontal position according to a plurality of sound source angles in which the number of effective targets in the sound-picture information is not 0, and then finds an average value of center points of target bounding boxes in the target detection information as a position of the speaker within an effective range of the sound source angle.

In other specific embodiments, the terminal may take the sound source angle with the latest effective target number of not 0 in the sound-picture information as the initial horizontal position, and select the largest bounding box from the corresponding target bounding boxes as the speaker position.

It should be noted that the effective target number specifically refers to the number of targets within a certain range of sound source angles, and targets outside the certain range of sound source angles are not considered.

209. Calculating a target picture subregion according to the position of the speaker;

based on the position of the speaker obtained in step 208, a target frame sub-area containing the speaker, i.e., a close-up frame of the speaker, is calculated. Specifically, the terminal needs to calculate actual frame data of the target image sub-region or a cropping zoom parameter corresponding to the target image sub-region to determine the target image sub-region.

In some optional embodiments, if there are other multiple target detection bounding boxes in a certain range near the target picture subregion of the speaker, that is, if there are other people near the speaker, the terminal may adjust the size and position of the target picture subregion, so that it can contain more targets.

210. Outputting a target picture subregion;

and after the target picture subregion containing the speaker sketch picture is calculated, the terminal outputs the target picture subregion, namely, the first video result.

In some specific embodiments, the terminal may calculate and output the first video image result according to the video update request.

In other specific embodiments, the terminal may also calculate and output the first video image result according to a preset time interval in time, or calculate the first video image result according to a preset time interval in time, but only output the first video image result when the calculation result changes.

211. Judging whether the receiving state of the sound and picture information is normal or not and judging whether an effective target exists in the picture or not according to the sound and picture information, if so, executing a step 212, and if not, executing a step 207;

when the close-up picture of the speaker is output, the terminal needs to continuously judge whether the receiving state of the background audio-video information is normal or not in the output process, and then judges whether an effective target exists in the picture or not.

In some specific embodiments, the normal behavior of the recording state of the sound and picture information includes, but is not limited to:

a. the audio-visual information queue is not empty;

b. the difference value between the current time and the latest sound and picture information timestamp in the sound and picture information queue is in an effective range;

c. and the difference value of the timestamps of the adjacent sound-picture information in the sound-picture information queue is within an expected range.

The specific step of judging whether the effective target exists in the picture according to the sound and picture information comprises the following steps: and traversing the sound and picture information queue in a reverse order, and if the number of the effective targets of at least one sound and picture information unit in the set time is not 0, determining that the effective targets exist in the current picture. It should be noted that the effective number of targets refers to the number of targets within a certain range of sound source angles, and targets outside the certain range of sound source angles are not considered.

If one of the two conditions is not satisfied, step 207 is executed, and the output of the speaker close-up is converted into the output of the whole picture area.

If both of the above two conditions are satisfied, it is further determined whether there is a stable speaker, and the determining method is as in step 206, which is not described herein again. If there is a stable speaker, step 212 is executed to further determine whether the position of the speaker has changed, and if the position of the speaker has not changed, step 210 is returned to, i.e. the target screen sub-area is kept unchanged and the target screen sub-area is continuously output.

212. Judging whether the position of the speaker exceeds a set range and the duration time reaches preset time, if so, executing step 213, otherwise, returning to step 210;

when the terminal outputs the close-up picture of the speaker, the terminal needs to continuously judge whether the receiving state of the background sound and picture information is normal or not and then judge whether an effective target exists in the picture or not. And if the two conditions are met, further judging whether a stable speaker exists, and if the stable speaker exists, continuing to further judge whether the position of the stable speaker changes.

Judging whether the position of the stable speaker changes specifically by judging whether the position of the speaker exceeds a set range and the duration time reaches a preset time, if the two conditions are met, the position of the speaker is considered to change, then step 213 is executed, if any one of the two conditions is not met, the position of the speaker is considered not to change, then step 210 is returned, namely the target picture subregion is kept unchanged, and the target picture subregion is continuously output.

In some embodiments, the duration may be calculated by the number of frames, and when the number of frames reaches a set value, it is determined that the speaker position has changed and a moving close-up picture is required.

In other embodiments, the duration may be calculated in minutes or seconds, and when the duration reaches a set value, it is determined that the speaker position has changed and a close-up movement is required.

213. Recalculating and outputting the target picture subregion according to the position of the speaker.

If the terminal determines that the position of the speaker changes, it is necessary to re-determine the target picture sub-region according to the position of the speaker and output a new target picture sub-region, and the process of re-calculating the target picture sub-region according to the position of the speaker may refer to steps 208 to 210, which is not described herein again.

In some optional embodiments, since a situation of two people talking occurs in a multi-person conference, at this time, the terminal may determine, through the multiple cameras, a person who is currently speaking and an object to which the current speaker is directed, and output a close-up picture of the two people at the same time, specifically as follows:

after determining the first video image result, the terminal also needs to determine a second video image result, and then outputs the first video image result and the second video image result at the same time.

The determination of the second video image result may be directly a close-up picture of more than one stable speaker as the second video image result, or may be that the names of the participants mentioned in the speech content are determined based on semantic analysis according to the speech content of the current stable speaker, the positions of the participants are determined in the camera shooting area through a face recognition technology, and the second video image result is determined according to the positions of the participants.

In the embodiment, the position of the speaker is determined more accurately and reliably in an actual application scene by adopting a scheme of combining sound source positioning and image recognition and simultaneously utilizing audio and video information. When the close-up picture of the speaker is output, the terminal needs to continuously judge the speaking state at the background, so that when the position of the speaker changes, a new close-up picture is continuously output, and the close-up picture is more flexible to calculate. And statistical analysis is carried out within a period of time based on the sound and picture information, and better tolerance is provided for abnormal values of sound source positioning and image identification when whether a stable speaker exists or not is judged, so that the calculation of the close-up picture is more accurate and reliable, and the user experience is greatly improved.

Further, in this embodiment, by separately processing the sound source positioning information and the target detection result, a pre-created sound-picture information unit is configured according to the audio time stamp in the sound source positioning information, a corresponding target sound-picture information unit is matched according to the picture time stamp in the received target detection result, and the target detection result is updated to the matched target sound-picture information unit. Further, in this embodiment, when determining a matched target sound-picture information unit, matching is performed by using a sound-picture time difference, a sound-picture unit at an extreme point position where the sound-picture time difference in the target queue changes from small to large is determined as the target sound-picture information unit, and then an effective target detection result within a preset range of the sound source direction is counted and updated to the target sound-picture information unit, so that sound-picture data can be read from the target sound-picture information unit and calculated in the subsequent video image calculation. The method has better tolerance on the delay of sound source positioning and target detection, can greatly reduce the adverse effect of asynchronous sound and picture of input data on the final video picture processing result in practical application, and further enables the calculation of close-up pictures to be more accurate and reliable.

Referring to fig. 5, fig. 5 is a block diagram illustrating an embodiment of an apparatus for controlling video image output according to the present application, the apparatus comprising:

an opening unit 501 for opening a video preview;

a receiving unit 502, configured to receive audio and video information in parallel, where the audio and video information includes sound source positioning information and target detection information;

a first judging unit 503, configured to perform statistical analysis on the sound and picture information within a preset time period, and judge whether there is a stable speaker;

a close-up output unit 504 for calculating and outputting the first video image result based on the sound and picture information when the judgment unit determines that there is a stable speaker.

In the embodiment, the position of the speaker is determined more accurately and reliably in an actual application scene by adopting a scheme of combining sound source positioning and image recognition and simultaneously utilizing audio and video information. And statistical analysis is carried out within a period of time based on the sound and picture information, and better tolerance is provided for abnormal values of sound source positioning and image identification when whether a stable speaker exists or not is judged, so that the calculation of the close-up picture is more accurate and reliable, and the user experience is greatly improved.

Referring to fig. 6, fig. 6 is a diagram illustrating another embodiment of the apparatus for controlling video image output according to the present application, where the apparatus includes:

an opening unit 601 configured to open a video preview;

a receiving unit 602, configured to receive audio and video information in parallel, where the audio and video information includes sound source positioning information and target detection information;

a first judging unit 603, configured to perform statistical analysis on the sound and picture information within a preset time period, and judge whether there is a stable speaker;

a close-up output unit 604 for calculating and outputting a first video image result from the sound-picture information when the first judgment unit 603 determines that there is a stable speaker.

Optionally, the first determining unit 603 is specifically configured to:

and carrying out statistical analysis on the sound and picture information in a preset time period, and determining that a stable speaker exists if the angle change of the sound source is within the effective range and the number of the effective sound and picture information reaches a set proportion.

Optionally, the sound source positioning information includes an audio time stamp, and the target detection information includes a picture time stamp; the device still includes: a sound-picture synchronization unit 605;

the sound-picture synchronization unit 605 specifically includes:

a configuration module 6051, configured to configure a pre-created sound and picture information unit according to the audio time stamp;

a matching module 6052 for determining a matched target audio-visual information unit according to the visual time stamp;

an updating module 6053 for updating the target detection information to the target sound-picture information unit;

the first determining unit 603 is specifically configured to:

and carrying out statistical analysis on the sound and picture information in the target sound and picture information unit in a preset time period, and judging whether a stable speaker exists.

Optionally, the sound-picture synchronization unit 605 further includes:

a storage module 6054, configured to store the sound and picture information unit into the target queue;

the matching module 6052 is specifically configured to:

and determining a matched target sound-picture information unit from the target queue according to the picture time stamp.

Optionally, the matching module 6052 is specifically configured to:

traversing the target queue in a reverse order, and calculating the sound and picture time differences of all sound and picture information units in the target queue through a target formula according to the picture time stamps and the audio time stamps;

and determining the sound-picture information unit at the extreme point position with the sound-picture time difference from small to large as a target sound-picture information unit.

Optionally, the target formula is:

whereinIn order to obtain the time difference between the sound and the picture,the number of the sound and picture information unit is,a picture time stamp in the object detection information is represented,is shown asThe audio time stamp of the individual units of audiovisual information,and compensating for the preset sound and picture time.

Optionally, the close-up output unit 604 is specifically configured to:

and when a video updating request is received, calculating and outputting a first video image result according to the sound and picture information.

Optionally, the close-up output unit 604 is specifically configured to:

calculating and outputting a first video image result according to a preset time interval;

or the like, or, alternatively,

calculating a first video image result according to a preset time interval on time;

and outputting the first video image result when the first video image result changes.

Optionally, the close-up output unit 604 is specifically configured to:

determining the position of a speaker according to the sound and picture information;

calculating a target picture subregion according to the position of the speaker;

and outputting the target picture subregion.

Optionally, the apparatus further comprises:

a second judging unit 606, configured to judge whether the receiving state of the sound and image information is normal and judge whether an effective target exists in the image according to the sound and image information;

the original image output unit 607 is configured to output the entire image area when the second determination unit 606 determines that the sound and image information reception state is abnormal or no valid target exists in the image.

Optionally, the apparatus further comprises:

a third determining unit 608, configured to further determine whether the position of the speaker exceeds the set range and the duration reaches the preset time when the second determining unit 606 determines that the receiving state of the sound and picture information is normal and an effective target exists in the picture;

the feature output unit 604 is further specifically configured to:

when the third judging unit 608 determines that the position of the speaker exceeds the setting range and the duration time reaches the preset time, the target screen sub-area is recalculated and output according to the position of the speaker.

Optionally, the original image output unit 607 is further specifically configured to:

when the first judgment unit 603 determines that there is no stable speaker, the entire screen area is output.

Optionally, the apparatus further comprises:

a determining unit 609 for determining a second video image result;

the feature output unit 604 is further specifically configured to:

and simultaneously outputting the first video image result and the second video image result.

Optionally, the determining unit 609 is specifically configured to:

determining a second video image result according to the position of the last stable speaker;

or the like, or, alternatively,

and determining a second video image result according to the stable speaking content of the speaker.

Optionally, the determining unit 609 is specifically configured to:

analyzing the speaking content of the stable speaker and determining the name of the target user in the speaking content;

determining the position of the target user according to the name of the target user;

and determining a second video image result according to the position of the target user.

In the device of this embodiment, the functions of each unit correspond to the steps in the method embodiment shown in fig. 2, and are not described herein again.

Referring to fig. 7, fig. 7 is a diagram illustrating an embodiment of an apparatus for controlling video output according to the present application, where the apparatus includes:

a processor 701, a memory 702, an input/output unit 703, a bus 704;

the processor 701 is connected with the memory 702, the input/output unit 703 and the bus 704;

the memory 702 holds a program that the processor 701 calls to execute any of the methods of controlling video image output as described above.

The present application also relates to a computer-readable storage medium having a program stored thereon, wherein the program, when run on a computer, causes the computer to perform any of the above methods of controlling the output of video images.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

24页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于提取视频关键帧的方法、装置及控制器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类