Video advertisement generation method and system

By filtering the video data of outdoor video advertisements, image interference is removed and picture quality is improved, the problem of poor viewing effect of outdoor video advertisements when the light is strong, and the effect of improving viewing effect is achieved.

CN119743656AActive Publication Date: 2025-04-01GUANGZHOU MOSI NETWORK TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Outdoor video ads are not visible clearly due to poor viewing results when the light is strong.

Method used

By obtaining the video data and video templates required for video advertisements, we can determine whether they meet the video requirements of video advertisements. If so, the video data will be filtered to remove image interference, improve picture quality, and arrange the filtered video data in the video template according to the video requirements to form a video advertisement.

Benefits of technology

Improve the picture quality of video advertisements and improve the viewing effect of outdoor video advertisements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743656A_ABST
    Figure CN119743656A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of advertisement generation, and provides a video advertisement generation method and system, and the method comprises the following steps: obtaining video data, video requirements and a video template required by a video advertisement; judging whether the video data meets the requirements of advertisers or not; carrying out filtering processing on the video data; storing the filtered video data into the video template; and the video template arranges the filtered video data according to the video requirements to form the video advertisement. The picture quality of the video advertisement can be improved, and the watching effect of the outdoor video advertisement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of advertisement generation, and in particular to a method for generating a video advertisement and a system for generating a video advertisement. Background Art

[0002] With the development of society, companies want to increase brand awareness and create new markets, and they will inevitably place a large number of advertisements on the streets. For advertisements placed indoors or in elevators, the viewing effect is good because the light is mostly fixed. However, for some advertisements placed outdoors, such as bus stations and open-air shopping malls, the viewing effect will be affected when the light is strong, resulting in unclear viewing of the content of the advertisement. Summary of the invention

[0003] The inventor of the present invention has found through research that under the influence of light, the viewing effect of a video depends not only on the light intensity and viewing angle, but also on the quality of the video image itself. In view of the fact that light intensity and viewing angle are external and objective factors, the present invention provides a method and system for generating video advertisements to solve the above technical problems, which can improve the image quality of video advertisements and thus enhance the viewing effect of outdoor video advertisements.

[0004] The technical solution adopted by the present invention is as follows: A method for generating a video advertisement comprises the following steps: obtaining video data and a video template required for the video advertisement; determining whether the video data and the video template meet the video requirements of the video advertisement; if so, filtering the video data; storing the filtered video data in the video template; and arranging the filtered video data in the video template according to the video requirements to form the video advertisement.

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

[0006] In one embodiment of the present invention, the filtering processing of the video data includes the following steps: obtaining unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; gray-scaling the unprocessed image frame set to obtain a grayscale image frame set corresponding to the video data to be processed; obtaining each possible image interference in the 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 each possible image interference; obtaining an edge mark of each possible image interference through the first variable and the second variable; obtaining an association mark of each possible image interference according to each relevant position and motion orientation of each possible image interference; filtering the unprocessed video data through the edge mark and the association mark.

[0007] In one embodiment of the present invention, the filtering processing of the unprocessed video data by the edge mark and the association mark includes the following steps: data mapping the edge mark and the association mark, and using the results of the data mapping as the edge target value and the association target value of each possible image interference; data processing the edge target value and the association target value, and using the result of the data processing as the total target value of each possible image interference; comparing the total target value of each possible image interference with a preset value; judging whether the possible image interference is an interference point based on the size relationship between the total target value and the preset value, and removing and repairing the interference point.

[0008] In one embodiment of the present invention, the video template arranges the filtered video data according to the video requirements to form the video advertisement, including the following steps: obtaining the encoding corresponding to the video template; obtaining the video code according to the encoded and filtered video data; and modifying the parameters in the video code to generate a video advertisement.

[0009] A system for generating video advertisements, comprising: an acquisition device, the acquisition device is used to acquire video data and video templates required for the video advertisement; a judgment device, the judgment device is used to judge whether the video data and video template meet the video requirements of the video advertisement; a data processing device, the data processing device is used to filter the video data when the judgment device determines that the video data and video template meet the video requirements of the video advertisement; a storage device, the storage device is used to store the filtered video data in the video template; and a video generation device, the video generation device is used to arrange the filtered video data in the video template according to the video requirements to form the video advertisement.

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

