Method and system for generating video advertisements

By filtering video data and removing image interference, high-quality video advertisements are created, solving the problem of poor viewing effect of outdoor video advertisements under strong light conditions and improving the viewing experience.

CN119743656BActive Publication Date: 2025-11-07GUANGZHOU MOSI NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411953200.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-11-07
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Outdoor video ads are not viewed well in strong light conditions, affecting the visibility of the ad content.

Method used

By acquiring video data and templates, filtering is performed to remove image interference, including grayscale conversion, edge marker calculation, and association marker calculation, to create high-quality video advertisements.

Benefits of technology

It improved the picture quality of video ads and enhanced the viewing experience of outdoor video ads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743656B_ABST
    Figure CN119743656B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of advertisement generation, and provides a video advertisement generation method and system, wherein the method comprises the following steps: acquiring video data, video requirements and a video template required by the video advertisement; judging whether the video data meets the requirements of an advertiser; performing filtering processing on the video data; storing the filtered video data into the video template; and arranging the filtered video data according to the video requirements to form the video advertisement by the video template. The application can improve the picture quality of the video advertisement, and further improves the viewing effect of outdoor video advertisements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of advertisement generation, and in particular to a video advertisement generation method and a video advertisement generation system. BACKGROUND

[0002] With the development of society, enterprises want to improve brand awareness and create new markets, which will inevitably put a lot of advertising in the streets and alleys. For advertising in indoor or elevator, the light is mostly fixed, so the viewing effect is good, but some advertising put in outdoor, such as bus station, open-air market, etc., when the light is strong, it will affect the viewing effect, resulting in not clear the content of the advertisement. SUMMARY

[0003] The present application relates to the field of advertisement generation, and in particular to a video advertisement generation method and a video advertisement generation system.

[0004] The technical scheme adopted by the present application is as follows:

[0005] A video advertisement generation method comprises the following steps: obtaining video data and a video template required by the video advertisement; determining whether the video data and the video template meet the video requirements of the video advertisement; if so, performing filtering processing on the video data; storing the filtered video data into the video template; and arranging the filtered video data in the video template according to the video requirements to form the video advertisement.

[0006] In an embodiment of the present application, the video requirements include advertising display time, advertising interval time and whether the advertising content is compliant.

[0007] In one embodiment of the present application, the filtering processing of the video data comprises the following steps: obtaining unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; performing grayscale processing on the unprocessed image frame set to obtain a grayscale image frame set corresponding to the unprocessed video data; obtaining each possible image interference in an unprocessed grayscale image according to the grayscale image frame set; obtaining a first variable and a second variable of each possible image interference according to the each possible image interference; obtaining an edge mark of each possible image interference through the first variable and the second variable; obtaining a correlation mark of each possible image interference according to each relevant position and motion direction of the each possible image interference; and performing filtering processing on the unprocessed video data through the edge mark and the correlation mark.

[0008] In one embodiment of the present application, the filtering processing of the unprocessed video data through the edge mark and the correlation mark comprises the following steps: performing data mapping on the edge mark and the correlation mark, and taking the data-mapped results as an edge target value and a correlation target value of each possible image interference, respectively; performing data processing on the edge target value and the correlation target value, and taking the data-processed result as a total target value of each possible image interference; comparing the total target value of each possible image interference with a preset value; and judging whether the possible image interference is an interference point according to the size relationship between the total target value and the preset value, and removing and repairing the interference point.

[0009] In one embodiment of the present application, the video template is arranged according to the video data filtered to form the video advertisement, comprising the following steps: obtaining a code corresponding to the video template; obtaining a video code according to the code and the filtered video data; and modifying parameters in the video code to generate a video advertisement.

[0010] A video advertisement generation system comprises: an obtaining device configured to obtain video data and a video template required by the video advertisement; a judging device configured to judge whether the video data and the video template meet video requirements of the video advertisement; a data processing device configured to perform filtering processing on the video data when the judging device determines that the video data and the video template meet the video requirements of the video advertisement; a storage device configured to store the video data filtered to the video template; and a video generation device configured to arrange the video data filtered to the video template according to the video requirements to form the video advertisement.

[0011] In one embodiment of the present application, the video requirements include advertisement display time, advertisement interval time, and whether the advertisement content is compliant.

