CN110363832A - Method for generating captions and device - Google Patents

Method for generating captions and device Download PDF

Info

Publication number
CN110363832A
CN110363832A CN201910671849.4A CN201910671849A CN110363832A CN 110363832 A CN110363832 A CN 110363832A CN 201910671849 A CN201910671849 A CN 201910671849A CN 110363832 A CN110363832 A CN 110363832A
Authority
CN
China
Prior art keywords
subtitle
size
picture
display interface
screen
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
CN201910671849.4A
Other languages
Chinese (zh)
Other versions
CN110363832B (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.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co 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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201910671849.4A priority Critical patent/CN110363832B/en
Publication of CN110363832A publication Critical patent/CN110363832A/en
Application granted granted Critical
Publication of CN110363832B publication Critical patent/CN110363832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

This application discloses a kind of method for generating captions and devices, comprising: according to the text that user inputs, generates off screen subtitle picture;Wherein, off screen subtitle picture is the subtitle picture for being stored in memory and not appearing on display interface;The font size of off screen subtitle is according to the resolution setting of display interface and the font size of off screen subtitle is not less than font size threshold value;By the size of the caption area of the size reduction of off screen subtitle picture to user display interface adjusted, final subtitle picture is obtained;Final subtitle picture is shown in user's caption area adjusted.When reducing due to subtitle picture, the clarity of subtitle will not be reduced.And the font size of off screen subtitle is according to the resolution setting of display interface in the application and the font size of off screen subtitle is not less than font size threshold value, when the size for the caption area that off screen subtitle picture is therefore contracted to current display interface, the clarity of off screen subtitle will not be reduced.

Description

Method for generating captions and device
Technical field
The present invention relates to MultiMedia Field more particularly to a kind of method for generating captions and device.
Background technique
With the continuous development of multimedia related technologies, in the multimedia software such as many live streaming platforms, video production platform, All has the function of adding and adjust subtitle in the display interface.For example, main broadcaster can add in some live streaming platforms Subtitle is illustrated the content of current live, the interaction effect between enhancing and spectators.Meanwhile main broadcaster can also be to addition subtitle Size be adjusted setting, in order to spectators viewing.
In the prior art, when user is adjusted the size of the subtitle of addition, it will usually show boundary using mouse drag The mode of caption area on face is adjusted.The size of subtitle in caption area, can be with the change of caption area size And adaptable change, user need to only adjust caption area to the size needed for oneself, what subtitle will be adapted is adjusted to Size needed for user.However, being to allow the subtitle in caption area with picture in fact when carrying out drag operation to caption area Form amplifies, and there is no the font sizes for changing subtitle itself.Such as the font size of subtitle is No. 36, to the caption area of the subtitle It is directly to be amplified to the subtitle picture of No. 36 sizes when pulling amplification.Therefore the subtitle picture of small type size is pulled into amplification When, the clarity of subtitle can reduce.
Summary of the invention
Based on above-mentioned the deficiencies in the prior art, present applicant proposes a kind of method for generating captions and devices, are improved with realizing The clarity of subtitle.
To solve the above problems, the scheme now proposed is as follows:
First aspect present invention discloses a kind of method for generating captions, comprising:
According to the text that user inputs, off screen subtitle picture is generated;Wherein, the off screen subtitle picture is to be stored in memory In and do not appear in the subtitle picture on display interface;The resolution setting of the font size foundation display interface of the off screen subtitle, And the font size of the off screen subtitle is not less than font size threshold value;
By the size of the caption area of the size reduction of the off screen subtitle picture to user's display interface adjusted, obtain To final subtitle picture;
The final subtitle picture is shown in user caption area adjusted.
Optionally, in above-mentioned method for generating captions, the size of the caption area of user's display interface adjusted Calculation, comprising:
The distance that drag operation and movement are executed according to user, calculates the subtitle of user display interface adjusted The size in region, wherein the drag operation of the user is used to adjust the size of the caption area of the display interface.
Optionally, in above-mentioned method for generating captions, the size reduction by the off screen subtitle picture to user's tune The size of the caption area of display interface after whole obtains final subtitle picture, comprising:
According to the size of the caption area of user display interface adjusted and the ruler of the off screen subtitle picture It is very little, picture scaling is calculated;
It is according to the picture scaling, the size reduction of the off screen subtitle picture is adjusted aobvious to the user The size for showing the caption area at interface obtains the final subtitle picture.
Optionally, described according to the picture scaling in above-mentioned method for generating captions, by the off screen subtitle figure The size reduction of piece to user display interface adjusted caption area size, obtain the final subtitle picture, Include:
According to the picture scaling, using Image Zooming Algorithm by the size reduction of the off screen subtitle picture to institute The size for stating the caption area of user's display interface adjusted obtains the final subtitle picture.
Optionally, in above-mentioned method for generating captions, the off screen subtitle is drawn using vector graphics rendering algorithm.
Second aspect of the present invention discloses a kind of caption generation device, comprising:
Generation unit, the text for being inputted according to user generate off screen subtitle picture;Wherein, the off screen subtitle figure Piece is the subtitle picture for being stored in memory and not appearing on display interface;The font size of the off screen subtitle is according to display circle The font size of the resolution setting in face and the off screen subtitle is not less than font size threshold value;
First reducing unit, for by the size reduction of the off screen subtitle picture to user's display interface adjusted The size of caption area obtains final subtitle picture;
Display unit, for showing the final subtitle picture in user caption area adjusted.
Optionally, in above-mentioned caption generation device, further includes:
First computing unit calculates user's adjustment for executing the distance of drag operation and movement according to user The size of the caption area of display interface afterwards, wherein the drag operation of the user is used to adjust the word of the display interface The size in curtain region.
Optionally, in above-mentioned caption generation device, first reducing unit, comprising:
Second computing unit, for according to the size of the caption area of user display interface adjusted and described The size of off screen subtitle picture, is calculated picture scaling;
Second reducing unit is used for according to the picture scaling, extremely by the size reduction of the off screen subtitle picture The size of the caption area of user's display interface adjusted obtains the final subtitle picture.
Optionally, in above-mentioned caption generation device, second reducing unit, comprising:
Second reduces subelement, for according to the picture scaling, using Image Zooming Algorithm by the off screen word Curtain picture size reduction to user display interface adjusted caption area size, obtain the final subtitle figure Piece.
Optionally, in above-mentioned caption generation device, the off screen subtitle is drawn using vector graphics rendering algorithm.
It can be seen from the above technical proposal that in method for generating captions provided by the present application, according to the text that user inputs, Generate off screen subtitle picture.Wherein, off screen subtitle picture is the subtitle figure for being stored in memory and not appearing on display interface Piece;The font size of off screen subtitle is according to the resolution setting of display interface and the font size of off screen subtitle is not less than font size threshold value.It will be from Shield subtitle picture size reduction to user's display interface adjusted caption area size, obtain final subtitle picture; And final subtitle picture is shown in the caption area of user's display interface adjusted.When being reduced due to subtitle picture, no The clarity of subtitle can be reduced.And resolution setting and off screen word of the font size of off screen subtitle according to display interface in the application The font size of curtain is not less than font size threshold value, therefore off screen subtitle picture is contracted to the size of the caption area of current display interface When, the clarity of off screen subtitle will not reduce.It solves in the prior art, since user increases the caption area of display interface When size, cause subtitle clarity decline the problem of.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the effect pair for pulling the subtitle and the subtitle that font size amplification is adjusted through user of amplification through user in the prior art Compare schematic diagram;
Fig. 2 is a kind of flow diagram of method for generating captions disclosed by the embodiments of the present invention;
Fig. 3 is a kind of schematic diagram of off screen subtitle picture disclosed by the embodiments of the present invention;
Fig. 4 is the schematic diagram that a kind of subtitle disclosed by the embodiments of the present invention pulls adjustment process;
Fig. 5 is the flow diagram for the method that a kind of pair of off screen subtitle picture disclosed by the embodiments of the present invention is reduced;
Fig. 6 is a kind of structural schematic diagram of caption generation device disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In the prior art, the size for adjusting the subtitle of display interface mainly passes through two ways.First way is to aobvious Show that the font size of the subtitle at interface is configured, to realize the size of adjustment subtitle.But this mode is by being arranged after font size again The effect for observing the subtitle presented, just knows whether the font size of current setting is suitable.Therefore it needs to obtain by repeatedly debugging To the size of customer satisfaction system subtitle.
The second way is adjusted by the way of the caption area on mouse drag display interface.When user pulls When the size of the caption area at Zoom display interface, the size of the subtitle in caption area can changing with caption area size Become and adaptable change.Second way user can observe the variation of the size of subtitle in real time during the adjustment, can Easily subtitle is adjusted to size needed for user.It is to allow word in fact however, when the second way zooms in and out subtitle Subtitle in curtain region is amplified in the form of picture, and there is no the font sizes for changing subtitle itself.Such as the font size of subtitle is No. 36, be directly to amplify to the subtitle picture of No. 36 sizes when pulling amplification to the caption area of the subtitle.Refering to fig. 1, It can be seen that when the subtitle dragging by No. 36 is amplified to the size as No. 72 subtitles, it is clear that the clarity of No. 36 subtitles is more It is low.Because the clarity of subtitle can reduce when subtitle picture is pulled amplification.
If user re-starts setting, example to the font size for pulling amplified subtitle using first way again at this time The font size that No. 36 words of amplification are pulled in Fig. 1 No. 50 words are rearranged into such as, at this time subtitle can be according to current setting Font size adjusts the size of subtitle, and user by repeatedly attempting, until setting No. 72 words for font size, can just obtain user again The size for the subtitle for needing to present.
Therefore, the first subtitle adjustment mode is needed by repeatedly attempting that font size, word needed for just capable of obtaining user is arranged Curtain size, the process of adjustment are complex.Although subtitle easily can be adjusted to user by second of subtitle adjustment mode Required size, but when the dragged amplification of subtitle picture, subtitle clarity can decline again.Both subtitle adjustment modes are not High definition subtitle needed for user capable of simply being obtained.
Based on above-mentioned the problems of the prior art, referring to Fig.2, the embodiment of the present application discloses a kind of method for generating captions, Can be applied to tablet computer, mobile phone, laptop etc. has in the electronic equipment of display screen, specifically includes the following steps:
S201, the text inputted according to user, generate off screen subtitle picture.
Wherein, off screen subtitle picture is the subtitle picture for being stored in memory and not appearing on display interface.Off screen word The font size of curtain is according to the resolution setting of display interface and the font size of off screen subtitle is not less than font size threshold value.Off screen subtitle picture Length-width ratio with the length-width ratio of the caption area of display interface be it is equal, therefore off screen subtitle picture according to a certain percentage into Row scaling is adjustable into the size of the caption area of display interface.Wherein, off screen subtitle picture contracts according to a certain percentage It puts and refers to that the length of off screen subtitle picture scales according to a certain percentage and the width of off screen subtitle picture is also in same ratio Scaling.The size of picture refers to the length of picture and the width of picture.By the size adjusting of off screen subtitle picture at display circle The size of the caption area in face refers to the length by the length adjustment of off screen subtitle picture at the caption area of display interface, By the width adjustment of off screen subtitle picture at the width of the caption area of display interface.The size and off screen word of off screen subtitle picture The font size correlation of curtain.The font size of off screen subtitle is bigger, and the size of off screen subtitle picture is bigger.
When the font size of off screen subtitle is greater than or equal to font size threshold value, illustrate the font size of off screen subtitle for current display It is a sufficiently large font size for interface.When the sufficiently large off screen subtitle picture of font size is reduced, subtitle it is clear Degree not will receive too big influence.Therefore the font size of off screen subtitle is arranged to the value not less than font size threshold value, then to off screen subtitle Picture is reduced, the subtitle of available high definition.
And for different display interfaces, the sufficiently large standard of the font size of off screen subtitle is also different, therefore off screen subtitle Font size threshold value be the Multiple factors such as the resolution ratio for considering display interface, display interface size and set, when off screen subtitle Font size when be greater than or equal to font size threshold value, clarity will not reduce after off screen subtitle picture at this time reduces.For phase For the display interface of size, the font size threshold value of the higher display interface of resolution ratio is lower;High-resolution display interface Illustrate that clarity is higher, even if therefore the font size of subtitle is not very big, it appears that also than more visible.In addition, font size threshold value is also examined The other factors such as the size of display interface are considered.The off screen subtitle picture that step S201 is generated needs to account for the biggish of display interface Ratio.For example, when user gets the text of " my direct broadcasting room of Custom House Welcome to Custom House ", the font size of off screen subtitle is set at this time refering to Fig. 3 When being set to 200 pixel, the length of off screen subtitle picture is exactly equal to the length of display interface, if font size is greater than 200 pixels, that The length of off screen subtitle picture will be more than the length of display interface.It can thus be assumed that the font size of off screen subtitle is 200 pixels When, it is a sufficiently large font size for display interface, font size threshold value can be set by 200 pixels.
It should also be noted that, the text that user inputs in step S201, is inputted in the caption area of display interface Text, electronic equipment according to user display interface caption area input text, in the caption area of display interface Draw subtitle.In addition, electronic equipment also performs step S201, i.e., the text inputted according to user generates off screen subtitle figure Piece.Wherein, the attributes such as font size, font, background of subtitle in the caption area of display interface can be artificially configured.And off screen The attributes such as font size, background, the font of subtitle can also be taking human as being configured.The font size of off screen subtitle may be configured as being greater than or equal to The value of font size threshold value, the attributes such as background, the font of off screen subtitle then can be set to the subtitle in the caption area with display interface It is identical.
Optionally, in one specific embodiment of the application, off screen subtitle is drawn using vector graphics rendering algorithm.Tool Body, according to the text that user inputs, off screen subtitle is drawn out using vector graphics rendering algorithm.Vector graphics rendering algorithm makes Figure is described with straight line and curve, the element of these figures is some points, line, rectangle, polygon, circle and camber line etc., it Be all by mathematical formulae calculate obtain.Off screen subtitle is drawn using vector graphics rendering algorithm, off screen subtitle can be made Clarity is higher, and no matter amplifying, reduce or rotating etc. will not be distorted.It is calculated used by off screen subtitle it should be noted that drawing Method includes but is not limited to content provided by the embodiments of the present application.
S202, by the size of the caption area of the size reduction of off screen subtitle picture to user's display interface adjusted, Obtain final subtitle picture.
Since final subtitle picture is got by the diminution of off screen subtitle picture, the final subtitle that step S202 is obtained Picture is also to exist only in memory, do not appear in picture on display interface.It should be noted that downscaled images refer to logarithm The process that the size of word image is adjusted, its smoothness and clarity will be enhanced by reducing an image.Therefore work as off screen When subtitle picture is contracted to the size of the caption area of user's display interface adjusted, obtained final subtitle picture it is clear Degree will not reduce.
Specifically, refering to Fig. 4, user can pass through the first corner 401, the second corner of the subtitle frame of dragging display interface 402, any one angle in third corner 403 and the 4th corner 404, come adjust display interface caption area size. Wherein, the subtitle frame of display interface is the word that electronic equipment real-time rendering goes out when user chooses the caption area of display interface Curtain frame.When user completes to adjust the dragging of the caption area of display subtitle, when no longer choosing the caption area of display subtitle, word Curtain frame can be not displayed on display interface.If can then be dragged by mouse applied in laptop, desktop computer It drags.If then being pulled by touching screen applied in tablet computer, mobile phone.Distinct electronic apparatuses can be used different Pulling mode is operated.It should be noted that after user pulls the caption area of display interface adjusted length and width Than be it is constant, only can zoom in or out according to a certain percentage.Optionally, user pulled the first corner 401 in Fig. 4, In second corner 402, third corner 403 and the 4th corner 404 behind any one corner, it is adjusted can also to pull mobile subscriber The caption area of display interface is located at the position of display interface, by the caption area of user's display interface adjusted adjust to Family desired position.
It should also be noted that, the attribute of the caption area of the display interface before user's adjustment is artificially to be configured 's.Wherein, the attribute of the caption area of display interface include the initial font size of subtitle in the caption area of display interface size, Background picture, font, length-width ratio of caption area of display interface etc..The initial font size of subtitle in the caption area of display interface Size and the relationship of size of caption area of display interface with off screen subtitle be identical.The font size of off screen subtitle is bigger, The size of off screen subtitle is also bigger.Likewise, the initial font size setting of subtitle in the caption area of display interface is bigger, that The size of the caption area of display interface is also bigger.
Since the font size of the off screen subtitle in step S201 is the resolution setting according to display interface and is not less than font size The value of threshold value, therefore the font size of off screen subtitle is a sufficiently large font size for display interface, therefore regardless of user The caption area of display interface is carried out pulling amplification or pull the operation of diminution, the caption area of display interface Size is not more than the size of off screen subtitle picture always.Therefore, when executing step S202, by the size adjusting of off screen subtitle picture It is the operation reduced to off screen subtitle picture for the size of the caption area of user's display interface adjusted.
Optionally, refering to Fig. 5, in one specific embodiment of the application, a kind of embodiment of step S202, packet are executed It includes:
S501, according to the size of the caption area of user's display interface adjusted and the size of off screen subtitle picture, Picture scaling is calculated.
Specifically, electronic equipment by respectively obtain user's display interface adjusted caption area size and from The size for shielding subtitle picture, by the size of the caption area of user's display interface adjusted and the size of off screen subtitle picture The size of ratio or off screen subtitle picture and the ratio of the size of the caption area of user's display interface adjusted are determined as Picture scaling.It should be noted that obtain user's display interface adjusted caption area size and obtain from The sequencing for shielding the size of subtitle picture does not influence the realization of the embodiment of the present application.
Optionally, in one specific embodiment of the application, the size of the caption area of user's display interface adjusted Calculation, comprising:
The distance that drag operation and movement are executed according to user, calculates the caption area of user's display interface adjusted Size.
Wherein, the drag operation of user is used to adjust the size of the caption area of display interface.
Refering to Fig. 4, when user pulls the position of 401 to the 5th corner 405 of the first corner, the caption area of display interface Dragged amplification.Pass through the distance between the first corner 401 and the 5th corner 405 and the first corner 401, the second corner 402, the size for the caption area that third corner 403 and the 4th corner 404 determine, can calculate display interface adjusted Caption area size.Specifically, it can be counted by the coordinate value of the first corner 401 and the coordinate value of the 5th corner 405 Calculate the first corner 401 between the 5th corner 405 at a distance from, and then calculate the caption area of user's display interface adjusted Size.It should be noted that there are many mode for calculating the size of the caption area of user's display interface adjusted, including But it is not limited only to the scheme of above-described embodiment proposition.
S502, according to picture scaling, by the size reduction of off screen subtitle picture to user's display interface adjusted Caption area size, obtain final subtitle picture.
When executing step S502, the picture scaling that off screen subtitle picture is obtained according to step S501 is reduced, will The size adjusting of off screen subtitle picture is the size of the caption area of user's display interface adjusted.
Specifically, executing a kind of embodiment of step S502 in one specific embodiment of the application, comprising:
It, will be after the size reduction of off screen subtitle picture to user's adjustment using Image Zooming Algorithm according to picture scaling Display interface caption area size, obtain final subtitle picture.
Wherein, Image Zooming Algorithm includes bilinear interpolation algorithm, nearest neighbor algorithm, bicubic interpolation algorithm etc..Image The principle of scaling is that the pixel value of target image is calculated by picture scaling according to the pixel value of original image.It needs Illustrate, it, can be with other than it can be zoomed in and out according to picture scaling using Image Zooming Algorithm in practical application It is calculated using other rule and picture is zoomed in and out.
S203, final subtitle picture is shown in the caption area of user's display interface adjusted.
When executing step S203, the final subtitle picture being present in memory that step S202 is obtained is shown in user's tune The caption area of display interface after whole.Although final subtitle picture is got by the diminution of off screen subtitle picture, final The size of subtitle picture with the size of the caption area of user's display interface adjusted be it is equal, therefore, user is showing The effect seen on interface are as follows: when user pulls the size of the caption area of amplification display interface, the caption area of display interface In subtitle with the becoming large-sized for caption area of display interface and equal proportion becomes larger, and user pulls and reduces display interface When the size of caption area, subtitle in the caption area of display interface become smaller with the size of the caption area of display interface and Equal proportion becomes smaller, though the size of the font size of i.e. subtitle can the drag operation of user occur adaptable change, user can according to from The demand of body adjusts the size of the subtitle of display interface to the size needed for oneself by pulling.Also, it is different from existing skill Operation directly is zoomed in and out to the subtitle picture of display interface in art, is presented in the caption area of display interface in the application Final subtitle picture is to be got by the diminution of off screen subtitle picture, therefore user either contracts the caption area of display interface Small or amplification, the subtitle clarity on display interface will not all reduce.
In addition, change the method for size of caption by the way that font size size is directly arranged compared to existing another kind, this Shen Please the size of caption adjustment process in embodiment on display interface seem more intuitive.Also, the word of existing setting subtitle Number selection be limited, be divided into limited multiple grades, such as No. 16 words, No. 18 words, No. 20 words etc..But the embodiment of the present application The subtitle of middle display interface can be adjusted to arbitrary size according to the drag operation of user, and the process for pulling amplification does not have font size etc. The limitation of grade.
In method for generating captions provided by the present application, according to the text that user inputs, off screen subtitle picture is generated.Wherein, Off screen subtitle picture is the subtitle picture for being stored in memory and not appearing on display interface;The font size foundation of off screen subtitle The font size of the resolution setting of display interface and off screen subtitle is not less than font size threshold value.By the size reduction of off screen subtitle picture To the size of the caption area of user's display interface adjusted, final subtitle picture is obtained;And final subtitle picture is shown In the caption area of user's display interface adjusted.When reducing due to subtitle picture, the clarity of subtitle will not be reduced.And The font size of off screen subtitle is according to the resolution setting of display interface in the application and the font size of off screen subtitle is not less than font size threshold Value, therefore when the size for the caption area that off screen subtitle picture is contracted to current display interface, the clarity of off screen subtitle is not It can reduce.It solves in the prior art, when increasing the size of the caption area of display interface due to user, leads to subtitle clarity The problem of decline.
Based on method for generating captions disclosed in above-mentioned the embodiment of the present application, the embodiment of the present application also correspondence discloses a kind of word Curtain generating means, refering to Fig. 6, the caption generation device 600 specifically include that generation unit 601, the first reducing unit 602 and Display unit 603.
Generation unit 601, the text for being inputted according to user generate off screen subtitle picture.Wherein, off screen subtitle picture To be stored in memory and not appearing in the subtitle picture on display interface;Point of the font size of off screen subtitle according to display interface The font size of resolution setting and off screen subtitle is not less than font size threshold value.
Optionally, in one specific embodiment of the application, off screen subtitle is drawn using vector graphics rendering algorithm.
First reducing unit 602, for by the size reduction of off screen subtitle picture to user's display interface adjusted The size of caption area obtains final subtitle picture.
Optionally, in one specific embodiment of the application, the first reducing unit 602, comprising: the second computing unit and second Reducing unit.
Second computing unit, for the size and off screen subtitle according to the caption area of user's display interface adjusted Picture scaling is calculated in the size of picture.
Second reducing unit, for according to picture scaling, the size reduction of off screen subtitle picture to user to be adjusted The size of the caption area of display interface afterwards obtains final subtitle picture.
Optionally, in one specific embodiment of the application, the second reducing unit, comprising:
Second reduces subelement, for according to picture scaling, using Image Zooming Algorithm by off screen subtitle picture Size reduction to user's display interface adjusted caption area size, obtain final subtitle picture.
Display unit 603, for showing final subtitle picture in user's caption area adjusted.
Optionally, in one specific embodiment of the application, caption generation device 600 further include:
It is adjusted to calculate user for executing the distance of drag operation and movement according to user for first computing unit The size of the caption area of display interface, wherein the drag operation of user is used to adjust the size of the caption area of display interface.
It the specific principle of each unit and subelement in caption generation device disclosed in the embodiments of the present invention and holds Row process, it is identical as method for generating captions disclosed in the embodiments of the present invention, reference can be made to disclosed in the embodiments of the present invention Corresponding part, is not discussed here in method for generating captions.
In caption generation device 600 provided by the present application, the text that generation unit 601 is inputted according to user generates off screen Subtitle picture.Wherein, off screen subtitle picture is the subtitle picture for being stored in memory and not appearing on display interface;Off screen The font size of subtitle is according to the resolution setting of display interface and the font size of off screen subtitle is not less than font size threshold value.First reduces list Member 602 obtains the size of the caption area of the size reduction of off screen subtitle picture to user's display interface adjusted final Subtitle picture.Display unit 603 shows final subtitle picture in the caption area of user's display interface adjusted.Due to When subtitle picture reduces, the clarity of subtitle will not be reduced.And point of the font size of off screen subtitle according to display interface in the application The font size of resolution setting and off screen subtitle is not less than font size threshold value, therefore the first reducing unit 602 reduces off screen subtitle picture To the caption area of current display interface size when, the clarity of off screen subtitle will not reduce.Solve in the prior art, by In user increase display interface caption area size when, cause subtitle clarity decline the problem of.
Professional technician can be realized or using the present invention.Profession of the various modifications to these embodiments to this field It will be apparent for technical staff, the general principles defined herein can not depart from spirit or model of the invention In the case where enclosing, realize in other embodiments.Therefore, the present invention will not be limited to the embodiments shown herein, And it is to fit to the widest scope consistent with the principles and novel features disclosed herein.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.

Claims (10)

1. a kind of method for generating captions characterized by comprising
According to the text that user inputs, off screen subtitle picture is generated;Wherein, the off screen subtitle picture be stored in memory, And the subtitle picture on display interface is not appeared in;The font size of the off screen subtitle according to display interface resolution setting and The font size of the off screen subtitle is not less than font size threshold value;
By the size of the caption area of the size reduction of the off screen subtitle picture to user's display interface adjusted, obtain most Whole subtitle picture;
The final subtitle picture is shown in the caption area of user display interface adjusted.
2. the method according to claim 1, wherein the caption area of user display interface adjusted The calculation of size, comprising:
The distance that drag operation and movement are executed according to user, calculates the caption area of user display interface adjusted Size, wherein the drag operation of the user be used for adjust the display interface caption area size.
3. the method according to claim 1, wherein the size reduction by the off screen subtitle picture is extremely used The size of the caption area of family display interface adjusted obtains final subtitle picture, comprising:
According to the size of the caption area of user display interface adjusted and the size of the off screen subtitle picture, meter Calculation obtains picture scaling;
According to the picture scaling, by the size reduction of the off screen subtitle picture to user display circle adjusted The size of the caption area in face obtains the final subtitle picture.
4. according to the method described in claim 3, it is characterized in that, described according to the picture scaling, by the off screen The size reduction of subtitle picture to user display interface adjusted caption area size, obtain the final subtitle Picture, comprising:
According to the picture scaling, using Image Zooming Algorithm by the size reduction of the off screen subtitle picture to the use The size of the caption area of family display interface adjusted obtains the final subtitle picture.
5. method as claimed in any of claims 1 to 4, which is characterized in that the off screen subtitle uses polar plot Shape rendering algorithm is drawn.
6. a kind of caption generation device characterized by comprising
Generation unit, the text for being inputted according to user generate off screen subtitle picture;Wherein, the off screen subtitle picture is It is stored in memory and does not appear in the subtitle picture on display interface;The font size of the off screen subtitle is according to display interface The font size of resolution setting and the off screen subtitle is not less than font size threshold value;
First reducing unit, for by the subtitle of the size reduction of the off screen subtitle picture to user's display interface adjusted The size in region obtains final subtitle picture;
Display unit, for showing the final subtitle picture in user caption area adjusted.
7. device according to claim 6, which is characterized in that further include:
It is adjusted to calculate the user for executing the distance of drag operation and movement according to user for first computing unit The size of the caption area of display interface, wherein the drag operation of the user is used to adjust the subtitle region of the display interface The size in domain.
8. device according to claim 6, which is characterized in that first reducing unit, comprising:
Second computing unit, for the size and the off screen according to the caption area of user display interface adjusted Picture scaling is calculated in the size of subtitle picture;
Second reducing unit, for according to the picture scaling, by the size reduction of the off screen subtitle picture to described The size of the caption area of user's display interface adjusted obtains the final subtitle picture.
9. device according to claim 8, which is characterized in that second reducing unit, comprising:
Second reduces subelement, for according to the picture scaling, using Image Zooming Algorithm by the off screen subtitle figure The size reduction of piece to user display interface adjusted caption area size, obtain the final subtitle picture.
10. device according to any one of claims 6 to 9, which is characterized in that the off screen subtitle uses polar plot Shape rendering algorithm is drawn.
CN201910671849.4A 2019-07-24 2019-07-24 Subtitle generating method and device Active CN110363832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910671849.4A CN110363832B (en) 2019-07-24 2019-07-24 Subtitle generating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910671849.4A CN110363832B (en) 2019-07-24 2019-07-24 Subtitle generating method and device

Publications (2)

Publication Number Publication Date
CN110363832A true CN110363832A (en) 2019-10-22
CN110363832B CN110363832B (en) 2021-05-25

Family

ID=68220709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910671849.4A Active CN110363832B (en) 2019-07-24 2019-07-24 Subtitle generating method and device

Country Status (1)

Country Link
CN (1) CN110363832B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542903A (en) * 2021-07-16 2021-10-22 思享智汇(海南)科技有限责任公司 Subtitle generating method and device supporting font size self-adaption

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437121A (en) * 2008-12-19 2009-05-20 中兴通讯股份有限公司 Mobile terminal and method for implementing dynamic zoom of mobile phone television subtitling
CN102088571A (en) * 2009-12-07 2011-06-08 联想(北京)有限公司 Caption displaying method and terminal equipment
CN105959818A (en) * 2016-07-01 2016-09-21 上海幻电信息科技有限公司 Bullet screen display method and display system
CN106210854A (en) * 2016-07-08 2016-12-07 上海幻电信息科技有限公司 A kind of terminal and method for information display thereof
CN107707965A (en) * 2016-08-08 2018-02-16 广州市动景计算机科技有限公司 The generation method and device of a kind of barrage
CN108476341A (en) * 2016-01-26 2018-08-31 索尼公司 Receiving device, method of reseptance and sending device
CN109379631A (en) * 2018-12-13 2019-02-22 广州艾美网络科技有限公司 A method of passing through mobile terminal editor's video caption
US20190104259A1 (en) * 2017-09-29 2019-04-04 Apple Inc. Media editing application with anchored timeline for captions and subtitles

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437121A (en) * 2008-12-19 2009-05-20 中兴通讯股份有限公司 Mobile terminal and method for implementing dynamic zoom of mobile phone television subtitling
CN102088571A (en) * 2009-12-07 2011-06-08 联想(北京)有限公司 Caption displaying method and terminal equipment
CN108476341A (en) * 2016-01-26 2018-08-31 索尼公司 Receiving device, method of reseptance and sending device
CN105959818A (en) * 2016-07-01 2016-09-21 上海幻电信息科技有限公司 Bullet screen display method and display system
CN106210854A (en) * 2016-07-08 2016-12-07 上海幻电信息科技有限公司 A kind of terminal and method for information display thereof
CN107707965A (en) * 2016-08-08 2018-02-16 广州市动景计算机科技有限公司 The generation method and device of a kind of barrage
US20190104259A1 (en) * 2017-09-29 2019-04-04 Apple Inc. Media editing application with anchored timeline for captions and subtitles
CN109379631A (en) * 2018-12-13 2019-02-22 广州艾美网络科技有限公司 A method of passing through mobile terminal editor's video caption

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542903A (en) * 2021-07-16 2021-10-22 思享智汇(海南)科技有限责任公司 Subtitle generating method and device supporting font size self-adaption

Also Published As

Publication number Publication date
CN110363832B (en) 2021-05-25

Similar Documents

Publication Publication Date Title
US9218792B2 (en) Variable scaling of image data for aspect ratio conversion
US20130104076A1 (en) Zooming-in a displayed image
US7391423B1 (en) Thumbnail scaling based on display pane size
Liu et al. Adaptive image retargeting using saliency-based continuous seam carving
CN105511712B (en) A kind of image presentation method and device
CN103236035B (en) Based on the image magnification method without the bilateral quadratic B-spline interpolation of skew
WO2022057868A1 (en) Image super-resolution method and electronic device
CN105930052B (en) A kind of screenshot method and device
JP2013536455A (en) How to zoom the displayed image
CN101197957A (en) Non-linear image zooming method and system
CN104836956A (en) Processing method and device for cellphone video
JP2008067110A (en) Generation device for superresolution image
CN110969580A (en) Image display method and device
CN105930464A (en) Web rich media multi-screen adaptation method and apparatus
CN107274344B (en) Map zooming method and system based on resource distribution, memory and control equipment
CN110363832A (en) Method for generating captions and device
WO2016004667A1 (en) Super-resolution reconstruction method for enhancing smoothness and definition of video image
CN116860138B (en) Method for realizing synchronous scaling of electronic whiteboard content and background and processing terminal
CN109325909A (en) A kind of image magnification method and image amplifying device
WO2018040437A1 (en) Picture processing method and apparatus
CN104463941B (en) Object plotting method and device
TWI334588B (en) Method for displaying and enlarging character
CN106940634B (en) Screen resolution switching method and system
US20070146393A1 (en) System and method for re-sizing objects
CN103853530A (en) Method for quickly displaying medical image on browser

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210114

Address after: 510000 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 28th floor, block B1, Wanda Plaza, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20191022

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000052

Denomination of invention: Subtitle generation method and device

License type: Common License

Record date: 20210222

EE01 Entry into force of recordation of patent licensing contract
GR01 Patent grant
GR01 Patent grant