The present disclosure relates to the field of video technologies and, for example, to a video picture adjustment method and apparatus, a computer device and a storage medium.
With the development of a network technology and a multimedia technology, playing or recording a video by using a mobile terminal device has become one of important applications of the multimedia technology.
In some cases, a user has a requirement of recording a video on a screen and at the same time playing a reference video that the user is interested in on the same screen. However, the displayed reference video and the displayed recorded video may have discordant proportions since a recording device or a recording manner of the reference video and the recorded video may be different.
Embodiments of the present disclosure provide a video picture adjustment method and apparatus, a computer device and a storage medium, which enable a display effect of a synthesized video recorded in a split-screen manner to be better.
In an embodiment, an embodiment of the present disclosure provides a video picture adjustment method. The method includes the following steps: a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result, where a human-eye comfort parameter corresponding to the preset height-width ratio is optimal; and a picture size of the reference video is adjusted according to a picture size of a recorded video and the first comparison result, where the reference video and the recorded video are two views displayed on a current display screen in a split-screen manner.
In an embodiment, an embodiment of the present disclosure provides a video picture adjustment apparatus. The apparatus includes a first comparison module and a video picture adjustment module. The first comparison module is configured to compare a first height-width ratio of a picture of a reference video with a preset height-width ratio to obtain a first comparison result, where a human-eye comfort parameter corresponding to the preset height-width ratio is optimal. The video picture adjustment module is configured to adjust a picture size of the reference video according to a picture size of a recorded video and the first comparison result, where the reference video and the recorded video are two views displayed on a current display screen in a split-screen manner.
In an embodiment, an embodiment of the present disclosure provides a computer device. The computer device includes a memory and a processor. The memory stores computer programs, and the processor, when executing the computer programs, implements the following steps: a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result, where a human-eye comfort parameter corresponding to the preset height-width ratio is optimal; and a picture size of the reference video is adjusted according to a picture size of a recorded video and the first comparison result, where the reference video and the recorded video are two views displayed on a current display screen in a split-screen manner.
In an embodiment, an embodiment of the present disclosure provides a computer-readable storage medium. Computer programs are stored in the computer-readable storage medium. The computer programs, when executed by a processor, implement the following steps: a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result, where a human-eye comfort parameter corresponding to the preset height-width ratio is optimal; and a picture size of the reference video is adjusted according to a picture size of a recorded video and the first comparison result, where the reference video and the recorded video are two views displayed on a current display screen in a split-screen manner.
The present disclosure will be described in detail below with reference to the drawings and embodiments. The specific embodiments described herein are merely intended to illustrate the present disclosure and are not intended to limit the present disclosure.
A video generation method provided in an embodiment of the present disclosure may be applied to multiple types of terminal devices which may be, but is not limited to, various personal computers, a laptop, a smart phone, a tablet computer and a portable wearable device.
As shown in
Those skilled in the art may understand that the structure shown in
In an embodiment, as shown in
In step 202, a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result.
The above-mentioned reference video is a complete video stored in the terminal device, and may be a pre-stored video, a pre-recorded video or a video downloaded through a network, etc. A human-eye comfort parameter corresponding to the preset height-width ratio meets a preset condition. The preset condition may be understood as that the human-eye comfort parameter corresponding to the preset height-width ratio is optimal. In an embodiment, the optimal human-eye comfort parameter may be understood as the highest comfort level to which the human-eye comfort parameter belongs, that is, different height-width ratios of the picture of the video may correspond to different human-eye comfort parameters. For example, the preset height-width ratio may be obtained by counting watching ratings of users for a large number of synthesized videos recorded in the split-screen manner. The synthesized video recorded in the split-screen manner includes the recorded video and the reference video. Height-width ratios of the recorded videos in different synthesized videos may be different. For example, a height-width ratio of the recorded video having the highest rating of the users is used as the preset height-width ratio. Exemplarily, the preset height-width ratio may be 3:4, 4:5, 1:1, 5:4, 4:3, 5:3 or other height-width ratios.
In an embodiment, the terminal device obtains a statistical parameter for the height-width ratios of the recorded videos by counting the height-width ratios of a large number of the recorded videos, and uses the statistical parameter as the preset height-width ratio. This statistical parameter may be a mean value, a median value or other statistical parameters. In an embodiment, a correlation also exists between the above-mentioned preset height-width ratio and the type of the terminal device. For example, a preset height-width ratio for a mobile phone and a preset height-width ratio for a personal computer are different. Therefore, in an embodiment, a corresponding relation between multiple types of terminal devices and multiple preset height-width ratios is pre-established, and a preset height-width ratio corresponding to the type of a current terminal device is acquired according to the corresponding relation between the multiple types of terminal devices and the multiple preset height-width ratios. For example, if the type of the current terminal device is a mobile phone, the preset height-width ratio may be 4:3, and if the type of the current terminal device is a personal computer, the preset height-width ratio may be 3:4.
In an embodiment, the step in which the corresponding relation between the multiple types of terminal devices and the multiple preset height-width ratios is pre-established may include the following steps: for one type of terminal device in the multiple types of terminal devices, a statistical parameter may be obtained by counting height-width ratios of videos recorded by this type of terminal device; and a preset height-width ratio corresponding to this type of terminal device is determined according to the statistical parameter. Moreover, the preset height-width ratio may also be an empirical value which is obtained by a user or a technician from a lot of practical experience for recording in the split-screen manner.
In an embodiment, the terminal device acquires the first height-width ratio of the picture of the reference video; the terminal device compares the first height-width ratio with the preset height-width ratio to obtain the first comparison result. Exemplarily, if the first height-width ratio is 2:1 and the preset height-width ratio is 3:4, the first comparison result is that the first height-width ratio is greater than the preset height-width ratio; and if the first height-width ratio is 3:4, the preset height-width ratio is 1:1, the first comparison result is that the first height-width ratio is less than the preset height-width ratio. In an embodiment, the step in which the first height-width ratio of the picture of the reference video is acquired includes the following steps: a picture size of the reference video is acquired, where the picture size includes a picture width and a picture height, and a quotient of the picture height and the picture width of the reference video is calculated and used as the first height-width ratio of the picture of the reference video.
In step 204, the picture size of the reference video is adjusted according to a picture size of the recorded video and the first comparison result.
The reference video and the recorded video are two views displayed on a display screen in the split-screen manner. The reference video and the recorded video may be respectively displayed left and right, or may be respectively displayed up and down. In the embodiments of the present disclosure, detailed description is carried out by taking the reference video and the recorded video being displayed left and right as an example. For example, the reference video is displayed on a left side of a current display screen, and the recorded video is displayed on a right side of the current display screen; or the reference video is displayed on the right side of the current display screen, and the recorded video is displayed on the left side of the current display screen. It is understood that a situation that the reference video and the recorded video are displayed up and down and a situation that the reference video and the recorded video are displayed left and right are corresponding, which will not be repeated in the embodiments of the present disclosure. There may be one reference video or multiple reference videos. When there are multiple reference videos, the technical scheme in the case of one reference video may still be adopted to adjust picture sizes of the multiple reference videos, which will not be repeated in the embodiments of the present disclosure.
As shown in
In this embodiment, the terminal device may adjust the picture size of the reference video before recording the recorded video, or may adjust the picture size of the reference video in the process of recording the recorded video.
In an embodiment, the terminal device adjusts the picture size of the reference video according to the picture size of the recorded video and the first comparison result. The picture size of the recorded video is a picture size preset by a user or a default picture size used by the terminal device when recording a video, or may be other picture sizes.
In an embodiment, since the user uses the reference video as a background, reference, or reflection of the recorded video, requirements on the picture integrity and the like of the recorded video are more demanding. Therefore, the coordination and the viewing effect of the whole video picture are improved by adjusting the picture size of the reference video.
In an embodiment, when the first comparison result is that the first height-width ratio is less than the preset height-width ratio, that is, the picture of the reference video is relatively flat compared with a height-width ratio with an optimal human-eye comfort parameter. In order to make viewing more comfortable for human eyes, the picture of the reference video is adjusted according to the picture size of the recorded video and the first comparison result, so that the picture of the reference video is completely presented in an area, except for the picture of the recorded video, in the current display screen, and the picture of the reference video and the picture of the recorded video are visually coordinated. Thus the picture display quality is improved and the user watching comfort level is increased.
In an embodiment, when the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, that is, the picture of the reference video is relatively thin and long compared with the height-width ratio with the optimal human-eye comfort parameter. In order to make viewing more comfortable for human eyes, the picture of the reference video is adjusted according to the size picture of the recorded video and the first comparison result, so that the picture of the reference video fully fills an area, except for the picture of the recorded video, in the current display screen as much as possible, and the picture of the reference video and the picture of the recorded video are visually coordinated. Thus the picture display quality is improved and the user watching comfort level is increased.
In the above-mentioned video picture adjustment method, the first height-width ratio of the picture of the reference video is compared with the preset height-width ratio to obtain the first comparison result, and the picture size of the reference video is adjusted according to the picture size of the recorded video and the first comparison result. In addition, the human-eye comfort parameter corresponding to the preset height-width ratio is optimal, so that, in the synthesized video adjusted according to the preset height-width ratio, the picture of the recorded video and the picture of the reference video displayed on the display screen in the split-screen manner are visually coordinated. Thus the picture display quality is improved and the user watching comfort level is increased.
In an embodiment, as shown in
In step 402, a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result.
A human-eye comfort parameter corresponding to the preset height-width ratio meets a preset condition. The explanation of the step 402 refers to the step 202 described above, which will not be repeated here.
In step 404, an equal-ratio scaling processing is performed on a picture size of the reference video according to a picture size of the recorded video and the first comparison result, to obtain a scaled reference video.
In an embodiment, a picture size of the scaled reference video is matched with the picture size of the recorded video. The equal-ratio scaling processing refers to an overall scaling for the picture of the reference video, and a scaling ratio of a picture height is the same as that of a picture width, so that the reduction of the display quality due to deformation and distortion of the picture of the reference video is avoided.
In an embodiment, the picture size of the scaled reference video being matched with the picture size of the recorded video refers to that the picture size of the scaled reference video is the same as the picture size of the recorded video, or that the picture size of the scaled reference video is approximate to the picture size of the recorded video, or that the picture size of the scaled reference video is the same as or approximate to the picture size of the recorded video in one dimension, where one dimension may be the picture width or the picture height.
Exemplarily, the picture size of the scaled reference video is approximate to the picture size of the recorded video, namely, (1) the picture width in the picture size of the reference video is equal to the picture width in the picture size of the recorded video, and a difference between the picture height in the picture size of the reference video and the picture height in the picture size of the recorded video is less than a preset height threshold value; or (2) the picture height in the picture size of the reference video is equal to the picture height in the picture size of the recorded video, and a difference between the picture width in the picture size of the reference video and the picture width in the picture size of the recorded video is less than a preset width threshold value; or (3) a difference between the picture height in the picture size of the reference video and the picture height in the picture size of the recorded video is less than the preset height threshold value,, and a difference between the picture width in the picture size of the reference video and the picture width in the picture size of the recorded video is less than the preset width threshold value. The preset width threshold value may be a percentage of the picture width in the picture size of the recorded video, such as 1%, 2% or 5%.
In an embodiment, the picture size of the scaled reference video being matched with the picture size of the recorded video may be that picture sizes of two views of the reference video and the recorded video displayed on a display screen in a split-screen manner are the same. In addition, the two views fit closely, that is, no reserved area exists at the junction of the two views. Exemplarily, the reserved area may be a black edge.
In an embodiment, the step in which the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video and the first comparison result, to obtain the scaled reference video may include the following steps: if the first comparison result is that the first height-width ratio is less than the preset height-width ratio, the terminal device performs, according to the picture width in the picture size of the recorded video, the equal-ratio scaling processing on the picture size of the reference video to obtain the scaled reference video.
In an embodiment, a screen width occupied by the scaled reference video on the display screen is equal to a screen width occupied by the recorded video on the display screen. In an embodiment, the step in which the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture width in the picture size of the recorded video may include the following steps: a width ratio of the picture width in the picture size of the reference video to the picture width in the picture size of the recorded video is calculated, and the equal-ratio scaling processing is performed on the picture size of the reference video according to the width ratio.
Exemplarily, referring to
Exemplarily, referring to
In an embodiment, in this embodiment, the upper portion and/or lower portion of the picture of the scaled reference video includes a reserved area. The terminal device may adjust a relative display position of the reference video relative to the recorded video according to a user instruction or a preset instruction, so when the relative display position is above the middle, the upper portion of the picture of the scaled reference video may include the reserved area, and the lower portion of the picture of the scaled reference video may not include the reserved area; when the relative display position is below the middle, the lower portion of the picture of the scaled reference video may include the reserved area, and the upper portion of the picture of the scaled reference video does not include the reserved area; when the relative display position is in the middle, the upper portion of the picture of the scaled reference video may include the reserved area, and the lower portion of the picture of the scaled reference video may also include the reserved area. In an embodiment, after the first height-width ratio of the picture of the reference video is compared with the preset height-width ratio to obtain the first comparison result, the video picture adjustment method may further include the following step: the terminal device compares the second height-width ratio of the picture of the recorded video with the first height-width ratio to obtain a second comparison result. In an embodiment, the step in which “the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video and the first comparison result, to obtain the scaled reference video” may include the following step: the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video, the first comparison result and the second comparison result, to obtain the scaled reference video.
In an embodiment, the terminal device acquires the second height-width ratio of the picture size of the recorded video, compares the second height-width ratio with the preset height-width ratio to obtain the second comparison result. Exemplarily, if the second height-width ratio is 1:1, and the preset height-width ratio is 3:4, the second comparison result is that the second height-width ratio is greater than the preset height-width ratio; and if the second height-width ratio is 5:4, and the preset height-width ratio is 4:3, the second comparison result is that the second height-width ratio is less than the preset height-width ratio. In an embodiment, the step in which the second height-width ratio of the picture of the recorded video is acquired includes the following steps: the picture size of the recorded video is acquired, where the picture size includes the picture width and the picture height, and a quotient of the picture height and the picture width of the recorded video is calculated and used as the second height-width ratio of the picture of the recorded video.
In an embodiment, the step in which the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video, the first comparison result, and the second comparison result, to obtain the scaled reference video may include the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is greater than the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the width in the picture size of the recorded video, to obtain the scaled reference video, and the scaled reference video is clipped according to the height in the picture size of the recorded video and a preset clipping rule. The screen width occupied by the scaled reference video on the display screen is equal to the screen width occupied by the recorded video on the display screen. The step in which the scaled reference video is clipped according to the height in the picture size of the recorded video and the preset clipping rule may include the following step: a portion exceeding the height in the picture of the scaled reference video is clipped out according to the height of the picture size of the recorded video. It is understood that, the portion exceeding the height may be clipped from two ends in the height direction in the picture of the reference video, or may be clipped from only one end.
Exemplarily, referring to
Exemplarily, referring to
In an embodiment, the step in which the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video, the first comparison result and the second comparison result, to obtain the scaled reference video may include the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is less than the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the height in the picture size of the recorded video, to obtain the scaled reference video, and the scaled reference video is clipped according to the width in the picture size of the recorded video and a preset clipping rule. A screen height occupied by the scaled reference video on the display screen is equal to a screen height occupied by the recorded video on the display screen. The step in which the scaled reference video is clipped according to the width in the picture size of the recorded video and the preset clipping rule may include the following step: a portion exceeding the width in the picture of the scaled reference video is clipped out according to the width in the picture size of the recorded video. It is understood that, the portion exceeding the width may be clipped from two ends in the width direction in the picture of the reference video, or may be clipped from only one end.
In this embodiment, the step in which the equal-ratio scaling processing is performed on the picture size of the reference video according to the height in the picture size of the recorded video may include the following steps: a height ratio of the picture height in the picture size of the reference video to the picture height in the picture size of the recorded video is calculated, and the equal-ratio scaling processing is performed on the picture size of the reference video according to the height ratio.
Exemplarily, referring to
In an embodiment, the step in which the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video, the first comparison result and the second comparison result, to obtain the scaled reference video may include the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is equal to the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the width or height in the picture size of the recorded video, to obtain the scaled reference video. The screen size occupied by the scaled reference video on the display screen is equal to the screen size occupied by the recorded video on the display screen.
In an embodiment, the preset clipping rule includes a uniform clipping rule, an alignment clipping rule, an identifying person clipping rule or a clipping rule generated according to a user instruction. For example, a target area of the picture of the scaled reference video may be identified through the picture size of the recorded video and/or a preset image identification technology, and then the target area is clipped according to the clipping rule. The uniform clipping rule may be to acquire a position coordinate of the target area and perform an equal-ratio clipping on areas at an upper position, a lower position, a left position and a right position of the target area. The left-right alignment clipping rule may be to align the target area with left or right and clip out excess areas. The identifying person clipping rule may be to identify key point coordinates of a target person and clip other areas except for the key points of the target person. The clipping rule generated according to the user instruction may be to select a clipping rule corresponding to the instruction for clipping according to the user instruction in real time, for example, the uniform clipping rule may be selected when the user instruction is a first instruction.
In the above-mentioned video picture adjustment method, the first height-width ratio of the picture of the reference video is compared with the preset height-width ratio to obtain the first comparison result, and the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video and the first comparison result, to obtain the scaled reference video, so that the picture size of the scaled reference video is matched with the picture size of the recorded video. In addition, since the human-eye comfort parameter corresponding to the preset height-width ratio is optimal, the picture of the recorded video and the picture of the reference video displayed on the display screen in the split-screen manner are visually coordinated. Thus the picture display quality is improved and the user watching comfort level is increase. Meanwhile, the reduction of the display quality due to deformation and distortion of the picture of the reference video in the adjustment process is avoided.
In an embodiment, the video picture adjustment method may further include the following step: the adjusted reference video and the recorded video are synthesized into a target video in a process of recording the recorded video. That is, in the process of recording the recorded video, video frames of the adjusted reference video and recorded video frames of the recorded video are synthesized to generate video frames of the target video. It is understood that a set of video frames of the reference video and the recorded video which are synthesized have the same timestamps when played on the current display screen. In this embodiment, since the recorded video and the reference video are synthesized in the recording process, the efficiency is increased compared with that the recorded video and the reference video are synthesized after the recording process.
It should be understood that although multiple steps in the flowcharts of
In an embodiment, as shown in
The first comparison module 1001 is configured to compare a first height-width ratio of a picture of a reference video with a preset height-width ratio to obtain a first comparison result. A human-eye comfort parameter corresponding to the preset height-width ratio meets a preset condition.
The video picture adjustment module 1002 is configured to adjust a picture size of the reference video according to a picture size of a recorded video and the first comparison result. The reference video and the recorded video are two views displayed on a display screen in a split-screen manner.
In an embodiment, as shown in
In an embodiment, the first video picture adjustment unit 10021 is configured to, if the first comparison result is that the first height-width ratio is less than the preset height-width ratio, perform, according to a picture width in the picture size of the recorded video, the equal-ratio scaling processing on the picture size of the reference video to obtain a scaled reference video. A screen width occupied by the scaled reference video on the display screen is equal to a screen width occupied by the recorded video on the display screen.
In an embodiment, an upper portion and/or a lower portion of the picture of the scaled reference video include a reserved area.
In an embodiment, as shown in
In an embodiment, the second video picture adjustment unit 10022 is configured to, if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is greater than the second height-width ratio, perform, according to the width in the picture size of the recorded video, the equal-ratio scaling processing on the picture size of the reference video to obtain the scaled reference video, and clip the scaled reference video according to the height in the picture size of the recorded video and a preset clipping rule. A screen width occupied by the scaled reference video on the display screen is equal to a screen width occupied by the recorded video on the display screen.
In an embodiment, the second video picture adjustment unit 10022 is configured to, if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is less than the second height-width ratio, perform, according to the height in the picture size of the recorded video, the equal-ratio scaling processing on the picture size of the reference video to obtain the scaled reference video, and clip the scaled reference video according to the width in the picture size of the recorded video and the preset clipping rule. A screen height occupied by the scaled reference video displayed on the display screen is equal to a screen height occupied by the recorded video displayed on the display screen.
In an embodiment, the preset clipping rule includes a uniform clipping rule, an alignment clipping rule, an identifying person clipping rule or a clipping rule generated according to a user instruction.
In an embodiment, the video picture adjustment apparatus 1000 may further include a device type acquisition module and a preset height-width ratio acquisition module. The device type acquisition module is configured to acquire a type of a current terminal device. The preset height-width ratio acquisition module is configured to acquire a preset height-width ratio corresponding to the type of the current terminal device according to a pre-established corresponding relation between multiple types of terminal devices and multiple preset height-width ratios.
In an embodiment, as shown in
In the above-mentioned video picture adjustment apparatus, the first height-width ratio of the picture of the reference video is compared with the preset height-width ratio to obtain the first comparison result, and the picture size of the reference video is adjusted according to the picture size of the recorded video and the first comparison result. In addition, since the human-eye comfort parameter corresponding to the preset height-width ratio is optimal, the picture of the recorded video and the picture of the reference video displayed on the display screen in the split-screen manner are visually coordinated. Thus the picture display quality is improved and the user watching comfort level is increased.
Specific definitions regarding to the video picture adjustment apparatus may refer to the definitions of the video picture adjustment method described above, which will not repeated here. All or part of the multiple modules in the above-mentioned video picture adjustment apparatus may be implemented through software, hardware and a combination thereof. The above-mentioned multiple modules may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor may call and execute operations corresponding to the above-mentioned multiple modules.
In an embodiment, a computer device is provided. The computer device may be a terminal, and an internal structure thereof may be as shown in
Those skilled in the art may understand that the structure shown in
In an embodiment, a computer device is provided. The computer device includes a memory and a processor. The memory stores computer programs. The processor, when executing the computer programs, implements the following steps: a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result, where a human-eye comfort parameter corresponding to the preset height-width ratio meets a preset condition; and a picture size of the reference video is adjusted according to a picture size of the recorded video and the first comparison result. The reference video and the recorded video are two views displayed on a display screen in a split-screen manner.
In an embodiment, the processor, when executing the computer programs, further implements the following step: an equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video and the first comparison result, to obtain a scaled reference video. In an embodiment, a picture size of the scaled reference video is matched with the picture size of the recorded video.
In an embodiment, the processor, when executing the computer programs, further implements the following steps: if the first comparison result is that the first height-width ratio is less than the preset height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to a picture width in the picture size of the recorded video, to obtain a scaled reference video. A screen width occupied by the scaled reference video on the display screen is equal to a screen width occupied by the recorded video on the display screen.
In an embodiment, an upper portion and/or a lower portion of the picture of the scaled reference video includes a reserved area.
In an embodiment, the processor, when executing the computer programs, further implements the following steps: a second height-width ratio of a picture of the recorded video is compared with the first height-width ratio to obtain a second comparison result; and the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video, the first comparison result and the second comparison result, to obtain the scaled reference video.
In an embodiment, the processor, when executing the computer programs, further implements the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is greater than the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the width in the picture size of the recorded video, to obtain the scaled reference video, and the scaled reference video is clipped according to the height in the picture size of the recorded video and a preset clipping rule. The screen width occupied by the scaled reference video on the display screen is equal to the screen width occupied by the recorded video on the display screen.
In an embodiment, the processor, when executing the computer programs, further implements the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is less than the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the height in the picture size of the recorded video, to obtain the scaled reference video, and the scaled reference video is clipped according to the width in the picture size of the recorded video and the preset clipping rule. A screen height occupied by the scaled reference video on the display screen is equal to a screen height occupied by the recorded video on the display screen.
In an embodiment, the preset clipping rule includes a uniform clipping rule, an alignment clipping rule, an identifying person clipping rule or a clipping rule generated according to a user instruction.
In an embodiment, the processor, when executing the computer programs, further implements the following step: a type of a current terminal device is acquired; and a preset height-width ratio corresponding to the type of the current terminal device is acquired according to a pre-established corresponding relation between multiple types of terminal devices and multiple preset height-width ratios.
In an embodiment, the processor, when executing the computer programs, further implements the following step: the adjusted reference video and the recorded video are synthesized into a target video in a process of recording the recorded video.
In an embodiment, a computer-readable storage medium is provided. Computer programs are stored on the computer-readable storage medium. The computer programs, when executed by a processor, implement the following steps: a first height-width ratio of a picture of a reference video is compared with a preset height-width ratio to obtain a first comparison result, where a human-eye comfort parameter corresponding to the preset height-width ratio meets a preset condition; and a picture size of the reference video is adjusted according to a picture size of the recorded video and the first comparison result. The reference video and the recorded video are two views displayed on a display screen in a split-screen manner.
In an embodiment, the computer programs, when executed by the processor, further implement the following step: an equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video and the first comparison result, to obtain a scaled reference video. In an embodiment, a picture size of the scaled reference video is matched with the picture size of the recorded video.
In an embodiment, the computer programs, when executed by the processor, further implement the following steps: if the first comparison result is that the first height-width ratio is less than the preset height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to a picture width in the picture size of the recorded video, to obtain the scaled reference video. A screen width occupied by the scaled reference video on the display screen is equal to a screen width occupied by the recorded video on the display screen.
In an embodiment, an upper portion and/or a lower portion of the picture of the scaled reference video includes a reserved area.
In an embodiment, the computer programs, when executed by the processor, further implement the following steps: a second height-width ratio of a picture of the recorded video is compared with the first height-width ratio to obtain a second comparison result; and the equal-ratio scaling processing is performed on the picture size of the reference video according to the picture size of the recorded video, the first comparison result and the second comparison result, to obtain the scaled reference video.
In an embodiment, the computer programs, when executed by the processor, further implement the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is greater than the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the width in the picture size of the recorded video, to obtain the scaled reference video, and the scaled reference video is clipped according to the height in the picture size of the recorded video and a preset clipping rule. The screen width occupied by the scaled reference video on the display screen is equal to the screen width occupied by the recorded video on the display screen.
In an embodiment, the computer programs, when executed by the processor, further implement the following steps: if the first comparison result is that the first height-width ratio is greater than or equal to the preset height-width ratio, and the second comparison result is that the first height-width ratio is less than the second height-width ratio, the equal-ratio scaling processing is performed on the picture size of the reference video according to the height in the picture size of the recorded video, to obtain the scaled reference video, and the scaled reference video is clipped according to the width in the picture size of the recorded video and the preset clipping rule. A screen height occupied by the scaled reference video on the display screen is equal to a screen height occupied by the recorded video on the display screen.
In an embodiment, the preset clipping rule includes a uniform clipping rule, an alignment clipping rule, an identifying person clipping rule or a clipping rule generated according to a user instruction.
In an embodiment, the computer programs, when executed by the processor, further implement the following steps: a type of a current terminal device is acquired; and a preset height-width ratio corresponding to the type of the current terminal device is acquired according to a pre-established corresponding relation between multiple types of terminal devices and multiple preset height-width ratios.
In an embodiment, the computer programs, when executed by the processor, further implement the following step: the adjusted reference video and the recorded video are synthesized into a target video in a process of recording the recorded video.
Those of ordinary skill in the art may understand that all or part of the procedures in the methods of the above embodiments may be implemented by instructing relevant hardware through computer programs. The computer programs may be stored in a non-volatile computer-readable storage medium. The computer programs, when executed, may include procedures of the embodiments of the methods as described above. Any references to memory, storage, database or other media used in the embodiments provided by the present disclosure may include a non-volatile and/or volatile memory. The non-volatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM) or a flash memory. The volatile memory may include a random access memory (RAM) or an external cache memory. As an illustration rather than a limitation, the RAM is available in many forms, such as a static RAM (SRAM), a dynamic RAM (DRAM), a synchronous DRAM (SDRAM), a double data rate SDRAM (DDRSDRAM), an enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), a direct Rambus RAM (RDRAM), a direct Rambus dynamic RAM (DRDRAM) and a Rambus dynamic RAM (RDRAM).
Number | Date | Country | Kind |
---|---|---|---|
201811324662.9 | Nov 2018 | CN | national |
This is continuation of International Patent Application No. PCT/CN2019/116204, filed on Nov. 7, 2019, which is based on and claims priority to Chinese Patent Application No. 201811324662.9 filed with the CNIPA on Nov. 8, 2018, disclosures of which are incorporated herein by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2019/116206 | Nov 2019 | US |
Child | 17018212 | US |