CN112860209A - Video overlapping method and device, electronic equipment and computer readable storage medium - Google Patents
Video overlapping method and device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN112860209A CN112860209A CN202110157248.9A CN202110157248A CN112860209A CN 112860209 A CN112860209 A CN 112860209A CN 202110157248 A CN202110157248 A CN 202110157248A CN 112860209 A CN112860209 A CN 112860209A
- Authority
- CN
- China
- Prior art keywords
- video data
- overlay
- video
- layer
- overlapping
- 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 41
- 238000004590 computer program Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/14—Digital output to display device ; Cooperation and interconnection of the display device with other functional units
- G06F3/147—Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
Abstract
The present disclosure provides a video overlay method and apparatus, an electronic device, and a computer-readable storage medium, wherein the video overlay method includes: superposing 2 video data in the N video data to obtain 1 st superposed video data; wherein N is an integer greater than or equal to 2; overlapping the ith overlapped video data with 1 video data in the remaining (N-i-1) video data to obtain (i +1) th overlapped video data; when i is an integer which is greater than or equal to 1 and less than or equal to (N-3), adding 1 to i, and continuing to execute the step of superposing the i-th superposed video data and 1 video data in the rest (N-i-1) video data to obtain (i +1) -th superposed video data; outputting the (i +1) th overlay video data in a case where i is equal to (N-2). The video overlapping method provided by the embodiment of the disclosure adopts an (N-1) layer video overlapping structure, and improves the universality.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of video processing, and in particular relates to a video overlapping method and device, electronic equipment, and a computer-readable storage medium.
Background
With the development of computer technology, the application of video image processing technology is becoming more and more widespread, wherein the video overlay technology is an important research and development direction in image video processing, and characters or image signals can be overlaid in video signals through the video overlay technology and displayed simultaneously with the video signals at specific positions of a screen, so that people can obtain a plurality of effective information simultaneously.
The current video overlapping method has poor universality.
BRIEF SUMMARY OF THE PRESENT DISCLOSURE
The embodiment of the disclosure provides a video overlapping method and device, electronic equipment and a computer-readable storage medium.
In a first aspect, an embodiment of the present disclosure provides a video overlay method, including:
superposing 2 video data in the N video data to obtain 1 st superposed video data; wherein N is an integer greater than or equal to 2;
overlapping the ith overlapped video data with 1 video data in the remaining (N-i-1) video data to obtain (i +1) th overlapped video data;
when i is an integer which is greater than or equal to 1 and less than or equal to (N-3), adding 1 to i, and continuing to execute the step of superposing the i-th superposed video data and 1 video data in the rest (N-i-1) video data to obtain (i +1) -th superposed video data; outputting the (i +1) th overlay video data in a case where i is equal to (N-2).
In some exemplary embodiments, the overlaying 2 video data of the N video data to obtain 1 st overlaid video data includes:
selecting 2 of the video data from the N video data;
according to a preset 1 st superposition window and a 1 st transparency coefficient, superposing video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st superposition video data; wherein, one of the 2 selected video data is used as a 1 st background layer, and the other video data is used as a 1 st foreground layer.
In some exemplary embodiments, the superimposing, according to a preset 1 st superimposition window and a 1 st transparency coefficient, the video data as a 1 st background layer and the video data as a 1 st foreground layer to obtain 1 st superimposition video data includes:
within said 1 st superposition window according to formula R1=A1B1+(1-A1)F1Calculating the 1 st overlay video data;
outside the 1 st overlay window according to formula R1=B1Calculating the 1 st overlay video data;
wherein R is1For said 1 st overlay video data, A1Is the 1 st transparency coefficient, B1For video data as background layer 1, F1As video data for the 1 st foreground layer.
In some exemplary embodiments, the superimposing the i-th overlay video data with 1 video data of the remaining (N-i-1) video data to obtain the (i +1) -th overlay video data includes:
selecting 1 of the video data from the remaining (N-i-1) of the video data;
according to a preset (i +1) th superposition window and a preset (i +1) th transparency coefficient, superposing video data serving as an (i +1) th background layer and video data serving as an (i +1) th foreground layer to obtain (i +1) th superposed video data; wherein one of the ith overlay video data and the selected 1 of the video data is taken as an (i +1) th background layer, and the other is taken as an (i +1) th foreground layer.
In some exemplary embodiments, the superimposing the video data as the (i +1) th background layer and the video data as the (i +1) th foreground layer according to the (i +1) th superimposition window and the (i +1) th transparency coefficient set in advance to obtain the (i +1) th superimposed video data includes:
within said (i +1) th superposition window according to formula Ri+1=Ai+1Bi+1+(1-Ai+1)Fi+1Calculating the (i +1) th overlay video data;
outside the (i +1) th overlay window according to formula Ri+1=Bi+1Calculating the (i +1) th overlay video data;
wherein R isi+1For the (i +1) th overlay video data, Ai+1Is the (i +1) th transparency coefficient, Bi+1For video data as the (i +1) th background layer, Fi+1Is the video data as the (i +1) th foreground layer.
In a second aspect, an embodiment of the present disclosure provides a video superimposing apparatus, including:
the first superposition module is used for superposing 2 video data in the N video data to obtain 1 st superposed video data; wherein N is an integer greater than or equal to 2;
a second superimposing module configured to:
overlapping the ith overlapped video data with 1 video data in the remaining (N-i-1) video data to obtain (i +1) th overlapped video data;
when i is an integer which is greater than or equal to 1 and less than or equal to (N-3), adding 1 to i, and continuing to execute the step of superposing the i-th superposed video data and 1 video data in the rest (N-i-1) video data to obtain (i +1) -th superposed video data; outputting the (i +1) th overlay video data in a case where i is equal to (N-2).
In some exemplary embodiments, the first superimposing module is specifically configured to:
selecting 2 of the video data from the N video data;
according to a preset 1 st superposition window and a 1 st transparency coefficient, superposing video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st superposition video data; wherein, one of the 2 selected video data is used as a 1 st background layer, and the other video data is used as a 1 st foreground layer.
In some exemplary embodiments, the second overlay module is specifically configured to overlay the i-th overlay video data and 1 video data of the remaining (N-i-1) video data to obtain an (i +1) -th overlay video data by using the following method:
selecting 1 of the video data from the remaining (N-i-1) of the video data;
according to a preset (i +1) th superposition window and a preset (i +1) th transparency coefficient, superposing video data serving as an (i +1) th background layer and video data serving as an (i +1) th foreground layer to obtain (i +1) th superposed video data; wherein one of the ith overlay video data and the selected 1 of the video data is taken as an (i +1) th background layer, and the other is taken as an (i +1) th foreground layer.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
at least one processor;
a memory having at least one program stored thereon, which when executed by the at least one processor, causes the at least one processor to implement any of the video overlay methods described above.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the above-mentioned video overlay methods.
The video overlapping method provided by the embodiment of the disclosure adopts an (N-1) layer video overlapping structure, and in each layer of video overlapping structure, video data can be randomly selected from non-overlapping video data for overlapping, so that the universality is improved.
In some exemplary embodiments, in each layer of video overlay structure, video data serving as a background layer and video data serving as a foreground layer can be selected at will when video overlay is performed, so that the universality is further improved.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. Detailed exemplary embodiments are described by reference to the accompanying drawings, in which:
fig. 1 is a flowchart of a video overlay method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a video overlapping method according to an embodiment of the present disclosure;
fig. 3 is a block diagram of a video overlay apparatus according to another embodiment of the disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present disclosure, the video overlay method and apparatus, the electronic device, and the computer-readable storage medium provided in the present disclosure are described in detail below with reference to the accompanying drawings.
Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but which may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of at least one of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of at least one other feature, integer, step, operation, element, component, and/or group thereof.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The video overlapping method provided by the embodiment of the disclosure adopts an (N-1) layer video overlapping structure to realize overlapping of input N video data and output of 1 video data. Each layer of video overlapping structure overlaps 2 video data, and universality is improved.
Fig. 1 is a flowchart of a video overlay method according to an embodiment of the present disclosure.
In a first aspect, referring to fig. 1, an embodiment of the present disclosure provides a video overlay method, including:
In some exemplary embodiments, overlaying 2 video data of the N video data to obtain 1 st overlaid video data includes:
selecting 2 of the video data from the N video data;
according to a preset 1 st superposition window and a 1 st transparency coefficient, superposing video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st superposition video data; wherein, one of the 2 selected video data is used as a 1 st background layer, and the other video data is used as a 1 st foreground layer.
In some exemplary embodiments, the superimposing, according to a preset 1 st superimposition window and a 1 st transparency coefficient, the video data as a 1 st background layer and the video data as a 1 st foreground layer to obtain 1 st superimposition video data includes:
within said 1 st superposition window according to formula R1=A1B1+(1-A1)F1Calculating the 1 st overlay video data;
outside the 1 st overlay window according to formula R1=B1Calculating the 1 st overlay video data;
wherein R is1For said 1 st overlay video data, A1Is the 1 st transparency coefficient, B1For video data as background layer 1, F1As video data for the 1 st foreground layer.
And 101, overlapping the ith overlapped video data with 1 video data in the rest (N-i-1) video data to obtain (i +1) th overlapped video data.
In some exemplary embodiments, superimposing the i-th overlay video data with 1 video data of the remaining (N-i-1) video data to obtain the (i +1) -th overlay video data includes:
selecting 1 of the video data from the remaining (N-i-1) of the video data;
according to a preset (i +1) th superposition window and a preset (i +1) th transparency coefficient, superposing video data serving as an (i +1) th background layer and video data serving as an (i +1) th foreground layer to obtain (i +1) th superposed video data; wherein one of the ith overlay video data and the selected 1 of the video data is taken as an (i +1) th background layer, and the other is taken as an (i +1) th foreground layer.
In some exemplary embodiments, the superimposing the video data as the (i +1) th background layer and the video data as the (i +1) th foreground layer according to the (i +1) th superimposition window and the (i +1) th transparency coefficient set in advance to obtain the (i +1) th superimposed video data includes:
within said (i +1) th superposition window according to formula Ri+1=Ai+1Bi+1+(1-Ai+1)Fi+1Calculating the (i +1) th overlay video data;
outside the (i +1) th overlay window according to formula Ri+1=Bi+1Calculating the (i +1) th overlay video data;
wherein R isi+1For the (i +1) th overlay video data, Ai+1Is the (i +1) th transparency coefficient, Bi+1For video data as the (i +1) th background layer, Fi+1Is the video data as the (i +1) th foreground layer.
In some exemplary embodiments, as shown in fig. 2, a superimposition window and a transparency coefficient corresponding to each video data may be preset. In each layer of video overlapping structure, the overlapping window and the transparency coefficient corresponding to the selected 1 video data can be adopted for video overlapping.
In some exemplary embodiments, as shown in fig. 2, a superimposition window and a transparency coefficient may also be set in each video superimposer.
In some exemplary embodiments, a corresponding overlay window and transparency coefficient may also be carried in each video data.
The video overlapping method provided by the embodiment of the disclosure adopts an (N-1) layer video overlapping structure, and in each layer of video overlapping structure, video data can be randomly selected from non-overlapping video data for overlapping, so that the universality is improved.
In some exemplary embodiments, in each layer of video overlay structure, video data serving as a background layer and video data serving as a foreground layer can be selected at will when video overlay is performed, so that the universality is further improved.
As shown in fig. 2, a superimposition window and a transparency coefficient corresponding to each piece of video data are preset, N selectors are used, each selector selects 1 piece of video data from the N pieces of video data, and the video data selected by different selectors are different; for example, N selectors are selector 1, selector 2, … …, selector N, selector 1 selects video data 1, selector 2 selects video data 2, … …, selector N selects video data N, respectively;
adopting (N-1) video superimposers which are respectively a video superimposer 1, a video superimposer 2, … … and a video superimposer (N-1), wherein the video superimposer 1 superimposes video data 1 as a 1 st background layer and video data 2 as a 1 st foreground layer according to a superimposition window and a transparency coefficient corresponding to the video data 1 to obtain 1 st superimposed video data, the video superimposer 2 superimposes the 1 st superimposed video data as a 2 nd background layer and the video data 3 as a 2 nd foreground layer according to a superimposition window and a transparency coefficient corresponding to the video data 3 to obtain 2 nd superimposed video data, … …, and the video superimposer (N-1) superimposer superimposers (N-1) superimposes the (N-2) th superimposed video data as a (N-1) th background layer and the video data N as a (N-1) th foreground layer according to a superimposition window and a transparency coefficient corresponding to the video data N to obtain a (N-1) stack Adding the video data and outputting the (N-1) th superimposed video data.
The following describes a specific implementation process of the above video overlay method in detail by using several examples, and the examples are only for convenience of description and are not used to limit the scope of the video overlay method according to the embodiments of the present disclosure.
Example 1
This example describes a method of superimposing 5 pieces of video data, including:
1. a superimposition window 1 and a transparency coefficient 1 are set for video data 1 in advance, a superimposition window 2 and a transparency coefficient 2 are set for video data 2, a superimposition window 3 and a transparency coefficient 3 are set for video data 3, a superimposition window 4 and a transparency coefficient 4 are set for video data 4, and a superimposition window 5 and a transparency coefficient 5 are set for video data 5.
2. Video data 1 and video data 2 are selected from video data 1, video data 2, video data 3, video data 4, and video data 5, and the video data 1 is used as a background layer and the video data 2 is used as a foreground layer.
3. And superposing the video data 1 and the video data 2 according to the superposition window 1 and the transparency coefficient 1 to obtain the 1 st superposed video data.
4. Video data 3 is selected from video data 3, video data 4, and video data 5, and the video data 3 is used as a foreground layer and the 1 st overlay video data is used as a background layer.
5. And superposing the video data 3 and the 1 st superposed video data according to the superposition window 3 and the transparency coefficient 3 to obtain the 2 nd superposed video data.
6. Video data 4 is selected from video data 4 and video data 5, the video data 4 is used as a foreground layer, and the 2 nd overlay video data is used as a background layer.
7. And superposing the video data 4 and the 2 nd superposed video data according to the superposition window 4 and the transparency coefficient 4 to obtain the 3 rd superposed video data.
8. The video data 5 is taken as a foreground layer and the 3 rd superimposed video data is taken as a background layer.
9. And superposing the video data 5 and the 3 rd superposed video data according to the superposition window 5 and the transparency coefficient 5 to obtain the 4 th superposed video data.
Example 2
This example describes a method of superimposing 5 pieces of video data, including:
1. presetting a 1 st overlapping window and a 1 st transparency coefficient, presetting a 2 nd overlapping window and a 2 nd transparency coefficient, setting a 3 rd overlapping window and a 3 rd transparency coefficient, and setting a 4 th overlapping window and a 4 th transparency coefficient.
2. Video data 1 and video data 2 are selected from video data 1, video data 2, video data 3, video data 4, and video data 5, and the video data 1 is used as a background layer and the video data 2 is used as a foreground layer.
3. And superposing the video data 1 and the video data 2 according to the 1 st superposition window and the 1 st transparency coefficient to obtain 1 st superposed video data.
4. Video data 3 is selected from video data 3, video data 4, and video data 5, and the video data 3 is used as a background layer and the 1 st overlay video data is used as a foreground layer.
5. And superposing the video data 3 and the 1 st superposed video data according to the 2 nd superposed window and the 2 nd transparency coefficient to obtain the 2 nd superposed video data.
6. Video data 4 is selected from video data 4 and video data 5, the video data 4 is used as a background layer, and the 2 nd overlay video data is used as a foreground layer.
7. And superposing the video data 4 and the 2 nd superposed video data according to the 3 rd superposed window and the 3 rd transparency coefficient to obtain the 3 rd superposed video data.
8. The video data 5 is taken as a background layer and the 3 rd superimposed video data is taken as a foreground layer.
9. And superposing the video data 5 and the 3 rd superposed video data according to the 4 th superposed window and the 4 th transparency coefficient to obtain 4 th superposed video data.
Fig. 3 is a block diagram of a video overlay apparatus according to another embodiment of the disclosure.
In a second aspect, referring to fig. 3, another embodiment of the present disclosure provides a video overlay apparatus, including:
the first superimposing module 301 is configured to superimpose 2 video data of the N video data to obtain 1 st superimposed video data; wherein N is an integer greater than or equal to 2;
a second superimposing module 302 configured to:
overlapping the ith overlapped video data with 1 video data in the remaining (N-i-1) video data to obtain (i +1) th overlapped video data;
when i is an integer which is greater than or equal to 1 and less than or equal to (N-3), adding 1 to i, and continuing to execute the step of superposing the i-th superposed video data and 1 video data in the rest (N-i-1) video data to obtain (i +1) -th superposed video data; outputting the (i +1) th overlay video data in a case where i is equal to (N-2).
In some exemplary embodiments, the first overlay module 301 is specifically configured to:
selecting 2 of the video data from the N video data;
according to a preset 1 st superposition window and a 1 st transparency coefficient, superposing video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st superposition video data; wherein, one of the 2 selected video data is used as a 1 st background layer, and the other video data is used as a 1 st foreground layer.
In some exemplary embodiments, the first overlaying module 301 is specifically configured to implement overlaying, according to a preset 1 st overlay window and a 1 st transparency coefficient, video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st overlay video data by using the following methods:
within said 1 st superposition window according to formula R1=A1B1+(1-A1)F1Calculating the 1 st overlay video data;
outside the 1 st overlay window according to formula R1=B1Calculating the 1 st overlay video data;
wherein R is1For said 1 st overlay video data, A1Is the 1 st transparency coefficient, B1For video data as background layer 1, F1As video data for the 1 st foreground layer.
In some exemplary embodiments, the second overlay module 202 is specifically configured to overlay the i-th overlay video data and 1 video data of the remaining (N-i-1) video data to obtain an (i +1) -th overlay video data by using the following manners:
selecting 1 of the video data from the remaining (N-i-1) of the video data;
according to a preset (i +1) th superposition window and a preset (i +1) th transparency coefficient, superposing video data serving as an (i +1) th background layer and video data serving as an (i +1) th foreground layer to obtain (i +1) th superposed video data; wherein one of the ith overlay video data and the selected 1 of the video data is taken as an (i +1) th background layer, and the other is taken as an (i +1) th foreground layer.
In some exemplary embodiments, the second overlay module 302 is specifically configured to overlay the video data as the (i +1) th background layer and the video data as the (i +1) th foreground layer according to the (i +1) th overlay window and the (i +1) th transparency coefficient set in advance to obtain the (i +1) th overlay video data by using the following methods:
within said (i +1) th superposition window according to formula Ri+1=Ai+1Bi+1+(1-Ai+1)Fi+1Calculating the (i +1) th overlay video data;
outside the (i +1) th overlay window according to formula Ri+1=Bi+1Calculating the (i +1) th overlay video data;
wherein R isi+1For the (i +1) th overlay video data, Ai+1Is that it is(i +1) th transparency coefficient, Bi+1For video data as the (i +1) th background layer, Fi+1Is the video data as the (i +1) th foreground layer.
The specific implementation process of the video overlay apparatus is the same as that of the video overlay method in the foregoing embodiment, and is not described herein again.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
at least one processor;
a memory having at least one program stored thereon, which when executed by the at least one processor causes the at least one processor to implement the video overlay method of any one of the above.
Wherein, the processor is a device with data processing capability, which includes but is not limited to a Central Processing Unit (CPU) and the like; memory is a device with data storage capabilities including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), FLASH memory (FLASH).
In some embodiments, the processor, memory, and in turn other components of the computing device are connected to each other by a bus.
In a fourth aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement any one of the above-mentioned video overlay methods.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purposes of limitation. In some instances, features, characteristics and/or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics and/or elements described in connection with other embodiments, unless expressly stated otherwise, as would be apparent to one skilled in the art. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the disclosure as set forth in the appended claims.
Claims (10)
1. A video overlay method comprising:
superposing 2 video data in the N video data to obtain 1 st superposed video data; wherein N is an integer greater than or equal to 2;
overlapping the ith overlapped video data with 1 video data in the remaining (N-i-1) video data to obtain (i +1) th overlapped video data;
when i is an integer which is greater than or equal to 1 and less than or equal to (N-3), adding 1 to i, and continuing to execute the step of superposing the i-th superposed video data and 1 video data in the rest (N-i-1) video data to obtain (i +1) -th superposed video data; outputting the (i +1) th overlay video data in a case where i is equal to (N-2).
2. The video overlay method of claim 1, wherein the overlaying 2 of the N video data to obtain 1 st overlay video data comprises:
selecting 2 of the video data from the N video data;
according to a preset 1 st superposition window and a 1 st transparency coefficient, superposing video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st superposition video data; wherein, one of the 2 selected video data is used as a 1 st background layer, and the other video data is used as a 1 st foreground layer.
3. The video overlapping method according to claim 2, wherein the overlapping the video data as the 1 st background layer and the video data as the 1 st foreground layer according to a preset 1 st overlapping window and a 1 st transparency coefficient to obtain 1 st overlapping video data comprises:
within said 1 st superposition window according to formula R1=A1B1+(1-A1)F1Calculating the 1 st overlay video data;
outside the 1 st overlay window according to formula R1=B1Calculating the 1 st overlay video data;
wherein R is1For said 1 st overlay video data, A1Is the 1 st transparency coefficient, B1For video data as background layer 1, F1As video of the 1 st foreground layerAnd (4) data.
4. The video superimposing method according to claim 1, wherein the superimposing the i-th superimposed video data with 1 video data of the remaining (N-i-1) video data to obtain (i +1) -th superimposed video data includes:
selecting 1 of the video data from the remaining (N-i-1) of the video data;
according to a preset (i +1) th superposition window and a preset (i +1) th transparency coefficient, superposing video data serving as an (i +1) th background layer and video data serving as an (i +1) th foreground layer to obtain (i +1) th superposed video data; wherein one of the ith overlay video data and the selected 1 of the video data is taken as an (i +1) th background layer, and the other is taken as an (i +1) th foreground layer.
5. The video overlapping method according to claim 4, wherein the overlapping the video data as the (i +1) th background layer and the video data as the (i +1) th foreground layer according to a preset (i +1) th overlapping window and a (i +1) th transparency coefficient to obtain (i +1) th overlapping video data comprises:
within said (i +1) th superposition window according to formula Ri+1=Ai+1Bi+1+(1-Ai+1)Fi+1Calculating the (i +1) th overlay video data;
outside the (i +1) th overlay window according to formula Ri+1=Bi+1Calculating the (i +1) th overlay video data;
wherein R isi+1For the (i +1) th overlay video data, Ai+1Is the (i +1) th transparency coefficient, Bi+1For video data as the (i +1) th background layer, Fi+1Is the video data as the (i +1) th foreground layer.
6. A video overlay device comprising:
the first superposition module is used for superposing 2 video data in the N video data to obtain 1 st superposed video data; wherein N is an integer greater than or equal to 2;
a second superimposing module configured to:
overlapping the ith overlapped video data with 1 video data in the remaining (N-i-1) video data to obtain (i +1) th overlapped video data;
when i is an integer which is greater than or equal to 1 and less than or equal to (N-3), adding 1 to i, and continuing to execute the step of superposing the i-th superposed video data and 1 video data in the rest (N-i-1) video data to obtain (i +1) -th superposed video data; outputting the (i +1) th overlay video data in a case where i is equal to (N-2).
7. The apparatus of claim 6, wherein the first overlay module is specifically configured to:
selecting 2 of the video data from the N video data;
according to a preset 1 st superposition window and a 1 st transparency coefficient, superposing video data serving as a 1 st background layer and video data serving as a 1 st foreground layer to obtain 1 st superposition video data; wherein, one of the 2 selected video data is used as a 1 st background layer, and the other video data is used as a 1 st foreground layer.
8. The apparatus according to claim 6, wherein the second overlay module is specifically configured to overlay the i-th overlay video data with 1 video data of the remaining (N-i-1) video data to obtain an (i +1) -th overlay video data by using the following method:
selecting 1 of the video data from the remaining (N-i-1) of the video data;
according to a preset (i +1) th superposition window and a preset (i +1) th transparency coefficient, superposing video data serving as an (i +1) th background layer and video data serving as an (i +1) th foreground layer to obtain (i +1) th superposed video data; wherein one of the ith overlay video data and the selected 1 of the video data is taken as an (i +1) th background layer, and the other is taken as an (i +1) th foreground layer.
9. An electronic device, comprising:
at least one processor;
memory having stored thereon at least one program which, when executed by the at least one processor, causes the at least one processor to implement the video overlay method of any of claims 1-5.
10. A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a video overlay method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110157248.9A CN112860209A (en) | 2021-02-03 | 2021-02-03 | Video overlapping method and device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110157248.9A CN112860209A (en) | 2021-02-03 | 2021-02-03 | Video overlapping method and device, electronic equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112860209A true CN112860209A (en) | 2021-05-28 |
Family
ID=75988723
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110157248.9A Pending CN112860209A (en) | 2021-02-03 | 2021-02-03 | Video overlapping method and device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112860209A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6072537A (en) * | 1997-01-06 | 2000-06-06 | U-R Star Ltd. | Systems for producing personalized video clips |
CN101388979A (en) * | 2007-09-14 | 2009-03-18 | 中兴通讯股份有限公司 | Method for overlapping user interface on video image |
CN103400386A (en) * | 2013-07-30 | 2013-11-20 | 清华大学深圳研究生院 | Interactive image processing method used for video |
CN105046699A (en) * | 2015-07-09 | 2015-11-11 | 硅革科技(北京)有限公司 | Motion video superposition contrast method |
US20170094193A1 (en) * | 2015-09-28 | 2017-03-30 | Gopro, Inc. | Automatic composition of video with dynamic background and composite frames selected based on foreground object criteria |
CN110290425A (en) * | 2019-07-29 | 2019-09-27 | 腾讯科技(深圳)有限公司 | A kind of method for processing video frequency, device and storage medium |
CN111447389A (en) * | 2020-04-22 | 2020-07-24 | 广州酷狗计算机科技有限公司 | Video generation method, device, terminal and storage medium |
CN112235518A (en) * | 2020-10-14 | 2021-01-15 | 天津津航计算技术研究所 | Digital video image fusion and superposition method |
-
2021
- 2021-02-03 CN CN202110157248.9A patent/CN112860209A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6072537A (en) * | 1997-01-06 | 2000-06-06 | U-R Star Ltd. | Systems for producing personalized video clips |
CN101388979A (en) * | 2007-09-14 | 2009-03-18 | 中兴通讯股份有限公司 | Method for overlapping user interface on video image |
CN103400386A (en) * | 2013-07-30 | 2013-11-20 | 清华大学深圳研究生院 | Interactive image processing method used for video |
CN105046699A (en) * | 2015-07-09 | 2015-11-11 | 硅革科技(北京)有限公司 | Motion video superposition contrast method |
US20170094193A1 (en) * | 2015-09-28 | 2017-03-30 | Gopro, Inc. | Automatic composition of video with dynamic background and composite frames selected based on foreground object criteria |
CN110290425A (en) * | 2019-07-29 | 2019-09-27 | 腾讯科技(深圳)有限公司 | A kind of method for processing video frequency, device and storage medium |
CN111447389A (en) * | 2020-04-22 | 2020-07-24 | 广州酷狗计算机科技有限公司 | Video generation method, device, terminal and storage medium |
CN112235518A (en) * | 2020-10-14 | 2021-01-15 | 天津津航计算技术研究所 | Digital video image fusion and superposition method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10825130B2 (en) | Method and apparatus for displaying picture content in application, and storage medium | |
CN109064399B (en) | Image super-resolution reconstruction method and system, computer device and storage medium thereof | |
CN105141827B (en) | Distortion correction method and terminal | |
US20130314428A1 (en) | Image processing apparatus and associated method | |
CN112055244B (en) | Image acquisition method and device, server and electronic equipment | |
CN109218831B (en) | Video playing down webpage processing method, electronic device and computer readable storage medium | |
CN105141826A (en) | Distortion correction method and terminal | |
CN105023285A (en) | Image splitting method and device, image loading method and device | |
CN108230487A (en) | The method and apparatus of shared camera resource | |
CN113436285A (en) | Color space conversion method and device, electronic equipment and readable storage medium | |
CN110443772A (en) | Image processing method, device, computer equipment and storage medium | |
CN112860209A (en) | Video overlapping method and device, electronic equipment and computer readable storage medium | |
EP3306462B1 (en) | Display device, and display signal input system and display signal input method thereof | |
CN104994286B (en) | The method and terminal of a kind of distortion correction | |
CN112115395A (en) | Method and equipment for realizing animation configuration during page routing jump | |
US20150187049A1 (en) | Method and device for image zoom out processing | |
CN114529483A (en) | Data processing method, device, terminal and readable storage medium | |
CN112616083A (en) | Video display layer superposition processing method, device, equipment and storage medium | |
CN113836066A (en) | Equipment serial port configuration method and system, electronic equipment and storage medium | |
CN102842111A (en) | Enlarged image compensation method and device | |
CN112668619A (en) | Image processing method, device, terminal and storage medium | |
WO2020258287A1 (en) | Image correction method, image correction apparatus, and electronic device | |
CN112286423A (en) | Method, system, storage medium and terminal for displaying document | |
CN112115690A (en) | Method, system, storage medium and terminal for selecting area in mobile terminal table | |
US8564603B2 (en) | Apparatus for controlling memory device and related method |
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 | ||
CB02 | Change of applicant information |
Address after: 230088 north, 9th floor, B1 building, animation base, 800 Wangjiang West Road, high tech Zone, Hefei City, Anhui Province Applicant after: Hongjing Microelectronics Technology Co.,Ltd. Address before: 230088 north, 9th floor, B1 building, animation base, 800 Wangjiang West Road, high tech Zone, Hefei City, Anhui Province Applicant before: HEFEI MACROSILICON TECHNOLOGY CO.,LTD. |
|
CB02 | Change of applicant information |