[0012] In one embodiment of the present application, the video processing device is specifically configured to: acquire unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; perform grayscale processing on the unprocessed image frame set to obtain a grayscale image frame set corresponding to the unprocessed video data; acquire each possible image interference in an unprocessed grayscale image according to the grayscale image frame set; acquire a first variable and a second variable of each possible image interference according to the each possible image interference; acquire an edge mark of each possible image interference through the first variable and the second variable; acquire a correlation mark of each possible image interference according to each relevant position and motion direction of the each possible image interference; and perform filtering processing on the unprocessed video data through the edge mark and the correlation mark.

[0013] In one embodiment of the present application, the video processing device is specifically configured to: perform data mapping on the edge mark and the correlation mark, and take the data-mapped results as an edge target value and a correlation target value of each possible image interference, respectively; perform data processing on the edge target value and the correlation target value, and take the data-processed result as a total target value of each possible image interference; compare the total target value of each possible image interference with a preset value in terms of size; determine whether the possible image interference is an interference point according to the size relationship between the total target value and the preset value, and remove and repair the interference point.

[0014] In one embodiment of the present application, the video generation device is specifically configured to: acquire an encoding corresponding to the video template; acquire a video code according to the encoding and the filtered video data; and modify a parameter in the video code to generate a video advertisement.

[0015] The present application has the following beneficial effects:

[0016] The present application acquires video data and a video template required by a video advertisement, and determines whether the video data and the video template meet the video requirements of the video advertisement. If yes, the video data is filtered, and the filtered video data is stored in the video template. Finally, the filtered video data in the video template is arranged according to the video requirements to form a video advertisement. Thus, the picture quality of the video advertisement can be improved, and the viewing effect of outdoor video advertisements can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 A flowchart of a video advertisement generation method according to an embodiment of the present application;

[0018] Figure 2 Block schematic diagram of a video advertisement generation system according to an embodiment of the present application. DETAILED DESCRIPTION

[0019] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0020] Figure 1 Flow chart of a video advertisement generation method according to an embodiment of the present application.

[0021] As shown in Figure 1 the video advertisement generation method according to an embodiment of the present application includes the following steps S1-S5:

[0022] S1, obtaining video data and a video template required by a video advertisement.

[0023] In an embodiment of the present application, the required video data can be input through a user input terminal, and a more suitable video template can be selected according to the video data. The video template can include the style of the font in the video, the position of the font, the connection relationship between the video materials, and the music background used by the video advertisement, etc.

[0024] S2, determining whether the video data and the video template meet the video requirements of the video advertisement.

[0025] In an embodiment of the present application, the video requirements can include the display time of the video advertisement, the interval time of the advertisement, whether the advertisement content is compliant, and whether it contains sensitive topics, etc. For example, the client can require the video advertisement to start playing at 9:00 am every day and to be played in a loop with an interval of 5 seconds. The client can first audit the video materials and the video template, and if the audit is qualified, the next step is performed.

[0026] S3, if yes, performing filtering processing on the video data.

[0027] In an embodiment of the present application, the filtering processing on the video data can specifically include the following steps S301-S307:

[0028] S301, obtaining unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data.

[0029] In one embodiment of the present application, since the unprocessed video data is composed of RGB images frame by frame, and the time interval between each frame of RGB images is the same, thus, the unprocessed image frame set corresponding to the unprocessed video data can be obtained according to the unprocessed video data.

[0030] S302, the unprocessed image frame set is processed by gray scale to obtain the gray scale image frame set corresponding to the unprocessed video data.

[0031] In one embodiment of the present application, in order to facilitate the subsequent management of the image frame set, the gray scale image frame set can be arranged and marked accordingly, wherein the value of the mark can be the sequence position of the frame image in the image frame set.

[0032] S303, each possible image interference in the unprocessed gray scale image is obtained according to the gray scale image frame set.

[0033] In one embodiment of the present application, since the image interference is randomly distributed and unpredictable, and will seriously affect the quality of the image, therefore, the possible image interference in the unprocessed gray scale image should be obtained first.

