Method for painting subtitle by using pixel as unit

A subtitle and coloring technology, applied in the field of subtitle coloring, can solve the problems of inflexible coloring, a large amount of memory space, occupying a large hard disk storage space, etc., and achieve the effect of improving flexibility, reducing memory space, and reducing storage space.

Active Publication Date: 2009-10-07
GIGA BYTE TECH CO LTD
0 Cites 4 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0003] 1. You need to know the content of the subtitle file you want to color, and you need to create the subtitle after coloring first, so there is no flexible coloring;
[0004] 2. Since karaoke lyrics often have dozens of sentences, there are also dozens of corresponding subtitles after coloring, ...
View more

Abstract

The invention relates to a method for painting a subtitle by using pixel as unit. An external subtitle file is read and a subtitle is painted by using the pixel as the unit. The method comprises the following steps: firstly, displaying a target row subtitle which corresponds to a target row serial number according to the target row serial number of the subtitle file and displaying a preparation row subtitle corresponding to a preparation row serial number before the subtitle file is terminated; secondly, reading a coordinate parameter and a time parameter which correspond to the target row subtitle, wherein the coordinate parameter includes a row coordinate figure and a line coordinate figure; if the line coordinate figure and the row coordinate figure are not terminated, a pixel which corresponds to the coordinate parameter is painted and 1 is added to the line coordinate figure. Therefore, the invention can improve the elasticity of the subtitle painting and save the storage space.

Application Domain

Television system detailsElectrophonic musical instruments +2

Technology Topic

Time parameterDatabase +2

Image

  • Method for painting subtitle by using pixel as unit
  • Method for painting subtitle by using pixel as unit
  • Method for painting subtitle by using pixel as unit

Examples

  • Experimental program(1)

Example Embodiment

