JP2010118769A - Image processor, image reader, image formation device, image processing method, computer program, and recording medium - Google Patents

Image processor, image reader, image formation device, image processing method, computer program, and recording medium Download PDF

Info

Publication number
JP2010118769A
JP2010118769A JP2008289009A JP2008289009A JP2010118769A JP 2010118769 A JP2010118769 A JP 2010118769A JP 2008289009 A JP2008289009 A JP 2008289009A JP 2008289009 A JP2008289009 A JP 2008289009A JP 2010118769 A JP2010118769 A JP 2010118769A
Authority
JP
Japan
Prior art keywords
document
image
inclination
tilt
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008289009A
Other languages
Japanese (ja)
Inventor
Hironori Umizu
大典 雨水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2008289009A priority Critical patent/JP2010118769A/en
Publication of JP2010118769A publication Critical patent/JP2010118769A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor capable of improving a processing speed to reduce a used amount of a memory for storing a document image therein when the tilt of a document is at a level requiring no correction, and to provide an image reader, an image formation device, an image processing method, a computer program and a recording medium with the computer program recorded therein. <P>SOLUTION: A document detection part 24 includes a tilt detection part 241 for detecting presence of the tilt of a document from digital signals (document image) of RGB. A document correction part 25 includes a tilt angle calculation part 251 for calculating the angle of the tilt of the document from the document image, and a correction part 252 for correcting the tilt of the document by rotating the document image by only an angle portion calculated by the tilt angle calculation part 251 when the tilt detection part 241 detects the presence of tilt. When the tilt detection part 241 detects presence (or absence) of tilt, an output selection part 253 outputs a document image output by the correction part 252 (or a memory 242) with the tilt corrected (or without correcting the tilt) to a subsequent stage. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、取得した原稿画像から原稿の傾きの量を算出する画像処理方法、画像処理装置、該画像処理装置を備える画像読取装置及び画像形成装置、並びに前記画像処理装置を実現するためのコンピュータプログラム及び該コンピュータプログラムを記録した記録媒体に関する。   The present invention relates to an image processing method for calculating an amount of document inclination from an acquired document image, an image processing apparatus, an image reading apparatus and an image forming apparatus provided with the image processing apparatus, and a computer for realizing the image processing apparatus. The present invention relates to a program and a recording medium on which the computer program is recorded.

複写機、複合機、スキャナ等で処理される原稿画像を画像データとして作成する場合、原稿を読み込むときに、原稿の傾きの補正、画像の整形、ノイズ除去等の画像処理がなされることが多い。これらの画像処理の中でも、原稿の傾きの補正は特に重要な処理として位置付けられており、その処理方法及び処理装置は、既に各種実現されている。   When an original image processed by a copier, multifunction device, scanner, or the like is created as image data, image processing such as correction of the inclination of the original, image shaping, and noise removal is often performed when the original is read. . Among these image processes, correction of document inclination is positioned as a particularly important process, and various processing methods and processing apparatuses have already been realized.

図10は、原稿画像に画像処理が施されて原稿の傾きが補正される様子を示す説明図である。例えば、特許文献1では、原稿画像から検出した原稿の頂点より原稿の傾きの角度を算出し、算出した角度分だけ原稿画像を回転させて原稿の傾きを補正している。   FIG. 10 is an explanatory diagram showing a state where image processing is performed on a document image to correct the inclination of the document. For example, in Japanese Patent Application Laid-Open No. 2004-133260, the inclination angle of a document is calculated from the vertex of the document detected from the document image, and the document image is rotated by the calculated angle to correct the document inclination.

また、特許文献1には、原稿台に載置された原稿を画像データとして読み取る場合、予め原稿の傾きの補正が必要と設定されているときにのみ、読み取った画像データから原稿の傾きの角度を算出して画像データを補正する技術が開示されている。これにより、予め原稿の傾きの補正が不要と設定されているときは、原稿の傾きの角度を算出せず傾きを補正することもないため、画像処理が高速に行われる。
特開平11−331547号公報
Further, in Patent Document 1, when a document placed on a document table is read as image data, the inclination angle of the document from the read image data is set only when the correction of the document tilt is set in advance. A technique for correcting image data by calculating the above is disclosed. As a result, when it is set in advance that correction of the inclination of the document is unnecessary, the inclination of the document is not calculated and the inclination is not corrected, so that image processing is performed at high speed.
JP-A-11-331547

しかしながら、特許文献1に開示された技術では、予め原稿の傾きの補正が必要と設定されている場合、原稿の傾きが補正を必要としない程度であるときにも傾きの角度が算出され、その後傾きの補正が行われるため、画像処理の処理速度が低下する上に、原稿画像を記憶するメモリが常に所定量必要とされる問題があった。この問題は、原稿台に載置された原稿を読み取って画像処理する場合、及び原稿搬送手段により搬送された原稿を読み取って画像処理する場合の何れにも共通するものである。   However, in the technique disclosed in Patent Document 1, when it is set in advance that correction of the inclination of the document is necessary, the inclination angle is calculated even when the inclination of the document does not require correction. Since the tilt correction is performed, the processing speed of the image processing is reduced, and there is a problem that a predetermined amount of memory for storing the document image is always required. This problem is common to both the case where the document placed on the platen is read and image processing is performed, and the case where the document conveyed by the document conveying means is read and image processing is performed.

本発明は斯かる事情に鑑みてなされたものであり、その目的とするところは、原稿の傾きの検出を段階的に行うことにより、原稿の傾きが補正を必要としない程度である場合に、処理速度を向上させ且つ原稿画像を記憶するメモリの使用量を低減することが可能な画像処理装置、画像読取装置、画像形成装置、画像処理方法、並びに前記画像処理装置を実現するためのコンピュータプログラム及び該コンピュータプログラムを記録した記録媒体を提供することにある。   The present invention has been made in view of such circumstances, and the object of the present invention is to detect the inclination of the document step by step so that the inclination of the document does not require correction. Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, and computer program for realizing the image processing apparatus capable of improving processing speed and reducing the amount of memory used to store a document image And providing a recording medium on which the computer program is recorded.

本発明に係る画像処理装置は、原稿が走査されて読み取られた原稿画像を取得する手段と、該手段が取得した原稿画像から前記走査の方向に対する原稿の傾きの量を算出する算出手段とを備える画像処理装置において、前記原稿画像から原稿の傾きの有無を検出する検出手段を備え、該検出手段が傾き無しを検出した場合、前記算出手段は、原稿の傾きの量を算出しないようにしてあることを特徴とする。   An image processing apparatus according to the present invention includes means for acquiring an original image read by scanning an original, and calculation means for calculating an amount of inclination of the original with respect to the scanning direction from the original image acquired by the means. The image processing apparatus includes a detecting unit that detects whether or not the document is tilted from the document image. When the detecting unit detects no tilt, the calculating unit does not calculate the amount of tilt of the document. It is characterized by being.

本発明に係る画像処理装置は、前記算出手段が算出した傾きの量に基づいて、前記原稿画像の原稿の傾きを補正する手段を備えることを特徴とする。   The image processing apparatus according to the present invention includes means for correcting the inclination of the original of the original image based on the amount of inclination calculated by the calculating means.

本発明に係る画像読取装置は、原稿に形成された画像を走査して読み取る手段と、該手段が読み取った原稿画像を取得する上述した発明の何れか1つに記載の画像処理装置とを備えることを特徴とする。   An image reading apparatus according to the present invention includes means for scanning and reading an image formed on a document, and the image processing apparatus according to any one of the above-described inventions for acquiring a document image read by the means. It is characterized by that.

本発明に係る画像形成装置は、上述した発明の何れか1つに記載の画像処理装置と、該画像処理装置で処理された原稿画像に基づいて出力画像を形成する画像形成手段とを備えることを特徴とする。   An image forming apparatus according to the present invention includes the image processing apparatus according to any one of the above-described inventions, and an image forming unit that forms an output image based on a document image processed by the image processing apparatus. It is characterized by.

本発明に係る画像処理方法は、原稿が走査されて読み取られた原稿画像を取得し、取得した原稿画像から前記走査の方向に対する原稿の傾きの量を算出ステップで算出する画像処理方法において、前記原稿画像から原稿の傾きの有無を検出するステップを含み、該ステップで傾き無しを検出した場合、前記算出ステップで原稿の傾きの量を算出しないようにしてあることを特徴とする。   The image processing method according to the present invention is an image processing method for acquiring a document image read by scanning a document, and calculating an inclination amount of the document with respect to the scanning direction from the acquired document image in a calculation step. The method includes a step of detecting whether or not the document is tilted from the document image, and when no tilt is detected in the step, the calculation step does not calculate the amount of tilt of the document.

本発明に係る画像処理方法は、前記算出ステップで算出した傾きの量に基づいて、前記原稿画像の原稿の傾きを補正するステップを含むことを特徴とする。   The image processing method according to the present invention includes a step of correcting the inclination of the original of the original image based on the amount of inclination calculated in the calculating step.

本発明に係るコンピュータプログラムは、画像データを取得して画像処理するコンピュータに、原稿が走査されて読み取られた原稿画像から前記走査の方向に対する原稿の傾きの量を算出ステップで算出させるコンピュータプログラムにおいて、コンピュータに、前記原稿画像から原稿の所定の指標を抽出させるステップと、該ステップで抽出させた指標の前記走査方向に対する偏差に基づいて原稿の傾きの有無を検出させるステップとを含み、該ステップで傾き無しを検出させた場合、前記算出ステップで原稿の傾きの量を算出させないようにしてあることを特徴とする。   A computer program according to the present invention is a computer program that causes a computer that acquires image data and performs image processing to calculate an amount of inclination of an original with respect to the scanning direction from an original image scanned and read in a calculation step. A step of causing a computer to extract a predetermined index of the document from the document image, and a step of detecting whether or not the document is tilted based on a deviation of the index extracted in the step with respect to the scanning direction. When no inclination is detected in step 1, the amount of document inclination is not calculated in the calculation step.

本発明に係るコンピュータプログラムは、コンピュータに、前記算出ステップで算出させた傾きの量に基づいて、前記原稿画像の原稿の傾きを補正させるステップを含むことを特徴とする。   The computer program according to the present invention includes a step of causing the computer to correct the inclination of the original of the original image based on the amount of inclination calculated in the calculating step.

本発明に係る記録媒体は、上述した発明の何れか1つに記載のコンピュータプログラムを記録してあることを特徴とする。   A recording medium according to the present invention records the computer program according to any one of the above-described inventions.

