CN114640869A - Video processing method and device, electronic equipment and computer readable storage medium - Google Patents

Video processing method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114640869A
CN114640869A CN202210351947.1A CN202210351947A CN114640869A CN 114640869 A CN114640869 A CN 114640869A CN 202210351947 A CN202210351947 A CN 202210351947A CN 114640869 A CN114640869 A CN 114640869A
Authority
CN
China
Prior art keywords
video
target
light intensity
channel
time period
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210351947.1A
Other languages
Chinese (zh)
Inventor
王鹏
张永兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202210351947.1A priority Critical patent/CN114640869A/en
Publication of CN114640869A publication Critical patent/CN114640869A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2385Channel allocation; Bandwidth allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H80/00ICT specially adapted for facilitating communication between medical practitioners or patients, e.g. for collaborative diagnosis, therapy or health monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2389Multiplex stream processing, e.g. multiplex stream encrypting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • Epidemiology (AREA)
  • Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biomedical Technology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the application discloses a video processing method, a video processing device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: obtaining a light intensity fluctuation value of the original video in a target time period according to the light intensity information of the original video; when the light intensity fluctuation value reaches a preset threshold value, channel video extraction is carried out on the original video in the target time period according to the target single channel, and a target single channel video is obtained; and obtaining a target video to be stored according to the original video and the target single-channel video. By extracting the channel video in the target time period through the single channel meeting the processing condition, the memory occupied by the extracted target single-channel video is smaller, and after the target video is synthesized with the original video to obtain the target video, the memory occupied by the target video can be reduced, and the video can be conveniently stored.

Description

