[go: up one dir, main page]

CN111723804B - Image-text separation device, image-text separation method and computer readable recording medium - Google Patents

Image-text separation device, image-text separation method and computer readable recording medium Download PDF

Info

Publication number
CN111723804B
CN111723804B CN201910202937.XA CN201910202937A CN111723804B CN 111723804 B CN111723804 B CN 111723804B CN 201910202937 A CN201910202937 A CN 201910202937A CN 111723804 B CN111723804 B CN 111723804B
Authority
CN
China
Prior art keywords
image
image block
complexity
picture
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910202937.XA
Other languages
Chinese (zh)
Other versions
CN111723804A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to CN201910202937.XA priority Critical patent/CN111723804B/en
Publication of CN111723804A publication Critical patent/CN111723804A/en
Application granted granted Critical
Publication of CN111723804B publication Critical patent/CN111723804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a picture and text separation device, picture and text separation method and computer readable recording medium, which is used for picture and text separation of halftone images as images to be separated, the picture and text separation device of the invention comprises: a blocking section that divides an image to be separated into a plurality of image blocks; a gray level complexity analysis part which sequentially analyzes each image block based on a mean difference algorithm to obtain gray level complexity of each image block; a first determination unit that determines an image block corresponding to a grayscale complexity greater than a complexity threshold as a picture block constituting a picture region, and determines an image block corresponding to a grayscale complexity not greater than the complexity threshold as a text block constituting a text region; an overall contour extraction unit for obtaining an image contour of an image to be separated; and a second determination unit that sequentially determines whether or not each image block in which the image contour passes includes a picture block, and determines all the image blocks in which the image contour passes as picture blocks when the image block in which the image contour passes includes a picture block.

Description

