CN102724421B - A kind of method and system that realize captions special efficacy of dividing by polygon - Google Patents
A kind of method and system that realize captions special efficacy of dividing by polygon Download PDFInfo
- Publication number
- CN102724421B CN102724421B CN201110126954.3A CN201110126954A CN102724421B CN 102724421 B CN102724421 B CN 102724421B CN 201110126954 A CN201110126954 A CN 201110126954A CN 102724421 B CN102724421 B CN 102724421B
- Authority
- CN
- China
- Prior art keywords
- polygon
- pixel
- region
- value
- assignment
- 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.)
- Expired - Fee Related
Links
Landscapes
- Processing Or Creating Images (AREA)
- Image Generation (AREA)
Abstract
The invention provides a kind of method and system that realize captions special efficacy of dividing by polygon, relate generally to the processing to captions special efficacy in broadcast TV program making, broadcast field, particularly method described in polygon is comprised: 1), according to reference vector and polygon type, generate basic polygon element, 2) the each pixel attribute in every frame caption window inner polygon region is carried out to assignment, and record each some property value, form basic array, 3) pick up the next polygonal region in caption window, carry out basic array operation, obtain the each pixel attribute of pixel in this polygonal region, described system comprises: reference vector element property input block, pixel gathers computing unit, relatively assignment unit, described pixel gathers computing unit, by the pixel setting to basis vector element according to reference vector element property input block after gathering, carry out comparison and the assignment of pixel by comparing assignment unit, solve in employing 2D pixel rendering process by the technology of the present invention feature, cumulative owing to calculating, rise thereby cause because calculate accumulative frequency, and the technical problem that causes arithmetic speed to decline, thereby save arithmetic speed, obtain more excellent rendering effect.
Description
Technical field
The present invention relates to the making of program captions and broadcast and correlative technology field, relate in particular to one and pass through manyLimit shape is divided the method and system that realize captions special efficacy.
Background technology
In existing program making and broadcast and correlative technology field, in the process that program material is made,In order better word to be showed, need a large amount of captions to synthesize, particularly at large-scale 3D shadowIn sheet, material-making and broadcasting, in order to obtain better effect, usually need in captions, insert stunt, along with improving constantly that stunt is required, there is successively 3D effect captions stunt, 3D captions spy in effectSkill needs a large amount of data to calculate in implementation procedure, and conventionally will be by graphic display cardGPU calculates in a large number, in order to obtain the picture of high-quality, to graphic operation processing speed, because calculateCan relate to and call GPU function and therefore hardware is had to higher requirement, in the prior art, film titler is at 3DCaptions special efficacy, in making, playing process, provide good hardware and software environment, and processes material placeReason speed is subject to the restriction of GPU disposal ability, and also has same requirement in the time playing, at 3D wordIn curtain building-up process, because processed a large amount of image image files, therefore file needs larger storageSpace and spatial cache.
Between above situation, realizing in process of the present invention, inventor finds at least to exist in prior artFollowing problem:
Make at 3D captions, in building-up process due to the jumbo memory space of needs and operation speed fastDegree, therefore to the having relatively high expectations of graphic display card and GPU, carrying out in simple special efficacy building-up process,Cause the waste of system, meanwhile, also had the speed of service and disposal ability etc. in many ways for playback equipmentThe restriction of face, gives the making of 3D captions special efficacy and with for having carried out restriction, is particularly adopting 2D pixel wash with watercoloursDye in process, cumulative owing to calculating, thus cause because calculating accumulative frequency rises, and cause computing speedDegree declines.
Summary of the invention
For deficiency of the prior art, the technical problem to be solved in the present invention provides one to pass through polygonDivision realizes the method and system of captions special efficacy, at film titler to 3D special efficacy caption making process,Special efficacy generate and play, particularly 2D pixel rendering process is optimized.
The invention provides a kind of method that realizes captions special efficacy of dividing by polygon, described step is specifically wrappedDraw together: 1) according to reference vector element and polygon type, generate basic polygon vector element; 2) rightEach pixel attribute in every frame caption window inner polygon region carries out assignment, and records each some attributeValue, forms basic array; 3) pick up the next polygonal region in caption window, carry out basic arrayComputing, obtains the each pixel attribute of pixel in this polygonal region;
Optimally, described step 1) in: described reference vector element comprises: point, line and multiple spot, manyLine and by the shape changeable region in multi-thread besieged city;
Optimally: described step 1): described polygon type can be: triangle, rectangle, fanShape.
Optimally, described step 2) in specifically comprise: 21) determine word according to basic polygon vector elementCurtain is drawn picture region; 22), according to pixel positional value, obtain display pixel point positional value; 23) described in inciting somebody to actionDisplay pixel point positional value and vector element regional value contrast, and carry out pixel property according to comparing resultAssignment.
Optimally, described step 2) in can also comprise: carry out multiple division according to caption window, determineCaptions element number.
Optimally, described step 21) specifically comprise: 21A) special efficacy parameter is read; 21B) trueDetermine reference vector hard-edge initial position, initially draw image width degree, initially rotate basic point, initial rotation angle degree.
Optimally, described step 21A) described in special efficacy parameter can be: direction of rotation or draw picture movement sideTo, draw picture start angle. Described step 22) specifically comprise: 22A) according to step 21), determine captionsDraw picture region; 22B) according to described polygon, captions are drawn as region and are divided into polygon exterior lateral area, polygonShape zone line, polygon medial region, and give corresponding subtitle property value by each region.
Optimally, described step 22B) described in each region give corresponding title value, whenDraw while pressing distance moving as benchmark, in the time that attribute is transparency α, can be: polygon exterior lateral area, transparentDegree α=1; Polygon medial region, transparency α=0; Polygon zone line, transparency α=B/A × 255,Or transparency α=1; Wherein, described B represents that polygon width value, A represent that described collection pixel distance is manyThe distance value of limit shape medial region.
Optimally,, described step 22B) described in each region give corresponding title value,In the time drawing picture benchmark by angular movement, in the time that attribute is transparency α, can be: polygon exterior lateral area, thoroughlyLightness α=1; Polygon medial region, transparency α=0; Polygon zone line, transparency α=θ '/θ × 255,Or transparency α=1; Wherein, described θ representative is drawn and is represented that as angle value, θ ' described collection pixel distance is polygonThe angle value of shape medial region.
Optimally, described step 23) specifically comprise: 23A) by described display pixel point positional value and polygonShape vector element positional value contrasts, as display pixel point positional value is less than polygon exterior lateral area positionValue, composes polygon exterior lateral area lateral areas thresholding to this pixel, as display pixel point positional value is greater than polygonShape medial region positional value, composes polygon medial region lateral areas thresholding to this pixel, as display pixel pointPositional value is polygon zone line, this pixel is composed to polygon mesozone thresholding.
Optimally, described step 21) specifically comprise: 21C) according to captions element number, at each wordIn curtain unit, carry out repetition pixel property assignment.
Optimally,, described step 21C) can also comprise: in the time realizing turbine special efficacy, caption windowDivision unit is two, carries out other caption window unit assignment according to image copying; When realizing fan special efficacyTime, caption window division unit is four, carries out other caption window unit assignment according to copy orderly.
The invention provides a kind of system that realizes captions special efficacy of dividing by polygon, it is characterized in that: instituteThe system of stating comprises: reference vector element property input block, pixel gather computing unit, comparison assignment listUnit, described pixel gathers computing unit, and the pixel after gathering is single according to the input of reference vector element propertyThe setting of unit to basis vector element, carries out comparison and the assignment of pixel by assignment unit relatively.
Wherein, described reference vector element property input block, for determining polygon type, generates baseThis polygon element reference vector element property, determines captions Hua Xiang district according to basic polygon vector elementTerritory. Described pixel gathers computing unit and is used for, and according to pixel position, obtains position, display pixel point positionThe value of putting. Described relatively assignment unit, for, by described display pixel point positional value and polygon element vectorElement positional value contrasts, and carries out pixel property assignment according to comparing result.
Wherein, caption window division unit, caption window assignment unit, described caption window division unitCarry out multiple division according to caption window, determine captions element number, caption window assignment unit is by basisThe quantity of caption window and assignment mode, carry out assignment to all caption windows.
Above technical scheme can find out, the present invention has the following advantages:
First, the present invention is by the calculating to the each pixel in each caption window, according to region comparisonMode each pixel is carried out to attribute assignment, only used basic ratio, assignment operation, thereby madeCalculating can rely on CPU and realize, and can not rely on GPU and realize.
Secondly, the present invention is by the division to pretreatment caption area inner polygon region, by polygonIn shape region, the mode of pixel entirety assignment, has simplified assignment procedure, and multiple assignment mode is provided simultaneously,Can, by mirror image and the assignment copying mode, in optimizing calculating, obtain more Special effects mode.
Brief description of the drawings
Fig. 1 is the inventive method the first embodiment flow chart;
Fig. 2 is the inventive method the second embodiment flow chart;
Fig. 3 is the inventive method the 3rd embodiment flow chart;
Fig. 4 is system schematic of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried outClear, complete description, obvious described embodiment is only a part of embodiment of the present invention, is notWhole embodiment, based on the embodiment in the present invention, those of ordinary skill in the art are not paying woundThe every other embodiment obtaining under the property made work prerequisite, belongs to the scope of protection of the invention.
Embodiment mono-:
Refer to Fig. 1,2, the inventive method the first embodiment, is divided and is realized captions special efficacy by polygonMethod realize the method for captions special efficacy " turbine ", spin special efficacy:
In the process of realization " turbine ", spin special efficacy effect, first, according to reference vector and polygonType, generates basic polygon element;
For turbine special efficacy, reference vector element is: triangle center point, and stroke picture window ranges,And enlighten angle, the anglec of rotation, and meanwhile, in order to simplify calculating, can be advanced for turbine special efficacyThe average division of row window, is divided into two windows in left and right, in a window, completes pixel assignment and calculating,Be mirrored in other window, for spin special efficacy, reference vector element is simultaneously: draw picture enlightenment positionPut, the elements such as rotary middle point, for this special efficacy because by hard-edge around central point rotating 360 degreesDraw image space formula, therefore window division is carried out in inconvenience.
Afterwards, according to gathered basic polygon vector element determine captions draw picture region, for " turbineSpecial efficacy " caption window draw as region be two, for " spin special efficacy " draw as region for not cutting apart,For former caption window region, for rectangle and circle shape, it is two that caption window is drawn as region.
Afterwards, in each unit, carry out pixel draw picture calculate, determine hard-edge, soft limit and initial position,Initial image width degree and the start angle drawn, waits vector element attribute and special efficacy parameter; According to described hard-edge,Soft limit is drawn captions as region and is divided into territory, hard-edge lateral areas, hard soft limit zone line, soft edge regions, and will be everyCorresponding subtitle property value is given in individual region; Need obtain common stroke of picture special effects, drawing picture benchmark need be by distanceMode is moved, and in the time that attribute is transparency α, grade can be by 1~255 time, and wherein 1 is opaque, and 255 areAll-transparent, therefore in caption window by hard-edge, soft limit and draw image width degree, just window is divided for theOne region, second area, the 3rd region. Judge the position of screen capture pixel, wherein, gather pixelLocation point, by comparison position value, is less than the positional value of hard-edge, and therefore, first area is territory, hard-edge lateral areas,Transparency α=1, pixel assignment transparency α=1, these region point captions will manifest completely; By comparing positionThe value of putting, is greater than the positional value on soft limit, therefore, the 3rd territory, hard-edge lateral areas, region, transparency α=0, pixel is composedValue transparency α=0, captions are completely transparent, do not manifest; Be greater than hard-edge and be less than soft limit, therefore, second areaIn, transparency α=B/A × 255, pixel assignment transparency α analog value, it is transparent and translucent that captions belong toState, by above method, carries out assignment to the each pixel in caption window;
After basic captions unit assignment, other unit are carried out to assignment, obtain in all caption areasPixel sets attribute, plays up every frame picture afterwards, and plays and show continuously.
Embodiment bis-:
Refer to Fig. 3, the inventive method the second embodiment, divides the side that realizes captions special efficacy by polygonMethod realizes the method for captions special efficacy " fan " special efficacy:
In the process of realization " fan " special efficacy effect, first, according to reference vector and polygon type,Generate basic polygon element;
Comprise for fan reference vector element: the initial point of rotation, hard-edge position, in fan special efficacy,First, be by caption window along 4 regions of diagonal division, and with the most initial conversion of catercorner lengthHard-edge length.
Afterwards, according to gathered basic polygon vector element determine captions draw picture region, for " fan "Special efficacy caption window is drawn picture along diagonal and is divided, and decomposition region is four.
Afterwards, draw picture calculating to carrying out pixel in each unit, its method is method described in embodiment mono-Unanimously, no longer repeat herein.
Embodiment tetra-:
The invention provides a kind of system that realizes captions special efficacy by pixel assignment, it is characterized in that: described inSystem comprises: reference vector element property input block, pixel gather computing unit, comparison assignment unit,Described pixel gathers computing unit, by the pixel after gathering according to reference vector element property input block pairThe setting of basis vector element, carries out comparison and the assignment of pixel by assignment unit relatively.
Wherein, described reference vector element property input block, for determining polygon type, generates baseThis polygon element reference vector element property, determines captions Hua Xiang district according to basic polygon vector elementTerritory. Described pixel gathers computing unit and is used for, and according to pixel position, obtains position, display pixel point positionThe value of putting. Described relatively assignment unit, for, by described display pixel point positional value and polygon element vectorElement positional value contrasts, and carries out pixel property assignment according to comparing result.
Wherein, caption window division unit, caption window assignment unit, described caption window division unitCarry out multiple division according to caption window, determine captions element number, caption window assignment unit is by basisThe quantity of caption window and assignment mode, carry out assignment to all caption windows.
Claims (11)
1. divide by polygon a method that realizes captions special efficacy, it is characterized in that: step is specifically wrappedDraw together:
1), according to reference vector element and polygon type, generate basic polygon vector element;
2) the each pixel attribute in every frame caption window inner polygon region is carried out to assignment, and record is everyIndividual some property value, forms basic array;
3) pick up the next polygonal region in caption window, carry out basic array operation, obtain that these are manyThe each pixel attribute of pixel in shape region, limit;
Described step 2) in specifically comprise:
21) according to basic polygon vector element determine captions draw picture region;
22), according to pixel positional value, obtain display pixel point positional value;
23) described display pixel point positional value and vector element regional value are contrasted, according to contrast knotFruit carries out pixel property assignment;
Described step 23) specifically comprise:
23A) described display pixel point positional value and vector element regional value are contrasted, as display pixelPoint positional value is less than polygon exterior lateral area positional value, this pixel is composed to territory, polygon exterior lateral area lateral areasValue, as display pixel point positional value is greater than polygon medial region positional value, composes polygon to this pixelMedial region lateral areas thresholding, if display pixel point positional value is polygon zone line, composes this pixelPolygon mesozone thresholding.
2. method as described in claim 1, is characterized in that: described step 1) in: described benchmarkVector element comprises: point, line and multiple spot, multi-thread and by the shape changeable region in multi-thread besieged city.
3. method as described in claim 1, is characterized in that: described step 1) in: described polygonShape type can be: triangle, rectangle, fan-shaped.
4. method as described in claim 1, is characterized in that: described step 2) in can also comprise:
Carry out multiple division according to caption window, determine captions element number.
5. method as described in claim 1, is characterized in that described step 21) specifically comprise:
21A) special efficacy parameter is read;
21B) determine reference vector hard-edge initial position, initially draw image width degree, initially rotate basic point, initialThe anglec of rotation.
6. method as described in claim 5, is characterized in that described step 21A) described in special efficacyParameter can be: direction of rotation or stroke picture moving direction, stroke picture start angle.
7. method as described in claim 1, is characterized in that described step 22) specifically comprise:
22A) according to step 21), determine captions draw picture region;
22B) according to described polygon, captions are drawn as region and are divided in the middle of polygon exterior lateral area, polygonRegion, polygon medial region, and give corresponding subtitle property value by each region.
8. method as described in claim 7, is characterized in that described step 22B) described inCorresponding title value is given in each region, in the time that a stroke picture benchmark is pressed distance moving, when attribute is transparentWhen degree α, can be:
Polygon exterior lateral area, transparency α=1;
Polygon medial region, transparency α=0;
Polygon zone line, transparency α=B/A × 255 or transparency α=1;
Wherein, described B represents that polygon width value, A representative gather pixel distance polygon medial regionDistance value.
9. method as described in claim 7, is characterized in that described step 22B) described inCorresponding title value is given in each region, in the time drawing picture benchmark by angular movement, when attribute is transparentWhen degree α, can be:
Polygon exterior lateral area, transparency α=1;
Polygon medial region, transparency α=0;
Polygon zone line, transparency α=θ '/θ × 255 or transparency α=1;
Wherein, picture angle value is drawn in described θ representative, θ ' representative gathers pixel distance polygon medial regionAngle value.
10. method as described in claim 5, is characterized in that described step 21) specifically comprise:
21C) according to captions element number, in each captions unit, carry out repetition pixel property assignment.
11. according to the method described in claim 10, it is characterized in that described step 21C) also canTo comprise: in the time realizing turbine special efficacy, caption window division unit is two, carries out it according to image copyingHis caption window unit assignment; In the time realizing fan special efficacy, caption window division unit is four, according to suitableOrder copies carries out other caption window unit assignment.
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 CN102724421A (en) | 2012-10-10 |
CN102724421B true 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)
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 |
-
2011
- 2011-05-17 CN CN201110126954.3A patent/CN102724421B/en not_active Expired - Fee Related
Patent Citations (5)
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 |
---|---|
CN102724421A (en) | 2012-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9030534B2 (en) | Apparatus and method of displaying 3-dimensional image | |
CN104103089A (en) | Real-time soft shadow realization method based on image screen space | |
CN1942902A (en) | Ghost artifact reduction for rendering 2.5D graphics | |
US20060087556A1 (en) | Stereoscopic image display device | |
CN102572391B (en) | Method and device for genius-based processing of video frame of camera | |
CN104407384B (en) | Seismic section display method | |
CN102736947A (en) | Multithread realization method for rasterization stage in graphic rendering | |
US20180249145A1 (en) | Reducing View Transitions Artifacts In Automultiscopic Displays | |
CN102724421B (en) | A kind of method and system that realize captions special efficacy of dividing by polygon | |
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 | |
CN102724417B (en) | Method and system for realizing caption special effect in louver mode | |
CN105812881A (en) | User interface window processing method and system and television set | |
CN102724415B (en) | A kind of alternating expression realizes the method and system of caption special effect | |
CN102724412B (en) | Method and system for realizing special effect of caption by pixel assignment | |
CN102739976B (en) | A kind of method and system of the realization of the dynamic two-dimensional caption of shade | |
CN102724416B (en) | A kind of method and system being realized caption special effect by Region dividing | |
US9269174B2 (en) | Methods and systems for generating a polygon mesh | |
CN102724444B (en) | Method and system for square object mode transformation of two-dimensional caption | |
CN110278439A (en) | De-watermarked algorithm based on inter-prediction | |
WO2015120032A1 (en) | Reducing view transition artifacts in automultiscopic displays | |
CN103957402B (en) | A kind of real-time full HD 2D turns 3D system row read-write sequence method for designing | |
CN102110307A (en) | Method for realizing real-time information wandering in three-dimensional scene | |
KR102135671B1 (en) | Method of servicing virtual indirect advertisement and apparatus for the same | |
CN102724420B (en) | Method and system for realizing dynamic two-dimensional caption by filter conversion |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20160504 Termination date: 20200517 |