本発明にあっては、原稿の傾きの量の算出と傾きの有無の検出とを並列的に行い、原稿画像の一部から原稿の傾き無しを検出したときは、原稿の傾きの量の算出を行わない。
これにより、原稿画像の一部から原稿の傾き無しを先に検出したときは、原稿画像全体から傾きの量を算出したときより画像処理が高速化されると共に、原稿画像の一部をメモリに記憶するだけで済む。また、例えば原稿送り装置から連続して送給された複数枚の原稿の原稿画像を取得して画像処理する場合、原稿の傾きが発生する割合が少ないため、画像処理が際だって高速化される。
In the present invention, calculation of the amount of inclination of the document and detection of the presence / absence of the inclination are performed in parallel, and when no inclination of the document is detected from a part of the document image, the amount of inclination of the document is calculated. Do not do.
As a result, when no inclination of the original is first detected from a part of the original image, the image processing is faster than when the amount of inclination is calculated from the entire original image, and a part of the original image is stored in the memory. Just remember. Also, for example, when document images of a plurality of documents fed continuously from a document feeder are acquired and image processing is performed, image processing is significantly speeded up because the rate of document tilt is small. .

本発明にあっては、算出した傾きの量に基づいて原稿画像の原稿の傾きを補正するため、原稿の傾き有りと検出したときは、高精度に算出した傾きの量に基づいて原稿の傾きを補正する。   In the present invention, since the inclination of the original of the original image is corrected based on the calculated amount of inclination, when it is detected that the original is inclined, the inclination of the original is determined based on the amount of inclination calculated with high accuracy. Correct.

本発明にあっては、原稿に形成された画像を走査して読み取った原稿画像について、上述した発明に係る画像処理装置で画像処理を行う。
これにより、画像の読取処理が全体的に高速化される。
In the present invention, image processing is performed on the document image obtained by scanning and reading the image formed on the document by the image processing apparatus according to the above-described invention.
This speeds up the overall image reading process.

本発明にあっては、上述した発明に係る画像処理装置で処理された原稿画像に基づいて出力画像を形成する。
これにより、画像処理が高速化された画像処理装置が、プリンタ装置、デジタル複合機等に適用される。
In the present invention, an output image is formed based on a document image processed by the image processing apparatus according to the above-described invention.
As a result, the image processing apparatus with high-speed image processing is applied to a printer device, a digital multi-function peripheral, and the like.

本発明にあっては、記録媒体から読み出されたコンピュータプログラムによって、上述した画像処理装置の各手段が実現される。   In the present invention, each unit of the image processing apparatus described above is realized by a computer program read from a recording medium.

本発明によれば、原稿の傾きの量の算出と傾きの有無の検出とを並列的に行う。
これにより、原稿画像の一部から原稿の傾き無しを先に検出したときは、原稿画像全体から傾きの量を算出したときより画像処理が高速化される。従って、原稿の傾きが補正を必要としない程度である場合に、処理速度を向上させることが可能となる。
According to the present invention, calculation of the amount of inclination of the document and detection of the presence or absence of inclination are performed in parallel.
As a result, when it is first detected that there is no document skew from a part of the document image, the image processing is faster than when the amount of tilt is calculated from the entire document image. Therefore, the processing speed can be improved when the inclination of the document is such that no correction is required.

以下、本発明に係る画像処理装置及び画像形成装置をコピア、プリンタ、ファクシミリ、scan to e-mail等の機能を備えるデジタルカラー複合機に、また、本発明に係る画像処理装置をカラー画像読取装置に夫々適用した実施の形態について詳述する。
(実施の形態1)
図1は、本発明の実施の形態1に係るデジタルカラー複合機100の構成を示すブロック図である。図中100はデジタルカラー複合機であり、デジタルカラー複合機100は、CCD(Charge Coupled Device)ラインセンサを有しており原稿からの反射光を読み取ることにより得られたRGB(R:赤,G:緑,B:青)のアナログ信号を原稿画像として出力する画像入力装置5、及び前記アナログ信号を取得してCMYK(C:シアン,M:マゼンタ,Y:イエロー,K:黒)のデジタルカラー信号を出力する画像処理装置2を備える。
The image processing apparatus and the image forming apparatus according to the present invention will be described below as a digital color multifunction peripheral having functions such as a copier, printer, facsimile, scan to e-mail, and the image processing apparatus according to the present invention as a color image reading apparatus. Embodiments applied respectively to will be described in detail.
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of a digital color multifunction peripheral 100 according to Embodiment 1 of the present invention. In the figure, reference numeral 100 denotes a digital color multifunction peripheral. The digital color multifunction peripheral 100 has a CCD (Charge Coupled Device) line sensor, and RGB (R: red, G) obtained by reading reflected light from a document. : Green, B: blue) image input device 5 that outputs an analog signal as an original image, and CMYK (C: cyan, M: magenta, Y: yellow, K: black) digital color obtained by acquiring the analog signal. An image processing apparatus 2 that outputs a signal is provided.

デジタルカラー複合機100は、また、画像処理装置2から与えられたデジタルカラー信号に基づいて写真方式、インクジェット方式等の出力方式により記録紙上に出力画像を形成する画像出力装置3、及びLCD(Liquid Crystal Display)と各種キーとからなり上述した各装置についての操作を受け付けるための操作パネル6を備える。   The digital color multifunction peripheral 100 also includes an image output device 3 that forms an output image on a recording sheet by an output method such as a photographic method or an ink jet method based on a digital color signal given from the image processing device 2, and an LCD (Liquid An operation panel 6 is provided which includes a crystal display) and various keys and receives operations on the above-described devices.

画像処理装置2は、画像入力装置5から入力されたアナログの原稿画像をデジタルの原稿画像に変換するA/D変換部20と、A/D変換部20から出力されたRGBのデジタル信号から、画像入力装置5の照明系、結像系及び撮像系で生じる各種の歪を除去するシェーディング補正部21と、階調補正(以下、ガンマ補正という)を行うための入力処理部22とを備える。入力処理部22から出力されたRGBのデジタル信号(原稿画像)は、一旦ハードディスク等の大容量記憶装置を有する送受信部/記憶部23へ/から記憶/読み出しが行われ、原稿検知部24を介し原稿補正部25へ与えられて原稿画像の傾きが補正されるようになっている。   The image processing device 2 includes an A / D conversion unit 20 that converts an analog document image input from the image input device 5 into a digital document image, and an RGB digital signal output from the A / D conversion unit 20. The image input apparatus 5 includes a shading correction unit 21 that removes various distortions generated in the illumination system, the imaging system, and the imaging system, and an input processing unit 22 that performs gradation correction (hereinafter referred to as gamma correction). The RGB digital signal (original image) output from the input processing unit 22 is temporarily stored / read out to / from a transmission / reception unit / storage unit 23 having a large-capacity storage device such as a hard disk, and the original detection unit 24 is used. The inclination of the document image is corrected by being supplied to the document correction unit 25.

画像処理装置2は、また、原稿補正部25が出力したRGBのデジタル信号をRGBの補色に対応するCMY信号に変換すると共に色再現性を高める処理を行う色補正部27、及び色補正部27が出力したCMY信号に基づいてCMYKのデジタルカラー信号を生成する黒生成/下色除去部28を備える。黒生成/下色除去部28が出力するCMYKのデジタルカラー信号は、空間フィルタ部29で強調処理及び平滑化処理が行われた後に、階調再現処理が行われる中間調生成部30を介して画像出力装置3に与えられる。   The image processing apparatus 2 also converts the RGB digital signal output from the document correction unit 25 into a CMY signal corresponding to RGB complementary colors and performs a process for improving color reproducibility, and a color correction unit 27. Is provided with a black generation / undercolor removal unit 28 that generates a CMYK digital color signal based on the CMY signal output from the. The CMYK digital color signal output from the black generation / undercolor removal unit 28 is subjected to enhancement processing and smoothing processing in the spatial filter unit 29 and then to a halftone generation unit 30 in which gradation reproduction processing is performed. This is given to the image output device 3.

原稿補正部25が出力したRGBのデジタル信号は、また、領域分離部31に与えられる。領域分離部31は、前記デジタル信号に含まれる各画素が、黒文字、色文字、網点、印画紙写真(連続階調領域)等の領域のうち、どの領域に属しているかを示す領域識別信号を生成して黒生成/下色除去部28、空間フィルタ部29、及び中間調生成部30に与える。
尚、上述した画像処理装置2の各部は、CPU401、プログラム等の情報を記憶するROM402及び一時的に発生した情報を記憶するRAM403からなる制御部40と接続されており、制御部40のCPU401が、ROM402に予め格納されている制御プログラムに従って、これら各部の動作を制御するようにしてある。制御部40は、ASIC(Application Specific Integrated Circuit)又はDSP(Digital Signal Processor)で構成するようにしてもよい。
The RGB digital signals output from the document correction unit 25 are also supplied to the region separation unit 31. The area separation unit 31 is an area identification signal that indicates which area each pixel included in the digital signal belongs to among areas such as black characters, color characters, halftone dots, and photographic paper photographs (continuous tone areas). And is supplied to the black generation / undercolor removal unit 28, the spatial filter unit 29, and the halftone generation unit 30.
Each unit of the image processing apparatus 2 described above is connected to a control unit 40 including a CPU 401, a ROM 402 that stores information such as a program, and a RAM 403 that stores temporarily generated information. The operation of each unit is controlled according to a control program stored in the ROM 402 in advance. The control unit 40 may be configured by an application specific integrated circuit (ASIC) or a digital signal processor (DSP).

原稿補正部25が出力したRGBのデジタル信号は、上述したように色補正部27及び領域分離部31に与えられる他、PDFフォーマットに変換され、ネットワークインタフェース及び通信回線インタフェース(何れも図示せず)を介して外部接続装置及び通信回線へ夫々送信される。前記デジタル信号は、また、JPEG圧縮アルゴリズムに基づいてJPEGコードに圧縮し、送受信部/記憶部23にファイリングデータとして保存して管理するようにしてもよい。   The RGB digital signal output from the document correction unit 25 is supplied to the color correction unit 27 and the region separation unit 31 as described above, and is also converted into the PDF format, and a network interface and a communication line interface (both not shown). To the external connection device and the communication line, respectively. The digital signal may also be compressed into a JPEG code based on a JPEG compression algorithm, stored in the transmission / reception unit / storage unit 23 as filing data, and managed.

保存されたデータについて、コピー出力及びプリント出力が指示されたときは、送受信部/記憶部23の大容量記憶装置から目的のJPEGコードが読み出され、図示しないJPEG伸張部に与えられて複合化され、元のRGBのデジタル信号に変換される。
一方、イメージ送信が指示されたときは、送受信部/記憶部23の大容量記憶装置から目的のJPEGコードが読み出され、ネットワークインタフェース及び通信回線インタフェースを介して外部接続装置及び通信回線へ夫々送信される。
When copy output and print output are instructed for the stored data, the target JPEG code is read from the large-capacity storage device of the transmission / reception unit / storage unit 23 and is given to a JPEG decompression unit (not shown) to be combined. And converted into the original RGB digital signal.
On the other hand, when an image transmission is instructed, the target JPEG code is read from the mass storage device of the transmission / reception unit / storage unit 23 and transmitted to the external connection device and the communication line via the network interface and the communication line interface, respectively. Is done.

