JP2018124873A - Image reading device - Google Patents

Image reading device Download PDF

Info

Publication number
JP2018124873A
JP2018124873A JP2017017752A JP2017017752A JP2018124873A JP 2018124873 A JP2018124873 A JP 2018124873A JP 2017017752 A JP2017017752 A JP 2017017752A JP 2017017752 A JP2017017752 A JP 2017017752A JP 2018124873 A JP2018124873 A JP 2018124873A
Authority
JP
Japan
Prior art keywords
line
signal
image
image data
abnormal
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
JP2017017752A
Other languages
Japanese (ja)
Inventor
敏孝 野呂
Toshitaka Noro
敏孝 野呂
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2017017752A priority Critical patent/JP2018124873A/en
Publication of JP2018124873A publication Critical patent/JP2018124873A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image reading device that replaces image data according to the timing of occurrence of an abnormality.SOLUTION: An image reading device 100 includes: an image reading unit 103 that receives reflected light from an image of a document illuminated with light from a light source 101 and outputs an image signal 26 and a line synchronization signal 21 indicating the cycle of one line for each line along a main scanning direction; a normal-line-synchronization signal generating unit 1404 that eliminates an abnormal signal from the line synchronization signal to generate a normal line synchronization signal 23; an abnormal-line position signal generating unit 1403 that generates an abnormal-line position signal 27 only when the timing of generating an abnormal signal included in the line synchronization signal lies within an effective image signal 26a, among image signals, which is necessary for image formation; and an image data generation unit 119 that generates image data for each line based on the image signal and the normal line synchronization signal, and replaces image data of the line from which the abnormal-line position signal is output with image data of another line.SELECTED DRAWING: Figure 3

Description

本発明は、原稿の画像を読み取る画像読取装置に関する。   The present invention relates to an image reading apparatus that reads an image of a document.

画像読取装置は、原稿の画像を読み取り、読み取った情報をデジタルデータへ変換する。画像読取装置は、モノクロ画像およびカラー画像を読み取ることができる。画像読取装置は、複写機やファクシミリなどの画像形成装置に設けることができる。画像読取装置は、光源から照射される光で原稿を照らし、反射光を受光することにより主走査方向に沿ったライン毎に画像を読み取ってラインデータを生成する。原稿の画像の読み取り中に静電ノイズ等の外的な要因による異常が発生すると、異常ラインデータが生成される。異常ラインデータに基づいて画像を形成すると、画像が劣化する。そこで、特許文献1は、光源に流れる電流値を検出し、検出した電流値と基準値との比較結果に基づいて異常状態が生じたと判断された場合、異常ラインデータを正常な前ラインデータに置き換える画像読取装置を開示している。   The image reading device reads an image of a document and converts the read information into digital data. The image reading apparatus can read a monochrome image and a color image. The image reading apparatus can be provided in an image forming apparatus such as a copying machine or a facsimile. The image reading device illuminates a document with light emitted from a light source, receives reflected light, reads an image for each line along the main scanning direction, and generates line data. If an abnormality due to an external factor such as electrostatic noise occurs during reading of an image of a document, abnormal line data is generated. When an image is formed based on abnormal line data, the image deteriorates. Therefore, Patent Document 1 detects a current value flowing through a light source, and when it is determined that an abnormal state has occurred based on a comparison result between the detected current value and a reference value, abnormal line data is converted into normal previous line data. A replacement image reading apparatus is disclosed.

特開2012−209713号公報JP 2012-209713 A

特許文献1では、静電ノイズによりラインデータの一部分に異常が発生した場合であっても、読み取った1ライン分のラインデータのすべてを異常がある異常ラインデータであると判断する。しかし、異常ラインデータであると判断されたラインデータであっても、1ライン分の画像をすべて正常に読み取ったラインデータであることがある。読み取られたラインデータが正常な画像データを含むにもかかわらず、異常ラインデータであると判断され、前ラインデータに置き換えられてしまうことがある。   In Patent Document 1, even when an abnormality occurs in a part of line data due to electrostatic noise, it is determined that all of the read line data for one line is abnormal line data having an abnormality. However, even line data that has been determined to be abnormal line data may be line data that is obtained by normally reading an image for one line. Even though the read line data includes normal image data, it may be determined as abnormal line data and replaced with previous line data.

また、ラインデータは、最終的に出力される画像を形成するための有効部(以下、有効画像領域という)と、画像形成に使用されないタイミング等の調整に使用される無効部(以下、無効画像領域という)を有する。最終的に所望する画像を出力するために、ラインデータから有効画像領域のデータが抽出され、画像並び替え処理などの各種画像処理が行われる。ラインデータに占める有効画像領域の長さは、読取条件(カラーモード、モノクロモード、読取解像度)により変化する。異常状態が無効画像領域内のみに発生する場合も少なくない。読み取ったラインデータの無効画像領域のみに異常が発生した場合、特許文献1に開示されているように、読み取ったラインデータを前ラインデータに置き換えると正常なライン配列を乱してしまい、画像劣化の原因となってしまう。   The line data includes an effective part (hereinafter referred to as an effective image area) for forming an image to be finally output, and an invalid part (hereinafter referred to as an invalid image) used for adjustment of timing not used for image formation. Area). In order to finally output a desired image, data of an effective image area is extracted from the line data, and various image processing such as image rearrangement processing is performed. The length of the effective image area in the line data varies depending on the reading conditions (color mode, monochrome mode, reading resolution). In many cases, the abnormal state occurs only in the invalid image area. When an abnormality occurs only in the invalid image area of the read line data, as disclosed in Patent Document 1, if the read line data is replaced with the previous line data, the normal line arrangement is disturbed, resulting in image degradation. It becomes the cause of.

そこで、本発明は、画像信号のうちの有効画像信号に異常な信号が発生したラインの画像データを他のラインの画像データで置き換え、有効画像信号の外で異常な信号が発生した場合には画像データの置き換えを行わない画像読取装置を提供する。   Therefore, the present invention replaces the image data of the line in which an abnormal signal is generated in the effective image signal of the image signal with the image data of another line, and an abnormal signal is generated outside the effective image signal. An image reading apparatus that does not replace image data is provided.

上記課題を解決するために、本発明の一実施例による画像読取装置は、
原稿を照明するための光を出射する光源と、
前記原稿の画像からの反射光を受光して主走査方向に沿ったラインごとに画像信号および1ラインの周期を示すライン同期信号を出力する画像読取部と、
前記ライン同期信号に異常な信号が含まれている場合に、前記異常な信号を除去して正常なライン同期信号を生成する正常ライン同期信号生成部と、
前記ライン同期信号に含まれる異常な信号の発生タイミングが前記画像信号のうち画像形成に必要な有効画像信号内にある場合に異常ライン位置信号を出力し、前記異常な信号の前記発生タイミングが前記有効画像信号の外にある場合に前記異常ライン位置信号を出力しない異常ライン位置信号生成部と、
前記画像信号および前記正常なライン同期信号に基づいてラインごとの画像データを生成し、前記異常ライン位置信号が出力されたラインの画像データを他のラインの画像データで置き換える画像データ生成部と、
を備える。
In order to solve the above problems, an image reading apparatus according to an embodiment of the present invention includes:
A light source that emits light for illuminating the document;
An image reading unit that receives reflected light from the image of the document and outputs an image signal and a line synchronization signal indicating a cycle of one line for each line along the main scanning direction;
A normal line synchronization signal generator that generates a normal line synchronization signal by removing the abnormal signal when the line synchronization signal includes an abnormal signal;
When the generation timing of the abnormal signal included in the line synchronization signal is within the effective image signal necessary for image formation in the image signal, an abnormal line position signal is output, and the generation timing of the abnormal signal is An abnormal line position signal generator that does not output the abnormal line position signal when it is outside the effective image signal;
An image data generation unit that generates image data for each line based on the image signal and the normal line synchronization signal, and replaces the image data of the line from which the abnormal line position signal is output with image data of another line;
Is provided.

本発明によれば、画像信号のうちの有効画像信号に異常な信号が発生したラインの画像データを他のラインの画像データで置き換え、有効画像信号の外で異常な信号が発生した場合には画像データの置き換えを行わない。これにより、正常な有効画像データを用いることができるので、読み取り画像の品質の低下を防止できる。   According to the present invention, the image data of the line in which an abnormal signal is generated in the effective image signal among the image signals is replaced with the image data of another line, and when an abnormal signal is generated outside the effective image signal. Does not replace image data. Thereby, normal effective image data can be used, and deterioration of the quality of the read image can be prevented.

画像読取装置のブロック図。1 is a block diagram of an image reading apparatus. 画像読取装置の断面図。FIG. 3 is a cross-sectional view of the image reading apparatus. 異常なライン同期信号から生成される異常ライン位置信号のタイミング図。The timing diagram of the abnormal line position signal produced | generated from an abnormal line synchronizing signal. 画像データの置き換え処理の説明図。Explanatory drawing of the replacement processing of image data. 画像読取動作を示す流れ図。6 is a flowchart showing an image reading operation. マスク信号および有効画像領域信号の生成処理の説明図。Explanatory drawing of the production | generation process of a mask signal and an effective image area signal. 異常ライン位置信号の生成処理の説明図。Explanatory drawing of the production | generation process of an abnormal line position signal. 画像データの置き換え回数のカウント動作の説明図。Explanatory drawing of the count operation | movement of the frequency | count of replacement of image data. 異常ライン位置判定部のブロック図。The block diagram of an abnormal line position determination part. 異常ライン位置信号および正常なライン同期信号の生成動作を示す流れ図。The flowchart which shows the production | generation operation | movement of an abnormal line position signal and a normal line synchronizing signal. 画像データ生成部のブロック図。The block diagram of an image data generation part. 画像データ生成動作を示す流れ図。5 is a flowchart showing an image data generation operation. 画像データの置き換え処理動作を示す流れ図。5 is a flowchart showing image data replacement processing operation. ラインメモリ選択信号、異常ライン位置信号および画像データ置き換え信号のタイミング図。The timing diagram of a line memory selection signal, an abnormal line position signal, and an image data replacement signal.

以下、添付図面を参照して、本発明を実施するための形態を説明する。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the accompanying drawings.

(画像読取装置)
図2は、画像読取装置100の断面図である。画像読取装置100は、本体10と、本体10の上部に配置された原稿台ガラス203と、本体10の内部で副走査方向SDに移動可能な画像読取部(イメージセンサユニット)103とを有する。画像読取部103は、駆動ベルト200に結合されている。駆動ベルト200は、駆動ギア201およびプーリ12に巻き掛けられている。駆動ギア201は、モータ105により回転される。モータ105が正転または逆転することにより、駆動ギア201を介して駆動ベルト200が正転または逆転し、画像読取部103を副走査方向SDに往復移動させる。白基準板204は、副走査方向SDにおける原稿台ガラス203の一端部に設けられている。画像読取部103は、図2の左から右へ副走査方向SDに移動しながら、原稿台ガラス203上に載置された原稿202の画像を読み取る。
(Image reading device)
FIG. 2 is a cross-sectional view of the image reading apparatus 100. The image reading apparatus 100 includes a main body 10, an original table glass 203 disposed on the upper portion of the main body 10, and an image reading unit (image sensor unit) 103 that can move in the sub-scanning direction SD inside the main body 10. The image reading unit 103 is coupled to the drive belt 200. The drive belt 200 is wound around the drive gear 201 and the pulley 12. The drive gear 201 is rotated by the motor 105. When the motor 105 rotates forward or backward, the drive belt 200 rotates forward or backward via the drive gear 201 to reciprocate the image reading unit 103 in the sub-scanning direction SD. The white reference plate 204 is provided at one end of the document table glass 203 in the sub scanning direction SD. The image reading unit 103 reads an image of the document 202 placed on the document table glass 203 while moving in the sub scanning direction SD from the left to the right in FIG.

図1は、画像読取装置100のブロック図である。画像読取装置100は、CPU(制御部)106、画像読取部103、モータ駆動部104、モータ105、光源101、光源駆動部102、画像処理部107、メモリ108およびコントローラ(制御部)109を有する。画像読取装置100は、更に、PC接続部110、操作部111、プリンタ・インタフェース(以下、I/Fという)112、ファクシミリI/F113およびハードディスクドライブ(以下、HDDという)114を有する。   FIG. 1 is a block diagram of the image reading apparatus 100. The image reading apparatus 100 includes a CPU (control unit) 106, an image reading unit 103, a motor driving unit 104, a motor 105, a light source 101, a light source driving unit 102, an image processing unit 107, a memory 108, and a controller (control unit) 109. . The image reading apparatus 100 further includes a PC connection unit 110, an operation unit 111, a printer interface (hereinafter referred to as I / F) 112, a facsimile I / F 113, and a hard disk drive (hereinafter referred to as HDD) 114.

画像読取部103は、固体撮像素子(以下、イメージセンサという)115とAD変換部116を有する。CPU106は、光源駆動部102、画像読取部103、モータ駆動部104、画像処理部107およびコントローラ109に電気的に接続されている。CPU106は、画像読取装置100の全体を制御する。CPU106は、少なくともモータ駆動部104、画像読取部103および画像処理部107を制御するための各種制御信号を生成し、これらとデータの通信を行う。モータ駆動部104は、CPU106により生成されたタイミング信号に基づいてモータ105の回転を制御して画像読取部103を副走査方向SDに移動させる。発光部としての光源101は、発光ダイオード(LED)や冷陰極管などの発光素子からなる。光源駆動部102は、CPU106により生成されたタイミング信号に基づいて光源101へ電流を供給する。光源101は、光源駆動部102から電流を供給されて光を出射し原稿を照明する。   The image reading unit 103 includes a solid-state imaging device (hereinafter referred to as an image sensor) 115 and an AD conversion unit 116. The CPU 106 is electrically connected to the light source driving unit 102, the image reading unit 103, the motor driving unit 104, the image processing unit 107, and the controller 109. The CPU 106 controls the entire image reading apparatus 100. The CPU 106 generates various control signals for controlling at least the motor driving unit 104, the image reading unit 103, and the image processing unit 107, and performs data communication with them. The motor driving unit 104 controls the rotation of the motor 105 based on the timing signal generated by the CPU 106 and moves the image reading unit 103 in the sub scanning direction SD. The light source 101 serving as a light emitting unit includes a light emitting element such as a light emitting diode (LED) or a cold cathode tube. The light source driving unit 102 supplies a current to the light source 101 based on the timing signal generated by the CPU 106. The light source 101 is supplied with current from the light source driving unit 102 to emit light and illuminate the original.

受光部としてのイメージセンサ115は、光源101により照明された原稿からの反射光を受光する。イメージセンサ115は、CPU106により生成されたタイミング信号に基づいて反射光を光電変換してアナログ画像信号を生成する。イメージセンサ115は、アナログ画像信号をAD変換部116へ出力する。AD変換部116は、アナログ画像信号に、サンプルホールド処理、オフセット処理およびゲイン処理などのアナログ処理を施す。AD変換部116は、アナログ処理されたアナログ画像信号をデジタル画像信号へ変換するA/D変換を行う。AD変換部116は、デジタル画像信号とともにデジタル画像信号の1ライン周期を求めるためのライン同期信号を画像処理部107へ出力する。画像処理部107は、1ライン周期ごとに、デジタル画像信号のフォーマット変換を行い、原稿の画像情報と同様な所定の配列の画像データを生成する。 画像処理部107により生成された画像データは、一旦メモリ(記憶部)108に保存される。メモリ108は、画像データをコントローラ109へ転送する。   An image sensor 115 serving as a light receiving unit receives reflected light from a document illuminated by the light source 101. The image sensor 115 photoelectrically converts the reflected light based on the timing signal generated by the CPU 106 to generate an analog image signal. The image sensor 115 outputs an analog image signal to the AD converter 116. The AD conversion unit 116 performs analog processing such as sample hold processing, offset processing, and gain processing on the analog image signal. The AD converter 116 performs A / D conversion for converting the analog image signal subjected to the analog processing into a digital image signal. The AD conversion unit 116 outputs a line synchronization signal for obtaining one line period of the digital image signal together with the digital image signal to the image processing unit 107. The image processing unit 107 performs format conversion of the digital image signal for each line cycle, and generates image data having a predetermined arrangement similar to the image information of the document. The image data generated by the image processing unit 107 is temporarily stored in the memory (storage unit) 108. The memory 108 transfers the image data to the controller 109.

コントローラ109は、CPU106、メモリ108、PC接続部110、操作部111、プリンタI/F112、ファクシミリI/F113およびHDD114に電気的に接続されている。コントローラ109は、メモリ108から受け取った画像データに所定の処理を施す。コントローラ109は、所定の処理が施された画像データを、HDD(記憶部)114に保存する。その後、HDD114に保存された画像データは、プリンタI/F112を介してプリンタへ、またはファクシミリI/F113を介してファクシミリ装置へ転送される。PC接続部110は、パーソナルコンピュータ(PC)と画像読取装置100を接続するUSB、Ethernet、IEEE1394またはIEEE1298などのインターフェースである。操作部111は、ディスプレイ(表示部)および入力ボタンを有するユーザインターフェースである。ユーザは、入力ボタンまたはディスプレイに表示されるタッチパッドを押すことによりコピー開始指示などの情報を画像読取装置100へ入力する。   The controller 109 is electrically connected to the CPU 106, memory 108, PC connection unit 110, operation unit 111, printer I / F 112, facsimile I / F 113, and HDD 114. The controller 109 performs predetermined processing on the image data received from the memory 108. The controller 109 stores image data that has undergone predetermined processing in an HDD (storage unit) 114. Thereafter, the image data stored in the HDD 114 is transferred to the printer via the printer I / F 112 or to the facsimile apparatus via the facsimile I / F 113. The PC connection unit 110 is an interface such as USB, Ethernet, IEEE 1394, or IEEE 1298 that connects the personal computer (PC) and the image reading apparatus 100. The operation unit 111 is a user interface having a display (display unit) and input buttons. The user inputs information such as a copy start instruction to the image reading apparatus 100 by pressing an input button or a touch pad displayed on the display.

画像処理部107は、フォーマット変換部117、異常ライン位置判定部118および画像データ生成部119を有する。画像処理部107は、例えば、特定用途向け集積回路(ASIC)やプログラミング可能なゲートアレイ(フィールドプログラマブルゲートアレイ)などの専用回路からなる。CPU106は、画像処理部107に対して各種設定を行い、画像処理部107に画像処理動作を行わせる。フォーマット変換部117は、AD変換部116によりAD変換されたデジタル画像信号が入力される。デジタル画像信号は、例えば、差動信号としてAD変換部116からフォーマット変換部117へ入力される。フォーマット変換部117は、デジタル画像信号に対してシリアル−パラレル変換などのフォーマット変換を行う。フォーマット変換部117は、また、パラレル信号に変換されたデジタル画像信号の中から、デジタル画像信号の1ライン周期を決定するためのライン同期信号を抽出する。   The image processing unit 107 includes a format conversion unit 117, an abnormal line position determination unit 118, and an image data generation unit 119. The image processing unit 107 includes a dedicated circuit such as an application specific integrated circuit (ASIC) or a programmable gate array (field programmable gate array). The CPU 106 performs various settings for the image processing unit 107 and causes the image processing unit 107 to perform an image processing operation. The format conversion unit 117 receives the digital image signal AD-converted by the AD conversion unit 116. The digital image signal is input from the AD conversion unit 116 to the format conversion unit 117 as a differential signal, for example. The format conversion unit 117 performs format conversion such as serial-parallel conversion on the digital image signal. The format converter 117 also extracts a line synchronization signal for determining one line cycle of the digital image signal from the digital image signal converted into the parallel signal.

異常ライン位置判定部118は、カウンタ120を有する。カウンタ120は、フォーマット変換部117から出力されるライン同期信号の周期をカウントする。カウントされた周期がライン同期信号の所定の周期でない場合、異常ライン位置判定部118は、フォーマット変換部117から出力されたその信号が異常信号であることを表す異常ライン位置信号を画像データ生成部119へ出力する。フォーマット変換部117は、フォーマット変換した1ライン分のデジタル画像信号を画像データ生成部119へ出力する。画像データ生成部119は、フォーマット変換された1ライン分のデジタル画像信号から画像データを生成し、メモリ108に保存する。画像データ並び替え部としての画像データ生成部119は、メモリ108に保存された画像データを読み出して並び替えを行ない、所定の配列の画像データを生成する。画像データ生成部119は、最終的に、読み取った原稿の画像と同様な所定の配列の画像データを生成する。   The abnormal line position determination unit 118 includes a counter 120. The counter 120 counts the cycle of the line synchronization signal output from the format conversion unit 117. If the counted cycle is not a predetermined cycle of the line synchronization signal, the abnormal line position determination unit 118 outputs an abnormal line position signal indicating that the signal output from the format conversion unit 117 is an abnormal signal to the image data generation unit. It outputs to 119. The format conversion unit 117 outputs the digital image signal for one line subjected to the format conversion to the image data generation unit 119. The image data generation unit 119 generates image data from the digital image signal for one line whose format has been converted, and stores the image data in the memory 108. An image data generation unit 119 as an image data rearrangement unit reads out the image data stored in the memory 108 and rearranges it to generate image data having a predetermined arrangement. The image data generation unit 119 finally generates image data having a predetermined arrangement similar to the read document image.

(異常ライン位置判定部の処理動作)
次に、異常ライン位置判定部118により実行される異常ライン位置信号27の生成動作を説明する。図3は、異常なライン同期信号21から生成される異常ライン位置信号27のタイミング図である。フォーマット変換部117は、静電ノイズなどの外的な要因がない場合、所定のライン同期信号20を異常ライン位置判定部118へ出力する。しかし、静電ノイズなどの外的な要因が発生すると、フォーマット変換部117は、異常なライン同期信号21を出力する。そこで、異常ライン位置判定部118は、図3に示すように、所定のライン同期信号20の周期(1ライン周期)Tより短い幅W(以下、マスク領域という)のマスク信号22を生成し、異常なライン同期信号21にマスク処理を行う。
(Processing of abnormal line position determination unit)
Next, the generation operation of the abnormal line position signal 27 executed by the abnormal line position determination unit 118 will be described. FIG. 3 is a timing diagram of the abnormal line position signal 27 generated from the abnormal line synchronization signal 21. When there is no external factor such as electrostatic noise, the format conversion unit 117 outputs a predetermined line synchronization signal 20 to the abnormal line position determination unit 118. However, when an external factor such as electrostatic noise occurs, the format conversion unit 117 outputs an abnormal line synchronization signal 21. Therefore, as shown in FIG. 3, the abnormal line position determination unit 118 generates a mask signal 22 having a width W (hereinafter referred to as a mask region) shorter than a cycle (one line cycle) T of a predetermined line synchronization signal 20; Mask processing is performed on the abnormal line synchronization signal 21.