Video processing method and device, electronic equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a video processing method and device, electronic equipment and a computer readable storage medium.
Background
With the rapid development of computer technology, the performance of the camera device is also continuously optimized, and the camera device can record videos of scenes to acquire video information of the scenes in historical time.
However, as the video recording duration increases, the video capacity is also continuously increased, and memory pressure is provided for storing the video.
Disclosure of Invention
Embodiments of the present application provide a video processing method and apparatus, an electronic device, and a computer-readable storage medium, which can reduce memory occupied by video storage and facilitate storage of a video.
In a first aspect, an embodiment of the present application provides a video processing method, including:
obtaining a light intensity fluctuation value of an original video in a target time period according to light intensity information of the original video;
when the light intensity fluctuation value reaches a preset threshold value, channel video extraction is carried out on the original video in the target time period according to a target single channel, and a target single channel video is obtained;
and obtaining a target video to be stored according to the original video and the target single-channel video.
In a second aspect, an embodiment of the present application further provides a video processing apparatus, including:
the acquisition module is used for acquiring a light intensity fluctuation value of an original video in a target time period according to light intensity information of the original video;
the extraction module is used for carrying out channel video extraction on the original video in the target time period according to a target single channel when the light intensity fluctuation value reaches a preset threshold value, so as to obtain a target single channel video;
and the processing module is used for obtaining a target video to be stored according to the original video and the target single-channel video.
Wherein, in some embodiments of the present application, the target single channel comprises a light intensity imaging channel, and the extraction module comprises:
the first extraction unit is used for extracting channel images of each frame of video image of the original video in the target time period according to the light intensity imaging channel to obtain a light intensity channel image corresponding to the video image;
and the first generation unit is used for obtaining a single-channel video of the target according to all the light intensity channel images in the target time period.
Wherein, in some embodiments of the present application, the obtaining module comprises:
the first acquisition unit is used for acquiring the light intensity value of each frame of video image of the original video in a target time period;
and the second generation unit is used for obtaining the light intensity fluctuation value of the original video in the target time period according to the maximum value and the minimum value of the light intensity value in the target time period.
In some embodiments of the present application, the target time period includes a plurality of target sub-time periods, and the obtaining module includes:
the second acquisition unit is used for acquiring the light intensity and the value of a plurality of target sub-time periods according to the light intensity information of the original video;
the third generating unit is used for obtaining the light intensity difference value between the light intensity sum values according to the light intensity sum values corresponding to the target sub-time periods;
and the determining unit is used for taking the light intensity difference value as a light intensity fluctuation value of the original video in the target time period.
In some embodiments of the present application, the obtaining module includes that time points between the target sub-time periods are adjacent to each other or overlap by a preset number of time points.
Wherein, in some embodiments of the present application, the processing module comprises:
and the first processing unit is used for replacing the video of the target time period in the original video according to the target single-channel video to obtain the target video to be stored.
Wherein, in some embodiments of the present application, the processing module comprises:
the second extraction unit is used for carrying out multi-channel video extraction on the original video of the target time period according to at least two channels to obtain a target multi-channel video when the light intensity fluctuation value does not reach the preset threshold value;
and the fourth generating unit is used for obtaining the target video to be stored according to the original video and the target multichannel video.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the video processing method when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the video processing method described above.
According to the method and the device, the light intensity fluctuation value of the original video in the target time period is obtained according to the light intensity information of the original video, when the light intensity fluctuation value reaches a preset threshold value, channel video extraction is carried out on the original video in the target time period according to a single channel, the target single-channel video is obtained, and then the target video to be stored is generated according to the original video and the target single-channel video. Because the video extracted by the single channel has the characteristic of smaller video capacity compared with the video extracted by the plurality of channels, the extracted target single-channel video has smaller memory, and the memory occupied by the target video can be reduced after the target video is synthesized with the original video, so that the storage of the video is facilitated.
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 invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a scene schematic diagram of a video processing method provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a video processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a video camera storage provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a video processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides a video processing method and device, electronic equipment and a computer readable storage medium. Specifically, the embodiment of the present application provides a video processing apparatus suitable for an electronic device, where the electronic device includes a terminal or a server, where the terminal may be a computer, a personal notebook, or a mobile phone, the server may be an independent physical server, may also be a server cluster or a distributed system formed by multiple physical servers, and may also be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), and a big data and artificial intelligence platform, and the server may be directly or indirectly connected in a wired or wireless communication manner.
In the embodiment of the present application, the terminal device may execute the video processing method separately, or the server executes the video processing method separately, or the terminal device and the server execute the video processing method together, please refer to fig. 1, taking the example that the terminal device executes the video processing method separately, where a specific execution process of the video processing method is as follows:
the method comprises the steps that a terminal device 10 starts a video image acquisition function, acquires video images of a target scene to obtain an original video, extracts light intensity information of the original video after the original video of the target scene is obtained by the terminal device 10, obtains a light intensity fluctuation value of the original video in a target time period according to the light intensity information of the original video, extracts channel video from the original video in the target time period according to a target single channel when the light intensity fluctuation value reaches a preset condition to obtain a target single-channel video, and then synthesizes the target video to be stored according to the original video and the target single-channel video.
In this embodiment, the terminal device 10 may include a camera device, and acquire a video image of a scene through a video recording module of the camera device, and then process the video image through an operation unit of the camera device, so as to obtain a target video with a smaller capacity. In the embodiment of the application, the target video can be stored in a local memory of the camera device, can be uploaded to a cloud end and is stored in the cloud end, and the target video can be conveniently checked subsequently.
In this embodiment of the present application, the acquiring and processing of the original video may be completed by two different terminal devices, for example, one terminal device acquires a video image of a target scene to obtain an original video of the target scene, then sends the original video to another terminal device, and after receiving the original video, the another terminal device obtains a light intensity fluctuation value of the original video in a target time period according to light intensity information of the original video, then performs single-channel video extraction on the original video in the target time period to obtain a target single-channel video, and then performs row and side operation on the original video outside the target time period and the target single-channel video to obtain a target video with a smaller storage capacity.
In the embodiment of the application, the acquisition of the original video can be forwarded by the server and issued to the terminal device by the server, and then the terminal device processes the original video to obtain the target video with smaller storage capacity. In the embodiment of the application, the original video forwarded by the server can also be generated after being collected by other terminal equipment and stored in the server, and is forwarded to the terminal for video processing through the server.
In the embodiment of the application, the server may also perform video processing on the original video, that is, the server may extract a single-channel video from the video processing by using the capability of rapidly processing data, and synthesize the extracted video and the original video, thereby obtaining a target video with a small capacity to be stored. The method comprises the steps that video images of a target scene are collected through terminal equipment to obtain an original video of the target scene, then the original video is sent to a server through the terminal equipment, the server carries out video processing on the original video, and the target video with small memory occupation is obtained.
The method and the device for storing the target single-channel video have the advantages that the light intensity fluctuation value of the original video in the target time period is obtained according to the light intensity information of the original video, channel extraction is carried out on the original video in the target time period according to a single channel when the light intensity fluctuation value reaches a preset threshold value, the target single-channel video is obtained, and then the target video to be stored is generated according to the original video and the target single-channel video. The method comprises the steps that when a light intensity fluctuation value reaches a preset threshold value, the fluctuation of the light intensity value of a video image in a target time period meets a processing condition, and the video extracted by a single channel has the characteristic that the video capacity occupies a small memory compared with the video extracted by a plurality of channels, so that the memory occupied by the extracted target single-channel video is small by extracting the channel video in the target time period through the single channel meeting the processing condition, the target video is synthesized with an original video to obtain the target video, the memory occupied by the target video can be reduced, and the storage of the video is facilitated.
The following are detailed below. It should be noted that the description sequence of the following embodiments is not intended to limit the priority sequence of the embodiments.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a video processing method according to an embodiment of the present disclosure. The specific flow of the video processing method may be as follows:
101. and obtaining the light intensity fluctuation value of the original video in the target time period according to the light intensity information of the original video.
In the embodiment of the application, the original video is a video directly acquired by a camera device, for example, a surveillance video acquired by a camera.
In this embodiment, the light intensity information is light intensity information corresponding to a video image in an original video, for example, in this embodiment, the original video includes multiple frames of video images, each frame of video image corresponds to a light intensity value, and the light intensity information of the original video is obtained according to the light intensity value corresponding to each video image.
Because each video image corresponds to one acquisition time, the light intensity value of any time period can be obtained through the light intensity information of the original video.
The embodiment of the application can judge the change condition of the light intensity information of the original video in the target time period according to the light intensity fluctuation value by acquiring the light intensity fluctuation value of the target time period in the original video. Furthermore, according to the embodiment of the application, corresponding video processing can be performed according to the change condition of the light intensity information.
In this embodiment of the present application, the light intensity fluctuation value of the original video in the target time period may be obtained according to the light intensity value of each frame of video image in the target time period, that is, optionally, in some embodiments of the present application, the step "obtaining the light intensity fluctuation value of the original video in the target time period according to the light intensity information of the original video" includes:
acquiring a light intensity value of each frame of video image of the original video in a target time period;
and obtaining the light intensity fluctuation value of the original video in the target time period according to the maximum value and the minimum value of the light intensity value in the target time period.
Wherein the light intensity value of each frame of the video image may be extracted by a light intensity imaging channel, wherein the light intensity imaging channel may comprise a white channel (W) of the four primary colors (RGBW).
The light intensity fluctuation value of the original video in the target time period can be obtained through the maximum value and the minimum value of the light intensity value in the target time period, namely, the difference value of the maximum value and the minimum value of the light intensity value in the target time period is used as the light intensity fluctuation value of the target time period.
In this embodiment, the target time period may also be divided into a plurality of sub-time periods, and the light intensity fluctuation value of the target time period is obtained through the light intensity values of the plurality of sub-time periods, that is, optionally, in some embodiments of the present application, the target time period includes a plurality of target sub-time periods, and the step "obtaining the light intensity fluctuation value of the original video in the target time period according to the light intensity information of the original video" includes:
obtaining light intensity and values of a plurality of target sub-time periods according to light intensity information of an original video;
obtaining a light intensity difference value between the light intensity sum values according to the light intensity sum values corresponding to the target sub-time periods;
and taking the light intensity difference as a light intensity fluctuation value of the original video in the target time period.
In the embodiment of the present application, each target sub-period includes a plurality of time instants, that is, each target sub-period corresponds to light intensity values of a plurality of video images, and for each target sub-period, a sum of the light intensity values of the plurality of video images in the target sub-period may be used as the light intensity value of the target sub-period.
Therefore, in the embodiment of the present application, the light intensity fluctuation value of the target sub-period can be obtained according to the light intensity sum of each target sub-period, for example, in the implementation of the present application, the maximum value and the minimum value of the light intensity sum can be determined from each light intensity sum, and the light intensity fluctuation value of the target sub-period can be determined according to the maximum value and the minimum value.
In this embodiment of the application, time points between the target sub-time periods may be adjacent to each other in the front-back direction or a preset number of time points may coincide with each other, where for the target sub-time periods adjacent to each other in the front-back direction, a start time of each sub-time period may be understood as being adjacent to an end time of a previous sub-time period in the front-back direction, and for the sub-time periods where the preset number of time points coincide with each other, a part where the time points coincide with each other may be understood as being located between the previous sub-time period and a next sub-time period.
The whole target sub-time period can be correspondingly obtained by splicing a plurality of the seed time periods aiming at the sub-time periods adjacent to the front and the back of the time point, namely, the comprehensiveness of obtaining the light intensity value in the target time period can be ensured by setting the sub-time periods adjacent to the front and the back of the time point, namely, the light intensity fluctuation value corresponding to the target time period is obtained based on the light intensity values of the video images at all times in the target time period.
Wherein, for the sub-time segments with the overlapped front and back time points, because the sub-time segment with the overlapped front and back time points has partial time point overlapping, the number of the time points contained in the two sub-time segments is relatively small, that is, for the target time segment with the same size, the corresponding number of the sub-time segments is large, and the calculation span of the light intensity sum value is small, for example, the light intensity fluctuation value of the time segment with 10 time points of 1-10 is calculated, and the sub-time segments are divided by adopting a mode of five time points, if the sub-time segments with the adjacent front and back time points are divided into two sub-time segments of 1-5 and 6-10, and if the sub-time segments with the overlapped time points are divided into 1-5, 2-6, 3-7, 4-8, 5-9 and 6-10, wherein the time span is increased by one time for each sub-time period, wherein due to the division according to the manner of the sub-time periods with coincident time points, repeated times exist between two adjacent divided sub-time periods, so that the light intensity and the value corresponding to the two adjacent sub-time periods have greater relevance, the number of the light intensity and the value is increased, and the relevance and the number between the light intensity and the value are increased, so that a more accurate light intensity fluctuation value is conveniently obtained.
102. And when the light intensity fluctuation value reaches a preset threshold value, carrying out channel video extraction on the original video in the target time period according to a target single channel to obtain a target single channel video.
In the embodiment of the present application, the preset threshold is a threshold at which the scene image changes, that is, when the light intensity fluctuation value reaches or exceeds the threshold, it is determined that the scene image content changes, where the scene image content refers to real objects such as each object, person, or animal included in the scene image. For example, in the embodiment of the present application, the light intensity value of the scene image when no target enters and the light intensity value after the target enters may be recorded, and the preset threshold value is obtained according to the difference between the two light intensity values.
In the embodiment of the present application, a channel refers to a color channel, and one image may correspond to a plurality of color channels, for example, a red channel, a green channel, and a blue channel may be included for a three primary color (RGB) image, and a red channel, a green channel, a blue channel, and a white channel may be included for a four primary color (RGBW) image.
The extracted target single-channel video only contains video image data of a single channel, namely video images intersected with three channels or four channels, and the video capacity of the single channel is small, so that the occupied storage space is small.
In this embodiment of the present application, when obtaining a single-channel video by extraction, the method may be implemented by performing single-channel extraction on each frame of video image, where in this embodiment of the present application, the target single channel may include a light intensity imaging channel, that is, optionally, in some embodiments of the present application, the step "performing channel video extraction on the original video in the target time period according to the target single channel to obtain the target single-channel video" includes:
for each frame of video image of the original video in the target time period, channel image extraction is carried out on the video image according to the light intensity imaging channel, and a light intensity channel image corresponding to the video image is obtained;
and obtaining a target single-channel video according to all the light intensity channel images in the target time period.
The method comprises the steps of obtaining a single-channel image of each frame of original video image in a target time period, wherein the single-channel image of each frame of original video image in the target time period is extracted to obtain a light intensity channel image corresponding to each original video image, and the single-channel video of the target corresponding to the original video in the target time period is obtained by synthesizing a plurality of extracted light intensity channel images according to the acquisition time of the original video images. In the embodiment of the present application, when the image is synthesized into the video, the video synthesis technology may be used to implement the image synthesis.
In the embodiment of the present application, the light intensity imaging channel may include a white channel in a four primary color (RGBW) image. The method comprises the steps of extracting a video image through a white channel, and obtaining brightness information of the image after extraction, namely the extracted image displays black and white color information, wherein the black and white information can know the basic outline of an object in a scene, and excessive loss of image content information is avoided.
Because the capacity of the video of a single channel is smaller than that of the video of three channels or four channels, the occupied memory is smaller when the video of a single channel is stored.
103. And obtaining a target video to be stored according to the original video and the target single-channel video.
The target video is obtained by combining the original video and the target single-channel video, so that the capacity of the target video is smaller than that of the original video, the occupied memory is smaller during storage, and the storage of the video with longer duration can be realized.
In this embodiment of the present application, a target video may be obtained by replacing a video in a target time period in an original video with a target single-channel video, that is, optionally, in some embodiments of the present application, the step "obtaining a target video to be stored according to the original video and the target single-channel video" includes:
and replacing the video of the target time period in the original video according to the target single-channel video to obtain the target video to be stored.
The target video after replacement can be obtained by replacing the original video in the target time period with the target video, wherein the replaced part of the original video adopts a single-channel video mode, so that the target video obtained after replacement is smaller in capacity compared with the original video, and the memory occupied by the target video with smaller capacity during storage is also smaller, thereby facilitating the storage of the video, for example, realizing the storage of the video with more duration in the same memory, and facilitating the application in scenes requiring long-time video recording.
In the embodiment of the present application, in order to acquire more content information in a scene, when a light intensity fluctuation value does not reach a preset threshold, a video may be extracted through a plurality of channels to obtain a multi-channel video, where the multi-channel video has richer image content information than a single-channel video, and therefore, through storage of the multi-channel video, the richer content information in the scene may be acquired from the video conveniently, for example, when a target object appears in a fixed scene, video images of the plurality of channels may be stored to facilitate acquisition of scene content in the scene through the video images, and when the fixed scene remains unchanged, the video image of the single channel may be stored to reduce the video capacity and reduce storage of invalid data and occupation of memory resources.
In the embodiment of the application, when the light intensity fluctuation value does not reach the preset threshold, the scene image may be imaged and stored through four primary colors (RGBW).
The method and the device for storing the target single-channel video have the advantages that the light intensity fluctuation value of the original video in the target time period is obtained according to the light intensity information of the original video, channel extraction is carried out on the original video in the target time period according to a single channel when the light intensity fluctuation value reaches a preset threshold value, the target single-channel video is obtained, and then the target video to be stored is generated according to the original video and the target single-channel video. The method comprises the steps that when a light intensity fluctuation value reaches a preset threshold value, the fluctuation of the light intensity value of a video image in a target time period meets a processing condition, and the video extracted by a single channel has the characteristic that the video capacity occupies a small memory compared with the video extracted by a plurality of channels, so that the memory occupied by the extracted target single-channel video is small by extracting the channel video in the target time period through the single channel meeting the processing condition, the target video is synthesized with an original video to obtain the target video, the memory occupied by the target video can be reduced, and the storage of the video is facilitated.
In the embodiment of the application, the light intensity fluctuation values of a plurality of time periods can be obtained, and whether the video image can be extracted through a single channel or not is judged according to the size relation between the light intensity fluctuation values and the preset threshold value, so that the capacity of the video image is reduced, and the memory occupied for storing the video image is reduced.
Referring to fig. 3, fig. 3 is a schematic flowchart of a process of storing a camera video according to an embodiment of the present application, where the specific process of storing the camera video includes:
111. starting a camera, and inputting picture information into a four primary color (RGBW) mode;
112. extracting light intensity of a white (W) channel from the picture information to obtain a light intensity value of the white (W) channel;
113. processing the light intensity value of the white (W) channel to obtain a gray value W1;
114. in the time T1, calculating the light intensity fluctuation amount (variance fluctuation amount) of the gray value W1 to obtain N1;
115. if N1 is smaller than the preset threshold M, go to step 116, otherwise go to step 117;
116. showing that the object in the current environment has no obvious change, only adopting the current W channel for imaging, and storing a W brightness picture;
117. luminance and color information is comprehensively recorded using three primary color (RGB) channels, i.e., simultaneously turning on four primary colors (RGBW).
In the embodiment of the present application, after the brightness and color information are completely recorded by using four primary colors (RGBW), the light intensity fluctuation amount of the gray scale value W may be calculated within a time period T2, and it is determined whether the light intensity fluctuation value exceeds a preset threshold within a time period T2, which is specifically as follows:
118. calculating the light intensity fluctuation amount within the time of T2 to obtain N2;
119. if N2 is smaller than the preset threshold Q, go to step 113, otherwise go to step 120;
120. the full recording of luminance and color information continues through the four primary colors (RGBW).
In the embodiment of the present application, it can be determined whether the video image needs to be processed in a single channel through multiple times of loop execution 118 and 120, so as to reduce the capacity of the video to the maximum extent and reduce the memory occupied by storing the video.
The capacity of the finally obtained video is smaller through single-channel processing of the video image of which the light intensity fluctuation value is larger than the preset threshold value in the shot video, so that the video is convenient to store, for example, the single-channel video with the same size can be stored for a long time.
In order to better implement the video processing method of the present application, the present application further provides a video processing apparatus based on the video processing method. Wherein the meaning of the third target word is the same as that in the video processing method, and the specific implementation details can refer to the description in the method embodiment.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a video processing apparatus according to the present application, wherein the video processing apparatus may include:
the acquiring module 201 is configured to obtain a light intensity fluctuation value of an original video in a target time period according to light intensity information of the original video;
the extraction module 202 is configured to, when the light intensity fluctuation value reaches a preset threshold, perform channel video extraction on the original video within the target time period according to a target single channel to obtain a target single channel video;
and the processing module 203 is configured to obtain a target video to be stored according to the original video and the target single-channel video.
Wherein, in some embodiments of the present application, the target single channel comprises an optical intensity imaging channel, and the extraction module 202 comprises:
the first extraction unit is used for carrying out channel image extraction on each frame of video image of the original video in the target time period according to the light intensity imaging channel to obtain a light intensity channel image corresponding to the video image;
and the first generating unit is used for obtaining a single-channel target video according to all the light intensity channel images in the target time period.
In some embodiments of the present application, the obtaining module 201 includes:
the first acquisition unit is used for acquiring the light intensity value of each frame of video image of the original video in a target time period;
and the second generation unit is used for obtaining the light intensity fluctuation value of the original video in the target time period according to the maximum value and the minimum value of the light intensity value in the target time period.
In some embodiments of the present application, the target time period includes a plurality of target sub-time periods, and the obtaining module 201 includes:
the second acquisition unit is used for acquiring the light intensity and the value of a plurality of target sub-time periods according to the light intensity information of the original video;
the third generating unit is used for obtaining the light intensity difference value between the light intensity sum values according to the light intensity sum values corresponding to the target sub-time periods;
and the determining unit is used for taking the light intensity difference value as a light intensity fluctuation value of the original video in the target time period.
In some embodiments of the present application, the obtaining module 201 includes that time points between the target sub-time periods are adjacent to each other or there is a preset number of time point coincidences.
Among others, in some embodiments of the present application, the processing module 203 includes:
and the first processing unit is used for replacing the video of the target time period in the original video according to the target single-channel video to obtain the target video to be stored.
In some embodiments of the present application, the processing module 203 includes:
the second extraction unit is used for carrying out multi-channel video extraction on the original video of the target time period according to at least two channels to obtain a target multi-channel video when the light intensity fluctuation value does not reach the preset threshold value;
and the fourth generating unit is used for obtaining a target video to be stored according to the original video and the target multi-channel video.
According to the embodiment of the application, the light intensity fluctuation value of the original video in the target time period is obtained by the obtaining module 201 according to the light intensity information of the original video, then, when the light intensity fluctuation value reaches a preset threshold value, the extracting module 202 extracts the channel video of the original video in the target time period according to the target single channel to obtain the target single channel video, and then, the processing module 203 obtains the target video to be stored according to the original video and the target single channel video.
The method and the device for storing the target single-channel video have the advantages that the light intensity fluctuation value of the original video in the target time period is obtained according to the light intensity information of the original video, channel extraction is carried out on the original video in the target time period according to a single channel when the light intensity fluctuation value reaches a preset threshold value, the target single-channel video is obtained, and then the target video to be stored is generated according to the original video and the target single-channel video. The method comprises the steps that when a light intensity fluctuation value reaches a preset threshold value, the fluctuation of the light intensity value of a video image in a target time period meets a processing condition, and the video extracted by a single channel has the characteristic that the video capacity occupies a small memory compared with the video extracted by a plurality of channels, so that the memory occupied by the extracted target single-channel video is small by extracting the channel video in the target time period through the single channel meeting the processing condition, the target video is synthesized with an original video to obtain the target video, the memory occupied by the target video can be reduced, and the storage of the video is facilitated.
In addition, the present application also provides an electronic device, as shown in fig. 5, which shows a schematic structural diagram of the electronic device related to the present application, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that the functions of charging, discharging, and power consumption management are managed through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads an executable file corresponding to a process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing the steps in any video processing method provided by this application.
According to the embodiment of the application, the light intensity fluctuation value of the original video in the target time period is obtained according to the light intensity information of the original video, when the light intensity fluctuation value reaches a preset threshold value, channel extraction is carried out on the original video in the target time period according to a single channel, the target single-channel video is obtained, and then the target video to be stored is generated according to the original video and the target single-channel video. The method comprises the steps that when a light intensity fluctuation value reaches a preset threshold value, the fluctuation of the light intensity value of a video image in a target time period meets a processing condition, and the video extracted by a single channel has the characteristic that the video capacity occupies a small memory compared with the video extracted by a plurality of channels, so that the memory occupied by the extracted target single-channel video is small by extracting the channel video in the target time period through the single channel meeting the processing condition, the target video is synthesized with an original video to obtain the target video, the memory occupied by the target video can be reduced, and the storage of the video is facilitated.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium having stored thereon a computer program, which can be loaded by a processor to perform the steps of any of the video processing methods provided herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute steps in any image processing method provided by the present application, beneficial effects that can be achieved by any video processing method provided by the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The video processing method, the video processing apparatus, the electronic device, and the storage medium provided by the present application are described in detail above, and a specific example is applied in the present application to illustrate the principles and embodiments of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A video processing method, comprising:
obtaining a light intensity fluctuation value of an original video in a target time period according to light intensity information of the original video;
when the light intensity fluctuation value reaches a preset threshold value, channel video extraction is carried out on the original video in the target time period according to a target single channel, and a target single channel video is obtained;
and obtaining a target video to be stored according to the original video and the target single-channel video.
2. The method according to claim 1, wherein the target single channel comprises a light intensity imaging channel, and the channel video extraction of the original video in the target time period according to the target single channel to obtain the target single channel video comprises:
for each frame of video image of the original video in the target time period, channel image extraction is carried out on the video image according to the light intensity imaging channel, and a light intensity channel image corresponding to the video image is obtained;
and obtaining a target single-channel video according to all the light intensity channel images in the target time period.
3. The method according to claim 1, wherein the obtaining the light intensity fluctuation value of the original video in the target time period according to the light intensity information of the original video comprises:
acquiring a light intensity value of each frame of video image of the original video in a target time period;
and obtaining the light intensity fluctuation value of the original video in the target time period according to the maximum value and the minimum value of the light intensity value in the target time period.
4. The method of claim 1, wherein the target time segment comprises a plurality of target sub-time segments, and the obtaining the light intensity fluctuation value of the original video in the target time segment according to the light intensity information of the original video comprises:
obtaining light intensity and values of a plurality of target sub-time periods according to light intensity information of an original video;
obtaining a light intensity difference value between the light intensity sum values according to the light intensity sum values corresponding to the target sub-time periods;
and taking the light intensity difference as a light intensity fluctuation value of the original video in the target time period.
5. The method according to claim 4, wherein the time points between the target sub-periods are adjacent or there is a preset number of time point coincidences.
6. The method according to claim 1, wherein obtaining the target video to be stored according to the original video and the target single-channel video comprises:
and replacing the video of the target time period in the original video according to the target single-channel video to obtain the target video to be stored.
7. The method according to claim 1, wherein obtaining the target video to be stored according to the original video and the target single-channel video comprises:
when the light intensity fluctuation value does not reach the preset threshold value, carrying out multi-channel video extraction on the original video of the target time period according to at least two channels to obtain a target multi-channel video;
and obtaining a target video to be stored according to the original video and the target multi-channel video.
8. A video processing apparatus, comprising:
the acquisition module is used for acquiring a light intensity fluctuation value of an original video in a target time period according to light intensity information of the original video;
the extraction module is used for carrying out channel video extraction on the original video in the target time period according to a target single channel when the light intensity fluctuation value reaches a preset threshold value, so as to obtain a target single channel video;
and the processing module is used for obtaining a target video to be stored according to the original video and the target single-channel video.
9. An electronic device, characterized in that the electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the video processing method according to any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the video processing method according to any one of claims 1 to 7.
CN202210351947.1A 2022-04-02 2022-04-02 Video processing method and device, electronic equipment and computer readable storage medium Pending CN114640869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210351947.1A CN114640869A (en) 2022-04-02 2022-04-02 Video processing method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210351947.1A CN114640869A (en) 2022-04-02 2022-04-02 Video processing method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114640869A true CN114640869A (en) 2022-06-17

