CN102724421A - Method and system for realizing subtitle special effect by polygonal region division - Google Patents

Method and system for realizing subtitle special effect by polygonal region division Download PDF

Info

Publication number
CN102724421A
CN102724421A CN2011101269543A CN201110126954A CN102724421A CN 102724421 A CN102724421 A CN 102724421A CN 2011101269543 A CN2011101269543 A CN 2011101269543A CN 201110126954 A CN201110126954 A CN 201110126954A CN 102724421 A CN102724421 A CN 102724421A
Authority
CN
China
Prior art keywords
polygon
pixel
assignment
captions
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101269543A
Other languages
Chinese (zh)
Other versions
CN102724421B (en
Inventor
刘衡娜
蔡欢
沈季
郭红艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN201110126954.3A priority Critical patent/CN102724421B/en
Publication of CN102724421A publication Critical patent/CN102724421A/en
Application granted granted Critical
Publication of CN102724421B publication Critical patent/CN102724421B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention, which mainly relates to processing on a subtitle special effect in the broadcast television program manufacturing and broadcasting fields, provides a method and system for realizing a subtitle special effect by polygonal region division. The method comprises: (1), generating basic polygonal elements according to basic vectors and a polygon type; (2), carrying out assignment on attributes of all pixel points in a polygonal region in each frame of subtitle window and recording attribute values of all points to form a basic array; and (3), picking a next polygonal region in the subtitle window and carrying out basic array calculation so as to obtain attributes of all pixel points in the polygonal region. Moreover, the system consists of a reference vector element attribute input unit, a pixel collection and calculation unit, and a comparison and assignment unit. The pixel collection and calculation unit collects pixels; and then, the reference vector element attribute input unit sets a basic vector element; and the comparison and assignment unit carries out pixel comparison and assignment. According to the technical characteristics of the provided method and the system, a technical problem that an operation speed is reduced due to increase of number of times of calculation accumulation during a two-dimensional pixel rendering process can be solved, thereby saving the operation speed and obtaining a better rendering effect.

Description

A kind of method and system that realize the captions special efficacy of dividing through polygon
Technical field
The present invention relates to making of program captions and broadcast and correlative technology field, relate in particular to a kind of method and system that realize the captions special efficacy of dividing through polygon.
Background technology
In existing program making and broadcast and correlative technology field, in the process to the program material making, in order better literal to be showed; Need a large amount of captions to synthesize, particularly in large-scale 3D film, material are made and play, in order to obtain better effect; Usually need in captions, insert special effects, improve constantly, occur 3D effect captions stunt successively along with what stunt was required; 3D captions stunt need be calculated lot of data in implementation procedure, and will carry out great amount of calculation by the GPU of graphic display card usually, in order to obtain the picture of high-quality; To the graphic operation processing speed, call the GPU function so hardware is had higher requirement because calculating can relate to, in the prior art; Film titler in making, playing process, provide hardware and software environment preferably in 3D captions special efficacy, and handles the restriction that the material processing speed receives the GPU disposal ability; And when playing, also there is a same requirement; In 3D captions building-up process, because handled a large amount of image files, so file needs bigger memory space and spatial cache.
Between above situation, in realizing process of the present invention, the inventor finds to exist at least in the prior art following problem:
Make at the 3D captions, in the building-up process owing to need the jumbo memory space and the speed of service fast, therefore to the having relatively high expectations of graphic display card and GPU, in carrying out simple special efficacy building-up process; Caused the waste of system; Simultaneously, also there are many-sided restrictions such as the speed of service and disposal ability for playback equipment, give the making of 3D captions special efficacy and use generation to come restriction; Particularly in adopting 2D pixel rendering process; Add up owing to calculate, thereby cause, and cause arithmetic speed to descend because calculating accumulative frequency rises.
Summary of the invention
To deficiency of the prior art; The technical problem that the present invention will solve provides a kind of method and system that realize the captions special efficacy of dividing through polygon; Be used at film titler 3D special efficacy captions manufacturing process, special efficacy generate and play, particularly 2D pixel rendering process is optimized.
The present invention provides a kind of and divides the method that realizes the captions special efficacy through polygon, and said step specifically comprises: 1) according to reference vector and polygon type, generate basic polygon element; 2) each the pixel attribute in every frame caption window inner polygon zone is carried out assignment, and write down each some property value, form basic array; 3) pick up the interior next polygonal region of caption window, carry out basic array operation, obtain each the pixel attribute of pixel in this polygonal region;
Optimally, in the said step 1): said reference vector element comprises: point, line, and multiple spot, multi-thread, and by the changeable shape zone in multi-thread besieged city;
Optimally: in the said step 1): said polygon type can be triangle, rectangle, fan-shaped.
Said step 2 optimally) specifically comprise in: it is regional 21) to confirm that according to the basic polygon vector element picture drawn in captions; 22), obtain display pixel point positional value according to the pixel positional value; 23) said display pixel point positional value and vector element regional value are compared, carry out the pixel property assignment according to comparing result.
Said step 2 optimally) can also comprise in: carry out multiple according to caption window and divide, confirm the captions element number.
Said step 21 optimally) specifically comprises: 21A) the special efficacy parameter is read; 21B) confirm reference vector hard-edge initial position, initially draw the image width degree, initially rotate basic point, initial rotation angle degree.
Said step 21A optimally) the special efficacy parameter can be described in: the moving direction of direction of rotation or stroke image drift, stroke picture start angle.Said step 22) specifically comprise: 22A) according to step 21), confirm the basic polygon vector; 22B) according to said polygon captions are drawn as the zone and be divided into polygon exterior lateral area, polygon zone line, polygon inside region, and give the corresponding subtitle property value each zone.
Optimally, said step 22B) described in each zone give corresponding captions property value, when drawing a picture benchmark and move, when attribute can be polygon exterior lateral area, transparency=1 during for transparency by distance; The polygon inside region, transparency=0; The polygon zone line, transparency=B/A * 255 or transparency=1; Wherein, on behalf of polygon width value, A, said B represent the distance value of said collection pixel distance polygon inside region.
Optimally,, said step 22B) described in each zone give corresponding captions property value, when drawing a picture benchmark, when attribute can be polygon exterior lateral area, transparency=1 during for transparency by angular movement; The polygon inside region, transparency=0; The polygon zone line, transparency=θ '/θ * 255 or transparency=1; Wherein, the angle value of picture angle value, the said collection pixel distance of θ ' representative polygon inside region is drawn in said θ representative.
Said step 23 optimally) specifically comprises: 23A) said display pixel point positional value and polygon vector element positional value are compared; Like display pixel point positional value less than polygon exterior lateral area positional value; Then this pixel is composed polygon exterior lateral area lateral areas thresholding; Like display pixel point positional value greater than polygon inside region positional value; Then this pixel being composed polygon inside region lateral areas thresholding, is the polygon zone line like display pixel point positional value, then this pixel is composed polygon mesozone thresholding.
Said step 21 optimally) specifically comprises:, in each captions unit, carry out repetition pixel property assignment 21C) according to the captions element number.
Optimally,, said step 21C) can also comprise: when realizing the turbine special efficacy, the caption window division unit is two, carries out other caption window unit assignment according to image copying; When realizing the fan special efficacy, the caption window division unit is four, carries out other caption window unit assignment according to copy orderly.
The present invention provides a kind of system that realizes the captions special efficacy that divides through polygon; It is characterized in that: said system comprises: reference vector element property input unit, pixel data acquisition and calculation unit, comparison assignment unit; Said pixel data acquisition and calculation unit; Pixel after gathering according to the setting of reference vector element property input unit to the basis vector element, is relatively reached assignment through what assignment unit relatively carried out pixel.
Wherein, said reference vector element property input unit is used for confirming the polygon type, generates basic polygon element reference vector element property, and it is regional to confirm that according to the basic polygon vector element picture drawn in captions.Said pixel data acquisition and calculation unit is used for, and according to the pixel position, obtains display pixel point position positional value.Said relatively assignment unit is used for, and said display pixel point positional value and polygon vector element positional value are compared, and carries out the pixel property assignment according to comparing result.
Wherein, Caption window division unit, caption window assignment unit, said caption window division unit carry out multiple according to caption window to be divided, and confirms the captions element number; Caption window assignment unit will carry out assignment to all caption windows according to the quantity and the assignment mode of caption window.
Above technical scheme can find out that the present invention has the following advantages:
At first; The present invention carries out attribute assignment according to zone mode relatively to each pixel through the calculating to each pixel in each caption window, has only used basic ratio, assignment operation; Realize thereby calculating can be relied on CPU, can not rely on and realize with GPU.
Secondly; The present invention through the mode to the whole assignment of polygonal region interior pixel, has simplified assignment procedure through to preliminary treatment caption area inner polygon dividing region; Multiple assignment mode is provided simultaneously; Can in computation optimization, obtain more special efficacy mode through mirror image and the assignment of duplicating mode.
Description of drawings
Fig. 1 is the inventive method first embodiment flow chart;
Fig. 2 is the inventive method second embodiment flow chart;
Fig. 3 is the inventive method the 3rd embodiment flow chart;
Fig. 4 is a system schematic of the present invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below; Technical scheme in the embodiment of the invention is carried out clear, complete description; Obvious described embodiment only is a part of embodiment of the present invention, is not whole embodiment, based on the embodiment among the present invention; Those of ordinary skills are not paying the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Embodiment one:
See also Fig. 1,2, the inventive method first embodiment, divide the method that the method that realizes the captions special efficacy realizes captions special efficacys " turbine ", spin special efficacy through polygon:
In the process that realizes " turbine ", spin special efficacy effect, at first,, generate basic polygon element according to reference vector and polygon type;
The reference vector element is for the turbine special efficacy: the triangle center point reaches and draws the picture window ranges, reaches enlightenment angle, the anglec of rotation, simultaneously; In order to simplify calculating, for the turbine special efficacy, can carry out the average division of window earlier, two windows about being divided into; In a window, accomplish pixel assignment and calculating, be mirrored to simultaneously in the other window, the reference vector element is for the spin special efficacy: draw picture enlightenment position; Elements such as rotary middle point; For this special efficacy, because pass through the draw picture mode of hard-edge around 360 ° of central point rotations, so the window division is carried out in inconvenience.
Afterwards; It is regional to confirm that according to the basic polygon vector element of being gathered picture drawn in captions; Caption window is drawn as the zone and is two, for " spin special efficacy ", draws the picture zone for not cutting apart for " turbine special efficacy "; Be former caption window zone, with circular, it is two that caption window is drawn as the zone for rectangle.
Afterwards, in each unit, carry out pixel and draw picture and calculate, confirm hard-edge, soft limit and initial position, initially draw image width degree, and start angle, wait vector element attribute and special efficacy parameter; According to said hard-edge, soft limit captions are drawn as the zone and to be divided into hard-edge regions, hard soft limit zone line, soft edge regions, and give the corresponding subtitle property value each zone; Need obtain common stroke of picture special effects; Draw and to move by range range mode as benchmark; Grade can be by 1~255 the time when attribute is transparency, and wherein 1 is opaque, and 255 is that full impregnated is bright; Therefore in caption window by hard-edge, soft limit, and draw an image width degree, just with the window branch for first area, second area, the 3rd zone.Judge screen collection locations of pixels, wherein, gather the location of pixels point, through the comparison position value, less than the positional value of hard-edge, therefore, the first area is the hard-edge regions, transparency=1, and pixel assignment transparency=1, these region point captions will manifest fully; Through the comparison position value, greater than the positional value on soft limit, therefore, and the 3rd regional hard-edge regions, transparency=0, pixel assignment transparency=0, captions are transparent fully, do not manifest; Greater than hard-edge less than soft limit, therefore, in the second area, transparency=B/A * 255, pixel assignment transparency analog value, captions belong to transparent and translucent, by above method, each pixel in the caption window are carried out assignment;
After basic captions unit assignment, other unit are carried out assignment, obtain the pixel sets attribute in all caption areas, afterwards every frame picture is played up, and play demonstration continuously.
Embodiment two:
See also Fig. 3, the inventive method second embodiment, divide the method that the method that realizes the captions special efficacy realizes captions special efficacys " fan " special efficacy through polygon:
In the process that realizes " fan " special efficacy effect, at first,, generate basic polygon element according to reference vector and polygon type;
Comprise for fan reference vector element: the initial point of rotation, hard-edge position, in the fan special efficacy, at first, be with caption window along 4 zones of diagonal division, and with the hard-edge length of the most initial conversion of catercorner length.
Afterwards, it is regional to confirm that according to the basic polygon vector element of being gathered picture drawn in captions, and caption window is drawn the picture division along diagonal for " fan " special efficacy, and the decomposition region is four.
Afterwards, draw picture calculating to carrying out pixel in each unit, method described in its method such as the embodiment one is consistent, no longer repeats here.
Embodiment four:
The present invention provides a kind of system that realizes the captions special efficacy through the pixel assignment; It is characterized in that: said system comprises: reference vector element property input unit, pixel data acquisition and calculation unit, comparison assignment unit; Said pixel data acquisition and calculation unit; Pixel after gathering according to the setting of reference vector element property input unit to the basis vector element, is relatively reached assignment through what assignment unit relatively carried out pixel.
Wherein, said reference vector element property input unit is used for confirming the polygon type, generates basic polygon element reference vector element property, and it is regional to confirm that according to the basic polygon vector element picture drawn in captions.Said pixel data acquisition and calculation unit is used for, and according to the pixel position, obtains display pixel point position positional value.Said relatively assignment unit is used for, and said display pixel point positional value and polygon vector element positional value are compared, and carries out the pixel property assignment according to comparing result.
Wherein, Caption window division unit, caption window assignment unit, said caption window division unit carry out multiple according to caption window to be divided, and confirms the captions element number; Caption window assignment unit will carry out assignment to all caption windows according to the quantity and the assignment mode of caption window.