マスク信号22は、以下に述べる方法で生成される。まず、カウンタ120は、最初に入力されたライン同期信号21aを基準にカウントを開始する。カウンタ120は、CPU106により設定されたマスク区間設定カウント値(以下、マスク設定値という)までカウントする。カウンタ120のカウント値がマスク設定値になると、カウンタ120のカウント値は、‘0’にクリアされる。異常ライン位置判定部118は、カウンタ120のカウント動作区間(カウント値が‘0’でない区間)をマスク領域(マスク区間)Wとするマスク信号22を生成する。異常ライン位置判定部118は、マスク信号22のマスク領域W内で入力されたライン同期信号(異常な信号)21b、21cをプレ異常ライン位置信号24として生成する。プレ異常ライン位置信号24は、マスク領域W内で入力されたライン同期信号21b、21cの反転信号でも非反転信号でもよい。   The mask signal 22 is generated by the method described below. First, the counter 120 starts counting on the basis of the line synchronization signal 21a input first. The counter 120 counts up to a mask section setting count value (hereinafter referred to as a mask setting value) set by the CPU 106. When the count value of the counter 120 reaches the mask setting value, the count value of the counter 120 is cleared to ‘0’. The abnormal line position determination unit 118 generates a mask signal 22 in which the count operation section (a section where the count value is not “0”) of the counter 120 is used as a mask area (mask section) W. The abnormal line position determination unit 118 generates the line synchronization signals (abnormal signals) 21b and 21c input within the mask region W of the mask signal 22 as the pre-abnormal line position signal 24. The pre-abnormal line position signal 24 may be an inverted signal or a non-inverted signal of the line synchronization signals 21b and 21c input in the mask region W.

所定のライン同期信号20は、AD変換部116からデジタル画像信号26とともにフォーマット変換部117へ入力される。従って、入力されるライン同期信号21に発生する異常は、デジタル画像信号26にも同様に発生し、ライン同期信号21に発生する異常の位置は、デジタル画像信号26に発生する異常の位置と同じである。デジタル画像信号26は、図3に示すように、1ライン周期Tの間に、画像形成に必要な有効画像信号26aと画像形成に不要な無効画像信号26bが含まれている。有効画像信号26aが設けられる有効画像領域25aと無効画像信号26bが設けられる無効画像領域25bは、ユーザが操作部111により設定するカラーモード、モノクロモードおよび読取解像度に基づいて設定される。CPU106は、操作部111により設定された情報に基づいて有効画像領域25aおよび無効画像領域25bを設定するための領域設定カウント値(以下、領域設定値という)を異常ライン位置判定部118に設定する。異常ライン位置判定部118は、CPU106により設定された領域設定値に基づいて有効画像領域信号25を生成する。有効画像領域信号25は、カウンタ120のカウント値が‘0’から領域設定値までの有効画像領域(例えば、その区間の信号値は‘0’)25aと、カウント値が領域設定値より大きい無効画像領域(例えば、その区間の信号値は‘1’)25bと、を有する。   The predetermined line synchronization signal 20 is input from the AD converter 116 to the format converter 117 together with the digital image signal 26. Accordingly, an abnormality that occurs in the input line synchronization signal 21 also occurs in the digital image signal 26 in the same manner, and the position of the abnormality that occurs in the line synchronization signal 21 is the same as the position of the abnormality that occurs in the digital image signal 26. It is. As shown in FIG. 3, the digital image signal 26 includes an effective image signal 26 a necessary for image formation and an invalid image signal 26 b unnecessary for image formation during one line period T. The effective image area 25a where the effective image signal 26a is provided and the invalid image area 25b where the invalid image signal 26b is provided are set based on the color mode, monochrome mode and reading resolution set by the user via the operation unit 111. The CPU 106 sets an area setting count value (hereinafter referred to as an area setting value) for setting the effective image area 25 a and the invalid image area 25 b in the abnormal line position determination unit 118 based on the information set by the operation unit 111. . The abnormal line position determination unit 118 generates an effective image area signal 25 based on the area setting value set by the CPU 106. The valid image area signal 25 is an invalid image area 25a in which the count value of the counter 120 is from “0” to the area set value (for example, the signal value in that section is “0”), and the count value is larger than the area set value. And an image area (for example, the signal value of the section is “1”) 25b.

異常ライン位置判定部118は、プレ異常ライン位置信号24を有効画像領域信号25と比較して、プレ異常ライン位置信号24a、24bが有効画像領域25aにあるか否かを判断する。異常ライン位置判定部118は、無効画像領域25bにあるプレ異常ライン位置信号24bを無効(除去)にする。プレ異常ライン位置信号24bに対応する異常は、有効画像信号内の異常ではないからである。プレ異常ライン位置信号24aが有効画像領域25aに有る場合、プレ異常ライン位置信号24aを異常ライン位置信号27として画像データ生成部119へ出力する。プレ異常ライン位置信号24aに対応する異常は、有効画像信号26a内の異常であるからである。また、異常ライン位置判定部118は、ライン同期信号21a、21b、21cのうちマスク領域W中に生じたライン同期信号21b、21cを無効(除去)にして、正常なライン同期信号23を生成する。   The abnormal line position determination unit 118 compares the pre-abnormal line position signal 24 with the effective image area signal 25, and determines whether or not the pre-abnormal line position signals 24a and 24b are in the effective image area 25a. The abnormal line position determination unit 118 invalidates (removes) the pre-abnormal line position signal 24b in the invalid image area 25b. This is because the abnormality corresponding to the pre-abnormal line position signal 24b is not an abnormality in the effective image signal. When the pre-abnormal line position signal 24a is present in the effective image area 25a, the pre-abnormal line position signal 24a is output to the image data generation unit 119 as the abnormal line position signal 27. This is because the abnormality corresponding to the pre-abnormal line position signal 24a is an abnormality in the effective image signal 26a. Further, the abnormal line position determination unit 118 invalidates (removes) the line synchronization signals 21b and 21c generated in the mask region W among the line synchronization signals 21a, 21b, and 21c, and generates a normal line synchronization signal 23. .

(画像データ生成部の処理動作)
次に、画像データ生成部119により実行される画像データの置き換え処理を説明する。画像データ生成部119は、デジタル画像信号26および正常なライン同期信号23に基づいてラインごとの画像データを生成し、異常ライン位置信号27が出力されたラインの画像データを他のラインの画像データで置き換える。本実施例においては、画像データ生成部119は、異常ライン位置信号27が出力されたラインの画像データを一つ前のラインの画像データで置き換える。なお、異常ライン位置信号27が出力されたラインの画像データを一つ後のラインの画像データで置き換えるように構成してもよい。図4は、画像データの置き換え処理の説明図である。異常ライン位置判定部118は、正常なライン同期信号23および異常ライン位置信号27を画像データ生成部119へ入力する。フォーマット変換部117は、フォーマット変換されたデジタル画像信号26を画像データ生成部119へ入力する。画像データ生成部119は、正常なライン同期信号23ごとに1ライン分のデジタル画像信号26から画像データ28を生成する。画像データ生成部119は、読み取った原稿の画像情報と同様な配列になるように1ライン分の画像データ28を画素ごとに並び替え処理する。画像データ生成部119は、並び替え処理した1ライン分の画像データをメモリ108に保存する。メモリ108は、少なくとも2つのラインメモリ(ラインメモリAおよびラインメモリB)を有する。画像データ生成部119は、異常ライン位置信号27が入力されない限り、1ライン分の画像データを順次ラインメモリAとラインメモリBに交互に保存する。画像データ生成部119は、ラインメモリAに現在のラインの画像データを保存している間にラインメモリBから前ラインの画像データを読み出す。同様に、画像データ生成部119は、ラインメモリBに現在のラインの画像データを保存している間にラインメモリAから前ラインの画像データを読み出す。
(Processing of image data generator)
Next, image data replacement processing executed by the image data generation unit 119 will be described. The image data generation unit 119 generates image data for each line based on the digital image signal 26 and the normal line synchronization signal 23, and uses the image data of the line from which the abnormal line position signal 27 is output as the image data of other lines. Replace with. In this embodiment, the image data generation unit 119 replaces the image data of the line from which the abnormal line position signal 27 is output with the image data of the previous line. Note that the image data of the line from which the abnormal line position signal 27 is output may be replaced with the image data of the next line. FIG. 4 is an explanatory diagram of image data replacement processing. The abnormal line position determination unit 118 inputs the normal line synchronization signal 23 and the abnormal line position signal 27 to the image data generation unit 119. The format converter 117 inputs the format-converted digital image signal 26 to the image data generator 119. The image data generation unit 119 generates image data 28 from the digital image signal 26 for one line for each normal line synchronization signal 23. The image data generation unit 119 rearranges the image data 28 for one line for each pixel so as to have an arrangement similar to the image information of the read original. The image data generation unit 119 stores the image data for one line subjected to the rearrangement process in the memory 108. The memory 108 has at least two line memories (line memory A and line memory B). The image data generation unit 119 stores image data for one line alternately in the line memory A and the line memory B sequentially unless the abnormal line position signal 27 is input. The image data generation unit 119 reads the image data of the previous line from the line memory B while the image data of the current line is stored in the line memory A. Similarly, the image data generation unit 119 reads the image data of the previous line from the line memory A while storing the image data of the current line in the line memory B.

画像データ生成部119は、図4に示すように、N+1ラインの画像データをラインメモリBに保存中に異常ライン位置信号27が入力されると、現在のN+1ラインの画像データを前のNラインの画像データに置き換える。具体的には、画像データ生成部119は、N+1ラインの画像データをラインメモリBから読み出さずに、ラインメモリAから前のNラインの画像データを読み出す。そして、画像データ生成部119は、ラインメモリAから前のNラインの画像データの読出し中に次のN+2ラインの画像データをラインメモリBに保存する。このように、画像データ生成部119は、異常ライン位置信号27に対応するラインの画像データを前ラインの画像データに置き換える。また、画像データ生成部119は、画像データの置き換え回数をカウントする機能を有する。画像データの置き換え回数がCPU106により設定された設定回数以上連続して発生した場合、CPU106は、操作部111のディスプレイにエラーを表示する。   As shown in FIG. 4, when the abnormal line position signal 27 is input while the N + 1 line image data is being stored in the line memory B, the image data generation unit 119 converts the current N + 1 line image data to the previous N lines. Replace with image data. Specifically, the image data generation unit 119 reads the image data of the previous N lines from the line memory A without reading the image data of N + 1 lines from the line memory B. Then, the image data generating unit 119 stores the next N + 2 line image data in the line memory B while reading the previous N line image data from the line memory A. As described above, the image data generation unit 119 replaces the image data of the line corresponding to the abnormal line position signal 27 with the image data of the previous line. Further, the image data generation unit 119 has a function of counting the number of replacements of image data. If the number of replacements of the image data occurs continuously for the set number of times or more set by the CPU 106, the CPU 106 displays an error on the display of the operation unit 111.

