CN110929496A - Method and device for generating character template - Google Patents

Method and device for generating character template Download PDF

Info

Publication number
CN110929496A
CN110929496A CN201911118338.6A CN201911118338A CN110929496A CN 110929496 A CN110929496 A CN 110929496A CN 201911118338 A CN201911118338 A CN 201911118338A CN 110929496 A CN110929496 A CN 110929496A
Authority
CN
China
Prior art keywords
text
target
template
character
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911118338.6A
Other languages
Chinese (zh)
Other versions
CN110929496B (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 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 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 a text template generation device, wherein the method comprises the following steps: acquiring a reference picture containing text information; in the reference picture, determining a target area where the text content corresponding to the text information is located; identifying a text style corresponding to the text content in the target area; and generating a text template according to the text style. Therefore, the character template is automatically generated based on the provided reference picture, the generation efficiency of the character template is improved, the automatic generation of the character template is realized, and the attractiveness of the character template is ensured.

Description

Method and device for generating character template
Technical Field
The present application 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 text template for characters is provided by a related image processing platform, the user determines the style of the input characters by applying the text template, and the characters in the corresponding style are drawn on the corresponding picture.
In the related art, the text templates are manually edited and set by technicians 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 settings of the technicians, which results in that the aesthetic property is difficult to ensure and the generation efficiency of the text templates is low.
Disclosure of Invention
The application provides a method and a device for generating a character template, which aim to solve the technical problems that in the prior art, the character template depends on manual setting, so that the character template generation efficiency is low and the attractiveness cannot be guaranteed.
An embodiment of one aspect of the present application provides a text template generating method, including the following steps: acquiring a reference picture containing text information; in the reference picture, determining a target area where the text content corresponding to the text information is located; and identifying a character style corresponding to the character content in the target area, and generating a character template according to the character style.
The method for generating the text template comprises the steps of obtaining a reference picture containing text information, determining a target area where text content corresponding to the text information is located in the reference picture, finally identifying a text style corresponding to the text content in the target area, and generating the text template according to the text style. Therefore, the character template is automatically generated based on the provided reference picture, the generation efficiency of the character template is improved, the automatic generation of the character template is realized, and the attractiveness of the character template is ensured.
In addition, the text template generating method of the embodiment of the application further includes the following additional technical features:
in a possible implementation manner of the embodiment of the present application, the determining, in the reference picture, 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 an image feature of each candidate region of the plurality of candidate regions; matching the image characteristics of each candidate region with the character characteristics of the character information, and determining the target image characteristics which are successfully matched; and determining the region where the target image feature is located as the target region.
In a possible implementation manner of the embodiment of the present application, after determining a target area where text content corresponding to the text information is located, the method further includes: identifying text content in the target area; the generating of the text template according to the text style comprises: adjusting the text content according to the text style; and generating the character template according to the adjusted character 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 a possible implementation manner of the embodiment of the present application, after determining a target area where text content corresponding to the text information is located, the method further includes: determining position information of the target area in the reference picture; after the generating of the text template according to the text style, the method further comprises: sending the character template to a user, and acquiring a target character template selected by the user when editing a target picture; acquiring target character contents input by a user in the target character 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 generating module is used for identifying the character pattern corresponding to the character content in the target area and generating a character template according to the character pattern.
The text template generating device of the embodiment of the application 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, finally identifies a text style corresponding to the text content in the target area, and generates a text template according to the text style. Therefore, the character template is automatically generated based on the provided reference picture, the generation efficiency of the character template is improved, the automatic generation of the character template is realized, and the attractiveness of the character template is ensured.
In addition, the text template generating device of the embodiment of the application further includes the following additional technical features:
in a possible implementation manner of this 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 the target image characteristics which are successfully matched; the determining unit is further configured to determine that the region where the target image feature is located is the target region.
In a 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 character template according to the adjusted character content.
In a 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 a possible implementation manner of the embodiment of the present application, the template generating module is specifically configured to: determining position information of the target area in the reference picture; the acquisition module is also used for sending the character template to a user and acquiring a target character template selected by the user when editing a target picture; the acquisition module is also used for acquiring the target text content input by the user in the target text template; the device 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 runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the text template generating method according to the above embodiment.
Another embodiment of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the text template generating method according to the above embodiment.
Additional aspects and advantages of the present 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 present 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 of which:
fig. 1 is a schematic flow chart of a text template generating method according to an embodiment of the present application;
fig. 2-1 is a schematic view of a target area determination scenario provided in an embodiment of the present application;
fig. 2-2 is a schematic view of another target area determination scenario provided in the embodiment of the present application;
FIG. 3-1 is a schematic diagram of a text template provided in an embodiment of the present application;
FIG. 3-2 is a schematic diagram of another text template provided in the embodiments of the present application;
3-3 are schematic diagrams of another text template provided by the embodiments of the present application;
FIGS. 3-4 are schematic diagrams of still another text template provided in the embodiments of the present application;
fig. 4 is a schematic diagram of an application scenario generated by a text template according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another text template provided in this embodiment;
fig. 6 is a schematic structural diagram of a text template generating apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another text template generating apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another text template generating apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a further text template generating apparatus 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
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
In order to solve the technical problems mentioned in the background art, that the generation efficiency of the current text template is low and the attractiveness is difficult to guarantee, the application provides a new generation method of the text template.
The text template generation method and apparatus according to the embodiments of the present application are described below with reference to the 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 manner of acquiring the reference picture containing the text information is different:
as a possible implementation manner, the user may automatically upload the picture of the favorite text content style according to the personal requirement, and if the user wants to apply the text style, the user directly inputs the picture as the reference picture in this embodiment. The user in this embodiment may be a technician or a user currently editing a picture, and when the user is the user currently editing the picture, this embodiment may provide the user with a function service for generating a personalized text template.
As another possible implementation manner, a text template generation instruction of a user is obtained, where the instruction may include an image feature of a reference picture, and a certain number of pictures that satisfy the image are searched for by itself based on the image feature, for example, when the text template generation instruction of the user is "find some popular movie posters that now include text", a certain number of movie poster pictures may be obtained as reference pictures in this embodiment according to popularity in the current movie posters. For example, when the text template generation instruction of the user is "find some pictures containing text with small freshness", the pictures containing text may be screened out from the pictures with the attribute label of "small freshness" as the reference pictures in this embodiment.
And 102, determining a target area where the text content corresponding to the text information is located in the reference picture.
And 103, identifying a character style corresponding to the character content in the target area, and generating a character template according to the character style.
It is 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 can be generated based on the style corresponding to the text information.
The specific content contained in the above character style is related to the character information, and the specific content contained in the character style is the size of the character, the font of the character, the format of the character (whether it is bold, slant, etc.), the color of the character, the dynamic effect of the character, etc
Specifically, in the reference picture, a target area where the text corresponding to the text information is located is determined, that is, the target area where the text is located is firstly selected in a frame, so that the text style of the text is further identified based on the target area.
In 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 the following example is given:
example one:
in this example, a reference picture is divided into a plurality of candidate regions, an 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 a text feature of text information, a target image feature which is successfully matched is determined, and a region where the target image feature is located is determined as a target region.
It can also be understood 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 as to further extract a style of target text content in the target region, instead of directly extracting features for the entire reference picture, thereby greatly improving the efficiency of determining text styles.
Example two:
in this example, the image feature of each pixel point in the entire reference picture is directly extracted, and then the image feature of each pixel point is matched with the text feature of the text information, and the region formed by the pixel points where the successfully matched target pixel points are located is used as the target region.
Example three:
in this example, as shown in fig. 2-2, the characters in the whole picture are recognized by using the picture character recognition technology, and then, the recognition function in the picture character recognition technology is monitored based on a hook function, etc., since the picture character recognition technology needs to select one region for framing and then recognize the characters, the framing position of the characters can be recognized based on the recognition function to determine the target region.
Furthermore, the text style 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 style, and further, a text template is generated according to the text style, and the text style can be applied mechanically by using the text template to complete the information input.
In the actual execution process, the way of generating the text template according to the text style is also different, which is illustrated below:
example one:
in this example, style description information corresponding to the text style may be determined, where the description information describes the text style of the current text template in a text manner, for example, as shown in fig. 3-1, when the text template is a text template, the corresponding text template may be described by "song body, small four, fantasy color", "regular script, small four, and bold character template", etc.
The text template display mode in this embodiment may be a list mode as shown in fig. 3-1, and when the text template is displayed in the list mode, more text templates may be displayed by providing a downslide menu or the like, for example, as shown in fig. 3-2, corresponding description information may be added to different pattern templates. In this example, the corresponding text style may be visually presented by displaying a sample word corresponding to the style description information in the text template, where the sample word may be set by the user or may be a default word, for example, as shown in fig. 3-3, the sample word may be the name "twilight" of the user, etc. (the magical color effect is not shown in the figure). By the method, the problem that the occupied area of the character template is large due to the fact that the corresponding character content is directly displayed on the character template when the character content corresponding to the character style is long is solved.
Example two:
in this example, in order to improve the generation efficiency of the text template, the text content in the target area may be further identified, and then the text content is adjusted according to the text style, and the text template is generated according to the adjusted text content, so that the text template itself can intuitively display the specific text template content.
For example, when the picture of the text template is as shown in the left diagram of fig. 4, as shown in the right diagram of fig. 4, the text template can be directly generated according to the text content in the corresponding format.
Of course, the user may want to keep more text styles of text contents in the reference picture, for example, the user wants to keep position information of the text contents in the reference picture, in this case, as shown in fig. 5, the position of the corresponding text contents may be embodied in the corresponding text template in the form of a thumbnail, or may not be embodied visually, and only the corresponding position information is directly adapted in a specific application.
Specifically, in an embodiment of the present application, position information, such as coordinate information, of a target area in a reference picture is determined, and then, after the 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 in 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 mechanically, and the requirement of the user is improved.
Based on the above embodiment, some users may have a requirement for fine adjustment of the effect generated by the text template, and therefore, in the actual application process, the corresponding picture editing platform provides an adjustment function, such as a position adjustment function, for each text template, and displays the target text content according to the adjustment of the user on the text template.
Naturally, the automatic execution method of the text template may also be used in other template generation manners, for example, when the picture template is generated, the specific content included in the corresponding picture pattern is a layout of the picture, a filter of the picture, brightness of the picture, a size of the picture, and the like, for example, in an actual execution process, the picture template may be displayed in a thumbnail sketch manner, as shown in fig. 3 to 4, when the picture pattern corresponding to the picture template is a picture layout, different layout main bodies may be embodied in a thumbnail form, and each main body may be shown by a corresponding shape and text, so as to improve the intuitiveness of the picture template.
To sum up, the text template generating method according to 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, finally identifies a text style corresponding to the text content in the target area, and generates a text template according to the text style. Therefore, the character template is automatically generated based on the provided reference picture, the generation efficiency of the character template is improved, the automatic generation of the character template is realized, and the attractiveness of the character template is ensured.
In order to implement the above embodiments, 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 character template generating apparatus includes: the template generating method comprises an acquisition module 10, a determination module 20 and a template generating module 30.
The obtaining module 10 is configured to obtain 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.
And the template generating module 30 is configured to identify a text style corresponding to the text content in the target region, and generate a text template according to the text style.
Further, in a possible implementation manner of the embodiment of the present application, as shown in fig. 7, on the basis of fig. 6, the determining module 20 includes: 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 extracting unit 22 is configured to extract 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 character feature of the character information, and determines a target image feature that is successfully matched.
In this embodiment, the determining unit 23 is further configured to determine that the region where the target image feature is located is the target region.
In a possible implementation manner of the embodiment of the present application, as shown in fig. 8, on the basis of that shown in fig. 6, the apparatus further includes: the module 40 is identified.
The identification module 40 is configured to identify 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 character 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 that 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 the position information of the target area 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 a target picture;
the obtaining module 10 is further configured to obtain target text content input by a user in a target text template;
and 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 is not repeated herein.
In order to implement the foregoing embodiments, an electronic device is further provided in an embodiment of the present application, including a processor and a memory;
wherein, the processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the text template generating method 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 bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, electronic device 120 is embodied in the form of a general purpose computing device. The components of the electronic device 120 may include, but are not limited to: one or more processors or processing units 160, a system memory 280, and a bus 180 that couples the various system components (including the system memory 280 and the processing unit 160).
Bus 180 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Electronic device 120 typically includes a variety of computer system readable media. Such media may 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 (RAM) 300 and/or cache Memory 3200. The electronic device 120 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 3400 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 10, commonly referred to as a "hard drive"). Although not shown in FIG. 10, a 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 (CD-ROM), a Digital versatile disk read Only Memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 180 by one or more data media interfaces. Memory 280 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the 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 of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 420 generally perform the functions and/or methodologies of 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.), with one or more devices that enable a user to interact with the electronic device 120, and/or with 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 be through an input/output (I/O) interface 220. Furthermore, the electronic device 120 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network (e.g., the Internet) via the Network adapter 200. As shown, the network adapter 200 communicates with the other modules of the electronic device 120 over a bus 180. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 120, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 160 executes various functional applications and data processing by executing programs stored in the system memory 280, for example, to implement the methods mentioned in the foregoing embodiments.
In order to implement the foregoing embodiments, the present application further proposes a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the non-transitory computer-readable storage medium implements the text template generating method according to the foregoing embodiments.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," 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 application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer 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, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited 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 steps of a custom logic function or process, and alternate 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 present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement 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). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can 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 should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A character template generation method is characterized by comprising the following steps:
acquiring a reference picture containing text information;
in the reference picture, determining a target area where the text content corresponding to the text information is located;
and identifying a character style corresponding to the character content in the target area, and generating a character template according to the character style.
2. The method of claim 1, wherein the determining, in the reference picture, a target region where text content corresponding to the text information is located comprises:
dividing the reference picture into a plurality of candidate regions;
extracting an image feature of each candidate region of the plurality of candidate regions;
matching the image characteristics of each candidate region with the character characteristics of the character information, and determining the target image characteristics which are successfully matched;
and determining the region where the target image feature is located as the target region.
3. The method of claim 1, wherein after determining the target area where the text corresponding to the text information is located, further comprising:
identifying text content in the target area;
the generating of the text template according to the text style comprises:
adjusting the text content according to the text style;
and generating the character template according to the adjusted character content.
4. The method of claim 1, wherein generating a text template according to 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. The method according to any one of claims 1-4, wherein after said determining the target area where the text corresponding to the text information is located, further comprising:
determining position information of the target area in the reference picture;
after the generating of the text template according to the text style, the method further comprises:
sending the character template to a user, and acquiring a target character template selected by the user when editing a target picture;
acquiring target character contents input by a user in the target character 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.
6. A character template generating apparatus, 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;
and the template generating module is used for identifying the character pattern corresponding to the character content in the target area and generating a character template according to the character pattern.
7. The apparatus of claim 6, wherein the determining module 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 the target image characteristics which are successfully matched;
the determining unit is further configured to determine that the region where the target image feature is located is the target region.
8. The apparatus of claim 6, 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 character template according to the adjusted character content.
9. The apparatus of claim 6, 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.
10. The apparatus of any one of claims 6-9, wherein the template generation module is specifically configured to:
determining position information of the target area in the reference picture;
the acquisition module is also used for sending the character template to a user and acquiring a target character template selected by the user when editing a target picture;
the acquisition module is also used for acquiring the target text content input by the user in the target text template;
the device 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.
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 true CN110929496A (en) 2020-03-27
CN110929496B 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
CN110929496B (en) 2023-06-16

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
CN109801347B (en) Method, device, equipment and medium for generating editable image template
CN108182183B (en) Picture character translation method, application and computer equipment
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
KR101611895B1 (en) Apparatus and Method of Automatic Text Design based on Emotion
CN107943924B (en) Method for automatically generating webpage theme, storage medium and electronic equipment
WO2022089170A1 (en) Caption area identification method and apparatus, and device and storage medium
US9258458B2 (en) Displaying an image with an available effect applied
TW201237764A (en) Method, apparatus, and computer program product for overlapped handwriting
US11410701B2 (en) Systems and methods for direct video retouching for text, strokes and images
US8244005B2 (en) Electronic apparatus and image display method
CN114827718A (en) Method and device for self-adaptive alignment display of real-time video screen-combining characters in cloud conference
CN108845741A (en) A kind of generation method, client, terminal and the storage medium of AR expression
CN110475139B (en) Video subtitle shielding method and device, storage medium and electronic equipment
CN110929496B (en) Text template generation method and device
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
CN115599276A (en) Artificial intelligence AI-based three-dimensional model display method and system
KR101651842B1 (en) Method and device for generating layout of electronic document
CN109299294B (en) Resource searching method and device in application, computer equipment and storage medium
CN114387315A (en) Image processing model training method, image processing device, image processing equipment and image processing medium
EP3876543A1 (en) Video playback method and apparatus
CN113052067A (en) Real-time translation method, device, storage medium and terminal equipment

Legal Events

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

Effective date of registration: 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.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
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.

TR01 Transfer of patent right