CN110929496B - Text template generation method and device - Google Patents

Text template generation method and device Download PDF

Info

Publication number
CN110929496B
CN110929496B CN201911118338.6A CN201911118338A CN110929496B CN 110929496 B CN110929496 B CN 110929496B CN 201911118338 A CN201911118338 A CN 201911118338A CN 110929496 B CN110929496 B CN 110929496B
Authority
CN
China
Prior art keywords
text
target
template
determining
information
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.)
Active
Application number
CN201911118338.6A
Other languages
Chinese (zh)
Other versions
CN110929496A (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.)
Beijing Jupiter Technology Co ltd
Original Assignee
Beijing Lemi 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 Beijing Lemi Technology Co ltd filed Critical Beijing Lemi Technology Co ltd
Priority to CN201911118338.6A priority Critical patent/CN110929496B/en
Publication of CN110929496A publication Critical patent/CN110929496A/en
Application granted granted Critical
Publication of CN110929496B publication Critical patent/CN110929496B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a text template generation method and device, wherein the method comprises the following steps: acquiring a reference picture containing text information; determining a target area where text content corresponding to text information is located in a reference picture; identifying a text style corresponding to text content in the target area; and generating a text template according to the text style. Therefore, the text template is automatically generated based on the provided reference picture, the generation efficiency of the text template is improved, the automatic generation of the text template is realized, and the attractiveness of the text template is ensured.

Description