Claims (18)

1. one kind is passed through the method that polygon is divided realization captions special efficacy, and it is characterized in that: said step specifically comprises:
1) according to reference vector and polygon type, generates basic polygon element;
2) each the pixel attribute in every frame caption window inner polygon zone is carried out assignment, and write down each some property value, form basic array;
3) pick up the interior next polygonal region of caption window, carry out basic array operation, obtain each the pixel attribute of pixel in this polygonal region;
2. the method described in claim 1, it is characterized in that: in the said step 1): said reference vector element comprises: point, line, and multiple spot, multi-thread, and by the changeable shape zone in multi-thread besieged city;
3. the method described in claim 1 is characterized in that: in the said step 1): said polygon type can be triangle, rectangle, fan-shaped.
4. the method described in claim 1 is characterized in that: specifically comprise said step 2):
21) it is regional to confirm that according to the basic polygon vector element picture drawn in captions;
22), obtain display pixel point positional value according to the pixel positional value;
23) said display pixel point positional value and vector element regional value are compared, carry out the pixel property assignment according to comparing result.
5. the method described in claim 1 is characterized in that: can also comprise said step 2):
Carry out multiple according to caption window and divide, confirm the captions element number.
6. the method described in claim 4 is characterized in that, said step 21) specifically comprise:
21A) the special efficacy parameter is read;
21B) confirm reference vector hard-edge initial position, initially draw the image width degree, initially rotate basic point, initial rotation angle degree.
7. the method described in claim 6 is characterized in that, said step 21A) described in the special efficacy parameter can be: direction of rotation or draw the moving direction of image drift, draw the picture start angle.
8. the method described in claim 4 is characterized in that, said step 22) specifically comprise:
22A) according to step 21), confirm the basic polygon vector;
22B) according to said polygon captions are drawn as the zone and be divided into polygon exterior lateral area, polygon zone line, polygon inside region, and give the corresponding subtitle property value each zone.
9. the method described in claim 8 is characterized in that, said step 22B) described in each zone give corresponding captions property value, when drawing a picture benchmark and move by distance, when attribute during for transparency can for:
The polygon exterior lateral area, transparency=1;
The polygon inside region, transparency=0;
The polygon zone line, transparency=B/A * 255 or transparency=1;
Wherein, on behalf of polygon width value, A, said B represent the distance value of said collection pixel distance polygon inside region.
10. the method described in claim 8 is characterized in that, said step 22B) described in each zone give corresponding captions property value, when drawing a picture benchmark by angular movement, when attribute during for transparency can for:
The polygon exterior lateral area, transparency=1;
The polygon inside region, transparency=0;
The polygon zone line, transparency=θ '/θ * 255 or transparency=1;
Wherein, the angle value of picture angle value, the said collection pixel distance of θ ' representative polygon inside region is drawn in said θ representative.
11. the method described in claim 4 is characterized in that, said step 23) specifically comprise:
23A) said display pixel point positional value and polygon vector element positional value are compared; Like display pixel point positional value less than polygon exterior lateral area positional value; Then this pixel is composed polygon exterior lateral area lateral areas thresholding, greater than polygon inside region positional value, then this pixel is composed polygon inside region lateral areas thresholding like display pixel point positional value; Like display pixel point positional value is the polygon zone line, then this pixel is composed polygon mesozone thresholding.
12. the method described in claim 6 is characterized in that, said step 21) specifically comprise:
21C) according to the captions element number, in each captions unit, carry out repetition pixel property assignment.
13. the method according to described in the claim 12 is characterized in that, said step 21C) can also comprise: when realizing the turbine special efficacy, the caption window division unit is two, carries out other caption window unit assignment according to image copying; When realizing the fan special efficacy, the caption window division unit is four, carries out other caption window unit assignment according to copy orderly.
14. the system through polygon division realization captions special efficacy, it is characterized in that: said system comprises: reference vector element property input unit, pixel data acquisition and calculation unit, comparison assignment unit, and said
Pixel data acquisition and calculation unit according to the setting of reference vector element property input unit to the basis vector element, relatively reaches assignment through what assignment unit relatively carried out pixel with the pixel after gathering.
15. the system described in claim 14; It is characterized in that said reference vector element property input unit is used for confirming the polygon type; Generate basic polygon element reference vector element property, it is regional to confirm that according to the basic polygon vector element picture drawn in captions.
16. the system described in claim 14 is characterized in that, said pixel data acquisition and calculation unit is used for, and according to the pixel position, obtains display pixel point position positional value.
17. the system described in claim 13 is characterized in that, said relatively assignment unit is used for, and said display pixel point positional value and polygon vector element positional value are compared, and carries out the pixel property assignment according to comparing result.
18. the system described in claim 14; It is characterized in that; Can also comprise: caption window division unit, caption window assignment unit, said caption window division unit carry out multiple according to caption window to be divided, and confirms the captions element number; Caption window assignment unit will carry out assignment to all caption windows according to the quantity and the assignment mode of caption window.
CN201110126954.3A 2011-05-17 2011-05-17 A kind of method and system that realize captions special efficacy of dividing by polygon Expired - Fee Related CN102724421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110126954.3A CN102724421B (en) 2011-05-17 2011-05-17 A kind of method and system that realize captions special efficacy of dividing by polygon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110126954.3A CN102724421B (en) 2011-05-17 2011-05-17 A kind of method and system that realize captions special efficacy of dividing by polygon

