CN116541544A - Image-text typesetting method, device, medium and electronic equipment - Google Patents

Image-text typesetting method, device, medium and electronic equipment Download PDF

Info

Publication number
CN116541544A
CN116541544A CN202310667291.9A CN202310667291A CN116541544A CN 116541544 A CN116541544 A CN 116541544A CN 202310667291 A CN202310667291 A CN 202310667291A CN 116541544 A CN116541544 A CN 116541544A
Authority
CN
China
Prior art keywords
laid out
materials
map
saliency
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.)
Pending
Application number
CN202310667291.9A
Other languages
Chinese (zh)
Inventor
杨茂柯
薛昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202310667291.9A priority Critical patent/CN116541544A/en
Publication of CN116541544A publication Critical patent/CN116541544A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure relates to a graphic typesetting method, a graphic typesetting device, a graphic typesetting medium and electronic equipment, belongs to the technical field of computers, and can greatly reduce shielding among various materials and improve the attractiveness of an automatic poster imaging. A picture and text typesetting method comprises the following steps: obtaining a saliency map based on the background base map; searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out; determining a significance value for the candidate box; and determining the placement position of the material to be laid out from the candidate frame based on the significance value.

Description

Image-text typesetting method, device, medium and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a method, a device, a medium and electronic equipment for typesetting of graphics and texts.
Background
In the current automated graphic poster generation technology, algorithms such as a generation countermeasure network (Generative Adversarial Network, GAN) are generally used to generate arrangements between text boxes. However, the patterned text box is often not attractive due to the inconsistent positions of the text boxes, or the text boxes block the poster body.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method for typesetting graphics, including: obtaining a saliency map based on the background base map; searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out; determining a significance value for the candidate box; and determining the placement position of the material to be laid out from the candidate frame based on the significance value.
In a second aspect, the present disclosure provides an image-text typesetting apparatus, including: the acquisition module is used for acquiring a saliency map based on the background base map; the searching module is used for searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out; a first determining module, configured to determine a significance value of the candidate frame; and the second determining module is used for determining the placement position of the material to be laid out from the candidate frame based on the significance value.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of the first aspects.
In a fourth aspect, the present disclosure provides an electronic device comprising: a storage device having a computer program stored thereon; processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of the first aspects.
By adopting the technical scheme, the saliency map can be obtained based on the background base map, the to-be-laid material is combined to search on the saliency map, the candidate frames of the to-be-laid material are obtained, the saliency value of the candidate frames is determined, and the placement position of the to-be-laid material is determined from the candidate frames based on the saliency value, so that various materials (such as text frames and other materials) can be automatically laid in the production process of the graphic poster, and the placement position is determined according to the saliency value, so that the to-be-laid material is ensured not to be placed in the salient region of the background base map, but to be placed in the non-saliency region of the background base map, and therefore, the shielding among the materials (such as shielding of the text frames to a main body in the background base map) can be greatly reduced in the automatic layout process, and the aesthetic degree of the automatic poster forming map is improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
fig. 1 is a flow chart of a method of typesetting text according to one embodiment of the present disclosure.
Fig. 2 shows a schematic diagram of a background base map and its corresponding saliency map.
Fig. 3 is yet another flow chart of a method of typesetting text according to one embodiment of the present disclosure.
Fig. 4 is yet another flow chart of a method of typesetting text according to one embodiment of the present disclosure.
FIG. 5 shows a schematic diagram of extraction of multiple scale candidate boxes using a sliding window pyramid.
Fig. 6 is a schematic diagram of placement locations of materials to be laid out according to an embodiment of the present disclosure.
Fig. 7 is a schematic block diagram of a graphic typesetting apparatus according to one embodiment of the present disclosure.
Fig. 8 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
Meanwhile, it can be understood that the data (including but not limited to the data itself, the acquisition or the use of the data) related to the technical scheme should conform to the requirements of the corresponding laws and regulations and related regulations.
Fig. 1 is a flow chart of a method of typesetting text according to one embodiment of the present disclosure. As shown in fig. 1, the graphic composition method includes the following steps S11 to S14.
In step S11, a saliency map is obtained based on the background base map.
The background bottom image refers to an image on which material to be laid out is to be placed.
The material to be laid out may be a text box or other material.
A saliency map is an image for displaying the uniqueness of each pixel in a background map. The saliency maps are the same size as the background base maps. Fig. 2 shows a schematic diagram of a background map and its corresponding saliency map, where the white portions represent salient regions and the black portions represent non-salient regions in the saliency map on the right side of fig. 2.
In step S12, a candidate frame of the material to be laid out is obtained by searching on the saliency map in combination with the material to be laid out.
In some embodiments, the search on the saliency map may be performed in conjunction with the material to be laid out by means of a sliding window. That is, a window of the shape of the material to be laid out is used to perform a sliding window operation on the whole saliency map, so that all candidate frames in which the material to be laid out can be placed are obtained.
In step S13, a saliency value of the candidate frame is determined.
In some embodiments, an integral graph of the saliency map may be determined first, and then the saliency value for each candidate box may be determined based on the integral graph. The integration map is a map of an integrated value of each pixel in an image, and the integrated value of a certain pixel is a sum of all elements included in a rectangle having the pixel at the upper left corner of the image as the upper left corner vertex and the pixel at the lower right corner vertex. By adopting the integral graph, the calculation speed of the saliency value can be accelerated.
In step S14, the placement position of the material to be laid out is determined from the candidate boxes based on the saliency value.
For example, a candidate frame with the smallest significance value can be selected as a placement position of the material to be laid out; the N candidate frames with the minimum significance value can be selected according to the significance value sequence, so that a user can autonomously decide which candidate frame to place the material to be laid out in from the N candidate frames.
By adopting the technical scheme, the saliency map can be obtained based on the background base map, the candidate frames of the materials to be laid are obtained by searching on the saliency map based on the materials to be laid, then the saliency value of the candidate frames is determined, and the placement position of the materials to be laid is determined from the candidate frames based on the saliency value, so that various materials (such as text frames and other materials) can be automatically laid in the production process of the graphic poster, and the placement position is determined according to the saliency value, so that the materials to be laid can be ensured not to be placed in the saliency area of the background base map, but to be placed in the non-saliency area of the background base map, and the shielding among the materials (such as shielding of the text frames to a main body in the background base map) can be greatly reduced in the automatic layout process, and the attractiveness of the automatic poster forming map is improved.
Fig. 3 is yet another flow chart of a method of typesetting text according to one embodiment of the present disclosure.
As shown in fig. 3, in step S31, a saliency map is obtained based on the background base map.
In step S32, the material to be laid out to be searched on the saliency map is selected from the plurality of materials to be laid out according to the size priority. For example, the plurality of materials to be laid out may be sorted according to the size of the area, and the materials to be laid out to be searched on the saliency map may be selected in order from large to small.
In step S33, the selected material to be laid out is combined and searched on the saliency map, so as to obtain a candidate frame of the selected material to be laid out. How to perform the search has been described in detail in the foregoing, and will not be described in detail here.
In step S34, a saliency value of the candidate frame is determined. How the significance value is determined has been described in detail in the foregoing, and is not described in detail here.
In step S35, the placement position of the selected material to be laid out is determined from the candidate boxes based on the saliency value.
In step S36, the determined placement position is marked as salient on the saliency map. In this way, the placement location is considered as a salient region in the subsequent process, and no other material to be laid out is placed.
In step S37, it is determined whether all the materials to be laid out have been placed. And if the image-text typesetting flows are all placed, ending the image-text typesetting flow. If not, go to step S32 to place the next material to be laid out.
By adopting the technical scheme, the saliency map can be obtained based on the background base map, the to-be-laid material is combined to search on the saliency map to obtain the candidate frame of the to-be-laid material, then the saliency value of the candidate frame is determined, and the placement position of the to-be-laid material is determined from the candidate frame based on the saliency value, so that various materials (such as text frames and other materials) can be automatically laid in the production process of the graphic poster, and the placement position is determined according to the saliency value, so that the to-be-laid material is ensured not to be placed in the saliency area of the background base map, but to be placed in the non-saliency area of the background base map, and therefore, the shielding among the materials (such as shielding of a main body in the background base map by the text frame) can be greatly reduced in the automatic layout process, and the aesthetic degree of the automatic poster forming map is improved.
Fig. 4 is yet another flow chart of a method of typesetting text according to one embodiment of the present disclosure. The image-text typesetting method can be applied to a scene of performing size transformation on the existing poster to obtain a new poster, for example, performing size transformation on the existing horizontal poster to obtain the vertical poster.
As shown in fig. 4, in step S41, the material to be laid out is cut out from the poster to be size-converted to obtain a background image, and the background image is size-converted to obtain a background base image.
For example, if it is desired to transform the existing horizontal poster to obtain the vertical poster, in step S41, the material to be laid out (for example, text box) may be cut out of the existing horizontal poster to obtain the background image, and then the background image is transformed to obtain the vertical background base image.
In step S42, a saliency map is obtained based on the background base map.
In step S43, the material to be laid out to be searched on the saliency map is selected from the plurality of materials to be laid out according to the size priority. For example, the plurality of materials to be laid out may be sorted according to the size of the area, and the materials to be laid out to be searched on the saliency map may be selected in order from large to small.
In step S44, searching is performed on the saliency map based on the selected material to be laid out, so as to obtain a candidate frame of the selected material to be laid out. How to perform the search has been described in detail in the foregoing, and will not be described in detail here.
In step S45, a saliency value of the candidate frame is determined. How the significance value is determined has been described in detail in the foregoing, and is not described in detail here.
In step S46, the saliency value is processed based on the position and size of the material to be laid out in the poster to be size-converted, and the placement position of the selected material to be laid out is determined from the candidate frame based on the processed saliency value.
In some embodiments, processing the saliency value based on the position and size of the material to be laid out in the poster to be size converted may be achieved by: firstly, calculating the similarity between the position and the size of the candidate frame and the position and the size of the material to be laid out in the poster to be size-converted, for example, if the position of the candidate frame is relatively close to the position of the material to be laid out in the poster to be size-converted and the size of the candidate frame is relatively close to the size of the material to be laid out in the poster to be size-converted, the similarity between the two is relatively high; then, the similarity is normalized, for example, normalized to a range of 0 to 1; then, the normalized similarity is multiplied by the saliency value to obtain the processed saliency value.
In step S47, the determined placement position is marked as salient on the saliency map. In this way, the placement location is considered as a salient region in the subsequent process, and no other material to be laid out is placed.
In step S48, it is determined whether all the materials to be laid out have been placed. And if the image-text typesetting flows are all placed, ending the image-text typesetting flow. If not, go to step S43 to place the next material to be laid out.
By adopting the technical scheme, the saliency map can be obtained based on the background base map, the to-be-laid material is combined to search on the saliency map to obtain the candidate frames of the to-be-laid material, then the saliency value of the candidate frames is determined, and the placement position of the to-be-laid material is determined from the candidate frames based on the saliency value, so that various materials (such as text frames and other materials) can be automatically laid in the production process of the graphic poster, and the placement position is determined according to the saliency value, so that the to-be-laid material is ensured not to be placed in the saliency area of the background base map, but to be placed in the non-saliency area of the background base map, and therefore, the shielding among the materials (such as shielding of the text frames to a main body in the background base map) can be greatly reduced in the automatic layout process, and the aesthetic degree of the automatic poster forming map is improved. In addition, since the position and the size of the material to be laid out in the poster to be size-converted are taken into consideration in determining the placement position, it is possible to ensure that the finally determined placement position is more appropriate.
In some embodiments, before looking up on the saliency map in conjunction with the material to be laid out, the material to be laid out may be subjected to multi-scale transformation, for example, zooming in, zooming out, etc., and the scale of zooming in or zooming out may be in the range of, for example, 1 to 2 times. Through multi-scale transformation, the original-size material to be laid out, the enlarged material to be laid out, the reduced material to be laid out and the like can be obtained. After the multi-scale transformation, the materials to be laid out after the multi-scale transformation can be combined to search on the saliency map in sequence. For example, for the material 1 to be laid out, assuming that the material 1 to be laid out in a first scale, the material to be laid out in a second scale and the material to be laid out in a third scale are obtained after multi-scale transformation, the material 1 to be laid out in the first scale, the material 1 to be laid out in the second scale and the material 1 to be laid out in the third scale can be sequentially combined to search on the saliency map respectively, so as to obtain the candidate frames for the material 1 to be laid out. This approach may also be referred to as extracting multiple scale candidate boxes using a sliding window pyramid. FIG. 5 shows a schematic diagram of extraction of multiple scale candidate boxes using a sliding window pyramid. Each rectangular box in fig. 5 is a candidate box for multiple scales that are extracted.
By performing multi-scale transformation on the material to be laid out and then searching on the saliency map, the material to be laid out can be ensured to be placed at a proper position on the background base map.
In some embodiments, determining the placement location of the material to be laid out from the candidate boxes based on the saliency values may include: and aiming at candidate frames with similar positions and difference values of saliency values smaller than a preset threshold value, determining the placement positions of materials to be laid out from the candidate frames by using a non-maximum value suppression method. This ensures that a more appropriate placement position for the material to be laid out is determined.
Fig. 6 is a schematic diagram of placement locations of materials to be laid out according to an embodiment of the present disclosure. In the left diagram of fig. 6, the rectangular box in the upper left corner is the final determined candidate box position, and the upper left corner in the right diagram shows the material to be laid out placed in the candidate box. It can be seen that the final placement location of the material to be laid out does not obscure the subject in the background floor.
Fig. 7 is a schematic block diagram of a graphic typesetting apparatus according to one embodiment of the present disclosure. As shown in fig. 7, the image-text typesetting device includes: an obtaining module 71, configured to obtain a saliency map based on the background bottom map; the searching module 72 is configured to search on the saliency map in combination with the material to be laid out to obtain candidate frames of the material to be laid out; a first determining module 73, configured to determine a saliency value of the candidate frame; a second determining module 74 is configured to determine, based on the saliency value, a placement position of the material to be laid out from the candidate frames.
By adopting the technical scheme, the saliency map can be obtained based on the background base map, the to-be-laid material is combined to search on the saliency map to obtain the candidate frames of the to-be-laid material, then the saliency value of the candidate frames is determined, and the placement position of the to-be-laid material is determined from the candidate frames based on the saliency value, so that various materials (such as text frames and other materials) can be automatically laid in the production process of the graphic poster, and the placement position is determined according to the saliency value, so that the to-be-laid material is ensured not to be placed in the saliency area of the background base map, but to be placed in the non-saliency area of the background base map, and therefore, the shielding among the materials (such as shielding of the text frames to a main body in the background base map) can be greatly reduced in the automatic layout process, and the aesthetic degree of the automatic poster forming map is improved.
Optionally, the number of the materials to be laid out is plural, and the searching module 72 is further configured to: selecting materials to be laid out to be searched on the saliency map from a plurality of materials to be laid out according to the size priority; and searching on the significance map by combining the selected materials to be laid out.
Optionally, the searching module 72 is further configured to: performing multi-scale transformation on the materials to be laid out; and searching the materials to be laid out on the saliency map in sequence based on the multi-scale transformation.
Optionally, the first determining module 73 is further configured to: determining an integral graph of the saliency map; and determining a significance value of the candidate frame based on the integral graph.
Optionally, the image-text typesetting device further comprises a marking module, configured to: after the placement position of the material to be laid out is determined from the candidate frame, the determined placement position is marked as salient on the saliency map.
Optionally, the image-text typesetting device further comprises a clipping module, configured to: cutting out the materials to be laid out from the poster to be size-converted to obtain a background image; performing size conversion on the background image to obtain the background base image;
the second determining module 74 is further configured to: processing the significance value based on the position and the size of the material to be laid out in the poster to be size-converted; and determining the placement position of the material to be laid out from the candidate frame based on the processed significance value.
Optionally, the second determining module 74 processes the saliency value based on the position and the size of the material to be laid out in the poster to be size converted, including: calculating the similarity between the position and the size of the candidate frame and the position and the size of the material to be laid out in the poster to be size-converted; normalizing the similarity; multiplying the normalized similarity by the significance value to obtain the processed significance value.
Optionally, the second determining module 74 determines, based on the saliency value, a placement position of the material to be laid out from the candidate frame, including: and aiming at candidate frames with similar positions and difference values of the saliency values smaller than a preset threshold value, determining the placement positions of the materials to be laid out from the candidate frames by using a non-maximum suppression method.
The disclosed embodiments also provide a computer readable medium having stored thereon a computer program which when executed by a processing device performs the steps of any of the methods of the present disclosure.
The embodiment of the disclosure also provides an electronic device, including: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to carry out the steps of any of the methods of the present disclosure.
Referring now to fig. 8, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 8 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: obtaining a saliency map based on the background base map; searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out; determining a significance value for the candidate box; and determining the placement position of the material to be laid out from the candidate frame based on the significance value.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module is not limited to the module itself in some cases, and for example, the acquisition module may also be described as "a module for acquiring a saliency map based on a background map".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, example 1 provides a method for typesetting text, including: obtaining a saliency map based on the background base map; searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out; determining a significance value for the candidate box; and determining the placement position of the material to be laid out from the candidate frame based on the significance value.
According to one or more embodiments of the present disclosure, example 2 provides the method of example 1, wherein the number of materials to be laid out is a plurality, the method further comprising: selecting materials to be laid out to be searched on the saliency map from a plurality of materials to be laid out according to the size priority;
the searching on the significance map by combining the materials to be laid out comprises the following steps: and searching on the significance map by combining the selected materials to be laid out.
According to one or more embodiments of the present disclosure, example 3 provides the method of example 1, wherein the method further comprises: performing multi-scale transformation on the materials to be laid out;
the searching on the significance map by combining the materials to be laid out comprises the following steps: and searching the significance map sequentially based on the materials to be laid out after the multi-scale transformation.
According to one or more embodiments of the present disclosure, example 4 provides the method of example 1, wherein the determining the saliency value of the candidate box comprises: determining an integral graph of the saliency map; and determining a significance value of the candidate frame based on the integral graph.
Example 5 provides the method of example 1, according to one or more embodiments of the present disclosure, wherein the method further comprises: after the placement position of the material to be laid out is determined from the candidate frame, the determined placement position is marked as salient on the saliency map.
According to one or more embodiments of the present disclosure, example 6 provides the method of any one of examples 1 to 5, wherein the method further comprises: cutting out the materials to be laid out from the poster to be size-converted to obtain a background image; performing size conversion on the background image to obtain the background base image;
the determining, based on the saliency value, a placement position of the material to be laid out from the candidate frame includes: processing the significance value based on the position and the size of the material to be laid out in the poster to be size-converted; and determining the placement position of the material to be laid out from the candidate frame based on the processed significance value.
According to one or more embodiments of the present disclosure, example 7 provides the method of example 6, wherein the processing the saliency value based on the position and the size of the material to be laid out in the poster to be size converted includes: calculating the similarity between the position and the size of the candidate frame and the position and the size of the material to be laid out in the poster to be size-converted; normalizing the similarity; multiplying the normalized similarity by the significance value to obtain the processed significance value.
According to one or more embodiments of the present disclosure, example 8 provides the method of any one of examples 1 to 5 and 7, wherein the determining, based on the saliency value, the placement location of the material to be laid out from the candidate box includes: and aiming at candidate frames with similar positions and difference values of the saliency values smaller than a preset threshold value, determining the placement positions of the materials to be laid out from the candidate frames by using a non-maximum suppression method.
According to one or more embodiments of the present disclosure, example 9 provides a graphic typesetting apparatus, including: the acquisition module is used for acquiring a saliency map based on the background base map; the searching module is used for searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out; a first determining module, configured to determine a significance value of the candidate frame; and the second determining module is used for determining the placement position of the material to be laid out from the candidate frame based on the significance value.
According to one or more embodiments of the present disclosure, example 10 provides a computer-readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of examples 1-8.
Example 11 provides an electronic device according to one or more embodiments of the present disclosure, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples 1-8.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (11)

