Method and system for replacing video content

文档序号:1601607 发布日期:2020-01-07 浏览:9次 中文

阅读说明:本技术 一种替换视频内容的方法和系统 (Method and system for replacing video content ) 是由 陈访访 于 2018-06-29 设计创作,主要内容包括:本发明的实施例提供了一种替换视频内容的方法和系统,该方法通过读入原始视频的图像序列,利用物体检测和物体分类技术获取视频中所有物体的特征数据,通过智能分析、智能改写,抹除或更换目标内容,并将系统获取的数据进行统计分析,建立视频改写模型,为视频内容的批量替换操作提供一种更为智能的策略。(The embodiment of the invention provides a method and a system for replacing video contents, wherein the method comprises the steps of reading in an image sequence of an original video, acquiring characteristic data of all objects in the video by using an object detection and object classification technology, performing intelligent analysis, intelligent rewriting, erasing or replacing target contents, performing statistical analysis on the data acquired by the system, establishing a video rewriting model, and providing a more intelligent strategy for batch replacement operation of the video contents.)

1. A method of replacing video content, comprising the steps of:

acquiring an original video, and carrying out object detection and classification on the content of the original video;

screening objects which accord with preset replacement rules from the object detection and classification results;

acquiring a replacement image, replacing the object which accords with the preset replacement rule, and carrying out image adaptation;

analyzing the image sequence of the video after replacing the image, erasing the image content of the original video which is not covered by the replacing image, and restoring the original background image;

and after completing image replacement frame by frame, outputting the video with the replaced content.

2. The method of replacing video content according to claim 1, further comprising the steps of:

presetting a bottom database; the bottom database comprises all image information to be replaced, corresponding artificial labels and characteristic data of the images;

a replacement image is obtained from the underlying database.

3. The method for replacing video content according to claim 2, wherein the underlying database further comprises:

rule data of object detection and classification and result data of detection and classification;

and carrying out object detection and classification on the original video content according to the rule data of object detection and classification in the bottom database.

4. The method for replacing video content according to claim 2, wherein the underlying database further comprises:

preset replacement rules and corresponding objects and classifications;

and screening the objects which accord with the replacement rules according to the preset replacement rules in the bottom database and the corresponding objects and classifications.

5. The method for replacing video content according to claim 1, wherein the replacing the object complying with the preset replacement rule and performing image adaptation comprises:

and replacing the corresponding object in the original video by the replacement image, and carrying out image adaptation on the replacement image according to the information of the original image so that the replacement image is consistent with the image of the original video.

6. A system for replacing video content, comprising a detection unit, an analysis unit, a replacement unit, an adaptation unit and an output unit, wherein,

the detection unit is used for acquiring an original video and carrying out object detection and classification on the content of the original video;

the analysis unit is used for screening objects which accord with preset replacement rules from the results of the object detection and classification;

the replacing unit is used for acquiring a replacing image, replacing the object which accords with the preset replacing rule and carrying out image adaptation;

the adaptation unit is used for analyzing the image sequence of the video after replacing the image, erasing the image content of the original video which is not covered by the replacing image and restoring the original background image;

and the output unit is used for outputting the video with the replaced content after completing the image replacement frame by frame.

7. The system for replacing video content according to claim 6, further comprising an underlying database unit, wherein,

the bottom database unit is used for presetting a bottom database; the bottom database comprises all image information to be replaced, corresponding artificial labels and characteristic data of the images;

and the replacing unit is used for acquiring a replacing image from the bottom layer database.

8. The system for replacing video content according to claim 6, further comprising an underlying database unit, wherein,

the bottom database unit is used for presetting a bottom database; the bottom database comprises rule data of object detection and classification and result data of detection and classification;

and the detection unit is used for carrying out object detection and classification on the original video content according to the rule data of object detection and classification in the bottom database.

9. The system for replacing video content according to claim 6, further comprising an underlying database unit, wherein,

the bottom database unit is used for presetting a bottom database; the bottom database comprises preset replacement rules, corresponding objects and classifications;

and the analysis unit is used for screening the objects which accord with the replacement rules according to the preset replacement rules in the bottom database and the corresponding objects and classification.

10. The system for replacing video content according to claim 6, further comprising a statistics unit, wherein,

and the statistical unit is used for acquiring the characteristic data of each image and the operation data of the whole system, generating a video replacement production report and establishing a video rewriting model.

Technical Field

The present invention relates to the field of video processing technologies, and in particular, to a method and a system for replacing video content.

Background

Disclosure of Invention

In view of the foregoing technical problems, embodiments of the present invention provide a method and a system for replacing video content, which can replace specified content or information in a video in batch, thereby providing a more intelligent and efficient scheme for video rewriting and post-production.

An aspect of an embodiment of the present invention provides a method for replacing video content, including the following steps:

acquiring an original video, and carrying out object detection and classification on the content of the original video;

screening objects which accord with preset replacement rules from the object detection and classification results;

acquiring a replacement image, replacing the object which accords with the preset replacement rule, and carrying out image adaptation;

analyzing the image sequence of the video after replacing the image, erasing the image content of the original video which is not covered by the replacing image, and restoring the original background image;

and after completing image replacement frame by frame, outputting the video with the replaced content.

Further comprising the steps of:

presetting a bottom database; the bottom database comprises all image information to be replaced, corresponding artificial labels and characteristic data of the images;

a replacement image is obtained from the underlying database.

The bottom-layer database further comprises:

rule data of object detection and classification and result data of detection and classification;

and carrying out object detection and classification on the original video content according to the rule data of object detection and classification in the bottom database.

The bottom-layer database further comprises:

preset replacement rules and corresponding objects and classifications;

and screening the objects which accord with the replacement rules according to the preset replacement rules in the bottom database and the corresponding objects and classifications.

The replacing the object which accords with the preset replacing rule and carrying out image adaptation comprises the following steps:

and replacing the corresponding object in the original video by the replacement image, and carrying out image adaptation on the replacement image according to the information of the original image so that the replacement image is consistent with the image of the original video.

In another aspect, embodiments of the present invention also provide a system for replacing video content, including a detection unit, an analysis unit, a replacement unit, an adaptation unit, and an output unit, wherein,

the detection unit is used for acquiring an original video and carrying out object detection and classification on the content of the original video;

the analysis unit is used for screening objects which accord with preset replacement rules from the results of the object detection and classification;

the replacing unit is used for acquiring a replacing image, replacing the object which accords with the preset replacing rule and carrying out image adaptation;

the adaptation unit is used for analyzing the image sequence of the video after replacing the image, erasing the image content of the original video which is not covered by the replacing image and restoring the original background image;

and the output unit is used for outputting the video with the replaced content after completing the image replacement frame by frame.

And also includes an underlying database unit, wherein,

the bottom database unit is used for presetting a bottom database; the bottom database comprises all image information to be replaced, corresponding artificial labels and characteristic data of the images;

and the replacing unit is used for acquiring a replacing image from the bottom layer database.

And also includes an underlying database unit, wherein,

the bottom database unit is used for presetting a bottom database; the bottom database comprises rule data of object detection and classification and result data of detection and classification;

and the detection unit is used for carrying out object detection and classification on the original video content according to the rule data of object detection and classification in the bottom database.

And also includes an underlying database unit, wherein,

the bottom database unit is used for presetting a bottom database; the bottom database comprises preset replacement rules, corresponding objects and classifications;

and the analysis unit is used for screening the objects which accord with the replacement rules according to the preset replacement rules in the bottom database and the corresponding objects and classification.

And a statistical unit, wherein,

and the statistical unit is used for acquiring the characteristic data of each image and the operation data of the whole system, generating a video replacement production report and establishing a video rewriting model.

The technical scheme has the following advantages or beneficial effects:

in each embodiment of the invention, the image sequence of the original video is read in, the characteristic data of all objects in the video is obtained by utilizing the object detection and object classification technology, the target content is intelligently analyzed, intelligently rewritten, erased or replaced, the data obtained by the system is statistically analyzed, a video rewriting model is established, and a more intelligent strategy is provided for the batch replacement operation of the video content. By utilizing reusability of data and regular expansibility, a more efficient system solution is provided for video content replacement operation.

Drawings

Fig. 1 is a flowchart illustrating a method for replacing video content according to an embodiment of the present invention.

Fig. 2 is a schematic structural diagram of an alternative video content system according to a second embodiment of the present invention.

Fig. 3 is a schematic structural diagram of an alternative video content system according to a third embodiment of the present invention.

Detailed Description

Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

In the embodiments of the present invention, a method and a system are provided for batch erasing or replacing specific contents in a video by using artificial intelligence techniques such as object detection and classification, and a more intelligent and efficient method is provided for video rewriting and post-production. By utilizing the reusability of data and the expansibility of rules, a more efficient mode is provided for the video rewriting operation. The learning characteristic of the neural network is utilized to improve the accuracy and effect of video rewriting. The method for erasing or replacing the content in the video by the existing software operation is changed, and the labor, time and cost are saved. The method comprises the steps of establishing a database for objects in the video, carrying out label management and statistics, providing a reusable automatic flow for inserting different contents into the video, and establishing a video rewriting model to enable post-production of the video to be more intelligent.

Fig. 1 is a flowchart illustrating a method for replacing video content according to an embodiment of the present invention. As shown in fig. 1, the flow of the replacement video content includes the following steps:

step 101, obtaining an original video, and performing object detection and classification on the content of the original video.

The original video is the video of the content to be replaced, and image replacement needs to be performed on part of the content. The original video comprises an object or content to be replaced, and after the original video is obtained, the content of the original video needs to be analyzed to find out the object to be replaced, namely, the object is detected and classified. The detection aims at finding out objects needing to be replaced, and the classification aims at performing unified analysis on the same type of objects.

And 102, screening objects which accord with preset replacement rules from the object detection and classification results.

The replacement rule is preset, that is, the object to be replaced and the replacement mode are preset. And further analyzing the object and the related classification data detected from the original video, thereby screening out the object which really needs to be replaced.

And 103, acquiring a replacement image, replacing the object which accords with the preset replacement rule, and carrying out image adaptation.

After the object to be replaced is obtained, a replacement image, that is, an image for replacing the object, is acquired. And replacing the object which meets the preset replacement rule by the replacement image, so that the replacement image replaces the related object in the original video.

The image after replacement may not completely conform to the original image due to various reasons such as image content, effect, pixel, size and the like, so that further image adaptation is needed, and the replacement image and the original video image are subjected to agreement adaptation processing so as to be fused together.

And 104, analyzing the image sequence of the video after replacing the image, erasing the image content of the original video which is not covered by the replacing image, and restoring the original background image.

Various problems still occur in the adapted image, and therefore, further analysis of the image sequence of the video after replacing the image is needed, erasing is needed for the image content not covered by the replacing image, and the background image in the original video image is restored.

And 105, after completing image replacement frame by frame, outputting the video with the replaced content.

After the original video is subjected to content replacement frame by frame, a new video is obtained, wherein the content is already replaced, namely the video with the replaced video content is obtained.

Further, a bottom database needs to be preset; the bottom database comprises all image information to be replaced, corresponding artificial labels and characteristic data of the images; a replacement image is obtained from the underlying database.

The bottom database further comprises: rule data of object detection and classification and result data of detection and classification; and carrying out object detection and classification on the original video content according to the rule data of object detection and classification in the bottom database.

The bottom database further comprises: preset replacement rules and corresponding objects and classifications; and screening the objects which accord with the replacement rules according to the preset replacement rules in the bottom database and the corresponding objects and classifications.

Replacing the object which accords with the preset replacement rule and carrying out image adaptation, wherein the image adaptation comprises the following steps: and replacing the corresponding object in the original video by the replacement image, and carrying out image adaptation on the replacement image according to the information of the original image so that the replacement image is consistent with the image of the original video.

Furthermore, it is also necessary to obtain feature data of each image and operation data of the whole system, generate a video replacement production report, and establish a video rewriting model.

In order to implement the above flow, another embodiment of the technical solution of the present invention provides a system for replacing video content, and fig. 2 is a schematic structural diagram of a system for replacing video content according to a second embodiment of the present invention.

As shown in fig. 2, the child story playing system includes a detection unit 21, an analysis unit 22, a substitution unit 23, an adaptation unit 24, and an output unit 25, wherein,

the detection unit 21 is configured to acquire an original video, and perform object detection and classification on the original video content;

the analysis unit 22 is used for screening the objects which accord with preset replacement rules from the results of the object detection and classification;

the replacing unit 23 is configured to acquire a replacement image, replace the object that meets the preset replacement rule, and perform image adaptation;

the adaptation unit 24 is configured to analyze an image sequence of a video after replacing an image, erase image content of an original video that is not covered by the replaced image, and restore an original background image;

the output unit 25 is configured to output the video with the replaced content after completing the image replacement frame by frame.

Further, the system comprises an underlying database unit 26, wherein,

the bottom database unit 26 is used for presetting a bottom database; the bottom database comprises all image information to be replaced, corresponding artificial labels and characteristic data of the images;

the replacing unit 23 is configured to obtain a replacing image from the underlying database.

The bottom database unit 26 is further configured to preset a bottom database; the bottom database comprises rule data of object detection and classification and result data of detection and classification;

the detecting unit 21 is configured to perform object detection and classification on the original video content according to the rule data of object detection and classification in the underlying database.

The bottom database unit 26 is used for presetting a bottom database; the bottom database comprises preset replacement rules, corresponding objects and classifications;

the analysis unit 22 is configured to screen the objects that meet the replacement rules according to the replacement rules preset in the bottom database and the corresponding objects and classifications.

Further, the system comprises a statistics unit 27, wherein,

the statistical unit 27 is configured to obtain feature data of each image and operation data of the entire system, generate a video replacement production report, and establish a video rewriting model.

As shown in fig. 3, a third embodiment of the present invention provides another alternative video content system, wherein,

the system comprises three main parts: video reading, video rewriting and video output.

The video reading mainly comprises a reading module which can read the target video.

Video adaptation is the most important part of the system, and comprises five functional modules: the system comprises a target image library, an intelligent detection module, an intelligent analysis module, an intelligent implantation module and an intelligent statistic module.

All image information to be replaced is stored in the bottom database and comprises a series of artificial labels and characteristic data of the images; the intelligent detection module performs object detection and object classification by using an image recognition technology and transmits the obtained data to the intelligent analysis module; the intelligent analysis module analyzes the data obtained by image recognition, screens out objects conforming to the erasing or rewriting rules according to the set rules, and transmits the data to the intelligent rewriting module; and the intelligent rewriting module calls the image to be replaced in the database according to the analysis result, performs transformation and adaptation on the image according to rules, and implants the adjusted image into a corresponding position. After the image to be replaced is implanted, erasing the uncovered original image part according to the analysis result of the image sequence, and simultaneously restoring the original background image part in the video; the intelligent statistical module obtains the characteristic data of each image and the operation data of the whole system, generates a report for video rewriting and building a video rewriting model.

The video output part mainly comprises an output module which can acquire the modified image sequence and output the modified video.

In each embodiment of the invention, the image sequence of the original video is read in, the characteristic data of all objects in the video is obtained by utilizing the object detection and object classification technology, the target content is intelligently analyzed, intelligently rewritten, erased or replaced, the data obtained by the system is statistically analyzed, a video rewriting model is established, and a more intelligent strategy is provided for the batch replacement operation of the video content. By utilizing reusability of data and regular expansibility, a more efficient system solution is provided for video content replacement operation.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.

The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the transceiving method according to various embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

While the preferred embodiments of the present invention have been described, it should be understood that modifications and adaptations to those embodiments may occur to one skilled in the art without departing from the principles of the present invention and are within the scope of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种声音与图像混合阵列处理系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类