Text template generation method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for generating a text template.
Background
Generally, when a poster is manufactured and a picture is edited, in order to meet the requirement of personalized editing of a user, a related image processing platform provides a text template for text, the user uses the text template to determine the style of the input text, and the text of the corresponding style is drawn on the corresponding picture.
In the related art, the text templates are manually edited and set by a technician in the background, however, the number of text templates included in the image processing platform is large, and the effect of the text templates is limited by the setting of the technician, so that the aesthetic property is difficult to ensure and the text template generation efficiency is low.
Disclosure of Invention
The application provides a text template generation method and device, which are used for solving the technical problems that in the prior art, text templates are dependent on manual setting, so that the text template generation efficiency is low and the attractiveness cannot be guaranteed.
An embodiment of an aspect of the present application provides a text template generating method, including the following steps: acquiring a reference picture containing text information; determining a target area where text content corresponding to the text information is located in the reference picture; and recognizing a text pattern corresponding to the text content in the target area, and generating a text template according to the text pattern.
According to the text template generation method, a reference picture containing text information is obtained, a target area where text content corresponding to the text information is located is determined in the reference picture, finally, text patterns corresponding to the text content in the target area are identified, and a text template is generated according to the text patterns. Therefore, the text template is automatically generated based on the provided reference picture, the generation efficiency of the text template is improved, the automatic generation of the text template is realized, and the attractiveness of the text template is ensured.
In addition, the text template generating method of the embodiment of the application further comprises the following additional technical characteristics:
in a possible implementation manner of the embodiment of the present application, in the reference picture, determining a target area where text content corresponding to the text information is located includes: dividing the reference picture into a plurality of candidate regions; extracting image features of each candidate region of the plurality of candidate regions; matching the image features of each candidate region with the text features of the text information, and determining target image features successfully matched; and determining the region where the target image features are located as the target region.
In one possible implementation manner of the embodiment of the present application, after the determining the target area where the text content corresponding to the text information is located, the method further includes: identifying text content in the target area; the generating the text template according to the text style comprises the following steps: adjusting the text content according to the text style; and generating the text template according to the adjusted text content.
In a possible implementation manner of the embodiment of the present application, the generating a text template according to the text style includes: determining style description information corresponding to the text style; and generating the text template according to the text style description information.
In one possible implementation manner of the embodiment of the present application, after the determining the target area where the text content corresponding to the text information is located, the method further includes: determining position information of the target region in the reference picture; after the text template is generated according to the text style, the method further comprises the following steps: the text templates are sent to a user, and a target text template selected by the user when editing a target picture is obtained; acquiring target text content input by a user aiming at the target text template; and adjusting the target text content according to the target text template, and displaying the adjusted target text content in the target picture according to the position information.
An embodiment of an aspect of the present application provides a text template generating device, including: the acquisition module is used for acquiring a reference picture containing text information; the determining module is used for determining a target area where the text content corresponding to the text information is located in the reference picture; and the template generation module is used for identifying the text style corresponding to the text content in the target area and generating a text template according to the text style.
The text template generating device acquires a reference picture containing text information, determines a target area where text content corresponding to the text information is located in the reference picture, and finally identifies a text pattern corresponding to the text content in the target area and generates a text template according to the text pattern. Therefore, the text template is automatically generated based on the provided reference picture, the generation efficiency of the text template is improved, the automatic generation of the text template is realized, and the attractiveness of the text template is ensured.
In addition, the text template generating device of the embodiment of the application further comprises the following additional technical characteristics:
in one possible implementation manner of the embodiment of the present application, the determining module includes: a dividing unit configured to divide the reference picture into a plurality of candidate regions; an extraction unit configured to extract an image feature of each of the plurality of candidate regions; the determining unit is used for matching the image characteristics of each candidate area with the character characteristics of the character information and determining target image characteristics successfully matched; the determining unit is further configured to determine an area where the target image feature is located as the target area.
In one possible implementation manner of the embodiment of the present application, the method further includes: the identification module is used for identifying the text content in the target area; the template generation module is specifically configured to: adjusting the text content according to the text style; and generating the text template according to the adjusted text content.
In one possible implementation manner of the embodiment of the present application, the template generating module is specifically configured to: determining style description information corresponding to the text style; and generating the text template according to the text style description information.
In one possible implementation manner of the embodiment of the present application, the template generating module is specifically configured to: determining position information of the target region in the reference picture; the acquisition module is also used for sending the text templates to a user and acquiring target text templates selected by the user when editing target pictures; the acquisition module is also used for acquiring target text content input by a user aiming at the target text template; the apparatus further comprises: and the display module is used for adjusting the target text content according to the target text template and displaying the adjusted target text content in the target picture according to the position information.
Another embodiment of the present application provides an electronic device, including a processor and a memory; wherein the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for implementing the text template generation method as described in the above embodiment.
Another embodiment of the present application proposes a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the text template generation method as described in the above embodiment.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flow chart of a text template generating method according to an embodiment of the present application;
fig. 2-1 is a schematic diagram of a target area determination scenario provided in an embodiment of the present application;
fig. 2-2 are schematic diagrams of another target area determination scenario provided in an embodiment of the present application;
FIG. 3-1 is a schematic diagram of a text template according to an embodiment of the present application;
FIG. 3-2 is a schematic diagram of another text template according to an embodiment of the present disclosure;
FIGS. 3-3 are schematic diagrams of still another text template according to embodiments of the present application;
FIGS. 3-4 are schematic diagrams of still another text template according to embodiments of the present application;
fig. 4 is a schematic diagram of an application scenario generated by using a text template according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another text template according to the present embodiment;
fig. 6 is a schematic structural diagram of a text template generating device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another text template generating device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another text template generating device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a text template generating device according to an embodiment of the present application; and
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present application and are not to be construed as limiting the present application.
Aiming at the technical problems that the current text template generation efficiency is low and the attractiveness is difficult to ensure in the background art, the application provides a novel text template generation method, in the method, text patterns contained in pictures are directly identified, text templates are automatically generated based on the identified text patterns, so that the text template generation efficiency is improved, and the attractiveness of the text templates is ensured if corresponding picture sources are screened, for example, the attractiveness of the obviously generated text templates is stronger when the poster pictures are taken as basic pictures generated by the text templates.
The text template generation method and device of the embodiment of the application are described below with reference to the accompanying drawings. .
Specifically, fig. 1 is a schematic flow chart of a text template generating method according to an embodiment of the present application.
As shown in fig. 1, the method includes:
step 101, obtaining a reference picture containing text information.
It should be noted that, in different application scenarios, the ways of acquiring the reference pictures containing the text information are different:
as a possible implementation manner, the user may automatically upload the picture of the favorite text content style according to the personal requirement, if the user wants to apply the text style, the picture is directly input as the reference picture in the embodiment. The user in this embodiment may be a technician, or may be a user who is editing a picture at present, and when the user is a user who is editing a picture at present, the embodiment may provide the user with a function service generated by personalizing a text template.
As another possible implementation manner, the user's text template generating instruction is obtained, where the instruction may include an image feature of the reference picture, and a certain number of pictures meeting the image are searched by self based on the image feature, for example, when the user's text template generating instruction is "find popular movie posters that contain text now", then in the current movie posters, a certain number of movie poster pictures may be obtained according to the heat as the reference picture in this embodiment. For example, when the user's text template generation instruction is "find some pictures with freshness and containing text", the pictures with freshness and containing text can be selected from the pictures with freshness and containing attribute as the reference pictures in the embodiment.
Step 102, in the reference picture, determining a target area where the text content corresponding to the text information is located.
And 103, identifying a text pattern corresponding to the text content in the target area, and generating a text template according to the text pattern.
It is to be understood that the style of the text information in the reference picture is a style that the user wants to apply, and thus, the text template may be generated based on the style corresponding to the text information.
Wherein the specific content contained in the character pattern relates to character information, and the specific content contained in the character pattern is the size of characters, the font of the characters, the format of the characters (whether thickening, tilting and the like), the color of the characters, the dynamic effect of the characters and the like
Specifically, in the reference picture, a target area where the text content corresponding to the text information is located is determined, that is, the target area where the text content is located is first selected by a frame, so that the text style of the text content is further identified based on the target area.
In the different application scenarios, the manner of determining the target area where the text content corresponding to the text information is located in the reference picture is different, and examples are as follows:
example one:
in this example, the reference picture is divided into a plurality of candidate regions, the image feature of each candidate region in the plurality of candidate regions is extracted, the image feature may include an image vector feature, and the like, the image feature of each candidate region is matched with the text feature of the text information, the target image feature successfully matched is determined, and the region where the target image feature is located is determined to be the target region.
It may also be appreciated that, as shown in fig. 2-1, in this example, the reference picture is first divided into a plurality of candidate regions, and then, a target region containing text information is screened out from the plurality of candidate regions, so that a style of the target text content is further extracted in the target region, instead of directly extracting features for the whole reference picture, so that the determining efficiency of the text style is greatly improved.
Example two:
in this example, the image feature of each pixel in the whole reference picture is directly extracted, and then the image feature of each pixel is matched with the text feature of the text information, and the region formed by the pixels where the successfully matched target pixel is located is used as the target region.
Example three:
in this example, as shown in fig. 2-2, the picture character recognition technology is used to recognize the characters in the whole picture, and further, the recognition function in the picture character recognition technology is monitored based on the hook function or the like, and since the picture character recognition technology needs to select one area in a frame to recognize the characters, the target area can be determined based on the frame selection position of the characters recognized by the recognition function.
Further, the text pattern corresponding to the text content in the target area is identified, for example, the shape feature, the size feature and the like of the text content in the target area can be identified to determine the information required pattern, and further, a text template is generated according to the text pattern, and the text template can be used for completing the input of the information.
In the actual implementation process, the manner of generating the text template according to the text style is also different, and the following is exemplified:
example one:
in this example, style description information corresponding to a text style may be determined, which describes the text style of the current text template in a text manner, for example, when the text template is a text template, as shown in fig. 3-1, the corresponding text template may be described by "Song Ti, small four, magic color", "regular script, small four, bold", and the like.
The text templates in this embodiment may be displayed in a list form as shown in fig. 3-1, and when the text templates are displayed in a list form, more text templates may be displayed by providing a slide menu, etc., and for example, as shown in fig. 3-2, corresponding description information may be added to different pattern templates. The corresponding text templates are generated so that the user can watch the corresponding templates, in this example, the corresponding text styles can be intuitively displayed by displaying the sample words corresponding to the style description information in the text templates, wherein the sample words can be set by the user or can be default words, for example, as shown in fig. 3-3, the sample words can be names of the users such as "small brightness" (the fantasy effect is not shown in the figure). By the method, the problem that the text template occupies more area because the text template directly displays the corresponding text content when the text content corresponding to the text style is longer is avoided.
Example two:
in this example, in order to improve the efficiency of generating the text template, text content in the target area may be identified, further, text content may be adjusted according to the text style, the text template may be generated according to the adjusted text content, and the text template itself may intuitively display specific text template content.
For example, when the picture of the text template is shown in the left diagram of fig. 4, the text template may be directly generated according to the text content in the corresponding format as shown in the right diagram of fig. 4.
Of course, the user may want to retain the text style of the text content in more reference pictures, for example, the user wants to retain the position information of the text content in the reference pictures, in this case, as shown in fig. 5, the position of the corresponding text content may be represented in the corresponding text template in the form of a thumbnail, or may not be intuitively represented, and the corresponding position information may be directly adapted only in a specific application.
Specifically, in one embodiment of the present application, position information, such as coordinate information, of a target area in a reference picture is determined, and then, after a text template is sent to a user, a target text template selected by the user when editing the target picture is obtained, target text content input by the user for the target text template is obtained, the target text content is adjusted according to the target text template, and the adjusted target text content is displayed in the target picture according to the position information. Therefore, the style of the text content in the reference picture is applied, and the requirement of a user is improved.
Based on the above embodiment, some users may have a requirement for fine adjustment of the effect generated by the text templates, so in the practical application process, the corresponding image editing platform provides an adjustment function for each text template, such as a position adjustment function, and displays the target text content according to the adjustment of the text templates by the users.
Of course, the automatic execution method of the text template can also be used in other template generation modes, for example, when the picture template is generated, specific contents included in the corresponding picture pattern are layout of the picture, a filter of the picture, brightness of the picture, size of the picture and the like, for example, in the actual execution process, the picture template can be displayed in a thumbnail sketch mode, as shown in fig. 3-4, when the picture pattern corresponding to the picture template is the picture layout, different layout main bodies can be embodied in a thumbnail mode, and each main body can be shown by corresponding shapes and characters so as to improve intuitiveness of the picture template.
In summary, the text template generation method of the embodiment of the application obtains a reference picture containing text information, determines a target area where text content corresponding to the text information is located in the reference picture, and finally identifies a text pattern corresponding to the text content in the target area and generates a text template according to the text pattern. Therefore, the text template is automatically generated based on the provided reference picture, the generation efficiency of the text template is improved, the automatic generation of the text template is realized, and the attractiveness of the text template is ensured.
In order to achieve the above embodiment, the present application further provides a text template generating device.
Fig. 6 is a schematic structural diagram of a text template generating device according to an embodiment of the present application.
As shown in fig. 6, the text template generating apparatus includes: the system comprises an acquisition module 10, a determination module 20 and a template generation module 30.
The acquiring module 10 is configured to acquire a reference picture containing text information.
The determining module 20 is configured to determine, in the reference picture, a target area where the text content corresponding to the text information is located.
The template generating module 30 is configured to identify a text style corresponding to the text content in the target area, and generate a text template according to the text style.
Further, in one possible implementation manner of the embodiment of the present application, as shown in fig. 7, the determining module 20 includes, on the basis of the description shown in fig. 6: a dividing unit 21, an extracting unit 22, and a determining unit 23.
Wherein the dividing unit 21 is configured to divide the reference picture into a plurality of candidate regions.
An extraction unit 22 for extracting an image feature of each of the plurality of candidate regions.
The determining unit 23 matches the image feature of each candidate region with the text feature of the text information, and determines the target image feature successfully matched.
In this embodiment, the determining unit 23 is further configured to determine an area where the target image feature is located as the target area.
In a possible implementation manner of the embodiment of the present application, as shown in fig. 8, on the basis of the embodiment shown in fig. 6, the apparatus further includes: an identification module 40.
Wherein, the recognition module 40 is used for recognizing the text content in the target area;
the template generating module 30 is specifically configured to:
adjusting the text content according to the text style;
and generating a text template according to the adjusted information.
In a possible implementation manner of the embodiment of the present application, as shown in fig. 8, on the basis of the embodiment shown in fig. 6, the apparatus further includes: the display module 50, in this embodiment, the template generating module 30 is specifically configured to:
determining position information of a target region in a reference picture;
the obtaining module 10 is further configured to send the text template to a user, and obtain a target text template selected by the user when editing the target picture;
the acquisition module 10 is further configured to acquire target text content input by a user in the target text template;
the display module 50 is configured to adjust the target text content according to the target text template, and display the adjusted target text content in the target picture according to the position information.
It should be noted that the foregoing explanation of the method embodiment is also applicable to the apparatus of this embodiment, and will not be repeated here.
In order to achieve the above embodiments, the embodiments of the present application further provide an electronic device, including a processor and a memory;
wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for implementing the text template generation method as described in the above embodiments.
Fig. 10 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application. The electronic device 120 shown in fig. 10 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments herein.
As shown in fig. 10, the electronic device 120 is in the form of a general purpose computing device. Components of electronic device 120 may include, but are not limited to: one or more processors or processing units 160, a system memory 280, a bus 180 that connects the various system components, including the system memory 280 and the processing units 160.
Bus 180 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry Standard architecture (Industry Standard Architecture; hereinafter ISA) bus, micro channel architecture (Micro Channel Architecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video Electronics Standards Association; hereinafter VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnection; hereinafter PCI) bus.
Electronic device 120 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 120 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 280 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) 300 and/or cache memory 3200. Electronic device 120 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, the storage system 3400 may be used to read from and write to a non-removable, non-volatile magnetic media (not shown in FIG. 10, commonly referred to as a "hard disk drive"). Although not shown in fig. 10, a magnetic disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable nonvolatile optical disk (e.g., a compact disk read only memory (Compact Disc Read Only Memory; hereinafter CD-ROM), digital versatile read only optical disk (Digital Video Disc Read Only Memory; hereinafter DVD-ROM), or other optical media) may be provided. In such cases, each drive may be coupled to bus 180 through one or more data medium interfaces. Memory 280 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the present application.
A program/utility 400 having a set (at least one) of program modules 420 may be stored, for example, in memory 280, such program modules 420 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 420 generally perform the functions and/or methods in the embodiments described herein.
The electronic device 120 may also communicate with one or more external devices 140 (e.g., keyboard, pointing device, display 240, etc.), one or more devices that enable a user to interact with the electronic device 120, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 120 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 220. Also, the electronic device 120 may communicate with one or more networks, such as a local area network (Local Area Network; hereinafter: LAN), a wide area network (Wide Area Network; hereinafter: WAN), and/or a public network, such as the Internet, via the network adapter 200. As shown, network adapter 200 communicates with other modules of electronic device 120 over bus 180. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 120, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 160 executes various functional applications and data processing by running programs stored in the system memory 280, for example, implementing the methods mentioned in the foregoing embodiments.
In order to implement the above embodiment, the present application further proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the text template generation method as described in the above embodiment.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. Although embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. The character template generation method is characterized by comprising the following steps of:
acquiring a reference picture containing text information;
determining a target area where text content corresponding to the text information is located in the reference picture;
recognizing a text pattern corresponding to the text content in the target area, generating a text template according to the text pattern, and sending the text template to a user;
after the target area where the text content corresponding to the text information is located is determined, the method further comprises: determining position information of the target region in the reference picture;
after the text template is sent to the user, the method further comprises the following steps: acquiring a target text template selected by a user when editing a target picture and target text content input by the user aiming at the target text template;
and adjusting the target text content according to the target text template, and displaying the adjusted target text content in the target picture according to the position information.
2. The method of claim 1, wherein determining, in the reference picture, a target area in which text content corresponding to the text information is located comprises:
dividing the reference picture into a plurality of candidate regions;
extracting image features of each candidate region of the plurality of candidate regions;
matching the image features of each candidate region with the text features of the text information, and determining target image features successfully matched;
and determining the region where the target image features are located as the target region.
3. The method of claim 1, further comprising, after the determining the target area in which the text content corresponding to the text information is located:
identifying text content in the target area;
the generating the text template according to the text style comprises the following steps:
adjusting the text content according to the text style;
and generating the text template according to the adjusted text content.
4. The method of claim 1, wherein the generating a text template from the text style comprises:
determining style description information corresponding to the text style;
and generating the text template according to the text style description information.
5. A text template generating device, comprising:
the acquisition module is used for acquiring a reference picture containing text information;
the determining module is used for determining a target area where the text content corresponding to the text information is located in the reference picture;
the template generation module is used for identifying a text pattern corresponding to the text content in the target area, generating a text template according to the text pattern and sending the text template to a user;
the template generation module is further used for determining the position information of the target area in the reference picture after the target area of the text content corresponding to the text information is determined;
the acquisition module is also used for acquiring a target text template selected by a user when editing a target picture and target text content input by the user aiming at the target text template after the text template is sent to the user;
and the display module is used for adjusting the target text content according to the target text template and displaying the adjusted target text content in the target picture according to the position information.
6. The apparatus of claim 5, wherein the means for determining comprises:
a dividing unit configured to divide the reference picture into a plurality of candidate regions;
an extraction unit configured to extract an image feature of each of the plurality of candidate regions;
the determining unit is used for matching the image characteristics of each candidate area with the character characteristics of the character information and determining target image characteristics successfully matched;
the determining unit is further configured to determine an area where the target image feature is located as the target area.
7. The apparatus as recited in claim 5, further comprising:
the identification module is used for identifying the text content in the target area;
the template generation module is specifically configured to:
adjusting the text content according to the text style;
and generating the text template according to the adjusted text content.
8. The apparatus of claim 5, wherein the template generation module is specifically configured to:
determining style description information corresponding to the text style;
and generating the text template according to the text style description information.
9. An electronic device comprising a processor and a memory;
wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for implementing the text template generation method according to any one of claims 1 to 4.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the literal template generation method according to any one of claims 1-4.
CN201911118338.6A 2019-11-15 2019-11-15 Text template generation method and device Active CN110929496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911118338.6A CN110929496B (en) 2019-11-15 2019-11-15 Text template generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911118338.6A CN110929496B (en) 2019-11-15 2019-11-15 Text template generation method and device

Publications (2)

Publication Number Publication Date
CN110929496A CN110929496A (en) 2020-03-27
CN110929496B true CN110929496B (en) 2023-06-16

Family

ID=69854016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911118338.6A Active CN110929496B (en) 2019-11-15 2019-11-15 Text template generation method and device

Country Status (1)

Country Link
CN (1) CN110929496B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598901A (en) * 2015-03-04 2015-05-06 陈佩珊 Method and system for identifying picture characters and typesetting and displaying picture characteristics according to original style by mobile terminal
CN104915332A (en) * 2015-06-15 2015-09-16 广东欧珀移动通信有限公司 Method and device for generating composing template
CN105096244A (en) * 2015-07-02 2015-11-25 北京旷视科技有限公司 Method and device for image transformation, method and device for image identification
CN105335198A (en) * 2015-11-13 2016-02-17 小米科技有限责任公司 Font addition method and device
CN108304839A (en) * 2017-08-31 2018-07-20 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN108960224A (en) * 2018-06-26 2018-12-07 广东工业大学 A kind of library search method, apparatus and system
CN109801347A (en) * 2019-01-25 2019-05-24 北京字节跳动网络技术有限公司 A kind of generation method, device, equipment and the medium of editable image template
CN109978972A (en) * 2019-03-20 2019-07-05 珠海天燕科技有限公司 A kind of method and device of copy editor in picture

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598901A (en) * 2015-03-04 2015-05-06 陈佩珊 Method and system for identifying picture characters and typesetting and displaying picture characteristics according to original style by mobile terminal
CN104915332A (en) * 2015-06-15 2015-09-16 广东欧珀移动通信有限公司 Method and device for generating composing template
CN105096244A (en) * 2015-07-02 2015-11-25 北京旷视科技有限公司 Method and device for image transformation, method and device for image identification
CN105335198A (en) * 2015-11-13 2016-02-17 小米科技有限责任公司 Font addition method and device
CN108304839A (en) * 2017-08-31 2018-07-20 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN108960224A (en) * 2018-06-26 2018-12-07 广东工业大学 A kind of library search method, apparatus and system
CN109801347A (en) * 2019-01-25 2019-05-24 北京字节跳动网络技术有限公司 A kind of generation method, device, equipment and the medium of editable image template
CN109978972A (en) * 2019-03-20 2019-07-05 珠海天燕科技有限公司 A kind of method and device of copy editor in picture

