JP5332912B2 - Image reading apparatus and image forming apparatus - Google Patents

Image reading apparatus and image forming apparatus Download PDF

Info

Publication number
JP5332912B2
JP5332912B2 JP2009130395A JP2009130395A JP5332912B2 JP 5332912 B2 JP5332912 B2 JP 5332912B2 JP 2009130395 A JP2009130395 A JP 2009130395A JP 2009130395 A JP2009130395 A JP 2009130395A JP 5332912 B2 JP5332912 B2 JP 5332912B2
Authority
JP
Japan
Prior art keywords
image
ground color
document
inclination
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009130395A
Other languages
Japanese (ja)
Other versions
JP2010278859A (en
Inventor
敦 横地
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2009130395A priority Critical patent/JP5332912B2/en
Publication of JP2010278859A publication Critical patent/JP2010278859A/en
Application granted granted Critical
Publication of JP5332912B2 publication Critical patent/JP5332912B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Input (AREA)
  • Facsimiles In General (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、画像読取装置、及び画像形成装置に関する。   The present invention relates to an image reading apparatus and an image forming apparatus.

従来、原稿と受光素子アレイとを副走査方向に相対移動させて原稿を読み取るイメージ読み取り装置において、読み取った1ライン中において原稿の存在する区間の幅が設定幅に達した時点で地色検出を開始することにより、地色検出における原稿のスキューの影響を軽減するものが知られている(例えば、特許文献1参照)。   2. Description of the Related Art Conventionally, in an image reading apparatus that reads a document by relatively moving the document and the light receiving element array in the sub-scanning direction, ground color detection is performed when the width of the section where the document exists in the read line reaches a set width. It is known to reduce the influence of document skew in ground color detection by starting (see, for example, Patent Document 1).

特開平8−79521号公報JP-A-8-79521

しかしながら、従来のイメージ読み取り装置によると、読み取った1ライン中において原稿の存在する区間の幅が設定幅に達したとしても、そのライン中には原稿外の領域も存在するので、原稿外の領域の色を地色として検出する可能性がある。
本発明は上記のような事情に基づいて完成されたものであって、原稿が傾いていても地色を精度よく検出できる画像読取装置、及び画像形成装置を提供することを目的とする。
However, according to the conventional image reading apparatus, even if the width of the section where the document exists in the read line reaches the set width, there is an area outside the document in the line. May be detected as the background color.
The present invention has been completed based on the above circumstances, and an object of the present invention is to provide an image reading apparatus and an image forming apparatus that can accurately detect a ground color even when a document is inclined.

第1の発明は、画像読取装置であって、原稿を読み取って画像データを生成する読取手段と、前記原稿の傾きを検出する傾き検出手段と、前記傾き検出手段で検出された傾きに基づいて、前記画像データが表す画像の傾きを補正する傾き補正手段と、前記傾き補正手段により傾きが補正された前記画像上において前記原稿の地色を検出する地色検出手段と、前記地色検出手段で検出された地色に基づいて、傾き補正前の前記画像、及び傾き補正後の前記画像のうち少なくとも一方の画像の地色を補正する地色補正手段と、を備える。
傾きを補正した画像上には原稿外の領域が少なくなるので、原稿外の領域の色を地色として誤検出してしまうことを低減できる。
よってこの発明によると、原稿が傾いていても地色を精度よく検出できる。
According to a first aspect of the present invention, there is provided an image reading apparatus based on a reading unit that reads an original to generate image data, an inclination detecting unit that detects an inclination of the original, and an inclination detected by the inclination detecting unit. Inclination correction means for correcting the inclination of the image represented by the image data; ground color detection means for detecting the background color of the document on the image whose inclination is corrected by the inclination correction means; and the ground color detection means. And a ground color correction unit that corrects a ground color of at least one of the image before tilt correction and the image after tilt correction based on the ground color detected in step (b).
Since the area outside the document is reduced on the image whose inclination is corrected, it is possible to reduce erroneous detection of the color of the area outside the document as the ground color.
Therefore, according to the present invention, it is possible to accurately detect the ground color even when the document is inclined.

第2の発明は、第1の発明の画像読取装置であって、前記地色検出手段は、前記傾き補正手段により傾きが補正された前記画像の所定のライン上において前記原稿の地色を検出する。
この発明によると、所定のライン上において地色を検出するので、画像全体から地色を検出する場合に比べて少ない処理量で地色を検出できる。
A second invention is the image reading apparatus according to the first invention, wherein the ground color detecting means detects the ground color of the document on a predetermined line of the image whose inclination is corrected by the inclination correcting means. To do.
According to the present invention, since the ground color is detected on a predetermined line, the ground color can be detected with a smaller processing amount than in the case where the ground color is detected from the entire image.

第3の発明は、第2の発明の画像読取装置であって、前記所定のラインは、前記画像の先端近傍である。
画像の先端近傍には原稿に描かれた画像が存在する可能性が少ないので、先端近傍のライン上で地色を検出するようにすると、地色をより精度よく検出できる。
A third invention is the image reading apparatus according to the second invention, wherein the predetermined line is near the tip of the image.
Since there is little possibility that an image drawn on the document exists near the leading edge of the image, the ground color can be detected with higher accuracy by detecting the ground color on the line near the leading edge.

第4の発明は、第2又は第3の発明の画像読取装置であって、前記所定のラインは、複数のラインである。
複数のラインに基づいて原稿の地色を検出するようにすると、より精度よく地色を検出できる。
A fourth invention is the image reading apparatus of the second or third invention, wherein the predetermined line is a plurality of lines.
If the background color of the document is detected based on a plurality of lines, the background color can be detected with higher accuracy.

第5の発明は、第2〜第4のいずれかの発明の画像読取装置であって、前記地色検出手段は、前記ライン上の色のうち最も明るい色を地色として検出する。
画像読取装置で読み取る原稿は、例えば地色が白(明るい色)で文字が黒(暗い色)の文書原稿などのように、地色が最も明るい色であることが多い。このため、最も明るい色を地色として検出するようにすると、高い確率で地色を検出できる。
A fifth invention is the image reading apparatus according to any one of the second to fourth inventions, wherein the ground color detecting means detects the brightest color among the colors on the line as a ground color.
An original read by an image reading apparatus is often the lightest background color, such as a document original having a white background (light color) and black characters (dark color). For this reason, if the brightest color is detected as the ground color, the ground color can be detected with high probability.

第6の発明は、第1〜第5のいずれかの発明の画像読取装置であって、前記画像の傾きを補正する傾き補正モードを設定するための設定手段を備え、前記傾き補正モードが設定されている場合に、傾き補正後の前記画像の地色を補正する。
傾き補正モードが設定されている場合には、地色を補正するか否かによらずユーザが画像の傾きを補正したい可能性が高いので、地色補正のための傾き補正が原因で待たされていると感じる負担を低減することができる。また、傾き補正後の画像の地色が補正されるので、傾き補正及び地色補正を施された画像を得ることができる。
A sixth invention is the image reading apparatus according to any one of the first to fifth inventions, comprising setting means for setting an inclination correction mode for correcting the inclination of the image, wherein the inclination correction mode is set. If so, the ground color of the image after the inclination correction is corrected.
When the tilt correction mode is set, there is a high possibility that the user wants to correct the tilt of the image regardless of whether or not the ground color is corrected. Can reduce the burden of feeling. Further, since the ground color of the image after tilt correction is corrected, an image subjected to tilt correction and ground color correction can be obtained.

第7の発明は、第1〜第6のいずれかの発明の画像読取装置であって、前記地色補正手段は、少なくとも前記画像において前記地色検出手段で検出された地色と同じ色を他の色に変換する。
例えば新聞などのように灰色の地色に黒色で文字が印刷されているような原稿を読み取ると、地色と文字との明暗差が小さいことにより、画像上において文字が読み難く感じられる場合がある。このような場合には、例えば画像において灰色(地色)を白色(他の色)に変換する補正を行うことにより、文字を読み易くすることができる。
A seventh invention is the image reading apparatus according to any one of the first to sixth inventions, wherein the ground color correcting means has at least the same color as the ground color detected by the ground color detecting means in the image. Convert to another color.
For example, if you scan a manuscript with black characters printed on a gray background, such as a newspaper, the character may appear difficult to read on the image due to the small contrast between the characters and the background color. is there. In such a case, for example, by correcting the gray (ground color) to white (other colors) in the image, it is possible to make the characters easier to read.

第8の発明は、画像形成装置であって、第1〜第7のいずれかの発明の画像読取装置と、前記画像読取装置で生成された画像データに基づいて被記録媒体に画像を形成する画像形成手段と、を備える。
この発明によると、原稿が傾いていても地色を精度よく検出できる。
An eighth invention is an image forming apparatus, and forms an image on a recording medium based on the image reading apparatus according to any one of the first to seventh inventions and image data generated by the image reading apparatus. Image forming means.
According to the present invention, the ground color can be accurately detected even when the document is inclined.

本発明によれば、原稿が傾いていても地色を精度よく検出できる。   According to the present invention, it is possible to accurately detect the ground color even when the document is inclined.

本発明の一実施形態に係る画像読取装置の模式図。1 is a schematic diagram of an image reading apparatus according to an embodiment of the present invention. 画像読取装置の電気的構成を示すブロック図。FIG. 3 is a block diagram showing an electrical configuration of the image reading apparatus. 地色補正を説明するためのグラフ。A graph for explaining ground color correction. 画像読取装置を上方から見た模式図。The schematic diagram which looked at the image reading apparatus from the upper part. 画像データが表す画像の模式図。The schematic diagram of the image which image data represents. 原稿を読み取る処理のフローチャート。10 is a flowchart of processing for reading a document. 画像データの傾きの補正を説明するための模式図。The schematic diagram for demonstrating the correction | amendment of the inclination of image data.

<実施形態1>
本発明の実施形態1を図1ないし図7によって説明する。
(1)画像読取装置の構成
図1は、イメージスキャナ1(画像読取装置の一例)の模式図である。イメージスキャナ1は所謂フラットベッド(FB)型のスキャナ装置として構成されており、原稿が載置されるプラテンガラス13を有する装置本体3と、装置本体3の上方に開閉可能に設けられたFBカバー5とを備えて構成されている。
<Embodiment 1>
A first embodiment of the present invention will be described with reference to FIGS.
(1) Configuration of Image Reading Device FIG. 1 is a schematic diagram of an image scanner 1 (an example of an image reading device). The image scanner 1 is configured as a so-called flat bed (FB) type scanner device, and includes an apparatus main body 3 having a platen glass 13 on which an original is placed, and an FB cover provided above the apparatus main body 3 so as to be openable and closable. 5.

装置本体3は、第一の読取面11と第二の読取面12とを構成するプラテンガラス13と、プラテンガラス13を支持する筐体20と、第一の読取面11に載置される原稿の位置決めを行うための位置決め部材17と、所定の反射率を有する白基準板19と、読取デバイス21と、読取デバイス21を移動させるFBモータ23及びベルト機構部25と、を備えている。   The apparatus body 3 includes a platen glass 13 that constitutes a first reading surface 11 and a second reading surface 12, a housing 20 that supports the platen glass 13, and a document placed on the first reading surface 11. , A white reference plate 19 having a predetermined reflectance, a reading device 21, an FB motor 23 that moves the reading device 21, and a belt mechanism 25.

プラテンガラス13の表面は、筐体20に対して着脱自在に設けられた位置決め部材17によって第一の読取面11と第二の読取面12とに分割されている。第一の読取面11は利用者が表面に載置した原稿を読み取るための領域であり、FBカバー5が閉じられた状態でFBカバー5により被覆される。第二の読取面12はFBカバー5に設けられたADF40(Auto Document Feeder)により搬送されてきた原稿Pを読み取るための領域である。   The surface of the platen glass 13 is divided into a first reading surface 11 and a second reading surface 12 by a positioning member 17 that is detachably attached to the housing 20. The first reading surface 11 is an area for a user to read a document placed on the surface, and is covered with the FB cover 5 with the FB cover 5 closed. The second reading surface 12 is an area for reading a document P conveyed by an ADF 40 (Auto Document Feeder) provided on the FB cover 5.

読取デバイス21(読取手段の一例)は、プラテンガラス13の裏面において、プラテンガラス13の盤面に平行な副走査方向(図中のD方向)に移動可能に収容されている。読取デバイス21は、ベルト機構部25が備える一対のローラ25aに掛け回されたベルト25bに固定されており、FBモータ23が発生する動力により回転するベルト25bと共に、副走査方向に移動する。   A reading device 21 (an example of a reading unit) is accommodated on the back surface of the platen glass 13 so as to be movable in a sub-scanning direction (D direction in the drawing) parallel to the platen surface of the platen glass 13. The reading device 21 is fixed to a belt 25b wound around a pair of rollers 25a provided in the belt mechanism unit 25, and moves in the sub-scanning direction together with the belt 25b that is rotated by the power generated by the FB motor 23.

白基準板19は、位置決め部材17とプラテンガラス13との間に、紙面に垂直な主走査方向に延びる姿勢で配置されている。白基準板19は反射率の高い白色の部材であり、光源22(図2参照)の光量調整やシェーディング補正のための白レベルデータの生成に用いられる。   The white reference plate 19 is disposed between the positioning member 17 and the platen glass 13 in a posture extending in the main scanning direction perpendicular to the paper surface. The white reference plate 19 is a white member having a high reflectance, and is used to generate white level data for light amount adjustment and shading correction of the light source 22 (see FIG. 2).

FBカバー5に設けられたADF40の動作によって第二の読取面12上に搬送されてきた原稿Pを読み取る際、読取デバイス21は第二の読取面12下に移動されて停止する。また、第一の読取面11上の原稿を読み取る際、読取デバイス21はFBモータ23及びベルト機構部25の動作により第一の読取面11の裏面側を副走査方向に搬送される。   When reading the document P conveyed on the second reading surface 12 by the operation of the ADF 40 provided on the FB cover 5, the reading device 21 is moved below the second reading surface 12 and stopped. Further, when reading a document on the first reading surface 11, the reading device 21 is conveyed in the sub-scanning direction on the back side of the first reading surface 11 by operations of the FB motor 23 and the belt mechanism unit 25.

FBカバー5は、前述したようにADF40を備えており、次のように、給紙トレイ41に載置された原稿Pを、第二の読取面12上に搬送し、第二の読取面12上で読取デバイス21により読み取られた原稿Pを排紙トレイ42に排出する。   The FB cover 5 includes the ADF 40 as described above, and conveys the original P placed on the paper feed tray 41 onto the second reading surface 12 as described below, and the second reading surface 12. The original P read by the reading device 21 is discharged onto a paper discharge tray 42.

ADF40は、搬送路の始点に、給紙ローラ44、45を備えており、給紙トレイ41に載置された原稿は給紙ローラ44、45によって搬送路下流に搬送される。給紙ローラ44、45により搬送されてきた原稿Pは、搬送ローラ47、48により、更に搬送路下流に搬送される。   The ADF 40 includes paper feed rollers 44 and 45 at the start point of the transport path, and the document placed on the paper feed tray 41 is transported downstream of the transport path by the paper feed rollers 44 and 45. The original P conveyed by the paper feed rollers 44 and 45 is further conveyed downstream of the conveyance path by the conveyance rollers 47 and 48.

搬送路において搬送ローラ47、48より下流側には、第二の読取面12と所定の空隙を有した状態で、第二の読取面12に対抗する上板49が設けられている。搬送ローラ47、48により搬送されてきた原稿Pは、上板49と第二の読取面12との間を通過して、それより更に搬送路下流に設けられた一対の搬送ローラ51、52によって搬送され、続いて、一対の排紙ローラ51、52によって、排紙トレイ42に排紙される。   An upper plate 49 that opposes the second reading surface 12 is provided downstream of the conveying rollers 47 and 48 in the conveying path with a predetermined gap from the second reading surface 12. The document P conveyed by the conveyance rollers 47 and 48 passes between the upper plate 49 and the second reading surface 12, and is further moved by a pair of conveyance rollers 51 and 52 provided further downstream in the conveyance path. Then, the paper is discharged onto a paper discharge tray 42 by a pair of paper discharge rollers 51 and 52.

(2)イメージスキャナの電気的構成
図2は、イメージスキャナ1の電気的構成を示すブロック図である。イメージスキャナ1は、ASIC100、CPU101、ROM102、RAM103、EEPROM104、FBモータ23、FBモータ駆動回路105、ADFモータ110、ADFモータ駆動回路106、読取デバイス21、電流制御回路121、A/D変換回路123、操作部130などを備えて構成されている。
(2) Electrical Configuration of Image Scanner FIG. 2 is a block diagram showing the electrical configuration of the image scanner 1. The image scanner 1 includes an ASIC 100, a CPU 101, a ROM 102, a RAM 103, an EEPROM 104, an FB motor 23, an FB motor driving circuit 105, an ADF motor 110, an ADF motor driving circuit 106, a reading device 21, a current control circuit 121, and an A / D conversion circuit 123. The operation unit 130 is provided.

図示するようにASIC100(傾き補正手段、地色補正手段の一例)には、FBモータ駆動回路105、ADFモータ駆動回路106、電流制御回路121、A/D変換回路123、操作部130等が接続されている。ASIC100はCPU101の制御の下でこれらを制御するとともに、A/D変換回路123から出力された画素値にシェーディング補正、ガンマ補正、傾き補正、地色補正、色空間変換、その他各種の画像処理を施し、画素毎にRGB3つの画素値を持つ画像データを生成する。   As shown in the figure, an FB motor drive circuit 105, an ADF motor drive circuit 106, a current control circuit 121, an A / D conversion circuit 123, an operation unit 130, and the like are connected to the ASIC 100 (an example of an inclination correction unit and a ground color correction unit). Has been. The ASIC 100 controls these under the control of the CPU 101 and performs shading correction, gamma correction, inclination correction, ground color correction, color space conversion, and other various image processing on the pixel values output from the A / D conversion circuit 123. And image data having three pixel values of RGB for each pixel is generated.

読取デバイス21は、主走査方向に複数の受光素子が一列に配列されたラインセンサ26、及び、赤色(R)の光を発する複数のLEDがラインセンサ26の延伸方向に1列に配列された光源22Rと、緑色(G)の光を発する複数のLEDが1列に配列された光源22Gと、青色(B)の光を発する複数のLEDが1列に配列された光源22Bとで構成される光源22を備えている。各光源22R、22G、22Bは電流制御回路121から供給された電流の大きさに応じた明るさ(光源22の光度、あるいは光源22の発光光量ということもできる)で点灯する。読取デバイス21は、光源22からの光に照射された原稿によって反射された反射光をラインセンサ26により受光し、ラインセンサ26の各受光素子に蓄積された電荷に応じた電圧を出力する。   The reading device 21 includes a line sensor 26 in which a plurality of light receiving elements are arranged in a row in the main scanning direction, and a plurality of LEDs that emit red (R) light in a row in the extending direction of the line sensor 26. A light source 22R, a light source 22G in which a plurality of LEDs emitting green (G) light are arranged in a row, and a light source 22B in which a plurality of LEDs emitting blue (B) light are arranged in a row. The light source 22 is provided. Each of the light sources 22R, 22G, and 22B is lit with brightness according to the magnitude of the current supplied from the current control circuit 121 (also referred to as the light intensity of the light source 22 or the light emission amount of the light source 22). The reading device 21 receives the reflected light reflected by the original irradiated with the light from the light source 22 by the line sensor 26 and outputs a voltage corresponding to the electric charge accumulated in each light receiving element of the line sensor 26.

電流制御回路121には、光源22が接続されている。電流制御回路121は、ASIC100から出力されるPWM信号に基づいて光源22に電流を供給する。   A light source 22 is connected to the current control circuit 121. The current control circuit 121 supplies current to the light source 22 based on the PWM signal output from the ASIC 100.

A/D変換回路123は、読取デバイス21から出力される電圧のゲイン調整を行い、増幅した電圧をデジタルの出力値(画素値)に変換する回路である。
操作部130(設定手段)は、装置本体3の前方に設けられており、各種の操作スイッチを備えている。利用者は操作部130を操作することにより、画像の傾きを補正する傾き補正モードの設定や読み取りの指示などを行うことができる。
The A / D conversion circuit 123 is a circuit that adjusts the gain of the voltage output from the reading device 21 and converts the amplified voltage into a digital output value (pixel value).
The operation unit 130 (setting unit) is provided in front of the apparatus main body 3 and includes various operation switches. By operating the operation unit 130, the user can set an inclination correction mode for correcting the inclination of the image, instruct reading, and the like.

CPU101(傾き検出手段、地色検出手段の一例)は、ROM102に格納されているプログラムを実行することによりイメージスキャナ1の各部を制御する。   A CPU 101 (an example of an inclination detection unit and a background color detection unit) controls each unit of the image scanner 1 by executing a program stored in the ROM 102.

RAM103は、CPU101が各種の処理を実行するための主記憶装置として用いられる。また、RAM103はA/D変換回路123から出力された画像データを一時的に記憶する画像処理バッファ、傾き補正された後の画像データを一時的に記憶する傾き補正後バッファ、生成された画像を保存する画像保存バッファ、その他各種のバッファとしても用いられる。これらのバッファはリングバッファとして構成される。   The RAM 103 is used as a main storage device for the CPU 101 to execute various processes. The RAM 103 is an image processing buffer that temporarily stores the image data output from the A / D conversion circuit 123, a tilt-corrected buffer that temporarily stores the image data after tilt correction, and the generated image. It is also used as an image storage buffer for saving and other various buffers. These buffers are configured as ring buffers.

(3)地色補正の概要
例えば、灰色の地色に黒色で文字が形成されている原稿の場合、灰色と黒色との明暗差が小さいことにより、人によっては文字が読み難く感じられる場合がある。このような場合、地色である灰色を白色(より明るい色)に変換すると、地色と文字との明暗差がよりはっきりすることにより、文字が読み易くなる。
(3) Outline of ground color correction For example, in the case of a manuscript in which characters are formed in black on a gray ground color, the character may be difficult to read depending on the person because of the small contrast between gray and black. is there. In such a case, if the ground color gray is converted to white (brighter color), the difference in brightness between the ground color and the character becomes clearer, and the character becomes easier to read.

そこで、本実施形態では、原稿を読み取って生成した画像データが表す画像において最も明るい色(上記の例では灰色)をその原稿の地色と仮定し、画像上の地色をより明るい色に変換する地色補正を行う。   Therefore, in this embodiment, the lightest color (gray in the above example) in the image represented by the image data generated by reading the document is assumed to be the ground color of the document, and the ground color on the image is converted to a lighter color. Perform background color correction.

理解を容易にするため、本実施形態では画素毎に一つの画素値を持つモノクロ画像を例に説明する。なお、モノクロ画像はRGB3つの画素値が互いに等しい画像であってもよい。
また、本実施形態では画素値を8ビット(0〜255)で表現するものとし、白色を表す画素の画素値を255、黒色を表す画素の画素値を0で表すものとする。そして、画素値が255に近い色ほど明るい色であるとする。
In order to facilitate understanding, in the present embodiment, a monochrome image having one pixel value for each pixel will be described as an example. Note that the monochrome image may be an image in which three pixel values of RGB are equal to each other.
In this embodiment, the pixel value is expressed by 8 bits (0 to 255), the pixel value of a pixel representing white is represented by 255, and the pixel value of a pixel representing black is represented by 0. It is assumed that the color whose pixel value is closer to 255 is brighter.

図3は地色補正を説明するためのグラフである。図3において実線61は地色補正前の画素値と地色補正後の画素値との関係を示している。破線62は比較例であり、地色補正をしなかった場合を示している。地色補正をしなかった場合には、画素値は変化しない。   FIG. 3 is a graph for explaining ground color correction. In FIG. 3, a solid line 61 indicates the relationship between the pixel value before ground color correction and the pixel value after ground color correction. A broken line 62 is a comparative example, and shows a case where the ground color correction is not performed. When the ground color correction is not performed, the pixel value does not change.

以下に示す式1は、本実施形態に係る地色の補正式を示している。
f(x)=(255/地色値)×x ・・・ 式1
地色値とは地色の画素値のことをいう。式1によれば、補正前の画素値xが地色値である場合には、補正後の画素値f(x)は以下の式2に示すように255となる。
f(x)=(255/地色値)×地色値=255 ・・・ 式2
このように式1によれば、地色を表す画素の色は白色(255)に変換される。
Formula 1 shown below shows a ground color correction formula according to this embodiment.
f (x) = (255 / ground color value) × x Equation 1
The ground color value is a pixel value of the ground color. According to Equation 1, when the pixel value x before correction is a ground color value, the pixel value f (x) after correction is 255 as shown in Equation 2 below.
f (x) = (255 / ground color value) × ground color value = 255 Formula 2
Thus, according to Equation 1, the color of the pixel representing the ground color is converted to white (255).

本実施形態では地色のみを補正するのではなく、地色以外の色についても式1により補正することにより、地色を補正した比と同じ比で他の色に変換する。つまり、本実施形態では地色以外の色も地色の補正に応じて補正される。ただし、上述した例のように文字が黒の場合は画素値が0(零)、あるいはほぼ0であるので、補正しても画素値はほとんど変化しないことになる。   In the present embodiment, not only the ground color is corrected, but the colors other than the ground color are also corrected by Equation 1, so that the ground color is converted into another color at the same ratio as the corrected ratio. That is, in the present embodiment, colors other than the ground color are also corrected according to the ground color correction. However, when the character is black as in the above-described example, the pixel value is 0 (zero) or almost 0, and therefore the pixel value hardly changes even if correction is performed.

(4)原稿の読取処理
図4は、イメージスキャナ1を上方から見た模式図であって、原稿Wが主走査方向に対して傾いて載置されている様子を示している。
図5は、図4に示す原稿を読み取って画像処理バッファに記憶されている画像データが表す画像64を示す模式図である。本実施形態では画像処理バッファのバッファ容量は16ライン分であるとする。イメージスキャナ1は、原稿を読み取るとき原稿を含む矩形の読取対象領域を読み取る。この場合、原稿が傾いていない場合はその読取対象領域に原稿外の領域は含まれず、原稿のみが読み取られ、画像データが表す画像には原稿外の領域は含まれない。これに対し、原稿が傾いて載置されている場合には、読取対象領域に原稿外の領域が含まれてしまい、図5に示すように画像64にFBカバー5の裏面を表す領域65(原稿外領域)が含まれる。FBカバー5の裏面は一般に白色であるので、原稿外領域65の色は白色である。なお、イメージスキャナ1によって読み取られる原稿を含む矩形の領域において、矩形の短辺及び長辺は、各々、主走査方向または副走査方向と平行となる。
(4) Document Reading Process FIG. 4 is a schematic view of the image scanner 1 as viewed from above, and shows a state in which the document W is placed inclined with respect to the main scanning direction.
FIG. 5 is a schematic diagram illustrating an image 64 represented by image data stored in the image processing buffer by reading the document illustrated in FIG. 4. In this embodiment, it is assumed that the buffer capacity of the image processing buffer is 16 lines. When reading an original, the image scanner 1 reads a rectangular reading target area including the original. In this case, when the document is not tilted, the area to be read does not include the area outside the document, only the document is read, and the image represented by the image data does not include the area outside the document. On the other hand, when the document is placed at an angle, the area outside the document is included in the read target area, and an area 65 (representing the back surface of the FB cover 5 is displayed on the image 64 as shown in FIG. Area outside the document). Since the back surface of the FB cover 5 is generally white, the color of the outside area 65 is white. Note that, in the rectangular area including the document read by the image scanner 1, the short side and the long side of the rectangle are parallel to the main scanning direction or the sub-scanning direction, respectively.

図5において複数の破線66はそれぞれ一つのラインを示している。本実施形態においてラインとは、主走査方向に相当する方向に並ぶ画素列のことをいうものとする。なお、ラインは、読取デバイス21が1ライン分の原稿を読み取って出力した画素列ということもできる。なお、副走査方向に相当する方向に並ぶ画素列をラインといってもよい。
仮に画像64のいずれかのライン66上において原稿の地色(最も大きい画素値)を検出したとすると、原稿が傾いて載置されている場合にはいずれのライン66上にも原稿外領域65があることにより、白色(FBカバー5の裏面の色)が地色として検出されてしまうことになる。
そこで、本実施形態では、画像64の傾きを補正してから地色を補正する。
In FIG. 5, a plurality of broken lines 66 each indicate one line. In the present embodiment, a line refers to a pixel row arranged in a direction corresponding to the main scanning direction. Note that a line can also be referred to as a pixel row that the reading device 21 reads and outputs a document for one line. Note that pixel rows arranged in a direction corresponding to the sub-scanning direction may be referred to as a line.
Assuming that the background color (largest pixel value) of the document is detected on any line 66 of the image 64, the document outside area 65 is placed on any line 66 when the document is placed at an angle. Therefore, white (the color of the back surface of the FB cover 5) is detected as the ground color.
Therefore, in the present embodiment, the ground color is corrected after correcting the inclination of the image 64.

図6は、原稿を読み取る処理のフローチャートである。利用者は原稿の傾き補正をしたい場合は操作部130を操作して傾き補正モードを設定し、傾き補正をしなくてよい場合は傾き補正モードを設定せずに原稿の読み取りを指示する。利用者が原稿の読み取りを指示すると本処理が開始される。
以下の説明では、プラテンガラス13の第一の読取面11に載置されている原稿を読み取ることを「FBスキャン」といい、ADF40により原稿を搬送して読み取ることを「ADFスキャン」という。ここではFBスキャンを例に説明する。
FIG. 6 is a flowchart of processing for reading a document. When the user wants to correct the inclination of the document, he / she operates the operation unit 130 to set the inclination correction mode, and when it is not necessary to correct the inclination, the user instructs reading of the original without setting the inclination correction mode. This process is started when the user instructs reading of the document.
In the following description, reading a document placed on the first reading surface 11 of the platen glass 13 is referred to as “FB scan”, and reading a document conveyed by the ADF 40 is referred to as “ADF scan”. Here, an FB scan will be described as an example.

S101では、CPU101は傾き補正モードが設定されているか否かを判定し、設定されている場合はS102に進み、設定されていない場合はS110に進む。
S102では、CPU101は読取デバイス21により原稿の先端から1ラインずつ原稿を読み取る。読取デバイス21は原稿を所定ライン分(例えば8ライン分)読み取ると、読み取った画像データを画像処理バッファに転送する。
In S101, the CPU 101 determines whether or not the tilt correction mode is set. If it is set, the process proceeds to S102, and if it is not set, the process proceeds to S110.
In S <b> 102, the CPU 101 reads the document line by line from the leading edge of the document by the reading device 21. When the reading device 21 reads a document for a predetermined number of lines (for example, eight lines), it transfers the read image data to the image processing buffer.

S103では、CPU101は画像処理バッファに格納されている画像データに基づいて原稿の先端を検出する。
前述した図5はフレーム(筐体20及び位置決め部材17によって構成される原稿位置決め用の矩形枠、図4参照)の辺から離間して載置されている原稿を読み取った画像を示している。原稿がフレームの辺から離間して載置されている場合、ラインセンサ26が原稿の先端に達するまでは1ライン分の画素値は全て255またはそれに近い値となる。そして、ラインセンサ26が原稿の先端に達すると、原稿の縁に生じる影が読み取られることにより、一部の画素値が閾値(例えば128)よりも小さくなる。CPU101は閾値より小さい画素値が最初に含まれているラインを原稿の先端を表すラインと判定する。これにより原稿の先端が検出される。なお、原稿の先端を検出する方法はこれに限られるものではなく、原稿の先端を検出できれば任意の方法を用いることができる。
CPU101は原稿の先端を検出できた場合はS104に進み、検出できなかった場合は検出できるまでS102に戻って処理を繰り返す。
In step S103, the CPU 101 detects the leading edge of the document based on the image data stored in the image processing buffer.
FIG. 5 described above shows an image obtained by reading a document placed away from the side of the frame (rectangular frame for document positioning constituted by the casing 20 and the positioning member 17, see FIG. 4). When the document is placed apart from the side of the frame, the pixel values for one line are all 255 or close to the value until the line sensor 26 reaches the leading edge of the document. Then, when the line sensor 26 reaches the leading edge of the document, a shadow generated on the edge of the document is read, so that some pixel values become smaller than a threshold value (for example, 128). The CPU 101 determines that a line that first includes a pixel value smaller than the threshold is a line representing the leading edge of the document. Thereby, the leading edge of the document is detected. The method for detecting the leading edge of the document is not limited to this, and any method can be used as long as the leading edge of the document can be detected.
If the leading edge of the document can be detected, the CPU 101 proceeds to S104. If not detected, the CPU 101 returns to S102 and repeats the process until it can be detected.

S104では、CPU101は画像処理バッファに格納されている画像データに基づいて原稿の傾き角度θを検出する。
具体的には例えば、CPU101は画像処理バッファに格納されている画像64に微分フィルタを適用し、画像64上のエッジ(画素値の差が大きい画素間の境界)を表す微分画像を生成する。微分画像は図5に示す画像と実質的に同一な画像になるので図は省略する。
In S104, the CPU 101 detects the document inclination angle θ based on the image data stored in the image processing buffer.
Specifically, for example, the CPU 101 applies a differential filter to the image 64 stored in the image processing buffer, and generates a differential image representing an edge on the image 64 (a boundary between pixels having a large pixel value difference). The differential image is substantially the same as the image shown in FIG.

原稿の辺は微分画像上において直線状のエッジとして表れる。原稿が傾いて載置されている場合はこのエッジも傾いていることになる。CPU101は先ず直線状のエッジを検出する。そして、直線状のエッジが検出された場合には、CPU101はそれが原稿の辺を表すエッジであるか否かを判断するために、そのエッジの長さが原稿の幅と合致するか否かを判断する。CPU101は直線状のエッジの長さが原稿の幅と合致すれば原稿の辺と判断し、その直線状のエッジの傾き角度θを求める。これにより原稿の傾き角度θが検出される。   The sides of the document appear as straight edges on the differential image. If the document is placed at an angle, this edge is also inclined. First, the CPU 101 detects a linear edge. If a straight edge is detected, the CPU 101 determines whether or not the length of the edge matches the width of the document in order to determine whether or not the edge represents the side of the document. Judging. If the length of the straight edge matches the width of the document, the CPU 101 determines that the side of the document is an edge, and obtains the inclination angle θ of the straight edge. As a result, the inclination angle θ of the document is detected.

なお、本実施形態では画像処理バッファの容量を16ライン分としているが、画像処理バッファの容量が少ないと原稿の辺が画像64内に収まらず、それにより傾き角度θの検出が煩雑になってしまう虞があるので、画像処理バッファの容量は傾いた原稿の少なくとも一辺が画像64内に収まるようある程度余裕をもった容量にすることが望ましい。
また、原稿の辺を表すエッジを検出する方法はこれに限られず、例えばフレームの各辺に最も近い直線状のエッジをそれぞれ原稿の辺を表すエッジとしてもよい。
In this embodiment, the capacity of the image processing buffer is set to 16 lines. However, if the capacity of the image processing buffer is small, the sides of the original do not fit in the image 64, which makes it difficult to detect the tilt angle θ. Therefore, it is desirable that the capacity of the image processing buffer has a certain margin so that at least one side of the tilted original can be accommodated in the image 64.
Further, the method for detecting the edge representing the side of the document is not limited to this, and for example, a straight edge closest to each side of the frame may be used as an edge representing the side of the document.

CPU101は、原稿の傾き角度θを検出できた場合はS105に進む。原稿の傾き角度θを検出できなかった場合(原稿の幅と合致する長さのエッジを検出できなかった場合)は、CPU101は読取デバイス21により次の8ライン分の画像データが読み取られて画像処理バッファに格納されるまで待機し、次の8ライン分の画像データが画像処理バッファに格納された後にS104の処理を繰り返す。   If the CPU 101 has detected the document inclination angle θ, the CPU 101 proceeds to S105. When the inclination angle θ of the original cannot be detected (when an edge having a length that matches the width of the original cannot be detected), the CPU 101 reads image data for the next eight lines by the reading device 21. The process waits until it is stored in the processing buffer, and after the image data for the next eight lines is stored in the image processing buffer, the process of S104 is repeated.

S105では、ASIC100は画像64の傾きを傾き角度θに基づいて補正する。
図7は、画像64の傾き補正を説明するための模式図である。画像の傾きを補正する方法としては種々の方法が提案されているが、ここでは原稿の先端を表す画素Pを中心として各画素を傾き角度θ分だけ回転させることにより傾きを補正する場合を例に説明する。なお、傾きを補正する方法は適宜選択可能であり、これ以外の方法を用いてもよい。
In S105, the ASIC 100 corrects the inclination of the image 64 based on the inclination angle θ.
FIG. 7 is a schematic diagram for explaining the inclination correction of the image 64. Various methods have been proposed as a method for correcting the inclination of the image. Here, an example is described in which the inclination is corrected by rotating each pixel by the inclination angle θ around the pixel P representing the leading edge of the document. Explained. Note that the method of correcting the tilt can be selected as appropriate, and other methods may be used.

CPU101は、先ず画像64上において原稿の各辺を表すエッジをそれぞれ検出し、それにより画像64上の原稿領域67を特定する。次にCPU101は、特定した原稿領域67上の各画素について回転後の座標を算出し、算出した座標にその画素の画素値を設定することにより傾きが補正された画像を生成する。CPU101は傾きが補正された画像70を傾き補正後バッファに格納する。画像70において原稿領域67以外の領域はまだ画素値が確定していない領域である。   The CPU 101 first detects an edge representing each side of the document on the image 64, thereby specifying the document region 67 on the image 64. Next, the CPU 101 calculates the coordinates after rotation for each pixel on the specified document area 67, and sets the pixel value of the pixel to the calculated coordinates to generate an image with corrected inclination. The CPU 101 stores the tilt-corrected image 70 in the tilt-corrected buffer. In the image 70, the area other than the document area 67 is an area for which the pixel value has not yet been determined.

S106では、CPU101は傾き補正後バッファに格納されている画像70上(画素値が確定していない領域は除く)において原稿の地色を検出する。傾き補正後バッファに格納されている画像70には原稿外領域65は含まれないので、画像70上で原稿の地色を検出するようにすると、原稿外領域65の白色を地色として検出してしまわないようにすることができる。   In step S <b> 106, the CPU 101 detects the background color of the document on the image 70 stored in the post-tilt correction buffer (excluding areas where pixel values are not determined). Since the image outside area 65 is not included in the image 70 stored in the post-tilt correction buffer, when the background color of the document is detected on the image 70, the white color of the outside area 65 is detected as the background color. You can avoid it.

ただし、原稿には主走査方向全体に亘って延びる罫線や帯が形成されている場合があり、そのような罫線や帯を表しているライン上で地色を検出すると地色を誤検出してしまうことになる。ところで、一般に罫線や帯などは原稿の先端から原稿の内側にある程度離間して形成されていることが多い。このため、原稿の先端近傍のライン上で地色を検出するようにすれば、罫線や帯によって地色を誤検出してしまう虞を低減できる。そこで、CPU101は、原稿の先端近傍のライン上で原稿の地色を検出する。   However, the original may have ruled lines and bands extending in the entire main scanning direction. If a background color is detected on a line representing such a ruled line or band, the background color is erroneously detected. Will end up. Incidentally, in general, ruled lines, bands, and the like are often formed at a certain distance from the leading edge of the document to the inside of the document. For this reason, if the ground color is detected on the line near the leading edge of the document, it is possible to reduce the possibility that the ground color is erroneously detected due to ruled lines or bands. Therefore, the CPU 101 detects the background color of the document on a line near the leading edge of the document.

図7に示す画像70において破線68は先端ラインを示している。原稿の先端近傍のラインは、先端ライン68そのものであってもよいし、先端ライン68の次のライン、あるいはその次のラインなどのように、一般に罫線や帯が形成される可能性の低いラインであれば、先端ライン68以外のラインであってもよい。
また、地色を検出するラインの数は1本に限られず、2〜3本などのように複数のラインであってもよい。複数のラインから原稿の地色を検出する場合は、それら複数のライン上において最も大きい画素値を地色として検出すればよい。
In the image 70 shown in FIG. 7, a broken line 68 indicates a tip line. The line in the vicinity of the front end of the document may be the front end line 68 itself, or a line that is generally unlikely to form a ruled line or a band, such as a line next to the front end line 68 or the next line. If so, it may be a line other than the tip line 68.
Further, the number of lines for detecting the ground color is not limited to one, but may be a plurality of lines such as two to three. When the ground color of the document is detected from a plurality of lines, the largest pixel value on the plurality of lines may be detected as the ground color.

また、地色を検出する場合、最も大きい1つの画素値を地色としてもよいし、上位所定数の画素値の平均値を地色としてもよい。上位所定数の画素値の平均値を地色とするようにすると、読取デバイス21から出力された電圧に電気的なノイズが影響した場合などのように画素値が何らかの外的要因の影響を受けていても地色をより安定して検出できる。   When detecting the ground color, the largest pixel value may be the ground color, or the average value of the upper predetermined number of pixel values may be the ground color. When the average value of the upper predetermined number of pixel values is set as the ground color, the pixel value is affected by some external factor, such as when electrical noise affects the voltage output from the reading device 21. The ground color can be detected more stably.

S107では、ASIC100は傾き補正後バッファに格納されている画像70を構成する各画素(画素値が確定していない画素は除く)の画素値を式1に基づいて補正し、地色補正後の画像データを画像保存バッファに転送する。   In S107, the ASIC 100 corrects the pixel value of each pixel (excluding pixels for which the pixel value is not determined) included in the image 70 stored in the post-tilt correction buffer based on Equation 1, and after the ground color correction Transfer the image data to the image storage buffer.

S108では、ASIC100は読取デバイス21により次の8ライン分の画像データが読み取られて画像処理バッファに格納されるまで待機し、次の8ライン分の画像データが画像処理バッファに格納されると、S105及びS107と同様にして傾き補正及び地色補正を行う。なお、傾き角度、及び地色はそれぞれS104及びS106で既に検出済みであるので、傾き角度、及び地色の検出は行わない。   In S108, the ASIC 100 waits until the image data for the next eight lines is read by the reading device 21 and stored in the image processing buffer. When the image data for the next eight lines is stored in the image processing buffer, Similar to S105 and S107, tilt correction and ground color correction are performed. Since the inclination angle and the ground color have already been detected in S104 and S106, the inclination angle and the ground color are not detected.

S109では、CPU101は原稿の読み取りが終了したか否かを判断する。原稿の読み取りが終了した場合は原稿の縁に生じる影が読み取られないことにより1ライン分の画素値が全て255(あるいはその近傍)になる。このため、CPU101は画像処理バッファに格納されている画像データにおいて1ライン分の画素値が全て255であるラインがある場合は、原稿の読み取りが終了したとして処理を終了する。なお、原稿の読み取りの終了を判断する方法はこれに限られるものではなく、原稿の読み取りの終了を検出できれば任意の方法を用いることができる。
原稿の読み取りが終了していない場合は、CPU101はS108に戻って原稿の読み取りが終了するまで処理を繰り返す。
In step S109, the CPU 101 determines whether the reading of the document has been completed. When the reading of the original is completed, the shadows generated at the edges of the original are not read, so that the pixel values for one line are all 255 (or the vicinity thereof). For this reason, if there is a line in which the pixel values for one line are all 255 in the image data stored in the image processing buffer, the CPU 101 ends the process on the assumption that the reading of the document has ended. Note that the method for determining the end of reading of the document is not limited to this, and any method can be used as long as the end of reading of the document can be detected.
If the reading of the document is not completed, the CPU 101 returns to S108 and repeats the process until the reading of the document is completed.

S110では、CPU101は読取デバイス21に原稿を読み取らせる。S110では傾き補正をしないので、読み取られた画像は原稿外領域を含んだものとなる。また、S110では地色補正も行わない。   In S110, the CPU 101 causes the reading device 21 to read the document. Since the tilt correction is not performed in S110, the read image includes an area outside the document. In S110, ground color correction is not performed.

なお、ここではFBスキャンについて説明したがADFスキャンについても同様である。   Although the FB scan has been described here, the same applies to the ADF scan.

(5)実施形態の効果
以上説明した本発明の実施形態1に係るイメージスキャナ1によると、傾きを補正してから地色を補正する。傾きを補正した画像上には原稿外領域65がなくなるので、原稿外領域65の色を地色として誤検出してしまうことを低減できる。よってイメージスキャナ1によると、原稿が傾いていても地色を精度よく検出できる。
なお、画像の傾きを補正をする場合、例えば画像の周囲に原稿外の領域を枠状に残すようなことも考えられる。そのような場合には傾き補正後の画像に原稿外領域が残っていることになるが、少なくとも原稿外領域は少なくなるので、原稿の地色を誤検出してしまうことを低減できる
(5) Effects of the Embodiment According to the image scanner 1 according to the first embodiment of the present invention described above, the ground color is corrected after the inclination is corrected. Since the document outside area 65 is not present on the image whose inclination is corrected, it is possible to reduce erroneous detection of the color of the document outside area 65 as a ground color. Therefore, the image scanner 1 can accurately detect the ground color even when the document is inclined.
When correcting the inclination of the image, for example, it may be possible to leave an area outside the document in a frame shape around the image. In such a case, an area outside the document remains in the image after the inclination correction, but since at least the area outside the document is reduced, it is possible to reduce erroneous detection of the background color of the document.

更に、イメージスキャナ1によると、傾きが補正された画像70の所定のライン上において原稿の地色を検出するので、画像全体から地色を検出する場合に比べて少ない処理量で地色を検出できる。
また、上記実施形態においてラインとは主走査方向に相当する方向に延びるラインである。画像処理においては一般に主走査方向に相当する方向に延びるラインの単位で処理を行うので、主走査方向に相当する方向に延びるライン上で地色を検出するようにすると、傾いたライン上で地色を検出する場合に比べて簡素な処理で地色を検出できる。
Further, according to the image scanner 1, since the ground color of the document is detected on a predetermined line of the image 70 whose inclination is corrected, the ground color is detected with a smaller processing amount than when the ground color is detected from the entire image. it can.
In the above embodiment, the line is a line extending in a direction corresponding to the main scanning direction. In image processing, processing is generally performed in units of lines extending in the direction corresponding to the main scanning direction. Therefore, if the ground color is detected on the line extending in the direction corresponding to the main scanning direction, the ground is detected on the inclined line. The ground color can be detected by a simple process compared to the case of detecting the color.

更に、イメージスキャナ1によると、画像の先端近傍のライン上で地色を検出する。画像の先端近傍には原稿に描かれた画像が存在する可能性が少ないので、先端近傍のライン上で地色を検出するようにすると、地色をより精度よく検出できる。   Furthermore, according to the image scanner 1, the ground color is detected on a line near the leading edge of the image. Since there is little possibility that an image drawn on the document exists near the leading edge of the image, the ground color can be detected with higher accuracy by detecting the ground color on the line near the leading edge.

更に、イメージスキャナ1によると、複数のライン上で地色を検出するようにすることにより、地色をより安定して検出できる。   Furthermore, according to the image scanner 1, the ground color can be detected more stably by detecting the ground color on a plurality of lines.

更に、イメージスキャナ1によると、ライン上の色のうち最も明るい色を地色として検出する。画像読取装置で読み取る原稿は、例えば地色が白(明るい色)で文字が黒(暗い色)の文書原稿などのように、地色が最も明るい色であることが多い。このため、最も明るい色を地色として検出するようにすると、高い確率で地色を検出できる。   Furthermore, according to the image scanner 1, the brightest color among the colors on the line is detected as the ground color. An original read by an image reading apparatus is often the lightest background color, such as a document original having a white background (light color) and black characters (dark color). For this reason, if the brightest color is detected as the ground color, the ground color can be detected with high probability.

更に、イメージスキャナ1によると、傾き補正モードが設定されている場合には、地色を補正するか否かによらず傾きが補正される。傾き補正モードが設定されている場合には、地色を補正するか否かによらず利用者が画像の傾きを補正したい可能性が高いので、地色補正のための傾き補正が原因で待たされていると感じる負担を低減することができる。また、傾き補正後の画像の地色が補正されるので、傾き補正及び地色補正を施された画像を得ることができる。   Further, according to the image scanner 1, when the inclination correction mode is set, the inclination is corrected regardless of whether or not the ground color is corrected. When the tilt correction mode is set, there is a high possibility that the user wants to correct the tilt of the image regardless of whether or not the ground color is corrected. It is possible to reduce the burden of feeling that it is done. Further, since the ground color of the image after tilt correction is corrected, an image subjected to tilt correction and ground color correction can be obtained.

更に、イメージスキャナ1によると、画像において検出された地色と同じ色を他の色に変換する。例えば新聞などのように灰色の地色に黒色で文字が印刷されているような原稿を読み取ると、地色と文字との明暗差が小さいことにより、画像上において文字が読み難く感じられる場合がある。このような場合には、例えば画像において灰色(地色)を白色(他の色)に変換する補正を行うことにより、文字を読み易くすることができる。   Further, according to the image scanner 1, the same color as the ground color detected in the image is converted into another color. For example, if you scan a manuscript with black characters printed on a gray background, such as a newspaper, the character may appear difficult to read on the image due to the small contrast between the characters and the background color. is there. In such a case, for example, by correcting the gray (ground color) to white (other colors) in the image, it is possible to make the characters easier to read.

<他の実施形態>
本発明は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば次のような実施形態も本発明の技術的範囲に含まれる。
<Other embodiments>
The present invention is not limited to the embodiments described with reference to the above description and drawings. For example, the following embodiments are also included in the technical scope of the present invention.

(1)上記実施形態では図6のS101において「傾き補正モード」が設定されているか否かを判定しているが、「地色補正モード」を選択可能に構成し、「地色補正モード」が設定されているか否かを判定するようにしてもよい。この場合、「地色補正モード」が設定されている場合は傾き補正及び地色補正の両方が行われ、「地色補正モード」が設定されていない場合は傾き補正も地色補正も行われないことになる。 (1) In the above embodiment, it is determined whether or not the “tilt correction mode” is set in S101 of FIG. 6, but the “ground color correction mode” is selectable, and the “ground color correction mode” is selected. It may be determined whether or not is set. In this case, both the tilt correction and the ground color correction are performed when the “ground color correction mode” is set, and the tilt correction and the ground color correction are performed when the “ground color correction mode” is not set. There will be no.

(2)上記実施形態では「傾き補正モード」が設定されていないと判定した場合は傾き補正も地色補正も行わない場合を例に説明したが、「傾き補正モード」が設定されていない場合は、傾き補正については行わず、地色補正は行うようにしてもよい。この場合は、傾き補正後バッファに格納されている画像70の地色を補正するのではなく、画像処理バッファに格納されている画像64(傾き補正前の画像)の地色を補正することになる。 (2) In the above embodiment, the case where it is determined that the “tilt correction mode” is not set has been described as an example in which neither the tilt correction nor the ground color correction is performed, but the “tilt correction mode” is not set. In this case, the ground color correction may be performed without performing the inclination correction. In this case, instead of correcting the ground color of the image 70 stored in the buffer after tilt correction, the ground color of the image 64 (image before tilt correction) stored in the image processing buffer is corrected. Become.

また、「傾き補正モード」及び「地色補正モード」の両方を選択可能にしてもよい。この場合、「傾き補正モード」が設定されず、「地色補正モード」が設定されている場合は、傾き補正については行わず、地色補正は行うことになる。   Further, both “tilt correction mode” and “ground color correction mode” may be selectable. In this case, when the “tilt correction mode” is not set and the “ground color correction mode” is set, the ground color correction is performed without performing the tilt correction.

そして、この場合の地色補正では、地色を検出するためにだけ傾きを補正してもよいし、傾き補正されていない画像上で地色を検出するようにしてもよい。
地色を検出するためにだけ傾きを補正する場合は、地色を検出できさえすればよいので画像全体の傾きを補正する必要はなく、例えば原稿の先端部分のみ傾きを補正して地色を検出するようにしてもよい。
傾き補正されていない画像上で地色を検出する場合は、傾き補正を行わないので処理時間は短縮されるが、地色補正の精度は落ちることになる。
In the ground color correction in this case, the slope may be corrected only for detecting the ground color, or the ground color may be detected on an image that has not been tilt-corrected.
When correcting the inclination only to detect the background color, it is only necessary to detect the background color, so there is no need to correct the inclination of the entire image.For example, the background color is corrected by correcting the inclination only at the leading edge of the document. You may make it detect.
When a ground color is detected on an image that has not been tilt-corrected, since the tilt correction is not performed, the processing time is shortened, but the accuracy of the ground color correction is reduced.

(3)上記実施形態では地色を白色に変換する場合を例に説明したが、変換先の色は白に限られるものではなく、適宜選択可能である。 (3) In the above embodiment, the case where the ground color is converted to white has been described as an example. However, the conversion destination color is not limited to white, and can be selected as appropriate.

(4)上記実施形態では地色以外の色も補正する場合を例に説明したが、地色のみを補正するようにしてもよい。例えば、検出した地色、あるいは余裕を持たせてそれよりもやや暗い色を基準値とし、その基準値よりも明るい色(画素値が大きい画素)についてのみ式1により補正してもよい。これにより、例えば文字については色を変えることなく地色のみを灰色から白色に変換することができる。 (4) In the above embodiment, the case where a color other than the ground color is corrected has been described as an example. However, only the ground color may be corrected. For example, the detected ground color or a color slightly darker than that with a margin may be used as a reference value, and only a color brighter than the reference value (a pixel having a large pixel value) may be corrected by Equation 1. Thereby, for example, only the background color of characters can be converted from gray to white without changing the color.

(5)上記実施形態では傾きの検出及び地色の検出についてはCPUが行い、傾きの補正及び地色の補正についてはASICが行う場合を例に説明したが、これらの処理をASICが行うかCPUが行うかは適宜選択可能であり、例えばこれらの処理を全てASICで行ってもよいし、全てCPUで行ってもよい。 (5) In the above-described embodiment, an example has been described in which the CPU performs tilt detection and ground color detection, and the ASIC performs tilt correction and ground color correction. Whether it is performed by the CPU can be appropriately selected. For example, all of these processes may be performed by the ASIC or all by the CPU.

(6)上記実施形態では画像読取装置としてイメージスキャナを例に説明したが、スキャナ機能(画像読取装置の一例)、プリンタ機能(画像形成手段の一例)、コピー機能、ファクシミリ機能などを備える所謂複合機(画像形成装置の一例)に本発明を適用してもよい。 (6) Although the image scanner has been described as an example of the image reading apparatus in the above embodiment, a so-called composite having a scanner function (an example of an image reading apparatus), a printer function (an example of an image forming unit), a copy function, a facsimile function, and the like. The present invention may be applied to a machine (an example of an image forming apparatus).

1・・・イメージスキャナ(画像読取装置)
21・・・読取デバイス(読取手段)
100・・・ASIC(傾き補正手段、地色補正手段)
101・・・CPU(傾き検出手段、地色検出手段)
130・・・操作部(設定手段)
1. Image scanner (image reading device)
21: Reading device (reading means)
100... ASIC (tilt correction means, ground color correction means)
101... CPU (tilt detection means, ground color detection means)
130 ... operation unit (setting means)

Claims (7)

原稿を読み取って画像データを生成する読取手段と、
前記原稿の傾きを検出する傾き検出手段と、
前記画像の傾きを補正する傾き補正モードを設定するための設定手段と、
前記傾き補正モードが設定されている場合は、前記傾き検出手段で検出された傾きに基づいて、前記画像データが表す画像の傾きを補正し、前記傾き補正モードが設定されていない場合は、前記画像の地色を検出するために、前記傾き検出手段で検出された傾きに基づいて、前記画像データが表す画像の傾きを補正する傾き補正手段と、
前記傾き補正手段により傾きが補正された前記画像上において前記原稿の地色を検出する地色検出手段と、
前記傾き補正モードが設定されている場合は前記地色検出手段で検出された地色に基づいて傾き補正後の前記画像の地色を補正し、前記傾き補正モードが設定されていない場合は前記地色検出手段で検出された地色に基づいて傾き補正前の前記画像の地色を補正する地色補正手段と、
を備える画像読取装置。
Reading means for reading a document and generating image data;
An inclination detecting means for detecting an inclination of the original;
Setting means for setting an inclination correction mode for correcting the inclination of the image;
When the tilt correction mode is set, the tilt of the image represented by the image data is corrected based on the tilt detected by the tilt detection unit, and when the tilt correction mode is not set, Inclination correcting means for correcting the inclination of the image represented by the image data based on the inclination detected by the inclination detecting means in order to detect the ground color of the image ;
Ground color detection means for detecting the ground color of the document on the image whose inclination is corrected by the inclination correction means;
When the tilt correction mode is set, the ground color of the image after tilt correction is corrected based on the ground color detected by the ground color detection means, and when the tilt correction mode is not set, Ground color correction means for correcting the ground color of the image before inclination correction based on the ground color detected by the ground color detection means;
An image reading apparatus comprising:
請求項1に記載の画像読取装置であって、
前記地色検出手段は、前記傾き補正手段により傾きが補正された前記画像の所定のライン上において前記原稿の地色を検出する、画像読取装置。
The image reading apparatus according to claim 1,
The ground color detection unit is an image reading apparatus that detects a ground color of the document on a predetermined line of the image whose tilt is corrected by the tilt correction unit.
請求項2に記載の画像読取装置であって、
前記所定のラインは、前記画像の先端近傍である、画像読取装置。
The image reading apparatus according to claim 2,
The image reading apparatus, wherein the predetermined line is in the vicinity of the leading edge of the image.
請求項2又は請求項3に記載の画像読取装置であって、
前記所定のラインは、複数のラインである、画像読取装置。
The image reading apparatus according to claim 2 or 3, wherein
The image reading apparatus, wherein the predetermined line is a plurality of lines.
請求項2乃至請求項4のいずれか一項に記載の画像読取装置であって、
前記地色検出手段は、前記ライン上の色のうち最も明るい色を地色として検出する、画像読取装置。
An image reading apparatus according to any one of claims 2 to 4,
The ground color detection means is an image reading device that detects the brightest color among the colors on the line as a ground color.
請求項1乃至請求項5のいずれか一項に記載の画像読取装置であって、
前記地色補正手段は、前記画像において前記地色検出手段で検出された地色と同じ色を他の色に変換する、画像読取装置。
An image reading apparatus according to any one of claims 1 to 5,
The ground color correction unit converts the same color as the ground color detected by the ground color detection unit in the image into another color.
請求項1乃至請求項6のいずれか一項に記載の画像読取装置と、
前記画像読取装置で生成された画像データに基づいて被記録媒体に画像を形成する画像形成手段と、
を備える画像形成装置。
An image reading apparatus according to any one of claims 1 to 6,
Image forming means for forming an image on a recording medium based on image data generated by the image reading device;
An image forming apparatus comprising:
JP2009130395A 2009-05-29 2009-05-29 Image reading apparatus and image forming apparatus Active JP5332912B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009130395A JP5332912B2 (en) 2009-05-29 2009-05-29 Image reading apparatus and image forming apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009130395A JP5332912B2 (en) 2009-05-29 2009-05-29 Image reading apparatus and image forming apparatus

Publications (2)

Publication Number Publication Date
JP2010278859A JP2010278859A (en) 2010-12-09
JP5332912B2 true JP5332912B2 (en) 2013-11-06

Family

ID=43425387

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009130395A Active JP5332912B2 (en) 2009-05-29 2009-05-29 Image reading apparatus and image forming apparatus

Country Status (1)

Country Link
JP (1) JP5332912B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6447006B2 (en) * 2014-10-29 2019-01-09 株式会社リコー Image processing apparatus, image reading apparatus, image processing method, and image processing program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004048130A (en) * 2002-07-09 2004-02-12 Fuji Xerox Co Ltd Image processing method, image processing apparatus, and image processing program
JP4123149B2 (en) * 2003-12-15 2008-07-23 富士ゼロックス株式会社 Image processing device
JP2010021937A (en) * 2008-07-14 2010-01-28 Sharp Corp Image processing apparatus, image reading unit, image forming apparatus, image processing method, program, and recording medium thereof

Also Published As

Publication number Publication date
JP2010278859A (en) 2010-12-09

Similar Documents

Publication Publication Date Title
US8259370B2 (en) Image reading device having line sensor performing pre-scan based on condition set for main-scan
JP2008160807A (en) Image scanning device
JP6467598B2 (en) Image reading device
JP5740361B2 (en) Image reading apparatus and image forming apparatus having the same
JP4868261B2 (en) Image reading device
US9930212B2 (en) Image reading device generating black correction data for shade correction based on intermediate data acquired at different positions in the sub-scanning direction
US20220294925A1 (en) Image reading apparatus
EP1926303A1 (en) Image forming apparatus and method
US11765294B2 (en) Image reading apparatus, image reading system, and method for controlling image reading apparatus
JP5332912B2 (en) Image reading apparatus and image forming apparatus
US10122885B2 (en) Image reading device
US11196898B2 (en) Image reading apparatus, method of controlling image reading apparatus, and storage medium
JP5029924B2 (en) Image reading apparatus and image forming apparatus
JP4989121B2 (en) Image reading device
JP2021057866A (en) Image reading device and control method of the same
JP2012151644A (en) Image reader, image formation apparatus provided with image reader, and image processing method
JP2022063681A (en) Image reading device and method for controlling image reading device
JP6501125B2 (en) Image reading apparatus, image reading method, image forming apparatus, and image reading program
JP4936076B2 (en) Image reading apparatus and image reading method
JP6142810B2 (en) Reader
JP5703162B2 (en) Image reading apparatus and image forming apparatus having the same
JP2011223347A (en) Original image reading apparatus
JP2010245775A (en) Image reader
JP2008278278A (en) Image reading device
JP2018191214A (en) Image reading device and image forming apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120821

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130409

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130607

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130702

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130715

R150 Certificate of patent or registration of utility model

Ref document number: 5332912

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150