[0011] In one embodiment of the present invention, the video processing device is specifically used to: obtain unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; grayscale the unprocessed image frame set to obtain a grayscale image frame set corresponding to the video data to be processed; obtain each possible image interference in the unprocessed grayscale image according to the grayscale image frame set; obtain a first variable and a second variable of each possible image interference according to each possible image interference; obtain an edge mark of each possible image interference through the first variable and the second variable; obtain an association mark of each possible image interference according to each relevant position and motion orientation of each possible image interference; and filter the unprocessed video data through the edge mark and the association mark.

[0012] In one embodiment of the present invention, the video processing device is specifically used to: perform data mapping on the edge mark and the associated mark, and use the results of the data mapping as the edge target value and the associated target value of each possible image interference; perform data processing on the edge target value and the associated target value, and use the result of the data processing as the total target value of each possible image interference; compare the total target value of each possible image interference with a preset value; determine whether the possible image interference is an interference point based on the size relationship between the total target value and the preset value, and remove and repair the interference point.

[0013] In one embodiment of the present invention, the video generating device is specifically used for: obtaining the code corresponding to the video template; obtaining the video code according to the video data after the encoding and filtering; and modifying the parameters in the video code to generate a video advertisement.

[0014] Beneficial effects of the present invention: The present invention obtains the video data and video template required for the video advertisement, and determines whether the video data and the video template meet the video requirements of the video advertisement. If so, the video data is filtered and 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. In this way, the picture quality of the video advertisement can be improved, thereby improving the viewing effect of the outdoor video advertisement. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flowchart of a method for generating a video advertisement according to an embodiment of the present invention; Figure 2A block diagram of a system for generating video advertisements according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0017] Figure 1 The present invention is a flowchart of a method for generating a video advertisement according to an embodiment of the present invention.

[0018] like Figure 1 As shown, the method for generating a video advertisement according to an embodiment of the present invention includes the following steps S1 to S5: S1, obtaining video data and video template required for video advertisement.

[0019] In one embodiment of the present invention, the required video data can be input through the user input terminal, and a more appropriate video template can be selected based on the video data, wherein the video template can include the style of the fonts in the video, the position of the fonts, the connection relationship between the video materials, and the background music used in the video advertisement, etc.

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

[0021] In one embodiment of the present invention, the video requirements may include the display time of the video advertisement, the interval between advertisements, whether the advertisement content is compliant, whether it contains sensitive topics, etc. For example, the client may require that the video advertisement be played at 9 am every day and played in a loop every 5 seconds. The client may first review the video material and video template, and if the review is qualified, proceed to the next step.

[0022] S3: If yes, filter the video data.

[0023] In one embodiment of the present invention, filtering the video data may include the following steps S301 to S307: S301, obtaining unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data.

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

[0025] S302, grayscale processing is performed on the unprocessed image frame set to obtain a grayscale image frame set corresponding to the video data to be processed.

[0026] In one embodiment of the present invention, to facilitate the subsequent management of the image frame set, the grayscale image frame set may be arranged and marked accordingly, wherein the value of the mark may be the sequential position of the frame image in the image frame set.

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

[0028] In one embodiment of the present invention, since image interference is randomly distributed, unpredictable, and will seriously affect the quality of the image, the possible image interference in the unprocessed grayscale image should be obtained first.

[0029] Specifically, first, the grayscale values ​​of the pixels in the nearby neighborhood of each pixel in the unprocessed grayscale image can be obtained, and the grayscale value of the point can be compared with the grayscale values ​​of the pixels in the nearby neighborhood. Then, the grayscale difference between the point and the pixels in the nearby neighborhood can be calculated, and the number of grayscale differences between the point and the pixels in the nearby neighborhood that are greater than a preset value of the grayscale difference can be calculated. Finally, the grayscale difference between the point and the pixels in the nearby neighborhood can be normalized. For example, if the grayscale values ​​of 24 neighborhood pixels of each pixel in the unprocessed grayscale image are to be obtained, the number of grayscale differences between the point and the pixels in the nearby neighborhood that are greater than a preset value can be divided by 24 for normalization, which is recorded as the grayscale value deviation, where the preset value of the grayscale value can be determined depending on the situation.

[0030] Furthermore, for any pixel in the unprocessed grayscale image, if the grayscale value deviation after normalization of the grayscale difference between the pixel and the pixels in the nearby N neighborhoods is not less than the grayscale value deviation preset value, and the grayscale value deviation of at least one pixel in the N neighborhoods of the pixel is not less than the grayscale value deviation preset value, then it can be indicated that the pixel is a possible image interference.

[0031] Furthermore, if the grayscale value deviation of the pixel is not less than the grayscale value deviation preset value, and the grayscale value deviation values ​​of the pixels in the N neighborhood of the pixel are not greater than the grayscale value deviation preset value, it can be indicated that the pixel may be an interference point.

[0032] Furthermore, if the grayscale value deviation of the pixel is less than a preset grayscale value deviation value, it can be indicated that the pixel is a normal pixel.

[0033] The gray value deviation preset value may be determined according to the actual situation.

[0034] S304: Obtain a first variable and a second variable of each possible image interference according to each possible image interference.

[0035] Specifically, each possible image interference point in the N*N neighborhood of each possible image interference can be taken, and 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 deduced through the Euclidean distance of each pixel point and the grayscale value of each possible image interference point and the grayscale value of each possible image interference point in the N*N neighborhood of each possible image interference. That is, in general, the difference in grayscale value of the same edge is very small, so when the difference in grayscale value between each possible image interference and each possible image interference point in its neighborhood is large, it can be said that the possible image interference is The probability that the possible image interference is an interference point is relatively large, and the distance between the possible image interference and the possible image interference points in its neighborhood is also very meaningful for reference. When the Euclidean distance between the possible image interference and the possible image interference points in its neighborhood is smaller, but the grayscale value difference between the possible image interference and the possible image interference in its neighborhood is larger, it can be said that the probability that the possible image interference is an interference point is relatively large. When the Euclidean distance between the possible image interference and the possible image interference points in its neighborhood is smaller, and the grayscale value difference between the possible image interference and the possible image interference in its neighborhood is smaller, it can be said that the probability that the possible image interference is an interference point is smaller.

[0036] Among them, the Euclidean distance between two pixels can be calculated by the following formula:

[0037] Among them, d is the Euclidean distance between two pixels, (x1, y1) is the coordinate of one pixel, and (x2, y2) is the coordinate of the other pixel.

[0038] Further, the area 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 fixed degrees. For the possible image interference point at the same angle, the difference between the grayscale value of the possible image interference point and the grayscale value of the possible image interference point in each neighborhood of the possible image interference point at the same angle can be taken as the absolute value first, and then the multiple absolute values ​​can be added as the longitudinal grayscale at a certain fixed angle. For the remaining multiple angles, for the possible image interference point at the same angle, the longitudinal grayscale at a certain fixed angle can be obtained in the above manner. Finally, the minimum value of the longitudinal grayscale at all angles and the angle corresponding to the minimum value can be taken as the second variable, that is, in general, the longitudinal difference of the grayscale value of the pixel points on the same edge is small, and is also small compared with the possible image interference point. Therefore, when the longitudinal difference of the grayscale value between each possible image interference and each possible image interference point in the possible image interference neighborhood becomes larger and larger, it can be indicated that the probability of the possible image interference being an interference point is large.

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

[0040] In one embodiment of the present invention, since both the first variable and the second variable can be used to represent the probability that the possible image interference is an interference point, the first variable and the second variable can be combined to reflect the probability that the possible image interference is an interference point. 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 an edge marker for the possible image interference.

[0041] S306: Acquire an associated flag of each possible image interference according to each relevant position and movement orientation of each possible image interference.

[0042] Specifically, an image can be obtained arbitrarily in the unprocessed image frame set, and a series of images related to this image can be obtained through this image, and recorded as a wired frame set. For any grayscale image to be processed in the unprocessed image frame set, any possible image noise point in the grayscale image to be processed can be taken, and its coordinates (m, n) in the grayscale image can be marked, so the coordinates of the pixel point in the mth row and nth column on each grayscale image to be processed in the wired frame set can be obtained, which can be recorded here as the relevant position of the possible image interference. Thus, each relevant position of the possible image interference in the wired frame set can be obtained, and the number of relevant positions is consistent with the number of images in the wired frame set.