図2は、画像入力装置5の構成を示す模式的な正面断面図である。画像入力装置5は、上部筐体に構成される原稿搬送部51及び下部筐体に構成されるスキャナ部56からなる。   FIG. 2 is a schematic front sectional view showing the configuration of the image input device 5. The image input device 5 includes a document conveying unit 51 configured in an upper casing and a scanner unit 56 configured in a lower casing.

原稿搬送部51は、一側方から他側方に傾斜して配された原稿トレイ511にフェイスダウンで載置された原稿の検知を行う原稿セットセンサ514を備える。原稿トレイ511の下端部の上方には、原稿セットセンサ514に検知された原稿を1枚ずつ下流側へ呼び込むための呼込ローラ512が配されている。原稿トレイ511の下流側には、ガイドによって形成された搬送路Sを有し、該搬送路Sの上端部及び中間部には、後述する原稿台561の他端部の読取位置Rまで原稿を搬送するための搬送ローラ513a,513bが夫々配設されている。読取位置Rの他側方には、読み取った原稿の排出を行う原稿排出ローラ50、及び排出された原稿を検知する原稿排出センサ567が配されている。   The document transport unit 51 includes a document set sensor 514 that detects a document placed face down on a document tray 511 that is inclined from one side to the other. Above the lower end portion of the document tray 511, an attracting roller 512 is disposed for bringing the documents detected by the document setting sensor 514 one by one downstream. A conveyance path S formed by a guide is provided on the downstream side of the document tray 511, and a document is placed on the upper end and the middle of the conveyance path S up to a reading position R at the other end of the document table 561 described later. Conveying rollers 513a and 513b for conveying are respectively provided. On the other side of the reading position R, a document discharge roller 50 that discharges the read document and a document discharge sensor 567 that detects the discharged document are arranged.

搬送ローラ(整合ローラ)513bは、駆動軸に電磁クラッチ(図示せず)を有しており、駆動モータ(図示せず)による回転駆動力の伝達が制御されるようになっている。原稿が原稿トレイ511に載置されていない場合、搬送ローラ513bの駆動軸は、前記電磁クラッチにより拘束されて停止している。   The conveyance roller (alignment roller) 513b has an electromagnetic clutch (not shown) on the drive shaft, and the transmission of rotational driving force by a drive motor (not shown) is controlled. When the document is not placed on the document tray 511, the drive shaft of the transport roller 513b is restrained and stopped by the electromagnetic clutch.

原稿が原稿トレイ511に載置され、下流側へ搬送された原稿の先端部が、搬送ローラ513a及び搬送ローラ513bの間に配された給送タイミングセンサ515に接触し、該タイミングセンサ515が所定の信号を発した場合、前記電磁クラッチに内蔵された電磁石の励磁状態が所定のタイミングで切り替わる。これにより、搬送ローラ513bは、駆動軸の拘束が解除され、原稿を下流側へ搬送する方向への回転を開始する。この時、上流側から搬送された原稿の先端部は、既に搬送ローラ513bのニップ部に到達しており、搬送ローラ513bのニップ部は、原稿に所定の撓みを形成した後に原稿の先端部が搬送方向と略直角となるように整合させて下流側へ搬送するように動作する。   A document is placed on the document tray 511, and the leading edge of the document conveyed downstream contacts a feeding timing sensor 515 disposed between the conveyance roller 513a and the conveyance roller 513b. When the signal is issued, the excitation state of the electromagnet built in the electromagnetic clutch is switched at a predetermined timing. As a result, the transport roller 513b releases the restraint of the drive shaft and starts to rotate in the direction of transporting the document downstream. At this time, the leading end portion of the document conveyed from the upstream side has already reached the nip portion of the conveying roller 513b, and the nip portion of the conveying roller 513b is formed so that the leading end portion of the document is formed after a predetermined deflection is formed on the document. It operates so as to be transported to the downstream side with being aligned so as to be substantially perpendicular to the transport direction.

スキャナ部56は、原稿を水平に載置する載置台561の下面に沿って、原稿を読み取りながら両側方に平行移動する走査ユニット562,563を備える。走査ユニット563の一側方には、走査ユニット562が原稿を読み取った光を収束させるための結像レンズ564が立設されており、該結像レンズ564が収束させた光は、CCDラインセンサ565上に結像するようにしてある。スキャナ部56の他方の側部には、上述した搬送路Sから搬送され読取位置Rで読み取られて排出された原稿をフェイスダウンで載置するトレイ566が突設されている。   The scanner unit 56 includes scanning units 562 and 563 that translate in parallel to both sides while reading a document along the lower surface of the mounting table 561 for placing the document horizontally. On one side of the scanning unit 563, an imaging lens 564 is provided for converging the light read by the scanning unit 562. The light converged by the imaging lens 564 is a CCD line sensor. An image is formed on 565. On the other side of the scanner unit 56, a tray 566 is provided so as to project the document transported from the transport path S described above, read at the reading position R and discharged, face-down.

走査ユニット562は、原稿トレイ511から搬送された原稿及び原稿台561に載置された原稿に光を照射するための、例えばハロゲンランプからなる光源562aを有し、原稿からの反射光をミラー562aが他側方へ反射するようにしてある。走査ユニット563は、走査ユニット562のミラー562aが反射した光を下方及び一側方へ夫々反射するミラー563a及び563bを有し、ミラー563bが反射した光は、結像レンズ564を介してCCDラインセンサ565上に原稿像として結像するようになっている。CCDラインセンサ565は、結像した原稿像を光電変換してRGBのアナログ信号を生成する。   The scanning unit 562 includes a light source 562a composed of, for example, a halogen lamp for irradiating light on the original conveyed from the original tray 511 and the original placed on the original table 561, and reflects light reflected from the original in the mirror 562a. Is reflected to the other side. The scanning unit 563 includes mirrors 563a and 563b that reflect light reflected by the mirror 562a of the scanning unit 562 downward and to one side, respectively, and the light reflected by the mirror 563b passes through the imaging lens 564 to the CCD line. An image is formed on the sensor 565 as a document image. The CCD line sensor 565 photoelectrically converts the formed original image to generate RGB analog signals.

上述のように構成される画像入力装置5は、原稿を静止させて読み取る静止読取モード、及び原稿を搬送させながら読み取る走行読取モードの2種類のモードで動作させることが可能である。静止読取モードは、原稿台561に載置されている場合、例えば操作パネル6の図示しないスタートキーが押下されたときに走査ユニット562,563を他側方へ走査させて原稿からの反射光を読み取るモードである。また、走行読取モードは、原稿トレイ511に原稿が載置されて原稿セットセンサ514が原稿を検出している場合、前記スタートキーを押下したときに原稿を呼込ローラ512及び搬送ローラ513a,513bで1枚ずつ給送して読取位置Rにおける原稿からの反射光を読み取るモードである。   The image input device 5 configured as described above can be operated in two types of modes: a stationary reading mode in which a document is read while being read, and a traveling reading mode in which the document is read while being conveyed. In the stationary reading mode, when the document is placed on the document table 561, for example, when a start key (not shown) on the operation panel 6 is pressed, the scanning units 562 and 563 are scanned to the other side to reflect the reflected light from the document. It is a reading mode. In the travel reading mode, when a document is placed on the document tray 511 and the document set sensor 514 detects the document, the document is brought in when the start key is pressed, and the feeding roller 512 and the transport rollers 513a and 513b. In this mode, the reflected light from the document at the reading position R is read one sheet at a time.

図3は、原稿検知部24及び原稿補正部25の機能構成を示すブロック部である。原稿検知部24は、入力処理部22から与えられたRGBのデジタル信号(原稿画像)から原稿の傾きの有無を検出する傾き検出部241、及び原稿画像を1ページ分記憶するメモリ242を備える。また、原稿補正部25は、原稿検知部24を介して与えられた原稿画像から原稿の傾きの角度を算出する傾き角算出部251と、傾き検出部241が傾き有りを検出した場合に、メモリ242から与えられた原稿画像を傾き角算出部251が算出した角度分だけ回転させて原稿の傾きを補正する補正部252と、該補正部252及びメモリ242から夫々与えられた原稿画像を選択的に切り替えて後段へRGBのデジタル信号(原稿画像)として出力する出力選択部253とを備える。   FIG. 3 is a block diagram showing functional configurations of the document detection unit 24 and the document correction unit 25. The document detection unit 24 includes an inclination detection unit 241 that detects the presence or absence of the document from the RGB digital signal (document image) given from the input processing unit 22, and a memory 242 that stores the document image for one page. In addition, the document correction unit 25 stores the memory when the tilt angle calculation unit 251 that calculates the tilt angle of the document from the document image supplied via the document detection unit 24 and the tilt detection unit 241 detect the presence of tilt. A correction unit 252 that corrects the inclination of the original by rotating the original image supplied from 242 by the angle calculated by the inclination angle calculation unit 251, and selectively selects the original image supplied from the correction unit 252 and the memory 242. And an output selection unit 253 that outputs to the subsequent stage as RGB digital signals (original images).

傾き検出部241は、与えられた原稿画像が走査されたときの主走査方向の走査線に対応するライン毎に原稿端(エッジ)を検出し、左右の原稿端の間に存在する画素数のライン間の偏差に基づいて傾きの有無を検出し、検出結果を傾き角算出部251、補正部252及び出力選択部253に与える。傾き検出部241は、また、各ラインの原稿の画素が原稿検知部24に与えられている期間を示す原稿画素信号を傾き角算出部251に与える。
メモリ242は、補正部252及び出力選択部253が夫々必要とするタイミングで1ページ分の原稿画像を読み出して夫々出力する。
The inclination detection unit 241 detects the document edge (edge) for each line corresponding to the scanning line in the main scanning direction when a given document image is scanned, and determines the number of pixels existing between the left and right document edges. The presence or absence of inclination is detected based on the deviation between the lines, and the detection result is given to the inclination angle calculation unit 251, the correction unit 252 and the output selection unit 253. The inclination detection unit 241 also supplies an original pixel signal indicating a period during which the original pixels of each line are supplied to the original detection unit 24 to the inclination angle calculation unit 251.
The memory 242 reads and outputs one page of document images at timings required by the correction unit 252 and the output selection unit 253, respectively.