(画像読取動作)
次に、CPU106により実行される画像読取動作を説明する。図5は、画像読取動作を示す流れ図である。CPU106は、ROM121に保存されたプログラムに従って画像読取動作を実行する。ユーザは、操作部111を操作して画像読取動作の開始を指示する。画像読取動作の開始指示は、コントローラ109を介してCPU106へ入力される。CPU106は、画像読取動作を開始する。CPU106は、画像読取部103を駆動する(S51)。CPU106は、光源駆動部102を制御して光源101を点灯させる。CPU106は、画像読取部103のイメージセンサ115を駆動させて原稿読取可能な状態にする。CPU106は、モータ駆動部104を制御してモータ105を駆動する(S52)。モータ105の回転により、画像読取部103を副走査方向SDに移動させる。なお、画像読取装置100に自動原稿給送装置が設けられている場合、画像読取部103を読み取り位置に停止させて、原稿を搬送してもよい。
(Image reading operation)
Next, an image reading operation executed by the CPU 106 will be described. FIG. 5 is a flowchart showing the image reading operation. The CPU 106 executes an image reading operation according to a program stored in the ROM 121. The user operates the operation unit 111 to instruct the start of the image reading operation. An instruction to start an image reading operation is input to the CPU 106 via the controller 109. The CPU 106 starts an image reading operation. The CPU 106 drives the image reading unit 103 (S51). The CPU 106 controls the light source driving unit 102 to turn on the light source 101. The CPU 106 drives the image sensor 115 of the image reading unit 103 so that the document can be read. The CPU 106 controls the motor driving unit 104 to drive the motor 105 (S52). As the motor 105 rotates, the image reading unit 103 is moved in the sub-scanning direction SD. When the image reading apparatus 100 is provided with an automatic document feeding device, the image reading unit 103 may be stopped at the reading position and the document may be conveyed.

イメージセンサ115は、副走査方向SDに直交する主走査方向に沿って画像を1ラインずつ読取り、アナログ画像信号をAD変換部116へ出力する(S53)。AD変換部116は、アナログ画像信号をデジタル画像信号へ変換する(S53)。AD変換部116は、ライン同期信号とともにシリアルのデジタル画像信号を差動信号として画像処理部107へ出力する。フォーマット変換部117は、AD変換部116からのシリアルのデジタル画像信号をパラレルのデジタル画像信号へ変換する(S54)。また、異常ライン位置判定部118は、入力されたライン同期信号21から異常ライン位置信号27および正常なライン同期信号23を生成する(S54)。また、フォーマット変換部117は、画像データ生成部119へパラレルのデジタル画像信号を出力する。   The image sensor 115 reads an image line by line along the main scanning direction orthogonal to the sub-scanning direction SD, and outputs an analog image signal to the AD conversion unit 116 (S53). The AD converter 116 converts the analog image signal into a digital image signal (S53). The AD conversion unit 116 outputs a serial digital image signal together with the line synchronization signal to the image processing unit 107 as a differential signal. The format converter 117 converts the serial digital image signal from the AD converter 116 into a parallel digital image signal (S54). Further, the abnormal line position determination unit 118 generates an abnormal line position signal 27 and a normal line synchronization signal 23 from the input line synchronization signal 21 (S54). The format conversion unit 117 also outputs a parallel digital image signal to the image data generation unit 119.

異常ライン位置判定部118は、CPU106により設定されたマスク設定値に基づいてライン同期信号21のマスク領域Wのマスク信号22を生成する(S55)。また、異常ライン位置判定部118は、CPU106により設定された領域設定値に基づいてデジタル画像信号26の有効画像信号26aを判別するための有効画像領域25aを有する有効画像領域信号25を生成する(S55)。   The abnormal line position determination unit 118 generates the mask signal 22 of the mask area W of the line synchronization signal 21 based on the mask setting value set by the CPU 106 (S55). Further, the abnormal line position determination unit 118 generates an effective image region signal 25 having an effective image region 25a for determining the effective image signal 26a of the digital image signal 26 based on the region setting value set by the CPU 106 ( S55).

図6は、マスク信号22および有効画像領域信号25の生成処理の説明図である。マスク信号22および有効画像領域信号25は、図6に示すように、カウンタ120のカウント値とCPU106により設定されたマスク設定値および領域設定値に基づいて生成される。カウンタ120は、ライン同期信号21の入力によりカウントを開始する。例えば、CPU106により設定されたマスク設定値が7499である場合、マスク信号22の値は、カウンタ120のカウント開始に応じて‘0’になり、カウンタ120のカウント値が7499に達すると‘1’になる。カウンタ120のカウント値は、7499に達すると‘0’にクリアされる。カウンタ120は、次のライン同期信号21の入力により再びカウントを開始する。また、例えば、CPU106により設定された領域設定値が7200である場合、有効画像領域信号25の値は、カウンタ120のカウント開始に応じて‘0’になり、カウンタ120のカウント値が7200に達すると‘1’になる。なお、カウンタ120は、1画素ごとに1カウントする。   FIG. 6 is an explanatory diagram of the generation process of the mask signal 22 and the effective image area signal 25. As shown in FIG. 6, the mask signal 22 and the effective image area signal 25 are generated based on the count value of the counter 120 and the mask setting value and area setting value set by the CPU 106. The counter 120 starts counting when the line synchronization signal 21 is input. For example, when the mask setting value set by the CPU 106 is 7499, the value of the mask signal 22 becomes “0” according to the count start of the counter 120, and becomes “1” when the count value of the counter 120 reaches 7499. become. When the count value of the counter 120 reaches 7499, it is cleared to ‘0’. The counter 120 starts counting again when the next line synchronization signal 21 is input. Further, for example, when the area setting value set by the CPU 106 is 7200, the value of the effective image area signal 25 becomes “0” when the counter 120 starts counting, and the count value of the counter 120 reaches 7200. Then it becomes '1'. The counter 120 counts one for each pixel.

異常ライン位置判定部118は、異常ライン位置信号27を生成する(S55)。図7は、異常ライン位置信号27の生成処理の説明図である。異常ライン位置信号27の生成処理は、ユーザが操作部111から設定した読取条件(カラーモード、モノクロモード、読取解像度)に左右される。ユーザが操作部111から設定した読取条件に従って、CPU106は、領域設定値を画像処理部107に設定する。図7(a)は、有効画像領域25aが7200画素である場合の異常ライン位置信号27の生成処理の説明図である。所定のライン同期信号20の1ライン長は、7500画素に設定されている。マスク領域Wは、7499画素に設定されている。カウンタ120は、最初に入力されたライン同期信号21aを基準にカウントを開始する。カウンタ120のカウント値が7499に達するまでのマスク領域W内に生じたライン同期信号21b、21cはマスクされる。なお、マスク設定値は、常に、所定のライン同期信号20の1ライン長より小さい値に設定されている。有効画像領域25aは、7200画素に設定されている。無効画像領域25bは、300画素である。異常ライン位置判定部118は、有効画像領域25a内で発生したライン同期信号21bを異常ライン位置信号27として生成する。無効画像領域25b内で発生したライン同期信号21cは、異常ライン位置信号として生成されない。異常ライン位置判定部118は、マスク領域W内で発生したライン同期信号21b、21cを除外した正常なライン同期信号23を生成する(S55)。異常ライン位置判定部118は、正常なライン同期信号23および異常ライン位置信号27を画像データ生成部119へ出力する。   The abnormal line position determination unit 118 generates an abnormal line position signal 27 (S55). FIG. 7 is an explanatory diagram of the generation process of the abnormal line position signal 27. The generation process of the abnormal line position signal 27 depends on the reading conditions (color mode, monochrome mode, reading resolution) set by the user from the operation unit 111. In accordance with the reading conditions set by the user from the operation unit 111, the CPU 106 sets area setting values in the image processing unit 107. FIG. 7A is an explanatory diagram of the generation process of the abnormal line position signal 27 when the effective image area 25a is 7200 pixels. One line length of the predetermined line synchronization signal 20 is set to 7500 pixels. The mask area W is set to 7499 pixels. The counter 120 starts counting based on the line synchronization signal 21a input first. The line synchronization signals 21b and 21c generated in the mask area W until the count value of the counter 120 reaches 7499 are masked. Note that the mask setting value is always set to a value smaller than one line length of the predetermined line synchronization signal 20. The effective image area 25a is set to 7200 pixels. The invalid image area 25b is 300 pixels. The abnormal line position determination unit 118 generates the line synchronization signal 21b generated in the effective image area 25a as the abnormal line position signal 27. The line synchronization signal 21c generated in the invalid image area 25b is not generated as an abnormal line position signal. The abnormal line position determination unit 118 generates a normal line synchronization signal 23 excluding the line synchronization signals 21b and 21c generated in the mask region W (S55). The abnormal line position determination unit 118 outputs the normal line synchronization signal 23 and the abnormal line position signal 27 to the image data generation unit 119.

図7(b)は、有効画像領域25aが2400画素である場合の異常ライン位置信号27の生成処理の説明図である。例えば、読取条件がモノクロモードに設定されている場合、図7(b)に示すように、有効画像領域25aが2400画素に設定される。無効画像領域25bは、5100画素である。異常ライン位置判定部118は、有効画像領域25a内にライン同期信号21が発生していないので、異常ライン位置信号27を生成しない。異常ライン位置判定部118は、無効画像領域25b内で発生したライン同期信号21b、21c、21dを無効(除去)にして、異常ライン位置信号27を生成しない。異常ライン位置判定部118は、マスク領域W内で発生したライン同期信号21b、21c、21dを除外した正常なライン同期信号23を生成する(S55)。異常ライン位置判定部118は、正常なライン同期信号23および異常ライン位置信号27を画像データ生成部119へ出力する。   FIG. 7B is an explanatory diagram of the generation process of the abnormal line position signal 27 when the effective image area 25a is 2400 pixels. For example, when the reading condition is set to the monochrome mode, the effective image area 25a is set to 2400 pixels as shown in FIG. The invalid image area 25b is 5100 pixels. The abnormal line position determination unit 118 does not generate the abnormal line position signal 27 because the line synchronization signal 21 is not generated in the effective image area 25a. The abnormal line position determination unit 118 invalidates (removes) the line synchronization signals 21b, 21c, and 21d generated in the invalid image area 25b, and does not generate the abnormal line position signal 27. The abnormal line position determination unit 118 generates a normal line synchronization signal 23 excluding the line synchronization signals 21b, 21c, and 21d generated in the mask region W (S55). The abnormal line position determination unit 118 outputs the normal line synchronization signal 23 and the abnormal line position signal 27 to the image data generation unit 119.

画像データ生成部119は、フォーマット変換部117から順次入力される1ライン分のデジタル画像信号に基づいて画像データを生成し、メモリ108へ保存する(S56)。画像データ生成部119は、読み取った原稿の画像と同様な配列になるように1ライン分の画像データを1画素ごと並び替え処理する。前述したように、メモリ108は、ラインメモリAとラインメモリBを有する。異常ライン位置信号27が入力されない場合、画像データ生成部119は、ラインメモリAに画像データを保存している間にラインメモリBから画像データを読み出し、ラインメモリBに画像データの保存している間にラインメモリAから画像データを読み出す。画像データ生成部119は、ラインメモリAおよびBへの画像データの保存および読み出しの処理を順次繰り返し行う。   The image data generation unit 119 generates image data based on the digital image signal for one line sequentially input from the format conversion unit 117, and stores it in the memory 108 (S56). The image data generation unit 119 rearranges the image data for one line for each pixel so that the arrangement is the same as that of the read document image. As described above, the memory 108 includes the line memory A and the line memory B. When the abnormal line position signal 27 is not input, the image data generation unit 119 reads the image data from the line memory B while storing the image data in the line memory A, and stores the image data in the line memory B. In the meantime, image data is read from the line memory A. The image data generation unit 119 sequentially repeats the process of storing and reading image data in the line memories A and B.