[0043] Furthermore, each neighborhood pixel point in the N*N neighborhood of the unprocessed image in the connected frame set corresponding to the unprocessed grayscale image can be taken as the designated pixel point of the possible image interference of the unprocessed grayscale image, and the possible image interference is located in the mth row and nth column on the unprocessed grayscale image, and the pixel point in the mth row and nth column of the unprocessed grayscale image in the neighborhood of the unprocessed grayscale image also corresponds to the pixel point in the mth row and nth column of each N*N neighborhood, and then the grayscale value of each designated pixel point corresponding to the possible image interference of the unprocessed grayscale image is subtracted from the grayscale value of each designated pixel point corresponding to the possible image interference, and the designated pixel point corresponding to the minimum value of the difference can be taken as the standard pixel point, and then the angle between the direction from the pixel point in the mth row and nth column of the unprocessed grayscale image in the connected frame set of the unprocessed grayscale image to the standard pixel point and the horizontal direction can be taken as the moving direction of the possible image interference of the unprocessed grayscale image.

[0044] Furthermore, since the grayscale value of the relevant position corresponding to each possible image interference on each unprocessed grayscale image and the motion direction of each possible image interference on each unprocessed grayscale image can be used to represent the probability that the possible image interference is an interference point, the relevant position and motion direction of each possible image interference can be combined to reflect the probability that the possible image interference is an interference point. Because 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. Therefore, the sum of the relevant position and motion direction of the possible image interference can be used as an associated mark of the possible image interference.

[0045] S307, filtering the unprocessed video data using the edge flag and the association flag.

[0046] In one embodiment of the present invention, since both the edge mark and the association mark can be used to indicate the probability of the possible image interference of the unprocessed grayscale image being an interference point, the unprocessed video data can be filtered by the edge mark and the association mark. Specifically, the following steps S3071~S3074 may be included: S3071, data mapping is performed on the edge flag and the association flag, and the results after the data mapping are used as the edge target value and the association target value of each possible image interference.

[0047] S3072, performing data processing on the edge target value and the associated target value, and using the result of the data processing as the total target value of each possible image interference.

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

[0049] S3074: Determine whether the possible image interference is an interference point based on the size relationship between the total target value and the preset value, and remove and repair the interference point.

[0050] S4, storing the filtered video data into the video template.

[0051] S5, arranging the filtered video data in the video template according to the video requirement to form a video advertisement.

[0052] Specifically, first, the code corresponding to the video template can be obtained, and then the video template and the filtered video data can be imported through the Python library, wherein 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, and finally, the parameters in the video code can be modified according to the video requirements to generate a video advertisement, wherein Adobe Premiere Pro can be used to edit the video data according to the video requirements, such as the background music used, the time to add music, and the layout of the video.

[0053] According to the method for generating video advertisements in an embodiment of the present invention, the video data and video templates required for the video advertisements are obtained, and it is determined whether the video data and the video templates meet the video requirements of the video advertisements. 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. In this way, the picture quality of the video advertisements can be improved, thereby improving the viewing effect of outdoor video advertisements.

[0054] In order to implement the method for generating a video advertisement in the above embodiment, the present invention also provides a system for generating a video advertisement.

[0055] like Figure 2 As shown, the video advertisement generation system of the embodiment of the present 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, wherein the acquisition device 100 is used to acquire the video data and video template required for the video advertisement; the judgment device 200 is used to judge 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; 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.

[0056] In one embodiment of the present invention, the acquisition device 100 can input the required video data through the user input terminal, and select a more appropriate video template based on the video data, wherein the video template may include the font style in the video, the position of the font, the connection relationship between the video materials, and the background music used in the video advertisement, etc.

[0057] In one embodiment of the present invention, the video requirements may include the display time of the video advertisement, the interval between advertisements, whether the advertisement content is compliant, whether it contains sensitive topics, etc. For example, the client may require that the video advertisement be played at 9 am every day and played in a loop every 5 seconds. The client may first review the video material and video template, and if the review is qualified, proceed to the next step.

[0058] In one embodiment of the present invention, when the judging 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 may specifically include: S301, obtaining unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data.

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

[0060] S302, grayscale processing is performed on the unprocessed image frame set to obtain a grayscale image frame set corresponding to the video data to be processed.