傾き角算出部251は、傾き検出部241が検出を開始すると同時に算出を開始し、傾き検出部241が傾き無しを検出した時に算出を中止するようにしてある。
出力選択部253は、傾き検出部241が傾き有り(又は無し)を検出した場合、補正部252(又はメモリ242)が出力する傾きが補正された(又は補正されていない)原稿画像を後段へ出力する。この場合、出力選択部253は、補正部252が傾きの補正を終えた後(又は傾き検出部241が傾き無しを検出した後)に出力を開始すればよい。
The inclination angle calculation unit 251 starts calculation at the same time when the inclination detection unit 241 starts detection, and stops calculation when the inclination detection unit 241 detects no inclination.
The output selection unit 253, when the tilt detection unit 241 detects that there is a tilt (or no), the document image with the tilt corrected (or not corrected) output from the correction unit 252 (or the memory 242) to the subsequent stage. Output. In this case, the output selection unit 253 may start output after the correction unit 252 finishes correcting the inclination (or after the inclination detection unit 241 detects no inclination).

補正部252は、以下の式(1)に示すアフィン変換によって原稿画像の原稿の傾きを補正する。アフィン変換では、傾きの角度(θ)に対する余弦(cosθ)及び正弦(sinθ)が与えられたときに、座標(x,y)を座標(x´,y´)に変換することができる。
尚、式(1)では、原稿の1つの頂点の座標を(x0,y0)とし、該頂点が変換後に原点となるようにしてある。
The correction unit 252 corrects the inclination of the original of the original image by affine transformation expressed by the following equation (1). In the affine transformation, when a cosine (cos θ) and a sine (sin θ) with respect to an inclination angle (θ) are given, the coordinates (x, y) can be converted into coordinates (x ′, y ′).
In equation (1), the coordinates of one vertex of the document are (x0, y0), and the vertex becomes the origin after conversion.

Figure 2010118769
Figure 2010118769

図4は、原稿の傾きの角度に対する余弦及び正弦を算出する方法を示す説明図である。図中横軸は原稿画像においた座標の原点(0,0)から主走査方向に離隔する距離(x)を表し、縦軸は主走査方向に直交する副走査方向に原点(0,0)から離隔する距離を表す。   FIG. 4 is an explanatory diagram showing a method for calculating the cosine and sine with respect to the angle of inclination of the document. In the figure, the horizontal axis represents the distance (x) separated from the origin (0, 0) of the coordinates in the document image in the main scanning direction, and the vertical axis represents the origin (0, 0) in the sub-scanning direction orthogonal to the main scanning direction. Represents the distance away from.

先ず、原稿が有する4つの頂点について原点(0,0)からの距離を夫々算出し、原点(0,0)に最も近い頂点の座標をP0(x0,y0)、原点(0,0)から最も遠い頂点を除く他の2つの頂点を夫々P1(x1,y1)及びP2(x2,y2)とする。また、x軸と線分P0P1、及びy軸と線分P0P2がなす角度を夫々θ1及びθ2とする。このとき、θ1及びθ2に対する夫々の余弦及び正弦を以下の式(2)〜(5)により求めることができる。   First, the distance from the origin (0, 0) is calculated for each of the four vertices of the document, and the coordinates of the vertex closest to the origin (0, 0) are determined from P0 (x0, y0) and the origin (0, 0). Let the other two vertices except the farthest vertex be P1 (x1, y1) and P2 (x2, y2), respectively. In addition, the angles formed by the x-axis and the line segment P0P1 and the y-axis and the line segment P0P2 are θ1 and θ2, respectively. At this time, the respective cosine and sine for θ1 and θ2 can be obtained by the following equations (2) to (5).

Figure 2010118769
Figure 2010118769

次いで、2つの角度θ1及びθ2から、傾きの補正の対象となる角度を選択する。ここでは、小さい方の角度を選択するものとする。つまり、cosθ1とcosθ2との大小を比較し、大きい方の余弦に対応する角度(θ1又はθ2)が、傾きの補正の対象となる角度であると判定する。   Next, an angle to be corrected for tilt is selected from the two angles θ1 and θ2. Here, the smaller angle is selected. That is, the magnitudes of cos θ1 and cos θ2 are compared, and it is determined that the angle corresponding to the larger cosine (θ1 or θ2) is an angle to be corrected for inclination.

図5は、傾き検出部241において原稿の傾きの有無を検出するCPU401の処理手順を示すメインルーチンのフローチャートである。以下の処理は、ROM402に予め格納されている制御プログラムに従って、原稿画像1ページ分の取得を開始する都度実行される。本処理では、入力処理部22から与えられた原稿画像のライン毎に前ラインとの原稿幅の偏差を算出し、該偏差が所定の閾値より大きいときに原稿の傾き有りを検出する。
尚、CPU401が実行する処理を、上述したASIC等の専用ハードウエア若しくはDSP、又はこれらの組み合わせによって実行するようにしてもよい。
FIG. 5 is a flowchart of a main routine showing a processing procedure of the CPU 401 for detecting whether or not the document is tilted in the tilt detecting unit 241. The following processing is executed each time acquisition of one page of a document image is started in accordance with a control program stored in the ROM 402 in advance. In this process, the deviation of the document width with respect to the previous line is calculated for each line of the document image given from the input processing unit 22, and when the deviation is larger than a predetermined threshold, the presence of document inclination is detected.
Note that the processing executed by the CPU 401 may be executed by dedicated hardware such as the above-described ASIC, a DSP, or a combination thereof.

尚、傾きの有無の検出は本処理に限定するものではなく、原稿画像の一部を用いて原稿の傾きの角度の検出よりも高速に処理できるものであればよい。
また、「増分閾値」、「判定ライン数」及び「最終ライン」は、原稿が画像入力装置5で読み取られたときの解像度等に基づいて、予めRAM403に夫々設定されるものとする。「ラインカウンタ」、「有効ライン数」、「前ライン原稿幅」、「傾斜フラグ」及び「原稿幅」は、RAM403に夫々記憶される変数である。
The detection of the presence / absence of tilt is not limited to this process, and any process that can process at a higher speed than the detection of the tilt angle of the document using a part of the document image may be used.
The “increment threshold value”, “number of determination lines”, and “final line” are set in advance in the RAM 403 based on the resolution when the document is read by the image input device 5, respectively. “Line counter”, “Number of effective lines”, “Previous line document width”, “Tilt flag”, and “Document width” are variables stored in the RAM 403, respectively.

CPU401は、原稿画像1ページ分の処理を開始するに際し、初期化処理を行い(ステップS11)、処理中のラインの番号を示す「ラインカウンタ」に「0」を、原稿が存在するラインの数を示す「有効ライン数」に「0」を、1つ前のラインの原稿幅を記憶する「前ライン原稿幅」に「0」を、検出対象の原稿画像の原稿の傾き有りを示す「傾斜フラグ」に「1」を夫々書き込む。そして、CPU401は、原稿幅算出に係るサブルーチンを呼び出して実行する(ステップS12)。   When starting processing for one page of the document image, the CPU 401 performs initialization processing (step S11), sets “0” in the “line counter” indicating the number of the line being processed, and the number of lines on which the document exists. “0” is stored in the “number of effective lines” indicating “1”, “0” is stored in the “prior line original width” that stores the original width of the previous line, and “inclination” indicates that the original of the original image to be detected is inclined. Write “1” to “Flag”. Then, the CPU 401 calls and executes a subroutine related to document width calculation (step S12).

その後、CPU401は、「有効ライン数」が「判定ライン数」以上になったか否かを判定する(ステップS13)。ここでの「判定ライン数」は、例えば画像入力装置5が原稿を読み込んだときの解像度が600dpiの場合、2から30程度であることが好ましい。
「有効ライン数」が「判定ライン数」以上になったと判定した場合(ステップS13:YES)、CPU401は、算出した原稿幅についての判定を行わずに処理を終了する。「判定ライン数」以上になっていないと判定した場合(ステップS13:NO)、CPU401は、算出した「原稿幅」が「0」であるか否かを判定する(ステップS14)。
Thereafter, the CPU 401 determines whether or not the “number of effective lines” is equal to or greater than the “number of determination lines” (step S13). The “number of determination lines” here is preferably about 2 to 30 when the resolution when the image input apparatus 5 reads a document is 600 dpi, for example.
If it is determined that the “number of effective lines” is equal to or greater than the “number of determination lines” (step S13: YES), the CPU 401 ends the process without determining the calculated document width. If it is determined that it is not equal to or greater than the “number of determination lines” (step S13: NO), the CPU 401 determines whether or not the calculated “document width” is “0” (step S14).

「原稿幅」が「0」であると判定した場合(ステップS14:YES)、CPU401は、処理中のラインに原稿が存在しないものとして、処理をステップS20へ進める。「原稿幅」が「0」ではないと判定した場合(ステップS14:NO)、CPU401は、処理中のラインに原稿が存在するものとして「有効ライン数」に「1」を加算する(ステップS15)。その後、CPU401は、「原稿幅」から「前ライン原稿幅」を減算して原稿幅の増分を算出する(ステップS16)。そして、CPU401は、次のラインに対する処理のために「原稿幅」を「前ライン原稿幅」に書き込んで更新する(ステップS17)。   If it is determined that “document width” is “0” (step S14: YES), the CPU 401 proceeds to step S20 assuming that no document exists on the line being processed. If it is determined that the “document width” is not “0” (step S14: NO), the CPU 401 adds “1” to the “number of effective lines” on the assumption that the document exists on the line being processed (step S15). ). Thereafter, the CPU 401 calculates the increment of the document width by subtracting the “front line document width” from the “document width” (step S16). Then, the CPU 401 writes and updates the “original width” in the “previous line original width” for processing for the next line (step S17).

次いで、CPU401は、算出した原稿幅の増分が「増分閾値」より大きいか否かを判定する(ステップS18)。例えば、画像入力装置5が原稿を読み込んだときの解像度が600dpi(dot per inch)で、傾き有りと判定する最小角度が0.1度である場合、ここでの「増分閾値」は、580から600程度の値であることが好ましい。
前記増分が「増分閾値」より大きくないと判定した場合(ステップS18:NO)、CPU401は、処理をステップS20へ進める。
Next, the CPU 401 determines whether or not the calculated increment of the document width is larger than the “increment threshold” (step S18). For example, when the resolution when the image input apparatus 5 reads a document is 600 dpi (dot per inch) and the minimum angle for determining that there is an inclination is 0.1 degree, the “increment threshold” here is from 580 A value of about 600 is preferred.
If it is determined that the increment is not greater than the “increment threshold” (step S18: NO), the CPU 401 advances the process to step S20.