異常ライン位置信号27が入力された場合、画像データ生成部119は、図4を用いて説明したような動作を行う。例えば、N+1ライン目の画像データをラインメモリBに保存している間に異常ライン位置信号27が入力された場合、ラインメモリBに保存されたN+1ライン目の画像データは廃棄される。そして、画像データ生成部119は、N+1ライン目の画像データの代わりに、ラインメモリAに保存されているNライン目の画像データを読み出し、N+1ライン目の画像データをNライン目の画像データに置き換える。画像データ生成部119は、Nライン目の画像データをラインメモリAから読み出している間に、N+2ライン目の画像データをラインメモリBに保存する。この動作により、異常が発生したラインの画像データは、異常のない前ラインの画像データに置き換えられる。その後、異常ライン位置信号27が入力されない限り、画像データを順次ラインメモリA→ラインメモリB→ラインメモリA・・・に保存し、それに対応して順次ラインメモリB→ラインメモリA→ラインメモリB・・・から画像データを読み出す。画像データ生成部119は、すべての画像データの読み取りが終了するまで、上記動作を繰り返す。   When the abnormal line position signal 27 is input, the image data generation unit 119 performs the operation described with reference to FIG. For example, when the abnormal line position signal 27 is input while the image data of the (N + 1) th line is stored in the line memory B, the image data of the (N + 1) th line stored in the line memory B is discarded. Then, the image data generation unit 119 reads the Nth line image data stored in the line memory A instead of the N + 1th line image data, and converts the N + 1th line image data into the Nth line image data. replace. The image data generation unit 119 stores the image data of the (N + 2) th line in the line memory B while reading the image data of the Nth line from the line memory A. By this operation, the image data of the line where the abnormality has occurred is replaced with the image data of the previous line having no abnormality. Thereafter, unless the abnormal line position signal 27 is inputted, the image data is sequentially stored in the line memory A → the line memory B → the line memory A... And the corresponding line memory B → the line memory A → the line memory B sequentially. Read image data from. The image data generation unit 119 repeats the above operation until reading of all image data is completed.

画像データ生成部119は、画像データの置き換え処理が実行された回数をカウントする機能を有する。図8は、画像データの置き換え回数のカウント動作の説明図である。CPU106は、画像データが連続して置き換えられる回数を回数設定値として予め画像データ生成部119に設定する。本実施例において、回数設定値は、4である。しかし、回数設定値は、4に限定されるものではなく、3、5、6など任意の数値に設定されていてもよい。画像データ生成部119は、連続して画像データが置き換えられた回数をカウントする。画像データが置き換えられなかった場合、置き換え回数のカウント値は、‘0’にリセットされる。CPU106は、連続して画像データが置き換えられた回数が回数設定値より小さいか否かを判断する(S57)。連続して画像データが置き換えられた回数が回数設定値(4回)以上である場合(S57でNO)、CPU106は、置き換え処理および原稿読取動作を停止させ、操作部111にエラー情報を表示する(S58)。連続して画像データが置き換えられた回数が回数設定値より小さい場合(S57でYES)、CPU106は、原稿の最終ラインの画像データを読み取ったか否かを判断する(S59)。最終ラインの画像を読み取っていない場合(S59でNO)、処理は、S54へ戻り、次のラインの画像データを生成する。最終ラインの画像データを読み取った場合(S59でYES)、CPU106は、原稿読取動作を終了する。   The image data generation unit 119 has a function of counting the number of times image data replacement processing has been executed. FIG. 8 is an explanatory diagram of the operation of counting the number of replacements of image data. The CPU 106 presets the number of times that the image data is continuously replaced in the image data generation unit 119 as a number setting value. In this embodiment, the number of times setting value is 4. However, the number-of-times setting value is not limited to 4, and may be set to any numerical value such as 3, 5, or 6. The image data generation unit 119 counts the number of times that the image data is continuously replaced. When the image data is not replaced, the count value of the number of replacements is reset to “0”. The CPU 106 determines whether or not the number of times that the image data is continuously replaced is smaller than the number of times setting value (S57). If the number of times image data has been replaced continuously is equal to or greater than the number setting value (four times) (NO in S57), CPU 106 stops the replacement process and document reading operation, and displays error information on operation unit 111. (S58). If the number of times the image data is continuously replaced is smaller than the set number of times (YES in S57), the CPU 106 determines whether the image data of the last line of the document has been read (S59). If the image of the last line has not been read (NO in S59), the process returns to S54, and image data for the next line is generated. When the image data of the last line has been read (YES in S59), the CPU 106 ends the document reading operation.

(異常ライン位置信号および正常ライン同期信号の生成動作)
S55において異常ライン位置判定部118がマスク信号22、有効画像領域信号25、異常ライン位置信号27および正常なライン同期信号23を生成する動作を図9および図10を用いて説明する。図9は、異常ライン位置判定部118のブロック図である。異常ライン位置判定部118は、カウンタ120、マスク信号生成部1401、有効画像領域信号生成部1402、異常ライン位置信号生成部1403および正常ライン同期信号生成部1404を有する。図10は、異常ライン位置信号27および正常なライン同期信号23の生成動作を示す流れ図である。CPU106は、異常ライン位置信号27および正常なライン同期信号23の生成動作が開始されると、異常ライン位置判定部118にマスク設定値および領域設定値を設定する(S101)。フォーマット変換部117からのライン同期信号21は、カウンタ120、マスク信号生成部1401、有効画像領域信号生成部1402、異常ライン位置信号生成部1403および正常ライン同期信号生成部1404へ入力される。カウンタ120は、ライン同期信号21が入力されると(S102)、ライン同期信号21の立ち下りを基準として、1画素ずつインクリメントするカウント動作を開始する(S103)。なお、カウンタ120は、1ライン分の画素数をカウントする。本実施例では、ライン同期信号21は、1画素幅の負論理(ローアクティブ)である。負論理(ローアクティブ)は、電圧レベルが低いときを1、高いときを0とする論理構造である。しかし、ライン同期信号21は、正論理(ハイアクティブ)でもよい。その場合、ライン同期信号の立ち上がりを基準として、カウンタ120がカウント動作を開始する。カウンタ120のカウント値は、マスク信号生成部1401および有効画像領域信号生成部1402へ入力される。
(Abnormal line position signal and normal line synchronization signal generation operations)
An operation in which the abnormal line position determination unit 118 generates the mask signal 22, the effective image area signal 25, the abnormal line position signal 27, and the normal line synchronization signal 23 in S55 will be described with reference to FIGS. FIG. 9 is a block diagram of the abnormal line position determination unit 118. The abnormal line position determination unit 118 includes a counter 120, a mask signal generation unit 1401, an effective image region signal generation unit 1402, an abnormal line position signal generation unit 1403, and a normal line synchronization signal generation unit 1404. FIG. 10 is a flowchart showing an operation of generating the abnormal line position signal 27 and the normal line synchronization signal 23. When the generation operation of the abnormal line position signal 27 and the normal line synchronization signal 23 is started, the CPU 106 sets a mask setting value and a region setting value in the abnormal line position determination unit 118 (S101). The line synchronization signal 21 from the format conversion unit 117 is input to the counter 120, the mask signal generation unit 1401, the effective image region signal generation unit 1402, the abnormal line position signal generation unit 1403, and the normal line synchronization signal generation unit 1404. When the line synchronization signal 21 is input (S102), the counter 120 starts a count operation for incrementing one pixel at a time based on the falling edge of the line synchronization signal 21 (S103). The counter 120 counts the number of pixels for one line. In this embodiment, the line synchronization signal 21 is negative logic (low active) with a width of one pixel. Negative logic (low active) is a logic structure in which the voltage level is 1 when the voltage level is low and 0 when the voltage level is high. However, the line synchronization signal 21 may be positive logic (high active). In that case, the counter 120 starts the counting operation with reference to the rise of the line synchronization signal. The count value of the counter 120 is input to the mask signal generation unit 1401 and the effective image area signal generation unit 1402.

マスク信号生成部1401は、ライン同期信号21の立ち上がりで、マスク領域Wを有するマスク信号22の生成を開始する(S104)。マスク信号22は、マスク領域Wを表す‘1’にされる。それと同時に、有効画像領域信号生成部1402は、ライン同期信号21の立ち上がりで、有効画像領域25aを有する有効画像領域信号25の生成を開始する(S104)。有効画像領域信号25は、有効画像領域25aを表す‘1’にされる。本実施例では、マスク信号22および有効画像領域信号25は、負論理(ローアクティブ)であるが、正論理(ハイアクティブ)でもよい。マスク信号生成部1401は、マスク信号22を異常ライン位置信号生成部1403および正常ライン同期信号生成部1404へ出力する。有効画像領域信号生成部1402は、有効画像領域信号25を異常ライン位置信号生成部1403および正常ライン同期信号生成部1404へ出力する。   The mask signal generation unit 1401 starts generating the mask signal 22 having the mask region W at the rising edge of the line synchronization signal 21 (S104). The mask signal 22 is set to “1” representing the mask region W. At the same time, the effective image area signal generation unit 1402 starts generating the effective image area signal 25 having the effective image area 25a at the rising edge of the line synchronization signal 21 (S104). The effective image area signal 25 is set to “1” representing the effective image area 25a. In this embodiment, the mask signal 22 and the effective image area signal 25 are negative logic (low active), but may be positive logic (high active). The mask signal generation unit 1401 outputs the mask signal 22 to the abnormal line position signal generation unit 1403 and the normal line synchronization signal generation unit 1404. The effective image region signal generation unit 1402 outputs the effective image region signal 25 to the abnormal line position signal generation unit 1403 and the normal line synchronization signal generation unit 1404.

異常ライン位置信号生成部1403および正常ライン同期信号生成部1404は、ライン同期信号21が入力されたか否かを判断する(S105)。ライン同期信号21が入力されない場合(S105でNO)、有効画像領域信号生成部1402は、カウンタ120のカウント値が領域設定値に達したか否かを判断する(S106)。カウント値が領域設定値に達していない場合(S106でNO)、有効画像領域信号25は有効画像領域25aを表す‘1’のままで、処理は、S105へ戻る。異常ライン位置信号生成部1403および正常ライン同期信号生成部1404は、再びライン同期信号21が入力されたか否かを判断する(S105)。ライン同期信号21が入力された場合(S105でYES)、ライン同期信号21は、マスク領域W内(マスク信号=‘1’)かつ有効画像領域25a内(有効画像領域信号=‘1’)で異常が発生したことを表す。異常ライン位置信号生成部1403は、マスク信号22とライン同期信号21の否定論理積(NAND)を取り、異常ライン位置信号27を生成する(S107)。すなわち、異常ライン位置信号生成部1403は、ライン同期信号21に含まれる異常な信号(図7(a)の21b)の発生タイミングがデジタル画像信号26のうち画像形成に必要な有効画像信号26a内にある場合に異常ライン位置信号27を出力する。異常ライン位置信号27は、正論理(ハイアクティブ)である。正常ライン同期信号生成部1404は、マスク領域W内(マスク信号=‘1’)のライン同期信号21と生成した異常ライン位置信号27のOR処理により異常ライン位置信号27を除外した正常なライン同期信号23を生成する(S107)。処理は、S106へ進む。   The abnormal line position signal generation unit 1403 and the normal line synchronization signal generation unit 1404 determine whether or not the line synchronization signal 21 is input (S105). When the line synchronization signal 21 is not input (NO in S105), the effective image area signal generation unit 1402 determines whether or not the count value of the counter 120 has reached the area setting value (S106). If the count value has not reached the region setting value (NO in S106), the effective image region signal 25 remains “1” representing the effective image region 25a, and the process returns to S105. The abnormal line position signal generation unit 1403 and the normal line synchronization signal generation unit 1404 determine whether or not the line synchronization signal 21 is input again (S105). When the line synchronization signal 21 is input (YES in S105), the line synchronization signal 21 is within the mask area W (mask signal = '1') and within the effective image area 25a (effective image area signal = '1'). Indicates that an abnormality has occurred. The abnormal line position signal generation unit 1403 calculates a negative logical product (NAND) of the mask signal 22 and the line synchronization signal 21 and generates an abnormal line position signal 27 (S107). That is, the abnormal line position signal generation unit 1403 generates an abnormal signal included in the line synchronization signal 21 (21b in FIG. 7A) within the effective image signal 26a necessary for image formation in the digital image signal 26. If there is, the abnormal line position signal 27 is output. The abnormal line position signal 27 is positive logic (high active). The normal line synchronization signal generation unit 1404 performs normal line synchronization in which the abnormal line position signal 27 is excluded by OR processing of the line synchronization signal 21 in the mask area W (mask signal = '1') and the generated abnormal line position signal 27. A signal 23 is generated (S107). The process proceeds to S106.