1. The image-text typesetting method is characterized by comprising the following steps of:
obtaining a saliency map based on the background base map;
searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out;
determining a significance value for the candidate box;
and determining the placement position of the material to be laid out from the candidate frame based on the significance value.
2. The method of claim 1, wherein the number of materials to be laid out is a plurality, the method further comprising: selecting materials to be laid out to be searched on the saliency map from a plurality of materials to be laid out according to the size priority;
the searching on the significance map by combining the materials to be laid out comprises the following steps: and searching on the significance map by combining the selected materials to be laid out.
3. The method according to claim 1, wherein the method further comprises: performing multi-scale transformation on the materials to be laid out;
the searching on the significance map by combining the materials to be laid out comprises the following steps: and searching the significance map sequentially based on the materials to be laid out after the multi-scale transformation.
4. The method of claim 1, wherein the determining the saliency value of the candidate box comprises:
determining an integral graph of the saliency map;
and determining a significance value of the candidate frame based on the integral graph.
5. The method according to claim 1, wherein the method further comprises: after the placement position of the material to be laid out is determined from the candidate frame, the determined placement position is marked as salient on the saliency map.
6. The method according to any one of claims 1 to 5, further comprising: cutting out the materials to be laid out from the poster to be size-converted to obtain a background image; performing size conversion on the background image to obtain the background base image;
the determining, based on the saliency value, a placement position of the material to be laid out from the candidate frame includes: processing the significance value based on the position and the size of the material to be laid out in the poster to be size-converted; and determining the placement position of the material to be laid out from the candidate frame based on the processed significance value.
7. The method of claim 6, wherein the processing the saliency value based on the position and size of the material to be laid out in the poster to be size converted comprises:
calculating the similarity between the position and the size of the candidate frame and the position and the size of the material to be laid out in the poster to be size-converted;
normalizing the similarity;
multiplying the normalized similarity by the significance value to obtain the processed significance value.
8. The method according to any one of claims 1 to 5 and 7, wherein the determining, based on the saliency value, a placement position of the material to be laid out from the candidate frame includes: and aiming at candidate frames with similar positions and difference values of the saliency values smaller than a preset threshold value, determining the placement positions of the materials to be laid out from the candidate frames by using a non-maximum suppression method.
9. An image-text typesetting device is characterized by comprising:
the acquisition module is used for acquiring a saliency map based on the background base map;
the searching module is used for searching on the significance map by combining the materials to be laid out to obtain candidate frames of the materials to be laid out;
a first determining module, configured to determine a significance value of the candidate frame;
and the second determining module is used for determining the placement position of the material to be laid out from the candidate frame based on the significance value.
10. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-8.
11. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-8.
CN202310667291.9A 2023-06-06 2023-06-06 Image-text typesetting method, device, medium and electronic equipment Pending CN116541544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310667291.9A CN116541544A (en) 2023-06-06 2023-06-06 Image-text typesetting method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310667291.9A CN116541544A (en) 2023-06-06 2023-06-06 Image-text typesetting method, device, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116541544A true CN116541544A (en) 2023-08-04