前記増分が「増分閾値」より大きいと判定した場合(ステップS18:YES)、即ち、原稿幅の偏差が前後に隣接するライン間で急激に増大する場合、CPU401は、傾き無しを検出したことを示すために「傾斜フラグ」に「0」を書き込む(ステップS19)。その後、CPU401は、次のラインを処理対象とするために「ラインカウンタ」に「1」を加算する(ステップS20)。そして、CPU401は、「ラインカウンタ」が「最終ライン」より大きくなったか否かを判定する(ステップS21)。   When it is determined that the increment is larger than the “increment threshold” (step S18: YES), that is, when the deviation of the document width increases rapidly between adjacent lines, the CPU 401 detects that there is no inclination. To indicate this, “0” is written in the “tilt flag” (step S19). Thereafter, the CPU 401 adds “1” to the “line counter” in order to process the next line (step S20). Then, the CPU 401 determines whether or not the “line counter” is larger than the “final line” (step S21).

「ラインカウンタ」が「最終ライン」より大きくなっていないと判定した場合(ステップS21:NO)、CPU401は、次のラインについて原稿幅を算出するために処理をステップS12に戻す。「ラインカウンタ」が「最終ライン」より大きくなったと判定した場合(ステップS21:YES)、CPU401は、傾き無しを検出したことを示すために「傾斜フラグ」に「0」を書き込み(ステップS22)、処理を終了する。   If it is determined that the “line counter” is not greater than the “final line” (step S21: NO), the CPU 401 returns the process to step S12 in order to calculate the document width for the next line. When it is determined that the “line counter” is larger than the “final line” (step S21: YES), the CPU 401 writes “0” in the “tilt flag” to indicate that no tilt is detected (step S22). The process is terminated.

以上の処理によって設定された「傾斜フラグ」は、傾きの有無の検出結果(傾き有り=「1」)であり、上述した傾き角算出部251、補正部252及び出力選択部253においてCPU401が実行する処理の中で参照される。   The “tilt flag” set by the above processing is the detection result of the presence or absence of tilt (with tilt = “1”), which is executed by the CPU 401 in the tilt angle calculation unit 251, correction unit 252, and output selection unit 253 described above. It is referred in the process to do.

図6は、原稿幅算出のサブルーチンに係るCPU401の処理手順の例を示すフローチャートである。本サブルーチンでは、入力処理部22から与えられた原稿画像のライン毎に原稿の左端及び右端を検出し、左端から右端までに存在する画素数を「原稿幅」に書き込む。また、左端から右端までの画素が与えられている期間だけ、上述した原稿画像信号をオンさせる。
尚、「座標カウンタ」、「左端座標」及び「右端座標」は、夫々RAM403に記憶される変数である。また、「ライン末端」は、原稿が画像入力装置5で読み取られたときの解像度等に基づいて、予めRAM403に設定されるものとする。
FIG. 6 is a flowchart illustrating an example of a processing procedure of the CPU 401 related to a document width calculation subroutine. In this subroutine, the left end and the right end of the original are detected for each line of the original image given from the input processing unit 22, and the number of pixels existing from the left end to the right end is written in the “original width”. Further, the above-described document image signal is turned on only during a period in which pixels from the left end to the right end are given.
The “coordinate counter”, “left end coordinate”, and “right end coordinate” are variables stored in the RAM 403, respectively. The “line end” is set in advance in the RAM 403 based on the resolution when the document is read by the image input device 5.

CPU401は、メインルーチンから呼び出された場合、初期化処理を行い(ステップS31)、処理中のラインにおける処理中の画素の位置を示す「座標カウンタ」に「0」を、検出した原稿の左端及び右端の座標を記憶する「左端座標」及び「右端座標」に「0」を夫々書き込む。その後、CPU401は、同一ライン上の次の画素を処理対象とするために「座標カウンタ」に「1」を加算し(ステップS32)、「座標カウンタ」が「ライン末端」より大きくなったか否かを判定する(ステップS33)。大きくなったと判定した場合(ステップS33:YES)、CPU401は、処理をステップS43へ進める。   When called from the main routine, the CPU 401 performs initialization processing (step S31), sets “0” in the “coordinate counter” indicating the position of the pixel being processed in the line being processed, Write “0” in “Left end coordinates” and “Right end coordinates” that store the coordinates of the right end, respectively. Thereafter, the CPU 401 adds “1” to the “coordinate counter” in order to process the next pixel on the same line (step S32), and whether or not the “coordinate counter” is greater than the “line end”. Is determined (step S33). When it determines with having become large (step S33: YES), CPU401 advances a process to step S43.

「座標カウンタ」が「ライン末端」より大きくなっていないと判定した場合(ステップS33:NO)、CPU401は、原稿の左端を検出する処理を行う(ステップS34)。ここでの左端の検出処理は、以下の(a)から(d)のように行うものとする。
(a)原稿が存在しないときの画素の濃度を参照濃度値として予めRAM403に登録しておく。
(b)与えられた原稿画像の各画素の濃度と参照濃度値とを比較して、原稿が存在する画素と原稿が存在しない画素とを分類する。
(c)原稿の読取ノイズによる誤判定を防止するため、処理中の画素に隣接する8つの周辺画素を参照して濃度のスムージングフィルタ処理を行う。
(d)原稿が存在しない画素から原稿が存在する画素に変化したときの画素の座標を原稿の左端とする。
If it is determined that the “coordinate counter” is not greater than the “line end” (step S33: NO), the CPU 401 performs a process of detecting the left end of the document (step S34). The left end detection process here is performed as shown in the following (a) to (d).
(A) The pixel density when there is no document is registered in the RAM 403 in advance as a reference density value.
(B) The density of each pixel of a given document image is compared with the reference density value to classify pixels where the document exists and pixels where the document does not exist.
(C) In order to prevent erroneous determination due to document reading noise, density smoothing filter processing is performed with reference to eight neighboring pixels adjacent to the pixel being processed.
(D) The pixel coordinates when the pixel where the document does not exist is changed to the pixel where the document exists are defined as the left end of the document.

次いで、CPU401は、原稿の左端を検出したか否かを判定し(ステップS35)、検出していないと判定した場合(ステップS35:NO)、処理をステップS32に戻す。左端を検出したと判定した場合(ステップS35:YES)、CPU401は、処理中の「座標カウンタ」を「左端座標」に書き込む(ステップS36)と共に原稿画素信号をオンさせる(ステップS37)。その後、CPU401は、同一ライン上の次の画素を処理対象とするために「座標カウンタ」に「1」を加算し(ステップS38)、「座標カウンタ」が「ライン末端」より大きくなったか否かを判定する(ステップS39)。   Next, the CPU 401 determines whether or not the left edge of the document has been detected (step S35). If it is determined that it has not been detected (step S35: NO), the process returns to step S32. If it is determined that the left end has been detected (step S35: YES), the CPU 401 writes the “coordinate counter” being processed into the “left end coordinate” (step S36) and turns on the original pixel signal (step S37). Thereafter, the CPU 401 adds “1” to the “coordinate counter” in order to process the next pixel on the same line (step S38), and whether or not the “coordinate counter” is larger than the “line end”. Is determined (step S39).

「座標カウンタ」が「ライン末端」より大きくなったと判定した場合(ステップS39:YES)、CPU401は、処理をステップS43へ進める。「ライン末端」より大きくなっていないと判定した場合(ステップS39:NO)、CPU401は、原稿の右端を検出する処理を行う(ステップS40)。ここでの検出処理は、上述した(a)から(d)と同様に行うものとする。但し、原稿が存在する画素から原稿が存在しない画素に変化したときの画素の座標を原稿の右端とする。
そして、CPU401は、原稿の右端を検出したか否かを判定し(ステップS41)、検出していないと判定した場合(ステップS41:NO)、処理をステップS38に戻す。
If it is determined that the “coordinate counter” has become larger than the “line end” (step S39: YES), the CPU 401 advances the process to step S43. When it is determined that it is not larger than the “line end” (step S39: NO), the CPU 401 performs a process of detecting the right end of the document (step S40). The detection process here is performed in the same manner as (a) to (d) described above. However, the coordinate of the pixel when the pixel where the document exists changes to the pixel where the document does not exist is the right end of the document.
Then, the CPU 401 determines whether or not the right edge of the document has been detected (step S41). If it is determined that it has not been detected (step S41: NO), the process returns to step S38.

原稿の右端を検出したと判定した場合(ステップS41:YES)、CPU401は、処理中の「座標カウンタ」を「右端座標」に書き込み(ステップS42)、更に、「右端座標」から「左端座標」を減算した値を「原稿幅」に書き込む(ステップS43)。ここで「原稿幅」が負の数となる場合、即ち、右端を検出しなかったために「右端座標」が「0」のままであった場合、「原稿幅」を「0」に調整する(ステップS44)。その後、CPU401は、原稿画素信号をオフさせて(ステップS45)メインルーチンにリターンする。   If it is determined that the right edge of the document has been detected (step S41: YES), the CPU 401 writes the “coordinate counter” being processed into the “right edge coordinates” (step S42), and further, from the “right edge coordinates” to the “left edge coordinates”. A value obtained by subtracting is written in the “document width” (step S43). If the “document width” is a negative number, that is, if the “right edge coordinate” remains “0” because the right edge is not detected, the “document width” is adjusted to “0” ( Step S44). Thereafter, the CPU 401 turns off the original pixel signal (step S45) and returns to the main routine.

図7は、傾き角算出部251において原稿の頂点を検出するCPU401の処理手順の例を示すメインルーチンのフローチャートである。以下の処理は、ROM402に予め格納されている制御プログラムに従って、原稿画像1ページ分の取得を開始する都度実行される。本処理は、傾き検出部241における原稿の傾きの有無を検出する処理と並列的に実行される。検出された頂点は、図4に示したように原稿の傾きの角度に対する余弦及び正弦を算出するのに用いられ、算出された余弦及び正弦に基づいて式(1)により原稿画像の傾きが補正される。   FIG. 7 is a flowchart of a main routine showing an example of a processing procedure of the CPU 401 for detecting the apex of the document in the inclination angle calculation unit 251. The following processing is executed each time acquisition of one page of a document image is started in accordance with a control program stored in the ROM 402 in advance. This process is executed in parallel with the process of detecting whether or not the document is tilted in the tilt detecting unit 241. The detected vertex is used to calculate the cosine and sine with respect to the angle of inclination of the original as shown in FIG. 4, and the inclination of the original image is corrected by equation (1) based on the calculated cosine and sine. Is done.

尚、「画素x座標」、「画素y座標」、「上端x座標」、「上端y座標」、「下端x座標」、「下端y座標」、「左端x座標」、「左端y座標」、「右端x座標」、及び「右端y座標」は、処理中の画素と原稿の上下左右の各頂点とについて夫々のx座標及びy座標を記憶するための変数であり、RAM403に夫々記憶するものとする。   “Pixel x coordinate”, “pixel y coordinate”, “upper end x coordinate”, “upper end y coordinate”, “lower end x coordinate”, “lower end y coordinate”, “left end x coordinate”, “left end y coordinate”, “Right end x coordinate” and “Right end y coordinate” are variables for storing the x coordinate and the y coordinate of the pixel being processed and the top, bottom, left, and right vertices of the document, and are stored in the RAM 403 respectively. And

CPU401は、原稿画像1ページ分の処理を開始するに際し、初期化処理を行い(ステップS51)、「上端y座標」及び「左端x座標」を除いて、上述した各x座標及びy座標の変数に「0」を書き込む。「上端y座標」及び「左端x座標」については、これらの最小値を検出するために、初期値として通常取り得ない値を代入する。本実施の形態1では、夫々65535(64k−1)及び8191(8k−1)を代入するが、これに限定されるものではない。   When the CPU 401 starts processing for one page of the document image, the CPU 401 performs an initialization process (step S51), and except for the “upper end y coordinate” and the “left end x coordinate”, the variables of the respective x coordinates and y coordinates described above. “0” is written to. For “upper end y coordinate” and “left end x coordinate”, in order to detect these minimum values, values that cannot normally be taken are substituted as initial values. In the first embodiment, 65535 (64k-1) and 8191 (8k-1) are substituted, respectively, but the present invention is not limited to this.

その後、CPU401は、各ラインの原稿の画素が原稿検知部24に与えられている期間を示す原稿画素信号がオンされているか否かを判定する(ステップS52)。この原稿画素信号は、図6に示す原稿幅算出に係るサブルーチンが、図5に示す原稿の傾きの有無を検出するメインルーチンから呼び出しされる都度、オン/オフされる信号である。   Thereafter, the CPU 401 determines whether or not the document pixel signal indicating the period during which the document pixels of each line are given to the document detection unit 24 is turned on (step S52). This document pixel signal is a signal that is turned on / off every time the subroutine related to document width calculation shown in FIG. 6 is called from the main routine shown in FIG.

原稿画素信号がオンされていると判定した場合(ステップS52:YES)、CPU401は、処理中の画素が原稿に含まれているものとして上端判定(ステップS53)、下端判定(ステップS54)、左端判定(ステップS55)、及び右端判定(ステップS56)に係るサブルーチンを順次呼び出して実行する。これらのサブルーチンを実行することにより、原稿の上端、下端、左端、及び右端のx座標及びy座標が夫々更新される。
尚、これらのサブルーチンは順不同で実行してよい。
When it is determined that the document pixel signal is turned on (step S52: YES), the CPU 401 determines that the pixel being processed is included in the document, the upper end determination (step S53), the lower end determination (step S54), and the left end. Subroutines relating to determination (step S55) and right end determination (step S56) are sequentially called and executed. By executing these subroutines, the x-coordinate and y-coordinate of the upper end, lower end, left end, and right end of the document are updated.
These subroutines may be executed in any order.

ステップS56の処理を終えた場合、及びステップS52で原稿画素信号がオンされていないと判定した場合(ステップS52:NO)、CPU401は、原稿の傾きの有無を示す「傾斜フラグ」が「1」であるか否かを判定する(ステップS57)。「傾斜フラグ」が「1」でないと判定した場合(ステップS57:NO)、即ち原稿の傾き無しが検出された場合、CPU401は、直ちに処理を終了する。これにより、処理中のページについて原稿の傾きの角度が算出されることがなくなる。   When the process of step S56 is completed, and when it is determined in step S52 that the document pixel signal is not turned on (step S52: NO), the CPU 401 sets “1” as the “tilt flag” indicating whether or not the document is tilted. It is determined whether or not (step S57). When it is determined that the “tilt flag” is not “1” (step S57: NO), that is, when it is detected that the document is not tilted, the CPU 401 immediately ends the process. Thereby, the inclination angle of the document is not calculated for the page being processed.

「傾斜フラグ」が「1」であると判定した場合(ステップS57:YES)、即ち原稿の傾き無しの検出に至っていない場合、CPU401は、「画素x座標」に「1」を加算し(ステップS58)、「画素x座標」が「ライン末端」より大きくなったか否かを判定する(ステップS59)。「ライン末端」より大きくなっていないと判定した場合(ステップS59:NO)、CPU401は、同一ラインの次の画素を処理対象とするために処理をステップS52に戻す。   When it is determined that the “tilt flag” is “1” (step S57: YES), that is, when the document has not been detected to be tilted, the CPU 401 adds “1” to the “pixel x coordinate” (step S57). S58), it is determined whether or not the “pixel x coordinate” is larger than the “line end” (step S59). If it is determined that it is not larger than the “line end” (step S59: NO), the CPU 401 returns the process to step S52 in order to set the next pixel on the same line as the processing target.

「画素x座標」が「ライン末端」より大きくなったと判定した場合(ステップS59:YES)、CPU401は、「画素x座標」に「0」を書き込んでx座標をラインの先頭を戻すと共に「画素y座標」に「1」を加算して(ステップS61)処理を次のラインに進める。その後、CPU401は、「画素y座標」が「最終ライン」より大きくなったか否かを判定する(ステップS62)。   When it is determined that “pixel x coordinate” is larger than “line end” (step S59: YES), the CPU 401 writes “0” to “pixel x coordinate” to return the x coordinate to the beginning of the line and “pixel”. “1” is added to “y-coordinate” (step S61), and the process proceeds to the next line. Thereafter, the CPU 401 determines whether or not the “pixel y coordinate” is larger than the “final line” (step S62).

「画素y座標」が「最終ライン」より大きくなっていないと判定した場合(ステップS62:NO)、CPU401は、次のラインを処理対象とするために処理をステップS52に戻す。「最終ライン」より大きくなっていると判定した場合(ステップS62:YES)、CPU401は、原稿の頂点の検出を完了したものとして処理を終了する。   If it is determined that the “pixel y coordinate” is not larger than the “final line” (step S62: NO), the CPU 401 returns the process to step S52 in order to set the next line as a processing target. If it is determined that it is larger than the “last line” (step S62: YES), the CPU 401 ends the process assuming that the detection of the vertex of the document is completed.

図8は、上端判定、下端判定、左端判定、及び右端判定の各サブルーチンに係るCPU401の処理手順を示すフローチャートである。上端判定に係るサブルーチンが呼び出された場合、CPU401は、処理中の「画素y座標」が「上端y座標」より小さいか否かを判定する(ステップS71)。「上端y座標」より小さくないと判定した場合(ステップS71:NO)、CPU401は、処理を終了してメインルーチンにリターンする。   FIG. 8 is a flowchart showing the processing procedure of the CPU 401 relating to the upper end determination, lower end determination, left end determination, and right end determination subroutines. When the subroutine related to the upper end determination is called, the CPU 401 determines whether or not the “pixel y coordinate” being processed is smaller than the “upper end y coordinate” (step S71). If it is determined that it is not smaller than the “upper end y coordinate” (step S71: NO), the CPU 401 ends the process and returns to the main routine.

「上端y座標」より小さいと判定した場合(ステップS71:YES)、CPU401は、処理中の「画素x座標」を「上端x座標」に書き込む(ステップS72)と共に、処理中の「画素y座標」を「上端y座標」に書き込んで(ステップS73)、原稿上端のx座標及びy座標を夫々更新し、メインルーチンにリターンする。
このようにして、「上端y座標」の最小値を求める。
When it is determined that the value is smaller than the “upper end y coordinate” (step S71: YES), the CPU 401 writes the “pixel x coordinate” being processed into the “upper end x coordinate” (step S72) and the “pixel y coordinate being processed”. ”Is written in the“ upper end y coordinate ”(step S73), the x coordinate and the y coordinate of the upper end of the document are updated, and the process returns to the main routine.
In this way, the minimum value of the “upper end y coordinate” is obtained.

同様に、下端判定に係るサブルーチンが呼び出された場合、CPU401は、「画素y座標」が「下端y座標」より大きいか否かを判定する(ステップS75)。大きくないと判定した場合(ステップS75:NO)、CPU401は、メインルーチンにリターンする。「下端y座標」より大きいと判定した場合(ステップS75:YES)、CPU401は、「画素x座標」を「下端x座標」に書き込む(ステップS76)と共に、「画素y座標」を「下端y座標」に書き込んで(ステップS77)メインルーチンにリターンする。
このようにして、「下端y座標」の最大値を求める。
Similarly, when the subroutine relating to the lower end determination is called, the CPU 401 determines whether or not the “pixel y coordinate” is larger than the “lower end y coordinate” (step S75). When it is determined that it is not large (step S75: NO), the CPU 401 returns to the main routine. When it is determined that the value is larger than the “lower end y coordinate” (step S75: YES), the CPU 401 writes the “pixel x coordinate” in the “lower end x coordinate” (step S76) and the “pixel y coordinate” as the “lower end y coordinate”. "(Step S77) and the process returns to the main routine.
In this way, the maximum value of the “lower end y coordinate” is obtained.

また、左端判定に係るサブルーチンが呼び出された場合、CPU401は、「画素x座標」が「左端x座標」より小さいか否かを判定する(ステップS81)。小さくないと判定した場合(ステップS81:NO)、CPU401は、メインルーチンにリターンする。「左端x座標」より小さいと判定した場合(ステップS81:YES)、CPU401は、「画素x座標」を「左端x座標」に書き込む(ステップS82)と共に、「画素y座標」を「左端y座標」に書き込んで(ステップS83)メインルーチンにリターンする。
このようにして、「左端x座標」の最小値を求める。
When the subroutine relating to the left end determination is called, the CPU 401 determines whether the “pixel x coordinate” is smaller than the “left end x coordinate” (step S81). If it is determined that it is not small (step S81: NO), the CPU 401 returns to the main routine. When it is determined that it is smaller than the “left end x coordinate” (step S81: YES), the CPU 401 writes the “pixel x coordinate” in the “left end x coordinate” (step S82), and the “pixel y coordinate” in the “left end y coordinate”. "(Step S83), the process returns to the main routine.
In this way, the minimum value of the “left end x coordinate” is obtained.

更にまた、右端判定に係るサブルーチンが呼び出された場合、CPU401は、「画素x座標」が「右端x座標」より大きいか否かを判定する(ステップS85)。大きくないと判定した場合(ステップS85:NO)、CPU401は、メインルーチンにリターンする。「右端x座標」より大きいと判定した場合(ステップS85:YES)、CPU401は、「画素x座標」を「右端x座標」に書き込む(ステップS86)と共に、「画素y座標」を「右端y座標」に書き込んで(ステップS87)メインルーチンにリターンする。
このようにして、「右端x座標」の最大値を求める。
Furthermore, when a subroutine related to right end determination is called, the CPU 401 determines whether or not “pixel x coordinate” is larger than “right end x coordinate” (step S85). If it is determined that it is not large (step S85: NO), the CPU 401 returns to the main routine. When it is determined that the value is larger than the “right end x coordinate” (step S85: YES), the CPU 401 writes the “pixel x coordinate” in the “right end x coordinate” (step S86) and the “pixel y coordinate” as the “right end y coordinate”. "(Step S87), the process returns to the main routine.
In this way, the maximum value of the “right end x coordinate” is obtained.

以上のように本実施の形態1によれば、原稿の傾きの角度の算出と傾きの有無の検出とを並列的に行い、原稿の存在する「有効ライン数」分のラインから原稿の傾き無しを検出したときは、原稿の傾きの角度の算出を行わず、原稿の傾きを補正することもない。
これにより、原稿画像の一部から原稿の傾き無しを先に検出したときは、原稿画像全体から傾きの角度を算出したときより画像処理が高速化されると共に、原稿画像の一部をメモリに記憶するだけで済む。従って、原稿の傾きが補正を必要としない程度である場合に、処理速度を向上させ且つ原稿画像を記憶するメモリの使用量を低減することが可能となる。
As described above, according to the first embodiment, the calculation of the inclination angle of the document and the detection of the presence / absence of the tilt are performed in parallel, and there is no document inclination from the lines corresponding to the “number of effective lines”. Is detected, the inclination angle of the original is not calculated, and the inclination of the original is not corrected.
As a result, when no inclination of the original is detected from a part of the original image, the image processing is faster than when the inclination angle is calculated from the entire original image, and a part of the original image is stored in the memory. Just remember. Therefore, when the inclination of the document is such that correction is not required, the processing speed can be improved and the amount of memory used for storing the document image can be reduced.

また、算出した傾きの角度の余弦及び正弦に基づいて原稿画像の原稿の傾きを補正するため、原稿の傾き有りと検出したときは、高精度に算出した傾きの角度に基づいて原稿の傾きを補正することが可能となる。   Further, since the inclination of the original of the original image is corrected based on the cosine and sine of the calculated inclination angle, when it is detected that the original is inclined, the inclination of the original is calculated based on the calculated inclination angle. It becomes possible to correct.

更にまた、画像処理装置で原稿の傾きが補正された原稿画像に基づいて出力画像を形成する。
従って、原稿の傾きが補正を必要としない程度である場合に、処理速度を向上させ且つ原稿画像を記憶するメモリの使用量を低減させる画像処理装置をプリンタ装置、デジタル複合機等に適用することが可能となる。
Furthermore, an output image is formed on the basis of the original image in which the inclination of the original is corrected by the image processing apparatus.
Therefore, when the inclination of the document is such that correction is not required, an image processing device that improves the processing speed and reduces the amount of memory used to store the document image is applied to a printer device, a digital multifunction device, or the like. Is possible.

(実施の形態2)
実施の形態1は、本発明に係る画像処理装置2及び画像形成装置をデジタルカラー複合機100に適用した形態であるのに対し、実施の形態2は、本発明に係る画像処理装置2aをカラー画像読取装置200に適用した形態である。
図9は、本発明の実施の形態2に係るカラー画像読取装置200の構成を示すブロック図である。図中200はカラー画像読取装置であり、カラー画像読取装置200は、RGBのアナログ信号を原稿画像として出力する画像入力装置5、前記アナログ信号を取得してRGBのデジタル信号を出力する画像処理装置2a、及びこれらの装置に対する操作を受け付けるための操作パネル6aを備える。
(Embodiment 2)
The first embodiment is an embodiment in which the image processing apparatus 2 and the image forming apparatus according to the present invention are applied to the digital color multifunction peripheral 100, whereas the second embodiment is a color image processing apparatus 2a according to the present invention. This is a form applied to the image reading apparatus 200.
FIG. 9 is a block diagram showing a configuration of a color image reading apparatus 200 according to Embodiment 2 of the present invention. In the figure, reference numeral 200 denotes a color image reading device. The color image reading device 200 is an image input device 5 that outputs RGB analog signals as a document image, and an image processing device that acquires the analog signals and outputs RGB digital signals. 2a and an operation panel 6a for receiving operations on these devices.

画像処理装置2aは、画像入力装置5から入力されたアナログの原稿画像をデジタルの原稿画像に変換するA/D変換部20と、A/D変換部20から出力されたRGBのデジタル信号から、画像入力装置5の照明系、結像系及び撮像系で生じる各種の歪を除去するシェーディング補正部21と、ガンマ補正を行うための入力処理部22とを備える。入力処理部22から出力されたRGBのデジタル信号(原稿画像)は、ハードディスク等の大容量記憶装置を有する送受信部/記憶部23へ/から記憶/読み出しが行われ、原稿検知部24を介して原稿補正部25へ与えられるようになっている。   The image processing device 2a includes an A / D conversion unit 20 that converts an analog document image input from the image input device 5 into a digital document image, and an RGB digital signal output from the A / D conversion unit 20. The image input apparatus 5 includes a shading correction unit 21 that removes various distortions generated in the illumination system, the imaging system, and the imaging system, and an input processing unit 22 that performs gamma correction. The RGB digital signal (original image) output from the input processing unit 22 is stored / read out to / from a transmission / reception unit / storage unit 23 having a large-capacity storage device such as a hard disk. It is given to the document correction unit 25.

上述した画像処理装置2aの各部は、CPU401、プログラム等の情報を記憶するROM402及び一時的に発生した情報を記憶するRAM403からなる制御部40と接続されており、制御部40のCPU401が、ROM402に予め格納されている制御プログラムに従って、これら各部の動作を制御するようにしてある。   Each unit of the image processing apparatus 2 a described above is connected to the CPU 401, the ROM 402 that stores information such as a program, and the control unit 40 that includes the RAM 403 that stores temporarily generated information. Are controlled in accordance with a control program stored in advance.

原稿補正部25が出力したRGBのデジタル信号は、図示しないデバイスインタフェース及びネットワークインタフェースを介して外部のコンピュータ、ハードディスク、及びイントラネット、インターネット等のネットワークへ夫々送出される。
その他、実施の形態1に対応する箇所には同様の符号を付して、その詳細な説明を省略する。
The RGB digital signals output from the document correction unit 25 are sent to an external computer, a hard disk, and a network such as an intranet or the Internet via a device interface and a network interface (not shown).
In addition, the same code | symbol is attached | subjected to the location corresponding to Embodiment 1, and the detailed description is abbreviate | omitted.

以上のように本実施の形態2によれば、画像入力装置で原稿を読み取った原稿画像について、画像処理装置で原稿の傾きを補正する。
従って、原稿の傾きが補正を必要としない程度である場合に、処理速度を向上させ且つ原稿画像を記憶するメモリの使用量を低減させる画像処理装置をカラー読取装置に適用することが可能となる。
As described above, according to the second embodiment, with respect to a document image read by the image input device, the image processing device corrects the inclination of the document.
Therefore, when the inclination of the original is such that correction is not required, an image processing apparatus that improves the processing speed and reduces the amount of memory used for storing the original image can be applied to the color reading apparatus. .

本発明は、コンピュータに実行させるためのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)を記録したコンピュータ読み取り可能な記録媒体に、上述した原稿の傾きの有無の検出結果に応じて原稿の傾きの量の算出/非算出を切り替える画像処理方法を記録したものとすることも可能である。これにより、原稿の傾きの有無の検出結果に応じて原稿の傾きの量の算出/非算出を切り替える画像処理方法を行うプログラムを記録した記録媒体を持ち運び自在に提供することができる。   The present invention provides a computer-readable recording medium on which program code (executable program, intermediate code program, source program) for causing a computer to execute is recorded on a document in accordance with the above-described detection result of whether or not the document is tilted. It is also possible to record an image processing method for switching between calculation / non-calculation of the amount of inclination. Accordingly, it is possible to provide a portable recording medium on which a program for performing an image processing method for switching between calculation / non-calculation of the amount of document inclination according to the detection result of the presence / absence of document inclination is portable.

記録媒体としては、例えばROMのようなプログラムメディアであってもよく、外部記憶装置として設けられた図示しないプログラム読取装置に記録媒体を挿入することで読み取り可能なプログラムメディアであってもよい。何れの場合においても、格納されているプログラムコードは、CPUにアクセスされて実行される構成であってもよく、プログラムコードが読み出され、例えばRAMのプログラム記憶エリアにダウンロードされて実行される構成であってもよい。このダウンロード用のプログラムは予め本体装置に格納されているものとする。   The recording medium may be, for example, a program medium such as a ROM, or a program medium that can be read by inserting the recording medium into a program reading device (not shown) provided as an external storage device. In any case, the stored program code may be configured to be accessed and executed by the CPU, or the program code may be read and downloaded to the program storage area of the RAM and executed. It may be. It is assumed that this download program is stored in the main device in advance.

前記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープ、カセットテープ等のテープ系、フロッピー(登録商標)ディスク及びハードディスクに代表される磁気ディスク、CD−ROM/MO/MD/DVDに代表される光ディスク等のディスク系、ICカード(メモリカードを含む)、光カード等のカード系、及びマスクROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(Electrically Erasable Programmable Read Only Memory)、フラッシュROM等の半導体メモリ系の媒体に固定的にプログラムコードを担持するものであってもよい。   The program medium is a recording medium configured to be separable from the main body, such as a magnetic tape, a tape system such as a cassette tape, a magnetic disk represented by a floppy (registered trademark) disk and a hard disk, CD-ROM / MO / MD. / Disk systems such as optical disks represented by DVD, IC cards (including memory cards), card systems such as optical cards, mask ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory) The program code may be fixedly carried on a semiconductor memory medium such as a flash ROM.

前記プログラムメディアは、また、インターネットを含む通信ネットワークからプログラムコードがダウンロード可能となるようにプログラムコードが流動的に担持された媒体であってもよい。このように通信ネットワークからプログラムコードをダウンロードする場合、ダウンロード用のプログラムは、予め本体装置に格納されるものでもよく、他の記録媒体からインストールされるものであってもよい。尚、本発明は、前記プログラムコードが搬送波に埋め込まれて電子的に伝送されるコンピュータデータ信号の形態でも実現され得る。   The program medium may be a medium in which the program code is fluidly supported so that the program code can be downloaded from a communication network including the Internet. When downloading the program code from the communication network in this way, the download program may be stored in the main device in advance or may be installed from another recording medium. The present invention can also be realized in the form of a computer data signal in which the program code is embedded in a carrier wave and transmitted electronically.

前記記録媒体は、例えば、デジタルカラー複合機及びコンピュータシステムに備えられるプログラム読取装置によって読み取られ、CPUによって上述した画像処理方法が実行される。コンピュータシステムは、フラットベッドスキャナ、フィルムスキャナ、デジタルカメラ等の画像入力装置、所定のプログラムがロードされることにより上記画像処理方法など様々な処理が行われるコンピュータ、コンピュータの処理結果を表示するCRTディスプレイ、液晶ディスプレイ等の画像表示装置、及びコンピュータの処理結果を紙等に出力するプリンタより構成される。更には、ネットワークを介してサーバー等に接続するためのネットワークカード、モデム等の通信手段が備えられる。   The recording medium is read by, for example, a program reading device provided in a digital color multifunction peripheral and a computer system, and the above-described image processing method is executed by a CPU. The computer system includes an image input device such as a flatbed scanner, a film scanner, and a digital camera, a computer that performs various processes such as the image processing method by loading a predetermined program, and a CRT display that displays the processing results of the computer. An image display device such as a liquid crystal display, and a printer that outputs the processing results of the computer to paper or the like. Furthermore, a communication means such as a network card and a modem for connecting to a server or the like via a network is provided.

本発明の実施の形態1に係るデジタルカラー複合機の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a digital color multifunction peripheral according to a first embodiment of the present invention. 画像入力装置の構成を示す模式的な正面断面図である。It is a typical front sectional view showing the composition of an image input device. 原稿検知部及び原稿補正部の機能構成を示すブロック部である。It is a block unit showing a functional configuration of a document detection unit and a document correction unit. 原稿の傾きの角度に対する余弦及び正弦を算出する方法を示す説明図である。It is explanatory drawing which shows the method of calculating a cosine and a sine with respect to the angle of inclination of a document. 傾き検出部において原稿の傾きの有無を検出するCPUの処理手順を示すメインルーチンのフローチャートである。7 is a flowchart of a main routine showing a processing procedure of a CPU for detecting whether or not an original is inclined in an inclination detection unit. 原稿幅算出のサブルーチンに係るCPUの処理手順の例を示すフローチャートである。5 is a flowchart illustrating an example of a processing procedure of a CPU according to a document width calculation subroutine. 傾き角算出部において原稿の頂点を検出するCPUの処理手順の例を示すメインルーチンのフローチャートである。10 is a flowchart of a main routine showing an example of a processing procedure of a CPU that detects a vertex of a document in an inclination angle calculation unit. 上端判定、下端判定、左端判定、及び右端判定の各サブルーチンに係るCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which concerns on each subroutine of an upper end determination, a lower end determination, a left end determination, and a right end determination. 本発明の実施の形態2に係るカラー画像読取装置の構成を示すブロック図である。It is a block diagram which shows the structure of the color image reading apparatus which concerns on Embodiment 2 of this invention. 原稿画像に画像処理が施されて原稿の傾きが補正される様子を示す説明図である。FIG. 6 is an explanatory diagram illustrating a state in which image processing is performed on a document image to correct the inclination of the document.

符号の説明Explanation of symbols

100 デジタルカラー複合機(画像形成装置)
200 カラー画像読取装置
2、2a 画像処理装置
20 A/D変換部(原稿画像を取得する手段)
24 原稿検知部
25 原稿補正部
241 傾き検出部(検出手段)
251 傾き角算出部(算出手段)
252 補正部(傾きを補正する手段)
3 画像出力装置(画像形成手段)
40 制御部
401 CPU
402 ROM
403 RAM
5 画像入力装置(走査して読み取る手段)
6,6a 操作パネル
100 Digital color MFP (image forming device)
200 Color Image Reading Device 2, 2a Image Processing Device 20 A / D Conversion Unit (Means for Acquiring Document Image)
24 Document detection unit 25 Document correction unit 241 Tilt detection unit (detection means)
251 Inclination angle calculation unit (calculation means)
252 Correction unit (means for correcting inclination)
3 Image output device (image forming means)
40 control unit 401 CPU
402 ROM
403 RAM
5 Image input device (means to scan and read)
6,6a Operation panel

Claims (9)

原稿が走査されて読み取られた原稿画像を取得する手段と、該手段が取得した原稿画像から前記走査の方向に対する原稿の傾きの量を算出する算出手段とを備える画像処理装置において、
前記原稿画像から原稿の傾きの有無を検出する検出手段を備え、
該検出手段が傾き無しを検出した場合、前記算出手段は、原稿の傾きの量を算出しないようにしてあること
を特徴とする画像処理装置。
An image processing apparatus comprising: means for acquiring an original image scanned and read from an original; and calculating means for calculating an amount of inclination of the original with respect to the scanning direction from the original image acquired by the means.
Detecting means for detecting whether or not the document is tilted from the document image;
An image processing apparatus according to claim 1, wherein when the detecting means detects no inclination, the calculating means does not calculate the amount of inclination of the document.
前記算出手段が算出した傾きの量に基づいて、前記原稿画像の原稿の傾きを補正する手段を備えることを特徴とする請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising a unit that corrects a document inclination of the document image based on the amount of inclination calculated by the calculation unit. 原稿に形成された画像を走査して読み取る手段と、
該手段が読み取った原稿画像を取得する請求項1又は2に記載の画像処理装置と
を備えることを特徴とする画像読取装置。
Means for scanning and reading an image formed on a document;
An image reading apparatus comprising: the image processing apparatus according to claim 1, which acquires a document image read by the unit.
請求項1又は2に記載の画像処理装置と、
該画像処理装置で処理された原稿画像に基づいて出力画像を形成する画像形成手段と
を備えることを特徴とする画像形成装置。
The image processing apparatus according to claim 1 or 2,
An image forming apparatus comprising: an image forming unit that forms an output image based on a document image processed by the image processing apparatus.
原稿が走査されて読み取られた原稿画像を取得し、取得した原稿画像から前記走査の方向に対する原稿の傾きの量を算出ステップで算出する画像処理方法において、
前記原稿画像から原稿の傾きの有無を検出するステップを含み、
該ステップで傾き無しを検出した場合、前記算出ステップで原稿の傾きの量を算出しないようにしてあること
を特徴とする画像処理方法。
In an image processing method of acquiring a document image scanned and read from a document and calculating an amount of inclination of the document with respect to the scanning direction from the acquired document image in a calculation step.
Detecting whether or not the document is tilted from the document image,
An image processing method, wherein when no tilt is detected in this step, the amount of document tilt is not calculated in the calculation step.
前記算出ステップで算出した傾きの量に基づいて、前記原稿画像の原稿の傾きを補正するステップを含むことを特徴とする請求項5に記載の画像処理方法。   6. The image processing method according to claim 5, further comprising a step of correcting the inclination of the original of the original image based on the amount of inclination calculated in the calculating step. 画像データを取得して画像処理するコンピュータに、原稿が走査されて読み取られた原稿画像から前記走査の方向に対する原稿の傾きの量を算出ステップで算出させるコンピュータプログラムにおいて、
コンピュータに、前記原稿画像から原稿の所定の指標を抽出させるステップと、
該ステップで抽出させた指標の前記走査方向に対する偏差に基づいて原稿の傾きの有無を検出させるステップとを含み、
該ステップで傾き無しを検出させた場合、前記算出ステップで原稿の傾きの量を算出させないようにしてあること
を特徴とするコンピュータプログラム。
In a computer program for causing a computer that acquires image data and performs image processing to calculate an amount of inclination of an original with respect to the scanning direction from an original image scanned and read in a calculation step,
Causing the computer to extract a predetermined index of the document from the document image;
Detecting whether or not the document is tilted based on a deviation of the index extracted in the step with respect to the scanning direction,
A computer program characterized in that when no inclination is detected in this step, the amount of document inclination is not calculated in the calculation step.
コンピュータに、前記算出ステップで算出させた傾きの量に基づいて、前記原稿画像の原稿の傾きを補正させるステップを含むことを特徴とする請求項7に記載のコンピュータプログラム。   8. The computer program according to claim 7, further comprising a step of causing the computer to correct the inclination of the original of the original image based on the amount of inclination calculated in the calculating step. 請求項7又は8に記載のコンピュータプログラムを記録してあることを特徴とするコンピュータでの読み取りが可能な記録媒体。   9. A computer-readable recording medium in which the computer program according to claim 7 or 8 is recorded.
JP2008289009A 2008-11-11 2008-11-11 Image processor, image reader, image formation device, image processing method, computer program, and recording medium Pending JP2010118769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008289009A JP2010118769A (en) 2008-11-11 2008-11-11 Image processor, image reader, image formation device, image processing method, computer program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008289009A JP2010118769A (en) 2008-11-11 2008-11-11 Image processor, image reader, image formation device, image processing method, computer program, and recording medium

Publications (1)

Publication Number Publication Date
JP2010118769A true JP2010118769A (en) 2010-05-27

Family

ID=42306155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008289009A Pending JP2010118769A (en) 2008-11-11 2008-11-11 Image processor, image reader, image formation device, image processing method, computer program, and recording medium

Country Status (1)

Country Link
JP (1) JP2010118769A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014168193A (en) * 2013-02-28 2014-09-11 Brother Ind Ltd Image reader

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014168193A (en) * 2013-02-28 2014-09-11 Brother Ind Ltd Image reader

Similar Documents

Publication Publication Date Title
US8537443B2 (en) Image processing apparatus, image forming apparatus, image processing method, and storage medium
JP4570670B2 (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, image processing program, and recording medium
US8009931B2 (en) Real-time processing of grayscale image data
JP5264831B2 (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP4495201B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium for recording image processing program
JP2011010033A (en) Image processing apparatus, image forming apparatus, image processing method, computer program and recording medium
JP6607019B2 (en) Document inclination amount detection apparatus and image processing apparatus
JP3671682B2 (en) Image recognition device
JP2012227569A (en) Image processing apparatus, image forming apparatus, computer program, recording medium and image processing method
JP4931897B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
US8964243B2 (en) Image forming apparatus capable of enhancing resolution of image data in high quality
JP2010118769A (en) Image processor, image reader, image formation device, image processing method, computer program, and recording medium
JP5542380B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2010011359A (en) Image processing apparatus, image forming apparatus, method of controlling the image processing apparatus, control program, and recording medium
JP6105134B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2010273119A (en) Image processing apparatus, image forming apparatus, image processing method, computer program, and recording medium
JP5970582B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP5736068B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and recording medium
JP2010103808A (en) Image processor, image reader, image forming apparatus, image processing method, image processing program and computer readable recording medium
JP6081874B2 (en) Image reading device
JP2015226264A (en) Image processing apparatus, image formation apparatus with the same, image processing program, and recording medium with recorded program
JP2010087826A (en) Image processing device, image reader, image forming apparatus, image processing method, program and recording medium therefor
JP2021129168A (en) Image forming apparatus
JP2023116052A (en) Image reading apparatus
JP2000022899A (en) Image recognition device