Information processing device, information processing method, and program
The information processing device adjusts expansion processes based on character pixel density to accurately determine the line direction in document images, enhancing character string detection and recognition.
Patent Information
- Application Number
- JP2020122989
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2024-09-02
- Estimated Expiration
- 2040-07-17
AI Technical Summary
Existing OCR technologies struggle to accurately determine the line direction of character strings in document images due to varying character spacings, leading to inappropriate line rectangle estimation and inaccurate line direction estimation.
An information processing device that extracts character pixels, determines parameters for expansion processes based on character pixel density, and calculates the line direction using the shape of character pixel blocks, adjusting expansion processes to suit different document types.
Accurately determines the line direction in document images with high precision, improving character string detection and recognition accuracy.
Smart Images

Figure 0007543014000002 
Figure 0007543014000007 
Figure 0007543014000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for identifying the line direction of a character string included in a document image. [Background technology]
[0002] Conventionally, there is a technology for reading and recognizing characters in a document image obtained by scanning a document. This technology is generally called OCR (Optical Character Recognition). OCR processing is usually composed of image preprocessing for modifying a document image into an image suitable for OCR, character string detection processing for identifying a character description area (character string area) from a document image, and character recognition processing for identifying characters included in the detected character string area. Of these, it is known that the detection accuracy of the character string detection processing is improved by limiting the line direction of the target character string, that is, whether it is written vertically or horizontally, in advance. In this regard, Patent Document 1 discloses a technology for dividing a binary image into a margin area and a non-margin area, performing expansion processing of black pixels in the non-margin area to extract line rectangles, and estimating the line direction of the character string in the image based on the aspect ratio and the number of the line rectangles. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2009-141597 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the technology of Patent Document 1, expansion processing is performed with fixed parameters in order to make black pixels for each character string into a single cluster. However, the spacing between characters varies greatly depending on the document. That is, there are document images consisting of sentences in which small characters are closely spaced, and document images in which large characters are widely spaced. Here, if expansion processing is always performed with common parameters for all document images, it may not be possible to obtain appropriate line rectangles, and in that case, it will be impossible to estimate the line direction accurately.
[0005] The technology disclosed herein has been made in consideration of the above problems, and has an object to determine the line direction in a document image with high accuracy. [Means for solving the problem]
[0006] The information processing device according to the present disclosure includes an extraction means for extracting character pixels constituting characters in a document image obtained by reading a document, and a determination means for determining a line direction in which the characters are arranged in the document image, the determination means further including an expansion means for performing an expansion process on the document image, a parameter determination means for determining parameters for the expansion process, an acquisition means for acquiring a plurality of the character pixels that are in contact with each other as a character pixel block, and a line direction determination means for determining the line direction based on a shape of the character pixel block, the expansion process is a process for treating a pixel of interest in the document image as a new character pixel when the number of character pixels in the pixel of interest is equal to or greater than N, and the parameter is a size of the unit area when the expansion process is performed once; The parameter determining means determines the parameter based on an evaluation index relating to the character pixels extracted from the document image by the extracting means. Effect of the Invention
[0007] According to the technology of the present disclosure, it is possible to determine the line direction in a document image with high accuracy. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram showing a hardware configuration of an information processing system. [Diagram 2] 4 is a flowchart showing the flow of processing in the entire system. [Diagram 3] 11 is a flowchart showing details of a line direction determination process. [Figure 4] 5A to 5C are diagrams illustrating an expansion process. [Diagram 5] An example of applying line direction discrimination processing to business card images (portrait and horizontal writing). [Figure 6] An example of applying line direction discrimination processing to a business card image (vertical, vertical writing, high density). [Figure 7] An example of applying line direction discrimination processing to a business card image (portrait, vertical writing, low density). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Note that the embodiment does not limit the present invention, and all of the configurations described in the embodiment are not necessarily essential means for solving the problems of the present invention.
[0010] [Embodiment 1] [Hardware configuration] 1 is a diagram showing the hardware configuration of an information processing system according to this embodiment. The information processing system includes a copying machine 100 and an information processing device 110.
[0011] The copier 100 includes a scanner 101 and a copier communication unit 102. The scanner 101 scans a document and generates a document image. The copier communication unit 102 communicates with external devices including an information processing device 110 via a network.
[0012] The information processing device 110 includes a system control unit 111, a ROM 112, a RAM 113, a HDD 114, a display unit 115, an input unit 116, and an information processing device side communication unit 117. The system control unit 111 is composed of a calculation device such as a CPU, and reads out a control program stored in the ROM 112 to execute various processes. The RAM 113 is used as a temporary storage area such as a main memory and a work area of the system control unit 111. The HDD 114 stores various data and various programs. The functions and processes of the information processing device 110 described later are realized by the system control unit 111 reading out a program stored in the ROM 112 or the HDD 114 and executing the program. The information processing device side communication unit 117 performs communication processing with external devices including the copying machine 100 via a network. The display unit 115 displays various information. The input unit 116 includes a keyboard and a mouse, and accepts various operations by a user. The display unit 115 and the input unit 116 may be provided integrally, such as a touch panel. The display unit 115 may project an image using a projector, and the input unit 116 may recognize the position of a fingertip relative to the projected image using a camera.
[0013] In this embodiment, a scanner 101 of a copying machine 100 scans a paper document such as a business card to generate a document image. The document image is transmitted to an information processing device 110 by a copying machine side communication unit 102. In the information processing device 110, an information processing device side communication unit 117 receives the document image and stores it in a storage device such as an HDD 114.
[0014] 1 is an example of a configuration for implementing this embodiment, and for example, some functions of the display unit 115 and the input unit 116 may be included in the copier 100. Also, the copier 100 and the information processing device 110 may be integrated into one configuration.
[0015] <Overall processing flow> Next, the operation flow of software for implementing OCR processing on document images in the information processing system according to this embodiment will be described with reference to Fig. 2. A series of processes shown in the flowchart in Fig. 2 is implemented by the system control unit 111 reading a predetermined program from the ROM 112 or the like and executing it. In the following description, the symbol "S" means a step.
[0016] First, in S201, data of a document image is acquired from the HDD 114. Next, in S202, a process of determining the type of the document of the acquired document image is executed. In this embodiment, it is determined whether the document type is a business card or a non-business card. This determination is made based on the scan resolution and the document image size. For example, when the scan resolution is 300 DPI, if the long side of the document image obtained by scanning is within the range of 1040 pixels ± 5% and the short side is within the range of 615 pixels ± 5%, it is determined to be a business card, and if it is outside the range, it is determined to be a non-business card. Note that the method of determining the document type is not limited to the method based on the image size. For example, information specifying the document type may be received from the input unit 116, or the feature amount may be calculated from the document image and the determination may be made using a discrimination model that has been learned in advance.
[0017] Based on the result of the determination in S202, the process flow branches in S203. If it is determined that the object is not a business card, the process proceeds to S204, and if it is determined that the object is a business card, the process proceeds to S205.
[0018] In S204, a general-purpose character recognition process that is independent of the document type is executed. When the character recognition process is completed, this process ends.
[0019] In S205, a process for correcting the skew of the document image is executed. The document image generated by the scanner 101 is skewed depending on how the document is placed on the platen. Therefore, a skew correction process is performed to obtain a document image without skew. The skew correction process may be performed by applying a known method disclosed in Japanese Patent No. 4114959 or the like.
[0020] Next, in S206, a process is executed to determine the character direction in the document image. Here, the character direction is defined as the direction of the characters in the document image when the direction in which the characters are upright is set to 0 degrees. In the document image that has been subjected to the tilt correction process in S205, the original may be rotated in 90 degree increments. Therefore, the known method disclosed in Japanese Patent No. 3727971 and the like is applied to obtain the character direction of the document image.
[0021] Next, in S207, a process of rotating the document image is executed based on the character direction determined in S206, thereby obtaining a document image in which the characters are upright.
[0022] Next, in S208, a process of extracting character pixels from the document image is executed. In this embodiment, character pixels are extracted by binarization, which involves performing threshold processing on the luminance value of each pixel. For binarization, a known method such as Otsu's binarization may be applied. Since characters in a document are usually printed in a darker color than the background, pixels with a luminance value smaller than the threshold value are regarded as character pixels. Note that the method of extracting character pixels is not limited to the method using threshold processing. For example, it may be realized by a method of extracting image features from a neighboring area centered on an arbitrary pixel of interest, and inferring whether the pixel of interest is a character pixel or not based on a discrimination model previously learned based on the features.
[0023] Next, in S209, a process of determining the line direction is executed based on the character pixels extracted in S208. The line direction here means the direction in which characters are arranged in the document image, and in this embodiment, it is either the horizontal direction or the vertical direction. The details of the line direction determination process will be described later.
[0024] In the next step S210, the process flow branches based on the result of the determination in step S209. If the result of the determination is that the row direction is horizontal, the process proceeds to step S211. If the row direction is vertical, the process proceeds to step S212. If the row direction is indefinite, the process proceeds to step S215.
[0025] In S211, a character string detection process is executed using parameters adjusted for the horizontal direction. A horizontally long character string area is appropriately acquired by performing an area analysis suitable for identifying a horizontally written character string area. This character string detection process can be realized by a known method disclosed in, for example, Japanese Patent Application Laid-Open No. 7-200733.
[0026] In S212, a process is performed to rotate the document image by 90 degrees. As a result, characters arranged vertically on the original (business card) are arranged horizontally in the rotated image. In the following S213, a character string detection process is performed with parameters adjusted for the horizontal direction, similar to S211 described above. Then, in S214, a process is performed to rotate the character string area detected in S213 by -90 degrees. As a result, the vertical character string area in the original document image before rotation is obtained.
[0027] In S215, a character string area is obtained by character string detection processing that assumes that the line direction is undefined. Specifically, first, horizontal character string detection processing is performed as in S211, and then vertical character string detection processing is performed. Then, the character string area is obtained by integrating the detection results of both.
[0028] After performing the character string detection process based on the line direction discrimination result as described above, in S216, character recognition process is performed on each character string area detected and acquired from the document image. As an example of character recognition process, there is a method of inferring the character code of the characters included in the partial image corresponding to the character string area using a trained model. The trained model is an identification model trained to input a character image and output its character code. When the character recognition process is completed, this process ends.
[0029] The above is the operational flow of the software that realizes OCR processing on document images.
[0030] <Details of line direction determination process> Next, the line direction discrimination process in S209 described above will be explained in detail with reference to the flowchart in Fig. 3. As is clear from the process flow in Fig. 2, the subject of the line direction discrimination process in this embodiment is a document image of a business card (Yes in S203), and the document image is rotated (S207) so that the characters in the business card are upright. Therefore, in the following explanation, the document image to be processed will be referred to as a "business card image."
[0031] First, in S301, the type of business card is determined based on the business card image. Specifically, the width and height of the business card image are compared, and if the width is greater than the height, the card is determined to be a landscape type business card, and if not, the card is determined to be a portrait type business card.
[0032] In the next step S302, the process flow branches based on the result of the determination in step S301. If the result of the determination is that the image is landscape type, the process proceeds to step S303, and if the result is that the image is portrait type, the process proceeds to step S304.
[0033] In S303, the line direction is determined to be horizontal. After this determination, the process ends. This is because, in general, if a business card is horizontally long, it is unlikely that the characters therein are written vertically.
[0034] In S304, the character pixel density in the business card image is calculated. The character pixel density can be calculated by the following formula (1). Character pixel density = total number of character pixels / (image width × image height) Formula (1)
[0035] Next, in S305, a filter size to be used in the expansion process for increasing the number of character pixels in the business card image is determined based on the character pixel density calculated in S304. In this embodiment, if the character pixel density is less than 0.025, the filter size is set to "31", and if it is 0.025 or more, the filter size is set to "11". For example, when the filter size is "31", the expansion process is executed in the next step using a square area with a length (height) of 31 pixels and a width (width) of 31 pixels centered on the pixel of interest as the processing unit. Hereinafter, a predetermined area determined according to the filter size will be called a "unit area". It goes without saying that the filter size is not limited to "31" or "11". In addition, the shape of the filter does not have to be a square, and may be a rectangle or a circle.
[0036] Next, in S306, the expansion process is performed on the business card image according to the filter size determined in S305. Specifically, first, when an arbitrary pixel in the business card image is set as a pixel of interest, a unit area (here, 31×31 pixels or 11×11 pixels) is cut out according to the filter size centered on the pixel of interest. Then, if there are N or more character pixels in the unit area, the pixel of interest is set as a new character pixel, otherwise it is set as a non-character pixel. In this case, N is a natural number of 1 or more, and in this embodiment, N=1. Here, a specific example of the expansion process is described. FIG. 4(a) shows how the expansion process is applied to a 6×6 pixel partial image in the binarized business card image in a unit area with a filter size of "5" for the pixel of interest 401. The black pixel 402 in the partial image is a character pixel extracted by binarization. In the expansion process, first, a unit area 403 of 5×5 pixels centered on the pixel of interest 401 is obtained. Next, the number of character pixels contained in the acquired unit area 403 is counted, and if it is N (=1) or more, the pixel of interest 401 is replaced with a character pixel. Currently, the number of character pixels (black pixels) contained in the unit area 403 is 1, which satisfies the condition. Therefore, the pixel of interest 401 is replaced with a character pixel. If this is applied to all pixels in the unit area 403, the partial image in FIG. 4(a) becomes an image (dilated image) with increased character pixels as shown in FIG. 4(b). Pixel 404 indicated by diagonal lines in the dilated image in FIG. 4(b) is a pixel that has become a new character pixel as a result of the dilation process. Note that if N is set to 2 or more, isolated point removal of character pixels can be performed at the same time.
[0037] Next, in S307, a process is executed to extract character pixel clusters (CC: Connected Components) from the document image after the expansion process. A CC refers to an area in which adjacent character pixels are grouped together.
[0038] Next, in S308, the aspect ratio of the CC extracted in S307 is calculated. In this embodiment, the aspect ratio is defined as the following formula (2). Aspect ratio = height of the circumscribing rectangle of CC / width of the circumscribing rectangle of CC Equation (2)
[0039] Next, in S309, CCs whose aspect ratio is larger than a threshold Th1 are counted. Here, by setting the threshold Th1 to a value of 1.0 or more, CCs whose shape is vertically long can be counted. In this embodiment, the threshold Th1 is set to 1.2.
[0040] Next, in S310, the number of CCs whose aspect ratio is smaller than a threshold Th2 is counted. Here, by setting the threshold Th2 to a value of 1.0 or less, CCs whose shape is horizontally long can be counted. In this embodiment, the threshold Th2 is set to 0.8.
[0041] In the next step S311, the process flow branches based on the CC count results in S309 and S310. If the number of portrait-oriented CCs is greater than the number of landscape-oriented CCs, the process proceeds to S312, where it is determined that the row direction is portrait and the process ends. If the number of portrait-oriented CCs is less than the number of landscape-oriented CCs, the process proceeds to S313, where it is determined that the row direction is landscape and the process ends. If the number of portrait-oriented CCs is equal to the number of landscape-oriented CCs, the process proceeds to S314, where it is determined that the row direction is indefinite and the process ends.
[0042] The above is the content of the line direction discrimination process according to this embodiment. Figures 5 to 7 are diagrams showing the state in which the line direction discrimination process of this embodiment is applied to different types of business card images. Each case will be described below.
[0043] FIG. 5 shows a case where a business card image 501 of a vertical type with characters written horizontally is used as an input image. Each black pixel of the business card image 501 represents a character pixel. Since the image height of the business card image 501 is greater than the image width, the business card image is determined to be vertical in S301, and the process proceeds to S304. In S304, the character pixel density is calculated. If the image width of the business card image 501 is 650 pixels and the image height is 1075 pixels, the number of character pixels is 40950. Therefore, the character pixel density is 40950 / (650×1075)≈0.059. In this case, since the character pixel density is greater than the threshold value 0.025, the filter size is determined to be “11” in S305. Then, the business card image 501 is subjected to an expansion process according to the filter size, and an expanded image 502 is obtained. Next, in S307, CCs are extracted from the dilated image 502, and in S308 and S309, the number of vertically long CCs and the number of horizontally long CCs are counted based on the aspect ratio of each CC. In FIG. 5, if the height of CC503 is 67 pixels and the width is 201 pixels, the aspect ratio is 67 / 201≒0.33. This is smaller than the threshold value Th2=0.8 described above, so CC503 is determined to be a horizontally long CC. Similarly, if the height of CC504 is 43 pixels and the width is 30 pixels, the aspect ratio is 1.4. This is larger than the threshold value Th1=1.2 described above, so CC504 is determined to be a vertically long CC. And if the height of CC505 is 39 pixels and the width is 36 pixels, the aspect ratio is 1.08. This is not larger than the threshold value Th1=1.2, and is not smaller than the threshold value Th2=0.8. Therefore, it is determined that CC 505 is neither vertically nor horizontally long. By counting the vertically and horizontally long CCs in this way, the number of vertically long CCs in the dilated image 502 is 3 and the number of horizontally long CCs is 20, and the row direction of the business card image 501 is determined to be horizontal.
[0044] FIG. 6 shows a case where a vertically long business card image 601 with densely arranged characters is used as an input image. As in the case of FIG. 5, the vertically long business card image has a character pixel density of 0.042. In this case, since the character pixel density is greater than the threshold value of 0.025, the dilation process is performed according to the filter size "11", and a dilated image 602 is obtained. Then, the number of vertically long CCs and horizontally long CCs in the dilated image 602 is counted, and if there are 14 vertically long CCs and 5 horizontally long CCs, the vertically long CCs are more numerous, and therefore the line direction of the business card image 601 is determined to be vertical. Here, it is assumed that 0.05 is set as the threshold value of the character pixel density when determining the filter size. In this case, the result of dilating the business card image 601 with the filter size "31" is a dilated image 603. In the dilated image 603, multiple vertically written character strings in the upper right corner of the business card image 601 are all combined into one CC, and similarly, multiple character strings in the lower left corner are also combined into one CC. As a result, the number of vertically elongated CCs obtained from the entire image is greatly reduced to one, which is equal to the number of horizontally elongated CCs (one), and as a result, the row direction is determined to be indefinite.
[0045] FIG. 7 shows a case where a vertically long business card image 701 with sparsely arranged characters is used as an input image. As in the cases of FIG. 5 and FIG. 6, the business card image 701 is first determined to be a vertically long type, and then the character pixel density is calculated. Here, it is assumed that the character pixel density is 0.02. In this case, since it is smaller than the threshold value 0.025, a filter size of "31" is applied in the expansion process. As a result, an expanded image 702 is obtained. In the expanded image 702, since there are three vertically long CCs and no horizontally long CCs, the row direction of the business card image 701 is determined to be vertical.
[0046] As described above, according to the method of this embodiment, the line direction in a business card image is appropriately determined.
[0047] <Variation 1> In the above-mentioned S305, the filter size is determined as a parameter to be used in the expansion process, and in the following S306, the expansion process is performed only once according to the determined filter size. However, the filter size to be actually applied may be fixed, and the number of times the expansion process is performed may be determined as a parameter. Specifically, if the character pixel density is low, the number of times the expansion process is performed may be increased, and if the character pixel density is high, the number of times the expansion process is performed may be decreased. The same result can be obtained with such a method. For example, if the threshold value of the character pixels in the unit area is set to N=1 and the filter size to be applied is fixed to "3", if there is one or more character pixels in a 3x3 filter, the central pixel of interest becomes a character pixel. This filter process is equivalent to a process of setting the eight adjacent pixels around the character pixel to the character pixel. In other words, the expansion process of "replacing the eight adjacent pixels around the character pixel with new character pixels" may be repeated the number of times equal to "the filter size determined in S305 divided by 2, where the decimal point is rounded down." A specific example will be described below. Now, assume that the filter size "11" is determined in S305. In this case, 11÷2=5.5, so the number of times the expansion process is executed is 5. Therefore, the above replacement process is repeated 5 times, with a 3×3 pixel square area as the unit area. With this method, it is possible to obtain the same expanded image as with the method described in the above embodiment.
[0048] <Variation 2> In the above-mentioned line direction determination process, if the number of vertical CCs matches the number of horizontal CCs, the line direction is determined to be indefinite. However, in the case of business cards, vertical type is often written vertically, and horizontal type is often written horizontally. Therefore, even if the number of vertical CCs matches the number of horizontal CCs, the process may transition to S312. In this case, there will be no transition branching from S210 to S215 in the overall process flow of FIG. 2.
[0049] <Modification 3> A margin may be provided when comparing the number of CCs in the above-mentioned row direction discrimination process. That is, if (number of vertical CCs)>(number of horizontal CCs+α), the process transitions to S311, if (number of vertical CCs+α)<(number of horizontal CCs), the process transitions to S312, and if neither, the process transitions to S313. Here, α may be determined based on the filter size, such as "5" if the filter size is "11" and "3" if the filter size is "31". This is because the number of CCs that appear changes depending on the strength of the expansion process (filter size).
[0050] <Modification 4> In the above-mentioned line direction discrimination process, the character pixel density is obtained as an evaluation index of the character pixels extracted from the document image, and the filter size is determined based on the obtained character pixel density. However, if the size of the document image is almost fixed, it is also possible to determine the filter size using the number of character pixels as an evaluation index instead of the character pixel density. For example, at the time of proceeding to the process of determining the filter size in S305, the target document image is determined to be a business card image, and the image size is almost fixed for each scan resolution. Therefore, a threshold value based on the number of character pixels may be set so that the filter size is reduced when the number of extracted character pixels is large (≒ high character pixel density) and the filter size is increased when the number of extracted character pixels is small (≒ low character pixel density).
[0051] As described above, according to this embodiment including the above-mentioned modified examples, line rectangles can be appropriately extracted from various types of document images (particularly business card images) and the line direction of the document image can be determined with high accuracy.
[0052] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
Claims
1. An extraction means for extracting character pixels constituting characters in a document image obtained by reading a document; a determining means for determining a line direction, which is a direction in which the characters are arranged in the document image; Equipped with The discrimination means is an expansion means for performing an expansion process on the document image; A parameter determination means for determining parameters in the expansion process; acquiring means for acquiring a plurality of adjacent character pixels as a character pixel block; a line direction determining means for determining the line direction based on the shape of the character pixel block; and the expansion process is a process for treating a pixel of interest as a new character pixel when the number of character pixels in a unit area having a pixel of interest in the document image as equal to or greater than N; the parameter is a size of the unit region when the expansion process is executed once, the parameter determining means determines the parameter based on an evaluation index for the character pixels extracted from the document image by the extracting means.
23. An information processing apparatus comprising:
2. the evaluation index is a density of the character pixels in the document image, the parameter determination means sets the unit area to be smaller as the density increases and sets the unit area to be larger as the density decreases, 2. The information processing apparatus according to claim 1,
3. the evaluation index is the number of character pixels in the document image, the parameter determination means sets the unit area to be smaller as the number increases, and sets the unit area to be larger as the number decreases, 2. The information processing apparatus according to claim 1,
4. 4. The information processing apparatus according to claim 3, wherein the size of the document image is a fixed size.
5. The expansion process is a process for replacing eight surrounding pixels of a pixel of interest in the document image with new character pixels when the pixel of interest is a character pixel, The parameter is the number of times the expansion process is executed.
2. The information processing apparatus according to claim 1,
6. the evaluation index is a density of the character pixels in the document image, the parameter determination means reduces the number of executions as the density increases, and increases the number of executions as the density decreases, 6. The information processing apparatus according to claim 5,
7. the evaluation index is the number of character pixels in the document image, the parameter determination means reduces the number of executions as the number increases, and increases the number of executions as the number decreases, 6. The information processing apparatus according to claim 5,
8. 8. The information processing apparatus according to claim 7, wherein the size of the document image is a fixed size.
9. 9. An information processing device according to claim 1, wherein the line direction determining means determines the line direction based on a ratio of the number of character pixel blocks whose shape is vertically elongated to the number of character pixel blocks whose shape is horizontally elongated among the character pixel blocks acquired by the acquiring means.
10. The row direction determining means determining that the line direction is vertical if the number of vertically elongated character pixel blocks is greater than the number of horizontally elongated character pixel blocks; if the number of the vertically elongated character pixel blocks is smaller than the number of the horizontally elongated character pixel blocks, it is determined that the line direction is horizontal; 10. The information processing apparatus according to claim 9,
11. 11. The information processing apparatus according to claim 1, wherein, when the document is a business card, the determining means determines a line direction of a document image corresponding to the business card.
12. The discrimination means is if the document is a business card and the type of the business card is portrait, determining a line direction using the expansion means, the parameter determination means, the acquisition means, and the line direction determination means; if the document is a business card and the type of the business card is landscape, determining that the line direction is landscape without using the expansion means, the parameter determination means, the acquisition means, and the line direction determination means; 12. The information processing apparatus according to claim 11 .
13. An extraction step of extracting character pixels constituting characters in a document image obtained by reading the document; a determining step of determining a line direction, which is a direction in which the characters are arranged in the document image; Including, The determining step includes: an expansion step of performing an expansion process on the document image; a parameter determination step for determining parameters in the expansion process; acquiring a plurality of adjacent character pixels as a character pixel block; a line direction determining step of determining the line direction based on the shape of the character pixel block; Further comprising: the expansion process is a process for treating a pixel of interest as a new character pixel when the number of character pixels in a unit area having a pixel of interest in the document image as equal to or greater than N; the parameter is a size of the unit region when the expansion process is executed once, In the parameter determination step, the parameters are determined based on evaluation indices related to the character pixels extracted from the document image in the extraction step.
23. An information processing method comprising:
14. A program for causing a computer to function as the information processing device according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method for correcting inclination of character document
JP1993143774A
Device and method for image processing
JP1995160812A
Image processing apparatus, character region specification method, and character region specification program
JP2009141597A
Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP2010273119A
Image processing device and image processing program
JP2013210817A
