CN109348141A - Video generation, video broadcasting method, device, electronic equipment and storage medium - Google Patents
Video generation, video broadcasting method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109348141A CN109348141A CN201811291692.4A CN201811291692A CN109348141A CN 109348141 A CN109348141 A CN 109348141A CN 201811291692 A CN201811291692 A CN 201811291692A CN 109348141 A CN109348141 A CN 109348141A
- Authority
- CN
- China
- Prior art keywords
- image
- frame
- channel
- value
- channel information
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000006835 compression Effects 0.000 claims abstract description 32
- 238000007906 compression Methods 0.000 claims abstract description 32
- 238000012545 processing Methods 0.000 claims abstract description 18
- 238000005194 fractionation Methods 0.000 claims description 17
- 238000006243 chemical reaction Methods 0.000 claims description 12
- 230000002194 synthesizing effect Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 8
- 230000015572 biosynthetic process Effects 0.000 description 7
- 238000003786 synthesis reaction Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000009877 rendering Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 238000009434 installation Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000000712 assembly Effects 0.000 description 2
- 238000000429 assembly Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 241000209140 Triticum Species 0.000 description 1
- 235000021307 Triticum Nutrition 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- 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
- H04N5/265—Mixing
-
- 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
- H04N21/4402—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 involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440218—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 involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The application is to be related to technical field of image processing, the video generation method about a kind of video generation, video broadcasting method, device, electronic equipment and storage medium, comprising: obtains at least two the first images of frame;For every the first image of frame, its corresponding second image is obtained, and obtain the Alpha channel information of the first image;Second image is the corresponding image of RGB channel information of the first image;By the Alpha channel information of the first image, the third image of RGB channel format is converted to;The 4th image is synthesized with the third image based on second image;Using default compress mode, the 4th image of at least two frame is encoded to target video, the default compress mode supports the compression of images of RGB channel format.The loss of the Alpha channel information in the first image during generating video is avoided, target video generates terminal to be reduced CPU and use and avoid software Caton without installing specific encoder, playback terminal without installing special decoder.
Description
Technical field
This disclosure relates to which technical field of image processing more particularly to video generation, video broadcasting method, device, electronics are set
Standby and storage medium.
Background technique
Video representation is rich and varied, more information can be provided for user, entertainment properties is good, therefore is widely used.
Video generates end, is typically based at least two field pictures, is encoded to video;It is raw that video playing end is typically based on the video
At the corresponding decoding process of coding mode in the process, decoding obtains at least two field pictures and plays.
In the related technology, the image of some formats usually requires specific coding mode or encoder encodes to obtain video,
Likewise, also need specific decoding process in playing process or decoder is decoded, and above-mentioned specific coding mode or
Decoding process is usually popularized not enough at the terminal, does not have corresponding encoder or decoder, therefore, encode in terminal at the terminal
The format-pattern, or the correspondence video is decoded, additional specific encoder or decoder are needed, causes to continue largely to occupy CPU,
Software Caton in terminal is in turn resulted in, moreover, additional specific encoder or decoder occupy more memory headroom.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provide a kind of video generate, playback method and device.
According to the first aspect of the embodiments of the present disclosure, a kind of video generation method is provided, including
Obtain at least two the first images of frame;
For every the first image of frame, its corresponding second image is obtained, and obtain the channel Alpha of the first image
Information;Second image is the corresponding image of RGB channel information of the first image;
By the Alpha channel information of the first image, the third image of RGB channel format is converted to;
The 4th image is synthesized with the third image based on second image;
Using default compress mode, the 4th image of at least two frame is encoded to target video, the default compression side
The compression of images of formula support RGB channel format.
Optionally, the Alpha channel information by the first image, is converted to the third image of RGB channel format,
Include:
For every the first image of frame, the Alpha channel value of each pixel is obtained;
Based on the Alpha channel value of each pixel in every the first image of frame, the third figure of every frame RGB channel format is obtained
Picture;In third image described in every frame R channel value, G channel value, the channel B value of each pixel be assigned its corresponding
The Alpha channel value of corresponding pixel points in one image.
It is optionally, described that 4th image is synthesized with the third image based on second image, comprising:
First side of second image is spliced with second side of corresponding third image, obtains the 4th image;
First side of second image includes: a column pixel column, second image b from the leftmost side of second image from the rightmost side
D row pixel column one of of the c row pixel column, the second image of column pixel column, the second image from top side from lower side;
Second side of the third image includes: n column pixel column, third image m from the rightmost side of the third image from the leftmost side
Column pixel column, third image one of the y row pixel column of x row pixel column, third image from top side from lower side;Institute
Stating a, b, c, d, n, m, x, y is the integer greater than 0.
According to the second aspect of an embodiment of the present disclosure, a kind of video broadcasting method is provided, comprising:
Target video is decoded using the decoder of corresponding default compress mode, obtains the 4th image of at least two frame;It is described pre-
If the compression of images of compress mode support RGB channel format;4th image is RGB channel format;
4th image described in each frame is split, corresponding second image of the 4th image and third figure described in each frame are obtained
Picture;
Obtain the RGB channel information of the second image described in each frame;
The RGB channel information of third image described in each frame is obtained, and the RGB channel information of third image described in each frame is turned
It is changed to corresponding Alpha channel information;
RGB channel information based on the second image described in each frame and the corresponding Alpha channel information synthesize each frame the
One image;
At least two the first images of frame based on acquisition play out.
Optionally, the corresponding Alpha channel information includes: the Alpha channel value of corresponding pixel points;It is described to obtain respectively
The RGB channel information of third image described in frame, and the RGB channel information of third image described in each frame is converted to corresponding
Alpha channel information, comprising:
Obtain the RGB channel information of each pixel in third image described in each frame;The RGB channel information includes: R logical
Road value, G channel value, channel B value;R channel value, G channel value, the channel B value of same pixel are identical;
The Alpha channel value of each corresponding pixel points is assigned a value of to the R channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the G channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the channel B value of corresponding pixel points.
Optionally, described to split the 4th image described in each frame, obtain the 4th image corresponding second described in each frame
Image and third image, comprising:
Corresponding fractionation boundary is determined in the 4th image described in each frame;
The corresponding fractionation boundary along the 4th image described in each frame, the 4th image described in each frame is split, and is obtained each
Corresponding second image of 4th image and third image described in frame.
Optionally, the RGB channel information based on the second image described in each frame and the corresponding Alpha channel information
Synthesize each the first image of frame, comprising:
Using the tinter in rendering pipeline, RGB channel information based on the second image described in each frame and described corresponding
Alpha channel information synthesizes each the first image of frame.
According to the third aspect of an embodiment of the present disclosure, a kind of video-generating device is provided, comprising:
First image acquisition unit is configured as obtaining at least two the first images of frame;
Second image and Alpha channel information acquiring unit are configured as that it is corresponding to obtain its for every the first image of frame
Second image, and obtain the Alpha channel information of the first image;Second image is the RGB of the first image
The corresponding image of channel information;
Third image conversion unit is configured as the Alpha channel information of the first image being converted to RGB channel
The third image of format;
4th image composing unit is configured as synthesizing the 4th image with the third image based on second image;
Coding unit, is configured as using default compress mode, and the 4th image of at least two frame is encoded to target view
Frequently, the default compress mode supports the compression of images of RGB channel format.
Optionally, the third image conversion unit, comprising:
Alpha channel value obtains subelement, is configured as obtaining the Alpha of each pixel for every the first image of frame
Channel value;
Third image conversion subunit is configured as the Alpha channel value based on each pixel in every the first image of frame,
Obtain the third image of every frame RGB channel format;The R channel value, G channel value, B of each pixel in third image described in every frame
Channel value is assigned the Alpha channel value of corresponding pixel points in its corresponding first image.
Optionally, the 4th image composing unit, comprising:
4th image synthesizing subunit is configured as by the first side of second image with corresponding third image
Two sides are spliced, and the 4th image is obtained;First side of second image includes: a column picture of second image from the rightmost side
Element column, c row pixel column of b column pixel column, second image of second image from the leftmost side from top side, the second image are from most
One of the d row pixel column that downside is risen;Second side of the third image includes: n column picture of the third image from the leftmost side
Element column, m column pixel column of the third image from the rightmost side, third image from lower side x row pixel column, third image from most upper
One of the y row pixel column that side is risen;Described a, b, c, d, n, m, x, y are the integer greater than 0.
According to a fourth aspect of embodiments of the present disclosure, a kind of video play device is provided, comprising:
Decoding unit is configured as the decoder decoding target video using corresponding default compress mode, obtains at least two
The 4th image of frame, the default compress mode support the compression of images of RGB channel format;4th image is RGB channel lattice
Formula;
4th image split cells is configured as splitting the 4th image described in each frame, obtain the 4th described in each frame
Corresponding second image of image and third image;
RGB channel information determination unit is configured as obtaining the RGB channel information of the second image described in each frame;
Alpha channel information determination unit is configured as obtaining the RGB channel information of third image described in each frame, and will
The RGB channel information of third image described in each frame is converted to corresponding Alpha channel information;
First image composing unit is configured as RGB channel information and the correspondence based on the second image described in each frame
Alpha channel information synthesize each the first image of frame;
Broadcast unit is configured as at least two the first images of frame based on acquisition and plays out.
Optionally, the corresponding Alpha channel information includes: the Alpha channel value of corresponding pixel points;The Alpha
Channel information determination unit, comprising:
RGB channel acquisition of information subelement, the RGB for being configured as obtaining each pixel in third image described in each frame are logical
Road information;The RGB channel information includes: R channel value, G channel value, channel B value;The R channel value of same pixel, the channel G
Value, channel B value are identical;
Alpha channel information determines subelement, is configured as the Alpha channel value assignment of each corresponding pixel points
For the R channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the G channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the channel B value of corresponding pixel points.
Optionally, the 4th image split cells, comprising:
4th image first splits subelement, is configured as determining corresponding fractionation circle in the 4th image described in each frame
Limit;
4th image second splits subelement, is configured as the corresponding fractionation boundary along the 4th image described in each frame, will
4th image described in each frame is split, and corresponding second image of the 4th image and third image described in each frame are obtained.
Optionally, the first image synthesis unit, comprising:
First image synthesizing subunit is configured as using the tinter in rendering pipeline, based on the second figure described in each frame
The RGB channel information of picture and the corresponding Alpha channel information synthesize each the first image of frame.
According to a fifth aspect of the embodiments of the present disclosure, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: obtain at least two the first images of frame;
For every the first image of frame, its corresponding second image is obtained, and obtain the channel Alpha of the first image
Information;Second image is the corresponding image of RGB channel information of the first image;
By the Alpha channel information of the first image, the third image of RGB channel format is converted to;
The 4th image is synthesized with the third image based on second image;
Using default compress mode, the 4th image of at least two frame is encoded to target video, the default compression side
The compression of images of formula support RGB channel format.
According to a sixth aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to: target video is decoded using the decoder of corresponding default compress mode, is obtained
The 4th image of at least two frame;The default compress mode supports the compression of images of RGB channel format;4th image is RGB
Channel format;
4th image described in each frame is split, corresponding second image of the 4th image and third figure described in each frame are obtained
Picture;
Obtain the RGB channel information of the second image described in each frame;
The RGB channel information of third image described in each frame is obtained, and the RGB channel information of third image described in each frame is turned
It is changed to corresponding Alpha channel information;
RGB channel information based on the second image described in each frame and the corresponding Alpha channel information synthesize each frame the
One image;
At least two the first images of frame based on acquisition play out.
According to the 7th of the embodiment of the present disclosure the aspect, a kind of non-transitorycomputer readable storage medium is provided, when described
When instruction in storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out a kind of video generation side
Method, which comprises
Obtain at least two the first images of frame;
For every the first image of frame, its corresponding second image is obtained, and obtain the channel Alpha of the first image
Information;Second image is the corresponding image of RGB channel information of the first image;
By the Alpha channel information of the first image, the third image of RGB channel format is converted to;
The 4th image is synthesized with the third image based on second image;
Using default compress mode, the 4th image of at least two frame is encoded to target video, the default compression side
The compression of images of formula support RGB channel format.
According to the eighth aspect of the embodiment of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described
When instruction in storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out a kind of video playing side
Method, which comprises
Target video is decoded using the decoder of corresponding default compress mode, obtains the 4th image of at least two frame, it is described pre-
If the compression of images of compress mode support RGB channel format;4th image is RGB channel format;
4th image described in each frame is split, corresponding second image of the 4th image and third figure described in each frame are obtained
Picture;
Obtain the RGB channel information of the second image described in each frame;
The RGB channel information of third image described in each frame is obtained, and the RGB channel information of third image described in each frame is turned
It is changed to corresponding Alpha channel information;
RGB channel information based on the second image described in each frame and the corresponding Alpha channel information synthesize each frame the
One image;
At least two the first images of frame based on acquisition play out.
According to the 9th of the embodiment of the present disclosure the aspect, a kind of application program is provided, when the application program is by mobile terminal
Processor execute when so that mobile terminal is able to carry out a kind of video generation method, which comprises
Obtain at least two the first images of frame;
For every the first image of frame, its corresponding second image is obtained, and obtain the channel Alpha of the first image
Information;Second image is the corresponding image of RGB channel information of the first image;
By the Alpha channel information of the first image, the third image of RGB channel format is converted to;
The 4th image is synthesized with the third image based on second image;
Using default compress mode, the 4th image of at least two frame is encoded to target video, the default compression side
The compression of images of formula support RGB channel format.
According to the tenth of the embodiment of the present disclosure the aspect, a kind of application program is provided, when the application program is by mobile terminal
Processor execute when so that mobile terminal is able to carry out a kind of video broadcasting method, which comprises
Target video is decoded using the decoder of corresponding default compress mode, obtains the 4th image of at least two frame, it is described pre-
If the compression of images of compress mode support RGB channel format;4th image is RGB channel format;
4th image described in each frame is split, corresponding second image of the 4th image and third figure described in each frame are obtained
Picture;
Obtain the RGB channel information of the second image described in each frame;
The RGB channel information of third image described in each frame is obtained, and the RGB channel information of third image described in each frame is turned
It is changed to corresponding Alpha channel information;
RGB channel information based on the second image described in each frame and the corresponding Alpha channel information synthesize each frame the
One image;
At least two the first images of frame based on acquisition play out.
The technical scheme provided by this disclosed embodiment can include the following benefits: obtain at least two the first figures of frame
Picture;For every the first image of frame, its corresponding second image is obtained, and obtain the Alpha channel information of the first image;
Second image is the corresponding image of RGB channel information of the first image;The channel Alpha of the first image is believed
Breath, is converted to the third image of RGB channel format;The 4th image is synthesized with the third image based on second image;It adopts
With default compress mode, the 4th image of at least two frame is encoded to target video, the default compress mode supports that RGB is logical
The compression of images of road format.That is, the Alpha channel information in first image information to be converted to the third of RGB channel format
Image is equivalent to the Alpha channel information of the first image with third image expression, avoids the first figure during generating video
The loss of Alpha channel information, corresponding second image of RGB channel acquisition of information based on the first image, the second image as in
For RGB channel format, the 4th image is synthesized by the second image and third image, then the 4th image is also RGB channel format, is used
The 4th image of at least two frame is encoded to target video by default compress mode, and target video generates terminal and all supports RGB substantially
The coding of channel format image, and then without additional installation specific encoder, it reduces CPU and uses, video is avoided to generate in terminal
Software Caton, and reduce memory headroom and occupy;Meanwhile playback terminal usually all supports that RGB image corresponds to the decoding of video, and on
The 4th image that target video is RGB channel format to be stated to encode to obtain, that is, above-mentioned target video is the corresponding video of RGB image,
Therefore, the original decoder of playback terminal can support the decoding of above-mentioned target video, and then playback terminal is without additional peace
Special decoder is filled, CPU is reduced and uses, avoids software Caton on playback terminal, and reduces memory headroom and occupies.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of video generation method shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of third image conversion shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of video broadcasting method shown according to an exemplary embodiment.
Fig. 4 is a kind of flow chart for splitting the 4th image shown according to an exemplary embodiment.
Fig. 5 is a kind of flow chart of the first image of determination Alpha channel information shown according to an exemplary embodiment.
Fig. 6 is a kind of video-generating device block diagram shown according to an exemplary embodiment.
Fig. 7 is another video-generating device block diagram shown according to an exemplary embodiment.
Fig. 8 is a kind of video play device block diagram shown according to an exemplary embodiment.
Fig. 9 is another video play device block diagram shown according to an exemplary embodiment.
Figure 10 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Figure 11 is the block diagram of another electronic equipment shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is a kind of flow chart of video generation method shown according to an exemplary embodiment, as shown in Figure 1, video
Generation method is for including the following steps in terminal.
In step s 11, at least two the first images of frame are obtained.
In the embodiment of the present application, above-mentioned first image can be RGBA format.That is each pixel of the first image
It may include four channels, be respectively as follows: the channel R, the channel G, channel B, the channel Alpha.
In the embodiment of the present application, above-mentioned first image can be to directly obtain from photographing device, or be stored in end
The first image on end, first image can be at least two frames, for example, can be 2 frames, 3 frames etc..In the embodiment of the present application
In, this is not especially limited.
In step s 12, for every the first image of frame, its corresponding second image is obtained, and obtain first figure
The Alpha channel information of picture;Second image is the corresponding image of RGB channel information of the first image.
In the embodiment of the present application, for every the first image of frame, its corresponding second image is obtained, which is should
The corresponding image of RGB channel information of first image.It specifically can be that the RGB of each pixel is obtained from the first image
Channel information arranges the RGB channel information of each pixel according to putting in order for each pixel in the first image,
It can obtain corresponding second image of the first image.It can also be by the RGB channel of each pixel obtained in the first image
Information is arranged according to other preset other ways, obtains corresponding second image of the first image.In the embodiment of the present application
In, this is not especially limited.
Specifically, the R channel value of the first pixel in the second image can be assigned a value of the first pixel in the first image
R channel value, the G channel value of the first pixel in the second image is assigned a value of to the G channel value of the first pixel in the first image,
The channel B value of first pixel in second image is assigned a value of to the channel B value of the first pixel in the first image, obtains the second figure
The RGB channel information of the first pixel as in, and so on, the RGB channel information of all pixels point in the second image is obtained, into
And obtain corresponding second image of each the first image of frame.In the embodiment of the present application, this is not especially limited.
For example, if the first image includes 100*200 pixel, by the R channel value of first pixel of the second image
It is assigned a value of the R channel value of the first pixel in the first image, the G channel value of the first pixel in the second image is assigned a value of first
The G channel value of first pixel in image, the channel B value of the first pixel in the second image is assigned a value of first in the first image
The channel B value of pixel obtains the RGB channel information of the first pixel in the second image, and so on, it obtains in the second image
The RGB channel information of all pixels point, then the second image also may include 100*200 pixel, each picture in the second image
The RGB channel information of vegetarian refreshments is identical as the RGB channel information of corresponding pixel points in the first image.
In the embodiment of the present application, the second image is the channel information pair of first image in addition to Alpha channel information
The image answered, then the second image can be the image of RGB channel format.
In the embodiment of the present application, for every the first image of frame, the Alpha channel information of the first image is obtained, specifically,
The corresponding Alpha channel information of each pixel of the first image is obtained to get to the Alpha channel information of the first image.
In step s 13, by the Alpha channel information of the first image, the third figure of RGB channel format is converted to
Picture.
In the embodiment of the present application, the Alpha channel information of above-mentioned first image is converted to the third of RGB channel format
Image.Specifically, the Alpha channel information of each pixel of the first image can be arranged according to RGB channel format, obtain
To third image.For example, the RGB channel information of pixel each in third image can be assigned a value of to its corresponding first image
The Alpha channel value of middle corresponding pixel points, to obtain the corresponding third image of first image.
In the application an optional embodiment, Fig. 2 is a kind of third image shown according to an exemplary embodiment
The flow chart of conversion, as shown in Fig. 2, the Alpha channel information by the first image, is converted to RGB channel format
Third image may include: step S131, for every the first image of frame, obtain the Alpha channel value of each pixel;Step
S132 obtains the third image of every frame RGB channel format based on the Alpha channel value of each pixel in every the first image of frame;
R channel value, G channel value, the channel B value of each pixel are assigned its corresponding first figure in third image described in every frame
The Alpha channel value of corresponding pixel points as in.
Specifically, being directed to every the first image of frame, the Alpha channel value of each pixel is obtained, based on above-mentioned each described
The Alpha channel value of corresponding pixel points obtains the corresponding third image of each the first image of frame.Each pixel in the third image
It may include: the channel R, the channel G, channel B, R channel value, G channel value, the channel B value of same pixel are all the same, are assigned
For the Alpha channel value of corresponding pixel points in its corresponding first image.For example, in third image the first pixel the channel R
Value, G channel value, channel B value can be all the same, can be assigned the Alpha channel value of the first pixel in the first image,
The RGB channel information of the first pixel in third image is obtained, the R channel value, G channel value, B of the second pixel in third image
Channel value is all the same, is assigned the Alpha channel value of the second pixel in the first image, and so on, obtain each frame
The corresponding third image of one image.
For example, the R channel value of the first pixel of third image, G are logical if the first image includes 100*200 pixel
Road value, channel B value are all the same, are assigned the Alpha channel value of the first pixel in the first image, and so on, it obtains
The RGB channel information of all pixels point in third image, then the second image also may include 100*200 pixel, the second figure
The R channel value, G channel value, channel B value of same pixel are all the same as in, are assigned the first pixel in the first image
Alpha channel value.
In embodiments herein, the Alpha channel value of each pixel is by each in third image in the first image
R channel value, G channel value, the channel B value of corresponding pixel points are characterized.
In step S14, the 4th image is synthesized with the third image based on second image.
In embodiments herein, above-mentioned second image is the corresponding image of RGB channel information in the first image, above-mentioned
Third image is the corresponding rgb format image of Alpha channel information in the first image, therefore, above-mentioned second image and third figure
As being rgb format image.
In embodiments herein, it is based on corresponding second image of each the first image of frame and first image pair of frame
The third image answered synthesizes the 4th image.Synthesis herein can be by corresponding second image of same the first image of frame and third
Image is spliced, and corresponding 4th image of the first image of frame is obtained.
It is described to synthesize the 4th with the third image based on second image in the application an optional embodiment
Image may include: to splice the first side of second image with second side of corresponding third image, obtain the 4th
Image;First side of second image includes: a column pixel column of second image from the rightmost side, the second image from the leftmost side
The b column pixel column that rises, the second image from top side c row pixel column, the second image is from the d row pixel column lower side
It is a kind of;Second side of the third image includes: n column pixel column of the third image from the leftmost side, third image from the rightmost side
The m column pixel column that rises, third image is from x row pixel column, third image lower side from one in the y row pixel column top side
Kind;Described a, b, c, d, n, m, x, y are the integer greater than 0.In embodiments of the present invention, which can be with
It is identical to can also be different, in embodiments of the present invention, this is not especially limited.
Specifically, second image may include the leftmost side, the rightmost side, top side, lower side, which can also be with
Including the leftmost side, the rightmost side, top side, lower side.In splicing synthesis process, for example, the first side of the second image can be
A column pixel column of second image from the rightmost side, second side of third image can be n column picture of the third image from the leftmost side
Element column, a and n may be the same or different.It can will then splice on the left of the right side of the second image and third image,
Obtain the 4th image.Preferably, a can may be 1 for 1, n, that is, can be by the second image right column pixel column and third figure
As left column pixel column is spliced to obtain the 4th image.Third image and the 4th image are completely remained in splicing
Information.For example, if the first image includes 100*200 pixel, if corresponding second image of first image includes 100*200
A pixel, the corresponding third image of first image includes 100*200 pixel, if the second image right column pixel is classified as
The pixel of 200 column, if third image left column pixel is classified as the pixel of the 1st column, the pixel that the second image the 200th is arranged
The pixel of point and the 1st column of third image is spliced, and obtains the 4th image, then the 4th image may include: 100*400
A pixel.
For another example the first side of the second image can be b column of second image from the leftmost side in splicing synthesis process
Pixel column, second side of third image can be m column pixel column of the third image from the rightmost side, and b and m can identical can also be with
Not identical, preferred b and m can take 1.
For another example the first side of the second image can be c row of second image from top side in splicing synthesis process
Pixel column, second side of third image can be third image x row pixel column from lower side, and c and x can identical not yet
Identical, preferred c and x can take 1.For another example the first side of the second image can be the second figure in splicing synthesis process
The c row pixel column from top side of picture, second side of third image can be n column pixel of the third image from the leftmost side
Column, c and n can be identical or not identical, and preferred c and n can take 1.
In embodiments of the present invention, third image and the second image are rgb format, are closed by the second image and third image
At the 4th image be also rgb format, while the second image can characterize RGB channel information in the first image, third image energy
Alpha channel information in the first image is enough characterized, therefore, the 4th image of rgb format can characterize the RGB of the first image simultaneously
Channel information and Alpha channel information, and then avoid the loss of Alpha channel information in the first image.
In step S15, using default compress mode, the 4th image of at least two frame is encoded to target video, institute
State the compression of images that default compress mode supports RGB channel format.
In embodiments herein, the 4th image of rgb format can characterize the RGB channel information of the first image simultaneously
With Alpha channel information, the loss of Alpha channel information in the first image is avoided.Using default compress mode, by it is above-mentioned extremely
Few the 4th image of two frames is encoded to target video, which can support the image of rgb format to encode or compress.
In the application optional embodiment, in order to reduce the size of target video, the compression ratio of the default compress mode
First threshold can be higher than.The first threshold can be set according to actual needs, in the embodiment of the present application, not made to this
It is specific to limit.
In embodiments herein, since this presets the compression of images that compressed format supports RGB channel format, video is raw
All support the compression of images of RGB channel format substantially at terminal, and then video generates terminal without additional installation specific encoder
Deng, reduce CPU use, avoid software Caton in terminal.Most of playback terminal supports RGB channel format-pattern simultaneously
The processing such as video decoding, therefore, the playing process of above-mentioned target video, playback terminal are not necessarily to additionally install specific decoder,
It reduces memory headroom to occupy, reduces CPU and use, avoid software Caton on playback terminal.
In the application an optional embodiment, above-mentioned default compress mode can be H.264 compress mode etc..?
To be encoded to obtain target video to above-mentioned 4th image using H.264 compress mode etc..
The technical scheme provided by this disclosed embodiment can include the following benefits: obtain at least two the first figures of frame
Picture;For every the first image of frame, its corresponding second image is obtained, and obtain the Alpha channel information of the first image;
Second image is the corresponding image of RGB channel information of the first image;The channel Alpha of the first image is believed
Breath, is converted to the third image of RGB channel format;The 4th image is synthesized with the third image based on second image;It adopts
With default compress mode, the 4th image of at least two frame is encoded to target video, the default compress mode supports that RGB is logical
The compression of images of road format.That is, the Alpha channel information in first image information to be converted to the third of RGB channel format
Image is equivalent to the Alpha channel information of the first image with third image expression, avoids the first figure during generating video
The loss of Alpha channel information, corresponding second image of RGB channel acquisition of information based on the first image, the second image as in
For RGB channel format, the 4th image is synthesized by the second image and third image, then the 4th image is also RGB channel format, is used
The 4th image of at least two frame is encoded to target video by default compress mode, and target video generates terminal and all supports RGB substantially
The coding of channel image, and then without additional installation specific encoder, it reduces CPU and uses, target video is avoided to generate in terminal
Software Caton, and reduce memory headroom and occupy;Meanwhile playback terminal usually all supports that RGB image corresponds to the decoding of video, and on
The 4th image that target video is RGB channel format to be stated to encode to obtain, that is, above-mentioned target video is the corresponding video of RGB image,
Therefore the original decoder of playback terminal can support the decoding of above-mentioned target video, and then playback terminal is without additional installation
Special decoder reduces CPU and uses, and avoids software Caton on playback terminal, and reduces memory headroom and occupy.
Fig. 3 is a kind of flow chart of video broadcasting method shown according to an exemplary embodiment, as shown in figure 3, video
Playback method is for including the following steps in terminal.
In the step s 21, target video is decoded using the decoder of corresponding default compress mode, obtains at least two frames the 4th
Image;The default compress mode supports the compression of images of RGB channel format;4th image is RGB channel format.
In embodiments herein, above-mentioned default compress mode can support the compression of images or coding of rgb format, example
Such as, which can be with are as follows: H.264 etc..Usual playback terminal all supports the video of rgb format image to decode, that is, logical
Normal playback terminal may include the decoder of the corresponding default compress mode.And then during playing the video, playback terminal
Without additionally installing special decoder, reduces CPU and use, avoid software Caton on playback terminal, and reduce memory headroom and occupy.
In the application optional embodiment, the compression ratio of the default compress mode can be higher than first threshold.This first
Threshold value can be set according to actual needs, in the embodiment of the present application, be not especially limited to this.
In embodiments herein, target video is decoded using the decoder of the above-mentioned preset compress mode of correspondence, is obtained
To the 4th image of at least two frame.4th image can be rgb format.In the embodiment of the present application, this is not especially limited.
In embodiments herein, since this presets the compression of images that compressed format supports RGB channel format, and meanwhile it is big
Most playback terminals supports the processing such as the video decoding of RGB channel format-pattern, therefore, the broadcasting of above-mentioned target video
Journey, playback terminal reduce memory headroom and occupy, reduce CPU and use, avoid in terminal without installing additional special decoder
Software Caton.
In step S22, the 4th image described in each frame is split, obtains the 4th image corresponding second described in each frame
Image and third image.
In embodiments herein, each the 4th image of frame is split, it is corresponding to obtain the 4th image described in each frame
Second image and third image.Specifically, each pixel in available 4th image, corresponding by the pixel of a part
Image is divided into corresponding second image of the 4th image, and it is corresponding that the corresponding image of another part pixel is divided into the 4th image
Third image.In the embodiment of the present application, this is not especially limited.
For example, the pixel of 100*400 can be divided into the 4th if the 4th image includes 200*400 pixel
The pixel of other 100*400 is divided into the corresponding third image of the 4th image by corresponding second image of image.This
Three images and the second image equally can be rgb format.In the embodiment of the present application, this is not especially limited.
In the application an optional embodiment, Fig. 4 is a kind of fractionation the 4th shown according to an exemplary embodiment
The flow chart of image obtains the 4th image pair described in each frame as shown in figure 4, described split the 4th image described in each frame
The second image and third image answered, may include: step S221, and corresponding fractionation circle is determined in the 4th image described in each frame
Limit;Step S222, the corresponding fractionation boundary along the 4th image described in each frame, the 4th image described in each frame is split, is obtained
Take corresponding second image of the 4th image and third image described in each frame.
Specifically, the fractionation boundary etc. in the 4th image can be set, target video generates terminal with the fractionation of the setting
The corresponding connecting method of boundary, splices the second image and third image, or is transferred to by above-mentioned target video
During stating playback terminal, the fractionation boundary etc. in the 4th image is transmitted, and then playback terminal can be in each the 4th image of frame
The corresponding fractionation boundary of middle determination, in the embodiment of the present application, the fractionation boundary can with the first side of above-mentioned second image, or
Second side of third image is corresponding, and in order to avoid repeating, details are not described herein again.The determination of the fractionation boundary is not especially limited.
Each the 4th image of frame is split as corresponding second image and third image by the corresponding fractionation boundary along each the 4th image of frame.
For example, if the 4th image may include: 100*400 pixel, if what is determined in the 4th image is corresponding
Splitting boundary is the 200th column in the 4th image, then can split the 4th image along the 200th column, then the 4th figure
As corresponding second image may include 1-200 column pixel, the corresponding third image of the 4th image may include
201-400 column pixel.
In step S23, the RGB channel information of the second image described in each frame is obtained.
In embodiments herein, which can characterize the RGB channel information of the first image, and available
The RGB channel information of two images, the R channel value of each pixel, subsequent to determine it as in available second image
The R channel value of first image corresponding pixel points, obtain the second image in each pixel G channel value, it is subsequent can by its really
Be set to the channel B value of each pixel in the G channel value or the second image of the first image corresponding pixel points, it is subsequent can be by it
It is determined as the channel B value of the first image corresponding pixel points, and then the RGB channel information of available first image.And so on,
And then the RGB channel information of available each the first image of frame.
For example, obtaining the channel R of first pixel of the second image if the second image includes 100*200 pixel
Value, the subsequent channel R that the R channel value of first pixel of the second image can be determined as to the first pixel in the first image
Value, obtain the second image first pixel G channel value, it is subsequent can be by the channel G of the first pixel in the second image
Value is determined as the G channel value of the first pixel in the first image, obtains the channel B value of first pixel of the second image, after
The continuous channel B value that the channel B value of first pixel in second image can be determined as to the first pixel in the first image, in turn
The RGB channel information of the first pixel in the first image is obtained, and so on, 100*200 picture in available first image
The RGB channel information of vegetarian refreshments.
In step s 24, the RGB channel information of third image described in each frame is obtained, and by third image described in each frame
RGB channel information is converted to corresponding Alpha channel information.
In embodiments herein, which can characterize the Alpha channel information of the first image, available
The RGB channel information of each frame third image, and the RGB channel information of each frame third image is converted into the corresponding channel Alpha
Information.The corresponding Alpha channel value, can characterize the Alpha channel information of the first image, subsequent and then obtain the first image
Alpha channel information.And so on, the Alpha channel information of available each the first image of frame.
In the application optional embodiment, Fig. 5 is that a kind of conversion shown according to an exemplary embodiment is corresponding
The flow chart of Alpha channel information, as shown in figure 5, the corresponding Alpha channel information includes: the Alpha of corresponding pixel points
Channel value;The RGB channel information for obtaining third image described in each frame, and the RGB channel of third image described in each frame is believed
Breath is converted to corresponding Alpha channel information, may include: step S241, obtains each pixel in third image described in each frame
The RGB channel information of point;The RGB channel information includes: R channel value, G channel value, channel B value;The channel R of same pixel
Value, G channel value, channel B value are identical;The Alpha channel value of each corresponding pixel points is assigned a value of corresponding picture by step S242
The R channel value of vegetarian refreshments;Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the G channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the channel B value of corresponding pixel points.
Specifically, each pixel may include: the channel R, the channel G, channel B, the R of same pixel in the third image
Channel value, G channel value, channel B value are all the same, and the Alpha for being assigned corresponding pixel points in its corresponding first image is logical
Road value.The R channel value or G channel value or channel B value of each pixel in the available point image, by each pixel
R channel value or G channel value or channel B value, are determined as the Alpha channel value of each corresponding pixel points.And then it can be by first
The Alpha channel value of each pixel is assigned a value of the R channel value or G channel value of corresponding pixel points in third image in image, or
Channel B value.
For example, if third image includes 100*200 pixel, the R channel value of each pixel of third image, G
Channel value, channel B value are all the same, are assigned the Alpha channel value of corresponding pixel points in its corresponding first image, will be each
The Alpha channel value of a corresponding pixel points is assigned a value of the R channel value of corresponding pixel points;Or, by the Alpha of each corresponding pixel points
Channel value is assigned a value of the G channel value of corresponding pixel points;Or, the Alpha channel value of each corresponding pixel points is assigned a value of corresponding picture
The channel B value of vegetarian refreshments.For example, the Alpha channel value of the first pixel can be assigned a value of to the R of the first pixel in third image
Channel value, or the Alpha channel value of the first pixel is assigned a value of to the G channel value of the first pixel in third image, or by
The Alpha channel value of one pixel is assigned a value of the channel B value of the first pixel in third image.It is subsequent can will be in the first image
The Alpha channel value of first pixel is assigned a value of the R channel value of the first pixel in third image, or will be first in the first image
The Alpha channel value of pixel is assigned a value of the G channel value of the first pixel in third image, or by the first pixel in the first image
The Alpha channel value of point is assigned a value of the channel B value of the first pixel in third image.And so on, available first image
100*200 pixel Alpha channel information.
In step s 25, RGB channel information and the corresponding channel the Alpha letter based on the second image described in each frame
Breath synthesizes each the first image of frame.
In embodiments herein, RGB channel information and corresponding Alpha channel information based on each the second image of frame
Synthesize each the first image of frame.Specifically, RGB channel information and corresponding pixel points based on each pixel of each the second image of frame
Alpha channel information synthesizes each the first image of frame.
For example, based on the R channel value of the first pixel, the G channel value of the first pixel, the first pixel in the second image
Channel B value and the first pixel Alpha channel value synthesize the first image the first pixel, and so on synthesize
To all pixels point of the first image, and then synthesizes and obtained the first image.
In the application optional embodiment, the RGB channel information based on the second image described in each frame and described right
The Alpha channel information answered synthesizes each the first image of frame, may include: to be based on each frame institute using the tinter in rendering pipeline
The RGB channel information and the corresponding Alpha channel information for stating the second image synthesize each the first image of frame.Specifically, playing
Terminal may include video card, by the tinter in rendering pipeline, according to the RGB channel information of each the first image of frame and corresponding
Alpha channel information synthesizes each the first image of frame, has given full play to the function of rendering pipeline, can quickly obtain clarity height
The first image.
In step S26, at least two the first images of frame based on acquisition are played out.
It in embodiments herein, can be played out based at least two the first images of frame of acquisition, specifically, can be with
Above-mentioned first image is played according to certain frame per second etc..
It is rgb format, most of playback terminal by decoded 4th image of target video in embodiments herein
Support the processing such as the video decoding of RGB channel format-pattern, therefore, playback terminal subtracts without installing additional special decoder
Few memory headroom occupies, and reduces CPU and uses, avoids software Caton on playback terminal.The third split by the 4th image
Image and the second image are similarly rgb format, and corresponding second image of the 4th image can characterize the RGB channel of the first image
Information, the corresponding third image of the 4th image can characterize the Alpha channel information of the first image, obtain each frame third image
RGB channel information, and the RGB channel information of each frame third image is converted into corresponding Alpha channel information, i.e., by third
Image determines Alpha channel information in the first image, the RGB channel information in the first image is determined by the second image, by each frame
The RGB channel information of each pixel of first image and the Alpha channel information of corresponding pixel points synthesize each the first image of frame, into
And it avoids during generating video and playing video, the loss of Alpha channel information in the first image.
The technical scheme provided by this disclosed embodiment can include the following benefits: using corresponding default compress mode
Decoder decode target video, obtain the 4th image of at least two frame;The default compress mode supports the figure of RGB channel format
As compression;4th image is RGB channel format;4th image described in each frame is split, is obtained the 4th described in each frame
Corresponding second image of image and third image;Obtain the RGB channel information of the second image described in each frame;It obtains described in each frame
The RGB channel information of three images, and the RGB channel information of third image described in each frame is converted into the corresponding channel Alpha and is believed
Breath;RGB channel information and the corresponding Alpha channel information based on the second image described in each frame synthesize each the first figure of frame
Picture;At least two the first images of frame based on acquisition play out.The target video is encoded to obtain by the 4th image of rgb format,
Using default compress mode, target video is decoded as the 4th image, and playback terminal all supports RGB channel format-pattern substantially
Video decoding, therefore, the original decoder of playback terminal can support the decoding of above-mentioned target video, and then playback terminal
Without installing additional special decoder, reduces CPU and use, avoid software Caton on playback terminal, and reduce memory headroom and account for
With;4th image is split as corresponding second image and third image, obtains the RGB channel information of each the second image of frame, it should
Each the second image of frame can reflect the RGB channel information of each the first image of frame, obtain the RGB channel letter of third image described in each frame
Breath, and the RGB channel information of third image described in each frame is converted into corresponding Alpha channel information, each frame third image
RGB channel information can reflect the Alpha channel information of each the first image of frame, the RGB based on the second image described in each frame is logical
Road information and the corresponding Alpha channel information synthesize each the first image of frame, at least two the first images of frame based on acquisition into
Row plays, and avoids the loss of the Alpha channel information in the first image in video display process, remains the to greatest extent
The information of one image.
Fig. 6 is a kind of video-generating device block diagram shown according to an exemplary embodiment.Referring to Fig. 6, which includes
First image acquisition unit 301, the second image and Alpha channel information acquiring unit 302, third image conversion unit 303,
Four image composing units 304 and coding unit 305.
First image acquisition unit 301 is configured as obtaining at least two the first images of frame;
Second image and Alpha channel information acquiring unit 302 are configured as obtaining it for every the first image of frame
Corresponding second image, and obtain the Alpha channel information of the first image;Second image is the first image
The corresponding image of RGB channel information;
The third image conversion unit 303 is configured as the Alpha channel information of the first image being converted to RGB
The third image of channel format;
4th image composing unit 304 is configured as synthesizing the 4th with the third image based on second image
Image;
The coding unit 305 is configured as that the 4th image of at least two frame is encoded to mesh using default compress mode
Video is marked, the default compress mode supports the compression of images of RGB channel format.
Optionally, Fig. 7 is another video-generating device block diagram shown according to an exemplary embodiment.Referring to Fig. 7, institute
Third image conversion unit 303 is stated, may include: that Alpha channel value obtains subelement 3031 and third image conversion subunit
3032。
The Alpha channel value obtains subelement 3031, is configured as obtaining each pixel for every the first image of frame
Alpha channel value;
The third image conversion subunit 3032 is configured as the Alpha based on each pixel in every the first image of frame
Channel value obtains the third image of every frame RGB channel format;The R channel value of each pixel, G in third image described in every frame
Channel value, channel B value are assigned the Alpha channel value of corresponding pixel points in its corresponding first image.
Optionally, the 4th image composing unit 304 may include: the 4th image synthesizing subunit 3041.
4th image synthesizing subunit 3041 is configured as the first side of second image and corresponding third figure
Second side of picture is spliced, and the 4th image is obtained;First side of second image includes: the second image from the rightmost side
C row pixel column, the second figure of b column pixel column, the second image from top side of a column pixel column, the second image from the leftmost side
As one of the d row pixel column from lower side;Second side of the third image includes: third image from the leftmost side
M column pixel column, third image the x row pixel column, third image from lower side of n column pixel column, third image from the rightmost side
One of y row pixel column from top side;Described a, b, c, d, n, m, x, y are the integer greater than 0.
Optionally, the default compress mode includes: H.264 compress mode.
About the device in above-described embodiment, wherein each unit executes the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 8 is a kind of video play device block diagram shown according to an exemplary embodiment.Referring to Fig. 8, the device 400 packet
Include: decoding unit 401, the 4th image split cells 402, RGB channel information determination unit 403, Alpha channel information determine single
First 404, first image composing unit 405 and broadcast unit 406.
The decoding unit 401 is configured as the decoder decoding target video using corresponding default compress mode, obtains extremely
Few the 4th image of two frames;The default compress mode supports the compression of images of RGB channel format;4th image is logical for RGB
Road format;
4th image split cells 402 is configured as splitting the 4th image described in each frame, obtain described in each frame
Corresponding second image of 4th image and third image;
The RGB channel information determination unit 403 is configured as obtaining the RGB channel information of the second image described in each frame;
The Alpha channel information determination unit 404 is configured as obtaining the RGB channel information of third image described in each frame,
And the RGB channel information of third image described in each frame is converted into corresponding Alpha channel information;
First image composing unit 405 is configured as RGB channel information based on the second image described in each frame and described
Corresponding Alpha channel information synthesizes each the first image of frame;
The broadcast unit 406 is configured as at least two the first images of frame based on acquisition and plays out.
Optionally, Fig. 9 is another video play device block diagram shown according to an exemplary embodiment.Referring to Fig. 9, institute
Alpha channel information determination unit 404 is stated, may include: RGB channel acquisition of information subelement 4041 and Alpha channel information
Determine subelement 4042.
The RGB channel acquisition of information subelement 4041, is configured as obtaining each pixel in third image described in each frame
RGB channel information;The RGB channel information includes: R channel value, G channel value, channel B value;The channel R of same pixel
Value, G channel value, channel B value are identical;
The Alpha channel information determines subelement 4042, is configured as the channel Alpha of each corresponding pixel points
Value is assigned a value of the R channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the G channel value of corresponding pixel points;
Or, the Alpha channel value of each corresponding pixel points to be assigned a value of to the channel B value of corresponding pixel points.
Optionally, the 4th image split cells 402 may include: that the 4th image first splits 4021 He of subelement
4th image second splits subelement 4022.
4th image first splits subelement 4021, is configured as determining corresponding tear open in the 4th image described in each frame
Boundary;
4th image second splits subelement 4022, is configured as corresponding fractionation circle along the 4th image described in each frame
Limit, the 4th image described in each frame is split, corresponding second image of the 4th image and third image described in each frame are obtained.
Optionally, the first image synthesis unit 405 may include: the first image synthesizing subunit 4051.
The first image synthesizing subunit 4051 is configured as using the tinter in rendering pipeline, based on described in each frame
The RGB channel information of second image and the corresponding Alpha channel information synthesize each the first image of frame.
About the device in above-described embodiment, wherein each unit executes the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Figure 10 is the block diagram of a kind of electronic equipment 1000 shown according to an exemplary embodiment.For example, electronic equipment
1000 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical treatment
Equipment, body-building equipment, personal digital assistant etc..
Referring to Fig.1 0, electronic equipment 1000 may include following one or more components: processing component 1002, memory
1004, electric power assembly 1006, multimedia component 1008, audio component 1010, the interface 1012 of input/output (I/O), sensor
Component 1014 and communication component 1016.
The integrated operation of the usual controlling electronic devices 1000 of processing component 1002, such as with display, call, data are logical
Letter, camera operation and record operate associated operation.Processing component 1002 may include one or more processors 1020
It executes instruction, to perform all or part of the steps of the methods described above.In addition, processing component 1002 may include one or more
Module, convenient for the interaction between processing component 1002 and other assemblies.For example, processing component 1002 may include multimedia mould
Block, to facilitate the interaction between multimedia component 1008 and processing component 1002.
Memory 1004 is configured as storing various types of data to support the operation in equipment 1000.These data
Example includes the instruction of any application or method for operating on electronic equipment 1000, contact data, telephone directory
Data, message, picture, video etc..Memory 1004 can by any kind of volatibility or non-volatile memory device or
Their combination realizes that, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) can
Erasable programmable read-only memory (EPROM) (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory,
Flash memory, disk or CD.
Power supply module 1006 provides electric power for the various assemblies of electronic equipment 1000.Power supply module 1006 may include power supply
Management system, one or more power supplys and other with for electronic equipment 1000 generate, manage, and distribute associated group of electric power
Part.
Multimedia component 1008 includes the screen of one output interface of offer between the electronic equipment 1000 and user
Curtain.In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touching
Panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touchings
Sensor is touched to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or cunning
The boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments
In, multimedia component 1008 includes a front camera and/or rear camera.When equipment 1000 is in operation mode, such as
When screening-mode or video mode, front camera and/or rear camera can receive external multi-medium data.Before each
Setting camera and rear camera can be a fixed optical lens system or has focusing and optical zoom capabilities.
Audio component 1010 is configured as output and/or input audio signal.For example, audio component 1010 includes a wheat
Gram wind (MIC), when electronic equipment 1000 is in operation mode, when such as call mode, recording mode, and voice recognition mode, Mike
Wind is configured as receiving external audio signal.The received audio signal can be further stored in memory 1004 or via
Communication component 1016 is sent.In some embodiments, audio component 1010 further includes a loudspeaker, for exporting audio letter
Number.
I/O interface 1012 provides interface, above-mentioned peripheral interface module between processing component 1002 and peripheral interface module
It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and
Locking press button.
Sensor module 1014 includes one or more sensors, for providing the shape of various aspects for electronic equipment 1000
State assessment.For example, sensor module 1014 can detecte the state that opens/closes of equipment 1000, the relative positioning of component, example
Such as the display and keypad that the component is electronic equipment 1000, sensor module 1014 can also detect electronic equipment 1000
Or the position change of 1,000 1 components of electronic equipment, the existence or non-existence that user contacts with electronic equipment 1000, electronics are set
The temperature change in standby 1000 orientation or acceleration/deceleration and electronic equipment 1000.Sensor module 1014 may include approaching sensing
Device is configured to detect the presence of nearby objects without any physical contact.Sensor module 1014 can also wrap
Optical sensor is included, such as CMOS or ccd image sensor, for using in imaging applications.In some embodiments, the sensor
Component 1014 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1016 is configured to facilitate the logical of wired or wireless way between electronic equipment 1000 and other equipment
Letter.Electronic equipment 1000 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or
5G) or their combination.In one exemplary embodiment, communication component 1016 is received via broadcast channel from external wide
The broadcast singal or broadcast related information of broadcast management system.In one exemplary embodiment, the communication component 1016 also wraps
Near-field communication (NFC) module is included, to promote short range communication.For example, it can be based on radio frequency identification (RFID) technology in NFC module, it is red
Outer data association (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, electronic equipment 1000 can by one or more application specific integrated circuit (ASIC),
Digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field-programmable gate array
It arranges (FPGA), controller, microcontroller, microprocessor or other electronic components to realize, for executing the view of above-mentioned Fig. 1 to Fig. 2
The video broadcasting method of frequency generation method or Fig. 3 to Fig. 5, and identical technical effect can be reached, in order to avoid repeating herein not
It repeats again.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 1004 of instruction, above-metioned instruction can be executed by the processor 1020 of device 1000 to complete above-mentioned Fig. 1 to Fig. 2
Video generation method or Fig. 3 to Fig. 5 video broadcasting method, and identical technical effect can be reached, in order to avoid repeating this
Place repeats no more.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM),
CD-ROM, tape, floppy disk and optical data storage devices etc..
Figure 11 is the block diagram of another electronic equipment 1100 shown according to an exemplary embodiment.For example, electronic equipment
1100 may be provided as a server.Referring to Fig.1 1, it further comprises one that electronic equipment 1100, which includes processing component 1122,
A or multiple processors, and the memory resource as representated by memory 1132, can be by processing component 1122 for storing
The instruction of execution, such as application program.The application program stored in memory 1132 may include one or more every
One corresponds to the module of one group of instruction.In addition, processing component 1122 is configured as executing instruction, to execute above-mentioned Fig. 1 to Fig. 2
Video generation method or Fig. 3 to Fig. 5 video broadcasting method, and identical technical effect can be reached, in order to avoid repeating this
Place repeats no more.
Electronic equipment 1100 can also include that a power supply module 1126 is configured as executing the power supply of electronic equipment 1100
Management, a wired or wireless network interface 1150 is configured as electronic equipment 1100 being connected to network and an input is defeated
(I/O) interface 1158 out.Electronic equipment 1100 can be operated based on the operating system for being stored in memory 1132, such as
Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
According to the one aspect of the embodiment of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described
When instruction in storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out the view of above-mentioned Fig. 1 to Fig. 2
The video broadcasting method of frequency generation method or Fig. 3 to Fig. 5, and identical technical effect can be reached, in order to avoid repeating herein not
It repeats again.Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of video generation method characterized by comprising
Obtain at least two the first images of frame;
For every the first image of frame, its corresponding second image is obtained, and obtains the channel the Alpha letter of the first image
Breath;Second image is the corresponding image of RGB channel information of the first image;
By the Alpha channel information of the first image, the third image of RGB channel format is converted to;
The 4th image is synthesized with the third image based on second image;
Using default compress mode, the 4th image of at least two frame is encoded to target video, the default compress mode branch
Hold the compression of images of RGB channel format.
2. video generation method according to claim 1, which is characterized in that described to lead to the Alpha of the first image
Road information is converted to the third image of RGB channel format, comprising:
For every the first image of frame, the Alpha channel value of each pixel is obtained;
Based on the Alpha channel value of each pixel in every the first image of frame, the third image of every frame RGB channel format is obtained;
R channel value, G channel value, the channel B value of each pixel are assigned its corresponding first figure in third image described in every frame
The Alpha channel value of corresponding pixel points as in.
3. video generation method according to claim 1, which is characterized in that described based on second image and described the
Three images synthesize the 4th image, comprising:
First side of second image is spliced with second side of corresponding third image, obtains the 4th image;It is described
First side of the second image includes: a column pixel column, second image b column picture from the leftmost side of second image from the rightmost side
One of element column, the d row pixel column of c row pixel column, the second image from lower side of the second image from top side;It is described
Second side of third image includes: n column pixel column, third image m column picture from the rightmost side of the third image from the leftmost side
Element column, third image one of the y row pixel column of x row pixel column, third image from top side from lower side;The a,
B, c, d, n, m, x, y are the integer greater than 0.
4. a kind of video broadcasting method characterized by comprising
Target video is decoded using the decoder of corresponding default compress mode, obtains the 4th image of at least two frame, the default pressure
Contracting mode supports the compression of images of RGB channel format;4th image is RGB channel format;
4th image described in each frame is split, corresponding second image of the 4th image and third image described in each frame are obtained;
Obtain the RGB channel information of the second image described in each frame;
The RGB channel information of third image described in each frame is obtained, and the RGB channel information of third image described in each frame is converted to
Corresponding Alpha channel information;
RGB channel information and the corresponding Alpha channel information based on the second image described in each frame synthesize each the first figure of frame
Picture;
At least two the first images of frame based on acquisition play out.
5. video broadcasting method according to claim 4, which is characterized in that the corresponding Alpha channel information includes:
The Alpha channel value of corresponding pixel points;The RGB channel information for obtaining third image described in each frame, and by described in each frame the
The RGB channel information of three images is converted to corresponding Alpha channel information, comprising:
Obtain the RGB channel information of each pixel in third image described in each frame;The RGB channel information includes: the channel R
Value, G channel value, channel B value;R channel value, G channel value, the channel B value of same pixel are identical;
The Alpha channel value of each corresponding pixel points is assigned a value of to the R channel value of corresponding pixel points;Or, by each described
The Alpha channel value of corresponding pixel points is assigned a value of the G channel value of corresponding pixel points;Or, by each corresponding pixel points
Alpha channel value is assigned a value of the channel B value of corresponding pixel points.
6. video broadcasting method according to claim 4, which is characterized in that described to tear the 4th image described in each frame open
Point, obtain corresponding second image of the 4th image and third image described in each frame, comprising:
Corresponding fractionation boundary is determined in the 4th image described in each frame;
The corresponding fractionation boundary along the 4th image described in each frame, the 4th image described in each frame is split, and obtains each frame institute
State corresponding second image of the 4th image and third image.
7. a kind of video-generating device characterized by comprising
First image acquisition unit is configured as obtaining at least two the first images of frame;
Second image and Alpha channel information acquiring unit, are configured as every the first image of frame, obtain its corresponding second
Image, and obtain the Alpha channel information of the first image;Second image is the RGB channel of the first image
The corresponding image of information;
Third image conversion unit is configured as the Alpha channel information of the first image being converted to RGB channel format
Third image;
4th image composing unit is configured as synthesizing the 4th image with the third image based on second image;
Coding unit is configured as the 4th image of at least two frame being encoded to target video, institute using default compress mode
State the compression of images that default compress mode supports RGB channel format.
8. a kind of video play device characterized by comprising
Decoding unit is configured as the decoder decoding target video using corresponding default compress mode, obtains at least two frames the
Four images, the default compress mode support the compression of images of RGB channel format;4th image is RGB channel format;
4th image split cells is configured as splitting the 4th image described in each frame, obtains the 4th image described in each frame
Corresponding second image and third image;
RGB channel information determination unit is configured as obtaining the RGB channel information of the second image described in each frame;
Alpha channel information determination unit, is configured as obtaining the RGB channel information of third image described in each frame, and by each frame
The RGB channel information of the third image is converted to corresponding Alpha channel information;
First image composing unit is configured as RGB channel information based on the second image described in each frame and described corresponding
Alpha channel information synthesizes each the first image of frame;
Broadcast unit is configured as at least two the first images of frame based on acquisition and plays out.
9. a kind of electronic equipment characterized by comprising
Processor;
First memory for storage processor executable instruction;
Wherein, the processor is configured to: execute video generation method as claimed any one in claims 1 to 3;Or,
The processor is configured to: execute the video broadcasting method as described in any one of claim 4 to 6.
10. a kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal
When device executes, so that mobile terminal is able to carry out video generation method as claimed any one in claims 1 to 3;Or, described
Mobile terminal is able to carry out the video broadcasting method as described in any one of claim 4 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811291692.4A CN109348141A (en) | 2018-10-31 | 2018-10-31 | Video generation, video broadcasting method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811291692.4A CN109348141A (en) | 2018-10-31 | 2018-10-31 | Video generation, video broadcasting method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109348141A true CN109348141A (en) | 2019-02-15 |
Family
ID=65312953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811291692.4A Pending CN109348141A (en) | 2018-10-31 | 2018-10-31 | Video generation, video broadcasting method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109348141A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760525A (en) * | 2021-01-08 | 2022-07-15 | 北京字节跳动网络技术有限公司 | Video generation and playing method, device, equipment and medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533352A (en) * | 2013-09-27 | 2014-01-22 | 桂林力港网络科技有限公司 | Compression method and device and decompression method and device for image with transparency |
KR20160026005A (en) * | 2014-08-29 | 2016-03-09 | (주) 디아이지 커뮤니케이션 | Apparatus and method for compressing autmented-reality video having alpha channel |
CN105959724A (en) * | 2016-05-24 | 2016-09-21 | 腾讯科技(深圳)有限公司 | Video data processing method and device |
-
2018
- 2018-10-31 CN CN201811291692.4A patent/CN109348141A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103533352A (en) * | 2013-09-27 | 2014-01-22 | 桂林力港网络科技有限公司 | Compression method and device and decompression method and device for image with transparency |
KR20160026005A (en) * | 2014-08-29 | 2016-03-09 | (주) 디아이지 커뮤니케이션 | Apparatus and method for compressing autmented-reality video having alpha channel |
CN105959724A (en) * | 2016-05-24 | 2016-09-21 | 腾讯科技(深圳)有限公司 | Video data processing method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760525A (en) * | 2021-01-08 | 2022-07-15 | 北京字节跳动网络技术有限公司 | Video generation and playing method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110109636B (en) | Screen projection method, electronic device and system | |
KR101450580B1 (en) | Method and Apparatus for composing images | |
US8260349B2 (en) | Image/audio playback device of mobile communication terminal | |
KR101852087B1 (en) | Method, device, program and recording medium for compressing firmware program, method, device, program and recording medium for decompressing firmware program | |
CN112954251B (en) | Video processing method, video processing device, storage medium and electronic equipment | |
US11870941B2 (en) | Audio processing method and electronic device | |
KR101834269B1 (en) | Method, device, program and recording medium for playing audio | |
JP2024513539A (en) | Test equipment and electronic equipment | |
CN111598919A (en) | Motion estimation method, motion estimation device, storage medium, and electronic apparatus | |
KR20080025462A (en) | Method and apparatus for transmit digital broadcasting in mobile phone | |
CN113497851B (en) | Control display method and electronic equipment | |
WO2024037352A1 (en) | Split-screen display method and related apparatus | |
CN109348141A (en) | Video generation, video broadcasting method, device, electronic equipment and storage medium | |
CN115223579A (en) | Method for negotiating and switching coder and decoder | |
CN114915745A (en) | Multi-scene video recording method and device and electronic equipment | |
KR101232537B1 (en) | Video communication terminal and video method communicating in video communication terminal | |
CN117440194A (en) | Method and related device for processing screen throwing picture | |
CN106254654B (en) | Mobile terminal and data transmission method | |
CN116668764B (en) | Method and device for processing video | |
JP2018201194A (en) | Sound processing device and sound processing method | |
US20210360189A1 (en) | Video processing method and apparatus, and storage medium | |
CN114727001B (en) | Method, device and medium for processing image data | |
CN115543649B (en) | Data acquisition method and electronic equipment | |
US20240176573A1 (en) | Projection method and system, and electronic device | |
KR100735342B1 (en) | Device and method for picture displaying potable terminal having the camera |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190215 |