CN116092097A - Method and device for typesetting image content, electronic display equipment and medium - Google Patents

Method and device for typesetting image content, electronic display equipment and medium Download PDF

Info

Publication number
CN116092097A
CN116092097A CN202211563863.0A CN202211563863A CN116092097A CN 116092097 A CN116092097 A CN 116092097A CN 202211563863 A CN202211563863 A CN 202211563863A CN 116092097 A CN116092097 A CN 116092097A
Authority
CN
China
Prior art keywords
template
text
typesetting
alternative
target
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
CN202211563863.0A
Other languages
Chinese (zh)
Other versions
CN116092097B (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.)
ONYX INTERNATIONAL Inc
Original Assignee
ONYX INTERNATIONAL Inc
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 ONYX INTERNATIONAL Inc filed Critical ONYX INTERNATIONAL Inc
Priority to CN202211563863.0A priority Critical patent/CN116092097B/en
Publication of CN116092097A publication Critical patent/CN116092097A/en
Application granted granted Critical
Publication of CN116092097B publication Critical patent/CN116092097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/43Editing text-bitmaps, e.g. alignment, spacing; Semantic analysis of bitmaps of text without OCR
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text

Abstract

The embodiment of the application discloses a method, a device, electronic display equipment and a medium for typesetting of image content, wherein the method is used for displaying a preview picture of image acquisition by a camera; acquiring and displaying at least one alternative template type; receiving a template confirmation operation, and confirming a target recognition template and a target typesetting template according to the action of the template confirmation operation; receiving page confirmation operation, and dividing the preview picture according to the target recognition template to obtain a plurality of text image blocks; rearranging a plurality of text blocks according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template; and generating a text page according to the rearranged text blocks. The method and the device realize that different electronic display devices recognize the text content of the shot picture, and perform rearrangement matching with the electronic display device with reference to the typesetting style corresponding to the text content, so that the electronic display device can provide text pages with clear pictures, ordered typesetting and proper text size.

Description