[0034] Specifically, first, the gray scale values of the pixel points in the neighborhood of each pixel point in the unprocessed gray scale image can be obtained, and the gray scale value of the point is compared with the gray scale values of the pixel points in the neighborhood, then the gray scale difference between the point and the pixel points in the neighborhood can be calculated, and the number of the gray scale difference between the point and the pixel points in the neighborhood greater than the preset gray scale difference value can be calculated, finally, the gray scale difference between the point and the pixel points in the neighborhood can be normalized, for example, if the gray scale values of 24 pixel points in the neighborhood of each pixel point in the unprocessed gray scale image are to be obtained, the number of the gray scale difference between the point and the pixel points in the neighborhood greater than the preset value can be divided by 24 for normalization, and the gray scale value deviation degree is recorded, wherein the preset gray scale value can be determined according to the situation.

[0035] Further, for any one pixel point in the unprocessed gray scale image, if the gray scale value deviation degree of the pixel point and the pixel points in the neighborhood of N after normalization is not less than the preset gray scale value deviation degree, and the gray scale value deviation degree of at least one pixel point in the N neighborhood of the pixel point is not less than the preset gray scale value deviation degree, then the pixel point can be a possible image interference.

[0036] Further, if the gray scale value deviation degree of the pixel point is not less than the preset gray scale value deviation degree, and the gray scale value deviation degree of the pixel points in the N neighborhood of the pixel point is not greater than the preset gray scale value deviation degree, then the pixel point can be an interference point.

[0037] Further, if the gray value deviation degree of the pixel point is less than the preset gray value deviation degree, the pixel point can be regarded as a normal pixel point.

[0038] The preset gray value deviation degree can be determined according to actual conditions.

[0039] S304, acquiring the first variable and the second variable of each possible image interference according to each possible image interference.

[0040] Specifically, the Euclidean distance between each possible image interference point in the N*N neighborhood of each possible image interference and each possible image interference point in the N*N neighborhood of the point can be calculated, and the relationship with the first variable can be derived through the Euclidean distance of each pixel point, the gray value of each possible image interference point and the gray value of each possible image interference point in the N*N neighborhood of each possible image interference. In general, the difference of the gray value of the same edge is very small, so when the difference of the gray value between each possible image interference and each possible image interference point in its neighborhood is large, the probability that the possible image interference is a disturbance point is large, and the distance between the possible image interference and the possible image interference point in its neighborhood is also very meaningful. When the Euclidean distance between the possible image interference and the possible image interference point in its neighborhood is smaller, but the difference of the gray value between the possible image interference and the possible image interference in its neighborhood is larger, the probability that the possible image interference is a disturbance point is larger. When the Euclidean distance between the possible image interference and the possible image interference point in its neighborhood is smaller, and the difference of the gray value between the possible image interference and the possible image interference in its neighborhood is smaller, the probability that the possible image interference is a disturbance point is smaller.

[0041] The Euclidean distance between two pixel points can be calculated by the following formula:

[0042]

[0043] Wherein, d is the Euclidean distance between two pixel points, (x1, y1) is the coordinate of one of the pixel points, and (x2, y2) is the coordinate of the other pixel point.

[0044] Further, the region can be divided along the periphery of the possible image interference, and the 360° of the possible image interference is divided into several angles according to fixed degrees, and for the possible image interference points in the same angle, the difference between the gray value of the possible image interference point and the gray value of the possible image interference point in each neighborhood of the possible image interference point in the same angle is taken as an absolute value, and then the absolute values are added as the longitudinal gray in a certain fixed angle, and for the remaining angles, the longitudinal gray in a certain fixed angle of the possible image interference point in the same angle is obtained by using the above method, and finally, the minimum value of the longitudinal gray in all angles and the angle corresponding to the minimum value are taken as the second variable, that is, in general, the difference of the gray value of the pixel points in the same edge is small longitudinally, and compared with the possible image interference point, it is also small, so when the difference of the gray value between each possible image interference and each possible image interference point in the possible image interference neighborhood is larger and larger longitudinally, it can be indicated that the probability of the possible image interference being a disturbance point is larger.

[0045] S305, obtaining the edge mark of each possible image interference by the first variable and the second variable.

[0046] In an embodiment of the present application, since the first variable and the second variable can be used to indicate the probability of the possible image interference being a disturbance point, the first variable and the second variable can be combined to reflect the probability of the possible image interference being a disturbance point, and since the first variable and the second variable are used to indicate the probability of the possible image interference in a nonlinear relationship, the product of the first variable and the second variable can be taken as the edge mark of the possible image interference.