Publications (2)

Publication Number Publication Date
CN102724421A true CN102724421A (en) 2012-10-10
CN102724421B CN102724421B (en) 2016-05-04

Family

ID=46950073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110126954.3A Expired - Fee Related CN102724421B (en) 2011-05-17 2011-05-17 A kind of method and system that realize captions special efficacy of dividing by polygon

Country Status (1)

Country Link
CN (1) CN102724421B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2348762A (en) * 1999-04-09 2000-10-11 Sony Uk Ltd Wipe solid signal generator utilising ramp generators
CN101305600A (en) * 2005-11-07 2008-11-12 松下电器产业株式会社 Wipe pattern generation device
CN101465973A (en) * 2008-11-04 2009-06-24 新奥特(北京)视频技术有限公司 Method for rendering subtitling based on curved profile closed loop domain and pixel mask matrix
CN101764936A (en) * 2008-11-04 2010-06-30 新奥特(北京)视频技术有限公司 Method for confirming shortest distance of pixel space mask code matrix from pixel to boundary
CN102724413A (en) * 2011-05-09 2012-10-10 新奥特(北京)视频技术有限公司 Method and system for realizing caption special effect by self-defining polygon unit

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2348762A (en) * 1999-04-09 2000-10-11 Sony Uk Ltd Wipe solid signal generator utilising ramp generators
CN101305600A (en) * 2005-11-07 2008-11-12 松下电器产业株式会社 Wipe pattern generation device
CN101465973A (en) * 2008-11-04 2009-06-24 新奥特(北京)视频技术有限公司 Method for rendering subtitling based on curved profile closed loop domain and pixel mask matrix
CN101764936A (en) * 2008-11-04 2010-06-30 新奥特(北京)视频技术有限公司 Method for confirming shortest distance of pixel space mask code matrix from pixel to boundary
CN102724413A (en) * 2011-05-09 2012-10-10 新奥特(北京)视频技术有限公司 Method and system for realizing caption special effect by self-defining polygon unit

Also Published As

Publication number Publication date
CN102724421B (en) 2016-05-04

Similar Documents

Publication Publication Date Title
JP6392370B2 (en) An efficient re-rendering method for objects to change the viewport under various rendering and rasterization parameters
CN102750725B (en) The terrain rendering method that graphic based processor accelerates
US9143770B2 (en) Application programming interface supporting mixed two and three dimensional displays
US20130093844A1 (en) Electronic apparatus and display control method
CN1942902A (en) Ghost artifact reduction for rendering 2.5D graphics
CN102572391B (en) Method and device for genius-based processing of video frame of camera
US10540918B2 (en) Multi-window smart content rendering and optimizing method and projection method based on cave system
CN102208112A (en) Field depth culling method and three-dimensional graphic processing method and device
CN103198513B (en) Film later stage synthesis antialiasing method
CN103745448A (en) Rapid generating method for ultrahigh-resolution composite image in raster 3D displaying
US20150156470A1 (en) Reducing View Transitions Artifacts In Automultiscopic Displays
CN102724413B (en) A kind of self-defined polygonal element realizes the method and system of caption special effect
CN102724414B (en) A kind of method and system of multitask realization of caption special effect
CN105243268A (en) Game map positioning method and apparatus as well as user terminal
CN102724421A (en) Method and system for realizing subtitle special effect by polygonal region division
CN102724417B (en) Method and system for realizing caption special effect in louver mode
CN102724412B (en) Method and system for realizing special effect of caption by pixel assignment
CN104243949A (en) 3D display method and device
CN102724415B (en) A kind of alternating expression realizes the method and system of caption special effect
CN102724416A (en) Method and system for realizing special effect of caption by regional division
CN102739976B (en) A kind of method and system of the realization of the dynamic two-dimensional caption of shade
CN102724444B (en) Method and system for square object mode transformation of two-dimensional caption
JP4960495B1 (en) Information processing apparatus, information processing method, and control program
WO2015120032A1 (en) Reducing view transition artifacts in automultiscopic displays
CN106170085A (en) A kind of without mirror solid engine exchange method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160504

Termination date: 20200517

CF01 Termination of patent right due to non-payment of annual fee