カウント値が領域設定値に達した場合(S106でYES)、有効画像領域信号生成部1402は、有効画像領域信号25の値を、有効画像領域25aを表す‘1’から無効画像領域25bを表す‘0’へ切り換え、有効画像領域25aを終了させる(S108)。この後、有効画像領域信号25は、無効画像領域25bを表す‘0’に維持される。異常ライン位置信号生成部1403および正常ライン同期信号生成部1404は、ライン同期信号21が入力されたか否かを判断する(S109)。ライン同期信号21が入力されない場合(S109でNO)、マスク信号生成部1401は、カウンタ120のカウント値がマスク設定値に達したか否かを判断する(S110)。カウント値がマスク設定値に達していない場合(S110でNO)、マスク信号22はマスク領域Wを表す‘1’のままで、処理は、S109へ戻る。異常ライン位置信号生成部1403および正常ライン同期信号生成部1404は、再びライン同期信号21が入力されたか否かを判断する(S109)。ライン同期信号21が入力された場合(S109でYES)、ライン同期信号21は、マスク領域W内(マスク信号=‘1’)かつ無効画像領域25b内(有効画像領域信号=‘0’)で異常が発生したことを表す。異常ライン位置信号生成部1403は、無効画像領域25b内(有効画像領域信号=‘0’)かつマスク領域W内(マスク信号=‘1’)においてライン同期信号21(異常な信号)が入力されたとしても、異常ライン位置信号27を生成しない。すなわち、異常ライン位置信号生成部1403は、ライン同期信号21の異常な信号(図7(a)の21c、図7(b)の21b、21c、21d)の発生タイミングが有効画像信号26aの外にある場合に異常ライン位置信号27を出力しない。また、この時、正常ライン同期信号生成部1404は、入力されたライン同期信号21(異常な信号)を除去して正常なライン同期信号23を生成する(S111)。   When the count value reaches the region setting value (YES in S106), the valid image region signal generation unit 1402 represents the value of the valid image region signal 25 from '1' representing the valid image region 25a to the invalid image region 25b. Switching to “0”, the effective image area 25a is terminated (S108). Thereafter, the valid image area signal 25 is maintained at ‘0’ representing the invalid image area 25b. The abnormal line position signal generation unit 1403 and the normal line synchronization signal generation unit 1404 determine whether or not the line synchronization signal 21 is input (S109). When the line synchronization signal 21 is not input (NO in S109), the mask signal generation unit 1401 determines whether or not the count value of the counter 120 has reached the mask setting value (S110). When the count value does not reach the mask setting value (NO in S110), the mask signal 22 remains “1” indicating the mask area W, and the process returns to S109. The abnormal line position signal generation unit 1403 and the normal line synchronization signal generation unit 1404 determine whether the line synchronization signal 21 is input again (S109). When the line synchronization signal 21 is input (YES in S109), the line synchronization signal 21 is in the mask area W (mask signal = '1') and in the invalid image area 25b (effective image area signal = '0'). Indicates that an abnormality has occurred. The abnormal line position signal generation unit 1403 receives the line synchronization signal 21 (abnormal signal) in the invalid image area 25b (effective image area signal = '0') and in the mask area W (mask signal = '1'). Even if it does, the abnormal line position signal 27 is not generated. That is, the abnormal line position signal generation unit 1403 generates an abnormal signal of the line synchronization signal 21 (21c in FIG. 7A, 21b, 21c, and 21d in FIG. 7B) outside the effective image signal 26a. The abnormal line position signal 27 is not output when At this time, the normal line synchronization signal generator 1404 removes the input line synchronization signal 21 (abnormal signal) and generates a normal line synchronization signal 23 (S111).

正常なライン同期信号23の生成は、S107で述べた処理と同様であるが、S111では異常ライン位置信号27の生成は行わず、正常なライン同期信号23の生成のみが行われる。マスク信号生成部1401は、カウンタ120のカウント値がマスク設定値に達したか否かを判断する(S110)。カウンタ120のカウント値がマスク設定値に達するまでS109の処理へ戻り、無効画像領域25b(有効画像領域信号=‘0’)およびマスク領域W(マスク信号=‘1’)が続く。カウント値がマスク設定値に達すると(S110でYES)、マスク信号生成部1401は、マスク信号22の値を、マスク領域Wを表す‘1’からマスク無し領域を表す‘0’へ切り替え、マスク領域Wを終了させる(S112)。CPU106は、カウンタ120のカウント値を‘0’にクリアする(S113)。異常ライン位置判定部118は、ライン同期信号21が入力されたか否かを判断する(S114)。ライン同期信号が入力されると(S114でYES)、処理は、S103へ戻り、カウンタ120は、次のラインの画素数のカウントを開始する。CPU106は、次のラインの異常ライン位置信号27および正常なライン同期信号23の生成動作を行う。S114で、ライン同期信号21が入力されない場合(S114でNO)、CPU106は、異常ライン位置信号27および正常なライン同期信号23の生成動作を終了する。このようにして、S55における異常ライン位置判定部118の処理は、S101〜S114の一連の動作により、入力されたライン同期信号21に基づいて異常ライン位置信号27と正常なライン同期信号23を生成する。   The generation of the normal line synchronization signal 23 is the same as the processing described in S107. However, in S111, the abnormal line position signal 27 is not generated, and only the normal line synchronization signal 23 is generated. The mask signal generation unit 1401 determines whether or not the count value of the counter 120 has reached the mask setting value (S110). The process returns to S109 until the count value of the counter 120 reaches the mask setting value, and the invalid image area 25b (effective image area signal = “0”) and the mask area W (mask signal = “1”) continue. When the count value reaches the mask setting value (YES in S110), the mask signal generation unit 1401 switches the value of the mask signal 22 from “1” representing the mask area W to “0” representing the non-mask area. The area W is terminated (S112). The CPU 106 clears the count value of the counter 120 to “0” (S113). The abnormal line position determination unit 118 determines whether or not the line synchronization signal 21 is input (S114). When the line synchronization signal is input (YES in S114), the process returns to S103, and the counter 120 starts counting the number of pixels in the next line. The CPU 106 generates the abnormal line position signal 27 and the normal line synchronization signal 23 for the next line. If the line synchronization signal 21 is not input in S114 (NO in S114), the CPU 106 ends the generation operation of the abnormal line position signal 27 and the normal line synchronization signal 23. In this way, the processing of the abnormal line position determination unit 118 in S55 generates the abnormal line position signal 27 and the normal line synchronization signal 23 based on the input line synchronization signal 21 by a series of operations of S101 to S114. To do.

(画像データの置き換え処理)
異常ライン位置判定部118により生成された異常ライン位置信号27および正常なライン同期信号23は、画像データ生成部119へ入力される。フォーマット変換部117によりフォーマット変換されたデジタル画像信号26は、画像データ生成部119へ入力される。画像データ生成部119は、デジタル画像信号26、異常ライン位置信号27および正常なライン同期信号23に基づいてラインごとの画像データの生成および画像データの置き換え処理を実行する。S56において画像データ生成部119が画像データを置き換える動作を図11、図12、図13および図14を用いて説明する。
(Image data replacement process)
The abnormal line position signal 27 and the normal line synchronization signal 23 generated by the abnormal line position determination unit 118 are input to the image data generation unit 119. The digital image signal 26 whose format has been converted by the format converter 117 is input to the image data generator 119. The image data generation unit 119 executes image data generation and image data replacement processing for each line based on the digital image signal 26, the abnormal line position signal 27, and the normal line synchronization signal 23. The operation in which the image data generation unit 119 replaces the image data in S56 will be described with reference to FIGS. 11, 12, 13, and 14. FIG.

図11は、画像データ生成部119のブロック図である。画像データ生成部119は、ラインカウンタ1501、ラインメモリ選択部1502、画像データ置き換え信号生成部1503、置き換えカウンタ1504およびラインメモリインタフェース1505を有する。図12は、画像データ生成動作を示す流れ図である。画像データ生成動作が開始されると、デジタル画像信号26、異常ライン位置信号27および正常なライン同期信号23が画像データ生成部119へ入力される(S121)。デジタル画像信号26は、ラインメモリインタフェース1505へ入力される。異常ライン位置信号27は、ラインメモリ選択部1502および画像データ置き換え信号生成部1503へ入力される。正常なライン同期信号23は、ラインカウンタ1501、ラインメモリ選択部1502、画像データ置き換え信号生成部1503および置き換えカウンタ1504へ入力される。   FIG. 11 is a block diagram of the image data generation unit 119. The image data generation unit 119 includes a line counter 1501, a line memory selection unit 1502, an image data replacement signal generation unit 1503, a replacement counter 1504, and a line memory interface 1505. FIG. 12 is a flowchart showing the image data generation operation. When the image data generation operation is started, the digital image signal 26, the abnormal line position signal 27, and the normal line synchronization signal 23 are input to the image data generation unit 119 (S121). The digital image signal 26 is input to the line memory interface 1505. The abnormal line position signal 27 is input to the line memory selection unit 1502 and the image data replacement signal generation unit 1503. The normal line synchronization signal 23 is input to the line counter 1501, the line memory selection unit 1502, the image data replacement signal generation unit 1503, and the replacement counter 1504.