Image-text separation device, image-text separation method and computer readable recording medium
Technical Field
The invention belongs to the technical field of image-text separation, and particularly relates to an image-text separation device, an image-text separation method and a computer readable recording medium.
Background
Halftone images are used to simulate color and shade changes of continuous tone images by changing the size or density of a plurality of pixel points. In the case of performing the image-text separation of the halftone image, since the distribution of the pixel points of the halftone image is related to the halftone generation algorithm, different halftone generation algorithms may generate different pixel distribution patterns, and thus the image-text separation of the halftone image cannot be performed by merely extracting the color and shape characteristics of the pixels of the halftone image.
In general, the graphic separation of halftone images is performed based on a cross algorithm, specifically: after the halftone image is divided into a plurality of image blocks, binarizing each image block, comparing the gray level change quantity of each image block in the horizontal and vertical directions, and judging the image block with large gray level change quantity as a picture block, wherein the image block with small gray level change quantity is used as a text block. However, when the halftone image contains the character-shaped graphics, the gray level variation of the character-shaped graphics is low, so that the halftone image is easily misjudged as a character area, and the image-text separation is inaccurate, thereby affecting the subsequent image processing and analysis process.
Disclosure of Invention
The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a graphic separation apparatus, a graphic separation method, and a computer-readable recording medium capable of graphic separation of a relatively complex halftone image of a graphic mixed layout.
In order to achieve the above purpose, the invention adopts the following technical scheme:
The invention provides a picture-text separation device, which is used for carrying out picture-text separation on a half-tone image containing picture content and text content as images to be separated, so as to obtain a picture area corresponding to the picture content and a text area corresponding to the text content in the half-tone image, and is characterized by comprising the following components: a blocking section that divides an image to be separated into a plurality of image blocks; a gray level complexity analysis part which sequentially analyzes each image block based on a mean difference algorithm to obtain gray level complexity of each image block; a first determination unit that determines, based on the gray level complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gray level complexity greater than the complexity threshold as a picture block constituting a picture region, and determines the image block corresponding to the gray level complexity not greater than the complexity threshold as a text block constituting a text region; the whole contour extraction part is used for extracting the whole contour of the image to be separated to obtain the image contour of the image to be separated; and a second determination unit that sequentially determines whether or not each image block in which the image contour passes includes a picture block, and determines all the image blocks in which the image contour passes as picture blocks when the image block in which the image contour passes includes a picture block.
The invention also provides a picture-text separation method, which is used for carrying out picture-text separation on a half-tone image containing picture content and text content as images to be separated, so as to obtain a picture area corresponding to the picture content and a text area corresponding to the text content in the half-tone image, and is characterized by comprising the following steps: a blocking step of dividing an image to be separated into a plurality of image blocks; a gray level complexity analysis step, namely sequentially analyzing each image block based on a mean difference algorithm to obtain the gray level complexity of each image block; a first determination step of determining, based on the gray level complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gray level complexity greater than the complexity threshold as a picture block constituting a picture region, and determining the image block corresponding to the gray level complexity not greater than the complexity threshold as a text block constituting a text region; a whole contour extraction step, namely carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and a second judging step of judging whether the image blocks passing through the image outlines contain the image blocks in sequence, and judging all the image blocks passing through the image outlines as the image blocks once the image blocks passing through the image outlines contain the image blocks.
The invention also provides a computer readable recording medium for recording a computer program, which is characterized in that the computer program is used for carrying out image-text separation on a halftone image containing picture content and text content as an image to be separated, thereby obtaining a picture area corresponding to the picture content and a text area corresponding to the text content in the halftone image. The image-text separation device performs the following steps: a blocking step of dividing an image to be separated into a plurality of image blocks; a gray level complexity analysis step, namely sequentially analyzing each image block based on a mean difference algorithm to obtain the gray level complexity of each image block; a first determination step of determining, based on the gray level complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gray level complexity greater than the complexity threshold as a picture block constituting a picture region, and determining the image block corresponding to the gray level complexity not greater than the complexity threshold as a text block constituting a text region; a whole contour extraction step, namely carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and a second judging step of judging whether the image blocks passing through the image outlines contain the image blocks in sequence, and judging all the image blocks passing through the image outlines as the image blocks once the image blocks passing through the image outlines contain the image blocks.
Effects and effects of the invention
According to the image-text separation device, the image-text separation method, and the computer-readable recording medium of the present invention, since the block division unit divides the halftone image into a plurality of image blocks, the gradation complexity analysis unit sequentially analyzes each image block based on the mean difference algorithm to obtain the gradation complexity of each image block, the first determination unit determines an image block corresponding to the gradation complexity greater than the complexity threshold as a picture block, and determines an image block corresponding to the gradation complexity not greater than the complexity threshold as a text block, thereby performing preliminary determination on the attribute of each image block. Further, the whole contour extraction unit extracts the image contour of the halftone image, and the second determination unit sequentially determines whether or not each image contour passes through an image block, and when the image contour passes through an image block, determines all the image blocks passed through the image contour as image blocks, and erroneously determines the first determination unit as image blocks of text blocks (for example, image blocks constituting a graphic of a text shape) as image blocks, thereby enabling the determination result to be more accurate and enabling the subsequent image processing and analysis to be performed smoothly.
Drawings
FIG. 1 is a block diagram of an image-text separation device in an embodiment of the present invention;
FIG. 2 is an exemplary diagram of a halftone image in an embodiment of the present invention;
FIG. 3 is a diagram illustrating an example of binarization processing of all image blocks constituting an image to be separated according to an embodiment of the present invention;
Fig. 4 is a diagram showing an example of a determination result after a halftone image is determined by the first determination portion in the embodiment of the present invention;
fig. 5 is a diagram showing an example of a determination result after a halftone image is determined by the second determination portion in the embodiment of the present invention; and
Fig. 6 is a flowchart of the image-text separation action of the image-text separation device in the embodiment of the present invention.
Detailed Description
In order to make the technical means, creation characteristics, achievement purposes and effects of the present invention easy to understand, the image-text separation device of the present invention is specifically described below with reference to the embodiments and the accompanying drawings.
As a first aspect, the present invention provides a picture-text separation device for picture-text separating a halftone image containing picture content and text content as an image to be separated, thereby obtaining a picture region corresponding to the picture content and a text region corresponding to the text content in the halftone image, the device comprising: a blocking section that divides an image to be separated into a plurality of image blocks; a gray level complexity analysis unit which sequentially analyzes each image block to obtain gray level complexity of each image block; a first determination unit that determines, based on the gray level complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gray level complexity greater than the complexity threshold as a picture block constituting a picture region, and determines the image block corresponding to the gray level complexity not greater than the complexity threshold as a text block constituting a text region; the whole contour extraction part is used for extracting the whole contour of the image to be separated to obtain the image contour of the image to be separated; and a second determination unit that sequentially determines whether or not each image block in which the image contour passes includes a picture block, and determines all the image blocks in which the image contour passes as picture blocks when the image block in which the image contour passes includes a picture block.
In the image-text separation device according to the first embodiment, the image-text separation device may further include: further comprises: and a preprocessing section for preprocessing the halftone image and taking the preprocessed halftone image as an image to be separated, wherein the preprocessing is mean filtering processing.
In the image-text separation device according to the first embodiment, the image-text separation device may further include: and a control unit that controls the output unit to output, as a separation result, the region information of the picture region formed by the plurality of picture blocks and the region information of the text region formed by the plurality of text blocks, once the second determination unit completes the determination operation.
In the image-text separation device according to the first embodiment, the image-text separation device may further include: the whole contour extraction part comprises a whole binarization unit and a whole contour recognition unit, the whole binarization unit carries out binarization processing on the image to be separated to obtain a binarized image, and the whole contour recognition unit carries out whole contour recognition on the binarized image to obtain an image contour of the image to be separated.
In the image-text separation device according to the first embodiment, the image-text separation device may further include: the gray complexity analysis part is provided with an image block binarization unit, an image block contour extraction unit, an image block average value filtering unit and a gray complexity calculation unit, wherein the image block binarization unit sequentially carries out binarization processing on each image block to obtain a plurality of binarized image blocks, the image block contour extraction unit sequentially carries out image block contour extraction on each binarized image block to obtain a plurality of binarized image block contours, the image block average value filtering unit sequentially carries out average value filtering processing on each binarized image block to obtain a plurality of processed image blocks, the image block contour extraction unit sequentially carries out image block contour extraction on each processed image block to obtain a plurality of processed image block contours, and the gray complexity calculation unit calculates the gray complexity of each image block according to gray values of pixel points on the binarized image block contours of each image block and gray values of pixel points on the processed image block contours.
In the image-text separation device according to the first embodiment, the image-text separation device may further include: the gray level complexity calculation unit calculates gray level complexity of each image block based on a mean difference algorithm, wherein the mean difference algorithm is as follows: and sequentially calculating the absolute value of the difference value between the gray value of each pixel point on the binarized image block contour of the image block and the gray value of the pixel point on the processed image block contour, and then calculating the sum of the absolute values of the difference values to obtain the gray complexity of the image block.
As a second aspect, the present invention also provides a method for separating graphics and text, for performing graphics and text separation on a halftone image containing a picture content and a text content as an image to be separated, so as to obtain a picture area corresponding to the picture content and a text area corresponding to the text content in the halftone image, where the method is characterized by comprising the following steps: a blocking step of dividing an image to be separated into a plurality of image blocks; a gray level complexity analyzing step, namely sequentially analyzing each image block to obtain the gray level complexity of each image block; a first determination step of determining, based on the gray level complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gray level complexity greater than the complexity threshold as a picture block constituting a picture region, and determining the image block corresponding to the gray level complexity not greater than the complexity threshold as a text block constituting a text region; a whole contour extraction step, namely carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and a second judging step of judging whether the image blocks passing through the image outlines contain the image blocks in sequence, and judging all the image blocks passing through the image outlines as the image blocks once the image blocks passing through the image outlines contain the image blocks.
As a third aspect, the present invention also provides a computer-readable recording medium storing a computer program for causing a halftone image including a picture content and a text content to be subjected to a text separation as an image to be separated, thereby obtaining a picture region corresponding to the picture content and a text region corresponding to the text content in the halftone image. The image-text separation device performs the following steps: a blocking step of dividing an image to be separated into a plurality of image blocks; a gray level complexity analyzing step, namely sequentially analyzing each image block to obtain the gray level complexity of each image block; a first determination step of determining, based on the gray level complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gray level complexity greater than the complexity threshold as a picture block constituting a picture region, and determining the image block corresponding to the gray level complexity not greater than the complexity threshold as a text block constituting a text region; a whole contour extraction step, namely carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and a second judging step of judging whether the image blocks passing through the image outlines contain the image blocks in sequence, and judging all the image blocks passing through the image outlines as the image blocks once the image blocks passing through the image outlines contain the image blocks.
< Example >
Fig. 1 is a block diagram of an image-text separation device according to an embodiment of the present invention.
As shown in fig. 1, the image-text separation device 100 of the present embodiment is a computer provided with a computer program for executing an image-text separation method, and is configured to perform image-text separation on a halftone image to obtain a picture region corresponding to a picture content and a text region corresponding to a text content, and includes a preprocessing unit 10, a blocking unit 20, a gradation complexity analysis unit 30, a first determination unit 40, an overall contour extraction unit 50, a second determination unit 60, an output unit 70, a communication unit 80, and a control unit 90.
Fig. 2 is an exemplary diagram of a halftone image in an embodiment of the present invention.
As shown in fig. 2, a halftone image is generated from a continuous tone image by a halftone generation algorithm, which contains text regions and picture regions. In fig. 2, the left side portion is a text region, and the right side portion is a picture region. In the text region, text content is superimposed on a picture background; the picture area has a background and a pattern, and the pattern contains a figure of a character shape.
The preprocessing section 10 is configured to perform preprocessing on a halftone image and to take the preprocessed halftone image as an image to be separated. The preprocessing is mean filtering processing and is used for making up the hollow of the character area in the halftone image and reducing the particle noise of the halftone image.
The blocking section 20 is for dividing an image to be separated into a plurality of image blocks of a fixed size.
The gray level complexity analyzing unit 30 is configured to sequentially analyze each image block based on a mean difference algorithm to obtain gray level complexity of each image block, and includes an image block binarization unit 31, an image block mean filtering unit 32, an image block contour extraction unit 33, and a gray level complexity calculation unit 34.
The image block binarization unit 31 is configured to sequentially perform binarization processing on each image block to obtain a plurality of binarized image blocks. The specific process for obtaining the binarized image block comprises the following steps: and calculating an average value of gray values of the image block, taking the average value as a binarization threshold value of the image block, and carrying out binarization processing on the image block according to the binarization threshold value to obtain a binarized image block.
The image block average filtering unit 32 is configured to sequentially perform average filtering processing on each binarized image block, so as to obtain a plurality of processed image blocks.
The image block contour extraction unit 33 is configured to perform image block contour extraction on a binarized image block or a processed image block, to obtain a corresponding binarized image block contour or a processed image block contour, and specifically includes: sequentially extracting the image block contours of all the binarized image blocks to obtain a plurality of binarized image block contours; and sequentially extracting the image block contours of the processed image blocks to obtain a plurality of processed image block contours. Each binarized image block contour is formed by pixel points at the boundary of black and white pixels of the binarized image block, and each processed image block contour is formed by pixel points at the boundary of black and white pixels of the processed image block contour.
The gray level complexity calculating unit 34 is configured to calculate, based on a mean difference algorithm, gray level values of pixel points on the binarized image block contour of each image block and gray level values of pixel points on the processed image block contour, to obtain gray level complexity of each image block.
The mean difference algorithm is as follows: and sequentially calculating the absolute value of the difference value between the gray value of each pixel point on the binarized image block contour of the image block and the gray value of the pixel point on the processed image block contour, and then calculating the sum of the absolute values of the difference values to obtain the gray complexity of the image block.
Fig. 3 is an exemplary diagram of all image blocks constituting an image to be separated after binarization processing according to an embodiment of the present invention.
In fig. 3, (a) represents each of the binarized image blocks, (b) represents a plurality of the binarized image blocks in the text region, and (c) represents a plurality of the binarized image blocks in the text-shaped figure. As can be seen from fig. 3, the gray level complexity of the binarized image blocks in the text region is significantly inconsistent with the gray level complexity of the binarized image blocks in the background; meanwhile, the gray level complexity of the binarized image blocks in the graph of the character shape is closer to that of the binarized image blocks in the character area.
The first determination unit 40 is configured to determine each image block as a picture block or a text block based on the gradation complexity of the image block and a predetermined complexity threshold.
Here, a picture block is an image block whose attribute is a picture (corresponding to a picture region), and a character block is an image block whose attribute is a character (corresponding to a character region). The first judgment unit 40 judges the principle as follows: the image block contours of the image blocks constituting the picture area are less smooth and longer than the image block contours of the image blocks constituting the text area, and thus the gray level complexity is greater. Based on this principle, the first determination unit 40 determines an image block corresponding to a grayscale complexity greater than the complexity threshold as a picture block constituting a picture region, and determines an image block corresponding to a grayscale complexity not greater than the complexity threshold as a text block constituting a text region.
Fig. 4 is a diagram showing an example of a determination result after the halftone image is determined by the first determination portion in the embodiment of the present invention. In fig. 4, (a) is a schematic view of the overall result of the halftone image determined by the first determination unit 40 in the present embodiment, (b) is a partial enlarged view of the text region in the halftone image, and (c) is a partial enlarged view of the text-shaped graphic in the halftone image.
As shown in fig. 4, the image block determined as a text block by the first determination unit 40 and the image block determined as a picture block are shown in different colors. As can be seen from fig. 4, after each image block is determined by the first determination unit, the image block constituting the text region is determined as a text block. Meanwhile, since the gray level complexity of the binary image blocks in the character-shaped pattern is closer to the gray level complexity of the binary image blocks in the character region, some of the image blocks constituting the character-shaped pattern are misjudged as character blocks.
The integral contour extraction part 50 is used for carrying out integral contour extraction on an image to be separated to obtain an image contour of the image to be separated, and comprises an integral binarization unit 51 and an integral contour recognition unit 52.
The overall binarization unit 51 is configured to perform binarization processing on an image to be separated by using an average value of gray values of the image to be separated as a binarization threshold value, so as to obtain a binarized image.
The global contour recognition unit 52 is configured to perform global contour recognition on the binary image to obtain an image contour of the image to be separated, where the image contour is formed by pixel points at the intersections of black and white pixel points of the binary image (i.e., white lines in fig. 4).
The second determination unit 60 is configured to sequentially determine whether or not each image block in which an image contour passes includes a picture block, and once the image block in which the image contour passes includes a picture block, determine all the image blocks in which the image contour passes as picture blocks, thereby obtaining a picture region made up of the image blocks and a text region made up of the text blocks.
Fig. 5 is a diagram showing an example of a determination result after the halftone image is determined by the second determination portion in the embodiment of the present invention. In fig. 5, (a) is a schematic view of the overall result of the halftone image determined by the second determination unit in the present embodiment, (b) is a partial enlarged view of the text region of the halftone image, and (c) is a partial enlarged view of the text-shaped graphic of the halftone image. In fig. 5, white lines are image contours extracted by the whole contour extraction unit 50.
As can be seen from fig. 4 (c), the image block passing through the image contour in the character-shaped figure contains the image block determined as the picture block by the first determination unit 40.
As can be seen from fig. 5 (c), the second determination unit 60 determines all image blocks in which the image contour in the text-shaped figure passes as picture blocks.
The output unit 70 is configured to output, after the second determination unit 60 completes the determination operation, the region information (for example, information such as the corresponding region position coordinates and the size) of the picture region formed by the plurality of picture blocks and the region information of the text region formed by the plurality of text blocks as the text separation result to the subsequent image processing program, so that the image processing program performs the next processing, for example, text recognition of the halftone image and text comparison peer processing.
The communication unit 80 is used for exchanging data information between the respective constituent parts of the graphic separation device 100.
The control unit 90 is used to control the operations of the respective constituent elements of the image-text separation device 100.
The operation of the image-text separation device 100 of the present embodiment will be described with reference to the accompanying drawings.
The image-text separation device 100 of this embodiment performs preprocessing on a halftone image, and after the preprocessed halftone image is used as an image to be separated, divides the image to be separated into a plurality of image blocks, sequentially calculates the gray complexity of each image block, determines the attribute of each image block for the first time by determining whether the gray complexity of each image block is greater than a complexity threshold, determines whether the image block passing by each image contour includes a picture block according to the image contour of the image to be separated, and determines all the image blocks passing by the image contour as picture blocks when the image block passing by the image contour includes the picture block.
Fig. 6 is a flowchart of the image-text separation action of the image-text separation device in the embodiment of the present invention.
As shown in fig. 6, in the present embodiment, the flow of the image-text separation operation of the image-text separation device 100 includes the following steps:
In step S1, the preprocessing section 10 performs preprocessing on the halftone image and takes the preprocessed halftone image as an image to be separated, and then proceeds to step S2.
In step S2, the blocking section 20 divides the image to be separated into a plurality of image blocks, and then proceeds to step S3.
In step S3, the image block binarization unit 31 sequentially binarizes each image block to obtain a plurality of binarized image blocks, and then proceeds to step S4.
In step S4, the image block contour extraction unit 33 sequentially performs image block contour extraction on each of the binarized image blocks to obtain a plurality of binarized image block contours, and then proceeds to step S5.
In step S5, the image block average filtering unit 32 sequentially performs average filtering processing on each binarized image block to obtain a plurality of processed image blocks, and then proceeds to step S6.
In step S6, the image block contour extraction unit 33 sequentially performs image block contour extraction on each of the processed image blocks to obtain a plurality of processed image block contours, and then proceeds to step S7.
In step S7, the gray complexity calculating unit 34 calculates the gray complexity of each image block based on the mean difference algorithm according to the gray value of the pixel point on the binarized image block contour of each image block and the gray value of the pixel point on the processed image block contour, and then proceeds to step S8.
In step S8, the first determination unit 40 determines, based on the gradation complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gradation complexity greater than the complexity threshold as a picture block constituting the picture region, and determines the image block corresponding to the gradation complexity not greater than the complexity threshold as a text block constituting the text region, and then proceeds to step S9.
In step S9, the overall binarization unit 51 performs binarization processing on the image to be separated to obtain a binarized image, and then proceeds to step S10.
In step S10, the overall contour recognition unit 52 performs overall contour recognition on the binarized image to obtain an image contour of the image to be separated, and then proceeds to step S11.
In step S11, the second determination unit 60 sequentially determines whether or not each image block in which an image contour passes includes a picture block, and when the image block in which the image contour passes includes a picture block, determines all the image blocks in which the image contour passes as a picture block, and then proceeds to step S12.
In step S12, the output unit 70 outputs the region information of the picture region formed by the plurality of picture blocks and the region information of the text region formed by the plurality of text blocks as the text-to-text separation result, and then enters the end state.
Effects and effects of the examples
According to the image-text separation device, the image-text separation method, and the computer-readable recording medium of the present embodiment, since the segmentation section divides the halftone image into a plurality of image blocks, the gradation complexity analysis section sequentially analyzes each image block based on the mean difference algorithm to obtain the gradation complexity of each image block, the first determination section determines the image block corresponding to the gradation complexity greater than the complexity threshold as the picture block, and the image block corresponding to the gradation complexity not greater than the complexity threshold as the text block, thereby performing the preliminary determination on the attribute of each image block. Further, the whole contour extraction unit extracts the image contour of the halftone image, and the second determination unit sequentially determines whether or not each image contour passes through an image block, and when the image contour passes through an image block, determines all the image blocks passed through the image contour as image blocks, and erroneously determines the first determination unit as image blocks of text blocks (for example, image blocks constituting a graphic of a text shape) as image blocks, thereby enabling the determination result to be more accurate and enabling the subsequent image processing and analysis to be performed smoothly.
In addition, the preprocessing part can perform mean filtering preprocessing on the halftone image and take the preprocessed halftone image as an image to be separated, so that the hollow of a character area in the halftone image is made up, the particle noise of the halftone image is reduced, and the image-text separation result of the embodiment is more accurate.
Further, the output unit outputs the region information of the picture region formed by the plurality of picture blocks, the region information of the text region formed by the plurality of text blocks, and the halftone image, so that the subsequent image-text processing program can receive and perform the image-text processing operation.
In addition, because the whole binarization unit carries out binarization processing on the image to be separated to obtain a binarized image, the whole contour recognition unit carries out whole contour recognition on the binarized image so as to obtain the image contour of the image to be separated, and further the second judging part judges whether the image blocks passing through each image contour contain the picture blocks or not according to the image contour, and the judging action is completed.
In addition, because the image block binarization unit sequentially performs binarization processing on each image block to obtain a plurality of binarized image blocks, the image block contour extraction unit sequentially performs image block contour extraction on each binarized image block to obtain a plurality of binarized image block contours, the image block average value filtering unit sequentially performs average value filtering processing on each binarized image block to obtain a plurality of processed image blocks, the image block contour extraction unit sequentially performs image block contour extraction on each processed image block to obtain a plurality of processed image block contours, and the gray level complexity calculation unit calculates gray level complexity of each image block according to gray level values of pixel points on the binarized image block contours and gray level values of pixel points on the processed image block contours of each image block based on an average value difference algorithm, so that the gray level complexity of each image block can be obtained, and the attribute of each image block can be determined by comparing the gray level complexity of each image block with a complexity threshold.
The above embodiments are preferred examples of the present invention, and are not intended to limit the scope of the present invention.
For example, in the above-described embodiment, the image separation device performs preprocessing on the halftone image and performs image-text separation with the preprocessed halftone image as the image to be separated. In other embodiments, if the particle noise of the halftone image is small, the image separation device may directly use the halftone image as the image to be processed, and perform image-text separation on the image to be separated.
For example, in the present invention, the output section has a display unit, such as a display, for displaying a halftone image and displaying a text region and a picture region in different colors on the halftone image. In addition, the image outline may also be displayed in a color different from the color in which the two areas are displayed, so that the text content and the picture background in the text area are displayed more clearly.

Claims (6)

1. A picture-text separation device for picture-text separating a halftone image containing picture content and text content as an image to be separated, thereby obtaining a picture region corresponding to the picture content and a text region corresponding to the text content in the halftone image, characterized by comprising:
A blocking section that divides the image to be separated into a plurality of image blocks;
a gray level complexity analysis unit which sequentially analyzes each of the image blocks to obtain gray level complexity of each of the image blocks;
A first determination unit configured to determine, based on a gradation complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gradation complexity greater than the complexity threshold as a picture block constituting the picture region, and determine the image block corresponding to the gradation complexity not greater than the complexity threshold as a text block constituting the text region;
The whole contour extraction part is used for carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and
A second determination unit configured to sequentially determine whether or not the image blocks in which the image profiles pass include the picture blocks, and determine all the image blocks in which the image profiles pass as the picture blocks when the image blocks in which the image profiles pass include the picture blocks,
Wherein the gray complexity analysis part is provided with an image block binarization unit, an image block contour extraction unit, an image block average filtering unit and a gray complexity calculation unit,
The image block binarization unit sequentially carries out binarization processing on each image block to obtain a plurality of binarized image blocks,
The image block contour extraction unit sequentially performs image block contour extraction on each of the binarized image blocks to obtain a plurality of binarized image block contours,
The image block average filtering unit sequentially carries out average filtering processing on each binarized image block to obtain a plurality of processed image blocks,
The image block contour extraction unit sequentially performs image block contour extraction on each of the processed image blocks to obtain a plurality of processed image block contours,
The gray complexity calculating unit calculates gray complexity of each image block according to gray values of pixel points on the outline of the binarized image block of each image block and gray values of pixel points on the outline of the processed image block,
The gray level complexity calculation unit calculates the gray level complexity of each image block based on a mean difference algorithm, wherein the mean difference algorithm is as follows: and sequentially calculating absolute values of differences between gray values of all pixel points on the binarized image block contour of the image block and gray values of pixel points on the processed image block contour, and then calculating the sum of the absolute values of the differences to obtain the gray complexity of the image block.
2. The graphic and text separation device as recited in claim 1, further comprising:
a preprocessing section for preprocessing the halftone image and taking the preprocessed halftone image as the image to be separated,
Wherein the preprocessing is mean filtering processing.
3. The graphic and text separation device as recited in claim 1, further comprising:
An output unit and a control unit,
When the second determination unit completes the determination operation, the control unit controls the output unit to output, as a separation result, the region information of the picture region formed by the plurality of picture blocks and the region information of the character region formed by the plurality of character blocks.
4. The graphic and text separation device according to claim 1, wherein:
wherein the whole contour extraction part comprises a whole binarization unit and a whole contour recognition unit,
The whole binarization unit carries out binarization processing on the image to be separated to obtain a binarized image,
And the integral contour recognition unit performs integral contour recognition on the binarized image to obtain the image contour of the image to be separated.
5. A picture-text separation method for picture-text separating a halftone image containing picture content and text content as an image to be separated, thereby obtaining a picture region corresponding to the picture content and a text region corresponding to the text content in the halftone image, characterized by comprising the following steps:
A blocking step of dividing the image to be separated into a plurality of image blocks;
A gray level complexity analyzing step, namely sequentially analyzing each image block to obtain gray level complexity of each image block;
a first determination step of determining, based on a gradation complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gradation complexity greater than the complexity threshold as a picture block constituting the picture region, and determining the image block corresponding to the gradation complexity not greater than the complexity threshold as a text block constituting the text region;
A whole contour extraction step, namely carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and
A second determination step of sequentially determining whether or not the image blocks in which the respective image profiles pass include the picture blocks, and determining all the image blocks in which the image profiles pass as the picture blocks once the image blocks in which the image profiles pass include the picture blocks,
Wherein the gray complexity analyzing step comprises an image block binarization sub-step, an image block contour extraction sub-step, an image block average value filtering sub-step and a gray complexity calculating sub-step,
In the image block binarization substep, binarization processing is sequentially carried out on each image block to obtain a plurality of binarized image blocks,
In the image block contour extraction substep, image block contour extraction is sequentially carried out on each binarized image block to obtain a plurality of binarized image block contours,
In the image block average value filtering sub-step, average value filtering processing is sequentially carried out on each binarized image block to obtain a plurality of processed image blocks,
In the image block contour extraction substep, image block contour extraction is also sequentially performed on each of the processed image blocks to obtain a plurality of processed image block contours,
In the gray complexity calculation substep, gray complexity of each image block is obtained by calculating according to gray values of pixel points on the outline of the binarized image block of each image block and gray values of pixel points on the outline of the processed image block,
In the gray level complexity calculation sub-step, gray level complexity of each image block is calculated based on a mean value difference algorithm, wherein the mean value difference algorithm is as follows: and sequentially calculating absolute values of differences between gray values of all pixel points on the binarized image block contour of the image block and gray values of pixel points on the processed image block contour, and then calculating the sum of the absolute values of the differences to obtain the gray complexity of the image block.
6. A computer-readable recording medium for recording a computer program for causing a picture-text separation device that separates a halftone image containing picture content and text content as an image to be separated to obtain a picture area corresponding to the picture content and a text area corresponding to the text content in the halftone image, to execute the steps of:
A blocking step of dividing the image to be separated into a plurality of image blocks;
A gray level complexity analyzing step, namely sequentially analyzing each image block to obtain gray level complexity of each image block;
a first determination step of determining, based on a gradation complexity of the image block and a predetermined complexity threshold, the image block corresponding to the gradation complexity greater than the complexity threshold as a picture block constituting the picture region, and determining the image block corresponding to the gradation complexity not greater than the complexity threshold as a text block constituting the text region;
A whole contour extraction step, namely carrying out whole contour extraction on the image to be separated to obtain an image contour of the image to be separated; and
A second determination step of sequentially determining whether or not the image blocks in which the respective image profiles pass include the picture blocks, and determining all the image blocks in which the image profiles pass as the picture blocks once the image blocks in which the image profiles pass include the picture blocks,
Wherein the gray complexity analyzing step comprises an image block binarization sub-step, an image block contour extraction sub-step, an image block average value filtering sub-step and a gray complexity calculating sub-step,
In the image block binarization substep, binarization processing is sequentially carried out on each image block to obtain a plurality of binarized image blocks,
In the image block contour extraction substep, image block contour extraction is sequentially carried out on each binarized image block to obtain a plurality of binarized image block contours,
In the image block average value filtering sub-step, average value filtering processing is sequentially carried out on each binarized image block to obtain a plurality of processed image blocks,
In the image block contour extraction substep, image block contour extraction is also sequentially performed on each of the processed image blocks to obtain a plurality of processed image block contours,
In the gray complexity calculation substep, gray complexity of each image block is obtained by calculating according to gray values of pixel points on the outline of the binarized image block of each image block and gray values of pixel points on the outline of the processed image block,
In the gray level complexity calculation sub-step, gray level complexity of each image block is calculated based on a mean value difference algorithm, wherein the mean value difference algorithm is as follows: and sequentially calculating absolute values of differences between gray values of all pixel points on the binarized image block contour of the image block and gray values of pixel points on the processed image block contour, and then calculating the sum of the absolute values of the differences to obtain the gray complexity of the image block.
CN201910202937.XA 2019-03-18 2019-03-18 Image-text separation device, image-text separation method and computer readable recording medium Active CN111723804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910202937.XA CN111723804B (en) 2019-03-18 2019-03-18 Image-text separation device, image-text separation method and computer readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910202937.XA CN111723804B (en) 2019-03-18 2019-03-18 Image-text separation device, image-text separation method and computer readable recording medium

Publications (2)

Publication Number Publication Date
CN111723804A CN111723804A (en) 2020-09-29
CN111723804B true CN111723804B (en) 2024-05-17

Family

ID=72562837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910202937.XA Active CN111723804B (en) 2019-03-18 2019-03-18 Image-text separation device, image-text separation method and computer readable recording medium

Country Status (1)

Country Link
CN (1) CN111723804B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63316566A (en) * 1987-06-19 1988-12-23 Hitachi Ltd Image input device
CN101751121A (en) * 2008-12-12 2010-06-23 汉王科技股份有限公司 OCR-based wireless scanning input device and method
CN101887520A (en) * 2009-05-12 2010-11-17 华为终端有限公司 Method and device for positioning characters in image
CN102663337A (en) * 2012-03-16 2012-09-12 江南大学 Method for quick Data Matrix two-dimensional barcode identifying under simple condition background
CN106407919A (en) * 2016-09-05 2017-02-15 珠海赛纳打印科技股份有限公司 Image processing-based text separation method, device and image forming device
CN109064479A (en) * 2018-07-19 2018-12-21 中国石油大学(华东) A kind of sea horizon detection method based on neighbouring video frame gray scale behavioral characteristics

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6226578B2 (en) * 2013-06-13 2017-11-08 キヤノン株式会社 Image coding apparatus, image coding method, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63316566A (en) * 1987-06-19 1988-12-23 Hitachi Ltd Image input device
CN101751121A (en) * 2008-12-12 2010-06-23 汉王科技股份有限公司 OCR-based wireless scanning input device and method
CN101887520A (en) * 2009-05-12 2010-11-17 华为终端有限公司 Method and device for positioning characters in image
CN102663337A (en) * 2012-03-16 2012-09-12 江南大学 Method for quick Data Matrix two-dimensional barcode identifying under simple condition background
CN106407919A (en) * 2016-09-05 2017-02-15 珠海赛纳打印科技股份有限公司 Image processing-based text separation method, device and image forming device
CN109064479A (en) * 2018-07-19 2018-12-21 中国石油大学(华东) A kind of sea horizon detection method based on neighbouring video frame gray scale behavioral characteristics

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Hierarchical content classi cation and script determination for automatic document image processing;Zheru Chi et.al;《Pattern Recognition》;第2484-2500页 *
彩色扫描文档图像中图文分割算法;朱庆生 等;《计算机辅助设计与图形学学报》;第16卷(第4期);第476-480页 *

Also Published As

Publication number Publication date
CN111723804A (en) 2020-09-29

Similar Documents

Publication Publication Date Title
CN109961049B (en) Cigarette brand identification method under complex scene
US10803338B2 (en) Method and device for recognizing the character area in a image
CN101453575B (en) A method for extracting video subtitle information
CN110232713B (en) Image target positioning correction method and related equipment
US20100008576A1 (en) System and method for segmentation of an image into tuned multi-scaled regions
CN108171104A (en) A kind of character detecting method and device
CN111259878A (en) Method and equipment for detecting text
CN110866529A (en) Character recognition method, character recognition device, electronic equipment and storage medium
CN104598907B (en) Lteral data extracting method in a kind of image based on stroke width figure
CN102254159A (en) Interpretation method for digital readout instrument
CN108764328A (en) The recognition methods of Terahertz image dangerous material, device, equipment and readable storage medium storing program for executing
CN103049756A (en) Method for automatically extracting and removing words in color image on basis of CEMA (Cellular Message Encryption Algorithm) and texture matching repairing technology
CN107066972A (en) Natural scene Method for text detection based on multichannel extremal region
CN111461126A (en) Space recognition method and device in text line, electronic equipment and storage medium
CN106295627A (en) For identifying the method and device of word psoriasis picture
CN111429462A (en) License plate positioning method based on edge detection and mathematical morphology
CN112508024A (en) Intelligent identification method for embossed seal font of electrical nameplate of transformer
CN112749599B (en) Image enhancement method, device and server
CN114399617B (en) Method, device, equipment and medium for identifying shielding pattern
JPH05166002A (en) Method for analyzing source image
CN113392819B (en) Batch academic image automatic segmentation and labeling device and method
CN112861860B (en) Text detection method in natural scene based on upper and lower boundary extraction
CN111723804B (en) Image-text separation device, image-text separation method and computer readable recording medium
CN112419208A (en) Construction drawing review-based vector drawing compiling method and system
CN117541546A (en) Method and device for determining image cropping effect, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant