CN104994312A - Video generation method and device - Google Patents

Video generation method and device Download PDF

Info

Publication number
CN104994312A
CN104994312A CN201510415065.7A CN201510415065A CN104994312A CN 104994312 A CN104994312 A CN 104994312A CN 201510415065 A CN201510415065 A CN 201510415065A CN 104994312 A CN104994312 A CN 104994312A
Authority
CN
China
Prior art keywords
current
added
word
photo
video
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.)
Pending
Application number
CN201510415065.7A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201510415065.7A priority Critical patent/CN104994312A/en
Publication of CN104994312A publication Critical patent/CN104994312A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention discloses a video generation method and a video generation device, wherein the method comprises the following steps: obtaining one or more pictures of a video to be synthesized; aiming at each picture in all the obtained pictures, obtaining a character set to be added, and sequentially determining each character to be added as the current character to be added according to the sequential arrangement sequence of the characters to be added in the character set to be added; aiming at the current character to be added, judging whether the residual display width of the current line in the current picture is larger than or equal to the display width required by the current character to be added or not according to the width of the current picture and the size of the current character to be added; if so, drawing the current character to be added in the current line of the current picture; if not, drawing the current character to be added on the next line of the current line in the current picture; and after receiving a video generation instruction, generating a video by using all the obtained pictures. By applying the embodiment of the invention, the integrity of the characters to be added can be ensured, and the characters on the video can be displayed more clearly.

Description

A kind of video generation method and device
Technical field
The present invention relates to video technique field, particularly a kind of video generation method and device.
Background technology
Along with the development of electronic equipment, increasing user can utilize the electronic equipment such as mobile phone, panel computer to take pictures.Under normal circumstances, user can add word in captured photo, utilizes the photo generating video having added word.
At present, prior art provides three kinds of video generation methods.
First method: according to the width of photo, determines displayable word in word to be added; The displayable word determined is added in photo, utilizes the photo generating video having added word.Such as: user with the addition of in video " Be slow to promise and quick to perform. " such passage, in word length beyond blocking below directly from word excessive portion (" quick t ") during screen visible range, as shown in Figure 1, word below is so just caused to see again.
Second method: according to the width of photo, determines the point forcing line feed in word to be added; From this, word to be added is entered a new line; Word to be added after line feed is added in photo, utilizes the photo generating video having added word.But, adopting said method generating video, a word can be split under normal circumstances, a part for this word is shown at previous row, and a part shows in rear a line, can not ensure the integrality of word, such as: force the point of line feed after the letter " w " of word " password ", before letter " o ", then previous row display " passw ", rear a line display " ord ".
The third method: according to the width of photo, carries out convergent-divergent by word to be added, makes a line in photo can show word completely, is added in photo by the word to be added after convergent-divergent, utilizes the photo generating video having added word.But adopting said method generating video, when word is longer, the convergent-divergent carried out to allow word show completely, has allowed word become very little, is difficult to the content seeing word again clearly, as shown in Figure 2.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of video generation method and device, so that the word more clearly on display video.
For achieving the above object, the embodiment of the invention discloses a kind of video generation method, comprising:
Obtain one or more picture of video to be synthesized;
For each picture in all pictures obtained, perform word respectively and add operation, wherein, described word interpolation operation comprises:
Obtain word set to be added, in described word set to be added, comprise at least one word to be added;
Put in order according to the priority of word to be added in described word set to be added, successively each word to be added is defined as current word to be added;
For current word to be added, perform Word-Drawing operation respectively, wherein, described Word-Drawing operation comprises:
According to the width of photo current and the size of current word to be added, judge in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added;
If so, in photo current, current line draws current word to be added;
If not, in photo current, the next line of current line draws current word to be added;
The video receiving user's input generates instruction;
After receiving described video and generating instruction, utilize all pictures obtained, generating video.
Preferably, describedly to put in order according to the priority of word to be added in described word set to be added, successively each word to be added be defined as current word to be added, comprise:
According to byte and double-byte characters coding rule, according to 0 and 1 put in order in the binary sequence that described word set to be added is corresponding, the binary sequence corresponding to described word set to be added identifies;
When identifying Chinese character, the Chinese character identified is defined as current word to be added;
When identifying symbol, the symbol identified is defined as current word to be added;
When identifying English alphabet, continue the binary sequence corresponding to described word set to be added to identify, until identify non-English letter or numeral, the character string of the English alphabet identified and/or numeral composition is defined as current word to be added;
When identifying numeral, whether what identify before judging this numeral is English alphabet, if not, continue the binary sequence corresponding to described word set to be added to identify, until identify nonnumeric or ". ", the character string that the numeral identified and/or ". " form is defined as current word to be added.
Preferably, described current word to be added is the character string only containing English alphabet, or only containing character string that is digital and English alphabet, or the character string only containing numeral, or only containing the character string of numeral with ". ";
The size of the described width according to photo current and current word to be added, judges that in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added, comprising:
According to the width of photo current and the size of current string, judge in photo current, whether current line residue display width is more than or equal to display width needed for current string.
Preferably, described current word to be added is Chinese character;
The size of the described width according to photo current and current word to be added, judges that in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added, comprising:
According to the width of photo current and the size of current Chinese character, judge in photo current, whether current line residue display width is more than or equal to display width needed for current Chinese character.
Preferably, described current word to be added is symbol;
The size of the described width according to photo current and current word to be added, judges that in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added, comprising:
According to the width of photo current and the size of current sign, judge in photo current, whether current line residue display width is more than or equal to display width needed for current sign.
Preferably, before the video receiving user's input generates instruction, also comprise:
Receive the text point regulating command of user's input;
According to described text point regulating command, regulate the position of having added word in photo current.
Preferably, described text point regulating command, at least comprises following one of them or combination in any:
Left-justify, horizontal center, Right Aligns, vertical center, level and vertical center.
Preferably, utilize all pictures obtained, generating video, comprising:
Utilize all pictures obtained, adopt the video coding algorithm preset, generating video.
For achieving the above object, the embodiment of the invention also discloses a kind of video-generating device, comprising: picture obtains module, word adds module, video generates command reception module and video generation module, wherein,
Described picture obtains module, for obtaining one or more picture of video to be synthesized;
Described word adds module, comprising: word set to be added obtains submodule, current word determination submodule to be added, judges submodule and rendering submodule, wherein,
Described word set to be added obtains submodule, for obtaining each picture in all pictures of module acquisition for described picture, obtains word set to be added, comprises at least one word to be added in described word set to be added;
Described current word determination submodule to be added, puts in order for the priority obtaining word to be added in the word set to be added of submodule acquisition according to described word set to be added, successively each word to be added is defined as current word to be added;
Described judgement submodule, for the word current to be added determined for described current word determination submodule to be added, according to the width of photo current and the size of current word to be added, judge in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added;
Described rendering submodule, for when described judgement submodule judged result is for being, in photo current, current line draws current word to be added; When described judgement submodule judged result is no, in photo current, the next line of current line draws current word to be added;
Described video generates command reception module, generates instruction for the video receiving user's input;
Described video generation module, after receiving the video generation instruction of user's input, utilizes all pictures obtained, generating video for generating command reception module at described video.
Preferably, described current word determination submodule to be added, specifically for:
According to byte and double-byte characters coding rule, according to 0 and 1 put in order in the binary sequence that described word set to be added is corresponding, the binary sequence corresponding to described word set to be added identifies;
When identifying Chinese character, the Chinese character identified is defined as current word to be added;
When identifying symbol, the symbol identified is defined as current word to be added;
When identifying English alphabet, continue the binary sequence corresponding to described word set to be added to identify, until identify non-English letter or numeral, the character string of the English alphabet identified and/or numeral composition is defined as current word to be added;
When identifying numeral, whether what identify before judging this numeral is English alphabet, if not, continue the binary sequence corresponding to described word set to be added to identify, until identify nonnumeric or ". ", the character string that the numeral identified and/or ". " form is defined as current word to be added.
Preferably, described current word to be added is the character string only containing English alphabet, or only containing character string that is digital and English alphabet, or the character string only containing numeral, or only containing the character string of numeral with ". ";
Described judgement submodule, specifically for:
For current string, according to the width of photo current and the size of current string, judge in photo current, whether current line residue display width is more than or equal to display width needed for current string.
Preferably, described current word to be added is Chinese character;
Described judgement submodule, specifically for:
For current Chinese character, according to the width of photo current and the size of current Chinese character, judge in photo current, whether current line residue display width is more than or equal to display width needed for current Chinese character.
Preferably, described current word to be added is symbol;
Described judgement submodule, specifically for:
For current sign, according to the width of photo current and the size of current sign, judge in photo current, whether current line residue display width is more than or equal to display width needed for current sign.
Preferably, described device also comprises: text point regulating command receiver module and text point adjustment module, wherein,
Described text point regulating command receiver module, for receiving the text point regulating command of user's input;
Described text point adjustment module, for the text point regulating command received according to described text point regulating command receiver module, regulates the position of having added word in photo current.
Preferably, described text point regulating command, at least comprises following one of them or combination in any:
Left-justify, horizontal center, Right Aligns, vertical center, level and vertical center.
Preferably, described video generation module, specifically for:
After described video generation command reception module receives the video generation instruction of user's input, utilize all pictures obtained, the video coding algorithm that employing is preset, generating video.
As seen from the above technical solutions, embodiments provide a kind of video generation method and device, method comprises: one or more picture obtaining video to be synthesized; For each picture in all pictures obtained, perform word respectively and add operation, wherein, described word interpolation operation comprises: obtain word set to be added, comprise at least one word to be added in described word set to be added; Put in order according to the priority of word to be added in word set to be added, successively each word to be added is defined as current word to be added; For current word to be added, perform Word-Drawing operation respectively, wherein, described Word-Drawing operation comprises: according to the width of photo current and the size of current word to be added, judges in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added; If so, in photo current, current line draws current word to be added; If not, in photo current, the next line of current line draws current word to be added; The video receiving user's input generates instruction; After receiving described video and generating instruction, utilize all pictures obtained, generating video.The technical scheme that theres is provided of the application embodiment of the present invention, can ensure the integrality of word to be added, can word more clearly on display video.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the effect schematic diagram carrying out after blocking word in prior art adding;
Fig. 2 is the effect schematic diagram carrying out after convergent-divergent word in prior art adding;
The first schematic flow sheet of the video generation method that Fig. 3 provides for the embodiment of the present invention;
The second schematic flow sheet of the video generation method that Fig. 4 provides for the embodiment of the present invention;
The first structural representation of the video-generating device that Fig. 5 provides for the embodiment of the present invention;
The second structural representation of the video-generating device that Fig. 6 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
It should be noted that, embodiments of the invention are preferably applicable to electronic equipment, such as, the electronic equipment of iOS operating system (iOS is the handheld equipment operating system developed by Apple) or Android operation system (android system is a kind of based on the freedom of Linux and the operating system of open source code) or WindowsPhone operating system (Windows Phone is the Mobile phone operating system that Microsoft issues) has been installed, certainly be also applicable to other electronic equipments, the present invention is not construed as limiting this.
The first schematic flow sheet of the video generation method that Fig. 3 provides for the embodiment of the present invention, can comprise:
S101: one or more picture obtaining video to be synthesized;
S102: for each picture in all pictures obtained, obtain word set to be added;
At least one word to be added is comprised in described word set to be added;
S103: put in order according to the priority of word to be added in described word set to be added, successively each word to be added is defined as current word to be added;
S104: for current word to be added, according to the width of photo current and the size of current word to be added, judges in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added; If so, perform S105, if not, perform S106;
S105: current line draws current word to be added in photo current;
S106: the next line of current line draws current word to be added in photo current;
S107: the video receiving user's input generates instruction;
S108: after receiving described video and generating instruction, utilize all pictures obtained, generating video.
Exemplary, suppose that the picture of the video to be synthesized obtained is picture A and picture B, wherein, the width of picture A and picture B is 7.1 centimetres, is highly 10.5 centimetres.
For picture A, suppose that the character set to be added obtained is combined into: Be slow adds afterwards at " key1 " of the 15th row; Then put in order according to the priority of word to be added in described word set to be added, successively will ' Be ', ", ' slow ', ' ', ' the ', ' 15 ', ' OK ', ' ', ' " ', ' key1 ', ' " ', ' afterwards ', ' add ', ' add '.
Concrete, can according to byte and double-byte characters coding rule, according to 0 and 1 put in order in the binary sequence that described word set to be added is corresponding, the binary sequence corresponding to described word set to be added identifies; When identifying Chinese character, the Chinese character identified is defined as current word to be added; When identifying symbol, the symbol identified is defined as current word to be added; When identifying English alphabet, continue the binary sequence corresponding to described word set to be added to identify, until identify non-English letter or numeral, the character string of the English alphabet identified and/or numeral composition is defined as current word to be added; When identifying numeral, whether what identify before judging this numeral is English alphabet, if not, continue the binary sequence corresponding to described word set to be added to identify, until identify nonnumeric or ". ", the character string that the numeral identified and/or ". " form is defined as current word to be added.
Concrete, in actual applications, single-byte character coding can be encoded for ASCII, also can be ISO8859 coding, double-byte characters coding can be GB2312 coding, also can be GBK coding, the present invention limit the concrete manifestation form of single-byte character coding and double-byte characters coding.
Suppose that single-byte character is encoded to ASCII coding, double-byte characters is encoded to GB2312 coding.
For above-mentioned word set to be added " Be slow adds afterwards at " key1 " of the 15th row ", according to 0 and 1 put in order in the binary sequence that word set to be added " Be slow adds afterwards at " key1 " of the 15th row " is corresponding, character set to be added is closed to binary sequence of " Be slow adds afterwards at " key1 " of the 15th row " correspondence
" 01,000,010 01,100,101 00,100,000 01,110,011 01,101,100 01,101,111 0,111,011,111,010,100 11,011,011 10,110,101 11,011,010 00,110,001 00,110,101 1,101,000,011,010,000 10,110,101 11,000,101 10,100,001 10,110,000 01,101,011 0,110,010,101,111,001 00,110,001 10,100,001 10,110,001 10,111,010 11,110,011 1,100,110,011,101,101 10,111,100 11010011 " identify.
Identifying " 01000010 " for English alphabet B, continue to identify binary sequence, identify " 01100101 " for English alphabet e, continue to identify binary sequence, identify " 00100000 " for space, non-English letter and numeral, be then defined as current word to be added by the character string Be that English alphabet B and English alphabet e forms;
Identify " 00100000 " for symbol " space ", " 01110011 " is English alphabet s, and " 01101100 " is English alphabet l, and " 01101111 " is English alphabet o, and " 01110111 " is English alphabet w, " 11010100
11011011 " for Chinese character " ", " 10,110,101 11011010 " are Chinese character " ", " 00110001 " is numeral 1, " 00110101 " is numeral 5, " 11,010,000 11010000 " are Chinese character " OK ", " 1011010111000101 " for Chinese character " ", " 10,100,001 10110000 " are Chinese character ' " ', " 01101011 " is English alphabet k, " 01100101 " is English alphabet e, " 01111001 " is English alphabet y, " 00110001 " is numeral 1, " 10,100,001 10110001 " are Chinese character ' " ', " 10,111,010 11110011 " are Chinese character " afterwards ", " 11,001,100 11101101 " " add " for Chinese character, " 10,111,100 11010011 " " add " for Chinese character.
Successively, by symbol " space ", the character string slow of English alphabet s, English alphabet l, English alphabet o and English alphabet w composition, Chinese character " ", Chinese character " the ", the character string 15 of numeral 1 and numeral 5 composition, Chinese character " OK ", Chinese character " ", Chinese character ' " '; the character string key1 that English alphabet k, English alphabet e, English alphabet y and numeral 1 form; Chinese character ' " ', Chinese character " afterwards ", Chinese character " adds ", Chinese character " adds ", is defined as current word to be added.
In the character string (such as slow) that current word to be added is only containing English alphabet, or only containing character string (such as key1) that is digital and English alphabet, or the character string (such as 15) only containing numeral, or when only containing digital character string (such as 0.25) with ". ", according to the size of the width of photo current and current string, can judge in photo current, whether current line residue display width is more than or equal to display width needed for current string.
For the character string slow only containing English alphabet, suppose that slow font is times new roman, font size is No. four, then display width needed for slow is 9.8 millimeters, current line residue display width is 10.8 millimeters, current line residue display width is greater than display width needed for slow, then draw slow at the current line of picture A, if current line residue display width is 4.9 millimeters, current line residue display width is less than display width needed for slow, then at the drafting slow of the next line of the current line of picture A.
When current word to be added is Chinese character, according to the size of the width of photo current and current Chinese character, can judge in photo current, whether current line residue display width is more than or equal to display width needed for current Chinese character.
For Chinese character " ", suppose that " " word font is the Song typeface, font size is No. four, then needed for " " word, display width is 4.9 millimeters, current line residue display width is 10.8 millimeters, current line residue display width is greater than the required display width of Chinese character " the ", then draw Chinese character " the " at the current line of picture A, if current line residue display width is 2.5 millimeters, current line residue display width is less than the required display width of Chinese character " the ", then at the drafting Chinese character " the " of the next line of the current line of picture A.
When current word to be added is symbol, according to the size of the width of photo current and current sign, can judge in photo current, whether current line residue display width is more than or equal to display width needed for current sign.
In actual applications, symbol can be mathematic sign, such as "+", "-", " * ", "/", "=" etc., also can be punctuation mark, such as ", ", ", ", ".", "! ", "? " etc., can also be some other additional character, such as "@", " # ", " $ ", " $ " etc.
For symbol "; " font is the Song typeface to conventional letter, font size is No. four, " required display width is 2.5 millimeters to then symbol, and current line residue display width is 10.8 millimeters, current line residue display width is-greater-than symbol " required display width, then picture A current line drafting symbol "; if current line residue display width is 1.5 millimeters, current line residue display width in-less-than symbol " required display width, then the next line of the current line of picture A drafting symbol ".
Word for picture B adds and can add with reference to the above-mentioned word for picture A, and the present invention no longer repeats the word interpolation for picture B.
Needs illustrate, above-mentioned is only the character string only containing English alphabet to word to be added, or only containing character string that is digital and English alphabet, or the character string only containing numeral, or only containing the character string of numeral with ". ", or Chinese character, or symbol is illustrated, in actual applications, word to be added can also be other Western-European languages, Japanese word, Korean word, traditional Chinese etc., when carrying out Text region to be added, only need carry out identifying according to corresponding character code rule.
After the video receiving user's input generates instruction, utilize the picture A and the picture B generating video that have added word.In actual applications, default video coding algorithm can be adopted, utilize the picture A and the picture B generating video that have added word.
Suppose that the encryption algorithm preset is: MPEG-4 video compression algorithm, then adopt MPEG-4 video compression algorithm, utilize the picture A and the picture B that have added word, generate the video file of expansion " .mpeg4 " by name.
It should be noted that, to be above-mentionedly described for picture A and picture B, be only an instantiation of the present invention, and paired not restriction of the present invention.
The present invention is embodiment illustrated in fig. 3 in application, can ensure the integrality of word to be added, can word more clearly on display video.
The second schematic flow sheet of the video generation method that Fig. 4 provides for the embodiment of the present invention, the present invention is embodiment illustrated in fig. 4 on basis embodiment illustrated in fig. 3, increases following two steps,
S109: the text point regulating command receiving user's input;
S110: according to described text point regulating command, regulates the position of having added word in photo current.
Concrete, after having added word for above-mentioned picture A, the text point regulating command of user's input can also be received, according to the text point regulating command of user's input, regulate the position of having added word in picture A, such as, by the word left-justify of interpolation, horizontal center, Right Aligns, vertical center, level and vertical center etc.
The present invention is embodiment illustrated in fig. 4 in application, can word more clearly on display video, ensureing the integrality of word to be added simultaneously, user can also regulate the position of the word added, and makes the word shown in the video generated more can meet the needs of user.
Corresponding with above-mentioned embodiment of the method, the embodiment of the present invention also provides a kind of video-generating device.
The first structural representation of the video-generating device that Fig. 5 provides for the embodiment of the present invention, can comprise: picture obtains module 201, word adds module 202, video generates command reception module 203 and video generation module 204, wherein,
Picture obtains module 201, for obtaining one or more picture of video to be synthesized;
Word adds module 202, comprising: word set to be added obtains submodule, current word determination submodule to be added, judges submodule and rendering submodule, wherein,
Word set to be added obtains submodule, for obtaining each picture in all pictures of module 201 acquisition for picture, obtains word set to be added, comprises at least one word to be added in described word set to be added;
Current word determination submodule to be added, puts in order for the priority obtaining word to be added in the word set to be added of submodule acquisition according to described word set to be added, successively each word to be added is defined as current word to be added;
The word determination submodule current to be added of the embodiment of the present invention, specifically may be used for:
According to byte and double-byte characters coding rule, according to 0 and 1 put in order in the binary sequence that described word set to be added is corresponding, the binary sequence corresponding to described word set to be added identifies;
When identifying Chinese character, the Chinese character identified is defined as current word to be added;
When identifying symbol, the symbol identified is defined as current word to be added;
When identifying English alphabet, continue the binary sequence corresponding to described word set to be added to identify, until identify non-English letter or numeral, the character string of the English alphabet identified and/or numeral composition is defined as current word to be added;
When identifying numeral, whether what identify before judging this numeral is English alphabet, if not, continue the binary sequence corresponding to described word set to be added to identify, until identify nonnumeric or ". ", the character string that the numeral identified and/or ". " form is defined as current word to be added.
Judge submodule, for the word current to be added determined for described current word determination submodule to be added, according to the width of photo current and the size of current word to be added, judge in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added;
Determine that current word to be added is the character string only containing English alphabet at current word determination submodule to be added, or only containing character string that is digital and English alphabet, or the character string only containing numeral, or when only containing the digital character string with ". ", the judgement submodule of the embodiment of the present invention, specifically may be used for:
For current string, according to the width of photo current and the size of current string, judge in photo current, whether current line residue display width is more than or equal to display width needed for current string.
When current word determination submodule to be added determines that current word to be added is Chinese character, the judgement submodule of the embodiment of the present invention, specifically may be used for:
For current Chinese character, according to the width of photo current and the size of current Chinese character, judge in photo current, whether current line residue display width is more than or equal to display width needed for current Chinese character.
When current word determination submodule to be added determines that current word to be added is symbol, the judgement submodule of the embodiment of the present invention, specifically may be used for:
For current sign, according to the width of photo current and the size of current sign, judge in photo current, whether current line residue display width is more than or equal to display width needed for current sign.
Rendering submodule, for when described judgement submodule judged result is for being, in photo current, current line draws current word to be added; When described judgement submodule judged result is no, in photo current, the next line of current line draws current word to be added;
Video generates command reception module 203, generates instruction for the video receiving user's input;
Video generation module 204, after receiving the video generation instruction of user's input, utilizes all pictures obtained, generating video for generating command reception module at described video.
The video generation module 204 of the embodiment of the present invention, specifically may be used for:
After video generation command reception module 203 receives the video generation instruction of user's input, utilize all pictures obtained, the video coding algorithm that employing is preset, generating video.
The present invention is embodiment illustrated in fig. 5 in application, can ensure the integrality of word to be added, can word more clearly on display video.
The second structural representation of the video-generating device that Fig. 6 provides for the embodiment of the present invention, the present invention is embodiment illustrated in fig. 6 on basis embodiment illustrated in fig. 5, increases: text point regulating command receiver module 205 and text point adjustment module 206, wherein,
Text point regulating command receiver module 205, for receiving the text point regulating command of user's input;
Text point adjustment module 206, for the text point regulating command received according to text point regulating command receiver module 205, regulates the position of having added word in photo current.
The present invention is embodiment illustrated in fig. 6 in application, can word more clearly on display video, while the integrality ensureing word to be added, user can also regulate the position of the word added, and makes the word shown in the video generated more can meet the needs of user.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operating space, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Each embodiment in this specification all adopts relevant mode to describe, between each embodiment identical similar part mutually see, what each embodiment stressed is the difference with other embodiments.Especially, for device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.
One of ordinary skill in the art will appreciate that all or part of step realized in said method execution mode is that the hardware that can carry out instruction relevant by program has come, described program can be stored in computer read/write memory medium, here the alleged storage medium obtained, as: ROM/RAM, magnetic disc, CD etc.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. a video generation method, is characterized in that, comprising:
Obtain one or more picture of video to be synthesized;
For each picture in all pictures obtained, perform word respectively and add operation, wherein, described word interpolation operation comprises:
Obtain word set to be added, in described word set to be added, comprise at least one word to be added;
Put in order according to the priority of word to be added in described word set to be added, successively each word to be added is defined as current word to be added;
For current word to be added, perform Word-Drawing operation respectively, wherein, described Word-Drawing operation comprises:
According to the width of photo current and the size of current word to be added, judge in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added;
If so, in photo current, current line draws current word to be added;
If not, in photo current, the next line of current line draws current word to be added;
The video receiving user's input generates instruction;
After receiving described video and generating instruction, utilize all pictures obtained, generating video.
2. method according to claim 1, is characterized in that, describedly puts in order according to the priority of word to be added in described word set to be added, successively each word to be added is defined as current word to be added, comprises:
According to byte and double-byte characters coding rule, according to 0 and 1 put in order in the binary sequence that described word set to be added is corresponding, the binary sequence corresponding to described word set to be added identifies;
When identifying Chinese character, the Chinese character identified is defined as current word to be added;
When identifying symbol, the symbol identified is defined as current word to be added;
When identifying English alphabet, continue the binary sequence corresponding to described word set to be added to identify, until identify non-English letter or numeral, the character string of the English alphabet identified and/or numeral composition is defined as current word to be added;
When identifying numeral, whether what identify before judging this numeral is English alphabet, if not, continue the binary sequence corresponding to described word set to be added to identify, until identify nonnumeric or ". ", the character string that the numeral identified and/or ". " form is defined as current word to be added.
3. method according to claim 2, it is characterized in that, described current word to be added is the character string only containing English alphabet, or only containing character string that is digital and English alphabet, or the character string only containing numeral, or only containing the character string of numeral with ". ";
The size of the described width according to photo current and current word to be added, judges that in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added, comprising:
According to the width of photo current and the size of current string, judge in photo current, whether current line residue display width is more than or equal to display width needed for current string.
4. method according to claim 2, is characterized in that, described current word to be added is Chinese character;
The size of the described width according to photo current and current word to be added, judges that in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added, comprising:
According to the width of photo current and the size of current Chinese character, judge in photo current, whether current line residue display width is more than or equal to display width needed for current Chinese character.
5. method according to claim 2, is characterized in that, described current word to be added is symbol;
The size of the described width according to photo current and current word to be added, judges that in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added, comprising:
According to the width of photo current and the size of current sign, judge in photo current, whether current line residue display width is more than or equal to display width needed for current sign.
6. a video-generating device, is characterized in that, comprising: picture obtains module, word adds module, video generates command reception module and video generation module, wherein,
Described picture obtains module, for obtaining one or more picture of video to be synthesized;
Described word adds module, comprising: word set to be added obtains submodule, current word determination submodule to be added, judges submodule and rendering submodule, wherein,
Described word set to be added obtains submodule, for obtaining each picture in all pictures of module acquisition for described picture, obtains word set to be added, comprises at least one word to be added in described word set to be added;
Described current word determination submodule to be added, puts in order for the priority obtaining word to be added in the word set to be added of submodule acquisition according to described word set to be added, successively each word to be added is defined as current word to be added;
Described judgement submodule, for the word current to be added determined for described current word determination submodule to be added, according to the width of photo current and the size of current word to be added, judge in photo current, whether current line residue display width is more than or equal to display width needed for current word to be added;
Described rendering submodule, for when described judgement submodule judged result is for being, in photo current, current line draws current word to be added; When described judgement submodule judged result is no, in photo current, the next line of current line draws current word to be added;
Described video generates command reception module, generates instruction for the video receiving user's input;
Described video generation module, after receiving the video generation instruction of user's input, utilizes all pictures obtained, generating video for generating command reception module at described video.
7. device according to claim 6, is characterized in that, described current word determination submodule to be added, specifically for:
According to byte and double-byte characters coding rule, according to 0 and 1 put in order in the binary sequence that described word set to be added is corresponding, the binary sequence corresponding to described word set to be added identifies;
When identifying Chinese character, the Chinese character identified is defined as current word to be added;
When identifying symbol, the symbol identified is defined as current word to be added;
When identifying English alphabet, continue the binary sequence corresponding to described word set to be added to identify, until identify non-English letter or numeral, the character string of the English alphabet identified and/or numeral composition is defined as current word to be added;
When identifying numeral, whether what identify before judging this numeral is English alphabet, if not, continue the binary sequence corresponding to described word set to be added to identify, until identify nonnumeric or ". ", the character string that the numeral identified and/or ". " form is defined as current word to be added.
8. device according to claim 7, it is characterized in that, described current word to be added is the character string only containing English alphabet, or only containing character string that is digital and English alphabet, or the character string only containing numeral, or only containing the character string of numeral with ". ";
Described judgement submodule, specifically for:
For current string, according to the width of photo current and the size of current string, judge in photo current, whether current line residue display width is more than or equal to display width needed for current string.
9. device according to claim 7, is characterized in that, described current word to be added is Chinese character;
Described judgement submodule, specifically for:
For current Chinese character, according to the width of photo current and the size of current Chinese character, judge in photo current, whether current line residue display width is more than or equal to display width needed for current Chinese character.
10. device according to claim 7, is characterized in that, described current word to be added is symbol;
Described judgement submodule, specifically for:
For current sign, according to the width of photo current and the size of current sign, judge in photo current, whether current line residue display width is more than or equal to display width needed for current sign.
CN201510415065.7A 2015-07-15 2015-07-15 Video generation method and device Pending CN104994312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510415065.7A CN104994312A (en) 2015-07-15 2015-07-15 Video generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510415065.7A CN104994312A (en) 2015-07-15 2015-07-15 Video generation method and device

Publications (1)

Publication Number Publication Date
CN104994312A true CN104994312A (en) 2015-10-21

Family

ID=54306062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510415065.7A Pending CN104994312A (en) 2015-07-15 2015-07-15 Video generation method and device

Country Status (1)

Country Link
CN (1) CN104994312A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113423010A (en) * 2021-06-22 2021-09-21 深圳市大头兄弟科技有限公司 Video conversion method, device and equipment based on document and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127035A (en) * 2007-10-11 2008-02-20 金蝶软件(中国)有限公司 Method and device drafting character string at targeted area
CN101129070A (en) * 2005-02-28 2008-02-20 松下电器产业株式会社 Subtitle display
CN101464852A (en) * 2007-12-21 2009-06-24 希姆通信息技术(上海)有限公司 Processing method for cutting-off English words
CN101599264A (en) * 2009-07-15 2009-12-09 青岛海信移动通信技术股份有限公司 The method of displaying characters on mobile terminal and relevant apparatus
CN102063413A (en) * 2010-12-15 2011-05-18 掌富科技(南京)有限公司 Fast text composition method of mobile terminal
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN102902678A (en) * 2011-07-26 2013-01-30 腾讯科技(深圳)有限公司 Text content typesetting method and terminal
CN103593329A (en) * 2012-08-17 2014-02-19 腾讯科技(深圳)有限公司 Text image rearrangement method and system
CN103605638A (en) * 2013-11-25 2014-02-26 北京国双科技有限公司 Character finishing method and character finishing device
CN103744636A (en) * 2013-12-30 2014-04-23 上海斐讯数据通信技术有限公司 Text composition method for adapting to window size
US20150067732A1 (en) * 1995-04-25 2015-03-05 At&T Intellectual Property I, L.P. Indicating availability of interactive content
CN104469179A (en) * 2014-12-22 2015-03-25 杭州短趣网络传媒技术有限公司 Method for combining dynamic pictures into mobile phone video
CN104766353A (en) * 2015-04-25 2015-07-08 陈包容 Method and device for adding text content into background

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150067732A1 (en) * 1995-04-25 2015-03-05 At&T Intellectual Property I, L.P. Indicating availability of interactive content
CN101129070A (en) * 2005-02-28 2008-02-20 松下电器产业株式会社 Subtitle display
CN101127035A (en) * 2007-10-11 2008-02-20 金蝶软件(中国)有限公司 Method and device drafting character string at targeted area
CN101464852A (en) * 2007-12-21 2009-06-24 希姆通信息技术(上海)有限公司 Processing method for cutting-off English words
CN101599264A (en) * 2009-07-15 2009-12-09 青岛海信移动通信技术股份有限公司 The method of displaying characters on mobile terminal and relevant apparatus
CN102436439A (en) * 2010-09-29 2012-05-02 鸿富锦精密工业(深圳)有限公司 Text box and text display method
CN102063413A (en) * 2010-12-15 2011-05-18 掌富科技(南京)有限公司 Fast text composition method of mobile terminal
CN102902678A (en) * 2011-07-26 2013-01-30 腾讯科技(深圳)有限公司 Text content typesetting method and terminal
CN103593329A (en) * 2012-08-17 2014-02-19 腾讯科技(深圳)有限公司 Text image rearrangement method and system
CN103605638A (en) * 2013-11-25 2014-02-26 北京国双科技有限公司 Character finishing method and character finishing device
CN103744636A (en) * 2013-12-30 2014-04-23 上海斐讯数据通信技术有限公司 Text composition method for adapting to window size
CN104469179A (en) * 2014-12-22 2015-03-25 杭州短趣网络传媒技术有限公司 Method for combining dynamic pictures into mobile phone video
CN104766353A (en) * 2015-04-25 2015-07-08 陈包容 Method and device for adding text content into background

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113423010A (en) * 2021-06-22 2021-09-21 深圳市大头兄弟科技有限公司 Video conversion method, device and equipment based on document and storage medium

Similar Documents

Publication Publication Date Title
CN103841460A (en) Image data transmission method and electronic devices
CN104765528A (en) Display method and device of virtual keyboard
CN103927386A (en) Navigation icon generating method and device
CN101625752B (en) Image processing apparatus and image processing method
CN113177190A (en) Document content sharing method and electronic equipment
US20160232151A1 (en) Responsive course design system and method
CA2487687C (en) Message file editing process
CN104462160A (en) Method and system for editing formula
CN104994312A (en) Video generation method and device
CN105577518A (en) Method and electronic device for displaying website corresponding information in instant messaging
CN110992251B (en) Logo replacing method and device in video and electronic equipment
EP2966550A1 (en) Apparatus and method for providing feedback on input data
US10115374B2 (en) Variable glyph encoding
CN103838501A (en) Information processing method and electronic device
CN108510424B (en) Image processing method and device
US10176334B2 (en) Data security using alternative encoding
US11132497B2 (en) Device and method for inputting characters
CN106371623A (en) Display method and device of alternative characters
CN1918564B (en) Device for creating sentence having decoration information
KR20170093496A (en) System and method for providing vector and bitmap overlay font
CN111506841A (en) Webpage display method, device and equipment and readable storage medium
JP4999014B2 (en) Inserting objects using a text editor that supports scalable fonts
KR20150107533A (en) Method and apparatus for outputting replacing electronic documents
CN105208437B (en) Input interactive approach and device in a kind of Multi-screen interaction system
CN102929859B (en) Reading assistive method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20151021