Method and device for typesetting image content, electronic display equipment and medium
Technical Field
The embodiment of the application relates to the technical field of electronic display, in particular to a method and a device for typesetting of image content, electronic display equipment and a medium.
Background
With the development of electronic display technology, more and more users are used to read with portable electronic display devices (mobile phones, readers, tablet computers, etc.). However, some users may wish to read the content of paper publications or paper printed articles (books, papers, journals, manuals, etc.) on electronic display devices, and for this purpose, the users may directly photograph the paper documents through cameras of different electronic display devices, thereby obtaining images of the relevant text content. However, in most cases, the image obtained by direct shooting is equivalent to the whole zooming of the content of the paper document, so that the problem that the image and the text display are too small when the user reads the shot image and needs manual amplification during reading can not truly restore the reading and typesetting of the paper document, and poor reading experience is brought.
Disclosure of Invention
In order to solve the problems that pictures and characters are displayed too little when a user directly reads a shot image, manual amplification is required when the user reads the shot image, and poor reading experience is caused by the fact that the user cannot truly restore the reading typesetting of a paper file, the embodiment of the application provides a method, a device, electronic display equipment and media for typesetting of content of the image, the fact that different electronic display equipment recognizes text contents of the shot image is achieved, and a rearrangement version matched with the electronic display equipment is conducted according to typesetting modes corresponding to the text contents is conducted, so that the electronic display equipment can conveniently provide text pages with clear pictures, ordered typesetting and proper character sizes.
In a first aspect, an embodiment of the present application provides a method for typesetting an image content, including:
displaying a preview picture of image acquisition by a camera, wherein the preview picture is a temporary picture generated based on a target paper page;
acquiring and displaying at least one alternative template type, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template;
receiving a template confirmation operation, and confirming that the corresponding alternative recognition template and alternative layout template are respectively a target recognition template and a target layout template according to the alternative template type acted by the template confirmation operation;
receiving page confirmation operation, and carrying out picture segmentation on the preview picture according to the target identification template to obtain a plurality of text image blocks;
rearranging the plurality of text tiles according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template;
and generating a text page according to the text block after the re-typesetting.
In a second aspect, embodiments of the present application further provide an image content reprinting device, including:
the preview module is used for displaying a preview picture of image acquisition by the camera, wherein the preview picture is a temporary picture generated based on a target paper page;
the display module is used for acquiring and displaying at least one alternative template type, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template;
the confirmation module is used for receiving a template confirmation operation and confirming that the corresponding alternative recognition template and the alternative layout template are respectively a target recognition template and a target layout template according to the type of the alternative template acted by the template confirmation operation;
the segmentation module is used for receiving page confirmation operation, and carrying out picture segmentation on the preview picture according to the target identification template to obtain a plurality of text tiles;
the typesetting module is used for typesetting the plurality of text image blocks again according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template;
and the generating module is used for generating a text page according to the text block after the re-typesetting.
In a third aspect, an embodiment of the present application further provides an electronic display device, where the device includes a camera, a display, and a processor, where the processor is configured to perform the method for typesetting an image content weight according to any one embodiment of the present application.
In a fourth aspect, embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored, where the program or the instruction is executed by a processor to perform a method for typesetting an image content according to any embodiment of the present application.
The embodiment of the application provides a method, a device, electronic display equipment and a medium for typesetting of image content, wherein the method displays a preview picture of image acquisition by a camera, and the preview picture is a temporary picture generated based on a target paper page; acquiring and displaying at least one alternative template type, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template; receiving a template confirmation operation, and confirming that the corresponding alternative recognition template and alternative layout template are respectively a target recognition template and a target layout template according to the alternative template type acted by the template confirmation operation; receiving page confirmation operation, and dividing the preview picture according to the target recognition template to obtain a plurality of text image blocks; rearranging a plurality of text blocks according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template; and generating a text page according to the rearranged text blocks. The method and the device realize that different electronic display devices recognize the text content of the shot picture, and perform rearrangement matching with the electronic display device with reference to the typesetting style corresponding to the text content, so that the electronic display device can provide text pages with clear pictures, ordered typesetting and proper text size.
Drawings
Fig. 1 is a flowchart of a method for typesetting an image content according to an embodiment of the present application;
fig. 2 is a schematic diagram of text recognition failure early warning message output provided in an embodiment of the present application;
FIG. 3 is a schematic illustration of a display of a different alternative template type provided by an embodiment of the present application;
fig. 4 is a schematic diagram of a method for typesetting of content of an image according to an embodiment of the present application;
fig. 5 is a schematic diagram of an image content weight typesetting device provided in an embodiment of the present application;
fig. 6 is a schematic diagram of an electronic display device according to an embodiment of the present application;
FIG. 7 is a schematic diagram of an exemplary paleo-text provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of an exemplary patent document provided in an embodiment of the present application;
Detailed Description
Embodiments of the present application are described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the embodiments of the application and are not limiting of the embodiments of the application. It should be further noted that, for convenience of description, only some, but not all of the structures related to the embodiments of the present application are shown in the drawings.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, where appropriate, such that embodiments of the present application may be practiced in orders other than those illustrated and described herein, and that the objects identified by "first," "second," etc. are generally of a type that do not limit the number of objects, e.g., the first object may be one or more, and are not to be construed as indicating or implying relative importance. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship. Furthermore, unless explicitly stated and limited otherwise, the terms "disposed," "mounted," "connected," and "in series" are to be construed broadly, as they may be fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context.
With the development of electronic display technology, more and more users are used to read with portable electronic display devices (mobile phones, readers, tablet computers, etc.). However, some users may wish to read the content of paper publications or paper printed articles (books, papers, journals, manuals, etc.) on electronic display devices, and for this purpose, the users may directly photograph the paper documents through cameras of different electronic display devices, thereby obtaining images of the relevant text content. However, in most cases, the image obtained by direct shooting is equivalent to the whole zooming of the content of the paper document, so that the problem that the image and the text display are too small when the user reads the shot image and needs manual amplification during reading can not truly restore the reading and typesetting of the paper document, and poor reading experience is brought.
Based on the above, the embodiment of the application provides a method, a device, an electronic display device and a medium for typesetting of image content, which realize that different electronic display devices identify text content of a shot picture, and perform a rearrangement version matched with the electronic display device with reference to a typesetting style corresponding to the text content, so that the electronic display device can provide text pages with clear pictures, ordered typesetting and proper text size.
Fig. 1 is a flowchart of a method for typesetting an image content according to an embodiment of the present application, as shown in fig. 1, including the following steps:
s101: and displaying a preview picture of image acquisition by the camera, wherein the preview picture is a temporary picture generated based on the target paper page.
It should be noted that, after the user aligns the camera of the electronic display device with the target paper page, the user can see the preview screen before identification through the display of the electronic display device, and the preview screen is temporarily generated by the electronic display device through the image acquisition function of the camera.
In an alternative embodiment, the specific implementation process of step S101 includes the following steps:
s101a: and displaying a first preview picture of image acquisition by the camera.
It should be noted that, when the user aims the camera of the electronic display device at the target paper page, the preview image acquired by the camera may be regarded as the first preview image, however, there may be a case that the user may read the text content required to be identified by the electronic display device through the first preview image, but for the electronic display device, the above definition may not meet the identification requirement, so that the problem of abnormal image segmentation may occur after the subsequent page confirmation operation is received.
S101b: carrying out random character recognition on text content corresponding to the first preview picture; if the recognition result is null, outputting word recognition failure early warning information to prompt a user to adjust the focusing of the camera.
In a specific implementation process, the electronic display device may perform random text recognition based on text content corresponding to the first preview screen, so as to determine whether the preview screen meets the recognition definition requirement. If the recognition result is null, that means that the first preview screen cannot meet the subsequent recognition requirement, the user needs to be informed to adjust the focusing of the camera by adjusting the distance between the camera of the electronic display device and the target paper page, for example, as shown in fig. 2, text recognition failure early warning information can be output through a pop-up window, and for example, an exclamation mark can be added to the preview screen to be used as the output of the text recognition failure early warning information.
S101c: and displaying a second preview picture of the camera for re-image acquisition.
By the embodiment, the user can be reminded of timely adjusting the focusing of the camera, and the abnormality of failure in identifying the target paper file page caused by insufficient definition of the preview picture is reduced.
S102: at least one alternative template type is obtained and displayed, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template.
In a specific implementation process, after the electronic display device displays the preview screen, as shown in fig. 3, the electronic display device may acquire and display different alternative template types for the user to select according to the content of the target paper page, where the alternative template types acquired by the electronic display device may be preset according to the content types of common texts, such as books, papers, journals, manuals, and patent documents shown in fig. 7. The alternative template types can be book templates, paper templates, journal templates, manual templates and ancient document templates, and each alternative template type correspondingly comprises an alternative identification template and an alternative layout template. Because the text formats and typesetting parameters of books, papers, journals, manuals and ancient poems are different, each text content needs to have a corresponding alternative recognition template to analyze the image data corresponding to the target paper file page; the alternative layout template is used for resetting the analyzed image data based on a preset text format and typesetting parameters.
In an alternative embodiment, the specific process of step S102 includes the following steps:
s102a: and identifying the text of the target paper page corresponding to the preview picture.
S102b: and matching at least one template type serving as an alternative template type from preset template types according to the identification result and a preset matching rule.
It should be noted that, the alternative template type may be preset in the electronic display device, and the call is triggered when the acquiring operation is performed. The text of the target paper page comprises information such as a title and a text, the electronic display device can judge the text type of the target paper page through identifying the information such as the title and the text, the preset matching rule can be to integrally identify the title, judge whether the text belongs to the ancient text type through comparing the title with a common Gu Wenbiao question bank, and judge the related text type through keywords related to the title or the text, such as papers, periodicals, poems, words and the like. Since the preset matching rules are not exact matches, each text type of the recognition result is matched to one or more candidate template types, and the matched candidate template types are displayed to the user for selection. Therefore, the candidate template types can be more accurately matched based on the text information of the target paper page, the probability that the candidate template types hit the text types of the target paper page is increased, and the efficiency of determining the target template types for the target paper page by a user is improved.
S103: and receiving a template confirmation operation, and confirming that the corresponding alternative recognition template and the alternative layout template are respectively a target recognition template and a target layout template according to the alternative template type acted by the template confirmation operation.
An alternative implementation manner is that the electronic display device displays different alternative template types to a user for selection, for example, a name list of the alternative template types is displayed, and for example, an arrangement of distribution interfaces of the different alternative template types is displayed simultaneously, the user performs a template confirmation operation according to the content of the target paper file page, and the electronic display device confirms the alternative identification template and the alternative layout template selected by the user as a target identification template and a target layout template respectively. The target recognition template is used for analyzing the image data corresponding to the target paper file page, and the target typesetting template is used for typesetting the analyzed image data based on a preset text format and typesetting parameters.
S104: and receiving page confirmation operation, and carrying out picture segmentation on the preview picture according to the target identification template to obtain a plurality of text tiles.
In a specific implementation process, after the user confirms the type of the alternative template matched with the target paper file page, the user needs to further confirm whether the current preview picture is identified, so that the user can be ensured to identify the target paper file page in the next step. After the user performs the page confirmation operation, the electronic display device locks the preview screen and generates temporary image data corresponding to the preview screen. Optionally, before the image of the preview image is segmented, the connected domain analysis may be performed on the preview image, where the connected domain analysis result may be used as a reference for image segmentation, where the image segmentation is that the electronic display device parses the image data of the preview image through the target recognition template and performs segmentation of a specified unit, where the specified unit may use a text unit or a picture unit, and the text block corresponding to the segmented text block may be divided into a text block and a picture block, and the preview image is cut into the text block before the next step of typesetting is performed. Optionally, a segmentation mode can be confirmed according to the reading sequence corresponding to the target recognition template, wherein the segmentation mode comprises row segmentation and column segmentation; for example, for ancient text, the reading order of the text segments is from top to bottom and from right to left in columns, and then the segmentation mode can select column segmentation; for another example, for papers where the reading order of the paragraphs is from left to right and from top to bottom in rows, then the manner of segmentation may select a row segmentation. Dividing the preview picture into at least one dividing unit according to the dividing mode, and dividing the at least one dividing unit into at least one dividing group according to the original paragraph distribution of the text content according to the paragraph attribute of the text content where the dividing unit is positioned; confirming text attribute of the cut packet according to the position information of the original paragraph where the cut packet is located; the segmentation group is segmented into at least one text tile.
In an alternative embodiment, the specific procedure of receiving the page confirm operation in step S104 includes the following steps:
s104a: and displaying the regional frame of the camera for image acquisition.
It should be noted that, although the user may aim the camera of the electronic display device at the target document page, in general, the preview screen cannot adapt to the target document page and the image of the target document page is adaptively overlaid on the whole preview screen, which often has irrelevant image content. Therefore, the electronic display device can display the region frame of the image acquisition so that the user can concentrate on the target paper file page content by adjusting the region frame.
S104b: and receiving an area frame adjustment operation, and providing a function entry for page confirmation after adjusting the display area of the preview picture according to the area frame adjustment operation.
In a specific implementation process, a user drags the area frame according to an image of an actual target paper page presented on the preview picture, changes the length and width of the area frame, enables the display area of the preview picture to be exactly suitable for the content of the target paper page, and provides a function entry for page confirmation after the user finishes adjustment, so that the user can confirm that adjustment is finished.
S104c: and receiving triggering operation of the function entry to confirm the preview picture.
According to the embodiment, the environment image content irrelevant to the target paper file page in the preview picture can be reduced, the interference of the environment image content on the identification preview picture of the electronic display device is reduced, and the efficiency of the subsequent picture segmentation is improved.
In another optional implementation manner, in step S104, the specific implementation process of dividing the preview picture according to the target recognition template to obtain a plurality of text tiles includes the following steps:
s104d: at least one region tile is segmented from the preview screen according to the target recognition template.
In the specific implementation process, the target recognition template corresponds to a plurality of recognition areas, each area has a corresponding text attribute, and then the target recognition mode firstly performs area block segmentation on the preview picture according to the set recognition areas, and each area block also corresponds to the text attribute.
S104e: and splitting the region image block according to the paragraph structure by taking characters as a unit to obtain a plurality of text image blocks, and/or splitting according to the image block size by taking images as a unit to obtain a plurality of image text image blocks.
It should be noted that, the region image block may include a plurality of segments, the segment structure uses the segments as a main unit, then the region image block may be split by using the text as a minimum unit, the split text image block may still distinguish the segments where the text image block is located, or may be split by using the image as a unit according to the image block size, for example, if the image block size is greater than or equal to a preset size threshold, the image block is a picture text image block, and for example, the image block may be set with reference to the duty ratio of the reference image block size in the corresponding image size to be identified, and if the duty ratio of the image block size in the corresponding image size to be identified is greater than or equal to the preset size threshold, the image block is a picture text image block. When the characters are split specifically, the characters can be further divided into language characters and punctuation characters, and the language characters and the punctuation characters are split into smaller text blocks, so that when the characters are typeset later, proper character spacing can be reserved when punctuation exists between the characters, and the general typesetting requirements of the characters are met.
S105: and rearranging the plurality of text tiles according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template.
In a specific implementation process, the arrangement sequence of the text image blocks before being segmented and the reading sequence of the target paper file page before being segmented are matched, for example, the reading sequence of the paleo-text is from top to bottom and from right to left, so that the text image blocks segmented by the preview image of the target paper file page need to be orderly arranged from top to bottom and from right to left according to the original sequence; for another example, the reading sequence of the ordinary book is from top to bottom and from left to right, so that the text blocks divided from the preview screen of the text type need to be sequentially arranged from top to bottom and from left to right according to the original sequence. In addition, the arrangement sequence also keeps the paragraph sequence of the text block, and the text format and typesetting parameters corresponding to different paragraph positions in the target typesetting template are different; the display parameters of the current device are determined by the electronic display device in which the current preview screen is located, and are also references for the subsequent text page to adapt to the current electronic display device. As shown in fig. 4, after the electronic display device adjusts the display size of the text tiles according to the current device display parameters, the text tiles are added to the corresponding typesetting boxes of the target typesetting template according to the arrangement sequence, and the text properties of the corresponding typesetting boxes are rearranged.
In a specific embodiment, the implementation procedure of step S105 includes the following steps:
s105a: and confirming the matched display size of the text blocks according to the current equipment display parameters so that each line of text blocks can be displayed completely.
It should be noted that, the current device display parameters are determined based on the screen size of the electronic display device and the size of the target paper document page, and the display size of the text image block is adjusted according to the proportional relationship between the target paper document page and the screen size, so as to adapt to the display of the electronic display device and ensure the complete display of each line of text image block.
S105b: and sequentially adding the text blocks to the target typesetting template according to the typesetting partition and the reading direction of the target typesetting template according to the arrangement sequence before segmentation and the corresponding matched display size.
In the specific implementation process, the target typesetting template presets different display areas according to text attributes, each display area corresponds to a specific text attribute, the arrangement sequence of text image blocks corresponds to the distribution of the display areas, and the text image blocks are sequentially added to the target typesetting template for typesetting again by combining the reading direction of the text types.
S106: and generating a text page according to the text block after the re-typesetting.
It should be noted that, the text block after being rearranged may generate a text page on the electronic display device, where the text page may be adapted to display parameters of the electronic display device, and optionally, after the electronic display device identifies all target paper pages one by one and stores the corresponding text pages, all the text pages may be integrated into one document for viewing by a user.
In the embodiment of the application, the method for typesetting the content of the image comprises the following steps: displaying a preview picture of image acquisition by the camera, wherein the preview picture is a temporary picture generated based on a target paper page; acquiring and displaying at least one alternative template type, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template; receiving a template confirmation operation, and confirming that the corresponding alternative recognition template and alternative layout template are respectively a target recognition template and a target layout template according to the alternative template type acted by the template confirmation operation; receiving page confirmation operation, and dividing the preview picture according to the target recognition template to obtain a plurality of text image blocks; rearranging a plurality of text blocks according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template; and generating a text page according to the rearranged text blocks. The method and the device realize that different electronic display devices recognize the text content of the shot picture, and perform rearrangement matching with the electronic display device with reference to the typesetting style corresponding to the text content, so that the electronic display device can provide text pages with clear pictures, ordered typesetting and proper text size.
The embodiment of the application provides another method for typesetting of image content, which further comprises the following steps on the basis of the previous embodiment:
s107: and receiving a type switching operation, and switching the type of the alternative template according to the type switching operation.
In a specific implementation, step S107 follows step S102. In addition, the type of the alternative template displayed by the electronic display device is not necessarily adapted to the current target paper document page, no matter the type of the alternative template is a commonly used template type, the alternative template type customized according to the habit of a user or the alternative template type obtained by matching according to the content information of the target paper document page has a certain probability of being not adapted to the target paper document page, if the user selects to read the text content type of a cold door, the user needs to correspondingly perform type switching operation, specifically, the type switching function entry provided by the electronic display device is triggered, the electronic display device can be refreshed, and other alternative template types are displayed to continue to be selected by the user, so that bad experience that the user cannot read due to the lack of the suitable alternative template type can be reduced.
Fig. 5 is a schematic diagram of an image content weight typesetting apparatus 500 according to an embodiment of the present application, including:
the preview module 510 is configured to display a preview image of the camera for image acquisition, where the preview image is a temporary image generated based on the target paper page;
a display module 520, configured to obtain and display at least one alternative template type, where the alternative template type includes a corresponding alternative recognition template and an alternative layout template;
a confirmation module 530, configured to receive a template confirmation operation, and confirm that, according to an alternative template type acted by the template confirmation operation, a corresponding alternative recognition template and an alternative layout template are a target recognition template and a target layout template, respectively;
the segmentation module 540 is configured to receive a page confirmation operation, and segment the preview image according to the target recognition template to obtain a plurality of text tiles;
a typesetting module 550, configured to rearrange the plurality of text tiles according to the arrangement sequence before segmentation, the current device display parameters, and the target typesetting template;
a generating module 560, configured to generate a text page according to the text tile after the re-typesetting.
The image content weight typesetting device 500 realizes that different electronic display devices recognize the text content of a shot picture, and performs a rearrangement version matched with the electronic display device according to the typesetting style corresponding to the text content, so that the electronic display device can provide text pages with clear pictures, ordered typesetting and proper text size.
Fig. 6 is a schematic diagram of an electronic display device according to an embodiment of the present application, where the electronic display device includes a camera 630, a display 620, and a processor 610, and the processor 610 is configured to execute the method for typesetting an image content according to any embodiment of the present application.
The embodiment of the application provides a readable storage medium, wherein a program or an instruction is stored on the readable storage medium, and the program or the instruction realizes the method for typesetting the content of the image according to any embodiment of the application when being executed by a processor.
It should be noted that, the numbers of the steps in the solution are only used to describe the overall design framework of the solution, and do not represent the necessary sequence relationship between the steps. On the basis that the whole implementation process accords with the whole design framework of the scheme, the method belongs to the protection scope of the scheme, and the literal sequence during description is not an exclusive limit on the specific implementation process of the scheme.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product.
Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (10)

1. A method of typesetting an image content, comprising:
displaying a preview picture of image acquisition by a camera, wherein the preview picture is a temporary picture generated based on a target paper page;
acquiring and displaying at least one alternative template type, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template;
receiving a template confirmation operation, and confirming that the corresponding alternative recognition template and alternative layout template are respectively a target recognition template and a target layout template according to the alternative template type acted by the template confirmation operation;
receiving page confirmation operation, and carrying out picture segmentation on the preview picture according to the target identification template to obtain a plurality of text image blocks;
rearranging the plurality of text tiles according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template;
and generating a text page according to the text block after the re-typesetting.
2. The method of claim 1, wherein displaying a preview of the camera for image capture, comprises:
displaying a first preview picture of image acquisition by the camera;
carrying out random character recognition on text content corresponding to the first preview picture;
if the recognition result is empty, outputting word recognition failure early warning information to prompt a user to adjust the focusing of the camera;
and displaying a second preview picture of the camera for re-image acquisition.
3. The method of claim 1, wherein the receiving a page confirm operation comprises:
displaying a region frame of the camera for image acquisition;
receiving an area frame adjustment operation, and providing a function entry for page confirmation after adjusting the display area of the preview picture according to the area frame adjustment operation;
and receiving triggering operation of the function entry to confirm the preview picture.
4. The method of claim 1, wherein the obtaining and displaying at least one template type as an alternative template type comprises:
identifying the text of the target paper page corresponding to the preview picture;
and matching at least one template type serving as an alternative template type from preset template types according to the identification result and a preset matching rule.
5. The method according to any one of claims 2 to 4, wherein after the obtaining and displaying at least one template type as an alternative template type, comprising:
and receiving a type changing operation, and changing the type of the displayed alternative template according to the type switching operation.
6. The method of claim 1, wherein the picture splitting the preview screen according to the target recognition template results in a plurality of text tiles, comprising:
dividing at least one region block from the preview screen according to the target recognition template;
splitting the region block according to the paragraph structure in units of characters to obtain a plurality of text blocks, and/or,
and splitting according to the size of the image block by taking the image as a unit to obtain a plurality of image text image blocks.
7. The method of claim 1, wherein the re-typesetting the plurality of text tiles according to the pre-segmentation ranking order, the current device display parameters, and the target typesetting template comprises:
confirming the matched display size of the text image blocks according to the current equipment display parameters so that each line of text image blocks can be displayed completely;
and sequentially adding the text blocks to the target typesetting template according to the typesetting partition and the reading direction of the target typesetting template according to the arrangement sequence before segmentation and the corresponding matched display size.
8. An image content rearrangement apparatus, comprising:
the preview module is used for displaying a preview picture of image acquisition by the camera, wherein the preview picture is a temporary picture generated based on a target paper page;
the display module is used for acquiring and displaying at least one alternative template type, wherein the alternative template type comprises a corresponding alternative identification template and an alternative layout template;
the confirmation module is used for receiving a template confirmation operation and confirming that the corresponding alternative recognition template and the alternative layout template are respectively a target recognition template and a target layout template according to the type of the alternative template acted by the template confirmation operation;
the segmentation module is used for receiving page confirmation operation, and carrying out picture segmentation on the preview picture according to the target identification template to obtain a plurality of text tiles;
the typesetting module is used for typesetting the plurality of text image blocks again according to the arrangement sequence before segmentation, the current equipment display parameters and the target typesetting template;
and the generating module is used for generating a text page according to the text block after the re-typesetting.
9. An electronic display device comprising a camera, a display and a processor for performing the method of content-weight typesetting of images according to any one of claims 1 to 7.
10. A readable storage medium, wherein a program or instructions is stored on the readable storage medium, which when executed by a processor, implements a method of image content weight composition according to any one of claims 1 to 7.
CN202211563863.0A 2022-12-07 2022-12-07 Method and device for typesetting image content, electronic display equipment and medium Active CN116092097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211563863.0A CN116092097B (en) 2022-12-07 2022-12-07 Method and device for typesetting image content, electronic display equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211563863.0A CN116092097B (en) 2022-12-07 2022-12-07 Method and device for typesetting image content, electronic display equipment and medium

Publications (2)

Publication Number Publication Date
CN116092097A true CN116092097A (en) 2023-05-09
CN116092097B CN116092097B (en) 2024-04-26

Family

ID=86211140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211563863.0A Active CN116092097B (en) 2022-12-07 2022-12-07 Method and device for typesetting image content, electronic display equipment and medium

Country Status (1)

Country Link
CN (1) CN116092097B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5583949A (en) * 1989-03-03 1996-12-10 Hewlett-Packard Company Apparatus and method for use in image processing
US20060282442A1 (en) * 2005-04-27 2006-12-14 Canon Kabushiki Kaisha Method of learning associations between documents and data sets
CN101807293A (en) * 2010-03-19 2010-08-18 上海合合信息科技发展有限公司 Method for adjusting detection result of image quadrilateral frame
CN102567300A (en) * 2011-12-29 2012-07-11 方正国际软件有限公司 Picture document processing method and device
CN109257644A (en) * 2018-11-16 2019-01-22 上海二三四五网络科技有限公司 A kind of picture adjusts the control method and control device of anti-Caton
CN111767488A (en) * 2020-06-15 2020-10-13 咪咕文化科技有限公司 Article display method, electronic device and storage medium
CN111782127A (en) * 2020-07-02 2020-10-16 Oppo广东移动通信有限公司 Display method, display device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5583949A (en) * 1989-03-03 1996-12-10 Hewlett-Packard Company Apparatus and method for use in image processing
US20060282442A1 (en) * 2005-04-27 2006-12-14 Canon Kabushiki Kaisha Method of learning associations between documents and data sets
CN101807293A (en) * 2010-03-19 2010-08-18 上海合合信息科技发展有限公司 Method for adjusting detection result of image quadrilateral frame
CN102567300A (en) * 2011-12-29 2012-07-11 方正国际软件有限公司 Picture document processing method and device
CN109257644A (en) * 2018-11-16 2019-01-22 上海二三四五网络科技有限公司 A kind of picture adjusts the control method and control device of anti-Caton
CN111767488A (en) * 2020-06-15 2020-10-13 咪咕文化科技有限公司 Article display method, electronic device and storage medium
CN111782127A (en) * 2020-07-02 2020-10-16 Oppo广东移动通信有限公司 Display method, display device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MENG FAN-BO 等,: "Research on the recognition of text valence", 《JOURNAL OF CHINESE COMPUTER SYSTEMS》, vol. 30, no. 7, 31 July 2009 (2009-07-31), pages 1458 - 1461 *
乔冰琴 等,: "智能票据识别在自动批量凭证生成中的应用", 《山西财税》, vol. 2022, no. 5, 31 May 2022 (2022-05-31), pages 32 - 35 *

Also Published As

Publication number Publication date
CN116092097B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
US9348801B2 (en) System and method for automatic page layout
CN101443790B (en) Efficient processing of non-reflow content in a digital image
US20130259377A1 (en) Conversion of a document of captured images into a format for optimized display on a mobile device
JP5658986B2 (en) Electronic book display device, method and program
US20090276695A1 (en) Automatic document generator
CN117668402A (en) System and method for applying layout to document
EP2544099A1 (en) Method for creating an enrichment file associated with a page of an electronic document
CN114118011A (en) Document processing method, electronic device and storage medium
US9734132B1 (en) Alignment and reflow of displayed character images
CN111859865A (en) Method, device, terminal and medium for converting PDF document
CN112464626B (en) Graph extraction method of PDF (Portable document Format) document, electronic equipment and storage medium
CN116092097B (en) Method and device for typesetting image content, electronic display equipment and medium
CN103970723A (en) Electronic document screen display method based on image detecting and cutting
US20080266606A1 (en) Optimized print layout
WO2015167525A1 (en) Automatic page layout for text items and image items
JP4518212B2 (en) Image processing apparatus and program
CN115828883A (en) Document content re-typesetting method and device, electronic display equipment and medium
CN114625996A (en) Webpage content paging method and device, electronic equipment and readable storage medium
CN112541331A (en) Electronic document filling method based on writing, searching and viewing synchronization on same screen
US20130104014A1 (en) Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium
KR101999549B1 (en) Cell auto divide device
CN101231574A (en) Editing and printing system, editing system and method
CN111143719A (en) Online publication method, device and equipment of thesis and computer-readable storage medium
CN116778032B (en) Answer sheet generation method, device, equipment and storage medium
US20150062660A1 (en) File management apparatus and file management method

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
GR01 Patent grant
GR01 Patent grant