CN108900904B - Video processing method and device, electronic equipment and storage medium - Google Patents
Video processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN108900904B CN108900904B CN201810840256.1A CN201810840256A CN108900904B CN 108900904 B CN108900904 B CN 108900904B CN 201810840256 A CN201810840256 A CN 201810840256A CN 108900904 B CN108900904 B CN 108900904B
- Authority
- CN
- China
- Prior art keywords
- processed
- video frame
- video
- frame
- offset
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 26
- 238000000034 method Methods 0.000 claims abstract description 31
- 238000004590 computer program Methods 0.000 claims description 10
- 230000000007 visual effect Effects 0.000 abstract description 10
- 238000004364 calculation method Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 24
- 238000004891 communication Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
Abstract
The disclosure relates to a video processing method and apparatus, an electronic device, and a storage medium. The method comprises the following steps: determining an offset parameter corresponding to a video frame to be processed according to the frame number of the video frame to be processed in a video; and carrying out offset processing on the color channel of the video frame to be processed according to the offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed. The method and the device can achieve the visual effect of signal faults in the video through low calculation complexity, and meet the real-time requirement of video processing.
Description
Technical Field
The present disclosure relates to the field of computer vision technologies, and in particular, to a video processing method and apparatus, an electronic device, and a storage medium.
Background
In video processing, a user may wish to add a specific special effect to a video to enhance the viewing of the video. The video processing method generally needs to process a large number of video frames in the video, and the related technology has high computational complexity and cannot meet the real-time requirement of video processing.
Disclosure of Invention
The present disclosure provides a video processing technical solution.
According to an aspect of the present disclosure, there is provided a video processing method including:
determining an offset parameter corresponding to a video frame to be processed according to the frame number of the video frame to be processed in a video;
and carrying out offset processing on the color channel of the video frame to be processed according to the offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed.
In a possible implementation manner, determining an offset parameter corresponding to a to-be-processed video frame of a video according to a frame number of the to-be-processed video frame in the video includes:
and determining an offset parameter corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period.
In a possible implementation manner, determining an offset parameter corresponding to a to-be-processed video frame according to a ratio of a frame number of the to-be-processed video frame in a video to a total frame number of a preset period includes:
determining a shift base number corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period;
and determining the offset parameter corresponding to the video frame to be processed according to the offset base number corresponding to the video frame to be processed.
In a possible implementation manner, determining, according to a shift base corresponding to the video frame to be processed, a shift parameter corresponding to the video frame to be processed includes:
and taking the product of the offset base number corresponding to the video frame to be processed and a preset coefficient as an offset parameter corresponding to the video frame to be processed.
In a possible implementation manner, determining an offset parameter corresponding to a to-be-processed video frame of a video according to a frame number of the to-be-processed video frame in the video includes:
and if the frame number of the video frame to be processed of the video in the video belongs to the pause processing interval, determining that the offset parameter corresponding to the video frame to be processed is 0.
In a possible implementation manner, performing offset processing on a color channel of the video frame to be processed according to an offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed includes:
determining a color channel to be processed of the video frame to be processed, wherein the color channel to be processed represents a color channel which needs to be subjected to offset processing in the video frame to be processed;
and carrying out offset processing on the color channel to be processed of the video frame to be processed according to the offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed.
In a possible implementation manner, the to-be-processed color channel of the to-be-processed video frame is a partial color channel of the to-be-processed video frame.
In a possible implementation manner, performing offset processing on a color channel to be processed of the video frame to be processed according to an offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed, includes:
determining offset parameters corresponding to the color channel to be processed according to the offset parameters corresponding to the video frame to be processed, wherein the offset parameters corresponding to the color channel to be processed comprise abscissa offset parameters and ordinate offset parameters;
and performing offset processing on the color channel to be processed of the video frame to be processed according to the offset parameter corresponding to the color channel to be processed to obtain a target video frame corresponding to the video frame to be processed.
In a possible implementation manner, performing offset processing on the color channel to be processed of the video frame to be processed according to the offset parameter corresponding to the color channel to be processed to obtain a target video frame corresponding to the video frame to be processed, includes:
determining the coordinate corresponding relation between the video frame to be processed and the target video frame in the color channel to be processed according to the offset parameter corresponding to the color channel to be processed;
and determining the channel value of each pixel of the target video frame in the color channel to be processed according to the coordinate corresponding relation between the video frame to be processed and the target video frame in the color channel to be processed and the channel value of each pixel of the video frame to be processed in the color channel to be processed.
In a possible implementation manner, when the number of the color channels to be processed is greater than 1, the offset parameters corresponding to the color channels to be processed are different.
According to an aspect of the present disclosure, there is provided a video processing apparatus including:
the device comprises a determining module, a calculating module and a processing module, wherein the determining module is used for determining an offset parameter corresponding to a video frame to be processed according to the frame number of the video frame to be processed in a video;
and the processing module is used for carrying out offset processing on the color channel of the video frame to be processed according to the offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed.
In one possible implementation, the determining module is configured to:
and determining an offset parameter corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period.
In one possible implementation, the determining module includes:
the first determining submodule is used for determining an offset base number corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period;
and the second determining submodule is used for determining the offset parameter corresponding to the video frame to be processed according to the offset base number corresponding to the video frame to be processed.
In one possible implementation, the second determining submodule is configured to:
and taking the product of the offset base number corresponding to the video frame to be processed and a preset coefficient as an offset parameter corresponding to the video frame to be processed.
In one possible implementation, the determining module is configured to:
and if the frame number of the video frame to be processed of the video in the video belongs to the pause processing interval, determining that the offset parameter corresponding to the video frame to be processed is 0.
In one possible implementation, the processing module includes:
a third determining submodule, configured to determine a color channel to be processed of the video frame to be processed, where the color channel to be processed represents a color channel that needs to be subjected to offset processing in the video frame to be processed;
and the processing submodule is used for carrying out offset processing on the color channel to be processed of the video frame to be processed according to the offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed.
In a possible implementation manner, the to-be-processed color channel of the to-be-processed video frame is a partial color channel of the to-be-processed video frame.
In one possible implementation, the processing sub-module includes:
the determining unit is used for determining the offset parameters corresponding to the color channels to be processed according to the offset parameters corresponding to the video frames to be processed, wherein the offset parameters corresponding to the color channels to be processed comprise abscissa offset parameters and ordinate offset parameters;
and the processing unit is used for carrying out offset processing on the color channel to be processed of the video frame to be processed according to the offset parameter corresponding to the color channel to be processed to obtain a target video frame corresponding to the video frame to be processed.
In one possible implementation, the processing unit includes:
the determining subunit is configured to determine, according to the offset parameter corresponding to the color channel to be processed, a coordinate corresponding relationship between the video frame to be processed and the target video frame in the color channel to be processed;
and the processing subunit is configured to determine, according to the coordinate correspondence between the to-be-processed video frame and the target video frame in the to-be-processed color channel and the channel value of each pixel of the to-be-processed video frame in the to-be-processed color channel, a channel value of each pixel of the target video frame in the to-be-processed color channel.
In a possible implementation manner, when the number of the color channels to be processed is greater than 1, the offset parameters corresponding to the color channels to be processed are different.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the above-described video processing method is performed.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described video processing method.
In the embodiment of the disclosure, the offset parameter corresponding to the video frame to be processed is determined according to the frame number of the video frame to be processed in the video, and the color channel of the video frame to be processed is subjected to offset processing according to the offset parameter corresponding to the video frame to be processed, so as to obtain the target video frame corresponding to the video frame to be processed, thereby achieving the visual effect of periodic signal failure in the video through low computational complexity, meeting the real-time requirement of video processing, and being capable of performing parallel acceleration, further improving the video processing efficiency, and being capable of meeting the real-time requirement on various hardware platforms.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow diagram of a video processing method according to an embodiment of the present disclosure.
Fig. 2 shows an exemplary flowchart for determining an offset parameter corresponding to a to-be-processed video frame according to a ratio of a frame number of the to-be-processed video frame in a video to a total frame number of a preset period in a video processing method according to an embodiment of the present disclosure.
Fig. 3 shows an exemplary flowchart of step S12 of the video processing method according to the embodiment of the present disclosure.
Fig. 4 shows an exemplary flowchart of step S122 of the video processing method according to the embodiment of the disclosure.
Fig. 5 shows an exemplary flowchart of step S1222 of the video processing method according to an embodiment of the present disclosure.
Fig. 6 illustrates a schematic diagram of the visual effect of signal failure in a video processing method according to an embodiment of the present disclosure.
Fig. 7 shows another schematic diagram of the visual effect of signal failure in a video processing method according to an embodiment of the present disclosure.
Fig. 8 shows a block diagram of a video processing apparatus according to an embodiment of the present disclosure.
Fig. 9 shows an exemplary block diagram of a video processing apparatus according to an embodiment of the present disclosure.
Fig. 10 is a block diagram illustrating an electronic device 800 in accordance with an example embodiment.
Fig. 11 is a block diagram illustrating an electronic device 1900 according to an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flow diagram of a video processing method according to an embodiment of the present disclosure. As shown in fig. 1, the method includes step S11 and step S12.
In step S11, an offset parameter corresponding to a to-be-processed video frame of the video is determined according to the frame number of the to-be-processed video frame in the video.
The video of the embodiments of the present disclosure may be any video that needs to be processed. For example, the video of the embodiment of the present disclosure may be a video shot in non-real time, and may also be a video shot in real time. The video frames to be processed of the video represent the video frames in the video that need to be processed. In the embodiment of the present disclosure, a part of video frames of a video may be used as video frames to be processed, and all video frames of the video may also be used as video frames to be processed. For a non-real-time shot video, whether each video frame of the video is a video frame to be processed or not can be determined in advance according to the frame number of each video frame of the video in the video; for the video shot in real time, whether each video frame of the video is a video frame to be processed or not can be determined in real time according to the frame number of each video frame of the video in the video.
The frame number of the video frame to be processed in the video indicates that the video frame to be processed is the number of frames in the video. For example, the frame number of the video frame to be processed in the video is t, which indicates that the video frame to be processed is the t-th frame in the video. For both non-live captured video and live captured video, the number of frames in the video of the video to be processed can be counted from the first frame of the video.
In the embodiment of the present disclosure, the offset parameter corresponding to the video frame to be processed is determined according to the frame number of the video frame to be processed in the video. Because the number of frames of each to-be-processed video frame in the video is different, the offset parameter corresponding to each to-be-processed video frame may also be different.
In step S12, according to the offset parameter corresponding to the video frame to be processed, the color channel of the video frame to be processed is subjected to offset processing, so as to obtain a target video frame corresponding to the video frame to be processed.
In one possible implementation, the color channels of the video frame to be processed include an R (Red) channel, a G (Green) channel, and a B (Blue) channel.
It should be noted that, although the color channels of the video frame to be processed are described as above in terms of R channel, G channel and B channel, those skilled in the art can understand that the present disclosure should not be limited thereto. For example, the color channels of the video frame to be processed may be divided into a C (Cyan) channel, an M (Magenta) channel, a Y (Yellow) channel, and a K (Key plate) channel. As another example, the color channels of the video frame to be processed may be divided into L (Luminance) channels, a channels, and B channels. The following describes a video processing method according to an embodiment of the present disclosure, taking color channels of a video frame to be processed including an R channel, a G channel, and a B channel as an example.
In the embodiment of the present disclosure, a part of color channels of a video frame to be processed may be subjected to offset processing according to an offset parameter corresponding to the video frame to be processed, and also all color channels of the video frame to be processed may be subjected to offset processing.
In the embodiment of the present disclosure, the target video frame represents a video frame obtained by performing offset processing on a color channel of a video frame to be processed.
In a possible implementation manner, performing offset processing on a color channel of a video frame to be processed according to an offset parameter corresponding to the video frame to be processed includes: and carrying out offset processing on the color channel of the video frame to be processed in the abscissa direction according to the offset parameter corresponding to the video frame to be processed.
In another possible implementation manner, performing offset processing on a color channel of a video frame to be processed according to an offset parameter corresponding to the video frame to be processed includes: and carrying out offset processing on the color channel of the video frame to be processed in the ordinate direction according to the offset parameter corresponding to the video frame to be processed.
In another possible implementation manner, performing offset processing on a color channel of a video frame to be processed according to an offset parameter corresponding to the video frame to be processed includes: and according to the offset parameters corresponding to the video frame to be processed, carrying out offset processing on the color channel of the video frame to be processed in the abscissa direction and the ordinate direction.
According to the embodiment of the disclosure, the offset parameter corresponding to the video frame to be processed is determined according to the frame number of the video frame to be processed in the video, and the color channel of the video frame to be processed is subjected to offset processing according to the offset parameter corresponding to the video frame to be processed, so as to obtain the target video frame corresponding to the video frame to be processed, thereby realizing the visual effect of signal failure in the video through lower computational complexity, and meeting the real-time requirement of video processing.
In a possible implementation manner, determining an offset parameter corresponding to a to-be-processed video frame according to a frame number of the to-be-processed video frame in a video includes: and determining an offset parameter corresponding to the video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period. For example, the number of frames of the video frame to be processed in the video is T, the total number of frames of the preset period is T, and the ratio of the number of frames of the video frame to be processed in the video to the total number of frames of the preset period is T/T.
Fig. 2 shows an exemplary flowchart for determining an offset parameter corresponding to a to-be-processed video frame according to a ratio of a frame number of the to-be-processed video frame in a video to a total frame number of a preset period in a video processing method according to an embodiment of the present disclosure. As shown in fig. 2, determining an offset parameter corresponding to a to-be-processed video frame according to a ratio of a frame number of the to-be-processed video frame in the video to a total frame number of a preset period may include step S111 and step S112.
In step S111, an offset base corresponding to a video frame to be processed is determined according to a ratio of a frame number of the video frame to be processed in the video to a total frame number of a preset period.
In the embodiment of the present disclosure, since the number of frames in the video of each to-be-processed video frame is different, the shift base corresponding to each to-be-processed video frame may also be different.
In one possible implementation, the offset cardinality may range from-1 to 1.
For example, if the ratio of the number of frames of the video frame to be processed in the video to the total number of frames of the preset period is T/T, the offset base r ═ sin (2 π T/T) corresponding to the video frame to be processed may be determined.
In step S112, an offset parameter corresponding to the video frame to be processed is determined according to the offset base corresponding to the video frame to be processed.
In a possible implementation manner, determining a shift parameter corresponding to a video frame to be processed according to a shift base corresponding to the video frame to be processed includes: and taking the product of the offset base number corresponding to the video frame to be processed and the preset coefficient as the offset parameter corresponding to the video frame to be processed. In this implementation, the offset parameter f corresponding to the video frame to be processed is a × r. Wherein a represents a preset coefficient. For example, the predetermined coefficient a has a value ranging from 20 to 30.
It should be noted that, although the manner of determining the offset parameter corresponding to the video frame to be processed is described above by taking the product of the offset base corresponding to the video frame to be processed and the preset coefficient as the offset parameter corresponding to the video frame to be processed, it can be understood by those skilled in the art that the present disclosure should not be limited thereto. The skilled person can flexibly set the mode for determining the offset parameter corresponding to the video frame to be processed according to the actual application scene requirement and/or personal preference, as long as the mode is determined according to the offset base number corresponding to the video frame to be processed.
In a possible implementation manner, determining an offset parameter corresponding to a to-be-processed video frame according to a frame number of the to-be-processed video frame in a video includes: and if the frame number of the video frame to be processed in the video belongs to the pause processing interval, determining that the offset parameter corresponding to the video frame to be processed is 0. In this implementation, no processing is performed on video frames in which the number of frames in the video is in the pause processing section, whereby a visual effect of generating signal failure at intervals can be achieved.
In this implementation, one or more pause processing intervals may be included in the video.
As one example of this implementation, the pause processing interval may be randomly determined from the video.
As another example of this implementation, the video may be divided into a plurality of periods, with one or more pause processing intervals set in each period. For example, each cycle may be divided into three segments, and a pause processing interval may be provided between each two segments.
As another example of this implementation, a pause processing interval in a video may be determined according to an instruction to select the pause processing interval. In this implementation, the user can flexibly set the pause processing interval according to the actual application scene requirements and/or personal preferences.
Fig. 3 shows an exemplary flowchart of step S12 of the video processing method according to the embodiment of the present disclosure. As shown in fig. 3, step S12 may include step S121 and step S122.
In step S121, a to-be-processed color channel of the to-be-processed video frame is determined, where the to-be-processed color channel represents a color channel that needs to be subjected to the offset processing in the to-be-processed video frame.
In one possible implementation manner, the to-be-processed color channel of the to-be-processed video frame is a partial color channel of the to-be-processed video frame. In this implementation, if the video frame to be processed includes three color channels, the color channel to be processed of the video frame to be processed may be one or two color channels. For example, the to-be-processed color channels of the to-be-processed video frame are the B channel and the R channel of the to-be-processed video frame. For another example, the to-be-processed color channel of the to-be-processed video frame is a B channel of the to-be-processed video frame.
In another possible implementation manner, the to-be-processed color channels of the to-be-processed video frame are all color channels of the to-be-processed video frame.
In step S122, according to the offset parameter corresponding to the video frame to be processed, offset processing is performed on the color channel to be processed of the video frame to be processed, so as to obtain a target video frame corresponding to the video frame to be processed.
In this embodiment of the present disclosure, when the number of color channels to be processed is greater than 1, the color channels to be processed of the video frame to be processed may be subjected to offset processing of different degrees, or the color channels to be processed of the video frame to be processed may be subjected to offset processing of the same degree, which is not limited herein.
Fig. 4 shows an exemplary flowchart of step S122 of the video processing method according to the embodiment of the disclosure. As shown in fig. 4, step S122 may include step S1221 and step S1222.
In step S1221, determining a shift parameter corresponding to the color channel to be processed according to a shift parameter corresponding to the video frame to be processed, where the shift parameter corresponding to the color channel to be processed includes an abscissa shift parameter and an ordinate shift parameter.
For example, the color channels to be processed include a B channel and an R channel. Wherein, the abscissa deviation parameter f of the B channelBxF, the ordinate offset parameter of the B channel is fByF, the abscissa offset parameter f of the R channelRxF/2, the ordinate offset parameter of the R channel is fRy=f/2。
In the embodiment of the present disclosure, the abscissa offset parameter and the ordinate offset parameter of the color channel to be processed of the same video frame to be processed may be the same or different.
In step S1222, according to the offset parameter corresponding to the color channel to be processed, the color channel to be processed of the video frame to be processed is offset, so as to obtain a target video frame corresponding to the video frame to be processed.
Fig. 5 shows an exemplary flowchart of step S1222 of the video processing method according to an embodiment of the present disclosure. As shown in fig. 5, step S1222 may include step S12221 and step S12222.
In step S12221, a coordinate corresponding relationship between the video frame to be processed and the target video frame in the color channel to be processed is determined according to the offset parameter corresponding to the color channel to be processed.
For example, in the G channel, the coordinates (x, y) of the video frame to be processed correspond to the coordinates (x, y) of the target video frame; in B channel, coordinates (x-f) of video frame to be processedBx,y-fBy) Corresponds to the coordinates (x, y) of the target video frame; in the R channel, the coordinates (x-f) of the video frame to be processedRx,y-fRy) Corresponding to the coordinates (x, y) of the target video frame.
In step S12222, a channel value of each pixel of the target video frame in the color channel to be processed is determined according to the coordinate correspondence between the video frame to be processed and the target video frame in the color channel to be processed, and a channel value of each pixel of the video frame to be processed in the color channel to be processed.
For example, the G channel value of coordinate (x, y) in the target video frame is equal to the G channel value of coordinate (x, y) in the video frame to be processed; b channel value of coordinate (x, y) in target video frame is equal to coordinate (x-f) in video frame to be processedBx,y-fBy) A B channel value of (1); r channel value of coordinate (x, y) in target video frame is equal to coordinate (x-f) in video frame to be processedRx,y-fRy) R channel value of (1).
In a possible implementation manner, when the number of the color channels to be processed is greater than 1, the offset parameters corresponding to the color channels to be processed are different. According to the implementation mode, different color channels to be processed can generate different degrees of color difference offset effects.
Fig. 6 illustrates a schematic diagram of the visual effect of signal failure in a video processing method according to an embodiment of the present disclosure. Fig. 7 shows another schematic diagram of the visual effect of signal failure in a video processing method according to an embodiment of the present disclosure.
The video processing method provided by the embodiment of the disclosure can enable an object in a video frame to generate a relative color difference offset with respect to a background, for example, a relative color offset effect is generated at an edge of the object, a vibration period of the offset is determined according to a frame number of the video frame in the video, and the effect is a visual effect of periodic signal fault vibration. The color channel offset in the embodiment of the disclosure can adopt matrix operation, and the operation efficiency is high.
In a possible implementation manner, each to-be-processed video frame may be processed in parallel to further improve the efficiency of video processing, so that the real-time requirement can be met on multiple hardware platforms.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides an image processing apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the image processing methods provided by the present disclosure, and the descriptions and corresponding descriptions of the corresponding technical solutions and the corresponding descriptions in the methods section are omitted for brevity.
Fig. 8 shows a block diagram of a video processing apparatus according to an embodiment of the present disclosure. As shown in fig. 8, the apparatus includes: a determining module 21, configured to determine, according to a frame number of a to-be-processed video frame of a video in the video, an offset parameter corresponding to the to-be-processed video frame; and the processing module 22 is configured to perform offset processing on the color channel of the video frame to be processed according to the offset parameter corresponding to the video frame to be processed, so as to obtain a target video frame corresponding to the video frame to be processed.
In one possible implementation, the determining module 21 is configured to: and determining an offset parameter corresponding to the video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period.
Fig. 9 shows an exemplary block diagram of a video processing apparatus according to an embodiment of the present disclosure. As shown in fig. 9:
in one possible implementation, the determining module 21 includes: the first determining submodule 211 is configured to determine, according to a ratio of a frame number of a to-be-processed video frame of a video in the video to a total frame number of a preset period, an offset base number corresponding to the to-be-processed video frame; the second determining submodule 212 is configured to determine, according to the shift base corresponding to the video frame to be processed, a shift parameter corresponding to the video frame to be processed.
In one possible implementation, the first determining submodule 211 is configured to: and determining the offset cardinal number corresponding to the video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of the preset period.
In one possible implementation, the second determining submodule 212 is configured to: and taking the product of the offset base number corresponding to the video frame to be processed and the preset coefficient as the offset parameter corresponding to the video frame to be processed.
In one possible implementation, the determining module 21 is configured to: and if the frame number of the video frame to be processed in the video belongs to the pause processing interval, determining that the offset parameter corresponding to the video frame to be processed is 0.
In one possible implementation, the processing module 22 includes: the third determining submodule 221 is configured to determine a color channel to be processed of the video frame to be processed, where the color channel to be processed represents a color channel that needs to be subjected to offset processing in the video frame to be processed; the processing submodule 222 is configured to perform offset processing on the to-be-processed color channel of the to-be-processed video frame according to the offset parameter corresponding to the to-be-processed video frame, so as to obtain a target video frame corresponding to the to-be-processed video frame.
In one possible implementation manner, the to-be-processed color channel of the to-be-processed video frame is a partial color channel of the to-be-processed video frame.
In one possible implementation, the processing sub-module 222 includes: the device comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for determining the offset parameters corresponding to the color channel to be processed according to the offset parameters corresponding to the video frame to be processed, and the offset parameters corresponding to the color channel to be processed comprise abscissa offset parameters and ordinate offset parameters; and the processing unit is used for carrying out offset processing on the color channel to be processed of the video frame to be processed according to the offset parameter corresponding to the color channel to be processed to obtain a target video frame corresponding to the video frame to be processed.
In one possible implementation, the processing unit includes: the determining subunit is used for determining the coordinate corresponding relation between the video frame to be processed and the target video frame in the color channel to be processed according to the offset parameter corresponding to the color channel to be processed; and the processing subunit is used for determining the channel value of each pixel of the target video frame in the color channel to be processed according to the coordinate corresponding relation between the video frame to be processed and the target video frame in the color channel to be processed and the channel value of each pixel of the video frame to be processed in the color channel to be processed.
In a possible implementation manner, when the number of the color channels to be processed is greater than 1, the offset parameters corresponding to the color channels to be processed are different.
According to the embodiment of the disclosure, the offset parameter corresponding to the video frame to be processed is determined according to the frame number of the video frame to be processed in the video, and the color channel of the video frame to be processed is subjected to offset processing according to the offset parameter corresponding to the video frame to be processed, so as to obtain the target video frame corresponding to the video frame to be processed, thereby realizing the visual effect of signal failure in the video through lower calculation complexity, and meeting the real-time requirement of video processing.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 10 is a block diagram illustrating an electronic device 800 in accordance with an example embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 10, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 11 is a block diagram illustrating an electronic device 1900 according to an example embodiment. For example, the electronic device 1900 may be provided as a server. Referring to fig. 11, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Claims (22)
1. A video processing method, comprising:
taking part of video frames or all video frames of a video as video frames to be processed, and determining an offset parameter corresponding to the video frames to be processed according to the frame number of the video frames to be processed in the video, wherein the frame number of the video frames to be processed in the video is t, which indicates that the video frames to be processed are the tth frame in the video, and t is a positive integer;
and according to the offset parameter corresponding to the video frame to be processed, carrying out offset processing on the color channel of the video frame to be processed in the abscissa direction and/or the ordinate direction to obtain a target video frame corresponding to the video frame to be processed.
2. The method according to claim 1, wherein determining the offset parameter corresponding to the to-be-processed video frame according to the frame number of the to-be-processed video frame in the video comprises:
and determining an offset parameter corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period.
3. The method according to claim 2, wherein determining the offset parameter corresponding to the to-be-processed video frame according to a ratio of a frame number of the to-be-processed video frame in the video to a total frame number of a preset period comprises:
determining a shift base number corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period;
and determining the offset parameter corresponding to the video frame to be processed according to the offset base number corresponding to the video frame to be processed.
4. The method according to claim 3, wherein determining the offset parameter corresponding to the video frame to be processed according to the offset cardinality corresponding to the video frame to be processed comprises:
and taking the product of the offset base number corresponding to the video frame to be processed and a preset coefficient as an offset parameter corresponding to the video frame to be processed.
5. The method according to claim 1, wherein determining the offset parameter corresponding to the to-be-processed video frame according to the frame number of the to-be-processed video frame in the video comprises:
and if the frame number of the video frame to be processed of the video in the video belongs to the pause processing interval, determining that the offset parameter corresponding to the video frame to be processed is 0.
6. The method according to any one of claims 1 to 5, wherein performing offset processing on a color channel of the video frame to be processed in an abscissa direction and/or an ordinate direction according to an offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed, includes:
determining a color channel to be processed of the video frame to be processed, wherein the color channel to be processed represents a color channel which needs to be subjected to offset processing in the video frame to be processed;
and according to the offset parameter corresponding to the video frame to be processed, carrying out offset processing on the color channel to be processed of the video frame to be processed in the abscissa direction and/or the ordinate direction to obtain a target video frame corresponding to the video frame to be processed.
7. The method of claim 6, wherein the to-be-processed color channel of the to-be-processed video frame is a partial color channel of the to-be-processed video frame.
8. The method according to claim 6, wherein performing offset processing on the color channel to be processed of the video frame to be processed in the abscissa direction and/or the ordinate direction according to the offset parameter corresponding to the video frame to be processed to obtain the target video frame corresponding to the video frame to be processed, comprises:
determining offset parameters corresponding to the color channel to be processed according to the offset parameters corresponding to the video frame to be processed, wherein the offset parameters corresponding to the color channel to be processed comprise abscissa offset parameters and ordinate offset parameters;
and according to the offset parameters corresponding to the color channels to be processed, carrying out offset processing on the color channels to be processed of the video frames to be processed in the abscissa direction and/or the ordinate direction to obtain target video frames corresponding to the video frames to be processed.
9. The method according to claim 8, wherein performing offset processing on the color channel to be processed of the video frame to be processed in the abscissa direction and/or the ordinate direction according to the offset parameter corresponding to the color channel to be processed to obtain a target video frame corresponding to the video frame to be processed, includes:
determining a coordinate corresponding relation between the video frame to be processed and the target video frame on the abscissa and/or the ordinate of the color channel to be processed according to the offset parameter corresponding to the color channel to be processed;
and determining the channel value of each pixel of the target video frame in the color channel to be processed according to the coordinate corresponding relation between the video frame to be processed and the abscissa and/or the ordinate of the target video frame in the color channel to be processed and the channel value of each pixel of the video frame to be processed in the color channel to be processed.
10. The method according to claim 8, wherein when the number of color channels to be processed is greater than 1, the shift parameter corresponding to each color channel to be processed is different.
11. A video processing apparatus, comprising:
the device comprises a determining module, a processing module and a processing module, wherein the determining module is used for taking partial video frames or all video frames of a video as video frames to be processed, and determining an offset parameter corresponding to the video frames to be processed according to the frame number of the video frames to be processed in the video, wherein the frame number of the video frames to be processed in the video is t, which indicates that the video frames to be processed are the tth frame in the video, and t is a positive integer;
and the processing module is used for carrying out offset processing on the color channel of the video frame to be processed in the abscissa direction and/or the ordinate direction according to the offset parameter corresponding to the video frame to be processed to obtain a target video frame corresponding to the video frame to be processed.
12. The apparatus of claim 11, wherein the determining module is configured to:
and determining an offset parameter corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period.
13. The apparatus of claim 12, wherein the determining module comprises:
the first determining submodule is used for determining an offset base number corresponding to a video frame to be processed according to the ratio of the frame number of the video frame to be processed in the video to the total frame number of a preset period;
and the second determining submodule is used for determining the offset parameter corresponding to the video frame to be processed according to the offset base number corresponding to the video frame to be processed.
14. The apparatus of claim 13, wherein the second determination submodule is configured to:
and taking the product of the offset base number corresponding to the video frame to be processed and a preset coefficient as an offset parameter corresponding to the video frame to be processed.
15. The apparatus of claim 11, wherein the determining module is configured to:
and if the frame number of the video frame to be processed of the video in the video belongs to the pause processing interval, determining that the offset parameter corresponding to the video frame to be processed is 0.
16. The apparatus according to any one of claims 11 to 15, wherein the processing module comprises:
a third determining submodule, configured to determine a color channel to be processed of the video frame to be processed, where the color channel to be processed represents a color channel that needs to be subjected to offset processing in the video frame to be processed;
and the processing submodule is used for carrying out offset processing on the color channel to be processed of the video frame to be processed in the abscissa direction and/or the ordinate direction according to the offset parameter corresponding to the video frame to be processed, so as to obtain a target video frame corresponding to the video frame to be processed.
17. The apparatus of claim 16, wherein the to-be-processed color channel of the to-be-processed video frame is a partial color channel of the to-be-processed video frame.
18. The apparatus of claim 16, wherein the processing submodule comprises:
the determining unit is used for determining the offset parameters corresponding to the color channels to be processed according to the offset parameters corresponding to the video frames to be processed, wherein the offset parameters corresponding to the color channels to be processed comprise abscissa offset parameters and ordinate offset parameters;
and the processing unit is used for carrying out offset processing on the color channel to be processed of the video frame to be processed in the abscissa direction and/or the ordinate direction according to the offset parameter corresponding to the color channel to be processed to obtain a target video frame corresponding to the video frame to be processed.
19. The apparatus of claim 18, wherein the processing unit comprises:
the determining subunit is configured to determine, according to the offset parameter corresponding to the color channel to be processed, a coordinate corresponding relationship between the video frame to be processed and the target video frame in the abscissa and/or the ordinate of the color channel to be processed;
and the processing subunit is configured to determine, according to the coordinate correspondence between the to-be-processed video frame and the target video frame in the abscissa and/or ordinate of the to-be-processed color channel and the channel value of each pixel of the to-be-processed video frame in the to-be-processed color channel, a channel value of each pixel of the target video frame in the to-be-processed color channel.
20. The apparatus according to claim 18, wherein when the number of color channels to be processed is greater than 1, the shift parameter corresponding to each color channel to be processed is different.
21. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1 to 10.
22. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810840256.1A CN108900904B (en) | 2018-07-27 | 2018-07-27 | Video processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810840256.1A CN108900904B (en) | 2018-07-27 | 2018-07-27 | Video processing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108900904A CN108900904A (en) | 2018-11-27 |
CN108900904B true CN108900904B (en) | 2021-10-15 |
Family
ID=64352107
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810840256.1A Active CN108900904B (en) | 2018-07-27 | 2018-07-27 | Video processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108900904B (en) |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6417891B1 (en) * | 1999-04-16 | 2002-07-09 | Avid Technology, Inc. | Color modification on a digital nonlinear editing system |
CN101442672B (en) * | 2007-11-23 | 2012-04-25 | 华为技术有限公司 | digital watermark processing system, digital watermark embedding and detecting method and device |
JP4772163B2 (en) * | 2008-11-18 | 2011-09-14 | パナソニック株式会社 | Playback apparatus, playback method, and program for performing stereoscopic playback |
CN101436312B (en) * | 2008-12-03 | 2011-04-06 | 腾讯科技(深圳)有限公司 | Method and apparatus for generating video cartoon |
CN102158731B (en) * | 2011-05-26 | 2014-03-12 | 威盛电子股份有限公司 | Image processing system and method |
CN102568015A (en) * | 2011-12-29 | 2012-07-11 | 深圳市万兴软件有限公司 | Method and device for realizing special effect of water drop ripple |
CN104159120B (en) * | 2014-08-21 | 2017-09-29 | 北京奇艺世纪科技有限公司 | A kind of video image stabilization method, apparatus and system |
US10127887B2 (en) * | 2015-01-14 | 2018-11-13 | Intel Corporation | Acceleration of color conversion |
CN105988794B (en) * | 2015-02-11 | 2019-04-30 | 成都理想境界科技有限公司 | Filter code generator, generation method and image editor |
CN104902168B (en) * | 2015-05-08 | 2018-04-03 | 梅瑜杰 | A kind of image combining method, device and capture apparatus |
CN107770542A (en) * | 2016-08-21 | 2018-03-06 | 上海天荷电子信息有限公司 | Using the data compression method and device of coding parameter base value |
CN106778635A (en) * | 2016-12-19 | 2017-05-31 | 江苏慧眼数据科技股份有限公司 | A kind of human region detection method of view-based access control model conspicuousness |
CN107205142B (en) * | 2017-06-30 | 2019-09-20 | 青岛海信电器股份有限公司 | A kind of method, apparatus and display equipment of image color offset |
CN107682731A (en) * | 2017-10-24 | 2018-02-09 | 北京奇虎科技有限公司 | Video data distortion processing method, device, computing device and storage medium |
CN107749077B (en) * | 2017-11-08 | 2021-07-23 | 米哈游科技(上海)有限公司 | Card ventilation grid shadow rendering method, device, equipment and medium |
CN108289210A (en) * | 2018-02-07 | 2018-07-17 | 全普光电科技(上海)有限公司 | Landscape images processor and image processing method, storage medium |
CN108235119B (en) * | 2018-03-15 | 2021-02-19 | 联想(北京)有限公司 | Video processing method and device, electronic equipment and computer readable medium |
-
2018
- 2018-07-27 CN CN201810840256.1A patent/CN108900904B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108900904A (en) | 2018-11-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108093315B (en) | Video generation method and device | |
CN112001321A (en) | Network training method, pedestrian re-identification method, network training device, pedestrian re-identification device, electronic equipment and storage medium | |
US11314965B2 (en) | Method and apparatus for positioning face feature points | |
CN106598739B (en) | video rendering method and device | |
CN107820131B (en) | Comment information sharing method and device | |
CN108900903B (en) | Video processing method and device, electronic equipment and storage medium | |
CN110519655B (en) | Video editing method, device and storage medium | |
CN112219224B (en) | Image processing method and device, electronic equipment and storage medium | |
CN109040837B (en) | Video processing method and device, electronic equipment and storage medium | |
CN108495168B (en) | Bullet screen information display method and device | |
CN108174269B (en) | Visual audio playing method and device | |
CN110944230A (en) | Video special effect adding method and device, electronic equipment and storage medium | |
JP2017527832A (en) | Picture display method and apparatus | |
CN112860061A (en) | Scene image display method and device, electronic equipment and storage medium | |
CN113506229A (en) | Neural network training and image generation method and device | |
CN113261011B (en) | Image processing method and device, electronic equipment and storage medium | |
CN111861942A (en) | Noise reduction method and device, electronic equipment and storage medium | |
CN113257177B (en) | Brightness control method and device and electronic equipment | |
CN109600595B (en) | Image processing method and device | |
CN109756783B (en) | Poster generation method and device | |
CN108900904B (en) | Video processing method and device, electronic equipment and storage medium | |
CN112102300A (en) | Counting method and device, electronic equipment and storage medium | |
CN110121115B (en) | Method and device for determining wonderful video clip | |
CN110830833A (en) | Bullet screen information display method and device | |
CN111275641A (en) | Image processing method and device, electronic equipment and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |