Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for transplanting subtitles

A technology of subtitles and colors, applied in the field of subtitle transplantation methods and devices, can solve the problems of transplantation and unable to extract subtitle lyrics

Active Publication Date: 2021-08-13
BEIJING THUNDERSTONE TECH CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the prior art, without the verbatim lyrics text, it is impossible to extract the subtitle lyrics from the original MV and transplant them to other MVs or videos

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for transplanting subtitles
  • A method and device for transplanting subtitles
  • A method and device for transplanting subtitles

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0044] figure 1 It is a schematic flow chart of a subtitle transplantation method in this embodiment, as shown in the figure, including:

[0045] Step 101, divide the original video into frames, and take a screenshot of its current frame according to a preset range;

[0046] The subtitles are generally in the lower part of the video, and the position is basically fixed, so it is enough to capture the picture of the range where the subtitles are located.

[0047] In this embodiment, preferably, the target video is divided into frames at the same time, and each frame of the original video after frame division and the target video can be corresponded one by one. That is, in this embodiment, subtitle transplantation is performed frame by frame.

[0048] Step 102, performing color extraction on the screenshot according to the HSV range values ​​of a plurality of preset colors to obtain a mask of at least one color;

[0049] HSV (Hue, Saturation, Value) is a color space created b...

Embodiment 2

[0072] figure 2 It is a structural block diagram of a subtitle transplantation device in this embodiment, as shown in the figure, including:

[0073] A screenshot unit 201, configured to divide the original video into frames, and take a screenshot of its current frame according to a preset range;

[0074] The subtitles are generally in the lower part of the video, and the position is basically fixed, so it is enough to capture the picture of the range where the subtitles are located.

[0075] In this embodiment, preferably, the target video is divided into frames at the same time, and each frame of the original video after frame division and the target video can be corresponded one by one. That is, in this embodiment, subtitle transplantation is performed frame by frame.

[0076] A color extraction unit 202, configured to perform color extraction on the screenshot according to HSV range values ​​of a plurality of preset colors to obtain a mask of at least one color;

[007...

Embodiment 3

[0101] image 3 It is a schematic flow chart of a subtitle transplantation method in this embodiment, as shown in the figure, including:

[0102] Step 301, iterate each frame of the original video and the target video.

[0103] First iterate each frame of the original video and the target video that needs to be transplanted. Since the position of each MV subtitle is basically fixed, the range of the original MV subtitle is intercepted to reduce the error of recognition;

[0104] Step 302, intercepting the subtitle picture of the current frame;

[0105] like Figure 5 Shown is the schematic diagram of subtitles before extraction; it can be seen that Figure 5 The range of interception is shown.

[0106] The coordinates of two points of the picture intercepted in this embodiment are (0, 1.45) (length, width-20px) to obtain the subtitle part.

[0107] Step 303, extract subtitles;

[0108] Then use opencv to extract the subtitle color.

[0109] OpenCV is a cross-platform co...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to the technical field of video processing, in particular to a method and device for subtitle transplantation, wherein the method claims include: processing the original video into frames, and taking a screenshot of the current frame according to a preset range; The HSV range value of the color extracts the color of the screenshot respectively to obtain a mask of at least one color; performs bitwise AND with the mask of at least one color respectively with the current frame of the original video to obtain at least one graphic; Bitwise ORing the at least one graphic to obtain a target subtitle graphic; pasting the target subtitle graphic into the target video frame corresponding to the current frame of the original video. The present invention realizes the absolute synchronization of the lyrics text in the target video and the lyrics text of the original video by iterating and dividing the original video and the target video into frames, and transplanting the lyrics frame by frame, and realizes the transplantation of the word-for-word lyrics and subtitles.

Description

technical field [0001] The invention relates to the technical field of video processing, in particular to a method and device for transplanting subtitles. Background technique [0002] In the prior art, in the absence of verbatim lyrics text, it is impossible to extract the subtitle lyrics in the original MV and transplant them into other MVs or videos. Contents of the invention [0003] In order to solve the problems in the prior art, the embodiment of the present invention provides a subtitle transplantation method and device, by iterating the original video and the target video, and performing lyrics transplantation frame by frame, so as to realize the transplantation of verbatim lyrics and subtitles. [0004] In order to achieve the above object, the present invention provides a subtitle transplantation method on the one hand, comprising: [0005] Divide the original video into frames, and take a screenshot of the current frame according to the preset range; [0006]...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04N5/262H04N5/278
Inventor 马哲刘剑
Owner BEIJING THUNDERSTONE TECH CO LTD