CN-119854436-B - Video processing method, apparatus, device, storage medium, and computer program product
Abstract
The present application relates to a video processing method, apparatus, computer device, storage medium and computer program product. The method comprises the steps of obtaining a first video frame collected in a first shooting mode, wherein the first shooting mode is used for indicating shooting with a reduced target frame rate, the target frame rate is determined based on environment information of a target scene, a target video frame to be supplemented is generated according to the first video frame and the target frame rate, and frame supplementing processing is carried out on the first video frame based on the target video frame to obtain a video frame after frame supplementing. The method can solve the problem of video frame rate reduction caused by the environment of the target scene, ensures the video picture effect and improves the frame rate of the video.
Inventors
- YU XIANGDONG
Assignees
- 深圳绿米联创科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20241220
Claims (11)
- 1. A method of video processing, the method comprising: the method comprises the steps of acquiring a first video frame of color imaging acquired in a first shooting mode, wherein the first shooting mode is used for indicating shooting with a target frame rate after frame dropping, the target frame rate is determined based on environment information of a target scene, and the first shooting mode is used for representing a mode for restoring object colors of a darker environment through frame dropping and loading of image adjustment parameters capable of color imaging; generating a target video frame to be supplemented according to the first video frame and the target frame rate; and carrying out frame supplementing processing on the first video frame based on the target video frame to obtain a video frame after frame supplementing.
- 2. The method of claim 1, wherein generating the target video frame to be supplemented from the first video frame and the target frame rate comprises: determining a target frame supplementing position according to the position of the first video frame and the target frame rate; and determining the target video frame to be supplemented at the target frame supplementing position based on the first video frame.
- 3. The method of claim 2, wherein the determining the target video frame to be supplemented by the target supplemental frame location based on the first video frame comprises: Copying the previous frame video frame corresponding to the target frame supplementing position to obtain a copied previous frame video frame; the previous frame video frame represents a first video frame of a previous frame positioned at the target complementary frame position; And setting the copied previous frame video frame as the target video frame to be supplemented at the target frame supplementing position.
- 4. The method of claim 2, wherein determining a target complementary frame position based on the position of the first video frame and the target frame rate comprises: carrying out average processing on time periods corresponding to the first video frames to obtain a plurality of frame supplementing positions; If each first video frame falls into the plurality of frame compensating positions, determining the rest frame compensating positions except the frame compensating position corresponding to each first video frame in the plurality of frame compensating positions as target frame compensating positions; And if the position of the first video frame is positioned between two adjacent frame supplementing positions and the distance between the position of the first video frame and the frame supplementing position which is closer to the position is smaller than a distance threshold value, deleting the frame supplementing position which is closer to the position, and obtaining the target frame supplementing position according to the deleted residual frame supplementing position.
- 5. The method of claim 1, further comprising, prior to acquiring the first video of the color image acquired in the first capture mode: and if the ambient illuminance information of the target scene is detected to meet the first ambient condition, switching the currently executed shooting mode to the first shooting mode.
- 6. The method of claim 5, wherein the acquiring a first video frame of color imaging acquired in a first capture mode comprises: The method comprises the steps of acquiring a first image parameter corresponding to a first shooting mode, wherein the first image parameter represents an image adjustment parameter used for generating a color image under the condition that the ambient illuminance information meets the first ambient condition; and acquiring the first video frame shot according to the first image parameter.
- 7. The method of claim 5, further comprising, after obtaining the post-frame video: If the ambient illuminance information is detected to meet a second ambient condition, the executed first shooting mode is switched to a second shooting mode, wherein the second shooting mode is used for indicating shooting processing by adopting a preset frame rate; and acquiring a second video frame acquired in the second shooting mode.
- 8. A video processing apparatus, the apparatus comprising: The system comprises a frame dropping shooting module, a frame setting module and a frame setting module, wherein the frame dropping shooting module is used for acquiring a first video frame of color imaging acquired in a first shooting mode, the first shooting mode is used for indicating shooting by adopting a target frame rate after frame dropping, the target frame rate is determined based on environment information of a target scene, and the first shooting mode is used for representing a mode of restoring object colors of a darker environment by dropping frames and loading image adjustment parameters capable of color imaging; The frame supplementing generation module is used for generating a target video frame to be supplemented according to the first video frame and the target frame rate; And the video frame supplementing module is used for carrying out frame supplementing processing on the first video frame based on the target video frame to obtain a video frame after frame supplementing.
- 9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
- 10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
- 11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
Description
Video processing method, apparatus, device, storage medium, and computer program product Technical Field The present application relates to the field of computer technology, and in particular, to a video processing method, apparatus, computer device, storage medium, and computer program product. Background With the continuous development of image technology and monitoring equipment, the monitoring equipment can generate clear color images even when used in environments with darker light, such as at night or in dark environments, and the identification effect on monitoring targets in monitoring pictures is effectively improved. In the current monitoring equipment, the output of a color and highlight monitoring picture is usually realized by reducing the acquisition of video frames and increasing the exposure time of single-frame video frames under the environment with darker light. Although the method can output the color monitoring picture in a dark environment, the frame rate of the color monitoring picture is also obviously reduced, so that the color monitoring picture is not smooth, and even the color monitoring picture cannot be connected to a platform or a client side which has a requirement on the video frame rate. Disclosure of Invention In view of the foregoing, it is desirable to provide a video processing method, apparatus, computer device, computer readable storage medium, and computer program product that can improve the video picture effect in a dark-light environment. In a first aspect, the present application provides a video processing method. The method comprises the following steps: the method comprises the steps of acquiring a first video frame acquired in a first shooting mode, wherein the first shooting mode is used for indicating shooting by adopting a target frame rate after frame dropping; generating a target video frame to be supplemented according to the first video frame and the target frame rate; and carrying out frame supplementing processing on the first video frame based on the target video frame to obtain a video frame after frame supplementing. In one embodiment, generating a target video frame to be supplemented according to the first video frame and the target frame rate includes: determining a target frame supplementing position according to the position of the first video frame and the target frame rate; and determining the target video frame to be supplemented at the target frame supplementing position based on the first video frame. In one embodiment, determining the target video frame to be supplemented by the target frame supplementing position based on the first video frame includes: Copying the previous frame video frame corresponding to the target frame supplementing position to obtain a copied previous frame video frame; the previous frame video frame represents a first video frame of a previous frame positioned at the target complementary frame position; And setting the copied previous frame video frame as the target video frame to be supplemented at the target frame supplementing position. In one embodiment, determining a target complementary frame position based on the position of the first video frame and the target frame rate includes: carrying out average processing on time periods corresponding to the first video frames to obtain a plurality of frame supplementing positions; If each first video frame falls into the plurality of frame compensating positions, determining the rest frame compensating positions except the frame compensating position corresponding to each first video frame in the plurality of frame compensating positions as target frame compensating positions; And if the position of the first video frame is positioned between two adjacent frame supplementing positions and the distance between the position of the first video frame and the frame supplementing position which is closer to the position is smaller than a distance threshold value, deleting the frame supplementing position which is closer to the position, and obtaining the target frame supplementing position according to the deleted residual frame supplementing position. In one embodiment, before acquiring the first video acquired in the first shooting mode, the method further includes: and if the ambient illuminance information of the target scene is detected to meet the first ambient condition, switching the currently executed shooting mode to the first shooting mode. In one embodiment, acquiring a first video frame acquired in a first capture mode includes: The method comprises the steps of acquiring a first image parameter corresponding to a first shooting mode, wherein the first image parameter represents an image adjustment parameter used for generating a color image under the condition that the ambient illuminance information meets the first ambient condition; and acquiring the first video frame shot according to the first image parameter. In one embodiment, after obtaining the v