Family

ID=81950844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210351947.1A Pending CN114640869A (en) 2022-04-02 2022-04-02 Video processing method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114640869A (en)

Similar Documents

Publication Publication Date Title
CN109783178B (en) Color adjusting method, device, equipment and medium for interface component
KR102149187B1 (en) Electronic device and control method of the same
CN109951627B (en) Image processing method, image processing device, storage medium and electronic equipment
WO2019011195A1 (en) Regulation method, terminal equipment and non-transitory computer-readable storage medium for automatic exposure control of region of interest
US20190313071A1 (en) Dynamic chroma key for video background replacement
CN112954450A (en) Video processing method and device, electronic equipment and storage medium
CN112055875A (en) Partial image frame update system and method for electronic display
KR20200011000A (en) Device and method for augmented reality preview and positional tracking
CN114283732A (en) Brightness compensation method, device, storage medium and electronic equipment
CN113014804A (en) Image processing method, image processing device, electronic equipment and readable storage medium
US20240205376A1 (en) Image processing method and apparatus, computer device, and storage medium
CN112437237B (en) Shooting method and device
WO2019179242A1 (en) Image processing method and electronic device
CN113838134A (en) Image key point detection method, device, terminal and storage medium
CN114640869A (en) Video processing method and device, electronic equipment and computer readable storage medium
CN108495038B (en) Image processing method, image processing device, storage medium and electronic equipment
CN114745537A (en) Sound and picture delay testing method and device, electronic equipment and storage medium
CN114677464A (en) Image processing method, image processing apparatus, computer device, and storage medium
CN114063864A (en) Image display method, image display device, electronic equipment and computer readable storage medium
CN109064416B (en) Image processing method, image processing device, storage medium and electronic equipment
CN115604410A (en) Video processing method, device, equipment and computer readable storage medium
CN115706860A (en) Image light supplementing method, device, equipment and storage medium
CN111586309A (en) Image acquisition method and device for underwater automatic light supplement
CN113489901B (en) Shooting method and device thereof
CN114374798A (en) Scene recognition method and device, electronic equipment and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination