Short video filter overlapping method and system, electronic equipment and readable storage medium

文档序号:1957017 发布日期:2021-12-10 浏览:25次 中文

阅读说明:本技术 短视频滤镜叠加方法、系统、电子设备及可读存储介质 (Short video filter overlapping method and system, electronic equipment and readable storage medium ) 是由 邵泉 杜建平 于 2021-09-17 设计创作,主要内容包括:本发明公开了一种短视频滤镜叠加方法、系统、电子设备及可读存储介质,短视频滤镜叠加方法包括:向直播客户端导入原始短视频;根据颜色查找表进行调色,生成M个滤镜;将原始短视频进行分屏操作,形成第一画面至第N画面;从M个滤镜中选择N个滤镜作为预览滤镜,将N个预览滤镜分别叠加到第一画面至第N画面,形成第一滤镜画面至第N滤镜画面;从第一滤镜画面至第N滤镜画面中选择第L滤镜画面,将第L滤镜画面对应的预览滤镜作为指定滤镜,指定滤镜分别叠加到原始短视频的多帧原始图像上并整合得到滤镜短视频。通过分屏操作,能够同时选择多种滤镜进行显示,更加直观地看到滤镜叠加效果,便于对多种滤镜进行比较。(The invention discloses a short video filter superposition method, a system, electronic equipment and a readable storage medium, wherein the short video filter superposition method comprises the following steps: importing an original short video to a live broadcast client; mixing colors according to the color lookup table to generate M filters; performing screen splitting operation on an original short video to form a first picture to an Nth picture; selecting N filters from the M filters as preview filters, and respectively overlapping the N preview filters to the first picture to the Nth picture to form a first filter picture to an Nth filter picture; and selecting an L-th filter image from the first filter image to the N-th filter image, using a preview filter corresponding to the L-th filter image as an appointed filter, and respectively overlapping the appointed filter on a plurality of frames of original images of the original short video and integrating to obtain the filter short video. Through the operation of dividing the screen, can select multiple filter simultaneously and show, see filter stack effect more directly perceivedly, be convenient for carry out the comparison to multiple filter.)

1. A short video filter superimposing method, comprising:

importing an original short video to a live client, wherein the live client comprises a color lookup table, and the original short video comprises a plurality of frames of original images;

performing color matching according to the color lookup table to generate M filters, wherein M is a positive integer;

performing screen splitting operation on the original short video to form a first picture to an Nth picture, wherein the first picture to the Nth picture are the original short video, N is a positive integer, and N is less than M;

selecting N filters from M filters as preview filters, and respectively overlapping the N preview filters to the first picture to the Nth picture to form a first filter picture to an Nth filter picture;

selecting an L-th filter image from the first filter image to the N-th filter image, using the preview filter corresponding to the L-th filter image as a designated filter, respectively overlapping the designated filter to a plurality of frames of the original images of the original short video, and integrating the plurality of frames of the original images overlapped with the designated filter according to a time sequence to obtain the filter short video, wherein L is a positive integer, and L is not less than 1 and not more than N.

2. The short video filter superimposing method according to claim 1, wherein the toning according to the color lookup table to generate M filters comprises:

and inputting a first color into the color lookup table, and mapping and outputting a second color as the filter.

3. The short video filter superimposing method according to claim 1, wherein said selecting N of said M filters as preview filters comprises:

dividing the M filters into a portrait application filter, a landscape application filter and an article application filter;

the live broadcast client randomly intercepts the original image of the original short video, identifies the original image and judges whether a main body in the original image is a portrait, a landscape or an article;

if the main body is the portrait, the client recommends the portrait application filter, and selects N portrait application filters as the preview filter;

if the main body is the scene, the client recommends the scene application filter, and selects N scene application filters as the preview filter;

and if the main body is the article, the client recommends the article application filter and selects N article application filters as the preview filter.

4. The short video filter superimposing method according to claim 3, wherein if the subject is the portrait and the landscape, the client recommends the portrait application filter and the landscape application filter, and selects N of the portrait application filter and the landscape application filter as the preview filter; if the main body is the scene and the article, the client recommends the scene application filter and the article application filter, and selects N filters from the scene application filter and the article application filter as the preview filter; if the main body is the portrait and the article, the client recommends the portrait application filter and the article application filter, and selects N of the portrait application filter and the article application filter as the preview filter.

5. The short video filter superimposing method according to claim 3, wherein if the subject is the portrait, the landscape, and the article, the client recommends the portrait application filter, the landscape application filter, and the article application filter, and selects N of the portrait application filter, the landscape application filter, and the article application filter as the preview filter.

6. The short video filter superimposing method according to claim 1, wherein the original images of a preset number of frames are displayed in the first to nth pictures.

7. A short video filter overlay system comprising:

the import module is coupled with the filter generation module and used for importing an original short video to a live client, the live client comprises a color lookup table, and the original short video comprises a plurality of frames of original images;

the filter generation module is respectively coupled with the import module and the split screen module and is used for carrying out color matching according to the color lookup table to generate M filters, wherein M is a positive integer;

the screen splitting module is respectively coupled with the filter generation module and the filter preview module and is used for performing screen splitting operation on the original short video to form a first picture to an Nth picture, wherein the first picture to the Nth picture are the original short video, N is a positive integer, and N is less than M;

the filter preview module is respectively coupled with the screen splitting module and the filter superposition module and is used for selecting N filters from M filters as preview filters and respectively superposing the N preview filters to the first picture to the Nth picture to form a first filter picture to an Nth filter picture;

the filter superposition module is coupled with the filter preview module and used for selecting an L-th filter picture from the first filter picture to the N-th filter picture, taking the preview filter corresponding to the L-th filter picture as a specified filter, respectively superposing the specified filter on the original images of the original short video, and integrating the original images superposed with the specified filter according to a time sequence to obtain the filter short video, wherein L is a positive integer, and L is not less than 1 and not more than N.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor when executing the computer program causing the electronic device to implement the short video filter superimposition method of any of claims 1-6.

9. A readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the program code of the short video filter superimposition method of any of claims 1-6.

Technical Field

The present invention relates to the field of information processing technologies, and in particular, to a short video filter superimposing method, system, electronic device, and readable storage medium.

Background

When short videos are uploaded through a platform, people want to be motivated by the short videos, and the mode of adding the filter is often used for changing the color tone to match the audio frequency of the short videos or increasing the atmosphere. In the prior art, the invention patent application with application publication number CN108307088A discloses an image processing method, device, system and storage medium, which determine whether a display lookup table LUT filter corresponding to the filter information can be generated according to the filter information; if yes, an LUT material graph corresponding to the filter information is generated, the LUT filter corresponding to the filter information is generated according to the LUT material graph, the LUT filter is adopted for processing the image, however, the corresponding display lookup table LUT filter generated through the selected corresponding information needs a user to think which filter to adopt first, only one filter effect can be displayed at each time, a plurality of filters cannot be selected simultaneously, and the filter effects are compared, so that the favorite filter is selected and superposed into the video.

Therefore, it is an urgent need to provide a short video filter superimposing method, system, electronic device and readable storage medium.

Disclosure of Invention

In view of the above, the invention provides a short video filter superimposing method, a short video filter superimposing system, an electronic device and a readable storage medium.

On one hand, the short video filter superposition method provided by the invention comprises the following steps:

importing an original short video to a live client, wherein the live client comprises a color lookup table, and the original short video comprises a plurality of frames of original images;

performing color matching according to the color lookup table to generate M filters, wherein M is a positive integer;

performing screen splitting operation on the original short video to form a first picture to an Nth picture, wherein the first picture to the Nth picture are the original short video, N is a positive integer, and N is less than M;

selecting N filters from M filters as preview filters, and respectively overlapping the N preview filters to the first picture to the Nth picture to form a first filter picture to an Nth filter picture;

selecting an L-th filter image from the first filter image to the N-th filter image, using the preview filter corresponding to the L-th filter image as a designated filter, respectively overlapping the designated filter to a plurality of frames of the original images of the original short video, and integrating the plurality of frames of the original images overlapped with the designated filter according to a time sequence to obtain the filter short video, wherein L is a positive integer, and L is not less than 1 and not more than N.

Preferably, the color matching according to the color lookup table to generate M filters includes:

and inputting a first color into the color lookup table, and mapping and outputting a second color as the filter.

Preferably, the selecting N of the M filters as preview filters includes:

dividing the M filters into a portrait application filter, a landscape application filter and an article application filter;

the live broadcast client randomly intercepts the original image of the original short video, identifies the original image and judges whether a main body in the original image is a portrait, a landscape or an article;

if the main body is the portrait, the client recommends the portrait application filter, and selects N portrait application filters as the preview filter;

if the main body is the scene, the client recommends the scene application filter, and selects N scene application filters as the preview filter;

and if the main body is the article, the client recommends the article application filter and selects N article application filters as the preview filter.

Preferably, if the main body is the portrait and the landscape, the client recommends the portrait application filter and the landscape application filter, and selects N of the portrait application filter and the landscape application filter as the preview filter; if the main body is the scene and the article, the client recommends the scene application filter and the article application filter, and selects N filters from the scene application filter and the article application filter as the preview filter; if the main body is the portrait and the article, the client recommends the portrait application filter and the article application filter, and selects N of the portrait application filter and the article application filter as the preview filter.

Preferably, if the main body is the portrait, the scene, and the article, the client recommends the portrait application filter, the scene application filter, and the article application filter, and selects N of the portrait application filter, the scene application filter, and the article application filter as the preview filter.

Preferably, the original images of a preset number of frames are displayed in the first to nth pictures.

In another aspect, the present invention provides a short video filter overlay system, comprising:

the import module is coupled with the filter generation module and used for importing an original short video to a live client, the live client comprises a color lookup table, and the original short video comprises a plurality of frames of original images;

the filter generation module is respectively coupled with the import module and the split screen module and is used for carrying out color matching according to the color lookup table to generate M filters, wherein M is a positive integer;

the screen splitting module is respectively coupled with the filter generation module and the filter preview module and is used for performing screen splitting operation on the original short video to form a first picture to an Nth picture, wherein the first picture to the Nth picture are the original short video, N is a positive integer, and N is less than M;

the filter preview module is respectively coupled with the screen splitting module and the filter superposition module and is used for selecting N filters from M filters as preview filters and respectively superposing the N preview filters to the first picture to the Nth picture to form a first filter picture to an Nth filter picture;

the filter superposition module is coupled with the filter preview module and used for selecting an L-th filter picture from the first filter picture to the N-th filter picture, taking the preview filter corresponding to the L-th filter picture as a specified filter, respectively superposing the specified filter on the original images of the original short video, and integrating the original images superposed with the specified filter according to a time sequence to obtain the filter short video, wherein L is a positive integer, and L is not less than 1 and not more than N.

The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to enable the electronic device to realize the short video filter superposition method.

The invention also provides a readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to execute the program code of the short video filter superimposition method according to any of the above.

Compared with the prior art, the short video filter superposition method, the short video filter superposition system, the electronic equipment and the readable storage medium provided by the invention at least realize the following beneficial effects:

1. according to the short video filter superposition method, the short video filter superposition system, the electronic equipment and the readable storage medium, N preview filters are respectively superposed on the first picture to the Nth picture to form the first filter picture to the Nth filter picture, various filters can be simultaneously selected for displaying, the filter superposition effect can be seen more visually, comparison of various filters is facilitated, and therefore the filter with the best matching short video effect is selected.

2. The short video filter superposition method, the system, the electronic equipment and the readable storage medium provided by the invention are used for color matching according to the color lookup table to generate M filters, and the M filters are provided for selection, so that an idea is provided for selecting the filters, and the trial of various filters is facilitated.

3. The short video filter overlapping method, the short video filter overlapping system, the electronic equipment and the readable storage medium respectively overlap the appointed filters on the multi-frame original images of the original short video, and the multi-frame original images overlapped with the appointed filters are integrated according to the time sequence to obtain the short video of the filters, so that the filter overlapping effect of the short video of the filters is more complete, and the overall effect is smoother.

Of course, it is not necessary for any product in which the present invention is practiced to achieve all of the above-described technical effects simultaneously.

Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.

FIG. 1 is a flow chart of a short video filter overlay method provided by the present invention;

FIG. 2 is a schematic diagram of a short video filter overlay system according to the present invention;

201-an import module, 202-a filter generation module, 203-a screen splitting module, 204-a filter preview module and 205-a filter superposition module.

Detailed Description

Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.

In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.

Fig. 1 is a flowchart of a short video filter superimposing method provided by the present invention, and a specific embodiment of the short video filter superimposing method according to the present invention is described with reference to fig. 1, where the method includes:

s101: importing an original short video to a live client, wherein the live client comprises a color lookup table, and the original short video comprises a plurality of frames of original images;

s102: performing color matching according to the color lookup table to generate M filters, wherein M is a positive integer; the M filters are provided for selection, so that a thought is provided for selection of the filters, and trial of various filters is facilitated.

In S102, the first color is input into the color lookup table, and the second color is mapped and output as a filter.

Specifically, the color lookup table (LUT) includes a plurality of color blocks arranged in an array, and for example, the color lookup table includes 64 color blocks, the 64 color blocks are arranged in an array in 8 rows and 8 columns, and are labeled row by row to obtain the 1 st color block to the 63 rd color block. In the RGB color space, any color is represented as (r, g, b), in general, the value ranges of r, g, b are all [0, 255], in the color lookup table, the value ranges of r, g, b are all [0, 63], when a first color is input, for example, the first color is (r: 32, g: 31, b: 30), according to the value of b, the 30 th color block is found, the left vertex angle of the 30 th color block is taken as the origin, the r value is taken as the horizontal axis, the g value is taken as the vertical axis, the r value is taken as 32, the g value is taken as 31, the corresponding point is found, the color of the corresponding point is the mapping result of the first color, that is, the second color, and the second color is taken as the output.

S103: performing screen splitting operation on the original short video to form a first picture to an Nth picture, wherein the first picture to the Nth picture are the original short video, N is a positive integer, and N is less than M;

in step S103, the original images with the preset number of frames are displayed in the first to nth images, so as to reduce the processing amount of the background during the filter superimposition and reduce the burden of the background while ensuring the split-screen display function.

S104: selecting N filters from the M filters as preview filters, and respectively overlapping the N preview filters to a first picture to an Nth picture to form a first filter picture to an Nth filter picture, wherein multiple filters can be simultaneously selected for display, the overlapping effect of the filters can be more visually seen, the multiple filters can be conveniently compared, and thus the filter with the best matching short video effect can be selected;

in step S104, selecting N filters from the M filters as preview filters includes:

dividing the M filters into a portrait application filter, a landscape application filter and an article application filter;

the method comprises the steps that a live broadcast client randomly intercepts an original image of an original short video, identifies the original image and judges whether a main body in the original image is a portrait, a landscape or an article;

if the main body is a portrait, the client recommends a portrait application filter, and selects N portrait application filters as preview filters;

if the main body is the scene, the client recommends the scene application filter, and selects N scene application filters as preview filters;

if the main body is an article, the client recommends an article application filter, and selects N article application filters as preview filters.

It can be understood that, if the main body is a portrait and a landscape, the client recommends a portrait application filter and a landscape application filter, and selects N of the portrait application filter and the landscape application filter as preview filters; if the main body is scenery and articles, the client recommends scenery application filters and article application filters, and selects N in the scenery application filters and the article application filters as preview filters; and if the main body is a portrait and an article, recommending a portrait application filter and an article application filter by the client, and selecting N of the portrait application filter and the article application filter as preview filters.

Of course, if the main body is a portrait, a landscape and an article, the client recommends a portrait application filter, a landscape application filter and an article application filter, and selects N of the portrait application filter, the landscape application filter and the article application filter as preview filters.

Filter recommendation is carried out by judging the main body, which is beneficial to quickly selecting the filter matched with the short video.

S105: selecting an L-th filter image from the first filter image to the N-th filter image, using a preview filter corresponding to the L-th filter image as an appointed filter, respectively overlapping the appointed filter on multi-frame original images of the original short video, and integrating the multi-frame original images overlapped with the appointed filter according to a time sequence to obtain the filter short video, wherein the filter overlapping effect of the filter short video is more complete, the overall effect is smoother, L is a positive integer, and L is more than or equal to 1 and less than or equal to N.

Fig. 2 is a schematic structural diagram of a short video filter superimposing system provided by the present invention, and a specific embodiment of the short video filter superimposing system according to the present invention is described with reference to fig. 2, which includes:

an importing module 201, coupled to the filter generating module 202, configured to import an original short video to a live client, where the live client includes a color lookup table, and the original short video includes multiple frames of original images;

the filter generation module 202 is coupled with the import module 201 and the split screen module 203 respectively, and is used for mixing colors according to the color lookup table to generate M filters, wherein M is a positive integer, M filters are provided for selection, and a thought is provided for selection of the filters, so that trial of various filters is facilitated.

A screen splitting module 203, which is respectively coupled to the filter generation module 202 and the filter preview module 204, and configured to perform screen splitting on the original short video to form first to nth images, where the first to nth images are all the original short video, N is a positive integer, and N is less than M;

in some embodiments, the value of N ranges from 2 to 9, and if the number of frames exceeds 9, the area occupied by each frame is very small, so that the original short video cannot be seen clearly.

Filter preview module 204, couple with split screen module 203, filter stack module 205 respectively, be used for selecting N filters as the preview filter from M filters, stack first picture to Nth picture respectively with N preview filters, form first filter picture to Nth filter picture, can select multiple filter simultaneously and show, see filter stack effect more directly perceivedly, be convenient for compare multiple filter, thereby select the best filter of short video effect of matching.

And the filter overlapping module 205 is coupled to the filter preview module 204, and configured to select an lth filter picture from the first filter picture to the nth filter picture, use a preview filter corresponding to the lth filter picture as an appointed filter, respectively overlap the appointed filter onto multiple frames of original images of the original short video, and integrate the multiple frames of original images on which the appointed filter is overlapped according to a time sequence to obtain the filter short video, where L is a positive integer, and L is greater than or equal to 1 and less than or equal to N. The filter superposition effect of the short filter video is more complete, and the overall effect is smoother.

The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the computer program to cause the electronic device to implement the short video filter superimposing method according to any one of the above.

The invention also provides a readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to execute the program code of the short video filter overlay method according to any of the above.

It can be seen from the foregoing embodiments that the short video filter superimposing method, system, electronic device, and readable storage medium provided by the present invention at least achieve the following beneficial effects:

1. according to the short video filter superposition method, the short video filter superposition system, the electronic equipment and the readable storage medium, N preview filters are respectively superposed on the first picture to the Nth picture to form the first filter picture to the Nth filter picture, various filters can be simultaneously selected for displaying, the filter superposition effect can be seen more visually, comparison of various filters is facilitated, and therefore the filter with the best matching short video effect is selected.

2. The short video filter superposition method, the system, the electronic equipment and the readable storage medium provided by the invention are used for color matching according to the color lookup table to generate M filters, and the M filters are provided for selection, so that an idea is provided for selecting the filters, and the trial of various filters is facilitated.

3. The short video filter overlapping method, the short video filter overlapping system, the electronic equipment and the readable storage medium respectively overlap the appointed filters on the multi-frame original images of the original short video, and the multi-frame original images overlapped with the appointed filters are integrated according to the time sequence to obtain the short video of the filters, so that the filter overlapping effect of the short video of the filters is more complete, and the overall effect is smoother.

Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustrative purposes only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种直播间流控制方法、装置及云直播服务器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类