CN115578483A - Method, device and equipment for generating strip-diffuse image and computer storage medium - Google Patents

Method, device and equipment for generating strip-diffuse image and computer storage medium Download PDF

Info

Publication number
CN115578483A
CN115578483A CN202110683605.5A CN202110683605A CN115578483A CN 115578483 A CN115578483 A CN 115578483A CN 202110683605 A CN202110683605 A CN 202110683605A CN 115578483 A CN115578483 A CN 115578483A
Authority
CN
China
Prior art keywords
image
images
text information
display area
overlapped
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
CN202110683605.5A
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.)
Hapinisi Beijing Culture Technology Co ltd
Original Assignee
Hapinisi Beijing Culture 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 Hapinisi Beijing Culture Technology Co ltd filed Critical Hapinisi Beijing Culture Technology Co ltd
Priority to CN202110683605.5A priority Critical patent/CN115578483A/en
Publication of CN115578483A publication Critical patent/CN115578483A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The embodiment of the application provides a method, a device and equipment for generating a cartoon image and a computer storage medium. According to the method for generating the strip cartoon image, the image and the text information in the page cartoon are obtained, the image and the text are combined according to the position relation of the image and the text and the preset combination rule corresponding to different position relations, the combined image is spliced to obtain the strip cartoon image, and the reading experience of a user is improved.

Description

Method, device and equipment for generating strip-diffuse image and computer storage medium
Technical Field
The invention belongs to the field of image processing, and particularly relates to a method, a device and equipment for generating a cartoon image and a computer storage medium.
Background
With the wide application of electronic devices, people increasingly use various electronic devices to read cartoons, and the improvement of the reading experience of users is gradually valued by people. In order to adapt to the operation of the electronic device, page diffusion is usually converted into a bar diffusion form, which is more suitable for the display of the electronic device and the browsing of the user. At present, a method for generating a cartoon is mainly to identify a dialog box layer, a text layer and other image layers in a page cartoon and combine the layers based on coordinate information. When the image grids are identified, the outer contour of the grids is obtained by using a boundary tracking algorithm, so that the frame coordinate information of each image grid is obtained, the centroid coordinate of each image grid is further obtained, and the merging sequence of the image grids is determined based on the grid coordinate information.
Although the method can realize generation of the bar anime, when the images are merged based on the coordinate information, only the images with the standard frames can be solved, the images with complex shapes cannot be merged and spliced to obtain the bar anime images, reading continuity of a user is influenced, and user experience is poor.
Disclosure of Invention
The embodiment of the invention provides an image generation method, an image generation device, an image generation equipment and a computer storage medium.
In a first aspect, an embodiment of the present invention provides a method for generating a bar-diffuse image, where the method includes:
acquiring image data of a display area, wherein the image data comprises a plurality of first images, a plurality of second images and first text information, and position relation information of the plurality of first images, the plurality of second images and the first text information;
combining the plurality of first images, the plurality of second images and the first text information to obtain a plurality of third images based on a first preset rule and the position relation information of the plurality of first images, the plurality of second images and the first text information;
splicing the plurality of third images to obtain strip diffuse images based on a second preset rule;
wherein the plurality of second images comprise second text information; the position relation information of the plurality of first images, the plurality of second images and the first text information comprises that the second images are overlapped with the first images, or the second images are not overlapped with the plurality of first images, or the second images are partially overlapped with the plurality of first images; the first text information overlaps the first image, or the first text information does not overlap the plurality of first images, or the first text information partially overlaps the plurality of first images, or the first image partially overlaps the plurality of first images.
In a second aspect, an embodiment of the present invention provides a bar diffuse image generating apparatus, including:
the acquisition module is used for acquiring image data of the display area, wherein the image data comprises a plurality of first images, a plurality of second images and first text information, and position relation information of the plurality of first images, the plurality of second images and the first text information;
the merging module is used for merging the plurality of first images, the plurality of second images and the first text information to obtain a plurality of third images based on a first preset rule and the position relation information of the plurality of first images, the plurality of second images and the first text information;
the splicing module is used for splicing the plurality of third images based on a second preset rule to obtain strip diffuse images;
wherein the plurality of second images comprise second text information; the position relation information of the plurality of first images, the plurality of second images and the first text information comprises that the second images are overlapped with the first images, or the second images are not overlapped with the plurality of first images, or the second images are partially overlapped with the plurality of first images; the first text information overlaps the first image, or the first text information does not overlap the plurality of first images, or the first text information partially overlaps the plurality of first images, or the first image partially overlaps the plurality of first images.
In a third aspect, an embodiment of the present invention provides a stripe diffusion image generation device, including:
a processor, and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the bar-diffuse image generation method as in the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer storage medium,
the computer storage medium has stored thereon computer program instructions which, when executed by a processor, implement the bar-diffuse image generation method according to the first aspect.
According to the strip-diffuse image generation method, the strip-diffuse image generation device, the strip-diffuse image generation equipment and the computer storage medium, the image data and the text data of the page diffuse can be obtained through obtaining the image data of the display area, the merging mode is determined according to the position relation of the image and the text, and the merged image is further spliced according to the position information of the image to obtain the strip-diffuse image, wherein the images forming a complete picture can be merged during merging, so that the reading continuity of a user is guaranteed, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a special case of a relatively complex picture in a page-diffuse image;
FIG. 2 is a schematic flowchart of a bar-diffuse image generation method according to an embodiment of the present disclosure;
FIG. 3A is a schematic diagram of a position relationship of a first image according to an embodiment of the present invention;
FIG. 3B is a schematic diagram of a position relationship between a first image and a second image according to an embodiment of the present invention;
FIG. 3C is a schematic diagram of a position relationship between a first image and a second image according to an embodiment of the present invention;
FIG. 3D is a schematic diagram of a position relationship between a first image and a second image according to an embodiment of the present invention;
fig. 3E is a schematic diagram of a position relationship between a first image and first text information according to an embodiment of the present invention;
fig. 3F is a schematic diagram of a position relationship between a first image and first text information according to an embodiment of the present invention;
fig. 3G is a schematic diagram of a position relationship between a first image and first text information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a distribution of a first image provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a distribution of a second image provided by an embodiment of the present application;
FIG. 6 is a diagram illustrating a distribution of textual information provided by an embodiment of the present invention;
FIG. 7 is a diagram illustrating merging of image data according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating merging of image data according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating merging of image data according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a spread image provided by an embodiment of the invention;
FIG. 11 is a schematic diagram of a first image that may be stitched provided by embodiments of the present invention;
FIG. 12 is a schematic diagram of image numbering according to an embodiment of the present invention;
FIG. 13 is a schematic diagram of image stitching according to an embodiment of the present invention;
FIG. 14 is a schematic diagram of image stitching according to an embodiment of the present invention;
FIG. 15 is a schematic diagram of image stitching according to an embodiment of the present invention;
FIG. 16 is an enlarged view of an image provided by an embodiment of the present invention;
fig. 17 is a schematic structural diagram of a bar-diffuse image generating apparatus according to an embodiment of the present invention;
fig. 18 is a schematic structural diagram of a bar-diffuse image generation device according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 … …" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
At present, in the process of converting a page cartoon into a strip cartoon, data of an image layer, a text layer and other layers in an image are mainly acquired, and when the data are combined, coordinate information of the image is acquired by acquiring an outer contour of the image and further a centroid coordinate of the image is acquired. The arrangement sequence of the images can be obtained through the coordinates of the mass center of the images. The method is only suitable for images with more standard frames, and cannot process images with various complex frames as shown in fig. 1, such as the case that (1) characters or dialog boxes are exceeded in fig. 1, wherein the characters belong to text information, and the dialog boxes are second images; the dialog box (2) in fig. 1 spans a plurality of partial mirrors, wherein the partial mirrors are the first images, i.e. the second image is partially overlapped with the plurality of first images; fig. 1 (3) the lenticular pseudonym exceeds, the pseudonym belongs to the first text information, and the first text information partially overlaps with the first image; (4) the main body of the lens exceeds in fig. 1, that is, the first image exceeds the frame; in fig. 1, (5) a plurality of partial mirrors overlap, that is, there is a partial overlap in a plurality of first images; the (6) partial mirror in fig. 1 has no frame, that is, the first image has no regular frame outline, which may affect the consistency of reading for the user in practical application, and the experience is poor.
In order to solve the problem of the prior art, embodiments of the present invention provide a method, an apparatus, a device, and a computer storage medium for generating a bar-diffuse image.
First, a method for generating a bar-diffuse image according to an embodiment of the present invention will be described below.
Fig. 2 is a flowchart illustrating a bar-diffuse image generation method according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
s210, image data of the display area are obtained, wherein the image data comprise a plurality of first images, a plurality of second images and first text information, and position relation information of the first images, the second images and the first text information.
The display area is a display area of a page diffusion. The first image, the second image, the text information, and the positional relationship information among the first image, the second image, and the text information in the page diffusion display area are acquired. Wherein the text information comprises first text information and second text information.
Wherein the positional relationship information includes: the plurality of second images comprise second text information; the positional relationship information of the plurality of first images, the plurality of second images, and the first text information includes that the first images partially overlap with the plurality of first images, as shown in fig. 3A; the second image overlaps the first image, as shown in fig. 3B, or the second image does not overlap the plurality of first images, as shown in fig. 3C, or the second image partially overlaps the plurality of first images, as shown in fig. 3D; the first text information overlaps the first image as shown in fig. 3E, or the first text information does not overlap the plurality of first images as shown in fig. 3F, or the first text information partially overlaps the plurality of first images as shown in fig. 3G.
In some embodiments, image data of the display area, which includes the first image, the second image, and the text information data, may be acquired through an Artificial Intelligence (AI) model.
In one example, the AI model may include 3: an image segmentation model, an object detection model, and an Optical Character Recognition (OCR) model. The image segmentation model is used for acquiring a first image in the current display area, as shown in fig. 4; the target detection model is used for acquiring a second image of the current display area, as shown in fig. 5; the OCR model is used to obtain the text information of the current display area as shown in fig. 6.
S220, combining the plurality of first images, the plurality of second images and the first text information to obtain a plurality of third images based on a first preset rule and the position relation information of the plurality of first images, the plurality of second images and the first text information.
In some embodiments, the first preset rule comprises: and determining a merging rule according to the position relation among the first image, the second image and the first text information. The first preset rule is used for determining whether the first image, the second image and the first text information are combined to obtain a third image.
In some embodiments, merging the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and the positional relationship information of the plurality of first images, the plurality of second images, and the first text information includes: when the first image is partially overlapped with at least one first image, combining the first image and the at least one first image to obtain a third image, as shown in fig. 3A; when the first text information is overlapped with the first image, combining the first text information and the first image to obtain a third image, as shown in fig. 3E; when the first text information is partially overlapped with the at least one first image, combining the first text information and the at least one first image to obtain a third image, as shown in fig. 7; when the first text information is not overlapped with the first image and the distance between the first text information and the first image meets a first preset threshold, combining the first text information and the first image to obtain a third image, as shown in fig. 3F; and when the first text information is not overlapped with the first image and the distance between the first text information and the first image does not meet a first preset threshold value, determining that the first text information is a third image. When the first text information is not overlapped with the first image, the distance between the first text information and the first image meets a first preset threshold value, and when the first text information is not overlapped with the first image, and the distance between the first text information and the first image does not meet the first preset threshold value, whether the first image meeting the threshold value condition is the first image closest to the first text information or not is judged.
In some embodiments, merging the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and positional relationship information of the plurality of first images, the plurality of second images, and the first text information includes: when the second image is overlapped with the first image, combining the second image and the first image to obtain a third image, as shown in fig. 3B; when the second image is partially overlapped with at least one first image, combining the second image and the at least one first image to obtain a third image, as shown in fig. 8 and 9, including two cases of partially overlapping with one or more first images; when the second image is not overlapped with the first image and the distance between the second image and the first image meets a first preset threshold, combining the second image and the first image to obtain a third image, as shown in fig. 3C; and when the second image is not overlapped with the first image and the distance between the second image and the first image does not meet a first preset threshold value, determining that the second image is a third image. And when the second image is not overlapped with the first image and the distance between the second image and the first image does not satisfy the first preset threshold, judging whether the first images meeting the threshold condition are the first images closest to the second image.
And S230, splicing the plurality of third images based on a second preset rule to obtain a strip diffuse image.
According to the strip-diffuse image generation method provided by the embodiment of the application, the image information and the text information in the page diffuse can be obtained, the image information and the text information are combined based on the position relation, and the combined images are spliced to obtain the final strip-diffuse image, so that the reading consistency of a user is guaranteed, and the reading experience of the user can be improved.
In some embodiments, the display area includes a first display area and a second display area adjacent to each other, and as shown in fig. 10, acquiring image data of the display area includes: respectively acquiring image data of a first display area and image data of a second display area; and when the image of the first display area and the image of the second display area are determined to form a complete picture, splicing the image of the second display area to the image of the first display area to obtain a first image.
The image data of the first display area and the second display area are respectively obtained, in one example, an image classification model is obtained through deep learning algorithm training, whether two first images forming a complete picture exist in two adjacent pages can be judged through the image classification model, and when the two first images forming the complete picture are judged to exist, as shown in fig. 10, the two images are spliced to obtain one first image.
The method for generating the strip-diffuse image can acquire the image and the text information in the page diffuse, and combines the image and the text according to the position relation of the image and the text and the preset combination rule corresponding to different position relations. Before combination, whether the cross-page cartoon exists or not can be judged, namely the situation that the two first images form a complete picture, the cross-page cartoon is spliced, so that a user reads the complete cartoon image, and the reading experience of the user is improved.
In some embodiments, a plurality of first images that satisfy the requirement of forming a complete picture may also be on the same page, or may be identified by using a picture classification model, and then stitched to obtain one first image as shown in fig. 11.
In some embodiments, merging the at least one third image to obtain the bar diffuse image based on a second preset rule includes: acquiring the centroid coordinate information of each third image; determining numbers of the plurality of third images based on the centroid coordinate information of each third image; and splicing the plurality of third images according to the numbers to obtain the strip diffuse images. After obtaining the centroid coordinate information of the third image, the row and column information of the third image may be determined according to the coordinate information, and the third image is further numbered according to the row and column information in the order of first-row and second-row or first-row and second-row, as shown in fig. 12. The specific numbering rule may be set according to the reading order of the page skimming, which is not limited in this respect.
In some embodiments, stitching the plurality of third images according to the numbers to obtain the bar diffuse image comprises: when the side length of the third image is smaller than a first threshold value, combining the third image which has a similar number with the third image and can form a complete picture into the third image; when the inclination angle of the side of the third image is larger than a second threshold value, merging the third image with the side with the same inclination angle, which is similar to the third image in number, into the third image; when any third image is positioned inside a circumscribed polygon of a graph formed by the two third images, combining the two third images into any third image; and splicing the third images from small to large according to the numbers to obtain the strip diffuse images. When the side length of the third image is smaller than the first threshold, as shown in fig. 13, the third image that is similar to the third image and can constitute a complete picture is merged into the third image, and the first threshold may be set according to specific situations, which is not limited herein. When the inclination angle of the side of the third image is greater than the second threshold, as shown in fig. 14, the third image of the side having the same inclination angle and close to the third image is merged into the third image, and the second threshold is 0 degree, which may be specifically set according to actual needs, and is not limited thereto. When any one of the third images is located inside a circumscribed polygon of a figure formed by the two third images, as shown in fig. 15, the two third images are merged into any one of the third images, wherein when the area ratio of any one of the third images to the circumscribed polygon is greater than the threshold value of 0.85, it is determined that the third image is located inside the circumscribed polygon, and the third image is merged. The specific threshold may be set according to actual conditions, and is not limited to this.
In some embodiments, when the third images are stitched to obtain the striped diffuse image, the third images may be filled according to a background color of the images. Meanwhile, the third image with lower resolution is pixel-enlarged by the AI model, and a clearer image can be obtained compared to the conventional enlargement process, as shown in fig. 16.
According to the strip-diffuse image generation method provided by the embodiment of the application, the acquired image data can be merged according to the preset rule, and the merged image is spliced to obtain the strip-diffuse image. In the merging process, a more appropriate merging mode can be selected according to different position relations of the image and the text. When splicing, a plurality of images and the like forming a finished picture can be combined, so that a user can obtain a better reading effect, and the reading experience of the user is improved.
Based on the method for generating the cartoon images, the embodiment of the application further provides a device for generating the cartoon images, which comprises the following specific contents:
fig. 17 is a schematic structural diagram of a stripe diffusion image generating apparatus according to an embodiment of the present invention. As shown in fig. 17, the apparatus includes an acquisition module 1710, a merge module 1720, and a splice module 1730.
An obtaining module 1710, configured to obtain image data of the display area, where the image data includes a plurality of first images, a plurality of second images, and first text information, and position relationship information of the plurality of first images, the plurality of second images, and the first text information.
The merging module 1720 is configured to merge the multiple first images, the multiple second images, and the first text information to obtain multiple third images based on a first preset rule and the position relationship information of the multiple first images, the multiple second images, and the first text information.
The splicing module 1730 is configured to splice the plurality of third images to obtain a striped diffuse image based on a second preset rule.
In some embodiments, the second text information is included in the plurality of second images; the position relation information of the plurality of first images, the plurality of second images and the first text information comprises that the first images are partially overlapped with the plurality of first images; the second image is overlapped with the first image, or the second image is not overlapped with the plurality of first images, or the second image is partially overlapped with the plurality of first images; the first text information overlaps the first image, or the first text information does not overlap the plurality of first images, or the first text information partially overlaps the plurality of first images, or the first image partially overlaps the plurality of first images.
The strip-diffuse image generation device 1700 can acquire image data in a page-diffuse display area, merge the image data according to the position relation between the image and the text in the image data, and splice the merged image according to a preset rule to obtain a strip-diffuse image, so that the reading experience of a user is improved.
In some embodiments, the display area includes a first display area and a second display area adjacent to each other, and acquiring image data of the display area includes: respectively acquiring image data of a first display area and a second display area; and when the image of the first display area and the image of the second display area are determined to form a complete picture, splicing the image of the second display area to the image of the first display area to obtain a first image.
In some embodiments, merging the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and the positional relationship information of the plurality of first images, the plurality of second images, and the first text information includes: when the first image is partially overlapped with at least one first image, combining the first image and the at least one first image to obtain a third image; when the first text information is overlapped with the first image, combining the first text information and the first image to obtain a third image; when the first text information is partially overlapped with at least one first image, combining the first text information and the at least one first image to obtain a third image; when the first text information is not overlapped with the first image and the distance between the first text information and the first image meets a first preset threshold, combining the first text information and the first image to obtain a third image; and when the first text information is not overlapped with the first image and the distance between the first text information and the first image does not meet a first preset threshold value, determining that the first text information is a third image.
In some embodiments, merging the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and the positional relationship information of the plurality of first images, the plurality of second images, and the first text information includes: when the second image is overlapped with the first image, combining the second image and the first image to obtain a third image; when the second image is partially overlapped with the at least one first image, combining the second image and the at least one first image to obtain a third image; when the second image is not overlapped with the first image and the distance between the second image and the first image meets a first preset threshold value, combining the second image and the first image to obtain a third image; and when the second image is not overlapped with the first image and the distance between the second image and the first image does not meet a first preset threshold value, determining that the second image is a third image.
In some embodiments, merging the at least one third image to obtain the strip diffuse image based on the second preset rule includes: acquiring the coordinate information of the center of mass of each third image; determining numbers of the plurality of third images based on the centroid coordinate information of each third image; and splicing the plurality of third images according to the numbers to obtain the strip diffuse images.
In some embodiments, stitching the plurality of third images according to the numbers to obtain the bar diffuse image comprises: when the side length of the third image is smaller than a first threshold value, combining the third image which is similar to the third image in number and can form a complete picture into the third image; when the inclination angle of the side of the third image is larger than a second threshold value, merging the third image with the side with the same inclination angle, which is similar to the third image in number, into the third image; when any third image is positioned inside a circumscribed polygon of a graph formed by the two third images, combining the two third images into any third image; and merging the third images from large to small according to the serial numbers to obtain the target image.
The strip-diffuse image generation device 1700 provided by the embodiment of the application can obtain the image and the text data in the page diffuse according to the obtained image and text data, combine the image and text data according to the preset rule, and splice the combined image to obtain the strip-diffuse image. A more appropriate combination mode can be selected according to different position relations of the images and the texts, and a plurality of images and the like forming a finished picture can be combined, so that a user can obtain a better reading effect, and the reading experience of the user is improved.
It should be noted that the apparatus in the embodiment of fig. 17 may be used as an execution main body in the methods in the embodiments, and may implement corresponding processes in the methods to achieve the same technical effects, and for brevity, the content of this aspect is not described in detail.
Fig. 18 is a schematic diagram illustrating a hardware structure of the stripe diffuse image generation according to the embodiment of the present invention.
The at-bar diffuse image generating device may include a processor 1801 and a memory 1802 having stored thereon computer program instructions.
Specifically, the processor 1801 may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present invention.
Memory 1802 may include a mass storage for data or instructions. By way of example, and not limitation, memory 1802 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, magnetic tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. In one example, the memory 1802 can include removable or non-removable (or fixed) media, or the memory 1802 can be non-volatile solid-state memory. Memory 1802 may be internal or external to the integrated gateway disaster recovery device.
In one example, memory 1802 may be a Read Only Memory (ROM). In one example, the ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
Memory 1802 may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors), it is operable to perform operations described with reference to the methods according to an aspect of the present disclosure.
The processor 1801 reads and executes the computer program instructions stored in the memory 1802 to implement the methods/steps S210 to S230 in the embodiment shown in fig. 2, and achieve the corresponding technical effects achieved by the example shown in fig. 2 executing the methods/steps thereof, which are not described herein again for brevity.
In one example, the strip diffuse image generation device may also include a communication interface 1803 and a bus 1810. As shown in fig. 18, the processor 1801, the memory 1802, and the communication interface 1803 are connected by a bus 1810 to complete communication therebetween.
The communication interface 1803 is mainly used to implement communication between modules, apparatuses, units and/or devices in the embodiment of the present invention.
Bus 1810 includes hardware, software, or both to couple the components of the online data traffic charging apparatus to one another. By way of example, and not limitation, a Bus may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus, FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) Bus, an infiniband interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a Micro Channel Architecture (MCA) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a video electronics standards association local (VLB) Bus, or other suitable Bus or a combination of two or more of these. Bus 1810 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
The strip cartoon image generation device can execute the strip cartoon image generation method in the embodiment of the invention based on the image information, the text information and the preset rule in the acquired page cartoon, thereby realizing the strip cartoon image generation method and device described in conjunction with fig. 2 and 17.
In addition, in combination with the bar-diffuse image generation method in the foregoing embodiments, embodiments of the present invention may be implemented by providing a computer storage medium. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the bar diffuse image generation methods in the above embodiments.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic Circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of 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, 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, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood 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 computer instructions which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (14)

1. A bar diffuse image generation method, characterized by comprising:
acquiring image data of a display area, wherein the image data comprises a plurality of first images, a plurality of second images and first text information, and position relation information of the plurality of first images, the plurality of second images and the first text information;
combining the plurality of first images, the plurality of second images and the first text information to obtain a plurality of third images based on a first preset rule and the position relation information of the plurality of first images, the plurality of second images and the first text information;
splicing the plurality of third images to obtain strip-diffuse images based on a second preset rule;
wherein the plurality of second images comprise second text information; the position relation information of the plurality of first images, the plurality of second images and the first text information comprises that the second images are overlapped with the first images, or the second images are not overlapped with the plurality of first images, or the second images are partially overlapped with the plurality of first images; the first text information overlaps the first image, or the first text information does not overlap the plurality of first images, or the first text information partially overlaps the plurality of first images, or the first image partially overlaps the plurality of first images.
2. The method of claim 1, wherein the display area comprises a first display area and a second display area which are adjacent to each other, and wherein the acquiring the image data of the display area comprises:
respectively acquiring image data of the first display area and the second display area;
when it is determined that the image of the first display area and the image of the second display area form a complete picture, the image of the second display area is spliced to the image of the first display area to obtain the first image.
3. The method according to claim 1 or 2, wherein the merging the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and positional relationship information of the plurality of first images, the plurality of second images, and the first text information comprises:
when the first image is partially overlapped with at least one first image, combining the first image and the at least one first image to obtain a third image;
when the first text information is overlapped with the first image, combining the first text information and the first image to obtain a third image;
when the first text information is partially overlapped with at least one first image, combining the first text information and the at least one first image to obtain a third image;
when the first text information is not overlapped with the first image and the distance between the first text information and the first image meets a first preset threshold, combining the first text information and the first image to obtain a third image;
and when the first text information is not overlapped with the first image and the distance between the first text information and the first image does not meet a first preset threshold value, determining that the first text information is a third image.
4. The method according to claim 1 or 2, wherein the merging the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and positional relationship information of the plurality of first images, the plurality of second images, and the first text information comprises:
when the second image is overlapped with the first image, combining the second image and the first image to obtain a third image;
when the second image is partially overlapped with at least one first image, combining the second image and the at least one first image to obtain a third image;
when the second image is not overlapped with the first image and the distance between the second image and the first image meets a first preset threshold, combining the second image and the first image to obtain a third image;
and when the second image is not overlapped with the first image and the distance between the second image and the first image does not meet a first preset threshold value, determining that the second image is a third image.
5. The method according to claim 1 or 2, wherein the merging the at least one third image into a bar diffuse image based on a second preset rule comprises:
acquiring the coordinate information of the center of mass of each third image;
determining numbers of the plurality of third images based on the centroid coordinate information of each third image;
and splicing the plurality of third images according to the serial numbers to obtain the strip diffuse image.
6. The method according to claim 5, wherein the stitching the plurality of third images according to the numbers to obtain the strip diffuse image comprises:
when the side length of the third image is smaller than a first threshold value, merging the third image which is similar to the third image in number and can form a complete picture into the third image;
when the inclination angle of the edge of the third image is larger than a second threshold value, merging the third image of the edge with the same inclination angle, which is similar to the third image in number, into the third image;
when any one third image is positioned inside a circumscribed polygon of a graph formed by the two third images, merging the two third images into any one third image;
and splicing the third image from small to large according to the number to obtain the strip diffuse image.
7. A bar diffuse image generation apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring image data of a display area, and the image data comprises a plurality of first images, a plurality of second images and first text information as well as position relation information of the plurality of first images, the plurality of second images and the first text information;
a merging module, configured to merge the multiple first images, the multiple second images, and the first text information to obtain multiple third images based on a first preset rule and position relationship information of the multiple first images, the multiple second images, and the first text information;
the splicing module is used for splicing the plurality of third images based on a second preset rule to obtain strip diffuse images;
wherein the plurality of second images include second text information; the position relation information of the plurality of first images, the plurality of second images and the first text information comprises that the second images are overlapped with the first images, or the second images are not overlapped with the plurality of first images, or the second images are partially overlapped with the plurality of first images; the first text information overlaps with the first image, or the first text information does not overlap with the plurality of first images, or the first text information partially overlaps with the plurality of first images, or the first image partially overlaps with the plurality of first images.
8. The apparatus according to claim 7, wherein the display area includes a first display area and a second display area that are adjacent to each other, and the obtaining module is configured to obtain the image data of the display area, and specifically includes:
the acquisition module acquires image data of the first display area and the second display area respectively;
when it is determined that the image of the first display area and the image of the second display area form a complete picture, the image of the second display area is spliced to the image of the first display area to obtain the first image.
9. The apparatus according to claim 7 or 8, wherein the merging module is configured to merge the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and the positional relationship information of the plurality of first images, the plurality of second images, and the first text information, and specifically includes:
when the first image is partially overlapped with at least one first image, combining the first image and the at least one first image to obtain a third image;
when the first text information is overlapped with the first image, combining the first text information and the first image to obtain a third image;
when the first text information is partially overlapped with at least one first image, combining the first text information and the at least one first image to obtain a third image;
when the first text information is not overlapped with the first image and the distance between the first text information and the first image meets a first preset threshold, combining the first text information and the first image to obtain a third image;
and when the first text information is not overlapped with the first image and the distance between the first text information and the first image does not meet a first preset threshold value, determining that the first text information is a third image.
10. The apparatus according to claim 7 or 8, wherein the merging module is configured to merge the plurality of first images, the plurality of second images, and the first text information to obtain a plurality of third images based on a first preset rule and the positional relationship information of the plurality of first images, the plurality of second images, and the first text information, and specifically includes:
when the second image is overlapped with the first image, combining the second image and the first image to obtain a third image;
when the second image is partially overlapped with at least one first image, combining the second image and the at least one first image to obtain a third image;
when the second image is not overlapped with the first image and the distance between the second image and the first image meets a first preset threshold value, combining the second image and the first image to obtain a third image;
and when the second image is not overlapped with the first image and the distance between the second image and the first image does not meet a first preset threshold value, determining that the second image is a third image.
11. The apparatus according to claim 7 or 8, wherein the stitching module is configured to merge the at least one third image to obtain a bar diffuse image based on a second preset rule, and specifically includes:
the splicing module acquires the centroid coordinate information of each third image;
determining numbers of the plurality of third images based on the centroid coordinate information of each third image;
and splicing the plurality of third images according to the serial numbers to obtain the strip diffuse image.
12. The apparatus according to claim 11, wherein the stitching module is configured to stitch the plurality of third images according to the serial numbers to obtain the strip diffuse image, and specifically includes:
when the side length of the third image is smaller than a first threshold value, combining a third image which is similar to the third image in number and can form a complete picture into the third image;
when the inclination angle of the side of the third image is larger than a second threshold value, merging the third image with the side with the same inclination angle, which is similar to the third image in number, into the third image;
when any one third image is positioned inside a circumscribed polygon of a graph formed by the two third images, merging the two third images into any one third image;
and merging the third images according to the serial numbers from large to small to obtain the target image.
13. A bar diffuse image generating apparatus, characterized in that the apparatus comprises: a processor, and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the bar diffuse image generation method according to any one of claims 1 to 6.
14. A computer storage medium having computer program instructions stored thereon that, when executed by a processor, implement the bar-diffuse image generation method according to any one of claims 1-6.
CN202110683605.5A 2021-06-21 2021-06-21 Method, device and equipment for generating strip-diffuse image and computer storage medium Pending CN115578483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110683605.5A CN115578483A (en) 2021-06-21 2021-06-21 Method, device and equipment for generating strip-diffuse image and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110683605.5A CN115578483A (en) 2021-06-21 2021-06-21 Method, device and equipment for generating strip-diffuse image and computer storage medium