Also Published As

Publication number Publication date
CN110929496A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN109688463B (en) Clip video generation method and device, terminal equipment and storage medium
CN109618222B (en) A kind of splicing video generation method, device, terminal device and storage medium
US8768070B2 (en) Method, apparatus and computer program product for providing image modification
CN108647305B (en) Document format conversion method and device
CN108549643B (en) Translation processing method and device
US8819545B2 (en) Digital comic editor, method and non-transitory computer-readable medium
US11080553B2 (en) Image search method and apparatus
US8930814B2 (en) Digital comic editor, method and non-transitory computer-readable medium
US9258458B2 (en) Displaying an image with an available effect applied
US20080232686A1 (en) Representative color extracting method and apparatus
AU2013273829A1 (en) Time constrained augmented reality
US20130326341A1 (en) Digital comic editor, method and non-transitorycomputer-readable medium
US11410701B2 (en) Systems and methods for direct video retouching for text, strokes and images
US8244005B2 (en) Electronic apparatus and image display method
US8824778B2 (en) Systems and methods for depth map generation
US8494347B2 (en) Electronic apparatus and movie playback method
CN110929496B (en) Text template generation method and device
CN113986407A (en) Cover generation method and device and computer storage medium
KR20180111242A (en) Electronic device and method for providing colorable content
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
CN114708443A (en) Screenshot processing method and device, electronic equipment and computer readable medium
KR101651842B1 (en) Method and device for generating layout of electronic document
CN113840099B (en) Video processing method, device, equipment and computer readable storage medium
CN110662104B (en) Video dragging bar generation method and device, electronic equipment and storage medium
CN111914850A (en) Picture feature extraction method, device, server and medium

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
TA01 Transfer of patent application right

Effective date of registration: 20201125

Address after: Room 115, area C, 1 / F, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing 100025

Applicant after: Beijing LEMI Technology Co.,Ltd.

Address before: 100085 Beijing City, Haidian District Road 33, two floor East Xiaoying

Applicant before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231220

Address after: 3870A, 3rd Floor, Building 4, Courtyard 49, Badachu Road, Shijingshan District, Beijing, 100144

Patentee after: Beijing Jupiter Technology Co.,Ltd.

Address before: Room 115, area C, 1 / F, building 8, yard 1, yaojiayuan South Road, Chaoyang District, Beijing 100025

Patentee before: Beijing LEMI Technology Co.,Ltd.