US20170366705A1 - Image-processing apparatus, method, and computer program product for correcting skew in scanned images - Google Patents
Image-processing apparatus, method, and computer program product for correcting skew in scanned images Download PDFInfo
- Publication number
- US20170366705A1 US20170366705A1 US15/283,689 US201615283689A US2017366705A1 US 20170366705 A1 US20170366705 A1 US 20170366705A1 US 201615283689 A US201615283689 A US 201615283689A US 2017366705 A1 US2017366705 A1 US 2017366705A1
- Authority
- US
- United States
- Prior art keywords
- skew
- image
- accumulated
- angle
- occurrence position
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims description 82
- 238000004590 computer program Methods 0.000 title claims description 10
- 238000000034 method Methods 0.000 title description 61
- 238000012937 correction Methods 0.000 claims description 10
- 238000003672 processing method Methods 0.000 claims description 8
- 230000001131 transforming effect Effects 0.000 claims description 5
- 238000012015 optical character recognition Methods 0.000 claims description 4
- 239000000284 extract Substances 0.000 claims 1
- 230000008569 process Effects 0.000 description 41
- 238000010586 diagram Methods 0.000 description 27
- 238000003860 storage Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 239000000470 constituent Substances 0.000 description 4
- 230000010365 information processing Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000002194 synthesizing effect Effects 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000004049 embossing Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000007788 liquid Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/387—Composing, repositioning or otherwise geometrically modifying originals
- H04N1/3877—Image rotation
- H04N1/3878—Skew detection or correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/60—Rotation of whole images or parts thereof
- G06T3/608—Rotation of whole images or parts thereof by skew deformation, e.g. two-pass or three-pass rotation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00681—Detecting the presence, position or size of a sheet or correcting its position before scanning
- H04N1/00684—Object of the detection
- H04N1/00718—Skew
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00681—Detecting the presence, position or size of a sheet or correcting its position before scanning
- H04N1/00729—Detection means
- H04N1/00734—Optical detectors
- H04N1/00737—Optical detectors using the scanning elements as detectors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00681—Detecting the presence, position or size of a sheet or correcting its position before scanning
- H04N1/00742—Detection methods
- H04N1/00748—Detecting edges, e.g. of a stationary sheet
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00681—Detecting the presence, position or size of a sheet or correcting its position before scanning
- H04N1/00763—Action taken as a result of detection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00681—Detecting the presence, position or size of a sheet or correcting its position before scanning
- H04N1/00763—Action taken as a result of detection
- H04N1/00774—Adjusting or controlling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N2201/00—Indexing scheme relating to scanning, transmission or reproduction of documents or the like, and to details thereof
- H04N2201/0077—Types of the still picture apparatus
- H04N2201/0081—Image reader
Definitions
- the present disclosure relates to an image-processing apparatus, an image-processing method, and a computer program product.
- An image-processing apparatus is an image-processing apparatus including an image acquiring unit configured to acquire read image data of a read image read by an image-reading apparatus including a paper path, an edge detecting unit configured to detect edges of a document image contained in the read image and acquires approximate straight lines by extending the longest straight-line parts of the respective edges, an edge-skew detecting unit configured to detect, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other, a content detecting unit configured to detect direction-identifying contents defined as contents usable for specifying directions within the document image, a content-skew detecting unit configured to detect, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes
- An image-processing method is an image-processing method including an image acquiring step of acquiring read image data of a read image read by an image-reading apparatus including a paper path, an edge detecting step of detecting edges of a document image contained in the read image and acquiring approximate straight lines by extending the longest straight-line parts of the respective edges, an edge-skew detecting step of detecting, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other, a content detecting step of detecting direction-identifying contents defined as contents usable for specifying directions within the document image, a content-skew detecting step of detecting, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes
- a computer program product is a computer program product having a non-transitory tangible computer readable medium including programmed instructions for causing, when executed by a computer, the computer to perform an image-processing method including an image acquiring step of acquiring read image data of a read image read by an image-reading apparatus including a paper path, an edge detecting step of detecting edges of a document image contained in the read image and acquiring approximate straight lines by extending the longest straight-line parts of the respective edges, an edge-skew detecting step of detecting, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other, a content detecting step of detecting direction-identifying contents defined as contents usable for specifying directions within the document image, a content-skew detecting step of detecting, as a candidate content-skew occurrence position, on the
- FIG. 1 is a functional block diagram of an example of the configuration of an image-processing apparatus according to one embodiment
- FIG. 2 is a block diagram of an example of the hardware configuration of the image-processing apparatus according to the embodiment
- FIG. 3 is a flowchart of an example of processing in the image-processing apparatus according to the embodiment.
- FIG. 4 is a diagram of an example of the process of detecting and correcting front-end skew in the embodiment
- FIG. 5 is a diagram of an example of the process of detecting edge skew in the embodiment
- FIG. 6 is a diagram of an example of the process of detecting content skew in the embodiment.
- FIG. 7 is a diagram of another example of the process of detecting content skew in the embodiment.
- FIG. 8 is a diagram of another example of the process of detecting content skew in the embodiment.
- FIG. 9 is a diagram of an example of occurrence of accumulated skew in the embodiment.
- FIG. 10 is another diagram of the example of occurrence of accumulated skew in the embodiment.
- FIG. 11 is a diagram of an example of a document rear-part image in the embodiment.
- FIG. 12 is a diagram of an example of the process of correcting accumulated skew in the embodiment.
- FIG. 13 is a diagram of an example of the process of detecting accumulated skew in the embodiment.
- FIG. 14 is another diagram of the example of the process of detecting accumulated skew in the embodiment.
- FIG. 15 is another diagram of the example of the process of detecting accumulated skew in the embodiment.
- FIG. 16 is another diagram of the example of the process of detecting accumulated skew in the embodiment.
- FIG. 17 is another diagram of the example of the process of detecting accumulated skew in the embodiment.
- FIG. 1 is a functional block diagram of the example of the configuration of the image-processing apparatus 100 according to the embodiment.
- the image-processing apparatus 100 will be described as an example in order to specify the technical idea of the present disclosure. It is not intended to limit the present disclosure to the image-processing apparatus 100 , and the present disclosure is applicable equally to image-processing apparatuses 100 of other embodiments included in the scope of the claims.
- the image-processing apparatus 100 can be configured in such a manner that any units are functionally or physically separated or integrated, as long as similar advantageous effects and functions can be exhibited.
- the image-processing apparatus 100 includes, as schematically illustrated in FIG. 1 , a control unit 102 and a storage unit 106 . These sections of the image-processing apparatus 100 are connected communicatively to each other via an optional communication path.
- the image-processing apparatus 100 of the embodiment may be connected to an image-reading apparatus 200 (this section is not shown in FIG. 1 ).
- the image-processing apparatus 100 may include the image-reading apparatus 200 in its housing.
- the image-reading apparatus 200 including a paper path may be a document scanner of a manual insertion paper feeding system (Continuous Document Feeding (CDF) system), a document scanner of an automatic document feeding system (ADF system) or the like.
- CDF Continuous Document Feeding
- ADF automatic document feeding system
- the image-processing apparatus 100 may further include an input/output unit 112 (this section is not shown in FIG. 1 ).
- the input/output unit 112 performs input/output (I/O) of data.
- the input/output unit 112 may be any one, some or all of a key input unit, a touch panel, a control pad (a touch pad, a game pad or the like), a mouse, a keyboard, and a microphone, for example.
- the input/output unit 112 may be any one or both of a display unit (a display, a monitor, a touch panel made of crystal liquid or organic EL or the like) configured to display information such as an application, and a sound output unit (a speaker or the like) configured to output sound information as sound.
- a display unit a display, a monitor, a touch panel made of crystal liquid or organic EL or the like
- a sound output unit a speaker or the like
- the image-processing apparatus 100 may further include an interface unit 108 .
- the image-processing apparatus 100 may be connected intercommunicatively to an external apparatus (for example, image-reading apparatus 200 or the like) via the interface unit 108 .
- the interface unit 108 may be any one or both of an antenna to be connected to any one or both of a communication line and a telephone line, and an interface (NIC or the like) to be connected to a communication apparatus such as a router. Moreover, it may be a communication interface that performs a communication control between the image-processing apparatus 100 and a network.
- the network may include remote communications or the like such as any one or both of wire communications and wireless communications (WiFi or the like).
- the interface unit 108 may be an input/output interface that performs input/output control between the image-reading apparatus 200 or the like and the control unit 102 .
- the control unit 102 may control the interface unit 108 and the input/output unit 112 .
- the storage unit 106 stores any one, some, or all of various kinds of database, tables, and files (image data file 106 a and the like). Moreover, the storage unit 106 may store various kinds of application programs (for example, user applications and the like).
- the storage unit 106 is a storage unit that may be any one, some, or all of a memory such as a random access memory (RAM) or a read-only memory (ROM), a fixed disc device such as a hard disc, a solid state drive (SSD), a flexible disc, and an optical disc, for example.
- a memory such as a random access memory (RAM) or a read-only memory (ROM), a fixed disc device such as a hard disc, a solid state drive (SSD), a flexible disc, and an optical disc, for example.
- the storage unit 106 may store computer programs and the like for giving instructions to a central processing unit (CPU) and to perform various processes.
- CPU central processing unit
- the image data file 106 a out of these constituent elements of the storage unit 106 stores image data.
- the image data may be data read by the image-reading apparatus 200 , document image data, accumulated-skew-corrected image data or the like.
- the control unit 102 may be constituted of tangible controllers that controls generally the image-processing apparatus 100 , including any one, some, or all of CPU, a graphics processing unit (GPU), a digital signal processor (DSP), a large scale integration (LSI), an application specific integrated circuit (ASIC), a field-programming gate array (FPGA) and the like, or control circuitry.
- CPU graphics processing unit
- DSP digital signal processor
- LSI large scale integration
- ASIC application specific integrated circuit
- FPGA field-programming gate array
- the control unit 102 has an internal memory for storing a control program, a program that regulates various procedures or the like, and required data, and it performs information processing for executing various processes based on these programs.
- the control unit 102 broadly includes an image acquiring unit 102 a , an edge detecting unit 102 b , a front-end skew detecting unit 102 c , a front-end skew correcting unit 102 d , an edge-skew detecting unit 102 e , a content detecting unit 102 f , a content-skew detecting unit 102 g , an accumulated-skew detecting unit 102 h , an accumulated-skew correcting unit 102 i , and an image-outputting unit 102 j.
- the image acquiring unit 102 a acquires image data.
- the image acquiring unit 102 a may acquire read image data of a read image read by the image-reading apparatus 200 including a paper path.
- the image acquiring unit 102 a may store image data in the image data file 106 a.
- the edge detecting unit 102 b detects edges of a document image contained in a read image.
- the edge detecting unit 102 b may acquire approximate straight lines by extending the longest straight-line parts of the respective detected edges.
- the edge detecting unit 102 b may specify the document image from the read image based on the detected edges to acquire document image data.
- the front-end skew detecting unit 102 c detects front-end skew defined as an inclination of the document image with respect to the read image.
- the front-end skew may be an inclination due to an angle formed at the start of sheet feeding.
- the front-end skew detecting unit 102 c may detect inclinations of all of the approximate straight lines of the document image with respect to the read image to detect the front-end skew defined as an inclination of the document image with respect to the read image.
- the front-end skew correcting unit 102 d corrects the document image so as to erect the document image.
- the edge-skew detecting unit 102 e detects, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other.
- the content detecting unit 102 f detects direction-identifying contents defined as contents usable for specifying directions within the document image.
- the content detecting unit 102 f may detect an angle between the one of the approximate straight lines that is in the document conveyance direction and a character string in the document image by: detecting the character string; calculating the areas of rectangles circumscribed to the character string while rotating the character string, the rectangles each being defined by line segments parallel to the approximate straight line in the document conveyance direction and horizontal line segments; and specifying a rotation angle corresponding to the smallest one of the areas.
- the content detecting unit 102 f may detect an angle between the one of the approximate straight lines that is in the document conveyance direction and a character string in the document image by: detecting the character string; performing optical character recognition (OCR) on the character string while rotating the character string; and specifying a rotation angle at which accuracy of the character recognition is the highest.
- OCR optical character recognition
- the content detecting unit 102 f may detect straight-line elements of the contents by a Hough transform.
- the content-skew detecting unit 102 g detects, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the document conveyance direction.
- the content-skew detecting unit 102 g may detect, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a side of a rectangular graphic region, the rear angle being an angle between the approximate straight line and one of the direction-identifying contents that is located rearward from the rectangular graphic region in the document conveyance direction.
- the content-skew detecting unit 102 g may detect, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a ruled line, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the ruled line in the document conveyance direction.
- the content-skew detecting unit 102 g may detect, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a character string, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the character string in the document conveyance direction.
- the accumulated-skew detecting unit 102 h Based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position, the accumulated-skew detecting unit 102 h detects an accumulated-skew occurrence position.
- the accumulated skew may be an inclination due to gradual formation of an angle during conveyance.
- the accumulated-skew detecting unit 102 h may detect, as the accumulated-skew occurrence position, one of the candidate positions that is located rearward from the other in the document conveyance direction.
- the accumulated-skew detecting unit 102 h may detect the candidate edge-skew occurrence position as the accumulated-skew occurrence position.
- the accumulated-skew detecting unit 102 h may detect the candidate edge-skew occurrence position as the accumulated-skew occurrence position.
- the accumulated-skew detecting unit 102 h may detect the candidate content-skew occurrence position as the accumulated-skew occurrence position.
- the accumulated-skew detecting unit 102 h may assume that no accumulated skew has occurred and detect no accumulated-skew occurrence position.
- the accumulated-skew detecting unit 102 h may assume that no accumulated skew has occurred and detect no accumulated-skew occurrence position.
- the accumulated-skew detecting unit 102 h may assume that no accumulated skew has occurred and detect no accumulated-skew occurrence position.
- the accumulated-skew correcting unit 102 i acquires accumulated-skew-corrected image data by performing skew correction on a document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction.
- the accumulated-skew correcting unit 102 i may acquire accumulated-skew-corrected image data by: assuming that the document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction is a region bounded by two circular sectors; and correcting skew by bringing the arcs of the circular sectors onto approximate straight lines that are in the document conveyance direction.
- the accumulated-skew correcting unit 102 i may acquire accumulated-skew-corrected image data by: assuming that a document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction is a region bounded by two circular sectors; and correcting skew by geometrically transforming the arcs of the circular sectors onto the approximate straight lines that are in the document conveyance direction.
- the accumulated-skew correcting unit 102 i may acquire accumulated-skew-corrected image data by: assuming that the document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction is a region bounded by two circular sectors; and correcting skew by geometrically transforming, in a manner that extends the shorter one of these arcs, the arcs of the circular sectors onto the approximate straight lines that are in the document conveyance direction.
- the accumulated-skew correcting unit 102 i may acquire accumulated-skew-corrected image data by correcting skew by performing lens skew correction on the document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction.
- the accumulated-skew-corrected image may be an image obtained by synthesizing, with a document front-part image frontward from the accumulated-skew occurrence position, the document rear-part image corrected for skew by the accumulated-skew correcting unit 102 i.
- the image-outputting unit 102 j outputs image data.
- the image-outputting unit 102 j may output image data through the input/output unit 112 .
- FIG. 2 is a block diagram of an example of a hardware configuration of the image-processing apparatus 100 according to the embodiment.
- the image-processing apparatus 100 may be connected communicatively to the image-reading apparatus 200 via the interface unit (I/F) 108 .
- the image-processing apparatus 100 may include a CPU 102 that generally controls the image-processing apparatus 100 , the memory 106 and an auxiliary storage device 106 as storage units.
- the image-processing apparatus 100 may include, for example, an I/F 108 that controls communicative connection to the image-reading apparatus 200 , an interface unit (medium read unit) 108 such as a USB port for connecting a recording medium or the like, the input/output unit (input unit) 112 for performing data input, and the input/output unit (output unit) 112 for performing data output.
- an I/F 108 that controls communicative connection to the image-reading apparatus 200
- an interface unit (medium read unit) 108 such as a USB port for connecting a recording medium or the like
- the input/output unit (input unit) 112 for performing data input
- the input/output unit (output unit) 112 for performing data output.
- the image-reading apparatus 200 may include a CPU that generally controls the image-reading apparatus 200 , a block buffer, a memory and an image memory as storage units, and an arbitration unit that arbitrates an access request to the memory.
- the image-reading apparatus 200 may include an image sensor that performs image reading, an analog front end (AFE) as an analog circuit that connects the image sensor and a shading process unit, and a shading process unit that adjusts shades of the image data.
- AFE analog front end
- the image-reading apparatus 200 may include, for example, an image-processing-control unit that controls image processing on the read image data, an I/F (interface unit) that controls communicative connection to the image-processing apparatus 100 , an input unit for performing data input, and an output unit for performing data output.
- an image-processing-control unit that controls image processing on the read image data
- an I/F (interface unit) that controls communicative connection to the image-processing apparatus 100
- an input unit for performing data input
- an output unit for performing data output.
- FIG. 3 is a flowchart of an example of processing in the image-processing apparatus 100 of the embodiment.
- the image acquiring unit 102 a acquires read image data read by the image-reading apparatus 200 including a paper path (Step SA- 1 ).
- the edge detecting unit 102 b detects edges of a document image contained in the read image, and acquires approximate straight lines by extending the longest straight-line parts of the respective detected edges (Step SA- 2 ).
- the edge detecting unit 102 b may specify the document image from the read image, based on the detected edges to acquire document image data.
- the front-end skew detecting unit 102 c detects front-end skew defined as an inclination of the document image with respect to the read image (Step SA- 3 ).
- the front-end skew correcting unit 102 d corrects the document image so as to erect the document image (Step SA- 4 ).
- the front-end skew correcting unit 102 d is capable of eliminating the front-end skew to erect the document image.
- FIG. 4 is a diagram of an example of the process of detecting and correcting front-end skew in the embodiment.
- an approximate straight line obtained by extending the longest straight-line part of the longest one (in the document conveyance direction) of the detected edges (line segments obtained by connecting points denoted as “X” in FIG. 4 ), and the inclination of this approximate straight line are acquired.
- the document image is corrected to erect in a manner that causes the approximate straight line in the document conveyance direction to erect.
- the inclination of the entire document image is detected and corrected, and factors of inclination caused as a result of inclined paper feeding are eliminated without consideration for skew (accumulated skew) due to skew caused during conveyance.
- JP-A-2007-88654 for detecting inclination and cutting out a document assuming that there is no accumulated skew may be used in this process.
- accumulated skew is eliminated, so that a document image that is fed straight can be acquired and so that an erected side can be used as a side that serves as a reference in correcting accumulated skew.
- the inclination of the entire document image may be detected and corrected as the front-end skew in such a manner that the angles of the respective vertices of a document are detected by used of approximate straight lines obtained by extending the longest straight-line parts of all edges of the document.
- the front-end skew can be corrected independently of accumulated skew because the front-end skew is an inclination caused only when a document is set or when the document is pulled in immediately after the start of paper feeding, and causes an inclination in angle of the entire document but does not cause skew in the document.
- the edge-skew detecting unit 102 e detects, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in the document conveyance direction, a position at which the one approximate straight line and one of the edges that contains the longest straight-line part of the one approximate straight line start to separate from each other (Step SA- 5 ).
- FIG. 5 is a diagram of an example of the process of detecting edge skew in the embodiment.
- a position (the position of the dotted line in FIG. 5 ) that satisfies the conditions that it has a distance equal to or more than 1 mm from the approximate straight line and that it continues shifting in the same direction thereafter may be detected as the candidate edge-skew occurrence position.
- the content detecting unit 102 f detects direction-identifying contents defined as contents usable for specifying directions within the document image (Step SA- 6 ).
- the content-skew detecting unit 102 g detects, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the document conveyance direction (Step SA- 7 ).
- FIG. 6 is a diagram of an example of the process of detecting content skew in the embodiment.
- the respective ruled lines are used as the direction-identifying contents in calculating inclinations, and, when the inclinations are observed in the document conveyance direction, the angles between the approximate straight line and the respective ruled lines successively increase as the ruled lines are located farther from the accumulated-skew occurrence position.
- a position (the position of the dotted line in FIG. 6 ) that satisfies the conditions that it is located where the angle between the approximate straight line and one of the ruled lines is equal to or more than 0.5 degrees plus or minus the right angle (90 degrees) and that the angles continue to increase thereafter may be detected as the candidate content-skew occurrence position.
- a general Hough transform may be used to extract elements corresponding to line segments, such as ruled lines, in the document image, and those having lengths equal to or more than a certain length may be used as constituent elements of the direction-identifying contents.
- any line-segment element having a length equal to or less than 3 cm and forming an angle with the approximate straight line that is 5 degrees or more from the horizontal direction (0 degrees) or from the vertical direction (90 degrees) may be excluded from constituent elements of the direction-identifying content because various line-segment elements in the document image, such as a part of a large character, are detected in the same manner as ruled lines are detected.
- FIG. 7 is a diagram of an example of the process of detecting content skew in the embodiment.
- the angle (content skew) of a character string detected as a direction-identifying content may be detected in the following manner. With the character string broken up into certain units (character-string blocks), the angles of the character-string blocks are detected while being rotated, and the optimum angle is calculated in degrees.
- a method for calculating the optimum angle in the embodiment may include calculating, as the optimum angle, an angle at which the rectangle circumscribed to the character string or the height of the character string is the smallest, or an angle at which the highest confidence is obtained by an OCR process based on matching with respect to each character.
- the heights of rectangles each circumscribed to the character string may be calculated while a character string (that is, a character-string image) extracted from a document image is rotated.
- a character string that is, a character-string image
- Each of the rectangles is formed of line segments parallel to the approximate straight lines in the document conveyance direction and horizontal line segments.
- the character string shown in FIG. 7 is inclined ⁇ 1 degree, and one of the circumscribed rectangles that is obtained when the character string is rotated +1 degree has the smallest height. It may therefore be determined that this character string is inclined ⁇ 1 degree.
- extraction of a character string may include (1) binarizing a document image using a variable threshold (separating the contents from a base color) by use of the Otsu's binarization or the like, and (2) labeling each region separated by the binarization and extracting a rectangular region that encircles the region.
- the extraction of a character string may further include (3) determining any extremely large rectangular region to be a graphic and determining any small rectangular region to be a character, and (4) rectangular regions of the same size that are located within a distance equal to or less than a certain distance are connected as characters that are lined up.
- FIG. 8 is a diagram of an example of the process of detecting content skew in the embodiment.
- a candidate content-skew occurrence position may be detected in such a manner that: a rectangular graphic region is extracted as a direction-identifying content; and closeness of the graphic region to a rectangle is determined.
- a rectangular graphic region may be extracted though the above processes (1) to (3).
- the rectangular graphic region is a rectangle
- the upper and the lower edges of the graphic region may be treated as direction-identifying contents in the same manner as the ruled lines, because it is impossible to determine a location at which skew has started.
- a candidate content-skew occurrence position may be detected with the highest through the lowest priorities given to a graphic, a ruled line, and a character string.
- the accumulated-skew detecting unit 102 h determines whether the condition is satisfied that the candidate edge-skew occurrence position (an edge-based detected position) and a candidate content-skew occurrence position (a content-based detected position) have been both detected (Step SA- 8 ).
- Step SA- 8 the processing is shifted to Step SA- 9 .
- the accumulated-skew detecting unit 102 h determines whether the distance between the two detected positions, that is, the edge-based detected position and the content-based detected position, is equal to or less than a certain distance (for example, 1 cm) (Step SA- 9 ).
- Step SA- 9 the processing is shifted to Step SA- 10 .
- the accumulated-skew detecting unit 102 h assumes that accumulated skew has not occurred, and does not detect the accumulated-skew occurrence position (Step SA- 10 ).
- the image-outputting unit 102 j causes the input/output unit 112 to display read image data or document image data (Step SA- 11 ), and the processing is ended.
- Step SA- 9 the processing is shifted to Step SA- 12 .
- the accumulated-skew detecting unit 102 h adopts, as the accumulated-skew occurrence position, one of the edge-based detected position and the content-based detected position that is located rearward from (lower than) the other in the document conveyance direction (Step SA- 12 ).
- the accumulated-skew detecting unit 102 h is thus capable of detecting the presence of accumulated skew and the accumulated-skew occurrence position.
- the candidate edge-skew occurrence position and the candidate content-skew occurrence position are both present and are located close to each other, one of these positions that is located lower than the other may be adopted as the accumulated-skew occurrence position.
- FIG. 9 and FIG. 10 are diagrams of the example of occurrence of accumulated skew in the embodiment.
- the image-reading apparatus 200 including a paper path such as a general ADF scanner, generally has conveyance rollers provided to the upstream and the downstream sides of an image sensor in an internal part and has a paper guide discontinued without entering the internal part.
- conveyance of documents after the start of feeding relies on the conveyance rollers.
- the conveyance rollers that are actually touching documents are arranged generally in such a manner that a time at which only the last one set thereof touch the document is generated before the rear end of each document completely passes by the image sensor.
- the most conspicuous accumulated skew tends to occur, in a thick and right-left asymmetric document such as a pamphlet or in a document uneven in thickness such as an embossed card, immediately before the end of conveyance thereof.
- a plurality of conveyance rollers are linearly located relative to a document (card) having embossed characters printed on one side and having uneven thickness on the right and the left sides, so that these conveyance rollers touch the document perpendicularly thereto.
- a part of an output image corresponding to the first half of conveyance is conveyed straight regardless of the difference between magnitudes of force that are received by the right and the left sides of the document, thereby being obtained as an image having no skew.
- a section in which only one set of conveyance rollers conveys the document is reflected as skew in a part of the output image corresponding to the last half of conveyance.
- the skew has a fan-like shape in which the difference between magnitudes of force received by the right and the left sides is reflected.
- an output image is obtained that is composed of a rectangular partial image obtained before the occurrence of accumulated skew and a fan-like partial image obtained after the occurrence of accumulated skew.
- the longer arc represents the original conveyance speed
- the compressed, shorter arc represents a conveyance speed slower than the original one
- the accumulated-skew correcting unit 102 i acquires accumulated-skew-corrected image data by: assuming that a document rear-part image, which is an image rearward from the accumulated-skew occurrence position in the document conveyance direction, is a region surrounded by two circular sectors; correcting skew by geometrically transforming the arcs of the circular sectors to bring these arcs onto approximate straight lines in the document conveyance direction in such a manner as to elongate the shorter one of these arcs; and performing synthesizing with a document front-part image frontward from the accumulated-skew occurrence position (Step SA- 13 ).
- the accumulated-skew correcting unit 102 i is thus capable of correcting accumulated skew while maintaining readability.
- FIG. 11 is a diagram of an example of a document rear-part image in the embodiment.
- FIG. 12 is a diagram of an example of the process of correcting accumulated skew in the embodiment.
- edges frontward from an accumulated-skew occurrence position can be assumed to be straight lines, edges rearward from the accumulated-skew occurrence position can be approximated by curved lines (the arcs of circular sectors). Therefore, skew may be corrected therein in such a manner that a current skewed shape in the document image is brought close to an ideal shape.
- the ideal shape may be a rectangle obtained by connecting four intersections of: three approximate straight lines (solid lines in FIG. 11 ) obtained by extending the respective longest straight-line parts of three edge (at the upper end and the right and left ends) in the document image; and a straight line parallel to the approximate straight line at the upper end.
- the skewed shape may be approximated by a region bounded by two circular sectors having the same central angle and different radii.
- the Hough transform may be used as a method for detecting an arc from within the document image.
- the arcs of the two circular sectors may be thus obtained by approximating edges rearward from the accumulated-skew occurrence position by a fan-like shape.
- the upper side (a dotted line in FIG. 11 ) of each of the circular sectors may be obtained by drawing, at the accumulated-skew occurrence position, a line parallel to an edge of the document image at the upper end thereof.
- the lower side (another dotted line in FIG. 11 ) of each of the circular sectors may be obtained by directly adopting another edge of the document image at the lower end thereof.
- the skewed shape (a fan-like shape) in the last half of conveyance may be corrected into an ideal shape by being geometrically transformed into a rectangle.
- sets each consisting of two points on the respective arcs originally supposed to be on the same conveyance position may be found by obtaining the two points in each of the sets as points advanced by the same rate relative to the lengths of the respective arcs (for example, when the right arc is advanced by 1 dot, which corresponds to the rate of 1% of the length thereof, the left arc is advanced by 0.9 dot, which corresponds to the rate of 1% of the length thereof).
- pixels on a straight line connecting the right and the left points thus found are acquired, and then arranged horizontally side by side so as to follow the approximate straight line. Skew correction may be performed by repeating this process for all rows.
- a lens skew correction process may be employed in which skew correction is performed by extracting feature points from the document image and performing mapping between the ideal shape and the skewed shape.
- the image-outputting unit 102 j causes the input/output unit 112 to display the accumulated-skew-corrected image data obtained by the accumulated-skew correcting unit 102 i (Step SA- 14 ), and the processing is ended.
- Step SA- 8 if the accumulated-skew detecting unit 102 h has determined that the condition is not satisfied that the edge-based detected position and the content-based detected position have both been detected (No at Step SA- 8 ), the processing is shifted to Step SA- 15 .
- the accumulated-skew detecting unit 102 h determines whether the condition is satisfied that, while the edge-based detected position has been detected, the content-based detected position has not been detected (Step SA- 15 ).
- Step SA- 15 the processing is shifted to Step SA- 16 .
- the accumulated-skew detecting unit 102 h adopts the edge-based detected position as an accumulated-skew occurrence position (Step SA- 16 ), and the processing is shifted to Step SA- 13 .
- credence may be given to the candidate edge-skew occurrence position, so that the candidate edge-skew occurrence position can be adopted as an accumulated-skew occurrence position.
- the candidate edge-skew occurrence position when no candidate content-skew occurrence position is present despite the presence of a candidate edge-skew occurrence position, the candidate edge-skew occurrence position may be adopted as an accumulated-skew occurrence position.
- Step SA- 15 the processing is shifted to Step SA- 17 .
- the accumulated-skew detecting unit 102 h determines whether the condition is satisfied that, while the edge-based detected position has not been detected, the content-based detected position has been detected (Step SA- 17 ).
- Step SA- 17 the processing is shifted to Step SA- 10 .
- Step SA- 17 the processing is shifted to Step SA- 18 .
- the accumulated-skew detecting unit 102 h adopts the content-based detected position as an accumulated-skew occurrence position (Step SA- 18 ), and the processing is shifted to Step SA- 13 .
- the candidate content-skew occurrence position when no candidate edge-skew occurrence position is present despite the presence of a candidate content-skew occurrence position, the candidate content-skew occurrence position may be adopted as an accumulated-skew occurrence position.
- FIG. 13 to FIG. 17 are diagrams of the example of the process of detecting accumulated skew in the embodiment.
- edges that is, the shape of a document image
- a document image card image corrected for front-end skew.
- edges detected in detection of the front-end skew may be used.
- each of the detected edges is approximated by one straight line, this approximate straight line is assumed to be a part of an ideal side supposed to have been obtained without the presence of skew.
- a straight line detected in detection of the front-end skew may be used as an approximate straight line.
- a position at which an edge has started deviating from the approximate straight line thereof may be detected as a candidate edge-skew occurrence position.
- each content for example, any one, some, or all of a character string, a ruled line, and a photographic rectangle.
- this position may be detected as the candidate content-skew occurrence position.
- the presence or absence of a candidate edge-skew occurrence position and the presence or absence of a candidate content-skew occurrence position are found, so that, based the combination of the presence or absence of these positions, the occurrence of eventual accumulated skew and an accumulated-skew occurrence position may be detected.
- an accumulated-skew occurrence position may be highly accurately detected while erroneous detection is prevented with edges (the shape of a document image) and inclinations of contents (contents in a document) taken into account.
- the higher priority may be given to inclinations of contents because a document may have a rip or the like therein and sometimes result in a document image that is not a rectangle.
- accumulated skew of a document image can be thus detected and corrected based only on the image.
- a document is conveyed straight in touch with a plurality of rollers part of the way, and tends to have conspicuous accumulated skew in the final phase of conveyance when it is conveyed only by the last roller.
- a position at which accumulated skew has occurred is specified based on edges of a document image and an inclination of a content in the document image, and the presence or absence of accumulated skew and the shape thereof are detected.
- the accumulated skew is caused by a situation in which the conveyance rollers are not able to apply force symmetrically in the right-to-left direction, and can be avoided by wiping out the grime or replacing the rollers.
- correction when accumulated skew has been detected, correction may be performed in such a manner that: the edges are approximated by a rectangle and by circular sectors in parts read before and after the occurrence of skew, respectively; and a region rearward from an accumulated-skew occurrence position and bounded by the two circular sectors is assumed to be ideally rectangular.
- Such skew is what is called accumulated skew, which tends to occur during conveyance of a document that is conveyed by force exceeding the conveyance force of rollers or the like, or a document that has irregular thickness or shape (for example, an embossed card, or a pamphlet in the form of a booklet as it originally has been).
- the embodiment provides a method for correcting a read image so that the read image can appear as if no accumulated skew has occurred during conveyance.
- the image-processing apparatus 100 may perform processing in a standalone mode, or may perform processing according to a request from a client terminal (separate from the image-processing apparatus 100 ) and then return the results of the processing to the client terminal.
- all or any part of the processing functions included in the units of the image-processing apparatus 100 may be implemented by the CPU or programs interpreted and executed by the CPU, or may be implemented by wired logic-based hardware.
- the programs including programmed instructions for causing a computer to execute methods according to the present disclosure described later are recorded in non-transitory computer-readable recording media, and are mechanically read by the image-processing apparatus 100 as necessary.
- the computer programs for giving instructions to the CPU to perform various processes in cooperation with an operating system (OS) are recorded in the storage unit 106 such as a ROM or a hard disk drive (HDD).
- the computer programs are loaded into the RAM and executed, and constitute a control unit in cooperation with the CPU.
- the computer programs may be stored in an application program server connected to the image-processing apparatus 100 via an appropriate network, and may be entirely or partly downloaded as necessary.
- the programs according to the present disclosure may be stored in computer-readable recording media or may be formed as program products.
- the “recording media” include any portable physical media such as a memory card, a USB memory, an SD card, a flexible disc, a magneto optical disc (MO), a ROM, an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), a compact disc read only memory (CD-ROM), a DVD, and a Blu-ray (registered trademark) disc.
- programs constitute data processing methods described in an appropriate language or by an appropriate describing method, and are not limited in format such as source code or binary code.
- the “programs” are not limited to singly-configured ones but may be distributed into a plurality of modules or libraries or may perform their functions in conjunction with another program typified by an OS.
- Specific configurations for reading the recording media by the units according to the embodiment, specific procedures for reading the programs, or specific procedures for installing the read programs may be well-known configurations or procedures.
- the various databases and others stored in the storage unit 106 may be storage units such as any one, some, or all of a memory device such as a RAM or a ROM, a fixed disc device such as a hard disc, a flexible disc, and an optical disc, and may store any one, some, or all of various programs, tables, databases, and web page files for use in various processes and web site provision.
- a memory device such as a RAM or a ROM
- a fixed disc device such as a hard disc, a flexible disc, and an optical disc
- various programs, tables, databases, and web page files for use in various processes and web site provision.
- the image-processing apparatus 100 may be an information processing apparatus such as a well-known personal computer, and an appropriate peripherals may be connected to the information processing apparatus.
- the image-processing apparatus 100 may be embodied by providing the information processing apparatus with software (including programs, data, and the like) for implementing the methods according to the present disclosure.
- the specific modes of distribution and integration of the devices are not limited to the ones illustrated in the drawings but all or some of the devices may be functionally or physically distributed or integrated by a predetermined unit according to various additions and the like or functional loads. That is, the foregoing embodiments may be carried out in any appropriate combination or may be selectively carried out.
- the present disclosure makes it possible to efficiently correct accumulated skew that is inclination of a document image that tends to occur when a document that needs conveyance force exceeding that of conveyance rollers or the like or a document that has irregular thickness or shape is conveyed, during the last half of conveyance of the document, depending on how force from the conveyance rollers is applied.
- correction can be made to obtain the same result as if skew had been able to be prevented in a hardware-based manner. Further, according to the present disclosure, application to images read by existing pieces of hardware is possible, and there is no need for improvement of hardware.
- the present disclosure makes it possible to provide a highly flexible method for correcting accumulated skew without any change in hardware such as providing a paper-feeding route of a certain size to forcibly prevent skew, or increasing the number of conveyance rollers to constantly have at least two rollers conveying a document to the end of the conveyance.
- the present disclosure does not need design change in hardware that leads to increase in size of a conveyance device, restriction on sheet sizes, or the like, and therefore can correspond to images read by various kinds of hardware.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Editing Of Facsimile Originals (AREA)
- Facsimile Scanning Arrangements (AREA)
- Image Processing (AREA)
Abstract
According to the present disclosure, edges of a document image contained in a read image read by an image-reading apparatus including a paper path are detected, a candidate edge-skew occurrence position is detected, a candidate content-skew occurrence position is detected, an accumulated-skew occurrence position is detected based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position, skew of a document rear-part image rearward from the accumulated-skew occurrence position in the conveyance direction is corrected, and image data corrected for accumulated skew is acquired.
Description
- This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2016-121139, filed on Jun. 17, 2016, the entire contents of which are incorporated herein by reference.
- The present disclosure relates to an image-processing apparatus, an image-processing method, and a computer program product.
- Techniques for correcting skew in scanned images have been disclosed heretofore.
- As one of those techniques, there has been disclosed a technique that detects skew when a book is pressed against a flat-bed scanner and then detects the boundary point between a straight-line part and a curved-line part of a peripheral shape of a page to correct a part in which the skew has occurred (refer to JP-A-2004-048633).
- There has been disclosed another technique that, in an image obtained by reading a book with an overhead scanner, corrects skew by constructing a correction mesh based on the shape and the content of a document, and correcting cells in the mesh so that the cells can be rectangular and be arrayed uniformly (JP-A-2015-104127).
- There has been disclosed still another technique that, during document conveyance for facsimile, corrects skew by dividing an image into a plurality of parts in the conveyance direction by use only of ruled lines as dividing positions and as rotation angles, and rotating the individual parts (JP-A-9-091376).
- There has been disclosed yet another technique that, in an image read by an automatic document feeder (ADF) scanner, corrects skew in the image by: detecting document edges; approximating each of the edges by a plurality of straight lines; assuming that a point at which there is a change equal to or more than a certain angle in the angle between the straight lines is a position at which skew has occurred; assuming that the respective parts on the both sides of the skew are rectangles; and aligning the positions of these rectangles (JP-A-2015-198306).
- However, conventional image-correcting apparatuses (as those disclosed in JP-A-2004-048633 and the like) are inconvenient in that the apparatuses are incapable of, with respect to gentle skew that occurs when a document is conveyed, correcting the skew by deforming only necessary parts thereof.
- It is an object of the present disclosure to at least partially solve the problems in the conventional technology.
- An image-processing apparatus according to one aspect of the present disclosure is an image-processing apparatus including an image acquiring unit configured to acquire read image data of a read image read by an image-reading apparatus including a paper path, an edge detecting unit configured to detect edges of a document image contained in the read image and acquires approximate straight lines by extending the longest straight-line parts of the respective edges, an edge-skew detecting unit configured to detect, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other, a content detecting unit configured to detect direction-identifying contents defined as contents usable for specifying directions within the document image, a content-skew detecting unit configured to detect, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the conveyance direction, an accumulated-skew detecting unit configured to detect an accumulated-skew occurrence position, based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position, and, an accumulated-skew correcting unit configured to acquire accumulated-skew-corrected image data by correcting skew in a document rear-part image located rearward from the accumulated-skew occurrence position in the conveyance direction.
- An image-processing method according to another aspect of the present disclosure is an image-processing method including an image acquiring step of acquiring read image data of a read image read by an image-reading apparatus including a paper path, an edge detecting step of detecting edges of a document image contained in the read image and acquiring approximate straight lines by extending the longest straight-line parts of the respective edges, an edge-skew detecting step of detecting, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other, a content detecting step of detecting direction-identifying contents defined as contents usable for specifying directions within the document image, a content-skew detecting step of detecting, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the conveyance direction, an accumulated-skew detecting step of detecting an accumulated-skew occurrence position, based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position, and, an accumulated-skew correcting step of acquiring accumulated-skew-corrected image data by correcting skew in a document rear-part image located rearward from the accumulated-skew occurrence position in the conveyance direction.
- A computer program product according to still another aspect of the present disclosure is a computer program product having a non-transitory tangible computer readable medium including programmed instructions for causing, when executed by a computer, the computer to perform an image-processing method including an image acquiring step of acquiring read image data of a read image read by an image-reading apparatus including a paper path, an edge detecting step of detecting edges of a document image contained in the read image and acquiring approximate straight lines by extending the longest straight-line parts of the respective edges, an edge-skew detecting step of detecting, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other, a content detecting step of detecting direction-identifying contents defined as contents usable for specifying directions within the document image, a content-skew detecting step of detecting, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the conveyance direction, an accumulated-skew detecting step of detecting an accumulated-skew occurrence position, based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position, and, an accumulated-skew correcting step of acquiring accumulated-skew-corrected image data by correcting skew in a document rear-part image located rearward from the accumulated-skew occurrence position in the conveyance direction.
- The above and other objects, features, advantages and technical and industrial significance of this disclosure will be better understood by reading the following detailed description of presently preferred embodiments of the disclosure, when considered in connection with the accompanying drawings.
-
FIG. 1 is a functional block diagram of an example of the configuration of an image-processing apparatus according to one embodiment; -
FIG. 2 is a block diagram of an example of the hardware configuration of the image-processing apparatus according to the embodiment; -
FIG. 3 is a flowchart of an example of processing in the image-processing apparatus according to the embodiment; -
FIG. 4 is a diagram of an example of the process of detecting and correcting front-end skew in the embodiment; -
FIG. 5 is a diagram of an example of the process of detecting edge skew in the embodiment; -
FIG. 6 is a diagram of an example of the process of detecting content skew in the embodiment; -
FIG. 7 is a diagram of another example of the process of detecting content skew in the embodiment; -
FIG. 8 is a diagram of another example of the process of detecting content skew in the embodiment; -
FIG. 9 is a diagram of an example of occurrence of accumulated skew in the embodiment; -
FIG. 10 is another diagram of the example of occurrence of accumulated skew in the embodiment; -
FIG. 11 is a diagram of an example of a document rear-part image in the embodiment; -
FIG. 12 is a diagram of an example of the process of correcting accumulated skew in the embodiment; -
FIG. 13 is a diagram of an example of the process of detecting accumulated skew in the embodiment; -
FIG. 14 is another diagram of the example of the process of detecting accumulated skew in the embodiment; -
FIG. 15 is another diagram of the example of the process of detecting accumulated skew in the embodiment; -
FIG. 16 is another diagram of the example of the process of detecting accumulated skew in the embodiment; and -
FIG. 17 is another diagram of the example of the process of detecting accumulated skew in the embodiment. - An image-processing apparatus, an image-processing method, and a computer program product according to the present disclosure will be described in detail below with reference to drawings. Note that the present disclosure is not limited to this embodiment.
- Configuration of the Embodiment
- An example of the configuration of an image-
processing apparatus 100 according to an embodiment of the present disclosure will be described below with reference toFIGS. 1 and 2 , and then, processing etc. according to the embodiment will be described in detail.FIG. 1 is a functional block diagram of the example of the configuration of the image-processing apparatus 100 according to the embodiment. - In the embodiment described below, the image-
processing apparatus 100 will be described as an example in order to specify the technical idea of the present disclosure. It is not intended to limit the present disclosure to the image-processing apparatus 100, and the present disclosure is applicable equally to image-processing apparatuses 100 of other embodiments included in the scope of the claims. - Function distribution of the image-
processing apparatus 100 described as an example in the embodiment is not limited to the configuration described later. The image-processing apparatus 100 can be configured in such a manner that any units are functionally or physically separated or integrated, as long as similar advantageous effects and functions can be exhibited. - The image-
processing apparatus 100 includes, as schematically illustrated inFIG. 1 , acontrol unit 102 and astorage unit 106. These sections of the image-processing apparatus 100 are connected communicatively to each other via an optional communication path. - The image-
processing apparatus 100 of the embodiment may be connected to an image-reading apparatus 200 (this section is not shown inFIG. 1 ). The image-processing apparatus 100 may include the image-reading apparatus 200 in its housing. - The image-
reading apparatus 200 including a paper path may be a document scanner of a manual insertion paper feeding system (Continuous Document Feeding (CDF) system), a document scanner of an automatic document feeding system (ADF system) or the like. - The image-
processing apparatus 100 may further include an input/output unit 112 (this section is not shown inFIG. 1 ). The input/output unit 112 performs input/output (I/O) of data. - The input/output unit 112 may be any one, some or all of a key input unit, a touch panel, a control pad (a touch pad, a game pad or the like), a mouse, a keyboard, and a microphone, for example.
- The input/output unit 112 may be any one or both of a display unit (a display, a monitor, a touch panel made of crystal liquid or organic EL or the like) configured to display information such as an application, and a sound output unit (a speaker or the like) configured to output sound information as sound.
- The image-
processing apparatus 100 may further include aninterface unit 108. The image-processing apparatus 100 may be connected intercommunicatively to an external apparatus (for example, image-reading apparatus 200 or the like) via theinterface unit 108. - The
interface unit 108 may be any one or both of an antenna to be connected to any one or both of a communication line and a telephone line, and an interface (NIC or the like) to be connected to a communication apparatus such as a router. Moreover, it may be a communication interface that performs a communication control between the image-processing apparatus 100 and a network. - The network may include remote communications or the like such as any one or both of wire communications and wireless communications (WiFi or the like). The
interface unit 108 may be an input/output interface that performs input/output control between the image-reading apparatus 200 or the like and thecontrol unit 102. - The
control unit 102 may control theinterface unit 108 and the input/output unit 112. - The
storage unit 106 stores any one, some, or all of various kinds of database, tables, and files (image data file 106 a and the like). Moreover, thestorage unit 106 may store various kinds of application programs (for example, user applications and the like). - The
storage unit 106 is a storage unit that may be any one, some, or all of a memory such as a random access memory (RAM) or a read-only memory (ROM), a fixed disc device such as a hard disc, a solid state drive (SSD), a flexible disc, and an optical disc, for example. - The
storage unit 106 may store computer programs and the like for giving instructions to a central processing unit (CPU) and to perform various processes. - The image data file 106 a out of these constituent elements of the
storage unit 106 stores image data. Here, the image data may be data read by the image-readingapparatus 200, document image data, accumulated-skew-corrected image data or the like. - The
control unit 102 may be constituted of tangible controllers that controls generally the image-processing apparatus 100, including any one, some, or all of CPU, a graphics processing unit (GPU), a digital signal processor (DSP), a large scale integration (LSI), an application specific integrated circuit (ASIC), a field-programming gate array (FPGA) and the like, or control circuitry. - The
control unit 102 has an internal memory for storing a control program, a program that regulates various procedures or the like, and required data, and it performs information processing for executing various processes based on these programs. - The
control unit 102 broadly includes an image acquiring unit 102 a, anedge detecting unit 102 b, a front-endskew detecting unit 102 c, a front-endskew correcting unit 102 d, an edge-skew detecting unit 102 e, acontent detecting unit 102 f, a content-skew detecting unit 102 g, an accumulated-skew detecting unit 102 h, an accumulated-skew correcting unit 102 i, and an image-outputtingunit 102 j. - The image acquiring unit 102 a acquires image data. The image acquiring unit 102 a may acquire read image data of a read image read by the image-reading
apparatus 200 including a paper path. The image acquiring unit 102 a may store image data in the image data file 106 a. - The
edge detecting unit 102 b detects edges of a document image contained in a read image. Theedge detecting unit 102 b may acquire approximate straight lines by extending the longest straight-line parts of the respective detected edges. - The
edge detecting unit 102 b may specify the document image from the read image based on the detected edges to acquire document image data. - The front-end
skew detecting unit 102 c detects front-end skew defined as an inclination of the document image with respect to the read image. The front-end skew may be an inclination due to an angle formed at the start of sheet feeding. - The front-end
skew detecting unit 102 c may detect inclinations of all of the approximate straight lines of the document image with respect to the read image to detect the front-end skew defined as an inclination of the document image with respect to the read image. - Based on the front-end skew, the front-end
skew correcting unit 102 d corrects the document image so as to erect the document image. - The edge-
skew detecting unit 102 e detects, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other. - The
content detecting unit 102 f detects direction-identifying contents defined as contents usable for specifying directions within the document image. - Here, the
content detecting unit 102 f may detect an angle between the one of the approximate straight lines that is in the document conveyance direction and a character string in the document image by: detecting the character string; calculating the areas of rectangles circumscribed to the character string while rotating the character string, the rectangles each being defined by line segments parallel to the approximate straight line in the document conveyance direction and horizontal line segments; and specifying a rotation angle corresponding to the smallest one of the areas. - The
content detecting unit 102 f may detect an angle between the one of the approximate straight lines that is in the document conveyance direction and a character string in the document image by: detecting the character string; performing optical character recognition (OCR) on the character string while rotating the character string; and specifying a rotation angle at which accuracy of the character recognition is the highest. - The
content detecting unit 102 f may detect straight-line elements of the contents by a Hough transform. - The content-
skew detecting unit 102 g detects, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the document conveyance direction. - The content-
skew detecting unit 102 g may detect, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a side of a rectangular graphic region, the rear angle being an angle between the approximate straight line and one of the direction-identifying contents that is located rearward from the rectangular graphic region in the document conveyance direction. - The content-
skew detecting unit 102 g may detect, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a ruled line, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the ruled line in the document conveyance direction. - The content-
skew detecting unit 102 g may detect, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a character string, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the character string in the document conveyance direction. - Based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position, the accumulated-
skew detecting unit 102 h detects an accumulated-skew occurrence position. The accumulated skew may be an inclination due to gradual formation of an angle during conveyance. - On conditions that the candidate edge-skew occurrence position and the candidate content-skew occurrence position have been detected and that the distance between the detected positions is equal to or less than a certain distance, the accumulated-
skew detecting unit 102 h may detect, as the accumulated-skew occurrence position, one of the candidate positions that is located rearward from the other in the document conveyance direction. - On conditions that the candidate edge-skew occurrence position has been detected by the edge-
skew detecting unit 102 e and that the direction-identifying content has not been detected by thecontent detecting unit 102 f, the accumulated-skew detecting unit 102 h may detect the candidate edge-skew occurrence position as the accumulated-skew occurrence position. - On conditions that the candidate edge-skew occurrence position has been detected by the edge-
skew detecting unit 102 e and that the candidate content-skew occurrence position has not been detected by the content-skew detecting unit 102 g, the accumulated-skew detecting unit 102 h may detect the candidate edge-skew occurrence position as the accumulated-skew occurrence position. - On conditions that the candidate edge-skew occurrence position has not been detected by the edge-
skew detecting unit 102 e and that the candidate content-skew occurrence position has been detected by the content-skew detecting unit 102 g, the accumulated-skew detecting unit 102 h may detect the candidate content-skew occurrence position as the accumulated-skew occurrence position. - On conditions that the candidate edge-skew occurrence position and the candidate content-skew occurrence position have been detected and that the distance between the detected positions is more than the certain distance, the accumulated-
skew detecting unit 102 h may assume that no accumulated skew has occurred and detect no accumulated-skew occurrence position. - On conditions that the candidate edge-skew occurrence position has not been detected by the edge-
skew detecting unit 102 e and that any direction-identifying content has not been detected by thecontent detecting unit 102 f, the accumulated-skew detecting unit 102 h may assume that no accumulated skew has occurred and detect no accumulated-skew occurrence position. - On conditions that the candidate edge-skew occurrence position has not been detected by the edge-
skew detecting unit 102 e and that the candidate content-skew occurrence position has not been detected by the content-skew detecting unit 102 g, the accumulated-skew detecting unit 102 h may assume that no accumulated skew has occurred and detect no accumulated-skew occurrence position. - The accumulated-
skew correcting unit 102 i acquires accumulated-skew-corrected image data by performing skew correction on a document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction. - The accumulated-
skew correcting unit 102 i may acquire accumulated-skew-corrected image data by: assuming that the document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction is a region bounded by two circular sectors; and correcting skew by bringing the arcs of the circular sectors onto approximate straight lines that are in the document conveyance direction. - The accumulated-
skew correcting unit 102 i may acquire accumulated-skew-corrected image data by: assuming that a document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction is a region bounded by two circular sectors; and correcting skew by geometrically transforming the arcs of the circular sectors onto the approximate straight lines that are in the document conveyance direction. - The accumulated-
skew correcting unit 102 i may acquire accumulated-skew-corrected image data by: assuming that the document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction is a region bounded by two circular sectors; and correcting skew by geometrically transforming, in a manner that extends the shorter one of these arcs, the arcs of the circular sectors onto the approximate straight lines that are in the document conveyance direction. - The accumulated-
skew correcting unit 102 i may acquire accumulated-skew-corrected image data by correcting skew by performing lens skew correction on the document rear-part image rearward from the accumulated-skew occurrence position in the document conveyance direction. - The accumulated-skew-corrected image may be an image obtained by synthesizing, with a document front-part image frontward from the accumulated-skew occurrence position, the document rear-part image corrected for skew by the accumulated-
skew correcting unit 102 i. - The image-outputting
unit 102 j outputs image data. The image-outputtingunit 102 j may output image data through the input/output unit 112. - Furthermore, an example of hardware configuration of the image-
processing apparatus 100 according to the embodiment will be explained with reference toFIG. 2 .FIG. 2 is a block diagram of an example of a hardware configuration of the image-processing apparatus 100 according to the embodiment. - As illustrated in
FIG. 2 , the image-processing apparatus 100 may be connected communicatively to the image-readingapparatus 200 via the interface unit (I/F) 108. - As illustrated in
FIG. 2 , the image-processing apparatus 100 may include aCPU 102 that generally controls the image-processing apparatus 100, thememory 106 and anauxiliary storage device 106 as storage units. - Further, as illustrated in
FIG. 2 , the image-processing apparatus 100 may include, for example, an I/F 108 that controls communicative connection to the image-readingapparatus 200, an interface unit (medium read unit) 108 such as a USB port for connecting a recording medium or the like, the input/output unit (input unit) 112 for performing data input, and the input/output unit (output unit) 112 for performing data output. - Further, as illustrated in
FIG. 2 , the image-readingapparatus 200 may include a CPU that generally controls the image-readingapparatus 200, a block buffer, a memory and an image memory as storage units, and an arbitration unit that arbitrates an access request to the memory. - Further as illustrated in
FIG. 2 , the image-readingapparatus 200 may include an image sensor that performs image reading, an analog front end (AFE) as an analog circuit that connects the image sensor and a shading process unit, and a shading process unit that adjusts shades of the image data. - Further, as illustrated in
FIG. 2 , the image-readingapparatus 200 may include, for example, an image-processing-control unit that controls image processing on the read image data, an I/F (interface unit) that controls communicative connection to the image-processing apparatus 100, an input unit for performing data input, and an output unit for performing data output. - Processing of the Embodiment
- An example of processing executed in the image-
processing apparatus 100 having the above-described configuration will be explained with reference toFIG. 3 toFIG. 17 .FIG. 3 is a flowchart of an example of processing in the image-processing apparatus 100 of the embodiment. - As shown in
FIG. 3 , at the start, the image acquiring unit 102 a acquires read image data read by the image-readingapparatus 200 including a paper path (Step SA-1). - Subsequently, the
edge detecting unit 102 b detects edges of a document image contained in the read image, and acquires approximate straight lines by extending the longest straight-line parts of the respective detected edges (Step SA-2). - Here, the
edge detecting unit 102 b may specify the document image from the read image, based on the detected edges to acquire document image data. - Subsequently, the front-end
skew detecting unit 102 c detects front-end skew defined as an inclination of the document image with respect to the read image (Step SA-3). - Subsequently, based on the front-end skew detected by the front-end
skew detecting unit 102 c, the front-endskew correcting unit 102 d corrects the document image so as to erect the document image (Step SA-4). - That is, the front-end
skew correcting unit 102 d is capable of eliminating the front-end skew to erect the document image. - Here, with reference to
FIG. 4 , an example of the process of detecting and correcting front-end skew in the embodiment will be explained.FIG. 4 is a diagram of an example of the process of detecting and correcting front-end skew in the embodiment. - As shown in
FIG. 4 , in the embodiment, an approximate straight line obtained by extending the longest straight-line part of the longest one (in the document conveyance direction) of the detected edges (line segments obtained by connecting points denoted as “X” inFIG. 4 ), and the inclination of this approximate straight line are acquired. - Subsequently, in the embodiment, based on the inclination of the approximate straight line in the document conveyance direction, the document image is corrected to erect in a manner that causes the approximate straight line in the document conveyance direction to erect.
- As shown in
FIG. 4 , in the embodiment, the inclination of the entire document image is detected and corrected, and factors of inclination caused as a result of inclined paper feeding are eliminated without consideration for skew (accumulated skew) due to skew caused during conveyance. - In this embodiment, the disclosure disclosed in JP-A-2007-88654 for detecting inclination and cutting out a document assuming that there is no accumulated skew may be used in this process.
- As described above, when the process of detecting and correcting front-end skew in the embodiment is performed, accumulated skew is eliminated, so that a document image that is fed straight can be acquired and so that an erected side can be used as a side that serves as a reference in correcting accumulated skew.
- Alternatively, in the embodiment, the inclination of the entire document image may be detected and corrected as the front-end skew in such a manner that the angles of the respective vertices of a document are detected by used of approximate straight lines obtained by extending the longest straight-line parts of all edges of the document.
- Note that the front-end skew can be corrected independently of accumulated skew because the front-end skew is an inclination caused only when a document is set or when the document is pulled in immediately after the start of paper feeding, and causes an inclination in angle of the entire document but does not cause skew in the document.
- With reference back to
FIG. 3 , the edge-skew detecting unit 102 e detects, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in the document conveyance direction, a position at which the one approximate straight line and one of the edges that contains the longest straight-line part of the one approximate straight line start to separate from each other (Step SA-5). - Here, with reference to
FIG. 5 , an example of the process of detecting edge skew in the embodiment will be explained.FIG. 5 is a diagram of an example of the process of detecting edge skew in the embodiment. - As shown in
FIG. 5 , when accumulated skew has occurred, the longest edge in the document conveyance direction gradually shifts to the left in such a manner as to draw away from the approximate straight line. - Therefore, in the embodiment, a position (the position of the dotted line in
FIG. 5 ) that satisfies the conditions that it has a distance equal to or more than 1 mm from the approximate straight line and that it continues shifting in the same direction thereafter may be detected as the candidate edge-skew occurrence position. - With reference back to
FIG. 3 , thecontent detecting unit 102 f detects direction-identifying contents defined as contents usable for specifying directions within the document image (Step SA-6). - Subsequently, the content-
skew detecting unit 102 g detects, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the document conveyance direction (Step SA-7). - Here, with reference to
FIG. 6 , an example of the process of detecting content skew in the embodiment using ruled lines will be explained.FIG. 6 is a diagram of an example of the process of detecting content skew in the embodiment. - As shown in
FIG. 6 , in the embodiment, the respective ruled lines are used as the direction-identifying contents in calculating inclinations, and, when the inclinations are observed in the document conveyance direction, the angles between the approximate straight line and the respective ruled lines successively increase as the ruled lines are located farther from the accumulated-skew occurrence position. - In the embodiment, a position (the position of the dotted line in
FIG. 6 ) that satisfies the conditions that it is located where the angle between the approximate straight line and one of the ruled lines is equal to or more than 0.5 degrees plus or minus the right angle (90 degrees) and that the angles continue to increase thereafter may be detected as the candidate content-skew occurrence position. - In the embodiment, a general Hough transform may be used to extract elements corresponding to line segments, such as ruled lines, in the document image, and those having lengths equal to or more than a certain length may be used as constituent elements of the direction-identifying contents.
- Here, in the embodiment, any line-segment element having a length equal to or less than 3 cm and forming an angle with the approximate straight line that is 5 degrees or more from the horizontal direction (0 degrees) or from the vertical direction (90 degrees) may be excluded from constituent elements of the direction-identifying content because various line-segment elements in the document image, such as a part of a large character, are detected in the same manner as ruled lines are detected.
- With reference to
FIG. 7 , an example of the process of detecting content skew in the embodiment using a character string will be explained.FIG. 7 is a diagram of an example of the process of detecting content skew in the embodiment. - In the embodiment, the angle (content skew) of a character string detected as a direction-identifying content may be detected in the following manner. With the character string broken up into certain units (character-string blocks), the angles of the character-string blocks are detected while being rotated, and the optimum angle is calculated in degrees.
- Here, a method for calculating the optimum angle in the embodiment may include calculating, as the optimum angle, an angle at which the rectangle circumscribed to the character string or the height of the character string is the smallest, or an angle at which the highest confidence is obtained by an OCR process based on matching with respect to each character.
- For example, as shown in
FIG. 7 , the heights of rectangles each circumscribed to the character string may be calculated while a character string (that is, a character-string image) extracted from a document image is rotated. Each of the rectangles is formed of line segments parallel to the approximate straight lines in the document conveyance direction and horizontal line segments. - Here, the character string shown in
FIG. 7 is inclined −1 degree, and one of the circumscribed rectangles that is obtained when the character string is rotated +1 degree has the smallest height. It may therefore be determined that this character string is inclined −1 degree. - Here, in the embodiment, extraction of a character string may include (1) binarizing a document image using a variable threshold (separating the contents from a base color) by use of the Otsu's binarization or the like, and (2) labeling each region separated by the binarization and extracting a rectangular region that encircles the region.
- In the embodiment, the extraction of a character string may further include (3) determining any extremely large rectangular region to be a graphic and determining any small rectangular region to be a character, and (4) rectangular regions of the same size that are located within a distance equal to or less than a certain distance are connected as characters that are lined up.
- With reference to
FIG. 8 , an example of the process of detecting content skew in the embodiment using a graphic region will be explained.FIG. 8 is a diagram of an example of the process of detecting content skew in the embodiment. - In the embodiment, a candidate content-skew occurrence position may be detected in such a manner that: a rectangular graphic region is extracted as a direction-identifying content; and closeness of the graphic region to a rectangle is determined.
- Here, in the embodiment, a rectangular graphic region may be extracted though the above processes (1) to (3).
- Subsequently, in the embodiment, based on whether all angles formed by the four sides thereof are parallel or perpendicular to one another, it is determined whether the extracted rectangular graphic region is a rectangular.
- As shown in
FIG. 8 , in the embodiment, if it is determined that the rectangular graphic region is a rectangle, it may be determined that the angle formed between the approximate straight line and the direction-identifying content is uniform in a section containing this graphic region and that there is no skew in the section containing this graphic region. - On the other hand, in the embodiment, if it is determined that the rectangular graphic region is not a rectangle (has different angles at the upper and the lower edges), the upper and the lower edges of the graphic region may be treated as direction-identifying contents in the same manner as the ruled lines, because it is impossible to determine a location at which skew has started.
- In the embodiment, when a plurality of contents having different results have been found at the same position, a candidate content-skew occurrence position may be detected with the highest through the lowest priorities given to a graphic, a ruled line, and a character string.
- With reference back to
FIG. 3 , the accumulated-skew detecting unit 102 h determines whether the condition is satisfied that the candidate edge-skew occurrence position (an edge-based detected position) and a candidate content-skew occurrence position (a content-based detected position) have been both detected (Step SA-8). - Subsequently, if the accumulated-
skew detecting unit 102 h has determined that the condition is satisfied that the edge-based detected position and the content-based detected position have both been detected (Yes at Step SA-8), the processing is shifted to Step SA-9. - Subsequently, the accumulated-
skew detecting unit 102 h determines whether the distance between the two detected positions, that is, the edge-based detected position and the content-based detected position, is equal to or less than a certain distance (for example, 1 cm) (Step SA-9). - Subsequently, if the accumulated-
skew detecting unit 102 h has determined that the distance between the two detected positions, that is, the edge-based detected position and the content-based detected position, is more than the certain distance (No at Step SA-9), the processing is shifted to Step SA-10. - Subsequently, the accumulated-
skew detecting unit 102 h assumes that accumulated skew has not occurred, and does not detect the accumulated-skew occurrence position (Step SA-10). - That is, in the embodiment, when the candidate edge-skew occurrence position and the candidate content-skew occurrence position are both present but with a large distance therebetween, it is likely that the shape of the document itself is skewed or that contents are inclined, and these positions can be regarded as positions without accumulated skew.
- Subsequently, the image-outputting
unit 102 j causes the input/output unit 112 to display read image data or document image data (Step SA-11), and the processing is ended. - On the other hand, if the accumulated-
skew detecting unit 102 h has determined that the distance between the two detected positions, that is, the edge-based detected position and the content-based detected position, is equal to or less than the certain distance (Yes at Step SA-9), the processing is shifted to Step SA-12. - Subsequently, the accumulated-
skew detecting unit 102 h adopts, as the accumulated-skew occurrence position, one of the edge-based detected position and the content-based detected position that is located rearward from (lower than) the other in the document conveyance direction (Step SA-12). - The accumulated-
skew detecting unit 102 h is thus capable of detecting the presence of accumulated skew and the accumulated-skew occurrence position. - That is, in the embodiment, when the candidate edge-skew occurrence position and the candidate content-skew occurrence position are both present and are located close to each other, one of these positions that is located lower than the other may be adopted as the accumulated-skew occurrence position.
- Here, with reference to
FIG. 9 andFIG. 10 , an example of occurrence of accumulated skew in the embodiment will be explained.FIG. 9 andFIG. 10 are diagrams of the example of occurrence of accumulated skew in the embodiment. - First, the image-reading
apparatus 200 including a paper path, such as a general ADF scanner, generally has conveyance rollers provided to the upstream and the downstream sides of an image sensor in an internal part and has a paper guide discontinued without entering the internal part. - Therefore, conveyance of documents after the start of feeding relies on the conveyance rollers. In addition, the conveyance rollers that are actually touching documents are arranged generally in such a manner that a time at which only the last one set thereof touch the document is generated before the rear end of each document completely passes by the image sensor.
- Therefore, in a document the gravity center or the thickest part of which does not touch the conveyance rollers evenly in the right-left direction, accumulated skew tends to occur during a time when only the last one conveyance roller in the final phase of conveyance touches the document.
- Here, the most conspicuous accumulated skew tends to occur, in a thick and right-left asymmetric document such as a pamphlet or in a document uneven in thickness such as an embossed card, immediately before the end of conveyance thereof.
- Here, as shown in
FIG. 9 , in the first half of conveyance, a plurality of conveyance rollers are linearly located relative to a document (card) having embossed characters printed on one side and having uneven thickness on the right and the left sides, so that these conveyance rollers touch the document perpendicularly thereto. - Therefore, as shown in
FIG. 9 , in the embodiment, a part of an output image corresponding to the first half of conveyance is conveyed straight regardless of the difference between magnitudes of force that are received by the right and the left sides of the document, thereby being obtained as an image having no skew. - On the other hand, as shown in
FIG. 10 , only one set of conveyance rollers arranged along the horizontal direction convey the document in the last half of conveyance, so that the difference (1.1−1.0=0.1) between magnitudes of force that are received by the right and the left sides of the document is directly reflected in the conveyance speed, and visibly appears as rotative force. - Consequently, as shown in
FIG. 10 , in the embodiment, a section in which only one set of conveyance rollers conveys the document is reflected as skew in a part of the output image corresponding to the last half of conveyance. Here, the skew has a fan-like shape in which the difference between magnitudes of force received by the right and the left sides is reflected. - Therefore, as shown in
FIG. 10 , in the embodiment, an output image is obtained that is composed of a rectangular partial image obtained before the occurrence of accumulated skew and a fan-like partial image obtained after the occurrence of accumulated skew. - That is, when the thickness, the binding manner, or the like of a document is right-left asymmetric, the conveyance rollers being unable to apply right-left symmetric force. As a result, the right and the left sides of the document are conveyed at different speeds, which cause fan-like skew.
- Here, in the fan-like part, the longer arc represents the original conveyance speed, and the compressed, shorter arc represents a conveyance speed slower than the original one.
- Note that, because embossing or folding is often applied to a document evenly from one end thereof to the other, the fan-like part rotates evenly without any changes in rotation and in conveyance speed during the entire rotation.
- With reference back to
FIG. 3 , the accumulated-skew correcting unit 102 i acquires accumulated-skew-corrected image data by: assuming that a document rear-part image, which is an image rearward from the accumulated-skew occurrence position in the document conveyance direction, is a region surrounded by two circular sectors; correcting skew by geometrically transforming the arcs of the circular sectors to bring these arcs onto approximate straight lines in the document conveyance direction in such a manner as to elongate the shorter one of these arcs; and performing synthesizing with a document front-part image frontward from the accumulated-skew occurrence position (Step SA-13). - The accumulated-
skew correcting unit 102 i is thus capable of correcting accumulated skew while maintaining readability. - Here, with reference to
FIG. 11 andFIG. 12 , an example of the process of correcting accumulated skew in the embodiment will be explained.FIG. 11 is a diagram of an example of a document rear-part image in the embodiment.FIG. 12 is a diagram of an example of the process of correcting accumulated skew in the embodiment. - As shown in
FIG. 11 , in the embodiment, in a document image having accumulated skew detected therein, edges frontward from an accumulated-skew occurrence position can be assumed to be straight lines, edges rearward from the accumulated-skew occurrence position can be approximated by curved lines (the arcs of circular sectors). Therefore, skew may be corrected therein in such a manner that a current skewed shape in the document image is brought close to an ideal shape. - Here, as shown in
FIG. 11 , the ideal shape may be a rectangle obtained by connecting four intersections of: three approximate straight lines (solid lines inFIG. 11 ) obtained by extending the respective longest straight-line parts of three edge (at the upper end and the right and left ends) in the document image; and a straight line parallel to the approximate straight line at the upper end. - As shown in
FIG. 11 , the skewed shape may be approximated by a region bounded by two circular sectors having the same central angle and different radii. Here, the Hough transform may be used as a method for detecting an arc from within the document image. - The arcs of the two circular sectors (dotted curved lines in
FIG. 11 ) may be thus obtained by approximating edges rearward from the accumulated-skew occurrence position by a fan-like shape. - In addition, as shown in
FIG. 11 , the upper side (a dotted line inFIG. 11 ) of each of the circular sectors may be obtained by drawing, at the accumulated-skew occurrence position, a line parallel to an edge of the document image at the upper end thereof. The lower side (another dotted line inFIG. 11 ) of each of the circular sectors may be obtained by directly adopting another edge of the document image at the lower end thereof. - Subsequently, as shown in
FIG. 12 , in the embodiment, the skewed shape (a fan-like shape) in the last half of conveyance may be corrected into an ideal shape by being geometrically transformed into a rectangle. - Specifically, as shown in
FIG. 12 , on the right and the left arcs of the circular sectors, sets each consisting of two points on the respective arcs originally supposed to be on the same conveyance position may be found by obtaining the two points in each of the sets as points advanced by the same rate relative to the lengths of the respective arcs (for example, when the right arc is advanced by 1 dot, which corresponds to the rate of 1% of the length thereof, the left arc is advanced by 0.9 dot, which corresponds to the rate of 1% of the length thereof). - Subsequently, as shown in
FIG. 12 , pixels on a straight line connecting the right and the left points thus found are acquired, and then arranged horizontally side by side so as to follow the approximate straight line. Skew correction may be performed by repeating this process for all rows. - Alternatively, in the embodiment, a lens skew correction process may be employed in which skew correction is performed by extracting feature points from the document image and performing mapping between the ideal shape and the skewed shape.
- With reference back to
FIG. 3 , the image-outputtingunit 102 j causes the input/output unit 112 to display the accumulated-skew-corrected image data obtained by the accumulated-skew correcting unit 102 i (Step SA-14), and the processing is ended. - On the other hand, if the accumulated-
skew detecting unit 102 h has determined that the condition is not satisfied that the edge-based detected position and the content-based detected position have both been detected (No at Step SA-8), the processing is shifted to Step SA-15. - Subsequently, the accumulated-
skew detecting unit 102 h determines whether the condition is satisfied that, while the edge-based detected position has been detected, the content-based detected position has not been detected (Step SA-15). - Subsequently, if the accumulated-
skew detecting unit 102 h has determined that the condition is satisfied that, while the edge-based detected position has been detected, the content-based detected position has not been detected (Yes at Step SA-15), the processing is shifted to Step SA-16. - Subsequently, the accumulated-
skew detecting unit 102 h adopts the edge-based detected position as an accumulated-skew occurrence position (Step SA-16), and the processing is shifted to Step SA-13. - That is, in the embodiment, when, with a candidate edge-skew occurrence position being present, no content is present near that position, credence may be given to the candidate edge-skew occurrence position, so that the candidate edge-skew occurrence position can be adopted as an accumulated-skew occurrence position.
- Note that, in the embodiment, when no candidate content-skew occurrence position is present despite the presence of a candidate edge-skew occurrence position, the candidate edge-skew occurrence position may be adopted as an accumulated-skew occurrence position.
- On the other hand, if the accumulated-
skew detecting unit 102 h has determined that the condition is not satisfied that, while the edge-based detected position has been detected, the content-based detected position has not been detected (No at Step SA-15), the processing is shifted to Step SA-17. - Subsequently, the accumulated-
skew detecting unit 102 h determines whether the condition is satisfied that, while the edge-based detected position has not been detected, the content-based detected position has been detected (Step SA-17). - Subsequently, if the accumulated-
skew detecting unit 102 h has determined that the condition is not satisfied that, while the edge-based detected position has not been detected, the content-based detected position has been detected (No at Step SA-17), the processing is shifted to Step SA-10. - On the other hand, if the accumulated-
skew detecting unit 102 h has determined that the condition is satisfied that, while the edge-based detected position has not been detected, the content-based detected position has been detected (Yes at Step SA-17), the processing is shifted to Step SA-18. - Subsequently, the accumulated-
skew detecting unit 102 h adopts the content-based detected position as an accumulated-skew occurrence position (Step SA-18), and the processing is shifted to Step SA-13. - That is, in the embodiment, when no candidate edge-skew occurrence position is present despite the presence of a candidate content-skew occurrence position, the candidate content-skew occurrence position may be adopted as an accumulated-skew occurrence position.
- Here, with reference to
FIG. 13 toFIG. 17 , an example of the process of detecting accumulated skew in the embodiment will be explained.FIG. 13 toFIG. 17 are diagrams of the example of the process of detecting accumulated skew in the embodiment. - At the start, as shown in
FIG. 13 , four edges (that is, the shape of a document image) are detected from a document image (card image) corrected for front-end skew. In the embodiment, as the edges, edges detected in detection of the front-end skew may be used. - Subsequently, as shown in
FIG. 14 , each of the detected edges is approximated by one straight line, this approximate straight line is assumed to be a part of an ideal side supposed to have been obtained without the presence of skew. Here, in the embodiment, a straight line detected in detection of the front-end skew may be used as an approximate straight line. - Subsequently, as shown in
FIG. 14 , how distant the respective edges are from the approximate straight lines thereof is found, and, because there is an edge that gradually deviates from the approximate straight line thereof (that is, skews in the same direction) during conveyance after the occurrence of accumulated skew, it is then detected whether all of the edges are continuing to move in the same direction. - Subsequently, as shown in
FIG. 14 , a position at which an edge has started deviating from the approximate straight line thereof may be detected as a candidate edge-skew occurrence position. - Subsequently, as shown in
FIG. 15 , the inclination of each content (for example, any one, some, or all of a character string, a ruled line, and a photographic rectangle) may be detected. - Subsequently, as shown in
FIG. 16 , when the inclination of any content has been detected, it may be detected in the same manner as the edges whether the inclination of the content is continuing to change in the same direction (clockwise or counterclockwise) during conveyance after the occurrence of accumulated skew. - Subsequently, as shown in
FIG. 16 , this position may be detected as the candidate content-skew occurrence position. - Subsequently, as shown in
FIG. 17 , the presence or absence of a candidate edge-skew occurrence position and the presence or absence of a candidate content-skew occurrence position are found, so that, based the combination of the presence or absence of these positions, the occurrence of eventual accumulated skew and an accumulated-skew occurrence position may be detected. - Thus, in the embodiment, an accumulated-skew occurrence position may be highly accurately detected while erroneous detection is prevented with edges (the shape of a document image) and inclinations of contents (contents in a document) taken into account.
- Here, in the embodiment, when an accumulated-skew occurrence position is detected, the higher priority may be given to inclinations of contents because a document may have a rip or the like therein and sometimes result in a document image that is not a rectangle.
- In the embodiment, accumulated skew of a document image can be thus detected and corrected based only on the image.
- Here, in general, a document is conveyed straight in touch with a plurality of rollers part of the way, and tends to have conspicuous accumulated skew in the final phase of conveyance when it is conveyed only by the last roller.
- Therefore, in the embodiment, to detect accumulated skew from an image, a position at which accumulated skew has occurred is specified based on edges of a document image and an inclination of a content in the document image, and the presence or absence of accumulated skew and the shape thereof are detected.
- Note that, when accumulated skew occurs from start to finish because of age-related degradation of conveyance rollers, grime thereon, damage thereto, or the like, the entirety of a document image may be regarded as being in a state during the occurrence of accumulated skew.
- In this instance, the accumulated skew is caused by a situation in which the conveyance rollers are not able to apply force symmetrically in the right-to-left direction, and can be avoided by wiping out the grime or replacing the rollers.
- In addition, in the embodiment, when accumulated skew has been detected, correction may be performed in such a manner that: the edges are approximated by a rectangle and by circular sectors in parts read before and after the occurrence of skew, respectively; and a region rearward from an accumulated-skew occurrence position and bounded by the two circular sectors is assumed to be ideally rectangular.
- In a scanner apparatus that conveys documents, skew during the conveyance has conventionally been one of the major inconveniences.
- Such skew is what is called accumulated skew, which tends to occur during conveyance of a document that is conveyed by force exceeding the conveyance force of rollers or the like, or a document that has irregular thickness or shape (for example, an embossed card, or a pamphlet in the form of a booklet as it originally has been).
- There has further been an inconvenience such that, when hardware and a document the combined use of which causes accumulated skew are used in combination, a usable image is unavailable despite successful conveyance.
- Given this situation, various hardware-based solutions for these inconveniences have been attempted such as a structure less likely to cause accumulated skew, and a structure that detects accumulated skew and prompts retry.
- However, it has been difficult to completely solve these inconveniences, and it has been impossible to address other challenges such as application to smaller pieces of hardware and correction to images that have been already produced.
- Given this situation, the embodiment provides a method for correcting a read image so that the read image can appear as if no accumulated skew has occurred during conveyance.
- Other Embodiments
- The embodiment of the present disclosure has been explained so far. Besides the foregoing embodiment, the present disclosure can also be carried out in various different embodiments within the scope of the technical idea described in the claims.
- For example, the image-
processing apparatus 100 may perform processing in a standalone mode, or may perform processing according to a request from a client terminal (separate from the image-processing apparatus 100) and then return the results of the processing to the client terminal. - Out of the processes explained in relation to the embodiment, all or some of the processes explained as being automatically performed may be manually performed, or all or some of the processes explained as being manually performed may be automatically performed by publicly known methods.
- Besides, the process steps, the control steps, the specific names, the information including registered data for the processes or parameters such as search conditions, the screen examples, or the database configurations described or illustrated herein or the drawings can be appropriately changed if not otherwise specified.
- The constituent elements of the image-
processing apparatus 100 shown in the drawings are conceptual functions and do not necessarily need to be physically configured as shown in the drawings. - For example, all or any part of the processing functions included in the units of the image-
processing apparatus 100, in particular, the processing functions performed by thecontrol unit 102 may be implemented by the CPU or programs interpreted and executed by the CPU, or may be implemented by wired logic-based hardware. - The programs including programmed instructions for causing a computer to execute methods according to the present disclosure described later are recorded in non-transitory computer-readable recording media, and are mechanically read by the image-
processing apparatus 100 as necessary. Specifically, the computer programs for giving instructions to the CPU to perform various processes in cooperation with an operating system (OS) are recorded in thestorage unit 106 such as a ROM or a hard disk drive (HDD). The computer programs are loaded into the RAM and executed, and constitute a control unit in cooperation with the CPU. - The computer programs may be stored in an application program server connected to the image-
processing apparatus 100 via an appropriate network, and may be entirely or partly downloaded as necessary. - The programs according to the present disclosure may be stored in computer-readable recording media or may be formed as program products. The “recording media” include any portable physical media such as a memory card, a USB memory, an SD card, a flexible disc, a magneto optical disc (MO), a ROM, an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), a compact disc read only memory (CD-ROM), a DVD, and a Blu-ray (registered trademark) disc.
- The “programs” constitute data processing methods described in an appropriate language or by an appropriate describing method, and are not limited in format such as source code or binary code. The “programs” are not limited to singly-configured ones but may be distributed into a plurality of modules or libraries or may perform their functions in conjunction with another program typified by an OS. Specific configurations for reading the recording media by the units according to the embodiment, specific procedures for reading the programs, or specific procedures for installing the read programs may be well-known configurations or procedures.
- The various databases and others stored in the
storage unit 106 may be storage units such as any one, some, or all of a memory device such as a RAM or a ROM, a fixed disc device such as a hard disc, a flexible disc, and an optical disc, and may store any one, some, or all of various programs, tables, databases, and web page files for use in various processes and web site provision. - The image-
processing apparatus 100 may be an information processing apparatus such as a well-known personal computer, and an appropriate peripherals may be connected to the information processing apparatus. The image-processing apparatus 100 may be embodied by providing the information processing apparatus with software (including programs, data, and the like) for implementing the methods according to the present disclosure. - Further, the specific modes of distribution and integration of the devices are not limited to the ones illustrated in the drawings but all or some of the devices may be functionally or physically distributed or integrated by a predetermined unit according to various additions and the like or functional loads. That is, the foregoing embodiments may be carried out in any appropriate combination or may be selectively carried out.
- The present disclosure makes it possible to efficiently correct accumulated skew that is inclination of a document image that tends to occur when a document that needs conveyance force exceeding that of conveyance rollers or the like or a document that has irregular thickness or shape is conveyed, during the last half of conveyance of the document, depending on how force from the conveyance rollers is applied.
- According to the present disclosure, correction can be made to obtain the same result as if skew had been able to be prevented in a hardware-based manner. Further, according to the present disclosure, application to images read by existing pieces of hardware is possible, and there is no need for improvement of hardware.
- Therefore, the present disclosure makes it possible to provide a highly flexible method for correcting accumulated skew without any change in hardware such as providing a paper-feeding route of a certain size to forcibly prevent skew, or increasing the number of conveyance rollers to constantly have at least two rollers conveying a document to the end of the conveyance.
- That is, the present disclosure does not need design change in hardware that leads to increase in size of a conveyance device, restriction on sheet sizes, or the like, and therefore can correspond to images read by various kinds of hardware.
- Although the disclosure has been described on specific embodiments for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art that fairly fall within the basic teaching herein set forth.
Claims (18)
1. An image-processing apparatus comprising:
an image acquiring unit configured to acquire read image data of a read image read by an image-reading apparatus including a paper path;
an edge detecting unit configured to detect edges of a document image contained in the read image and acquires approximate straight lines by extending the longest straight-line parts of the respective edges;
an edge-skew detecting unit configured to detect, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other;
a content detecting unit configured to detect direction-identifying contents defined as contents usable for specifying directions within the document image;
a content-skew detecting unit configured to detect, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the conveyance direction;
an accumulated-skew detecting unit configured to detect an accumulated-skew occurrence position, based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position; and
an accumulated-skew correcting unit configured to acquire accumulated-skew-corrected image data by correcting skew in a document rear-part image located rearward from the accumulated-skew occurrence position in the conveyance direction.
2. The image-processing apparatus according to claim 1 ,
wherein the content-skew detecting unit detects, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a side of a rectangular graphic region, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the rectangular graphic region in the conveyance direction.
3. The image-processing apparatus according to claim 1 ,
wherein the content-skew detecting unit detects, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a ruled line, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the ruled line in the conveyance direction.
4. The image-processing apparatus according to claim 1 ,
wherein the content-skew detecting unit detects, as the candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and a character string, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the character string in the conveyance direction.
5. The image-processing apparatus according to claim 4 ,
wherein the content detecting unit detects an angle between the one of the approximate straight lines that is in the conveyance direction and the character string in the document image by: detecting the character string;
calculating areas of rectangles circumscribed to the character string while rotating the character string, the rectangles each being defined by line segments parallel to the one approximate straight line in the conveyance direction and horizontal line segments; and specifying a rotation angle corresponding to the smallest one of the areas.
6. The image-processing apparatus according to claim 4 ,
wherein the content detecting unit detects an angle between the one of the approximate straight lines that is in the conveyance direction and the character string in the document image by: detecting the character string;
performing optical character recognition on the character string while rotating the character string; and specifying a rotation angle at which accuracy of the character recognition is the highest.
7. The image-processing apparatus according to claim 1 ,
wherein, on conditions that the candidate edge-skew occurrence position and the candidate content-skew occurrence position have been detected and that the distance between the detected positions is equal to or less than a certain distance, the accumulated-skew detecting unit detects, as the accumulated-skew occurrence position, one of the candidate positions that is located rearward from the other in the conveyance direction.
8. The image-processing apparatus according to claim 1 ,
wherein, on conditions that the candidate edge-skew occurrence position has been detected by the edge-skew detecting unit and that the direction-identifying contents have not been detected by the content detecting unit, the accumulated-skew detecting unit detects the candidate edge-skew occurrence position as the accumulated-skew occurrence position.
9. The image-processing apparatus according to claim 1 ,
wherein, on conditions that the candidate edge-skew occurrence position has been detected by the edge-skew detecting unit and that the candidate content-skew occurrence position has not been detected by the content-skew detecting unit, the accumulated-skew detecting unit detects the candidate edge-skew occurrence position as the accumulated-skew occurrence position.
10. The image-processing apparatus according to claim 1 ,
wherein, on conditions that the candidate edge-skew occurrence position has not been detected by the edge-skew detecting unit and that the candidate content-skew occurrence position has been detected by the content-skew detecting unit, the accumulated-skew detecting unit detects the candidate content-skew occurrence position as the accumulated-skew occurrence position.
11. The image-processing apparatus according to claim 1 ,
wherein the accumulated-skew correcting unit acquires the accumulated-skew-corrected image data by: assuming that the document rear-part image is a region bounded by two circular sectors; and correcting skew by bringing the arcs of the circular sectors onto the approximate straight lines that are in the conveyance direction.
12. The image-processing apparatus according to claim 1 , further comprising:
a front-end skew detecting unit configured to detect front-end skew defined as an inclination of the document image with respect to the read image by detecting inclinations of all of the approximate straight lines with respect to the read image; and
a front-end skew correcting unit configured to correct, based on the front-end skew, the document image to erect the document image.
13. The image-processing apparatus according to claim 1 ,
wherein the accumulated-skew correcting unit acquires the accumulated-skew-corrected image data by: assuming that the document rear-part image is a region bounded by two circular sectors; and correcting skew by geometrically transforming the arcs of the circular sectors onto the approximate straight lines that are in the conveyance direction.
14. The image-processing apparatus according to claim 1 ,
wherein the accumulated-skew correcting unit acquires the accumulated-skew-corrected image data by: assuming that the document rear-part image is a region bounded by two circular sectors; and correcting skew by geometrically transforming the arcs of the circular sectors, in a manner that extends the shorter one of the arcs, onto the approximate straight lines that are in the conveyance direction.
15. The image-processing apparatus according to claim 1 ,
wherein the accumulated-skew correcting unit acquires the accumulated-skew-corrected image data by correcting skew by performing lens skew correction on the document rear-part image.
16. The image-processing apparatus according to claim 1 ,
wherein the content detecting unit extracts straight-line elements of the contents by a Hough transform.
17. An image-processing method comprising:
an image acquiring step of acquiring read image data of a read image read by an image-reading apparatus including a paper path;
an edge detecting step of detecting edges of a document image contained in the read image and acquiring approximate straight lines by extending the longest straight-line parts of the respective edges;
an edge-skew detecting step of detecting, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other;
a content detecting step of detecting direction-identifying contents defined as contents usable for specifying directions within the document image;
a content-skew detecting step of detecting, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the conveyance direction;
an accumulated-skew detecting step of detecting an accumulated-skew occurrence position, based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position; and
an accumulated-skew correcting step of acquiring accumulated-skew-corrected image data by correcting skew in a document rear-part image located rearward from the accumulated-skew occurrence position in the conveyance direction.
18. A computer program product having a non-transitory tangible computer readable medium including programmed instructions for causing, when executed by a computer,
the computer to perform an image-processing method comprising:
an image acquiring step of acquiring read image data of a read image read by an image-reading apparatus including a paper path;
an edge detecting step of detecting edges of a document image contained in the read image and acquiring approximate straight lines by extending the longest straight-line parts of the respective edges;
an edge-skew detecting step of detecting, as a candidate edge-skew occurrence position, on one of the approximate straight lines that is in a document conveyance direction, a position at which the one approximate straight line and an edge containing the longest straight-line part of the one approximate straight line start to separate from each other;
a content detecting step of detecting direction-identifying contents defined as contents usable for specifying directions within the document image;
a content-skew detecting step of detecting, as a candidate content-skew occurrence position, on the one of the approximate straight lines in the conveyance direction, a position at which a rear angle is larger than a front angle and at which the front angle first becomes equal to or more than a certain angle, the front angle being an angle between the one approximate straight line and each of the direction-identifying contents, the rear angle being an angle between the one approximate straight line and one of the direction-identifying contents that is located rearward from the each of the direction-identifying contents in the conveyance direction;
an accumulated-skew detecting step of detecting an accumulated-skew occurrence position, based on the candidate edge-skew occurrence position and the candidate content-skew occurrence position; and
an accumulated-skew correcting step of acquiring accumulated-skew-corrected image data by correcting skew in a document rear-part image located rearward from the accumulated-skew occurrence position in the conveyance direction.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016-121139 | 2016-06-17 | ||
JP2016121139A JP6200040B1 (en) | 2016-06-17 | 2016-06-17 | Image processing apparatus, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
US9848104B1 US9848104B1 (en) | 2017-12-19 |
US20170366705A1 true US20170366705A1 (en) | 2017-12-21 |
Family
ID=59895742
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/283,689 Active US9848104B1 (en) | 2016-06-17 | 2016-10-03 | Image-processing apparatus, method, and computer program product for correcting skew in scanned images |
Country Status (2)
Country | Link |
---|---|
US (1) | US9848104B1 (en) |
JP (1) | JP6200040B1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180176408A1 (en) * | 2016-12-19 | 2018-06-21 | Pfu Limited | Image processing apparatus, rectangle region detection method, and computer-readable, non-transitory medium |
US20200076976A1 (en) * | 2018-09-05 | 2020-03-05 | Seiko Epson Corporation | Reading apparatus and non-transitory computer-readable storage medium storing program |
US10757281B1 (en) | 2019-03-20 | 2020-08-25 | Pfu Limited | Image reading apparatus for executing image processing based on a reliability level according to a number of conveyance mechanisms clamping a medium |
US20200380657A1 (en) * | 2019-05-30 | 2020-12-03 | Kyocera Document Solutions Inc. | Image processing apparatus, non-transitory computer readable recording medium that records an image processing program, and image processing method |
US10970579B2 (en) | 2018-11-22 | 2021-04-06 | Pfu Limited | Image processing apparatus for placing a character recognition target region at a position of a predetermined region in an image conforming to a predetermined format |
US11295415B2 (en) * | 2016-08-17 | 2022-04-05 | Hewlett-Packard Development Company, L.P. | Image forming apparatus, scanned image correction method thereof, and non-transitory computer-readable recording medium |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10855865B2 (en) * | 2017-11-30 | 2020-12-01 | Ricoh Company, Ltd. | Reading device, image forming apparatus, position detecting method, and recording medium storing program code |
JP7047568B2 (en) * | 2018-04-23 | 2022-04-05 | セイコーエプソン株式会社 | Image processing device, image processing method and image processing program |
US10868940B2 (en) * | 2018-09-04 | 2020-12-15 | Toshiba Tec Kabushiki Kaisha | Duplex scanning content alignment |
JP7211238B2 (en) * | 2019-04-16 | 2023-01-24 | 株式会社リコー | Edge detection device, tilt correction device, reading device, image processing device, and edge detection method |
JP7206157B2 (en) * | 2019-05-31 | 2023-01-17 | 株式会社Pfu | Image reading device, control method and control program |
WO2024057498A1 (en) * | 2022-09-15 | 2024-03-21 | マクセル株式会社 | Text information display device and text information display method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5497236A (en) * | 1993-06-23 | 1996-03-05 | Ricoh Company Ltd. | Method and apparatus for distortion correction of scanned images |
US5781660A (en) * | 1994-07-28 | 1998-07-14 | Seiko Epson Corporation | Image processing method and apparatus |
US8270044B2 (en) * | 2006-10-26 | 2012-09-18 | Samsung Electronics Co., Ltd. | Scanning apparatus having image correction function |
US8861054B2 (en) * | 2011-09-08 | 2014-10-14 | Pfu Limited | Image processing apparatus, image processing method, computer readable medium and image processing system |
US20150256696A1 (en) * | 2014-03-05 | 2015-09-10 | Pfu Limited | Image-reading apparatus, image-reading method, program, and recording medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3311551B2 (en) | 1995-09-26 | 2002-08-05 | 日本電信電話株式会社 | Image data input processing method and apparatus |
JP3986059B2 (en) * | 2002-05-15 | 2007-10-03 | 株式会社リコー | Image correction apparatus, program, storage medium, and detection method of boundary point between straight line portion and curved portion of page outline |
JP4847378B2 (en) * | 2007-03-19 | 2011-12-28 | 株式会社リコー | Image processing apparatus, image processing method, program, and computer-readable recording medium |
JP2012253776A (en) * | 2011-06-06 | 2012-12-20 | Toshiba Corp | Image forming device and image processing program |
JP6099457B2 (en) * | 2013-03-28 | 2017-03-22 | 株式会社Pfu | Image processing apparatus, area determination method, and computer program |
CN104657730B (en) | 2013-11-20 | 2018-01-05 | 富士通株式会社 | Means for correcting, method and the scanner of file and picture |
JP6152821B2 (en) | 2014-03-31 | 2017-06-28 | ブラザー工業株式会社 | Image processing apparatus and computer program |
-
2016
- 2016-06-17 JP JP2016121139A patent/JP6200040B1/en active Active
- 2016-10-03 US US15/283,689 patent/US9848104B1/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5497236A (en) * | 1993-06-23 | 1996-03-05 | Ricoh Company Ltd. | Method and apparatus for distortion correction of scanned images |
US5781660A (en) * | 1994-07-28 | 1998-07-14 | Seiko Epson Corporation | Image processing method and apparatus |
US8270044B2 (en) * | 2006-10-26 | 2012-09-18 | Samsung Electronics Co., Ltd. | Scanning apparatus having image correction function |
US8861054B2 (en) * | 2011-09-08 | 2014-10-14 | Pfu Limited | Image processing apparatus, image processing method, computer readable medium and image processing system |
US20150256696A1 (en) * | 2014-03-05 | 2015-09-10 | Pfu Limited | Image-reading apparatus, image-reading method, program, and recording medium |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11295415B2 (en) * | 2016-08-17 | 2022-04-05 | Hewlett-Packard Development Company, L.P. | Image forming apparatus, scanned image correction method thereof, and non-transitory computer-readable recording medium |
US20180176408A1 (en) * | 2016-12-19 | 2018-06-21 | Pfu Limited | Image processing apparatus, rectangle region detection method, and computer-readable, non-transitory medium |
US10230867B2 (en) * | 2016-12-19 | 2019-03-12 | Pfu Limited | Image processing apparatus, rectangle region detection method, and computer-readable, non-transitory medium |
US20200076976A1 (en) * | 2018-09-05 | 2020-03-05 | Seiko Epson Corporation | Reading apparatus and non-transitory computer-readable storage medium storing program |
CN110881088A (en) * | 2018-09-05 | 2020-03-13 | 精工爱普生株式会社 | Storage medium and method for generating output image |
US10887488B2 (en) * | 2018-09-05 | 2021-01-05 | Seiko Epson Corporation | Reading apparatus and non-transitory computer-readable storage medium storing program for inclination correction of document image |
US10970579B2 (en) | 2018-11-22 | 2021-04-06 | Pfu Limited | Image processing apparatus for placing a character recognition target region at a position of a predetermined region in an image conforming to a predetermined format |
US10757281B1 (en) | 2019-03-20 | 2020-08-25 | Pfu Limited | Image reading apparatus for executing image processing based on a reliability level according to a number of conveyance mechanisms clamping a medium |
US20200380657A1 (en) * | 2019-05-30 | 2020-12-03 | Kyocera Document Solutions Inc. | Image processing apparatus, non-transitory computer readable recording medium that records an image processing program, and image processing method |
US11087448B2 (en) * | 2019-05-30 | 2021-08-10 | Kyocera Document Solutions Inc. | Apparatus, method, and non-transitory recording medium for a document fold determination based on the change point block detection |
Also Published As
Publication number | Publication date |
---|---|
JP6200040B1 (en) | 2017-09-20 |
US9848104B1 (en) | 2017-12-19 |
JP2017225090A (en) | 2017-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9848104B1 (en) | Image-processing apparatus, method, and computer program product for correcting skew in scanned images | |
JP5698396B1 (en) | Image reading apparatus, image reading method, and program | |
US9420137B2 (en) | Image-reading apparatus, image-processing method, and computer program product | |
US8139897B2 (en) | Detecting tilt in an image having different resolutions in different directions | |
US8027539B2 (en) | Method and apparatus for determining an orientation of a document including Korean characters | |
CN109845237B (en) | Image forming apparatus, scanned image correction method of image forming apparatus, and non-transitory computer-readable recording medium | |
US7965293B2 (en) | Image processing device, image processing method, and image processing program for reconstructing data | |
JP6330505B2 (en) | Image reading device | |
US9110926B1 (en) | Skew detection for vertical text | |
US8339623B2 (en) | Paper document processing apparatus, paper document processing method, and computer readable medium | |
US10115031B1 (en) | Detecting rectangular page and content boundaries from smartphone video stream | |
JP2018056783A (en) | Image reading device, image formation apparatus, image reading method and image reading program | |
US8731297B1 (en) | Processing a digital image of content to remove border artifacts | |
US11657632B2 (en) | Image processing device, image reading device, image processing method, and non-transitory computer readable medium, using two pieces of image data | |
JP5821994B2 (en) | Image processing apparatus, image forming apparatus, and program | |
US9400926B2 (en) | Image processing apparatus, image processing method, and non-transitory computer readable medium | |
JP7196474B2 (en) | reader and program | |
JP3604909B2 (en) | Image registration method | |
JP2009284190A (en) | Image reading apparatus and image reading system | |
JP6950237B2 (en) | Computer programs and image processing equipment | |
JPH11250179A (en) | Character reocognition device and its method | |
US10334132B2 (en) | Image reading device for rotating read image in accordance with orientation of face image, image forming apparatus, and image reading method | |
JP5006250B2 (en) | Image correction apparatus, image correction method, image correction program, and recording medium | |
JP2024073232A (en) | Image processing device, image processing method, and control program | |
JP2843638B2 (en) | Character image alignment method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: PFU LIMITED, JAPAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:WADA, TOMOAKI;REEL/FRAME:039922/0048 Effective date: 20160901 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 4 |