Publications (1)

Publication Number Publication Date
CN115578483A true CN115578483A (en) 2023-01-06

Family

ID=84578795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110683605.5A Pending CN115578483A (en) 2021-06-21 2021-06-21 Method, device and equipment for generating strip-diffuse image and computer storage medium

Country Status (1)

Country Link
CN (1) CN115578483A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI826336B (en) * 2023-07-04 2023-12-11 凌網科技股份有限公司 Frame image acquisition method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI826336B (en) * 2023-07-04 2023-12-11 凌網科技股份有限公司 Frame image acquisition method

Similar Documents

Publication Publication Date Title
US11830230B2 (en) Living body detection method based on facial recognition, and electronic device and storage medium
US11087168B2 (en) Method and apparatus for positioning text over image, electronic apparatus, and storage medium
CN110232713B (en) Image target positioning correction method and related equipment
CN110517246B (en) Image processing method and device, electronic equipment and storage medium
WO2013112753A1 (en) Rules for merging blocks of connected components in natural images
CN110472539B (en) Text detection method and device and computer storage medium
CN107545223B (en) Image recognition method and electronic equipment
CN108021863B (en) Electronic device, age classification method based on image and storage medium
CN111292272B (en) Image processing method, image processing apparatus, image processing medium, and electronic device
EP3910590A2 (en) Method and apparatus of processing image, electronic device, and storage medium
CN111461070B (en) Text recognition method, device, electronic equipment and storage medium
CN111626163A (en) Human face living body detection method and device and computer equipment
CN115578483A (en) Method, device and equipment for generating strip-diffuse image and computer storage medium
CN109886189B (en) Fingerprint template acquisition method and related device
CN114565927A (en) Table identification method and device, electronic equipment and storage medium
JP2013171309A (en) Character segmentation method, and character recognition device and program using the same
CN114332794A (en) Target detection method, system, device and medium for train linear array image
CN113743318A (en) Table structure identification method based on row and column division, storage medium and electronic device
CN115019324A (en) Interactive method and device for text scanning, computer equipment and storage medium
EP4224869A1 (en) Video cropping method and apparatus, and device and storage medium
CN110796129A (en) Text line region detection method and device
CN115100663A (en) Method and device for estimating distribution situation of character height in document image
CN115115535A (en) Depth map denoising method, device, medium and equipment
KR101651842B1 (en) Method and device for generating layout of electronic document
CN114565521B (en) Image restoration method, device, equipment and storage medium based on virtual reloading

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