Family

ID=87447189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310667291.9A Pending CN116541544A (en) 2023-06-06 2023-06-06 Image-text typesetting method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116541544A (en)

Similar Documents

Publication Publication Date Title
CN112184738B (en) Image segmentation method, device, equipment and storage medium
CN111399956A (en) Content display method and device applied to display equipment and electronic equipment
CN112561840B (en) Video clipping method and device, storage medium and electronic equipment
CN111784712B (en) Image processing method, device, equipment and computer readable medium
CN111222509B (en) Target detection method and device and electronic equipment
CN111459364B (en) Icon updating method and device and electronic equipment
US20240112299A1 (en) Video cropping method and apparatus, storage medium and electronic device
CN110211195B (en) Method, device, electronic equipment and computer-readable storage medium for generating image set
CN112418232B (en) Image segmentation method and device, readable medium and electronic equipment
CN110795196A (en) Window display method, device, terminal and storage medium
CN116596748A (en) Image stylization processing method, apparatus, device, storage medium, and program product
CN111507123B (en) Method and device for placing reading materials, reading equipment, electronic equipment and medium
CN110852242A (en) Watermark identification method, device, equipment and storage medium based on multi-scale network
CN113255812B (en) Video frame detection method and device and electronic equipment
CN110619028A (en) Map display method, device, terminal equipment and medium for house source detail page
CN110619597A (en) Semitransparent watermark removing method and device, electronic equipment and storage medium
CN113033552B (en) Text recognition method and device and electronic equipment
CN112418233B (en) Image processing method and device, readable medium and electronic equipment
CN111696041B (en) Image processing method and device and electronic equipment
CN114786069A (en) Video generation method, device, medium and electronic equipment
CN116541544A (en) Image-text typesetting method, device, medium and electronic equipment
CN114399696A (en) Target detection method and device, storage medium and electronic equipment
CN112884787B (en) Image clipping method and device, readable medium and electronic equipment
CN112395826B (en) Text special effect processing method and device
CN114066721B (en) Display method and device and electronic 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