ラインカウンタ1501は、正常なライン同期信号23に基づいてライン数をカウントする。ラインカウンタ1501は、正常なライン同期信号23の立ち下りを基準としてカウントを開始する。ラインカウンタ1501の値は、‘1’(第一ライン)になる。ラインカウンタ1501の値は、正常なライン同期信号23が入力されるたびに1ずつインクリメントされる。すべてのラインの読み取りが終了すると、ラインカウンタ1501の値は、‘0’にクリアされる。ラインカウンタ1501のラインカウント値30は、ラインメモリ選択部1502、画像データ置き換え信号生成部1503およびラインメモリインタフェース1505へ入力される。画像データ生成部119は、第一ラインのデジタル画像信号26に基づいて画像データを生成する。画像データ生成部119は、第一ラインの画像データをラインメモリBに保存する。CPU106は、ラインカウンタ1501の値が‘2’(第二ライン)であるか否かを判断する(S122)。ラインカウンタ1501のカウント値が‘2’になると(S122でYES)、CPU106は、画像データの置き換え機能を有効にし、画像データの置き換え処理を開始する(S123)。 CPU106は、画像データの置き換え処理を実行する(S124)。   The line counter 1501 counts the number of lines based on the normal line synchronization signal 23. The line counter 1501 starts counting on the basis of the normal falling edge of the line synchronization signal 23. The value of the line counter 1501 is “1” (first line). The value of the line counter 1501 is incremented by 1 every time a normal line synchronization signal 23 is input. When all the lines have been read, the value of the line counter 1501 is cleared to ‘0’. The line count value 30 of the line counter 1501 is input to the line memory selection unit 1502, the image data replacement signal generation unit 1503, and the line memory interface 1505. The image data generation unit 119 generates image data based on the digital image signal 26 of the first line. The image data generation unit 119 stores the image data of the first line in the line memory B. The CPU 106 determines whether or not the value of the line counter 1501 is “2” (second line) (S122). When the count value of the line counter 1501 becomes “2” (YES in S122), the CPU 106 enables the image data replacement function and starts the image data replacement process (S123). The CPU 106 executes image data replacement processing (S124).

以下、図13を用いて、S124における画像データの置き換え処理を説明する。図13は、画像データの置き換え処理動作を示す流れ図である。デジタル画像信号26、正常なライン同期信号23および異常ライン位置信号27は、画像データ生成部119へ順次入力される(S131)。ラインメモリインタフェース1505は、Nライン目のデジタル画像信号26に基づいてNライン目の画像データを生成する(S132)。ラインメモリインタフェース1505は、Nライン目の画像データをラインメモリAに保存する(S133)。ラインメモリインタフェース1505は、ラインメモリBからN−1ライン目の画像データを読み出す(S134)。なお、画像データの置き換え処理は、第二ラインから開始され、第一ラインの画像データは、ラインメモリBに保存される。   Hereinafter, the image data replacement processing in S124 will be described with reference to FIG. FIG. 13 is a flowchart showing the image data replacement processing operation. The digital image signal 26, the normal line synchronization signal 23, and the abnormal line position signal 27 are sequentially input to the image data generation unit 119 (S131). The line memory interface 1505 generates image data for the Nth line based on the digital image signal 26 for the Nth line (S132). The line memory interface 1505 stores the image data of the Nth line in the line memory A (S133). The line memory interface 1505 reads the image data of the (N−1) th line from the line memory B (S134). The image data replacement process is started from the second line, and the image data of the first line is stored in the line memory B.

ラインメモリ選択部1502は、画像データの保存および読出しを行うラインメモリを選択するためのラインメモリ選択信号31を生成する(S135)。ラインメモリ選択信号31は、ラインメモリインタフェース1505へ入力される。ラインメモリインタフェース1505は、ラインメモリ選択信号31に基づいてラインメモリBをラインメモリXとし、ラインメモリAをラインメモリYとする。図14は、ラインメモリ選択信号31、異常ライン位置信号27および画像データ置き換え信号32のタイミング図である。ラインメモリ選択部1502は、図14に示すように正常なライン同期信号23の立ち下がりで遷移する1ビットのラインメモリ選択信号31を生成する。ラインメモリ選択信号31は、前ラインに異常状態が発生していた場合、現在のライン同期信号23の立ち下がりで遷移しない。その際、保存するラインメモリおよび読み出すラインメモリは、前ラインにおけるものと変わらない同じラインメモリがラインメモリインタフェース1505により選択される。   The line memory selection unit 1502 generates a line memory selection signal 31 for selecting a line memory for storing and reading image data (S135). The line memory selection signal 31 is input to the line memory interface 1505. The line memory interface 1505 sets the line memory B as the line memory X and the line memory A as the line memory Y based on the line memory selection signal 31. FIG. 14 is a timing chart of the line memory selection signal 31, the abnormal line position signal 27, and the image data replacement signal 32. The line memory selection unit 1502 generates a 1-bit line memory selection signal 31 that transitions at the falling edge of the normal line synchronization signal 23 as shown in FIG. The line memory selection signal 31 does not transition at the falling edge of the current line synchronization signal 23 when an abnormal state has occurred in the previous line. At this time, the line memory interface 1505 selects the same line memory as that in the previous line as the line memory to be stored and the line memory to be read out.

ラインメモリインタフェース1505は、N+1ライン目のデジタル画像信号26に基づいてN+1ライン目の画像データを生成する(S136)。ラインメモリ選択部1502および画像データ置き換え信号生成部1503は、Nライン目に異常ライン位置信号27が入力されたか否かを判断する(S137)。図14に示すように、異常ライン位置信号27は、正論理(ハイアクティブ)である。Nライン目に異常ライン位置信号27(=‘1’)が入力された場合(S137でYES)、画像データ置き換え信号生成部1503は、Nライン目に異常があったこと示す画像データ置き換え信号32を生成する(S138)。画像データ置き換え信号32は、正常なライン同期信号23の立ち下りで遷移する1ビットの信号で、初期値は‘0’である。Nライン目に異常ライン位置信号27(=‘1’)が入力された場合(S137でYES)、画像データ置き換え信号32は、次のライン(N+1ライン目)の正常なライン同期信号23の立ち下がりで‘1’となる。また、N+1ライン目に異常ライン位置信号27が入力されない場合(異常ライン位置信号27=‘0’)、画像データ置き換え信号32は、次のライン(N+2ライン目)の正常なライン同期信号23の立ち下がりで‘0’になる。画像データ置き換え信号生成部1503は、N+1ライン目に画像データ置き換え信号32を置き換えカウンタ1504およびラインメモリインタフェース1505へ出力する。   The line memory interface 1505 generates image data of the (N + 1) th line based on the digital image signal 26 of the (N + 1) th line (S136). The line memory selection unit 1502 and the image data replacement signal generation unit 1503 determine whether or not the abnormal line position signal 27 is input to the Nth line (S137). As shown in FIG. 14, the abnormal line position signal 27 is positive logic (high active). When the abnormal line position signal 27 (= '1') is input to the Nth line (YES in S137), the image data replacement signal generation unit 1503 displays the image data replacement signal 32 indicating that there is an abnormality in the Nth line. Is generated (S138). The image data replacement signal 32 is a 1-bit signal that transitions at the falling edge of the normal line synchronization signal 23, and its initial value is “0”. When the abnormal line position signal 27 (= '1') is input to the Nth line (YES in S137), the image data replacement signal 32 is the rising edge of the normal line synchronization signal 23 of the next line (N + 1th line). It goes down to '1'. When the abnormal line position signal 27 is not input to the (N + 1) th line (abnormal line position signal 27 = '0'), the image data replacement signal 32 is the normal line synchronization signal 23 of the next line (N + 2th line). It becomes '0' at the falling edge. The image data replacement signal generation unit 1503 outputs the image data replacement signal 32 to the replacement counter 1504 and the line memory interface 1505 on the (N + 1) th line.

Nライン目に異常ライン位置信号27(=‘1’)が入力されない場合(S137でNO)、画像データ置き換え信号生成部1503は、画像データ置き換え信号32を出力しない(画像データ置き換え信号=‘0’)。ラインメモリインタフェース1505は、ラインメモリX(X=B)にN+1ライン目の画像データを保存する(S139)。ラインメモリインタフェース1505は、ラインメモリY(Y=A)からNライン目の画像データを読み出す(S140)。Nライン目に異常ライン位置信号27(=‘1’)が入力された場合(S137でYES)、ラインメモリインタフェース1505は、ラインメモリY(Y=A)にN+1ライン目の画像データを保存する(S141)。ラインメモリインタフェース1505は、ラインメモリX(X=B)からN−1ライン目の画像データを読み出し、Nライン目の画像データをN−1ライン目の画像データで置き換える(S142)。この処理により、異常が発生したラインの画像データは、前ラインの画像データで置き換えられる。Nライン目に異常ライン位置信号27(=‘1’)が入力された場合(S137でYES)、ラインメモリ選択部1502から出力されるラインメモリ選択信号31は、次のライン(N+1ライン目)で遷移しない。従って、ラインメモリインタフェース1505は、前ライン(Nライン目)と同じラインメモリAにN+1ライン目の画像データを保存し、前ライン(Nライン目)と同じラインメモリBからN−1ライン目の画像データが読み出される。   When the abnormal line position signal 27 (= '1') is not input to the Nth line (NO in S137), the image data replacement signal generation unit 1503 does not output the image data replacement signal 32 (image data replacement signal = '0). '). The line memory interface 1505 stores the image data of the (N + 1) th line in the line memory X (X = B) (S139). The line memory interface 1505 reads the image data of the Nth line from the line memory Y (Y = A) (S140). When the abnormal line position signal 27 (= '1') is input to the Nth line (YES in S137), the line memory interface 1505 stores the image data of the (N + 1) th line in the line memory Y (Y = A). (S141). The line memory interface 1505 reads the image data of the (N-1) th line from the line memory X (X = B), and replaces the image data of the Nth line with the image data of the (N-1) th line (S142). By this processing, the image data of the line where the abnormality has occurred is replaced with the image data of the previous line. When the abnormal line position signal 27 (= '1') is input to the Nth line (YES in S137), the line memory selection signal 31 output from the line memory selection unit 1502 is the next line (N + 1th line). Does not make a transition. Accordingly, the line memory interface 1505 stores the image data of the (N + 1) th line in the same line memory A as the previous line (Nth line), and the N-1th line from the same line memory B as the previous line (Nth line). Image data is read out.

置き換えカウンタ1504は、画像データ置き換え信号32に基づいて、画像データが連続して置き換えられた回数をカウントする(S143)。正常なライン同期信号23の立ち上がりで画像データ置き換え信号32が‘1’の場合、置き換えカウンタ1504は、カウント値を1つ増やす。正常なライン同期信号23の立ち上がりで画像データ置き換え信号32が‘0’の場合、置き換えカウンタ1504は、カウント値を‘0’にクリアする。置き換えカウンタ1504は、カウント値(連続置き換え回数)が、CPU106により初期設定された回数設定値以上であるか否かを判断する(S144)。カウント値が回数設定値以上である場合(S144でYES)は、置き換えカウンタ1504は、CPU106へエラー信号を出力する。CPU106は、エラー信号を受けると操作部111のディスプレイにエラーを表示する(S145)。CPU106は、画像データの置き換え処理動作および画像データ生成動作を終了する。   The replacement counter 1504 counts the number of times the image data is continuously replaced based on the image data replacement signal 32 (S143). When the image data replacement signal 32 is ‘1’ at the rising edge of the normal line synchronization signal 23, the replacement counter 1504 increases the count value by one. When the image data replacement signal 32 is ‘0’ at the rising edge of the normal line synchronization signal 23, the replacement counter 1504 clears the count value to ‘0’. The replacement counter 1504 determines whether or not the count value (number of consecutive replacements) is equal to or greater than the number of times set initially set by the CPU 106 (S144). If the count value is equal to or greater than the set number of times (YES in S144), the replacement counter 1504 outputs an error signal to the CPU. Upon receiving the error signal, the CPU 106 displays an error on the display of the operation unit 111 (S145). The CPU 106 ends the image data replacement processing operation and the image data generation operation.

カウント値が回数設定値より小さい場合(S144でNO)、CPU106は、ラインカウンタ1501のラインカウント値30に基づいて、全ラインの画像データの読み取りが完了したか否かを判断する(S146)。全ラインの画像データの読み取りが完了した場合(S146でYES)、CPU106は、画像データの置き換え処理動作および画像データ生成動作を終了する。全ラインの画像データの読み取りが完了していない場合(S146でNO)、CPU106は、異常が発生したラインの画像データが前ラインの画像データで置き換えられたか否かを判断する(S147)。具体的には、画像データ置き換え信号32が‘1’の場合、異常が発生したラインの画像データが前ラインの画像データで置き換えられている(S147でYES)。ラインメモリAにN+1ライン目の画像データが保存され(S141)、ラインメモリBからN−1ライン目の画像データが読み出されている(S142)ので、処理は、S135へ戻り、保存と読み出しのラインメモリを切り換える。ラインメモリ選択部1502は、ラインメモリBに画像データを保存し(X=B)、ラインメモリAから画像データを読み出す(Y=A)ようにラインメモリ選択信号31を生成する(S135)。一方、画像データ置き換え信号32が‘0’の場合、Nライン目に異常が発生していないので画像データのライン単位の置き換えが実施されていない(S147でNO)。保存と読み出しのラインメモリを切り換えるために、ラインメモリ選択部1502は、ラインメモリAに画像データを保存し(X=A)、ラインメモリBから画像データを読み出す(Y=B)ようにラインメモリ選択信号31を生成にする(S148)。S131〜S148の動作により、一連の画像データ置き換え処理が実行される。   If the count value is smaller than the set number of times (NO in S144), the CPU 106 determines whether or not reading of the image data for all lines has been completed based on the line count value 30 of the line counter 1501 (S146). When reading of the image data of all lines is completed (YES in S146), the CPU 106 ends the image data replacement processing operation and the image data generation operation. If reading of the image data of all lines has not been completed (NO in S146), the CPU 106 determines whether or not the image data of the line where the abnormality has occurred has been replaced with the image data of the previous line (S147). Specifically, when the image data replacement signal 32 is “1”, the image data of the line where the abnormality has occurred is replaced with the image data of the previous line (YES in S147). Since the image data of the (N + 1) th line is stored in the line memory A (S141), and the image data of the (N-1) th line is read from the line memory B (S142), the process returns to S135, and is stored and read out. Switch the line memory. The line memory selection unit 1502 stores the image data in the line memory B (X = B), and generates the line memory selection signal 31 so as to read the image data from the line memory A (Y = A) (S135). On the other hand, when the image data replacement signal 32 is “0”, no abnormality has occurred in the Nth line, and therefore, replacement of image data in units of lines has not been performed (NO in S147). In order to switch between saving and reading line memories, the line memory selection unit 1502 saves the image data in the line memory A (X = A), and reads the image data from the line memory B (Y = B). The selection signal 31 is generated (S148). A series of image data replacement processing is executed by the operations of S131 to S148.

本実施例によれば、デジタル画像信号26のうちの有効画像信号26aに異常が発生したラインの画像データを他のラインの画像データで置き換え、無効画像信号26bで異常が発生した場合には画像データの置き換えを行わない。これにより、正常な有効画像データを用いることができるので、読み取り画像の品質の低下を防止できる。   According to the present embodiment, the image data of the line in which an abnormality has occurred in the effective image signal 26a in the digital image signal 26 is replaced with the image data of another line, and when an abnormality has occurred in the invalid image signal 26b, the image is displayed. Do not replace data. Thereby, normal effective image data can be used, and deterioration of the quality of the read image can be prevented.

21・・・ライン同期信号
21b、21c・・・ライン同期信号(異常な信号)
23・・・正常なライン同期信号
26・・・デジタル画像信号
26a・・・有効画像信号
27・・・異常ライン位置信号
100・・・画像読取装置
101・・・光源
103・・・画像読取部
119・・・画像データ生成部
1403・・・異常ライン位置信号生成部
1404・・・正常ライン同期信号生成部
21 ... Line synchronization signal 21b, 21c ... Line synchronization signal (abnormal signal)
DESCRIPTION OF SYMBOLS 23 ... Normal line synchronizing signal 26 ... Digital image signal 26a ... Effective image signal 27 ... Abnormal line position signal 100 ... Image reading apparatus 101 ... Light source 103 ... Image reading part 119: Image data generation unit 1403: Abnormal line position signal generation unit 1404: Normal line synchronization signal generation unit

Claims (8)

原稿を照明するための光を出射する光源と、
前記原稿の画像からの反射光を受光して主走査方向に沿ったラインごとに画像信号および1ラインの周期を示すライン同期信号を出力する画像読取部と、
前記ライン同期信号に異常な信号が含まれている場合に、前記異常な信号を除去して正常なライン同期信号を生成する正常ライン同期信号生成部と、
前記ライン同期信号に含まれる異常な信号の発生タイミングが前記画像信号のうち画像形成に必要な有効画像信号内にある場合に異常ライン位置信号を出力し、前記異常な信号の前記発生タイミングが前記有効画像信号の外にある場合に前記異常ライン位置信号を出力しない異常ライン位置信号生成部と、
前記画像信号および前記正常なライン同期信号に基づいてラインごとの画像データを生成し、前記異常ライン位置信号が出力されたラインの画像データを他のラインの画像データで置き換える画像データ生成部と、
を備える画像読取装置。
A light source that emits light for illuminating the document;
An image reading unit that receives reflected light from the image of the document and outputs an image signal and a line synchronization signal indicating a cycle of one line for each line along the main scanning direction;
A normal line synchronization signal generator that generates a normal line synchronization signal by removing the abnormal signal when the line synchronization signal includes an abnormal signal;
When the generation timing of the abnormal signal included in the line synchronization signal is within the effective image signal necessary for image formation in the image signal, an abnormal line position signal is output, and the generation timing of the abnormal signal is An abnormal line position signal generator that does not output the abnormal line position signal when it is outside the effective image signal;
An image data generation unit that generates image data for each line based on the image signal and the normal line synchronization signal, and replaces the image data of the line from which the abnormal line position signal is output with image data of another line;
An image reading apparatus comprising:
前記他のラインは、前記異常ライン位置信号が出力された前記ラインの一つ前のラインの画像データであることを特徴とする請求項1に記載の画像読取装置。   The image reading apparatus according to claim 1, wherein the other line is image data of a line immediately preceding the line from which the abnormal line position signal is output. 前記有効画像信号が設けられる有効画像領域を設定するための領域設定値に基づいて前記有効画像領域を有する有効画像領域信号を生成する有効画像領域信号生成部を更に備えることを特徴とする請求項1又は2に記載の画像読取装置。   The apparatus further comprises an effective image area signal generation unit that generates an effective image area signal having the effective image area based on an area setting value for setting an effective image area in which the effective image signal is provided. The image reading apparatus according to 1 or 2. ユーザにより操作される操作部を更らに備え、
前記領域設定値は、前記操作部から入力される読取条件に基づいて設定されることを特徴とする請求項3に記載の画像読取装置。
Further equipped with an operation unit operated by the user,
The image reading apparatus according to claim 3, wherein the area setting value is set based on a reading condition input from the operation unit.
前記ライン同期信号から前記異常な信号を除去して前記正常なライン同期信号を生成するためのするためのマスク領域を有するマスク信号を生成するマスク信号生成部を更に備えることを特徴とする請求項1乃至4のいずれか一項に記載の画像読取装置。   The apparatus further comprises a mask signal generation unit that generates a mask signal having a mask region for removing the abnormal signal from the line synchronization signal to generate the normal line synchronization signal. The image reading apparatus according to any one of 1 to 4. 前記画像データ生成部により生成されるラインごとの画像データが保存される少なくとも二つのラインメモリを更に備えることを特徴とする請求項1乃至5のいずれか一項に記載の画像読取装置。   6. The image reading apparatus according to claim 1, further comprising at least two line memories that store image data for each line generated by the image data generation unit. 前記少なくとも二つのラインメモリへのラインごとの画像データの保存および読み出しを切り換えるラインメモリ選択部を更に備えることを特徴とする請求項6に記載の画像読取装置。   The image reading apparatus according to claim 6, further comprising a line memory selection unit that switches between storing and reading image data for each line in the at least two line memories. 前記異常ライン位置信号が出力されたラインの画像データを他のラインの画像データで置き換える回数をカウントする置き換えカウンタを更に備え、
前記置き換えカウンタは、カウント値が回数設定値に達すると表示部にエラーを表示するためのエラー信号を出力することを特徴とする請求項1乃至7のいずれか一項に記載の画像読取装置。
A replacement counter that counts the number of times the image data of the line from which the abnormal line position signal is output is replaced with image data of another line;
8. The image reading apparatus according to claim 1, wherein the replacement counter outputs an error signal for displaying an error on a display unit when the count value reaches a set number of times.
JP2017017752A 2017-02-02 2017-02-02 Image reading device Pending JP2018124873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017017752A JP2018124873A (en) 2017-02-02 2017-02-02 Image reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017017752A JP2018124873A (en) 2017-02-02 2017-02-02 Image reading device

Publications (1)

Publication Number Publication Date
JP2018124873A true JP2018124873A (en) 2018-08-09

Family

ID=63111488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017017752A Pending JP2018124873A (en) 2017-02-02 2017-02-02 Image reading device

Country Status (1)

Country Link
JP (1) JP2018124873A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11317003B2 (en) * 2019-06-10 2022-04-26 Ricoh Company, Ltd. Image processing apparatus, method, and product for correcting section of abnormal image based on position in abnormal line image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11317003B2 (en) * 2019-06-10 2022-04-26 Ricoh Company, Ltd. Image processing apparatus, method, and product for correcting section of abnormal image based on position in abnormal line image

Similar Documents

Publication Publication Date Title
US6937264B2 (en) Laser scanning control apparatus
JP2002176534A (en) Image reader
JP2018124873A (en) Image reading device
JP4636246B2 (en) Image reading device
JP2004297365A (en) Image sensor, reading device, and resolution setting method
JP2017225019A (en) Scanner, and production method for scanned image
US11503186B2 (en) Image reading apparatus, control method, and computer program product suppressing the influence of noise by comparing and managing color information
JP2018133646A (en) Image reader, control method of image reader
JP2014064073A (en) Image reading device, image forming device, image reading method, and image forming method
JP2013131861A (en) Image reader, image forming apparatus, read image data processing method, and program
JP6323002B2 (en) Image reading device
JP3782767B2 (en) Image forming apparatus and laser scanning length correction method
JP5738157B2 (en) Image reading apparatus, image forming apparatus, and image reading method
JP2010212959A (en) Abnormality detecting device, image reader, image forming apparatus, abnormality detection method and control program
JP6303408B2 (en) Image reading apparatus, image reading method, and image forming apparatus
JP7071220B2 (en) Image reader
JP3699047B2 (en) Image reader
JP2003209664A (en) Image reader
JP2022138981A (en) Signal processing device, image reading device, information processing device, and program
JP2011061695A (en) Image reading apparatus and method, and program
JP3234650B2 (en) Red / black data reader
JP2023134927A (en) Image reading device
JP2006087053A (en) Image reading apparatus, image reading method, program, recording medium and image forming apparatus
JP2009027248A (en) Image reader and discrimination method for image sensor
JP2010081526A (en) Image reading apparatus and image reading method

Legal Events

Date Code Title Description
RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20171214

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180126