[0047] S306, obtaining the association mark of each possible image interference according to each related position and the motion direction of each possible image interference.

[0048] Specifically, an image can be obtained from the set of unprocessed image frames, and a series of images related to the image are obtained by the image, and are marked as a connected frame set, and for any one to-be-processed gray image in the set of unprocessed image frames, any one possible image noise point in the to-be-processed gray image is taken, and the coordinates (m, n) of the possible image noise point in the gray image are marked, and then the coordinates of the pixel point in the mth row and the nth column of each to-be-processed gray image in the connected frame set can be obtained, which is marked as the related position of the possible image interference, and thus the related position of the possible image interference in the connected frame set can be obtained, and the number of related positions is consistent with the number of images in the connected frame set.

[0049] Further, each of the neighborhood pixel points in the N*N neighborhood of the unprocessed image in the unprocessed image set corresponding to the connection frame set of the unprocessed gray image can be taken as a designated pixel point of the possible image interference of the unprocessed gray image, and the possible image interference is located at the mth row and the nth column of the unprocessed gray image, and the pixel point at the mth row and the nth column in the unprocessed gray image of the neighborhood of the unprocessed gray image also corresponds to the pixel point at the mth row and the nth column of each N*N neighborhood, then the difference between the possible image interference of the unprocessed gray image and the gray value of each designated pixel point corresponding to the possible image interference is taken, and the minimum value of the difference is taken as a standard pixel point, and then the angle between the direction of the pixel point at the mth row and the nth column in the unprocessed gray image in the unprocessed image set of the unprocessed gray image and the horizontal direction can be taken as the motion direction of the possible image interference of the unprocessed gray image.

[0050] Further, since the gray value of the related position corresponding to each possible image interference on each unprocessed gray image and the motion direction of each possible image interference on each unprocessed gray image can be used to represent the probability that the possible image interference is a disturbance point, the related position and the motion direction of each possible image interference can be combined to reflect the probability that the possible image interference is a disturbance point, and since the related position of each possible image interference can affect the motion direction of each possible image interference, the two can be in a linear relationship, so the sum of the related position and the motion direction of the possible image interference can be taken as the association mark of the possible image interference.

[0051] S307, filtering the unprocessed video data by using the edge mark and the association mark.

[0052] In an embodiment of the present application, since the edge mark and the association mark can be used to represent the probability that the possible image interference of the unprocessed gray image is a disturbance point, the unprocessed video data can be filtered by using the edge mark and the association mark. Specifically, the following steps S3071-S3074 can be included:

[0053] S3071, data mapping is performed on the edge mark and the association mark, and the results of the data mapping are taken as the edge target value and the association target value of each possible image interference, respectively.

[0054] S3072, data processing is performed on the edge target value and the association target value, and the result of the data processing is taken as the total target value of each possible image interference.

[0055] S3073, comparing the total target value of each possible image interference with a preset value.

[0056] S3074: Based on the relationship between the total target value and the preset value, determine whether possible image interference is an interference point, and remove and repair the interference points.

[0057] S4 stores the filtered video data into the video template.

[0058] S5 arranges the filtered video data in the video template according to the video requirements to form a video advertisement.

[0059] Specifically, first, the encoding corresponding to the video template can be obtained. Then, the video template and filtered video data can be imported through a Python library. The VideoCapture class of OpenCV can be used to open the filtered video, and the filtered video data can be read frame by frame to obtain the video code. Finally, the parameters in the video code can be modified according to the video requirements to generate a video advertisement. Adobe Premiere Pro can be used to edit the video data according to the video requirements, such as the background music, the timing of adding music, and the layout of the video.

[0060] According to the video advertisement generation method of the present invention, the video data and video template required for the video advertisement are obtained, and it is determined whether the video data and video template meet the video requirements of the video advertisement. If so, the video data is filtered and the filtered video data is stored in the video template. Finally, the filtered video data in the video template is arranged according to the video requirements to form a video advertisement. This improves the picture quality of the video advertisement and enhances the viewing effect of outdoor video advertisements.

[0061] To implement the video advertisement generation method of the above embodiments, the present invention also proposes a video advertisement generation system.

[0062] like Figure 2 As shown, the video advertisement generation system of this invention includes: an acquisition device 100, a judgment device 200, a data processing device 300, a storage device 400, and a video generation device 500. The acquisition device 100 is used to acquire video data and a video template required for the video advertisement; the judgment device 200 is used to determine whether the video data and the video template meet the video requirements of the video advertisement; the data processing device 300 is used to filter the video data when the judgment device determines that the video data and the video template meet the video requirements of the video advertisement; the storage device 400 is used to store the filtered video data in the video template; and the video generation device 500 is used to arrange the filtered video data in the video template according to the video requirements to form the video advertisement.

[0063] In an embodiment of the present application, the acquisition device 100 can input the required video data through the user input terminal, and select a more appropriate video template according to the video data, wherein the video template can include the style of the font in the video, the position of the font, the connection relationship between the video materials, and the music background used by the video advertisement, etc.

[0064] In an embodiment of the present application, the video requirements can include the display time of the video advertisement, the interval time of the advertisement, whether the content of the advertisement is compliant, and whether it contains sensitive topics, etc., for example, the client can require the video advertisement to be played starting at 9:00 am every day, and to be played in a loop with an interval of 5 seconds. Wherein, the client can first review the video materials and the video template, and if the review is qualified, the next step is processed.

[0065] In an embodiment of the present application, when the judgment device 200 determines that the video data and the video template meet the video requirements of the video advertisement, the data processing device 300 performs filtering processing on the video data, which can specifically include:

[0066] S301, obtaining unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data.

[0067] In an embodiment of the present application, since the unprocessed video data is composed of one frame after another of RGB images, and the time interval between each frame of RGB images is the same, thus, the unprocessed image frame set corresponding to the unprocessed video data can be obtained according to the unprocessed video data.

[0068] S302, performing grayscale processing on the unprocessed image frame set to obtain a grayscale image frame set corresponding to the to-be-processed video data.

[0069] In an embodiment of the present application, in order to facilitate the subsequent management of the image frame set, the grayscale image frame set can be arranged and marked accordingly, wherein the value of the mark can be the sequence position of the frame image in the image frame set.

[0070] S303, obtaining each possible image interference in the unprocessed grayscale image according to the grayscale image frame set.

[0071] In an embodiment of the present application, since the image interference is randomly distributed and unpredictable, and can seriously affect the quality of the image, therefore, the possible image interference in the unprocessed grayscale image should be obtained first.

[0072] Specifically, first, the gray value of the pixel point in the vicinity of each pixel point in the unprocessed gray image can be acquired, and the gray value of the point is compared with the gray value of the pixel point in the vicinity, then the gray difference between the point and the pixel point in the vicinity can be calculated, and the number of the gray difference between the point and the pixel point in the vicinity greater than the preset gray difference value can be calculated, finally, the gray difference between the point and the pixel point in the vicinity can be normalized, for example, if the gray value of 24 pixel points in the vicinity of each pixel point in the unprocessed gray image is to be acquired, the number of the gray difference between the point and the pixel point in the vicinity greater than the preset value can be divided by 24 for normalization, denoted as the gray value deviation degree, wherein the preset gray value can be determined according to the situation.

[0073] Further, for any pixel point in the unprocessed gray image, if the normalized gray value deviation degree of the pixel point and the pixel point in the vicinity of N neighborhood is not less than the preset gray value deviation degree, and the gray value deviation degree of at least one pixel point in the N neighborhood of the pixel point is not less than the preset gray value deviation degree, then the pixel point can be represented as a possible image interference.

[0074] Further, if the gray value deviation degree of the pixel point is not less than the preset gray value deviation degree, and the gray value deviation degree of the pixel point in the N neighborhood of the pixel point is not greater than the preset gray value deviation degree, then the pixel point can be represented as an interference point.

[0075] Further, if the gray value deviation degree of the pixel point is less than the preset gray value deviation degree, then the pixel point can be represented as a normal pixel point.

[0076] Wherein, the preset gray value deviation degree can be determined according to the situation.

[0077] S304, according to each possible image interference, the first variable and the second variable of each possible image interference are acquired.