[0061] In one embodiment of the present invention, to facilitate the subsequent management of the image frame set, the grayscale image frame set may be arranged and marked accordingly, wherein the value of the mark may be the sequential position of the frame image in the image frame set.

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

[0063] In one embodiment of the present invention, since image interference is randomly distributed, unpredictable, and will seriously affect the quality of the image, the possible image interference in the unprocessed grayscale image should be obtained first.

[0064] Specifically, first, the grayscale values ​​of the pixels in the nearby neighborhood of each pixel in the unprocessed grayscale image can be obtained, and the grayscale value of the point can be compared with the grayscale values ​​of the pixels in the nearby neighborhood. Then, the grayscale difference between the point and the pixels in the nearby neighborhood can be calculated, and the number of grayscale differences between the point and the pixels in the nearby neighborhood that are greater than a preset value of the grayscale difference can be calculated. Finally, the grayscale difference between the point and the pixels in the nearby neighborhood can be normalized. For example, if the grayscale values ​​of 24 neighborhood pixels of each pixel in the unprocessed grayscale image are to be obtained, the number of grayscale differences between the point and the pixels in the nearby neighborhood that are greater than a preset value can be divided by 24 for normalization, which is recorded as the grayscale value deviation, where the preset value of the grayscale value can be determined depending on the situation.

[0065] Furthermore, for any pixel in the unprocessed grayscale image, if the grayscale value deviation after normalization of the grayscale difference between the pixel and the pixels in the nearby N neighborhoods is not less than the grayscale value deviation preset value, and the grayscale value deviation of at least one pixel in the N neighborhoods of the pixel is not less than the grayscale value deviation preset value, then it can be indicated that the pixel is a possible image interference.

[0066] Furthermore, if the grayscale value deviation of the pixel is not less than the grayscale value deviation preset value, and the grayscale value deviation values ​​of the pixels in the N neighborhood of the pixel are not greater than the grayscale value deviation preset value, it can be indicated that the pixel may be an interference point.

[0067] Furthermore, if the grayscale value deviation of the pixel is less than a preset grayscale value deviation value, it can be indicated that the pixel is a normal pixel.

[0068] The gray value deviation preset value may be determined according to the actual situation.

[0069] S304: Obtain a first variable and a second variable of each possible image interference according to each possible image interference.

[0070] Specifically, each possible image interference point in the N*N neighborhood of each possible image interference can be taken, and 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 deduced through the Euclidean distance of each pixel point and the grayscale value of each possible image interference point and the grayscale value of each possible image interference point in the N*N neighborhood of each possible image interference. That is, in general, the difference in grayscale value of the same edge is very small, so when the difference in grayscale value between each possible image interference and each possible image interference point in its neighborhood is large, it can be said that the possible image interference is The probability that the possible image interference is an interference point is relatively large, and the distance between the possible image interference and the possible image interference points in its neighborhood is also very meaningful for reference. When the Euclidean distance between the possible image interference and the possible image interference points in its neighborhood is smaller, but the grayscale value difference between the possible image interference and the possible image interference in its neighborhood is larger, it can be said that the probability that the possible image interference is an interference point is relatively large. When the Euclidean distance between the possible image interference and the possible image interference points in its neighborhood is smaller, and the grayscale value difference between the possible image interference and the possible image interference in its neighborhood is smaller, it can be said that the probability that the possible image interference is an interference point is smaller.

[0071] Among them, the Euclidean distance between two pixels can be calculated by the following formula:

[0072] Among them, d is the Euclidean distance between two pixels, (x1, y1) is the coordinate of one pixel, and (x2, y2) is the coordinate of the other pixel.

[0073] Further, the area 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 fixed degrees. For the possible image interference point at the same angle, the difference between the grayscale value of the possible image interference point and the grayscale value of the possible image interference point in each neighborhood of the possible image interference point at the same angle can be taken as the absolute value first, and then the multiple absolute values ​​can be added as the longitudinal grayscale at a certain fixed angle. For the remaining multiple angles, for the possible image interference point at the same angle, the longitudinal grayscale at a certain fixed angle can be obtained in the above manner. Finally, the minimum value of the longitudinal grayscale at all angles and the angle corresponding to the minimum value can be taken as the second variable, that is, in general, the longitudinal difference of the grayscale value of the pixel points on the same edge is small, and is also small compared with the possible image interference point. Therefore, when the longitudinal difference of the grayscale value between each possible image interference and each possible image interference point in the possible image interference neighborhood becomes larger and larger, it can be indicated that the probability of the possible image interference being an interference point is large.

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