[0035] Relevant technical content and detailed description of the present invention, cooperate accompanying drawing to illustrate as follows:
[0036] Please refer to figure 1 , is a flow chart of the pixel-based subtitle coloring method of the present invention. Read an external subtitle file (S100), and read a target sequence number of the subtitle file (S102). Then, judge whether the subtitle file is terminated (S200) according to the target sequence number: if the subtitle file terminates, then end the coloring action (S208); The sequence number of the target column is incremented by 1 (S202). Then, display a target row subtitle corresponding to the target row number and display a spare row subtitle corresponding to the spare row number (S204). Read a coordinate parameter and a time parameter corresponding to the subtitle of the target column (S206), wherein the coordinate parameter includes a column coordinate value and a row coordinate value, and the column coordinate value and the row coordinate value are used to determine the target column The subtitle coloring range; and the time parameter includes a start time and an end time, which are used to determine the start time and end time of subtitle coloring of the target column. That is, the coloring range of the target column subtitle starts to be painted at the start time, and when the end time arrives, the coloring action of the target column subtitle is completed. Then, it is judged whether the column coordinate value reaches the termination condition (S300): if the column coordinate value has reached the termination condition, then clear the target column subtitle and add 1 to the target column sequence number (S302); if the column coordinate value has not yet reached Termination condition, then judge whether the row coordinate value reaches the termination condition (S400): if the row coordinate value has reached the termination condition, then clear the row coordinate value as the row coordinate initial value and add 1 to the column coordinate value (S402) . Wherein, the initial value of the coordinate of the row is set to 1; if the coordinate value of the row has not reached the termination condition, then according to the color change requirement of a pixel corresponding to the coordinate parameter, it is judged whether the pixel needs to be painted (S500): if the If the pixel corresponding to the coordinate parameter needs to be colored, color the pixel (S502); if the pixel corresponding to the coordinate parameter does not need to be colored, ignore the pixel color (S506). Then, add 1 to the row coordinate value (S504), and execute the step (S400) again.
[0037] Please refer to Figure 2A and image 3 , are respectively the schematic diagram and Figure 2A A partial enlargement of the . If an external subtitle file with 20 subtitles is displayed on the screen (not shown) in double subtitle mode, and the subtitles are colored, and the content of the first three subtitles of the external subtitle file is assumed They are: "ABCDEF", "GHIJ", and "KLMNO". If a target sequence number Nt is read, its value is 1, that is, Nt=1, then it means that the first section column subtitle (" ABCDEF ") corresponding to the target sequence number Nt is a target column subtitle Wt, and another preparation The column number Ns is set as the target column number Nt plus 1, so its value is 2, that is, Ns=2, which means that the second column subtitle ("GHIJ") corresponding to the preliminary column number Ns is a preliminary column Subtitle Ws. Then, the target column subtitle Wt and the preliminary column subtitle Ws are first displayed on a screen, and the target column subtitle Wt has a coordinate parameter Cp and a time parameter Tp: wherein, the time parameter Tp includes a start time Ts and An end time Te is used to determine the start time and end time of coloring the target column subtitle Wt; the coordinate parameter Cp includes a column coordinate value Rt with a size of 120 pixels and a row coordinate value Ct with a size of 14 pixels , which is used to determine the coloring range of the target column subtitle Wt. That is, the coloring of the target column subtitle Wt is started at the start time Ts, and the coloring of the target column subtitle Wt is completed when the end time Te arrives.
[0038]When starting to color the target column subtitle Wt, the starting pixel for coloring is determined by the column coordinate value Rt and the row coordinate value Ct of the coordinate parameter Cp, if both the column coordinate value Rt and the row coordinate value Ct are 1 (i.e. Rt=1 and Ct=1), and the color of the pixel corresponding to the column coordinate value (Rt=1) and the row coordinate value (Ct=1) needs to be changed before and after painting. Pixel coloring; if the color does not need to be changed, keep the original color before coloring, and ignore the coloring of the pixel. Then, add 1 to the row coordinate value Ct, that is, Ct=2, and then judge the pixel color change demand corresponding to the column coordinate value (Rt=1) and the row coordinate value (Ct=2), and judge whether to The pixel is colored. When the row coordinate value Ct is greater than 14 after adding 1, that is, Ct=15, it means that all pixels in this column (Rt=1) have been painted. Therefore, clearing the row coordinate value Ct is the row coordinate initial value, that is Ct=1, and add 1 to the coordinate value Rt of this column, that is, Rt=2, so as to paint all the pixels in the next column (Rt=2). Until the column coordinate value Rt is greater than 120 after adding 1, that is, =121, it means that all pixels of the target column subtitle Wt have been painted. Then, clear the target column subtitle Wt and add 1 to the target column serial number Nt, that is, Nt=2, which means that the second column subtitle ("GHIJ") corresponding to the target column serial number Nt is a target column subtitle Wt, And this preliminary row serial number Ns is set as this target row serial number Nt plus 1, so its value is 3, promptly Ns=3, then represent that the 3rd section subtitle (" KLMNO ") that this preliminary row serial number Ns corresponds is The prepared column subtitle Ws.
[0039] Please refer to Figure 2B , is a schematic diagram of another target column subtitle coloring method according to the present invention. That is, the second subtitle (“GHIJ”) is the target subtitle Wt for coloring, which is the same as the above-mentioned detailed process, and will not be repeated here. Until the target column number Nt is greater than 20 after adding 1, that is, Nt=21, it means that all column subtitles of the external subtitle file have been colored. In this way, in units of pixels, from top to bottom column by column, and from left to right row by row, until the subtitle coloring of the external subtitle file is completed. In this embodiment, the assumed values ​​of the target column number Nt, the column coordinate value Rt, and the row coordinate value Ct are not limited in actual implementation.
[0040] Please refer to Figure 4 and Figure 5 , are respectively the schematic diagram and flow chart that the present invention carries out coloring to a subtitle file and merges with a video file and displays on a screen, the subtitle coloring method of the present invention with pixel as a unit can be used for accompaniment functions such as karaoke superior. Wherein, the display environment of the subtitle file and the video file includes a screen 10, a video display area 20, and a subtitle display area 30, wherein the subtitle display area 30 includes a first subtitle display area 302 and a second subtitle display area display area 304 . in, Figure 5 The steps include: reading an external video file (S602), reading an external subtitle file (S604), and merging the subtitle file and the video file (S606). Then display the merged subtitle file and the video file on a screen 10 (S608). Wherein, the subtitle file and the video file are used on different layers. Then perform coloring processing on the subtitle file (S610). In step (S608), the target row subtitle and the prepared row subtitle of the subtitle file (such as Figure 2A shown) are respectively displayed on the first subtitle display area 302 and the second subtitle display area 304 to achieve double-column subtitle display, and start to color the target column subtitles. If the coloring of the target column subtitle is completed, then by adding 1 to the target column serial number, the target column subtitle and the prepared column subtitle (such as Figure 2B shown) are displayed on the second subtitle display area 304 and the first subtitle display area 302 respectively, and a new target column subtitle coloring is started.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Modified phenol resins

ActiveUS9102778B2increase elasticity
Owner:EVONIK DEGUSSA GMBH

Calcium-enriched alta-mud for railway and high road foundation treatment

InactiveCN101041576Aincrease elasticityAvoid Subgrade Settlement
Owner:天津市乐金建材制品有限公司

Classification and recommendation of technical efficacy words

  • increase elasticity
  • save storage space

Clamp-proof circular saw blade branch pruning device

InactiveCN101563990Aincrease elasticityLarge amount of deformation
Owner:徐州徐工特种汽车有限公司

Bone meal nutritious fresh wet noodle and making method thereof

InactiveCN102028146Aincrease elasticityImprove extensibility
Owner:HEFEI UNIV OF TECH

Method of encoding structured low density check code

InactiveCN101141133AGood frame error rate performancesave storage space
Owner:BEIJING UNIV OF POSTS & TELECOMM +1

De-block effect filtering device and method

InactiveCN101409833Asave storage spaceloose timing
Owner:昆山杰得微电子有限公司

Distributed cache method and system

ActiveCN103019960AAvoid redundant storagesave storage space
Owner:浙江杭海新城控股集团有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products