[0078] Specifically, each possible image interference point in the N*N neighborhood of each possible image interference can be taken, the Euclidean distance between each possible image interference point and each possible image interference point in the N*N neighborhood of the point can be calculated, and the relationship with the first variable can be derived through the Euclidean distance of each pixel point and the gray value of each possible image interference point and the gray value of each possible image interference point in the N*N neighborhood of each possible image interference point, that is, in general, the difference of the gray values of the same edge is very small, so when the difference of the gray values between each possible image interference and each possible image interference point in the neighborhood of the possible image interference is large, the probability that the possible image interference is a disturbance point is large, and the distance between the possible image interference and the possible image interference point in the neighborhood is also very meaningful, when the Euclidean distance between the possible image interference and the possible image interference point in the neighborhood is smaller, but the difference of the gray values between the possible image interference and the possible image interference in the neighborhood is larger, the probability that the possible image interference is a disturbance point is larger, when the Euclidean distance between the possible image interference and the possible image interference point in the neighborhood is smaller, and the difference of the gray values between the possible image interference and the possible image interference in the neighborhood is smaller, the probability that the possible image interference is a disturbance point is smaller.

[0079] Wherein, the Euclidean distance between two pixel points can be calculated by the following formula:

[0080]

[0081] Wherein, d is the Euclidean distance between two pixel points, (x1, y1) is the coordinate of one of the pixel points, and (x2, y2) is the coordinate of the other pixel point.

[0082] Further, the region can be divided along the four sides of the possible image interference, and the 360° of the possible image interference can be divided into several angles according to a fixed degree. For the possible image interference points at the same angle, the difference between the gray value of the possible image interference point and the gray value of each neighborhood of the possible image interference point at the same angle can be taken as an absolute value, and then the sum of the multiple absolute values can be taken as the longitudinal gray value at a certain fixed angle. For the remaining multiple angles, the same method can be used to obtain the longitudinal gray value at a certain fixed angle for the possible image interference points at the same angle. Finally, the minimum value of the longitudinal gray values at all angles and the angle corresponding to the minimum value can be taken as the second variable, that is, in general, the difference of the gray values of the pixel points of the same edge in the longitudinal direction is small, and compared with the possible image interference point, it is also small, so when the difference of the gray values between each possible image interference and each possible image interference point in the neighborhood of the possible image interference in the longitudinal direction is larger and larger, the probability that the possible image interference is a disturbance point is larger.

[0083] S305, obtaining an edge mark of each possible image interference by the first variable and the second variable.

[0084] In one embodiment of the present application, since the first variable and the second variable can be used to represent the probability that the possible image interference is a disturbance point, the first variable and the second variable can be combined to reflect the probability that the possible image interference is a disturbance point, and since the first variable and the second variable are used to represent the probability of the possible image interference in a nonlinear relationship, the product of the first variable and the second variable can be used as the edge mark of the possible image interference.

[0085] S306, obtaining a correlation mark of each possible image interference according to each relevant position and motion direction of each possible image interference.

[0086] Specifically, an image can be obtained from the set of unprocessed image frames, and a series of images related to the image can be obtained by the image, and marked as a connected frame set. For any to-be-processed gray image in the set of unprocessed image frames, any possible image noise point in the to-be-processed gray image can be taken, and the coordinates (m, n) of the possible image noise point in the gray image can be marked. Then the coordinates of the pixel point in the mth row and the nth column of each to-be-processed gray image in the connected frame set can be obtained, which can be marked as the relevant position of the possible image interference. Thus, each relevant position of the possible image interference in the connected frame set can be obtained, and the number of relevant positions is consistent with the number of images in the connected frame set.

[0087] Further, each neighborhood pixel point in the N*N neighborhood of the unprocessed image in the connected frame set corresponding to the unprocessed gray image can be taken as a designated pixel point of the possible image interference of the unprocessed gray image, and the possible image interference is located in the mth row and the nth column of the unprocessed gray image. The pixel point in the mth row and the nth column of the neighborhood of the unprocessed gray image in the unprocessed gray image also corresponds to the pixel point in the mth row and the nth column of each N*N neighborhood. Then, the difference between the gray value of the possible image interference of the unprocessed gray image and the gray value of each designated pixel point corresponding to the possible image interference is obtained, and the designated pixel point corresponding to the minimum value in the difference value is taken as a standard pixel point. Then, the angle between the direction of the pixel point in the mth row and the nth column of the unprocessed gray image in the connected frame set of the unprocessed gray image to the standard pixel point and the horizontal direction can be used as the motion direction of the possible image interference of the unprocessed gray image.

[0088] Further, since the gray value of the corresponding relevant position of each possible image interference on each unprocessed gray image and the motion direction of each possible image interference on each unprocessed gray image can be used to represent the probability that the possible image interference is a disturbance point, the relevant position and the motion direction of each possible image interference can be combined to reflect the probability that the possible image interference is a disturbance point. Since the relevant position of each possible image interference can affect the motion direction of each possible image interference, the two can be in a linear relationship, so the sum of the relevant position and the motion direction of the possible image interference can be used as the association mark of the possible image interference.

[0089] S307, filtering the unprocessed video data by using the edge mark and the association mark.

[0090] In an embodiment of the present application, since the edge mark and the association mark can be used to represent the probability that the possible image interference of the unprocessed gray image is a disturbance point, the unprocessed video data can be filtered by using the edge mark and the association mark. Specifically, the filtering can include:

[0091] S3071, performing data mapping on the edge mark and the association mark, and taking the data-mapped results as the edge target value and the association target value of each possible image interference, respectively.

[0092] S3072, performing data processing on the edge target value and the association target value, and taking the data-processed result as the total target value of each possible image interference.

[0093] S3073, comparing the total target value of each possible image interference with a preset value.

[0094] S3074, judging whether the possible image interference is a disturbance point according to the size relationship between the total target value and the preset value, and removing and repairing the disturbance point.

[0095] In an embodiment of the present application, first, the video generation device 500 can obtain the code corresponding to the video template, and then import the video template and the filtered video data by using the Python library. The filtered video can be opened by using the VideoCapture class of OpenCV, and the filtered video data can be read frame by frame to obtain the video code. Finally, the parameters in the video code can be modified according to the video requirements to generate a video advertisement. The video data can be edited according to the video requirements by using Adobe Premiere Pro, such as the music background used, the time when the music is added, and the layout of the video.

[0096] The video advertisement generation system according to the embodiment of the present application can improve the picture quality of the video advertisement, and further improve the viewing effect of the outdoor video advertisement.

[0097] In the description of the present application, the terms "first", "second", "third" and the like are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implying the number of the technical features indicated. Therefore, the features with "first", "second" and "third" can explicitly or implicitly include one or more of the features. The meaning of "plurality" is two or more, unless otherwise specifically limited.

[0098] In the present application, unless otherwise specifically defined and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium; it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0099] In the present application, unless otherwise specifically defined and limited, the first feature is "on" or "under" the second feature, which can be direct contact between the first and second features, or indirect contact between the first and second features through intermediate medium. Moreover, the first feature "above", "above" and "above" the second feature can be directly above or obliquely above the first feature, or only indicate that the horizontal height of the first feature is higher than that of the second feature. The first feature "below", "below" and "below" the second feature can be directly below or obliquely below the first feature, or only indicate that the horizontal height of the first feature is less than that of the second feature.

[0100] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic being described is included in at least one embodiment or example of the present application. The illustrative descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples. Furthermore, the different embodiments or examples described in the specification can be combined and combined with each other in any suitable manner without mutual contradiction.

[0101] Any process or method descriptions or descriptions of the flow diagrams in the flow diagrams or otherwise described herein can be understood as representing the steps of a method, an algorithm or a computer program product in the form of executable instructions, code modules, or portions of code, and the preferred embodiments of the present application include additional implementation involving the use of one or more of the following: functional or structural changes, including the performance of functions according to the involved functions in a substantially simultaneous manner or in reverse order, which should be understood by those skilled in the art of the embodiments of the present application.

[0102] The logic and / or steps represented in the flow diagrams or otherwise described herein, for example, can be considered as a list of executable instructions, code modules, or portions of code, for implementing the logic functions, and the preferred embodiments of the present application include additional implementation involving the use of one or more of the following: functional or structural changes, including the performance of functions according to the involved functions in a substantially simultaneous manner or in reverse order, which should be understood by those skilled in the art of the embodiments of the present application. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electronic apparatus), a portable computer diskette (magnetic apparatus), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, because the program can be electronically obtained, for example, by optical scanning of the paper or other medium, followed by electronic

[0103] It should be understood that parts of the present application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and as in another embodiment, it can be implemented using any or a combination of the following technologies, which are well known in the art: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.

[0104] Those skilled in the art can understand that all or part of the steps carried out by the above-mentioned embodiment methods can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, and when the programs are executed, one or a combination of the steps of the method embodiments is included.

[0105] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can exist physically, or two or more units can be integrated into one module. The above integrated module can be realized in the form of hardware or in the form of a software functional module. The integrated module, if realized in the form of a software functional module and sold or used as an independent product, can also be stored in a computer readable storage medium.

[0106] Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A method of generating a video advertisement, the method comprising: The method comprises the following steps: acquiring video data and a video template required by the video advertisement; judging whether the video data and the video template meet the video requirements of the video advertisement; if yes, performing filtering processing on the video data; storing the filtered video data into the video template; arranging the filtered video data in the video template according to the video requirements to form the video advertisement, the video requirements comprising advertisement display time, advertisement interval time and whether the advertisement content is compliant, the filtering processing on the video data comprising the following steps: acquiring unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; performing grayscale processing on the unprocessed image frame set to obtain a grayscale image frame set corresponding to the unprocessed video data; acquiring each possible image interference in an unprocessed grayscale image according to the grayscale image frame set; acquiring a first variable and a second variable of each possible image interference according to the each possible image interference; acquiring an edge mark of each possible image interference through the first variable and the second variable; acquiring a correlation mark of each possible image interference according to each relevant position and motion direction of the each possible image interference; performing filtering processing on the unprocessed video data through the edge mark and the correlation mark, the filtering processing on the unprocessed video data through the edge mark and the correlation mark comprising the following steps: performing data mapping on the edge mark and the correlation mark, and taking the data-mapped results as an edge target value and a correlation target value of each possible image interference respectively; performing data processing on the edge target value and the correlation target value, and taking the data-processed result as a total target value of each possible image interference; comparing the total target value of each possible image interference with a preset value; judging whether each possible image interference is an interference point according to the size relationship between the total target value and the preset value, and removing and repairing the interference point.

2. The method of claim 1, wherein, The video template arranges the filtered video data according to the video requirements to form the video advertisement, which comprises the following steps: acquiring a code corresponding to the video template; acquiring a video code according to the code and the filtered video data; modifying parameters in the video code to generate the video advertisement.

3. A video advertisement generation system, characterized by, The method comprises the following steps: an acquisition device for acquiring video data and a video template required by the video advertisement; a judgment device for judging whether the video data and the video template meet the video requirements of the video advertisement; a data processing device for performing filtering processing on the video data when the judgment device judges that the video data and the video template meet the video requirements of the video advertisement; a storage device for storing the filtered video data into the video template; a video generation device for arranging the filtered video data in the video template according to the video requirements to form the video advertisement, The video requirements include advertisement display time, advertisement interval time, and whether the advertisement content is compliant, The video processing device is specifically configured to: acquire unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; perform grayscale processing on the unprocessed image frame set to obtain a grayscale image frame set corresponding to processed video data; acquire each possible image interference in an unprocessed grayscale image according to the grayscale image frame set; acquire a first variable and a second variable of each possible image interference according to the each possible image interference; acquire an edge mark of the each possible image interference through the first variable and the second variable; acquire a correlation mark of the each possible image interference according to each relevant position and a motion direction of the each possible image interference; and perform filtering processing on the unprocessed video data through the edge mark and the correlation mark, The video processing device is specifically configured to: perform data mapping on the edge mark and the correlation mark, and take a result of the data mapping as an edge target value and a correlation target value of the each possible image interference respectively; perform data processing on the edge target value and the correlation target value, and take a result of the data processing as a total target value of the each possible image interference; compare a size relationship between the total target value and a preset value; determine whether the possible image interference is an interference point according to the size relationship between the total target value and the preset value, and remove and repair the interference point.

4. The video advertisement generation system of claim 3, wherein, The video generation device is specifically configured to: acquire an encoding corresponding to the video template; acquire a video code according to the encoding and the filtered video data; modify parameters in the video code to generate a video advertisement.

Citation Information

Patent Citations

  • Video advertisement generation method, device and equipment and storage medium

    CN111327927A

  • KR1019136230000B1