[0075] In one embodiment of the present invention, since both the first variable and the second variable can be used to represent the probability that the possible image interference is an interference point, the first variable and the second variable can be combined to reflect the probability that the possible image interference is an interference point. 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 an edge marker for the possible image interference.

[0076] S306: Acquire an associated flag of each possible image interference according to each relevant position and movement orientation of each possible image interference.

[0077] Specifically, an image can be obtained arbitrarily in the unprocessed image frame set, and a series of images related to this image can be obtained through this image, and recorded as a wired frame set. For any grayscale image to be processed in the unprocessed image frame set, any possible image noise point in the grayscale image to be processed can be taken, and its coordinates (m, n) in the grayscale image can be marked, so the coordinates of the pixel point in the mth row and nth column on each grayscale image to be processed in the wired frame set can be obtained, which can be recorded here as the relevant position of the possible image interference. Thus, each relevant position of the possible image interference in the wired frame set can be obtained, and the number of relevant positions is consistent with the number of images in the wired frame set.

[0078] Furthermore, each neighborhood pixel point in the N*N neighborhood of the unprocessed image in the connected frame set corresponding to the unprocessed grayscale image can be taken as the designated pixel point of the possible image interference of the unprocessed grayscale image, and the possible image interference is located in the mth row and nth column on the unprocessed grayscale image, and the pixel point in the mth row and nth column of the unprocessed grayscale image in the neighborhood of the unprocessed grayscale image also corresponds to the pixel point in the mth row and nth column of each N*N neighborhood, and then the grayscale value of each designated pixel point corresponding to the possible image interference of the unprocessed grayscale image is subtracted from the grayscale value of each designated pixel point corresponding to the possible image interference, and the designated pixel point corresponding to the minimum value of the difference can be taken as the standard pixel point, and then the angle between the direction from the pixel point in the mth row and nth column of the unprocessed grayscale image in the connected frame set of the unprocessed grayscale image to the standard pixel point and the horizontal direction can be taken as the moving direction of the possible image interference of the unprocessed grayscale image.

[0079] Furthermore, since the grayscale value of the relevant position corresponding to each possible image interference on each unprocessed grayscale image and the motion direction of each possible image interference on each unprocessed grayscale image can be used to represent the probability that the possible image interference is an interference point, the relevant position and motion direction of each possible image interference can be combined to reflect the probability that the possible image interference is an interference point. Because 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. Therefore, the sum of the relevant position and motion direction of the possible image interference can be used as an associated mark of the possible image interference.

[0080] S307, filtering the unprocessed video data using the edge flag and the association flag.

[0081] In one embodiment of the present invention, since both the edge mark and the association mark can be used to indicate the probability of the possible image interference of the unprocessed grayscale image being an interference point, the unprocessed video data can be filtered by the edge mark and the association mark. Specifically, it may include: S3071, data mapping is performed on the edge flag and the association flag, and the results after the data mapping are used as the edge target value and the association target value of each possible image interference.

[0082] S3072, performing data processing on the edge target value and the associated target value, and using the result of the data processing as the total target value of each possible image interference.

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

[0084] S3074: Determine whether the possible image interference is an interference point based on the size relationship between the total target value and the preset value, and remove and repair the interference point.

[0085] In one embodiment of the present invention, first, the video generating device 500 can obtain the code corresponding to the video template, and then import the video template and the filtered video data through the Python library, wherein 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, and finally, the parameters in the video code can be modified according to the video requirements to generate a video advertisement, wherein the video data can be edited according to the video requirements through Adobe Premiere Pro, such as the background music used, the time to add music, and the layout of the video.

[0086] According to the video advertisement generation system of the embodiment of the present invention, the video data and video template required for the video advertisement are obtained by an acquisition device, and whether the video data and video template meet the video requirements of the video advertisement is determined by a judgment device. If so, the data processing device filters the video data, and stores the filtered video data in the video template through a storage device. Finally, the video generation device arranges the filtered video data in the video template according to the video requirements to form a video advertisement. In this way, the picture quality of the video advertisement can be improved, thereby improving the viewing effect of the outdoor video advertisement.

[0087] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0088] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0089] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0090] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0091] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0092] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0093] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0094] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0095] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0096] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for generating a video advertisement, characterized in that: The following steps are involved: Acquire video data and video template required for the video advertisement; Determining whether the video data and the video template meet the video requirements of the video advertisement; If yes, filtering the video data; Storing the filtered video data in the video template; The filtered video data in the video template is arranged according to the video requirement to form the video advertisement.

2. The method for generating a video advertisement according to claim 1, characterized in that: The video requirements include ad display time, ad interval time, and whether the ad content is compliant.

3. The method for generating a video advertisement according to claim 2, characterized in that: The filtering process of the video data comprises the following steps: Acquire unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; grayscale the unprocessed image frame set to obtain a grayscale image frame set corresponding to the video data to be processed; Acquire each possible image interference in the 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 each possible image interference; Obtaining an edge mark of each possible image interference through the first variable and the second variable; Acquire an associated flag of each possible image interference according to each relevant position and movement orientation of each possible image interference; The unprocessed video data is filtered using the edge flag and the association flag.

4. The method for generating a video advertisement according to claim 3, characterized in that: The filtering process of the unprocessed video data by using the edge mark and the association mark comprises the following steps: Performing data mapping on the edge mark and the association mark, and using the results of the data mapping as the edge target value and the association target value of each possible image interference; Performing data processing on the edge target value and the associated target value, and using the result of the data processing as the total target value of each possible image interference; Comparing the total target value of each possible image interference with the preset value; Whether the possible image interference is an interference point is determined according to the magnitude relationship between the total target value and the preset value, and the interference point is removed and repaired.

5. The method for generating a video advertisement according to claim 4, characterized in that: The video template arranges the filtered video data according to the video requirements to form the video advertisement, including the following steps: Obtaining the code corresponding to the video template; Acquire a video code according to the video data after the encoding and filtering process; The parameters in the video code are modified to generate a video advertisement.

6. A system for generating video advertisements, characterized in that: include: An acquisition device, the acquisition device is used to acquire the video data and video template required for the video advertisement; A judging device, the judging device is used to judge whether the video data and the video template meet the video requirements of the video advertisement; a data processing device, the data processing device being used for filtering 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, the storage device is used to store the filtered video data in the video template; A video generating device is used to arrange the filtered video data in the video template according to the video requirements to form the video advertisement.

7. The video advertisement generation system according to claim 6, characterized in that: The video requirements include ad display time, ad interval time, and whether the ad content is compliant.

8. The video advertisement generation system according to claim 7, characterized in that: The video processing device is specifically used for: Acquire unprocessed video data and an unprocessed image frame set corresponding to the unprocessed video data; grayscale the unprocessed image frame set to obtain a grayscale image frame set corresponding to the video data to be processed; Acquire each possible image interference in the 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 each possible image interference; Obtaining an edge mark of each possible image interference through the first variable and the second variable; Acquire an associated flag of each possible image interference according to each relevant position and movement orientation of each possible image interference; The unprocessed video data is filtered using the edge flag and the association flag.

9. The video advertisement generating device according to claim 8, characterized in that: The video processing device is specifically used for: Performing data mapping on the edge mark and the association mark, and using the results of the data mapping as the edge target value and the association target value of each possible image interference; Performing data processing on the edge target value and the associated target value, and using the result of the data processing as the total target value of each possible image interference; Comparing the total target value of each possible image interference with the preset value; Whether the possible image interference is an interference point is determined according to the magnitude relationship between the total target value and the preset value, and the interference point is removed and repaired.

10. The video advertisement generation system according to claim 9, characterized in that: The video generating device is specifically used for: Obtaining the code corresponding to the video template; Acquire a video code according to the video data after the encoding and filtering process; The parameters in the video code are modified to generate a video advertisement.

Citation Information

Patent Citations

  • Method and device for detecting advertisements

    CN103235956A

  • Advertisement putting monitoring method, device and system based on image recognition

    CN110929656A

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

    CN111327927A

  • Video special effect processing method and device, electronic equipment and storage medium

    CN114331887A

  • A Method of Generating 3-Dimensional Advertisement Using Photographed Images

    KR101913623B1