JPH10341332A - Image-forming device - Google Patents

Image-forming device

Info

Publication number
JPH10341332A
JPH10341332A JP9152344A JP15234497A JPH10341332A JP H10341332 A JPH10341332 A JP H10341332A JP 9152344 A JP9152344 A JP 9152344A JP 15234497 A JP15234497 A JP 15234497A JP H10341332 A JPH10341332 A JP H10341332A
Authority
JP
Japan
Prior art keywords
image
area
document
original
image forming
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
JP9152344A
Other languages
Japanese (ja)
Inventor
Nobuhiro Mishima
信広 三縞
Kazuhiro Ueda
和弘 上田
Daisetsu Tooyama
大雪 遠山
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.)
Minolta Co Ltd
Original Assignee
Minolta Co 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 Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP9152344A priority Critical patent/JPH10341332A/en
Priority to US09/095,311 priority patent/US6433896B1/en
Publication of JPH10341332A publication Critical patent/JPH10341332A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To form an appropriate image, even when an original protrudes from a read area by calculating the inclined angle of original and the position deviation of original from the coordinate of the area of detected original and operating an arbitrary angle rotating means based on these values, when the original protrudes from the read area. SOLUTION: When the original protrudes, an image signal processing part 20 detects the area of original placed in the read area on original glass and extracts plural coordinates showing the detected area of original. Then, an inclination angle θ of original and the deviation of original are calculated from the extracted coordinates of original area and based on these values, various parameters for rotating processing are set. Namely, even when the original is inclined and further placed while protruding from the read area, the area where the original placed on the original glass exists is detected from image data, respective sides are extracted from the coordinates of detected original area, four corners of original are estimated. Based on them, the various parameters required for arbitrary angle rotating processing are calculated.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、デジタル複写機、
ファクシミリ、複合機などの画像形成装置に関する。
The present invention relates to a digital copying machine,
The present invention relates to an image forming apparatus such as a facsimile and a multifunction peripheral.

【0002】[0002]

【従来の技術】画像形成装置から出力するための2次元
画像データの任意角回転処理機能が提案されている(た
とえば特公昭63−9266号公報)。この任意角回転
処理では、原稿画像を読み取るために原稿ガラス上に置
かれた原稿の位置が誤っている場合に、その原稿の傾き
を検出して、画像データを任意角だけ回転して傾きを補
正する。こうして補正された画像データについて画像を
形成する。したがって、ユーザーが原稿台ガラス上に置
いた原稿が傾いていたとしても、自動的に傾きを補正し
てコピーがとれる。
2. Description of the Related Art A function of rotating an arbitrary angle of two-dimensional image data to be output from an image forming apparatus has been proposed (for example, Japanese Patent Publication No. 63-9266). In the arbitrary angle rotation process, when the position of the original placed on the original glass for reading the original image is incorrect, the inclination of the original is detected, and the image data is rotated by an arbitrary angle to reduce the inclination. to correct. An image is formed from the image data corrected in this way. Therefore, even if the document placed on the platen glass by the user is skewed, the skew is automatically corrected and a copy can be taken.

【0003】[0003]

【発明が解決しようとする課題】ところが、従来の画像
形成装置では、原稿が原稿ガラス上の読取領域からはみ
出ている場合、任意角回転処理のための正しいパラメー
タが設定できない。このため、そのような原稿について
そのまま任意角回転処理をすると、本来求められる画像
が得られない、という不都合が生じる。
However, in the conventional image forming apparatus, when the original is out of the reading area on the original glass, it is impossible to set a correct parameter for the arbitrary angle rotation processing. Therefore, if an arbitrary angle rotation process is performed on such a document as it is, there is a disadvantage that an image originally required cannot be obtained.

【0004】本発明の目的は、任意角回転機能を有する
画像形成装置において、原稿が読取領域からはみ出てい
る場合にも適切な画像が形成できる画像形成装置を提供
することである。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an image forming apparatus having an arbitrary angle rotation function which can form an appropriate image even when a document is out of a reading area.

【0005】[0005]

【課題を解決するための手段】本発明に係る画像形成装
置は、原稿ガラスの読取領域上に置かれている原稿の2
次元画像データを入力する画像入力手段と、画像入力手
段により入力された原稿の画像データより、原稿ガラス
上に置かれている原稿が存在する領域を検出する検出手
段と、検出手段により検出された原稿の領域が傾いてい
る場合に、2次元の入力画像を任意角回転する任意角回
転手段と、原稿が読取領域からはみ出ている場合に、検
出された原稿の領域の座標より原稿の傾き角度と原稿の
位置のずれを算出し、それらに基づいて前記の任意角回
転手段を動作させる制御手段とを備える。すなわち、原
稿ガラス上に置かれた原稿が存在する領域(原稿領域)
を画像データから検出して、原稿が傾いていて、しか
も、読取領域からはみ出して置かれている場合でも、原
稿の領域の座標より原稿領域の4隅を推定して各辺を抽
出し、それより任意角回転処理に必要な各種パラメータ
(用紙サイズ、傾き角度、ずれなど)を算出する。こう
して、原稿が原稿ガラス上の読取領域からはみ出して置
かれた場合でも、画像データから各種パラメータを算出
して、これに基づいて画像データを任意角回転し、原稿
の傾きを自動的に補正した画像を出力できる。好ましく
は、制御手段は、原稿の画像データから得られる原稿領
域の座標より読取領域の原稿の辺の長さを検出し、傾き
角度と読取領域内の原稿の辺の長さとから読取領域外の
辺の長さを設定する。原稿は長方形であり、読取領域に
おいて、画像データから原稿の傾き角と辺を求め、これ
より、読取領域外に位置するものを含め原稿の4隅を決
定する。そして、これに基づいて用紙サイズを演算し、
得られた傾き角度、用紙サイズおよびずれに基づいて任
意角回転手段を動作させる。また、好ましくは、制御手
段は、画像データより原稿領域の座標から得られた直線
を原稿領域の各辺とみなして傾き角度を抽出する。すな
わち、原稿の存在する領域の境界を定める直線を各辺と
みなして、傾き角度を抽出する。また、好ましくは、制
御手段は、前記の傾き角度を、前記の抽出された原稿の
各辺のうち最も長い辺より算出する。これにより、最も
信頼できる角度を求める。また、好ましくは、制御手段
は、画像データから前記の原稿領域を示す辺を抽出でき
なかった場合、任意角回転手段を動作させない。これに
より、原稿画像の不確かな回転補正を禁止する。また、
好ましくは、制御手段は、抽出された原稿領域の各辺か
ら算出したそれぞれの傾き角度のうち、ほかの算出結果
と著しく異なる角度のある場合、任意角回転手段を動作
させない。すなわち、原稿の形が不規則である場合に、
原稿画像の回転を禁止する。また、好ましくは、制御手
段は、用紙サイズを、原稿検出手段により検出した原稿
領域を含み、抽出した辺を辺の1部とする長方形領域か
ら算出する。すなわち、画像データから原稿領域に存在
する辺を含む長方形領域を求め、これを基に原稿のサイ
ズを推定する。また、好ましくは、制御手段は、算出し
た用紙サイズが最大用紙サイズより大きい場合、任意角
回転手段を動作させない。これにより、正常な画像が得
られない場合に、回転を禁止する。また、さらに好まし
くは、画像形成装置は、さらに画像データを90°回転
させる90°回転手段を備え、制御手段は、算出した用
紙サイズが最大用紙サイズより大きく、かつ、用紙の縦
横を入れ替えると最大用紙サイズより小さい場合、任意
角回転手段とともに、90°回転手段を動作させる。す
なわち、得られた用紙サイズが画像形成装置が取扱い可
能な最大用紙サイズより大きくても、90°の回転によ
り正常な画像が得られる場合には、90°回転をも併用
して、画像の傾きを補正するため画像を回転する。好ま
しくは、制御手段は、抽出された辺のうち隣り合った2
以上の辺がある場合、それらの辺と算出された用紙サイ
ズより画像の平行移動量を算出する。すなわち、隣り合
う2以上の辺がある場合、少なくとも1つの隅が決定で
きる。したがって、それを用いて、画像の傾きを任意角
回転により補正する場合の画像データの平行移動量を算
出できる。
According to the present invention, there is provided an image forming apparatus comprising: an original;
Image input means for inputting two-dimensional image data, detection means for detecting an area where the original placed on the original glass exists from the image data of the original input by the image input means, and detection by the detection means Arbitrary-angle rotating means for rotating the two-dimensional input image by an arbitrary angle when the area of the original is inclined, and an inclination angle of the original from the coordinates of the detected original area when the original is out of the reading area. And a control means for calculating the deviation of the position of the document and operating the arbitrary angle rotation means on the basis of them. That is, the area where the original placed on the original glass exists (original area)
Is detected from the image data, and even if the document is inclined and is placed out of the reading area, the four corners of the document area are estimated from the coordinates of the document area, and each side is extracted. Further, various parameters (paper size, tilt angle, deviation, etc.) necessary for the arbitrary angle rotation processing are calculated. In this way, even when the original is placed out of the reading area on the original glass, various parameters are calculated from the image data, and the image data is rotated by an arbitrary angle based on the calculated parameters, thereby automatically correcting the inclination of the original. Images can be output. Preferably, the control unit detects the length of the side of the original in the reading area from the coordinates of the original area obtained from the image data of the original, and determines the length of the side of the original in the reading area based on the inclination angle and the length of the side of the original in the reading area. Set the side length. The document is rectangular, and in the reading area, the inclination angle and the sides of the document are obtained from the image data, and the four corners of the document including those located outside the reading area are determined. Then, calculate the paper size based on this,
The arbitrarily rotating unit is operated based on the obtained tilt angle, paper size and deviation. Preferably, the control unit extracts a tilt angle by regarding a straight line obtained from the coordinates of the document area from the image data as each side of the document area. That is, the inclination angle is extracted by regarding the straight line that defines the boundary of the area where the document exists as each side. Preferably, the control means calculates the inclination angle from the longest side among the sides of the extracted document. Thus, the most reliable angle is obtained. Preferably, the control unit does not operate the arbitrary-angle rotating unit when the side indicating the document area cannot be extracted from the image data. This prohibits uncertain rotation correction of the document image. Also,
Preferably, the control unit does not operate the arbitrary-angle rotating unit when there is an angle that is significantly different from another calculation result among the respective inclination angles calculated from each side of the extracted document area. That is, if the shape of the manuscript is irregular,
Prohibits rotation of the original image. Preferably, the control means calculates the paper size from a rectangular area including the document area detected by the document detection means and having the extracted side as one of the sides. That is, a rectangular area including sides existing in the document area is obtained from the image data, and the size of the document is estimated based on this. Preferably, the control unit does not operate the arbitrary-angle rotating unit when the calculated paper size is larger than the maximum paper size. This prohibits rotation when a normal image cannot be obtained. More preferably, the image forming apparatus further includes a 90 ° rotation unit that rotates the image data by 90 °, and the control unit determines that the calculated paper size is larger than the maximum paper size, and that the maximum length is obtained when the length and width of the paper are switched. If the size is smaller than the paper size, the 90 ° rotation unit is operated together with the arbitrary angle rotation unit. That is, even if the obtained paper size is larger than the maximum paper size that can be handled by the image forming apparatus, if a normal image can be obtained by rotating the image by 90 °, the 90 ° rotation can be used together to tilt the image. Rotate the image to correct for. Preferably, the control unit is configured to control two adjacent sides of the extracted sides.
If there are the above sides, the amount of parallel movement of the image is calculated from those sides and the calculated paper size. That is, when there are two or more adjacent sides, at least one corner can be determined. Therefore, it can be used to calculate the parallel movement amount of the image data when the inclination of the image is corrected by the arbitrary angle rotation.

【0006】[0006]

【発明の実施の形態】本発明の画像形成装置の1実施形
態であるデジタル複写機を、以下に添付の図面を参照し
て説明する。 (1)複写機の構成 図1は、デジタル複写機1の全体の構成を図式的に示
す。このデジタル複写機1は、読取装置200、プリン
タ装置300、原稿搬送部500、操作パネル(図2参
照)および再給紙ユニット600からなる。原稿搬送部
500は、原稿給紙トレー510上にセットされた原稿
を自動的に原稿ガラス18上の読取位置に搬送し、読取
装置200が原稿を読み取った後に原稿を排出トレイ5
11へ排出する。原稿のサイズは、センサ551と55
2により検出される。読取装置200は、走査系、画像
処理部20などからなる。走査系では、原稿ガラス18
上の原稿を読み取り、その原稿の画像の各画素に対応す
る画像データを生成する。すなわち、原稿は、原稿ガラ
ス18の下方を移動するスキャナ19に組み付けられた
露光ランプ12により照射される。原稿からの反射光
は、第1ミラー12と固定ミラー13a,13bと集光用
のレンズ14を経て、CCDアレイなどを用いたライン
センサ(光電変換素子)16に入射される。スキャナ位
置センサ17は、スキャナ19が原稿読取領域(画像領
域)に達することを検出するために設けられる。ライン
センサ16は、図1の紙面に直交する方向(主走査方
向)に多数の光電変換素子を配列したものであり、たと
えば400DPIで画像を読み取り、原稿の画像の各画
素に対応する反射光を電気信号に変換し、画像信号処理
部20に出力する。画像信号処理部20は、入力電気信
号を処理し、メモリユニット部30に対して画像データ
を出力する。ここで、画像信号処理部20は、原稿の傾
きを検出できる。メモリユニット部30は、画像信号処
理部20から入力される画像データを圧縮して一旦記憶
し、次に、伸長処理を行ってプリンタ装置300に送信
する。伸長の際、必要ならば、傾いた原稿に対する任意
角回転などの編集処理などが施される。また、メモリユ
ニット部30は、後述する外部機器インターフェース部
を備えており、外部機器接続用コネクタ50を介し、外
部ケーブル51を通して外部機器に接続される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A digital copying machine as an embodiment of the image forming apparatus of the present invention will be described below with reference to the accompanying drawings. (1) Configuration of Copying Machine FIG. 1 schematically shows the overall configuration of a digital copying machine 1. The digital copying machine 1 includes a reading device 200, a printer device 300, a document transport unit 500, an operation panel (see FIG. 2), and a re-feed unit 600. The document transport unit 500 automatically transports the document set on the document feed tray 510 to a reading position on the document glass 18 and, after the reading device 200 reads the document, discharges the document to the discharge tray 5.
Discharge to 11 The size of the original is determined by sensors 551 and 55
2 detected. The reading device 200 includes a scanning system, the image processing unit 20, and the like. In the scanning system, the original glass 18
The upper document is read, and image data corresponding to each pixel of the image of the document is generated. That is, the original is irradiated by the exposure lamp 12 attached to the scanner 19 that moves below the original glass 18. Light reflected from the document passes through a first mirror 12, fixed mirrors 13a and 13b, and a condenser lens 14, and is incident on a line sensor (photoelectric conversion element) 16 using a CCD array or the like. The scanner position sensor 17 is provided to detect that the scanner 19 reaches the document reading area (image area). The line sensor 16 has a large number of photoelectric conversion elements arranged in a direction (main scanning direction) orthogonal to the paper surface of FIG. 1. The line sensor 16 reads an image at 400 DPI, for example, and outputs reflected light corresponding to each pixel of the image of the document. The signal is converted into an electric signal and output to the image signal processing unit 20. The image signal processing unit 20 processes the input electric signal and outputs image data to the memory unit 30. Here, the image signal processing unit 20 can detect the inclination of the document. The memory unit section 30 compresses and temporarily stores the image data input from the image signal processing section 20, and then performs decompression processing and transmits it to the printer device 300. At the time of decompression, if necessary, editing processing such as rotation of the inclined document by an arbitrary angle is performed. Further, the memory unit section 30 includes an external device interface section described later, and is connected to an external device through an external cable 51 via an external device connection connector 50.

【0007】プリンタ装置300は、印字処理部40、
レーザ光学系60、作像系などから構成される。印字処
理部40は、メモリユニット部30から受信される画像
データに基づいてレーザ光学系60を制御する。レーザ
光学系60において、半導体レーザ61は、印字処理部
40からの信号によって変調されるレーザビームを放射
し、ポリゴンミラー65は、このレーザビームを偏向
し、感光体ドラム71上へ走査させる。すなわち、偏向
されたレーザビームは、f-θレンズ66および反射ミ
ラー67、68をへて、感光体ドラム71上の露光位置
に導かれ、この走査により、感光体ドラム71上に原稿
画像の潜像が形成される。
The printer device 300 includes a print processing unit 40,
It comprises a laser optical system 60, an image forming system and the like. The print processing unit 40 controls the laser optical system 60 based on the image data received from the memory unit 30. In the laser optical system 60, the semiconductor laser 61 emits a laser beam modulated by a signal from the print processing unit 40, and the polygon mirror 65 deflects the laser beam and scans the laser beam on the photosensitive drum 71. That is, the deflected laser beam is guided to the exposure position on the photosensitive drum 71 via the f-θ lens 66 and the reflection mirrors 67 and 68, and the scanning of the original image on the photosensitive drum 71 is performed by this scanning. An image is formed.

【0008】画像形成は作像系において電子写真方式で
行われ、感光体ドラム71上に形成された潜像を現像
し、用紙上に転写かつ定着して用紙上に画像を形成す
る。ここで、図1の反時計方向に回転駆動される感光体
ドラム71が帯電チャージャ72により一様に帯電され
た後で露光され、潜像は現像器73により現像される。
(図示を簡単にするため1個の現像器のみが記載される
が、シアン、マゼンタ、イエロー、ブラックの4色のト
ナーの現像器を設けることにより、カラー画像が現像で
きる。)一方、用紙は、カセット80a、80bから用紙
ガイド81とタイミングローラ82をへて感光体ドラム
71へ導かれ、現像で得られたトナー像は、転写チャー
ジャ74により用紙に転写される。次に、用紙は、分離
チャージャ75により分離され、定着ローラ84へ搬送
される。定着ローラ84は、像を用紙に熱で定着し、そ
の後、用紙は、再給紙ユニット600を経て排出され
る。
Image formation is performed by an electrophotographic method in an image forming system, and a latent image formed on a photosensitive drum 71 is developed, transferred and fixed on paper to form an image on paper. Here, the photosensitive drum 71 rotated and driven in the counterclockwise direction in FIG. 1 is uniformly charged by the charging charger 72 and then exposed, and the latent image is developed by the developing unit 73.
(Only one developing device is shown for simplicity of illustration, but a color image can be developed by providing developing devices for four colors of cyan, magenta, yellow, and black.) Then, the toner image is guided from the cassettes 80a and 80b to the photosensitive drum 71 through the sheet guide 81 and the timing roller 82, and the toner image obtained by the development is transferred to the sheet by the transfer charger 74. Next, the sheet is separated by the separation charger 75 and is conveyed to the fixing roller 84. The fixing roller 84 fixes the image on the sheet by heat, and then the sheet is discharged through the re-feed unit 600.

【0009】図2は、複写機の操作パネルの平面図であ
る。操作パネルには、状態表示および各種モード設定の
ための液晶タッチパネル91、コピーの数値(枚数、倍
率など)を入力するためのテンキー92、数値を標準値
に戻すためのクリアキー93、コピーモードを初期化す
るためのパネルリセットキー94、コピーの中止を指示
するためのストップキー95、コピーの開始を指示する
ためのスタートキー96、割り込み起動および復帰を指
定するための割り込みキー97、傾斜角補正モードを指
示するキー102などが配置される。キー102を押す
ことにより、液晶タッチパネル91において、任意角回
転機能に関連した各種チョイス設定(モード設定など)
が行える。図3は、複数のデジタル複写機1、1'をネ
ットワーク上に接続したシステム形態の1例を示す。デ
ジタル複写機1、1’は、外部機器インターフェースコ
ネクタ50にて、インターフェースケーブル51を介し
て、外部機器の1例であるコントローラ2、2'に接続
される。コントローラ2は、Ethernetなどの汎
用インターフェースを介してコンピュータ3に接続さ
れ、また、コントローラ2'を通して他のデジタル複写
機1'に接続される。1例として、コンピュータ3で作
成したデータファイルのプリントのため、各種設定(用
紙サイズ、倍率、プリント枚数、ステープル、ソーティ
ングなどの条件)および出力命令が入力されると、コン
ピュータ3上でのプリント処理でコントローラ2へ送ら
れる。コントローラ2では、一般的にコンピュータ3か
ら送られてくる画像データ(ポストスクリプトデータな
ど)をラスターデータへ変換する。そのため、コントロ
ーラ2には、最低で1画面分のメモリが搭載される。ビ
ットマップデータに変換されると、デジタル複写機1へ
画像データを伝送し(同時に、各種設定条件もコントロ
ーラ2を介して送信し)、デジタル複写機1側で、用紙
上への画像形成および各種処理が施される。なお、本発
明はこのシステム形態に限定されるものではなく、モデ
ムと電話回線を通して接続されているファクシミリ装置
などのシステムなども含むものである。
FIG. 2 is a plan view of the operation panel of the copying machine. The operation panel includes a liquid crystal touch panel 91 for status display and various mode settings, a numeric keypad 92 for inputting numerical values (number of sheets, magnification, etc.), a clear key 93 for returning numerical values to standard values, and a copy mode. Panel reset key 94 for initializing, stop key 95 for instructing stop of copy, start key 96 for instructing start of copy, interrupt key 97 for designating interrupt start and return, tilt angle correction A key 102 for instructing a mode is arranged. By pressing the key 102, various choice settings (mode setting, etc.) related to the arbitrary angle rotation function can be made on the liquid crystal touch panel 91.
Can be performed. FIG. 3 shows an example of a system configuration in which a plurality of digital copying machines 1, 1 'are connected on a network. The digital copying machines 1 and 1 'are connected to controllers 2 and 2', which are an example of external equipment, via an external equipment interface connector 50 and an interface cable 51. The controller 2 is connected to the computer 3 via a general-purpose interface such as Ethernet, and is connected to another digital copying machine 1 'through the controller 2'. As an example, when various settings (conditions such as paper size, magnification, number of prints, staple, sorting, etc.) and an output command are input for printing a data file created by the computer 3, print processing on the computer 3 is performed. Is sent to the controller 2. The controller 2 generally converts image data (such as PostScript data) sent from the computer 3 into raster data. Therefore, the controller 2 is equipped with a memory for at least one screen. When converted into bitmap data, the image data is transmitted to the digital copying machine 1 (at the same time, various setting conditions are also transmitted via the controller 2). Processing is performed. It should be noted that the present invention is not limited to this system form, but also includes a system such as a facsimile apparatus connected to a modem through a telephone line.

【0010】(2)複写機の制御系 図4と図5は、複写機1を制御する制御部100を示
す。制御部100は、8個のCPU101〜107を中
心に構成され、これら各CPU101〜107には、そ
れぞれプログラムを格納したROM111〜117およ
びプログラム実行のワークエリアとなるRAM121〜
127が設けられている。なお、CPU103は、メモ
リユニット30内に設けられる。
(2) Copying Machine Control System FIGS. 4 and 5 show a control unit 100 for controlling the copying machine 1. The control unit 100 is mainly composed of eight CPUs 101 to 107. Each of the CPUs 101 to 107 has a ROM 111 to 117 storing a program and a RAM 121 to 117 serving as a work area for executing the program.
127 are provided. Note that the CPU 103 is provided in the memory unit 30.

【0011】第1CPU101は、操作パネル(図2参
照)の各種操作キーからの信号の入力および液晶タッチ
パネルの表示を制御する。第2CPU102は、読取装
置200の走査系の駆動制御と画像信号処理部20の各
部の制御を行なう。ここで、読み取った画像より、原稿
の傾きを検出する。第3CPU103は、メモリユニッ
ト部30を制御することによって読取った画像データを
圧縮し符号メモリ303に一旦格納し、次にこれを読出
して印字処理部40へ出力する。ここで、読み出し時
に、画像傾き補正を含む画像データの回転編集などが行
われる。なお、メモリユニット部30には、外部機器と
のインターフェースを行なう機能があり、画像データや
制御データが送受信される。第4CPU104は、プリ
ンタ装置300の印字処理部40、光学系60および作
像系の制御を行なう。第5CPU105は、制御部10
0の全体的なタイミング調整や動作モードの設定のため
の処理を行なう。第6CPU106は、原稿搬送部50
0の制御を行なう。第7CPU107は、再給紙ユニッ
ト600の制御を行なう。これらのCPU101〜10
7の間では、割込みによるシリアル通信が行なわれ、コ
マンド、レポートなどデータが授受される。
The first CPU 101 controls input of signals from various operation keys on an operation panel (see FIG. 2) and display on a liquid crystal touch panel. The second CPU 102 controls driving of a scanning system of the reading device 200 and controls each unit of the image signal processing unit 20. Here, the inclination of the document is detected from the read image. The third CPU 103 compresses the read image data by controlling the memory unit 30, temporarily stores the read image data in the code memory 303, then reads out the image data and outputs it to the print processing unit 40. Here, at the time of reading, rotation editing of image data including image tilt correction is performed. The memory unit 30 has a function of interfacing with an external device, and transmits and receives image data and control data. The fourth CPU 104 controls the print processing unit 40, the optical system 60, and the image forming system of the printer device 300. The fifth CPU 105 controls the control unit 10
Processing for adjusting the overall timing of 0 and setting the operation mode is performed. The sixth CPU 106 controls the document conveying unit 50
0 is controlled. The seventh CPU 107 controls the sheet re-feed unit 600. These CPUs 101 to 10
Between 7, serial communication is performed by interruption, and data such as commands and reports are transmitted and received.

【0012】図6は、CPU105により制御されるコ
ントローラ2のブロック図である。第1外部インターフ
ェース700は、外部のコンピュータ3と信号のやりと
りをする。インタープリタ702は、コンピュータ3か
ら送られてきたデータ(たとえばポストスクリプトデー
タ)を翻訳してラスターデータへ展開し、メモリ部70
2は、ラスターデータを記憶する。1ページ分の画像デ
ータを格納すると、第2外部インターフェース704を
介して印字部へ画像データが出力される。
FIG. 6 is a block diagram of the controller 2 controlled by the CPU 105. The first external interface 700 exchanges signals with the external computer 3. The interpreter 702 translates data (for example, postscript data) sent from the computer 3 and develops the data into raster data,
2 stores raster data. When one page of image data is stored, the image data is output to the printing unit via the second external interface 704.

【0013】次に、画像データの処理について説明す
る。図7は、画像信号処理部20を示し、画像信号処理
部20は、タイミング制御部21、アンプ23、A/D
変換器25、シェーディング補正部26、濃度変換部2
7、電気変倍部28、編集加工部29などからなり、C
PU102により制御される。画像信号処理部20によ
って、ラインセンサ16からの入力信号が、アンプ23
により増幅され、A/D変換器25により画素ごとに8
ビットの画像データに量子化される。画像データは、そ
の後、シェーディング補正、濃度データへの変換(ガン
マ補正)、電気変倍、編集加工の種々の処理が施された
後に、画像データとしてメモリユニット30やプリンタ
装置に送られる。CPU102は、画像信号処理部20
の各部26〜29へのパラメータの設定、レーザ走査系
のスキャナモータのスキャン制御、CPU105との通
信などを行い、読取装置200全体を制御する。原稿サ
イズおよび原稿の向きは次のように検知される。読み取
った画像が原稿であるか否かの判断において、たとえ
ば、原稿搬送装置500の原稿カバーを鏡面のものとし
て、原稿ガラス18上に置かれた原稿を走査し、反射光
量が多いところを原稿と判断する。鏡面であれば反射光
量がほとんどないため、その判断が容易である。したが
って、原稿カバーを開放した状態で走査してもよい。C
PU102は、CPU105より原稿サイズ検出動作の
指示を受けると、予備スキャンをおこなう。CPU10
2は、スキャナ位置センサ17からの位置情報に基づい
て、スキャナ19を駆動するスキャナモータを制御し、
スキャナ19を副走査方向に走査させる。副走査位置に
対応したタイミングで、画像データの内容とモニタ位置
情報とから、原稿サイズと縦置き/横置きを検出し、検
出結果をCPU105へ送信する。CPU102は、C
PU105から送信される倍率情報を基に、画像読取時
に、その倍率情報にあったスキャン速度でスキャナモー
タの速度を制御する。
Next, processing of image data will be described. FIG. 7 illustrates an image signal processing unit 20. The image signal processing unit 20 includes a timing control unit 21, an amplifier 23, an A / D
Converter 25, shading correction unit 26, density conversion unit 2
7, an electric scaling section 28, an editing section 29, etc.
It is controlled by the PU 102. The image signal processing unit 20 converts the input signal from the line sensor 16 into an amplifier 23
And amplified by the A / D converter 25 for each pixel.
It is quantized to bit image data. The image data is then subjected to various processes such as shading correction, conversion to density data (gamma correction), electric scaling, and editing, and then sent as image data to the memory unit 30 or a printer device. The CPU 102 controls the image signal processing unit 20
Of the scanner unit of the laser scanning system, communication with the CPU 105, and the like, and controls the entire reading apparatus 200. The document size and the orientation of the document are detected as follows. In determining whether or not the read image is a document, for example, the document placed on the document glass 18 is scanned by setting the document cover of the document feeder 500 to a mirror-like surface, and a portion where the amount of reflected light is large is determined as the document. to decide. If the mirror surface is used, the amount of reflected light is very small, so that the determination is easy. Therefore, scanning may be performed with the document cover opened. C
When receiving an instruction of the document size detection operation from the CPU 105, the PU 102 performs a preliminary scan. CPU10
2 controls a scanner motor that drives the scanner 19 based on position information from the scanner position sensor 17;
The scanner 19 is caused to scan in the sub-scanning direction. At the timing corresponding to the sub-scanning position, the document size and the portrait / landscape orientation are detected from the content of the image data and the monitor position information, and the detection result is transmitted to the CPU 105. The CPU 102
Based on the magnification information transmitted from the PU 105, at the time of image reading, the speed of the scanner motor is controlled at a scan speed that matches the magnification information.

【0014】図8は、メモリユニット30のブロック図
である。切り換え部301は、画像信号処理部20、印
字処理部、外部インターフェース310への画像データ
のルートを切り換える。領域判別部303は、入力画像
データが単純2値データであるか中間調データであるか
について領域判別をする。2値化処理部302は、第3
CPU103からのパラメータ設定に基づいて、誤差拡
散、ディザ法などにより多値画像データに復元可能な範
囲で画像データを2値データに変換する。画像メモリ
は、2ページ分の容量を有する。2値データは、画像メ
モリに記憶される。画像メモリ304から読み出された
2値データは、次に、符号処理部305の中の圧縮器3
11によって圧縮され、符号メモリ306に記憶され
る。符号メモリ306は、たとえば、400DPIでA
4サイズの1頁分の容量を有するマルチポートのメモリ
である。符号メモリ306には、複数頁の原稿画像の読
取データが一時的に記憶されるが、符号メモリ306内
のデータは、RAM126内に設けられた符号管理テー
ブルによって管理される。
FIG. 8 is a block diagram of the memory unit 30. The switching unit 301 switches the route of image data to the image signal processing unit 20, the print processing unit, and the external interface 310. The area determining unit 303 determines whether the input image data is simple binary data or halftone data. The binarization processing unit 302
Based on the parameter settings from the CPU 103, the image data is converted into binary data within a range that can be restored to multi-valued image data by error diffusion, dithering, or the like. The image memory has a capacity for two pages. The binary data is stored in the image memory. The binary data read from the image memory 304 is then sent to the compressor 3 in the code processing unit 305.
11 and stored in the code memory 306. The code memory 306 stores, for example, A at 400 DPI.
This is a multi-port memory having a capacity of one page of four sizes. The code memory 306 temporarily stores read data of a document image of a plurality of pages. The data in the code memory 306 is managed by a code management table provided in the RAM 126.

【0015】プリント時には、符号メモリ306内の圧
縮された画像データは、伸長器312によって伸長され
る。また画像編集が必要な場合は、伸長時に編集制御部
307で編集処理(回転、変倍、移動など)を行い、編
集処理と伸長処理を同時に行う。必要ならば伸長時に傾
斜角回転も行われる。伸長されたデータは、画像メモリ
304に転送される。1ページ分のデータの伸長がなさ
れると、画像メモリ304から読み出された2値データ
は、多値化処理部308により多値データに変換され、
必要ならばスムージング処理部309においてスムージ
ング処理がされた後、切り換え部301を介して、印字
処理部40または外部機器に転送される。CPU103
は、多値化処理部302とスムージング処理部309に
制御パラメータを送る。
At the time of printing, the compressed image data in the code memory 306 is expanded by an expander 312. If image editing is required, the editing control unit 307 performs editing processing (rotation, scaling, movement, etc.) at the time of decompression, and performs the editing processing and decompression processing simultaneously. If necessary, a tilt angle rotation is also performed at the time of extension. The decompressed data is transferred to the image memory 304. When the data of one page is decompressed, the binary data read from the image memory 304 is converted into multi-value data by the multi-value processing unit 308.
If necessary, after the smoothing processing is performed in the smoothing processing unit 309, the data is transferred to the print processing unit 40 or the external device via the switching unit 301. CPU103
Sends control parameters to the multi-value processing section 302 and the smoothing processing section 309.

【0016】次に、画像読取及びプリントにおける複写
機1の動作シーケンスについて、CPU101〜106
の間でやりとりされる要求コマンド(Q)、レポート(A)
およびデータの流れを中心に説明する。図9は、メモリ
書き込み動作の概略のシーケンスを示す。まず、全体の
シーケンスを管理している第5CPU105が、メモリ
ユニット部30を制御する第3CPU103に対してメ
モリ準備を要求する。これを受けて、CPU103は、
内部ハードウエアに対し、画像信号処理部20からの画
像データを画像メモリ304へ転送させるためのバス接
続状態の設定、2値化処理のためのモードの設定、画像
メモリ304における書き込み領域の開始アドレス、X
Yレングス情報などの設定をおこなう。これらの設定が
終わって準備が完了すると、CPU103は、CPU1
05に対してメモリ準備の完了を通知する。次に、CP
U105は、CPU103とCPU102に対して読取
を要求する。これに応じて、CPU102は、読取装置
200の原稿走査部に対してスキャンを要求する。こう
して、原稿のスキャンが開始され、スキャナ19が原稿
ガラス上の原稿読取領域に達すると、CPU102によ
り設定された画像処理モードに応じて、読み取りデータ
(画像データD2)が画像信号処理部20からメモリユニ
ット部30に転送される。スキャンが終了すると、スキ
ャン終了信号がCPU102に送られ、CPU102、
103から読取の完了がCPU105に通知される。次
に、CPU105は、CPU103に対して、データの
圧縮を要求する。これを受けて、CPU103は、画像
メモリ304からの読み出しアドレス、XYレングス情
報、符号メモリ306への書き込みアドレス、圧縮器3
11のモード(たとえば算術符号化方式、MH方式)な
どを設定し、各部の起動を行う。これによって圧縮器3
11による圧縮処理が行われ、符号データが符号メモリ
306に格納される。圧縮処理が完了すると、CPU1
03はCPU105に圧縮の完了を通知する。このと
き、符号メモリ306がデータでいっぱいになっていた
場合には、圧縮不可能を示すパラメータを付加した圧縮
完了レポートがCPU105に送られる。これによっ
て、CPU105は、符号メモリ306がフルになった
ことを知ることができる。
Next, the operation sequence of the copying machine 1 in image reading and printing will be described with reference to the CPUs 101 to 106.
Command (Q), report (A) exchanged between
And the flow of data. FIG. 9 shows a schematic sequence of the memory write operation. First, the fifth CPU 105, which manages the entire sequence, requests the third CPU 103, which controls the memory unit 30, to prepare for memory. In response, the CPU 103
Setting of a bus connection state for transferring image data from the image signal processing unit 20 to the image memory 304 to the internal hardware, setting of a mode for binarization processing, start address of a writing area in the image memory 304 , X
Make settings such as Y-length information. When these settings are completed and the preparation is completed, the CPU 103
05 is notified of the completion of memory preparation. Next, CP
U105 requests the CPU 103 and CPU 102 to read. In response, the CPU 102 requests the document scanning unit of the reading device 200 to scan. In this way, when the scanning of the original is started and the scanner 19 reaches the original reading area on the original glass, the read data is read according to the image processing mode set by the CPU 102.
(Image data D2) is transferred from the image signal processing unit 20 to the memory unit unit 30. When the scan is completed, a scan end signal is sent to the CPU 102, and the CPU 102
103 notifies the CPU 105 of the completion of the reading. Next, the CPU 105 requests the CPU 103 to compress the data. In response to this, the CPU 103 sets the read address from the image memory 304, the XY length information, the write address to the code memory 306,
Eleven modes (for example, arithmetic coding system and MH system) are set, and each unit is started. This allows the compressor 3
11 is performed, and the code data is stored in the code memory 306. When the compression process is completed, the CPU 1
03 notifies the CPU 105 of the completion of compression. At this time, if the code memory 306 is full of data, a compression completion report to which a parameter indicating that compression is impossible is added is sent to the CPU 105. Thus, the CPU 105 can know that the code memory 306 has become full.

【0017】図10は、メモリ読み出し動作の概略のシ
ーケンスを示す。メモリ読み出し動作では、画像メモリ
304から画像データが読み出され、その画像データに
基づいて用紙に複写画像がプリントされる。CPU10
5は、CPU103に対してデータ伸長を要求する。こ
れを受けて、CPU103は、符号メモリ306からの
読み出しアドレス、データの量、画像メモリ304への
書き込みアドレス、XYレングス情報、伸長器312の
モード(たとえば、算術符号化方式、MH方式)、傾斜
角回転などの編集処理モードなどを設定して、各部の起
動をおこなう。これによって伸長(編集)処理がおこな
われ、画像データが画像メモリ304に書き込まれる。
伸長処理が終了すると、CPU103はCPU105に
対して伸長完了を通知する。次に、CPU105は、C
PU103に対して、画像メモリ304から画像を読み
出すためのメモリ準備を要求する。これを受けて、CP
U103は、内部ハードウエアに対して、画像メモリ3
04から印字処理部40へ画像データを出力するための
バス接続状態の設定、画像メモリ304の読み出し領域
の開始アドレスおよびXYレングス情報などの設定を行
い、CPU105にメモリ準備完了を通知する。次に、
CPU105は、CPU103と印字部40に対して、
プリントを要求する。印字処理部40からCPU105
に用紙の搬送状態を知らせる給紙レポートが送られ、そ
の後、画像メモリ304から読み出された画像データが
印字処理部40に出力され、プリントが行われる。プリ
ントが終了すると、CPU103と印字処理部40がC
PU105に対してプリント完了レポートとイジェクト
完了レポートを送る。これらのレポートを受け取ったC
PU105は、必要に応じてCPU103に対してメモ
リクリア要求を与える。
FIG. 10 shows a schematic sequence of a memory read operation. In the memory read operation, image data is read from the image memory 304, and a copy image is printed on a sheet based on the image data. CPU10
5 requests the CPU 103 to decompress data. In response, the CPU 103 reads the address from the code memory 306, the amount of data, the write address to the image memory 304, the XY length information, the mode of the decompressor 312 (for example, the arithmetic coding method and the MH method), Set the edit processing mode such as angular rotation and start each unit. As a result, decompression (editing) processing is performed, and the image data is written to the image memory 304.
When the decompression process is completed, the CPU 103 notifies the CPU 105 of the completion of the decompression. Next, the CPU 105
The PU 103 is requested to prepare a memory for reading an image from the image memory 304. In response, CP
U103 is the image memory 3 for the internal hardware.
04, the setting of the bus connection state for outputting the image data to the print processing unit 40, the setting of the start address of the read area of the image memory 304, the XY length information, and the like are performed, and the CPU 105 is notified of the completion of the memory preparation. next,
The CPU 105 controls the CPU 103 and the printing unit 40
Request a print. From the print processing unit 40 to the CPU 105
Then, a paper feed report notifying the paper transport state is sent to the printer, and thereafter, the image data read from the image memory 304 is output to the print processing unit 40, and printing is performed. When printing is completed, the CPU 103 and the print processing unit 40
A print completion report and an ejection completion report are sent to the PU 105. C who received these reports
The PU 105 gives a memory clear request to the CPU 103 as needed.

【0018】(3)原稿が傾いている場合(はみ出てい
る場合を含む)の原稿読取 次に、原稿ガラス18上で読み取られる原稿が傾いてい
る場合の画像読取について説明する。図11に示すよう
に、原稿10は、右上端(3角印で示す)を基準とする
原稿ガラス18の上に、原稿の複写面を下向きに置かれ
ている。原稿ガラス18の長手方向がスキャン読取の副
走査方向であり、それに垂直な方向が主走査方向であ
る。図11に示した例では、原稿は、画像基準から離れ
て置かれ、その位置は副走査方向と平行ではない。この
例では、原稿は読取領域からはみ出ていない。図12と
図13は、原稿10(破線で示す)が読取領域(実線で
示す長方形)からはみ出ていない場合の読み取った画像
のイメージを示す。(原稿10を複写面側から見るの
で、画像基準は左上端である。)画像信号処理部20で
は、少なくとも原稿の範囲を含む長方形領域の画像デー
タを処理して、原稿が存在する原稿領域の検出を行い、
原稿の周囲(すなわちエッジ部)のすべての座標から、
図に示すように長方形原稿の4隅の座標を検出する。こ
こで、主走査方向がX軸であり、副走査方向がY軸であ
る。XmaxとXminは、最大と最小のX座標であり、残り
の2つのX座標のうち大きいほうがX1であり、小さい
ほうがX2である。また、YmaxとYminは、最大と最小
のY座標であり、残りの2つのY座標のうち大きいほう
がY1であり、小さいほうがY2である。図12の例で
は、原稿の4隅のX座標とY座標は、(X1,Ymin)、
(Xmax,Y2)、(Xmin,Y1)、(X2,Ymax)であ
る。原稿10の4辺の長さa、b、c、dは、原稿の座
標から以下のとおり計算できる。 a=√{(Xmax−X1)2+(Y2−Ymin)2} b=√{(X1−Xmin)2+(Y1−Ymin)2} (1) c=√{(X2−Xmin)2+(Ymax−Y1)2} d=√{(Xmax−X2)2+(Ymax−Y2)2} また、図13の例では、原稿の傾きの方向が図12の場
合と異なり、原稿の4端の座標は、(Xmin,Y1)、
(X1,Ymin)、(X2,Ymax)、(Xmax,Y2)であ
る。この場合も4辺の長さa、b、c、dは同じ式で計
算できる。ここで、傾いた画像を補正するための編集処
理パラメータは、次のようになる。まず、X1−Xmin
1−Yminの場合(図12)、 回転座標: (X1,Ymin) 回転角θ: tan-1{(X1−Xmin)/(Y1−Ymin)} (2) デスティネーションアドレス(pmdax,pmday): (−X1,−Ymin) また、X1−Xmin>Y1−Yminの場合(図13)、 回転座標: (Xmin,Y1) 回転角θ: tan-1{(Y1−Ymin)/(X1−Xmin)} (3) デスティネーションアドレス(pmdax,pmday): (−Xmin,−Y1) 回転座標は、図の左上端に近い隅の座標である。回転角
θは、回転座標位置を基準として原稿を回転して読取領
域に平行にするための回転角である。デスティネーショ
ンアドレスは、メモリへの転送先の座標であり、左上端
の位置から画像基準への長さに相当する。
(3) Reading of an original when the original is skewed (including a case where the original protrudes) Next, image reading when the original to be read on the original glass 18 is inclined will be described. As shown in FIG. 11, the document 10 is placed with its copy surface facing downward on a document glass 18 with reference to the upper right end (indicated by a triangle). The longitudinal direction of the original glass 18 is the sub-scanning direction of scan reading, and the direction perpendicular thereto is the main scanning direction. In the example shown in FIG. 11, the document is placed away from the image reference, and its position is not parallel to the sub-scanning direction. In this example, the document does not protrude from the reading area. FIGS. 12 and 13 show images of a read image when the document 10 (shown by a broken line) does not protrude from a reading area (a rectangle shown by a solid line). (Since the document 10 is viewed from the copy surface side, the image reference is at the upper left corner.) The image signal processing unit 20 processes image data of a rectangular area including at least the range of the document and processes the image data of the document area where the document exists. Perform detection,
From all the coordinates around the original (that is, the edge),
As shown in the figure, the coordinates of the four corners of the rectangular document are detected. Here, the main scanning direction is the X axis, and the sub scanning direction is the Y axis. X max and X min are the maximum and minimum X coordinates. Of the remaining two X coordinates, the larger one is X 1 and the smaller one is X 2 . Y max and Y min are the maximum and minimum Y coordinates. Of the remaining two Y coordinates, the larger one is Y 1 and the smaller one is Y 2 . In the example of FIG. 12, the X and Y coordinates of the four corners of the document are (X 1 , Y min ),
(X max, Y 2), a (X min, Y 1), (X 2, Y max). The lengths a, b, c, and d of the four sides of the document 10 can be calculated as follows from the coordinates of the document. a = {(X max −X 1 ) 2 + (Y 2 −Y min ) 2 } b = {(X 1 −X min ) 2 + (Y 1 −Y min ) 2 } (1) c = √ {(X 2 −X min ) 2 + (Y max −Y 1 ) 2 } d = {(X max −X 2 ) 2 + (Y max −Y 2 ) 2 } In the example of FIG. Unlike the case of FIG. 12, the coordinates of the four edges of the document are (X min , Y 1 ),
(X 1 , Y min ), (X 2 , Y max ) and (X max , Y 2 ). Also in this case, the lengths a, b, c, and d of the four sides can be calculated by the same formula. Here, the editing processing parameters for correcting the tilted image are as follows. First, X 1 −X min <
In the case of Y 1 −Y min (FIG. 12), rotation coordinates: (X 1 , Y min ) Rotation angle θ: tan −1 {(X 1 −X min ) / (Y 1 −Y min )} (2) Destination Nation address (pmmax, pmday): (−X 1 , −Y min ) When X 1 −X min > Y 1 −Y min (FIG. 13), rotation coordinates: (X min , Y 1 ) Rotation angle θ : Tan -1 {(Y 1 −Y min ) / (X 1 −X min )} (3) Destination address (pmdx, pmday): (−X min , −Y 1 ) The rotation coordinates are the upper left corner of the figure. Are the coordinates of the corner near. The rotation angle θ is a rotation angle for rotating the original with reference to the rotational coordinate position to make the original parallel to the reading area. The destination address is the coordinates of the transfer destination to the memory, and corresponds to the length from the upper left position to the image reference.

【0019】原稿10が読取領域(実線の長方形部)よ
りはみ出している場合、たとえば、読み取った画像(破
線)が図14のようなイメージであっても、原稿領域の
検出により上述の座標を検出する。図の左上端が、読取
領域の基準位置である。いまX軸の読取範囲がXmin0
max0であり、Y軸の読取範囲がYmin0〜Ymax0である
とする。原稿の隅が読取領域の外にあるので、極値X
max、Xmin、Ymax、Yminは、それぞれ読取領域の端と
交差する2点で検出される。すなわち、X軸、Y軸のそ
れぞれの極値が読取範囲の最大値Xmax0、Ymax0または
最小値Xmin0、Ymin0と一致した場合、2点づつ検出す
る。こうして、原稿の端の8点の座標は、(Xmin0,Y
10)、(Xmin0,Y11)、(X10,Ymin0)、(X11
min0)、(X20,Ymax0)、(X21,Ymax0)、(X
max0,Y20)、(Xmax0,Y21)である。これより、読
取範囲内に存在する辺a、b、c、dを抽出できる。こ
こに、原稿の4辺の長さa、b、c、dとはみ出し部分
の長さe、f、g、hはこれらの座標から以下のように
計算できる。 a=√{(Xmax0−X11)2+(Y20−Ymin0)2} b=√{(X10−Xmin0)2+(Y10−Ymin0)2} c=√{(X20−Xmin0)2+(Ymax0−Y11)2} d=√{(Xmax0−X21)2+(Ymax0−Y21)2} (4) e=X11−X10 f=Y11−Y10 g=X21−X20 h=Y21−Y20 また、原稿を長方形とした場合の4辺の長さは、図に示
されるように、それぞれ以下のように算出できる。 e*cosθ+a+h*sinθ、 f*cosθ+b+e*sinθ、 (5) g*cosθ+c+f*sinθ、 h*cosθ+d+g*sinθ。 ここで、傾き角θも各辺についてそれぞれ上述の座標か
ら算出できる。
When the original 10 is out of the reading area (solid line rectangular portion), for example, even if the read image (broken line) is an image as shown in FIG. 14, the above coordinates are detected by detecting the original area. I do. The upper left end of the figure is the reference position of the reading area. Now, the reading range of the X axis is X min0 ~
It is assumed that X max0 and the reading range of the Y axis is Y min0 to Y max0 . Since the corner of the document is outside the reading area, the extreme value X
Each of max , X min , Y max , and Y min is detected at two points that intersect the edge of the reading area. That is, when the extreme values of the X axis and the Y axis match the maximum values X max0 , Y max0 or the minimum values X min0 , Y min0 of the reading range, two points are detected. Thus, the coordinates of the eight points at the edge of the document are (X min0 , Y
10), (X min0, Y 11), (X 10, Y min0), (X 11,
Y min0), (X 20, Y max0), (X 21, Y max0), (X
max0, Y 20), a (X max0, Y 21). Thus, sides a, b, c, and d existing in the reading range can be extracted. Here, the lengths a, b, c, and d of the four sides of the document and the lengths e, f, g, and h of the protruding portion can be calculated from these coordinates as follows. a = √ {(X max0 −X 11 ) 2 + (Y 20 −Y min0 ) 2 } b = √ {(X 10 −X min0 ) 2 + (Y 10 −Y min0 ) 2 c c = √ {(X 20 −X min0 ) 2 + (Y max0 −Y 11 ) 2 } d = √ {(X max0 −X 21 ) 2 + (Y max0 −Y 21 ) 2 } (4) e = X 11 −X 10 f = Y 11 −Y 10 g = X 21 −X 20 h = Y 21 −Y 20 Further , as shown in the figure, the lengths of the four sides when the document is rectangular can be calculated as follows. e * cosθ + a + h * sinθ, f * cosθ + b + e * sinθ, (5) g * cosθ + c + f * sinθ, h * cosθ + d + g * sinθ. Here, the inclination angle θ can be calculated for each side from the coordinates described above.

【0020】以上に説明した考え方に基づいて、あらゆ
る原稿の置かれ方に対応して、編集処理パラメータを求
めることができる。4辺のうち少なくとも1辺が抽出で
きれば、傾き角θの算出は可能となる。また、抽出した
辺を辺の1部とし、読み取った原稿領域を含む長方形領
域を有効原稿領域とした場合の各辺の長さおよび座標を
算出することができる。図15は、置かれた原稿が読取
領域からはみ出してはいるが4辺とも抽出できる場合の
読み取った画像のイメージの1例を示す。原稿は読取領
域の左側と上側ではみ出ているが、それぞれ読取領域の
端と交差する2点(Xmin0,Y10)、(Xmin0
11)、(X10,Ymin0)、(X11,Ymin0)が検出で
きる。辺dの長さは抽出できるが、辺a、b、cについ
ては完全な辺が抽出できない。しかし、辺e,fと傾斜
角θに基づいて各辺の長さと4隅の座標が算出できる。
この例では、g=h=0であるので、4辺の長さは、式
(5)においてg=h=0として算出できる。 e*cosθ+a、 f*cosθ+b+e*sinθ、 (6) c+f*sinθ、 d+g*sinθ。
On the basis of the above-described concept, it is possible to obtain the editing processing parameters corresponding to every manner of placing the original. If at least one of the four sides can be extracted, the inclination angle θ can be calculated. In addition, the length and coordinates of each side can be calculated when the extracted side is regarded as a part of the side and the rectangular area including the read original area is defined as the effective original area. FIG. 15 shows an example of an image of a read image in a case where the placed document protrudes from the reading area but all four sides can be extracted. Although the original protrudes from the left and upper sides of the reading area, two points (X min0 , Y 10 ) and (X min0 ,
Y 11), (X 10, Y min0), can be detected (X 11, Y min0). Although the length of the side d can be extracted, complete sides cannot be extracted for the sides a, b, and c. However, the length of each side and the coordinates of the four corners can be calculated based on the sides e and f and the inclination angle θ.
In this example, since g = h = 0, the length of the four sides can be calculated as g = h = 0 in equation (5). e * cosθ + a, f * cosθ + b + e * sinθ, (6) c + f * sinθ, d + g * sinθ.

【0021】図16は、3辺のみを抽出できる場合の読
み取った画像のイメージの1例の図である。この場合、
読取可能な原稿部分の左上隅の位置α=(Xmin0
10)=(X10,Ymin0)である。この例では、b=g
=h=0であるので、4辺の長さは、式(5)において
b=g=h=0として算出できる。 e*cosθ+a、 f*cosθ+e*sinθ、 (7) c+f*sinθ、 d。 図17は、2辺c、dのみを抽出できる場合の読み取っ
た画像のイメージの1例の図である。この例では、左上
隅の位置α=(Xmin0,Y10)=(X10,Ymin0)であ
り、右上の隅の位置β=(X11,Ymin0)=(Xmax0
2)である。この例では、a=b=g=h=0である
ので、4辺の長さは、式(5)においてa=b=g=h
=0として算出できる。 e*cosθ、 f*cosθ+e*sinθ、 (8) c+f*sinθ、 d。 図18は、1辺のみを抽出できる場合の読み取った画像
のイメージの1例の図である。この例では、読取可能な
原稿部分の左上隅の位置α=(Xmin0,Y10)=
(X10,Ymin0)であり、右上隅の位置β=(X11,Y
min0)=(Xmax0,Y2)、右下隅の位置γ=
(Xmax0,Y21)=(X21,Ymax0)である。この例で
は、a=b=d=g=0であるので、4辺の長さは、式
(5)においてa=b=d=g=0として算出できる。 e*cosθ+h*sinθ、 f*cosθ+e*sinθ、 (9) c+f*sinθ、 h*cosθ。
FIG. 16 is a diagram showing an example of a read image when only three sides can be extracted. in this case,
Position α = (X min0 ,
Y 10 ) = (X 10 , Y min0 ). In this example, b = g
= H = 0, the length of the four sides can be calculated as b = g = h = 0 in equation (5). e * cosθ + a, f * cosθ + e * sinθ, (7) c + f * sinθ, d. FIG. 17 is a diagram illustrating an example of an image of a read image when only two sides c and d can be extracted. In this example, the upper left corner position α = (X min0 , Y 10 ) = (X 10 , Y min0 ), and the upper right corner position β = (X 11 , Y min0 ) = (X max0 ,
Y 2 ). In this example, since a = b = g = h = 0, the length of the four sides is a = b = g = h in equation (5).
= 0. e * cosθ, f * cosθ + e * sinθ, (8) c + f * sinθ, d. FIG. 18 is a diagram illustrating an example of an image of a read image when only one side can be extracted. In this example, the position α = (X min0 , Y 10 ) of the upper left corner of the readable document portion
(X 10 , Y min0 ), and the position β = (X 11 , Y
min0) = (X max0, Y 2), the position of the lower right corner gamma =
(X max0 , Y 21 ) = (X 21 , Y max0 ). In this example, since a = b = d = g = 0, the length of the four sides can be calculated as a = b = d = g = 0 in equation (5). e * cosθ + h * sinθ, f * cosθ + e * sinθ, (9) c + f * sinθ, h * cosθ.

【0022】(4)任意角回転による傾斜角補正 読み取った原稿の傾きが検出された場合に、画像を傾斜
角だけ自動的に回転して、傾かない画像を得る。したが
って、使用者が原稿を原稿ガラス上に置く場合に、誤っ
て傾いて置いた場合などにおいて、画像は自動的に傾斜
角だけ回転されるので、正常な画像が得られる。以下
で、この任意角回転処理について説明する。任意角回転
は、画像読取により検出された編集パラメータに基づい
て、メモリユニット30内の編集処理部307において
行われる。まず、編集処理部307について説明する。
図19は、メモリユニット30内の編集処理部307の
任意角回転に関連する部分と画像メモリ304を示す。
編集処理部307による回転などの編集は、画像メモリ
304を利用し、シフト処理、X−Y変換処理およびビ
ットスワップ処理を組み合わせて進められる(図20、
図21参照)。なお、回転処理をしない場合(0°回
転)は、破線で示すように、ビットスワップ処理のみが
おこなわれ、信号W2、R2のみがアクセスされる。
(4) Tilt Angle Correction by Arbitrary Angle Rotation When the tilt of the read document is detected, the image is automatically rotated by the tilt angle to obtain an image that does not tilt. Therefore, when the user places the document on the document glass and erroneously places the document on the document glass, the image is automatically rotated by the tilt angle, so that a normal image can be obtained. Hereinafter, the arbitrary angle rotation processing will be described. The arbitrary angle rotation is performed in the editing processing unit 307 in the memory unit 30 based on the editing parameters detected by the image reading. First, the editing processing unit 307 will be described.
FIG. 19 shows a portion related to the arbitrary angle rotation of the edit processing unit 307 in the memory unit 30 and the image memory 304.
Editing such as rotation by the editing processing unit 307 is performed by using the image memory 304 and combining shift processing, XY conversion processing, and bit swap processing (FIG. 20,
See FIG. 21). When the rotation process is not performed (0 ° rotation), only the bit swap process is performed, and only the signals W2 and R2 are accessed, as indicated by the broken line.

【0023】回転処理をする場合、伸長部312より転
送される入力画像データは、16ビットであり、編集処
理部307において、まず16→32変換部3070で
32ビットに変換される。編集処理部307の内部動作
および画像メモリ304へのアクセスを高速に処理する
ため、データ処理はすべて32ビットで行われる。第1
シフト部3071は、ビット変換後のデータが必要であ
れば、シフト処理をし、画像メモリ304内の第1-1
スライスエリア部3040と第1-2スライスエリア部
3041に書き込む。第1-1X-Y変換部3072と第
1-2X-Y変換部3073は、それぞれ、第1-1スラ
イスエリア部3040と第1-2スライスエリア部30
41から読み出されたデータR1についてX-Y変換処
理をする。第2シフト部3074はX-Y変換後のデー
タについて必要であればシフト処理をする。第1ビット
スワップ部3075は、16→32変換部3070から
のデータまたは第2シフト部3074からのデータを必
要であればビットスワップ処理し、画像メモリ304内
の編集用の仮想用紙エリア3042(最大でA3サイズ
の容量)に書き込む。第2X-Y変換部3076は、プ
リント出力時に、必要であれば第2ビットスワップ部3
077により、画像メモリ304内のプリント出力用の
仮想用紙エリア3042から読み出したR2データのX
-Y変換処理をして、画像メモリ304内の第2スライ
スエリア3043に書き込む。プリント出力動作時に仮
想用紙エリア3042から読み出されたR2データまた
は第2スライスエリア3043から読み出されたR3デ
ータは、32→1変換部3078により1ビットに変換
され、多値化処理部308へ転送される。連続動作時に
は、画像メモリ304へのアクセス(信号W1〜W3、
R1〜R3)は、32ビットバスラインにて時分割で並
列処理される。
When the rotation processing is performed, the input image data transferred from the decompression unit 312 is 16 bits, and is first converted into 32 bits by the 16 → 32 conversion unit 3070 in the editing processing unit 307. In order to process the internal operation of the edit processing unit 307 and access to the image memory 304 at high speed, all data processing is performed in 32 bits. First
The shift unit 3071 performs a shift process if data after bit conversion is necessary, and
The data is written to the slice area 3040 and the 1-2 slice area 3041. The 1-1X-Y conversion section 3072 and the 1-2X-Y conversion section 3073 respectively include a 1-1 slice area section 3040 and a 1-2 slice area section 30.
An XY conversion process is performed on the data R1 read from 41. The second shift unit 3074 performs a shift process on the data after the XY conversion, if necessary. The first bit swap unit 3075 performs bit swap processing on the data from the 16 → 32 conversion unit 3070 or the data from the second shift unit 3074 if necessary, and edits the virtual paper area 3042 (maximum) in the image memory 304. To write to A3 size capacity). The second XY conversion unit 3076 outputs the second bit swap unit 3 if necessary at the time of printout.
077, the X of the R2 data read from the print output virtual paper area 3042 in the image memory 304
After performing the -Y conversion process, the data is written to the second slice area 3043 in the image memory 304. The R2 data read from the virtual paper area 3042 or the R3 data read from the second slice area 3043 during the print output operation is converted into one bit by the 32 → 1 conversion unit 3078 and sent to the multi-value processing unit 308. Will be transferred. During continuous operation, access to the image memory 304 (signals W1 to W3,
R1 to R3) are processed in parallel on a 32-bit bus line in a time division manner.

【0024】次に、図20を参照して、画像データの9
0°回転処理を説明する。伸長部312より転送される
入力画像のイメージは、左上の(a)に示すように、左
上端を画像基準として受信される。この入力画像データ
は、右上の(b)に示すように、ライン単位で第1-1
スライスエリア部3040から32ビット×32ライン
のデータから、32ビット×32ビットのブロックの単
位で読み出されて、第1-1X-Y変換部3072で編集
処理される。次に、90°回転のために、中央の(c)
に示すように読み出され、右下の(d)に示すように、
仮想用紙エリア3042に書き込まれる。このとき、画
像基準(デスティネーションアドレス(pmdax,pmday))
が左下端になるように、データを展開する。第1-1ス
ライスエリア部3040と第1-2スライスエリア部3
041は、対になっていて、上記の処理がダブルバッフ
ァ動作で行われる。次に、図21を参照して、第1ビッ
トスワップ部3075と第2ビットスワップ部3077
による画像データのビットスワップ処理を説明する。こ
の処理において、図の上部に示すように、32ビットの
データの並びを逆転する。そして、図の下部に示すよう
に、逆転したデータを、仮想用紙エリア3042におい
て、画像基準(デスティネーションアドレス)が右下端
になるように書き込む。また、90°回転とビットスワ
ップ処理を組み合わせることにより270°回転もする
ことができる。このとき、画像基準が右上端になるよう
にデータを展開する。なお、編集処理部307では、画
像基準の仮想用紙エリアへの転送先(デスティネーショ
ンアドレス)を変えることにより、画像の平行移動も同
時に処理することができる。また、説明はしないが、特
定の領域の画像の消去や複写・貼り付けなどの処理も可
能である。
Next, referring to FIG.
The 0 ° rotation processing will be described. The image of the input image transferred from the decompression unit 312 is received with the upper left end as the image reference, as shown in FIG. The input image data is, as shown in (b) at the upper right, the first to the first in the line unit.
The data is read from the slice area unit 3040 in units of 32 bits × 32 bits from data of 32 bits × 32 lines, and is edited by the 1-1X-Y conversion unit 3072. Next, for 90 ° rotation, the center (c)
Is read out as shown in FIG.
The data is written in the virtual paper area 3042. At this time, image reference (destination address (pmdax, pmday))
Expand the data so that is at the lower left. 1-1 slice area section 3040 and 1-2 slice area section 3
No. 041 is a pair, and the above processing is performed by a double buffer operation. Next, referring to FIG. 21, first bit swap unit 3075 and second bit swap unit 3077
A bit swap process of image data according to will be described. In this process, as shown in the upper part of the figure, the arrangement of the 32-bit data is reversed. Then, as shown in the lower part of the figure, the inverted data is written in the virtual paper area 3042 such that the image reference (destination address) is at the lower right corner. In addition, by combining the 90 ° rotation and the bit swap processing, it is also possible to rotate 270 °. At this time, the data is developed so that the image reference is at the upper right end. The editing processing unit 307 can simultaneously process the parallel movement of the image by changing the transfer destination (destination address) to the virtual paper area based on the image. Although not described, processing such as erasing, copying, and pasting of an image in a specific area is also possible.

【0025】次に、任意角回転のための演算について説
明する。次の式は、アフィン変換における回転処理を示
す。式(10)に示されるように、座標(X,Y)は角
度θだけ回転されて座標(U,V)になる。この演算
は、式(11)に示すように分解され、第1シフト、9
0°回転、第2シフト、−90°回転の組み合わせとな
る。上述の編集処理部307では、これらの処理を組み
合わせて演算が行われる。第1シフトと第2シフトで
は、Y軸パラメータ固定でX軸パラメータのみが処理さ
れる。
Next, the calculation for the arbitrary angle rotation will be described. The following equation shows a rotation process in the affine transformation. As shown in Expression (10), the coordinates (X, Y) are rotated by the angle θ to become coordinates (U, V). This operation is decomposed as shown in Expression (11), and the first shift, 9
It is a combination of 0 ° rotation, second shift, and -90 ° rotation. The above-described editing processing unit 307 performs an operation by combining these processes. In the first shift and the second shift, only the X-axis parameter is processed with the Y-axis parameter fixed.

【数1】 (Equation 1)

【0026】次に、上述の回転アドレス演算の逆演算を
示す。式(12)、(13)は、式(10)、(11)
の逆変換を示す。
Next, the inverse operation of the above-described rotation address operation will be described. Equations (12) and (13) are obtained from equations (10) and (11).
This shows the inverse transformation of.

【数2】 (Equation 2)

【0027】画像データの任意角回転処理では、上述の
任意角回転のための演算に従って画像データが処理され
る。図22により、画像データの任意角回転処理(シフ
トシフト方式)を説明する。編集処理部307におい
て、図22の左上に示すように、伸長部312より転送
される入力画像のイメージは、左上端を基準として受信
される。この入力画像データは、図の中央部上側に示す
ように、上述の第1シフト部3071において、設定さ
れた回転角θに応じて第1シフト処理がなされ、第1-
1スライスエリア3041と第1-2スライスエリア3
042へライン単位で書き込まれる。次に、第1-1ス
ライスエリア3041と第1-2スライスエリア304
2から32×32ビットのブロックの単位で読み出さ
れ、第1-1X-Y変換部3072と第1-2X-Y変換部
3073により処理される。次に、2ブロック分のデー
タを基に、第2シフト部3074にて、設定された回転
角θに応じた第2シフト処理がなされ、このデータが仮
想用紙エリア3042に書き込まれる。2つのスライス
エリア3040、3041は対になっており、上述の動
作がダブルバッファ動作にて行われる。これまでの処理
で、画像は(90°+θ)回転した状態となる。仮想用
紙エリア3042からプリント出力をするとき、−90
°回転(270°回転)を第2X-Y変換部3076と
第2ビットスワップ部3077を用いて処理し、第2ス
ライスエリア部3043へバッファリング(ビット変
換)をしてから、多値化処理部308へ出力する。シフ
トシフト方式による回転処理は、処理後の画質を考慮す
るとθはなるべく小さい角度が望ましいため、−45°
<θ<45°とする。それ以上の角度の回転は、90°
単位の回転と組み合わせることにより処理する。
In the arbitrary angle rotation processing of the image data, the image data is processed according to the above-described calculation for the arbitrary angle rotation. An arbitrary angle rotation process (shift shift method) of image data will be described with reference to FIG. In the editing processing unit 307, as shown in the upper left of FIG. 22, the image of the input image transferred from the decompression unit 312 is received on the basis of the upper left corner. The input image data is subjected to a first shift process in the above-described first shift unit 3071 in accordance with the set rotation angle θ, as shown in the upper part of the center of FIG.
1 slice area 3041 and 1-2 slice area 3
042 is written in line units. Next, a 1-1 slice area 3041 and a 1-2 slice area 304
The data is read out in units of 2 to 32 × 32 bit blocks, and processed by the 1-1X-Y conversion unit 3072 and the 1-2X-Y conversion unit 3073. Next, based on the data for the two blocks, the second shift unit 3074 performs a second shift process according to the set rotation angle θ, and writes the data to the virtual paper area 3042. The two slice areas 3040 and 3041 form a pair, and the above operation is performed by a double buffer operation. With the processing so far, the image is rotated by (90 ° + θ). When printing out from the virtual paper area 3042, -90
The rotation by 270 ° (270 ° rotation) is processed using the second XY conversion unit 3076 and the second bit swap unit 3077, buffered (bit converted) to the second slice area unit 3043, and then multi-valued. Output to the unit 308. In the rotation process by the shift method, θ is desirably as small as possible in consideration of the image quality after the process.
<Θ <45 °. 90 ° rotation for more angles
Process by combining with unit rotation.

【0028】次に、画像データの任意角回転と変倍処理
とを同時に処理するための論理式を示す。式(14)
は、アフィン変換における回転処理と変倍処理を示し、
座標(X,Y)は角度θだけ回転されてα倍になって座
標(U,V)になる。これは、式(16)に示すように
分解され、第1シフト、90°回転、第2シフト、−9
0°回転となる。第1と第2のシフトは、Y軸パラメー
タ固定でX軸パラメータのみが処理される。
Next, a logical expression for simultaneously processing the arbitrary angle rotation and the scaling process of the image data is shown. Equation (14)
Indicates rotation processing and scaling processing in the affine transformation,
The coordinates (X, Y) are rotated by an angle θ and multiplied by α to become coordinates (U, V). This is decomposed as shown in Expression (16), and the first shift, the 90 ° rotation, the second shift, and -9
The rotation is 0 °. In the first and second shifts, only the X-axis parameter is processed while the Y-axis parameter is fixed.

【数3】 次に、上述の回転アドレス演算の逆演算を示す。式(1
6)、(17)は、式(14)、(15)の逆変換を示
す。
(Equation 3) Next, an inverse operation of the above-described rotation address operation will be described. Equation (1
6) and (17) show inverse transformations of equations (14) and (15).

【数4】 (Equation 4)

【0029】図23は、上述の画像データの任意角回転
処理を示す。この処理は、シフト処理、90°回転、シ
フト処理、−90°回転からなる。変倍は、図19に示
す編集処理部307において、第1と第2のシフト部に
おいて変倍のパラメータを対応させることにより行な
う。ただし、倍率によっては、スライスエリアの数を増
やすことが必要になる。このとき、変倍のみを処理し、
回転しない場合は、回転角度の設定を0°にすればよ
い。
FIG. 23 shows the above-described arbitrary angle rotation processing of image data. This processing includes shift processing, 90 ° rotation, shift processing, and −90 ° rotation. The scaling is performed in the editing processing unit 307 shown in FIG. 19 by associating the scaling parameters in the first and second shift units. However, depending on the magnification, it is necessary to increase the number of slice areas. At this time, only the scaling is processed,
If not, the rotation angle may be set to 0 °.

【0030】(5)原稿がはみ出した場合の傾き補正の
設定 以上に説明したように、本複写機においては、原稿ガラ
スの読取領域上に置かれている原稿の2次元の入力画像
データを読み取り、原稿が存在する領域を検出して、原
稿の領域が傾いている場合に、2次元の入力画像を任意
角だけ回転して、傾きを補正する。原稿が読取領域から
はみ出している場合は、はみ出しを考慮しないと、本来
求められる補正画像が得られない。そこで、原稿がはみ
出した場合、原稿ガラス上の読取領域に置かれている原
稿の領域を検出し、検出した原稿の領域を示す複数の座
標を抽出し、抽出された原稿領域の座標より、原稿の傾
き角度θと原稿のずれを算出し、それに基づいて回転処
理のための各種パラメータを設定する。すなわち、原稿
が傾いていて、しかも、読取領域からはみ出して置かれ
ている場合でも、原稿ガラス上に置かれた原稿が存在す
る領域(原稿領域)を画像データから検出し、検出した
原稿領域の座標から各辺を抽出して原稿の4隅を推定し
(図14〜図18参照)、それより任意角回転処理に必
要な各種パラメータ(用紙サイズ、傾き角度、ずれ量な
ど)を算出する。傾き補正においては、仮想用紙に画像
データを展開するが、ここで、画像データを傾き角度θ
だけ回転して、傾きをなくすとともに、隣あう2辺が抽
出できた隅の位置が仮想用紙の隅(原点)に一致するよ
うに画像データを移動して、原稿のずれを補正する。こ
うして、原稿が原稿ガラス上の読取領域からはみ出して
置かれた場合でも、画像データから各種パラメータを算
出して、これに基づいて原稿の傾きを自動的に補正した
画像を出力できる。
(5) Setting of Skew Correction When a Document Protrudes As described above, the copying machine reads two-dimensional input image data of a document placed on a reading area of a document glass. Then, the area where the document exists is detected, and when the area of the document is inclined, the two-dimensional input image is rotated by an arbitrary angle to correct the inclination. If the document is out of the reading area, the originally required corrected image cannot be obtained without taking the out of consideration into account. Therefore, when the original protrudes, the area of the original placed in the reading area on the original glass is detected, a plurality of coordinates indicating the detected area of the original are extracted, and the original is extracted from the coordinates of the extracted original area. And the deviation of the document are calculated, and various parameters for the rotation process are set based on the calculated angle. In other words, even when the original is inclined and protrudes from the reading area, the area where the original is placed on the original glass (original area) is detected from the image data, and the detected original area is detected. Each side is extracted from the coordinates to estimate the four corners of the document (see FIGS. 14 to 18), and various parameters (paper size, tilt angle, shift amount, and the like) necessary for the arbitrary angle rotation processing are calculated based thereon. In the inclination correction, the image data is developed on the virtual paper.
Then, the image data is moved so that the inclination is eliminated, and the position of the corner where the two adjacent sides can be extracted matches the corner (origin) of the virtual paper, thereby correcting the original displacement. In this way, even when the original is placed outside the reading area on the original glass, various parameters can be calculated from the image data, and an image in which the inclination of the original is automatically corrected based on the parameters can be output.

【0031】たとえば、原稿の画像データから原稿領域
の座標より読取領域の原稿の辺の長さ(図14の例にお
けるa〜d)を検出し、傾き角度θと読取領域内の原稿
の辺の長さa〜dとから読取領域外の辺の長さを設定す
る(図40参照)。原稿は長方形であり、読取領域にお
いて、画像データから原稿の傾き角と辺を求め、これよ
り、読取領域外に位置するものを含め原稿の4隅を決定
する。そして、これに基づいて用紙サイズを演算し、得
られた傾き角度、用紙サイズおよびずれに基づいて任意
角回転を動作させる。たとえば、画像データより原稿領
域の座標から得られた直線を原稿領域の各辺とみなして
傾き角度θを抽出する(図35〜図39参照)。すなわ
ち、原稿の存在する領域の境界を定める直線を各辺とみ
なして、傾き角度を抽出する。また、傾き角度θを、前
記の抽出された原稿の各辺のうち最も長い辺より算出す
る(図35、ステップS2437〜S2437d参
照)。これにより、最も信頼できる角度を求める。ま
た、画像データから原稿領域を示す辺を抽出できなかっ
た場合、任意角回転をしない(図35、ステップS24
32、S2433参照)。これにより、原稿画像の不確
かな回転補正を禁止する。また、抽出された原稿領域の
各辺から算出したそれぞれの傾き角度のうち、ほかの算
出結果と著しく異なる角度のある場合、任意角回転をさ
せない(図35、ステップS2435、S2433参
照)。すなわち、原稿の形が不規則である場合に、原稿
画像の回転を禁止する。
For example, the length of the side of the original in the reading area (a to d in the example of FIG. 14) is detected from the coordinates of the original area from the image data of the original, and the inclination angle θ and the side of the original in the reading area are detected. The length of the side outside the reading area is set based on the lengths a to d (see FIG. 40). The document is rectangular, and in the reading area, the inclination angle and the sides of the document are obtained from the image data, and the four corners of the document including those located outside the reading area are determined. Then, the paper size is calculated based on this, and the arbitrary angle rotation is operated based on the obtained tilt angle, paper size, and deviation. For example, a straight line obtained from the coordinates of the document area from the image data is regarded as each side of the document area, and the inclination angle θ is extracted (see FIGS. 35 to 39). That is, the inclination angle is extracted by regarding the straight line that defines the boundary of the area where the document exists as each side. Further, the inclination angle θ is calculated from the longest side of each side of the extracted document (see FIG. 35, steps S2437 to S2437d). Thus, the most reliable angle is obtained. When the side indicating the document area cannot be extracted from the image data, the arbitrary angle rotation is not performed (FIG. 35, step S24).
32, S2433). This prohibits uncertain rotation correction of the document image. If there is an angle that is significantly different from the other calculation results among the respective inclination angles calculated from each side of the extracted document area, the rotation is not performed at an arbitrary angle (see FIG. 35, steps S2435 and S2433). That is, when the shape of the document is irregular, rotation of the document image is prohibited.

【0032】また、検出した原稿領域を含み、抽出した
辺を辺の1部とする長方形領域から用紙サイズを設定す
る(図41参照)。すなわち、画像データから原稿領域
に存在する辺を含む長方形領域を求め、これを基に原稿
のサイズを推定する。また、算出した用紙サイズが最大
用紙サイズより大きい場合、任意角回転をさせない(図
35、ステップS2459参照)。これにより、正常な
画像が得られない場合に、回転を禁止する。また、さら
に、画像データを90°回転させる90°回転手段を備
え、算出した用紙サイズが最大用紙サイズより大きく、
かつ、用紙の縦横を入れ替えると最大用紙サイズより小
さい場合、任意角回転をさせるとともに、画像を90°
回転させる(ステップS2451、S2454、S24
55〜S2457参照)。すなわち、得られた用紙サイ
ズが画像形成装置が取扱い可能な最大用紙サイズより大
きくても、90°の回転により正常な画像が得られる場
合には、90°回転をも併用して、画像の傾きを補正す
るため画像を回転する。また、抽出された辺のうち隣り
合った2以上の辺がある場合、それと、算出された用紙
サイズとより画像の平行移動量を算出する(図45参
照)。すなわち、隣り合う2以上の辺がある場合、少な
くとも1つの隅が決定できる。したがって、それを用い
て、画像の傾きを補正する場合の画像データの平行移動
量を算出する。
The paper size is set from a rectangular area including the detected original area and the extracted side as a part of the side (see FIG. 41). That is, a rectangular area including sides existing in the document area is obtained from the image data, and the size of the document is estimated based on this. If the calculated paper size is larger than the maximum paper size, the rotation is not performed at an arbitrary angle (see FIG. 35, step S2459). This prohibits rotation when a normal image cannot be obtained. Further, the image forming apparatus further includes a 90 ° rotation unit that rotates the image data by 90 °, and the calculated paper size is larger than the maximum paper size.
If the paper size is smaller than the maximum paper size, the image is rotated 90 degrees and the image is rotated 90 °.
Rotate (Steps S2451, S2454, S24)
55-S2457). That is, even if the obtained paper size is larger than the maximum paper size that can be handled by the image forming apparatus, if a normal image can be obtained by rotating the image by 90 °, the 90 ° rotation can be used together to tilt the image. Rotate the image to correct for. If there are two or more adjacent sides of the extracted sides, the parallel movement amount of the image is calculated from the two sides and the calculated paper size (see FIG. 45). That is, when there are two or more adjacent sides, at least one corner can be determined. Therefore, it is used to calculate the amount of parallel movement of the image data when correcting the inclination of the image.

【0033】(6)複写機の制御 以下に本複写機の制御のフローを説明する。図24は、
操作パネルを制御する第1CPU101のメインフロー
チャートである。電源が投入されると、まず、RAMや
レジスタなどを初期化する初期設定を行なう(ステップ
S11)。その後、1ルーチンの長さを規定する内部タ
イマーをセットし(ステップS12)、キー操作を受け
付けるキー入力処理をし(ステップS13)、キー操作
に応じた表示を行なうパネル表示処理をする(ステップ
S14)。そして、その他の処理をした後(ステップS
15)、内部タイマーの終了を待って(ステップS16
でYES)、ステップS12に戻り、上述の処理をくり
返す。また、適時に割り込み処理として、他のCPUと
の通信をおこなう。
(6) Control of Copying Machine The control flow of the copying machine will be described below. FIG.
5 is a main flowchart of a first CPU 101 that controls an operation panel. When the power is turned on, first, an initialization for initializing a RAM, a register, and the like is performed (step S11). Thereafter, an internal timer that defines the length of one routine is set (step S12), key input processing for accepting key operation is performed (step S13), and panel display processing for performing display according to the key operation is performed (step S14). ). Then, after performing other processing (step S
15) Wait for the end of the internal timer (step S16)
YES), returning to step S12 and repeating the above processing. In addition, communication with another CPU is performed as interrupt processing at an appropriate time.

【0034】図25は、画像信号処理部20を制御する
第2CPU102のメインフローチャートである。RA
Mやレジスタなどを初期化する初期設定をおこなった後
(ステップS21)、1ルーチンの長さを規定する内部
タイマーをセットする(ステップS22)。次に、画像
データを入力し(ステップS23)、原稿検出処理をし
(ステップS24、図26参照)、画像処理をし(ステ
ップS25、図27〜図39参照)、画像データを出力
する(ステップS26)。そして、その他の処理をし
(ステップS27)、内部タイマーの終了を待って(ス
テップS28でYES)、ステップS22に戻り、上述
の処理をくり返す。図26は、原稿検出(ステップS2
4)のフローチャートである。ここで、原稿領域におい
て抽出した複数の座標からなる直線を原稿領域の各辺と
みなす。まず、原稿のエッジを検出し(ステップS24
1)、各エッジ点の座標を抽出する(ステップS24
2)。そして、抽出された座標からXmin、Xmax、Y
min、Ymaxを示す座標点を抽出し(ステップS24
3)、抽出された座標点から原稿の各辺を抽出する(ス
テップS244)。ここで、原稿の辺が抽出できなかっ
たと判断された場合は(ステップS245でNO)、任
意角回転を禁止するとともに(ステップS246)、操
作パネルの表示装置91に警告メッセージを表示する
(ステップS247)。図27は、画像処理(図25、
ステップS25)のフローチャートである。はみ出しの
有無の検出(ステップS251)、角度検出(ステップ
S252、図28〜図32参照)、サイズ検出(ステッ
プS253、図33〜図35参照)、サイズ設定(ステ
ップS254、図36参照)、回転座標設定(ステップ
S255、図37参照)、デスティネーション設定(ス
テップS256、図38参照)、90°回転デスティネ
ーション設定(ステップS257、図39参照)、その
他の処理(ステップS258)を順次おこなう。
FIG. 25 is a main flowchart of the second CPU 102 for controlling the image signal processing section 20. RA
After initial settings for initializing M and registers are performed (step S21), an internal timer that defines the length of one routine is set (step S22). Next, image data is input (step S23), document detection processing is performed (step S24, see FIG. 26), image processing is performed (step S25, see FIGS. 27 to 39), and image data is output (step S23). S26). Then, other processing is performed (step S27), and after the end of the internal timer (YES in step S28), the process returns to step S22, and the above-described processing is repeated. FIG. 26 shows the document detection (step S2).
It is a flowchart of 4). Here, a straight line composed of a plurality of coordinates extracted in the document area is regarded as each side of the document area. First, the edge of the document is detected (step S24).
1) Extract coordinates of each edge point (step S24)
2). Then, from the extracted coordinates, X min , X max , Y
min, extracting coordinate points indicating the Y max (step S24
3) Extract each side of the document from the extracted coordinate points (step S244). Here, if it is determined that the side of the document could not be extracted (NO in step S245), the arbitrary angle rotation is prohibited (step S246), and a warning message is displayed on the display device 91 of the operation panel (step S247). ). FIG. 27 shows the image processing (FIG. 25,
It is a flowchart of step S25). Detection of presence or absence of protrusion (Step S251), angle detection (Step S252, see FIGS. 28 to 32), size detection (Step S253, FIGS. 33 to 35), size setting (Steps S254, FIG. 36), rotation Coordinate setting (step S255, see FIG. 37), destination setting (step S256, see FIG. 38), 90 ° rotation destination setting (step S257, see FIG. 39), and other processing (step S258) are sequentially performed.

【0035】この処理において、読取領域からはみ出し
て置かれている場合でも、原稿が存在する領域(原稿領
域)を画像データから検出し、検出した原稿領域の座標
から各辺を抽出して長方形であることを仮定して原稿の
4隅を推定する。次に、任意角回転のための各種パラメ
ータを決定する。パラメータには、以下のものが含まれ
る。傾き角(回転角)θ(ステップS252)は、有効
原稿領域の傾きを表す。有効原稿領域サイズspx,s
py(ステップS253)は、検出された原稿のサイズ
(原稿が傾いていないとしたときのx方向とy方向)を
表すパラメータである。なお、サイズcpx,cpy
は、画像データを展開するための仮想用紙エリアを設定
するサイズパラメータ(x方向とy方向)である。用紙
サイズ(ステップS254)は、通常は、有効原稿領域
を含む最小定形用紙サイズである。回転座標rot_
x,rot_y(ステップS255)は、読取領域の原
点を基準とした回転中心となる座標(x方向とy方向)
を表す。たとえば、図14の例では、左上隅を読取領域
の原点としているので、回転座標rot_x,rot_y
は、原点に最も近い左上有効原稿領域10(破線で表
す)の隅を表し、原稿のずれを表す量である。デスティ
ネーション(ずれ量)pmdax,pmday(ステッ
プS256)は、回転座標から仮想用紙エリアの原点に
対する座標を表し、画像データを仮想用紙エリアに展開
するときに、デスティネーションだけ座標を移動して、
仮想用紙エリアの原点から画像データを展開する。な
お、90°回転パラメータ(ステップS247)は、画
像を90°回転するときに用いるパラメータである。求
められた各種パラメータは、画像メモリに対する編集制
御(図40、図41参照)において設定される。
In this process, even if the document is placed outside the reading area, the area where the document exists (document area) is detected from the image data, and each side is extracted from the coordinates of the detected document area to form a rectangle. Assuming that there is, the four corners of the document are estimated. Next, various parameters for the arbitrary angle rotation are determined. The parameters include: The tilt angle (rotation angle) θ (step S252) indicates the tilt of the effective document area. Effective document area size spx, s
py (step S253) is a parameter representing the size of the detected document (x direction and y direction when the document is not inclined). In addition, size cpx, cpy
Is a size parameter (x direction and y direction) for setting a virtual paper area for developing image data. The paper size (step S254) is usually the minimum standard paper size including the effective document area. Rotation coordinates rot_
x, rot_y (step S255) are coordinates (x-direction and y-direction) serving as a rotation center with respect to the origin of the reading area
Represents For example, in the example of FIG. 14, since the upper left corner is the origin of the reading area, the rotation coordinates rot_x, rot_y
Represents the corner of the upper left effective document area 10 (represented by a broken line) closest to the origin, and is an amount representing the displacement of the document. The destinations (shift amounts) pmmax and pmday (step S256) represent the coordinates with respect to the origin of the virtual paper area from the rotational coordinates. When the image data is developed in the virtual paper area, the coordinates are moved only by the destination.
The image data is developed from the origin of the virtual paper area. The 90 ° rotation parameter (step S247) is a parameter used when rotating an image by 90 °. The obtained various parameters are set in the editing control for the image memory (see FIGS. 40 and 41).

【0036】図28は、角度検出(図27、ステップS
252)のフローチャートである。まず、原稿領域の各
辺a、b、c、dよりそれぞれ角度θa、θb、θc、θd
を検出する(ステップS2521、図29〜図32参
照)。角度検出が終了したら実際の回転処理に用いる角
度を選定する。もしすべての角度θa、θb、θc、θd
すべて誤っている場合(ステップS2522でYE
S)、または、θa≒θb≒θc≒θd(誤った角度を除
く)でない場合(ステップS2525でNO)、すなわ
ち、4辺より検出した角度のうち、他と著しく異なるも
のがある場合、すなわち、長方形でない場合、size
_errを1として任意角回転を禁止するとともに(ス
テップS2523)、θをθ0とする(ステップS25
23)。また、θa≒θb≒θc≒θd(誤った角度を除
く)であるが(ステップS2525でYES)、θa
θb≒θc≒θd>0(誤った角度を除く)でない場合
(ステップS2526でNO)、θをθ0とする(ステ
ップS2524)。以上の条件にあてはまらない場合
(ステップS2526でYES)、辺a〜dの長さを比
較し(ステップS2527)、読取領域から抽出した辺
a、b、c、dのうち最も長い辺から算出した角度
θa、θb、θcまたはθdを角度θとして採用する(ステ
ップS2527a〜S247d)。そして、その他の設
定(ステップS2528)をして、リターンする。
FIG. 28 shows the angle detection (FIG. 27, step S).
It is a flowchart of 252). First, angles θ a , θ b , θ c , θ d are obtained from the sides a, b, c, d of the document area, respectively.
Is detected (step S2521, see FIGS. 29 to 32). When the angle detection is completed, the angle used for the actual rotation processing is selected. If all the angles θ a , θ b , θ c , and θ d are incorrect (YE in step S2522)
S) or when it is not θ a ≒ θ b ≒ θ c ≒ θ d (excluding an incorrect angle) (NO in step S2525), that is, among the angles detected from the four sides, there is one that is significantly different from the others. If, ie not rectangular, size
with prohibiting any angle rotation as 1 _err (step S2523), the theta and theta 0 (step S25
23). Although θ ab ≒ θ c ≒ θ d (excluding an incorrect angle) (YES in step S2525), θ a
If not θ b ≒ θ c ≒ θ d > 0 ( excluding wrong angle) (NO in step S2526), the theta and theta 0 (step S2524). If the above conditions are not satisfied (YES in step S2526), the lengths of the sides a to d are compared (step S2527), and the length is calculated from the longest side among the sides a, b, c, and d extracted from the reading area. angle θ a, θ b, a theta c or theta d adopted as an angle theta (step S2527a~S247d). Then, other settings (step S2528) are performed, and the process returns.

【0037】図29は、図28のステップS2521に
おいて、辺aに基づく角度θa検出のフローチャートで
ある。辺a>0でない場合(ステップS25211aで
NO)、角度θaをerrとして(ステップS2521
9a)、リターンする。辺a>0である場合(ステップ
S25211aでYES)、次に原稿がはみ出している
かを判断する。Ymin=Ymin0である場合、すなわち、
辺eが存在する場合(ステップS25212a)、X11
をX1とする(ステップS25213a)。また、Xmax
=Xmax0である場合、すなわち、辺gが存在する場合
(ステップS25214a)、Y20をY2とする(ステ
ップS25215a)。そして、(Y2−Ymin)と(X
max−X1)の長さを比較し(ステップS25216
a)、回転角θの小さくなるような回転方向に決定す
る。すなわち、(Y2−Ymin)<(Xmax−X1)である
とき、tan-1{(Xmax−X1)/(Y2−Ymin)}を角度θ
とし(ステップS25217a)、(Y2−Ymin)<
(Xmax−X1)でないとき、tan-1{(Y2−Ymin)/(X
max−X1)}を角度θとする(ステップS25218
a)。
[0037] Figure 29, in step S2521 of FIG. 28 is a flowchart of an angle theta a detection based on the edge a. If not sides a> 0 (NO in step S25211a), the angle theta a as err (step S2521
9a), and return. If the side a> 0 (YES in step S25211a), it is determined whether the original protrudes next. If Y min = Y min0 , ie,
If the side e exists (step S25212a), X 11
Is referred to as X 1 (step S25213a). Also, X max
= If an X max0, i.e., if the edge g is present (step S25214a), the Y 20 and Y 2 (step S25215a). Then, (Y 2 −Y min ) and (X
max- X 1 ) are compared (step S25216)
a), the rotation direction is determined so that the rotation angle θ becomes smaller. That is, when (Y 2 −Y min ) <(X max −X 1 ), tan −1 {(X max −X 1 ) / (Y 2 −Y min )} is changed to the angle θ
(Step S25217a), (Y 2 −Y min ) <
When (X max −X 1 ) is not satisfied, tan −1 {(Y 2 −Y min ) / (X
max− X 1 )} is set to the angle θ (step S25218)
a).

【0038】図30〜図32においても、図29と同様
に角度θb、θc、θdが検出される。図30は、図28
のステップS2521において辺bに基づく角度θb
出のフローチャートである。辺b>0でない場合(ステ
ップS25211bでNO)、角度θbをerrとして
(ステップS25219b)、リターンする。辺b>0
である場合(ステップS25211bでYES)、次に
原稿がはみ出しているかを判断する。Ymin=Ymin0
ある場合、すなわち、辺eが存在する場合(ステップS
25212bでNO)、X10をX1とする(ステップS
25213b)。また、Xmin=Xmin0である場合、す
なわち、辺fが存在する場合(ステップS25214
b)、Y10をY1とする(ステップS25215b)。
そして、(Y1−Ymin)と(X1−Xmin)の長さを比較
し(ステップS25216b)、回転角度の小さくなる
ような回転方向に決定する。すなわち、(Y1−Ymin
<(X1−Xmin)であるとき、tan-1{(X1−Xmin)/
(Y1−Ymin)}を角度θbとし(ステップS25217
b)、(Y1−Ymin)<(X1−Xmin)でないとき、ta
n-1{(Y1−Ymin)/(X1−Xmin)}を角度θbとする
(ステップS25218b)。
30 to 32, the angles θ b , θ c and θ d are detected as in FIG. FIG.
It is a flowchart of an angle theta b detection based on side b in step S2521. If not sides b> 0 (NO in step S25211b), an angle theta b as err (step S25219b), the process returns. Side b> 0
Is satisfied (YES in step S25211b), it is determined whether the original is protruding next. If Y min = Y min0, that is, if the side e exists (step S
NO in 25212b), the X 10 and X 1 (step S
25213b). If X min = X min0, that is, if the side f exists (step S25214)
b), using Y 10 and Y 1 (step S25215b).
Then, the lengths of (Y 1 -Y min ) and (X 1 -X min ) are compared (step S25216b), and the rotation direction is determined so as to reduce the rotation angle. That is, (Y 1 −Y min )
When <(X 1 −X min ), tan −1 {(X 1 −X min ) /
(Y 1 −Y min )} is set to the angle θ b (step S25217)
b) When (Y 1 −Y min ) <(X 1 −X min ), ta
n -1 {(Y 1 -Y min ) / (X 1 -X min)} is referred to as angle theta b (step S25218b).

【0039】図31は、図28のステップS2521に
おいて辺cに基づく角度θc検出のフローチャートであ
る。辺c>0でない場合(ステップS25211cでN
O)、角度θcをerrとして(ステップS25219
c)、リターンする。辺c>0である場合(ステップS
25211cでYES)、次に原稿がはみ出しているか
を判断する。Ymax=Ymax0である場合、すなわち、辺
gが存在する場合(ステップS25212cでYE
S)、X20をX2とする(ステップS25213c)。
また、Xmin=Xmin0である場合、すなわち、辺fが存
在する場合(ステップS25214c)、Y11をY1
する(ステップS25215c)。そして、(Ymax
1)と(X2−Xmin)の長さを比較し(ステップS2
5216c)、回転角度の小さくなるような回転方向に
決定する。すなわち、(Ymax−Y1)<(X2−Xmin
であるとき、tan-1{(X2−Xmin)/(Ymax−Y1)}を
角度θcとし(ステップS25217c)、(Ymax−Y
1)<(X2−Xmin)でないとき、tan-1{(Ymax−Y1)
/(X2−Xmin)}を角度θcとする(ステップS252
18c)。
FIG. 31 is a flowchart for detecting the angle θ c based on the side c in step S2521 of FIG. If edge c> 0 is not satisfied (N in step S25211c
O), the angle θ c is set to err (step S25219)
c), return. If edge c> 0 (step S
Next, it is determined whether or not the original protrudes. If a Y max = Y max0, i.e., if the edge g is present (YE in step S25212c
S), the X 20 and X 2 (step S25213c).
Also, if it is X min = X min0, i.e., if the edge f exists (step S25214c), the Y 11 and Y 1 (step S25215c). Then, (Y max
Y 1) and to compare the length of the (X 2 -X min) (step S2
5216c), the rotation direction is determined such that the rotation angle becomes smaller. That is, (Y max −Y 1 ) <(X 2 −X min )
When it is, tan -1 {(X 2 -X min) / (Y max -Y 1)} and the angle theta c (step S25217c), (Y max -Y
1 ) When not (X 2 −X min ), tan −1 {(Y max −Y 1 )
/ (X 2 −X min )} is set to the angle θ c (step S252)
18c).

【0040】図32は、図28のステップS2521に
おいて辺dに基づく角度θd検出のフローチャートであ
る。辺d>0でない場合(ステップS25211dでN
O)、角度θdをerrとして(ステップS25219
d)、リターンする。辺d>0である場合(ステップS
25211dでYES)、次に原稿がはみ出しているか
を判断する。Ymax=Ymax0である場合、すなわち、辺
gが存在する場合(ステップS25212cでYE
S)、X21をX2とする(ステップS252133
d)。また、Xmax=Xmax0である場合、すなわち、辺
hが存在する場合(ステップS25214d)、Y21
2とする(ステップS25215d)。そして、(Y
max−Y2)と(X2−Xmin)の長さを比較し(ステップ
S25216d)、回転角度の小さくなるような回転方
向に決定する。すなわち、(Ymax−Y2)<(X2−X
min)であるとき、tan-1{(X2−Xmin)/(Ymax
2)}を角度θdとし(ステップS25217d)、
(Ymax−Y2)<(X2−Xmin)でないとき、tan
-1{(X2−Xmin)/(Ymax−Y2)}を角度θdとする
(ステップS25218d)。
FIG. 32 is a flowchart for detecting the angle θ d based on the side d in step S2521 in FIG. If the side d is not 0 (N in step S25211d)
O), the angle θ d is set as err (step S25219)
d), return. If edge d> 0 (step S
Next, it is determined whether or not the original protrudes. If a Y max = Y max0, i.e., if the edge g is present (YE in step S25212c
S), the X 21 and X 2 (step S252133
d). Also, if it is X max = X max0, i.e., if the edge h is present (step S25214d), the Y 21 and Y 2 (step S25215d). And (Y
The length of ( max− Y 2 ) is compared with the length of (X 2 −X min ) (step S25216d), and the rotation direction is determined so as to reduce the rotation angle. That is, (Y max −Y 2 ) <(X 2 −X
min ), tan -1 {(X 2 −X min ) / (Y max
Y 2 )} is set to the angle θ d (step S25217d),
When (Y max −Y 2 ) <(X 2 −X min ), tan
-1 {(X 2 -X min) / (Y max -Y 2)} is referred to as angle theta d (step S25218d).

【0041】図33は、サイズ検出(図27、ステップ
S253)のフローチャートである。原稿用紙のサイズ
は、傾き角度と読取領域内の原稿用紙の辺の長さとから
読取領域外の辺の長さを設定し、それに基づいて検出さ
れる。ここで、spxとspyは、設定されるべき原稿
用紙のx方向とy方向のサイズである。size_er
r=1である場合は(ステップS2531でNO)、原
稿の辺が正常に検出できなかったので、角度θをθ0
して(ステップS2535)、通常原稿サイズの検出を
おこなう(ステップS2536)。そして、spxをs
px3に設定し、spyをspy3に設定し(ステップ
S2537)、その他の設定をする(ステップS253
8)。size_err=1でない場合は(ステップS
2531でYES)、傾き原稿サイズの検出を行なう
(ステップS2532、図34参照)。そして、spx
1とspx2およびspy1とspy2の長さを比較し
(ステップS2533)、著しく異なっている場合は
(ステップS2533でNO)、ステップS2535に
進み、通常原稿サイズの検出をおこなう(図35参
照)。そうでない場合は(ステップS2533でYE
S)、spx1をspxに設定し、spy1をspyに
設定し(ステップS2534)、その他の設定をする
(ステップS2538)。
FIG. 33 is a flowchart of the size detection (FIG. 27, step S253). The size of the document sheet is determined based on the inclination angle and the length of the side of the document sheet in the reading area, and the length of the side outside the reading area is set. Here, spx and spy are the sizes of the original paper to be set in the x and y directions. size_er
If it is r = 1 (NO in step S2531), since the side of the document can not be detected correctly, the angle theta as theta 0 (step S2535), usually to detect the document size (step S2536). And spx as s
px3, spy is set to spy3 (step S2537), and other settings are made (step S253).
8). If size_err = 1 is not satisfied (step S
If YES at 2531), the skewed document size is detected (step S2532, see FIG. 34). And spx
1 and spx2 and spy1 and spy2 are compared in length (step S2533). If the lengths are significantly different (NO in step S2533), the flow advances to step S2535 to detect a normal document size (see FIG. 35). Otherwise (YE in step S2533)
S), spx1 is set to spx, spy1 is set to spy (step S2534), and other settings are made (step S2538).

【0042】図34は、傾き原稿サイズ検出(図33、
ステップS2532)のフローチャートである。このフ
ローでは、傾き角θと読取領域内の原稿の辺の長さa、
b、c、dから、読取領域外の辺の長さを設定する。ま
ず、(Y2−Ymin)と(Xmax−X1)を比較して回転方
向を判断する(ステップS25321)。(Y2
min)<(Xmax−X1)である場合は(ステップS2
5321でYES)、e*cosθ+a+f*sinθをsp
x1に代入し(ステップS25322)、そうでなけれ
ばspy1に代入する(ステップS25323)。同様
に、(Y1−Ymax)と(X2−Xmin)を比較して回転方
向を判断する(ステップS25324)。(Y1
max)<(X2−Xmin)である場合は(ステップS2
5324でYES)、g*cosθ+c+f*sinθをsp
x2に代入し(ステップS25325)、そうでなけれ
ばspy2に代入する(ステップS25326)。ま
た、(Y1−Ymin)と(X1−Xmin)を比較して回転方
向を判断する(ステップS25327)。(Y1
min)<(X1−Xmin)である場合は(ステップS2
5327でYES)、f*cosθ+b+e*sinθをsp
y1に代入し(ステップS25328)、そうでなけれ
ばspx1に代入する(ステップS25329)。ま
た、(Ymax−Y2)と(Xmax−X2)を比較して回転方
向を判断する(ステップS2532A)。(Ymax
2)<(Xmax−X2)である場合は(ステップS25
32AでYES)、h*cosθ+d+g*sinθをspy
2に代入し(ステップS2532B)、そうでなければ
spx2に代入する(ステップS2532C)。図35
は、通常原稿サイズ検出(図33、ステップS253
6)のフローチャートである。Xmaxをspx3に代入
し(ステップS25361)、Ymaxをspy3に代入
する(ステップS25362)。
FIG. 34 shows the detection of the skewed original size (FIG. 33,
It is a flowchart of step S2532). In this flow, the inclination angle θ and the length a of the side of the original in the reading area,
The length of the side outside the reading area is set from b, c, and d. First, the rotation direction is determined by comparing (Y 2 −Y min ) and (X max −X 1 ) (step S 25321). (Y 2
Y min) <(X max if -X 1) is the (step S2
5321), e * cosθ + a + f * sinθ is sp
x1 (step S25322); otherwise, substitute for spy1 (step S25323). Similarly, to determine the direction of rotation by comparing the (Y 1 -Y max) and (X 2 -X min) (step S25324). (Y 1
Y max) <(the case is X 2 -X min) (step S2
YES at 5324), g * cosθ + c + f * sinθ is sp
x2 (step S25325); otherwise, substitute for spy2 (step S25326). The rotation direction is determined by comparing (Y 1 −Y min ) and (X 1 −X min ) (step S25327). (Y 1
If Y min ) <(X 1 -X min ) (step S2)
YES at 5327), f * cosθ + b + e * sinθ is sp
y1 (step S25328), otherwise, substitutes spx1 (step S25329). Further, to determine the direction of rotation by comparing the (Y max -Y 2) and (X max -X 2) (step S2532A). (Y max
Y 2) <(X max -X 2) If it is the (step S25
YES at 32A), h * cosθ + d + g * sinθ is spy
2 (step S2532B), otherwise substitute into spx2 (step S2532C). FIG.
Is normal document size detection (FIG. 33, step S253)
It is a flowchart of 6). By substituting X max to SPX3 (step S25361), and substitutes the Y max on Spy3 (step S25362).

【0043】図36は、サイズ設定(図26、ステップ
S254)のフローチャートである。ここで、spx、
spyは、検出された原稿のサイズであり、cpx、c
pyは仮想用紙エリア3042の設定サイズを表し、c
px_max、cpy_maxは、設定可能な最大サイズ
を表す。cpx<spxでありcpy<spyである場
合(ステップS2541、S2542でYES)、cp
x<spxかつcpy<spyとなる最小定型サイズを
設定する(ステップS2543)。検出された原稿のサ
イズが最大用紙サイズより大きいが、有効原稿サイズの
縦横を入れ替えると設定可能な最大サイズより小さい場
合、すなわち、spx<cpx_max、spy≧cp
y_max、spy<cpx_maxである場合(ステッ
プS2541でYES、ステップS2542でNO、ス
テップS2545でYES)、またはspx≧cpx_
max、spx<cpy_max、spy<cpx_ma
xである場合(ステップS2541でNO、ステップS
2544でYES、ステップS2545でYES)、c
px<spyかつcpy<spxとなる最小定型サイズ
を設定し(ステップS2546)、90°回転の設定を
する(ステップS2547)。その他の場合、すなわ
ち、有効原稿領域サイズspx、spyが設定可能な最
大サイズcpx_max、cpy_maxより大きい場合
(ステップS2541でNO、ステップS2544でN
O)、最大定型サイズを設定し、すなわち、sx_ma
xをcpxに代入し、sy_maxをcpyに代入する
(ステップS2548)。さらに、角度θをθ0に設定
して任意角回転をさせない(ステップS2549)。最
後に、その他の設定をして(ステップS254A)、リ
ターンする。
FIG. 36 is a flowchart of the size setting (FIG. 26, step S254). Where spx,
spy is the size of the detected document, and cpx, c
py represents the set size of the virtual paper area 3042, and c
px_max and cpy_max represent the maximum size that can be set. If cpx <spx and cpy <spy (YES in steps S2541 and S2542), cp
A minimum fixed size satisfying x <spx and cpy <spy is set (step S2543). If the size of the detected document is larger than the maximum paper size but smaller than the maximum size that can be set by changing the length and width of the effective document size, that is, spx <cpx_max, spy ≧ cp
If y_max, spy <cpx_max (YES in step S2541, NO in step S2542, YES in step S2545), or spx ≧ cpx_
max, spx <cpy_max, spy <cpx_ma
x (NO in step S2541 and step S254
(YES at 2544, YES at step S2545), c
A minimum standard size satisfying px <spy and cpy <spx is set (step S2546), and 90 ° rotation is set (step S2547). In other cases, that is, when the effective document area sizes spx and spy are larger than the settable maximum sizes cpx_max and cpy_max (NO in step S2541 and N in step S2544).
O), set the maximum fixed size, ie, sx_ma
x is substituted for cpx, and sy_max is substituted for cpy (step S2548). Further, the angle θ is set to θ 0 and the rotation is not performed at an arbitrary angle (step S2549). Finally, make other settings (step S254A), and return.

【0044】図37は、回転座標設定(図27、ステッ
プS255)のフローチャートである。ここで、rot
_xとrot_yは読取領域の原点を基準とした回転中心
をあらわす座標である。回転しない場合(θ=θ0
(ステップS2551でYES)、rot_xとrot_
yをともに0とする(ステップS2552)。回転する
場合(ステップS2551でNO)、検出された回転角
度θの正負により分岐する(ステップS2553)。回
転角度θが正である場合、e>0であれば(ステップS
2554でYES)、X10+e*sin2θをrot_xに
代入し、e*sinθ*cosθをrot_yに代入する(ス
テップS2555)。e>0でなければ、すなわち、e
=0であれば(ステップS2554でNO)、X1をr
ot_xに代入し、Yminをrot_yに代入する(ステ
ップS2556)。回転角度θが負である場合、f>0
であれば(ステップS2557でYES)、f*sinθ
*cosθをrot_xに代入し、Y10+f*cos2θをro
t_yに代入する(ステップS2558)。f>0でな
ければ、すなわち、f=0であれば(ステップS255
7でNO)、Yminをrot_xに代入し、Y1をrot_
yに代入する(ステップS2559)。そして、その他
の処理(ステップS255A)をして、リターンする。
FIG. 37 is a flowchart for setting the rotational coordinates (FIG. 27, step S255). Where rot
_x and rot_y are coordinates representing the center of rotation with respect to the origin of the reading area. When not rotating (θ = θ 0 )
(YES in step S2551), rot_x and rot_
Both y are set to 0 (step S2552). If it rotates (NO in step S2551), the flow branches depending on whether the detected rotation angle θ is positive or negative (step S2553). If the rotation angle θ is positive, if e> 0 (step S
(YES in 2554), X 10 + e * sin 2 θ is substituted for rot_x, and e * sin θ * cos θ is substituted for rot_y (step S2555). If e> 0, that is, e
= If 0 (NO in step S2554), the X 1 r
ot_x and Y min into rot_y (step S2556). If the rotation angle θ is negative, f> 0
If (YES in step S2557), f * sin θ
* Cos θ is substituted for rot_x, and Y 10 + f * cos 2 θ is substituted for ro
Substitute for t_y (step S2558). If f> 0, that is, if f = 0 (step S255)
7), Y min is substituted for rot_x, and Y 1 is substituted for rot_x.
y (step S2559). Then, other processing (step S255A) is performed, and the process returns.

【0045】図38は、デスティネーション設定(図2
7、ステップS256)のフローチャートである。デス
ティネーションは、仮想用紙に展開する入力画像の読取
領域原点に対応する(仮想用紙原点を基準とした)座標
pmdax、pmdayとする。仮想用紙エリアが定型
サイズに設定されているのに対し、原稿検出から各辺を
抽出することにより決定した入力画像サイズがそれと一
致しているとは限らない。そのため、読取基準側(回転
中心側)を優先に、抽出した2以上の辺がある場合、隣
り合った2辺が抽出できた隅が仮想用紙エリアの隅に合
致するように、その2辺と設定した用紙サイズとからデ
スティネーション(平行移動量)を設定する。ここで、
spxとspyは、検出された原稿用紙のサイズであり
(図33参照)、cpxとcpyは仮想用紙エリア30
42の設定サイズを表し、rot_xとrot_yは、読
取領域の原点を基準とした回転中心をあらわす座標であ
る(図37参照)。まず、角度θ>0であって、辺a、
bがともに正である場合(ステップS2561でθ>0
であり、ステップS2562でYESである場合)、ま
たは、角度θ<0であって、辺b,cがともに正である
場合(ステップS2561でθ<0であり、ステップS
2563でYESである場合)、回転中心を挟んだ2辺
が抽出できている。そこで、−rot_xをpmdax
に代入し、−rot_yをpmdayに代入する(ステ
ップS2564)。また、角度θ>0であって、辺a、
bがともに負である場合(ステップS2562でNO、
ステップS2565でYESである場合)、または、角
度θ<0であって、辺b,cがともに負である場合(ス
テップS2563でNO、ステップS2566でYES
である場合)、−rot_xをpmdaxに代入し、
(−rot_y+cpy−spy)をpmdayに代入
する(ステップS2567)。
FIG. 38 shows a destination setting (FIG. 2).
7 is a flowchart of step S256). The destination is coordinates pmdx and pmday (based on the virtual paper origin) corresponding to the read area origin of the input image to be developed on the virtual paper. While the virtual paper area is set to the standard size, the input image size determined by extracting each side from document detection does not always match it. Therefore, when there are two or more extracted sides with priority given to the reading reference side (the rotation center side), the two sides are extracted so that the corner from which two adjacent sides can be extracted matches the corner of the virtual paper area. The destination (parallel movement amount) is set based on the set paper size. here,
spx and spy are the sizes of the detected original paper (see FIG. 33), and cpx and cpy are virtual paper areas 30.
42, and rot_x and rot_y are coordinates representing the rotation center with respect to the origin of the reading area (see FIG. 37). First, when the angle θ> 0 and the side a,
b are both positive (θ> 0 in step S2561)
And if YES in step S2562) or if the angle θ <0 and both sides b and c are positive (θ <0 in step S2561 and step S
If YES in 2563), two sides sandwiching the rotation center have been extracted. Therefore, -rot_x is changed to pmd
, And -rot_y to pmday (step S2564). Also, when the angle θ> 0 and the side a,
b are both negative (NO in step S2562,
If YES in step S2565) or if angle θ <0 and sides b and c are both negative (NO in step S2563, YES in step S2566)
), -Rot_x is substituted for pmdex,
(-Rot_y + cpy-spy) is substituted for pmday (step S2567).

【0046】また、角度θ>0であって、辺c、dがと
もに正である場合(ステップS2562とステップS2
565でNO、ステップS2568でYESである場
合)、または、角度θ<0であって、辺d、aがともに
正である場合(ステップS2563とステップS256
6でNO、ステップS2569でYESである場合)、
(−rot_x+cpx−spx)をpmdaxに代入
し、−rot_yをpmdayに代入する(ステップS
256A)。また、角度θ>0であって、辺d、aがと
もに正である場合(ステップS2562とステップS2
565とステップS2568でNO、ステップS256
BでYESである場合)、または、角度θ<0であっ
て、辺a、bがともに正である場合(ステップS256
3とステップS2566とS2569でNO、ステップ
S256CでYESである場合)、(−rot_x+c
px−spx)をpmdaxに代入し、(−rot_y
+cpy−spy)をpmdayに代入する(ステップ
S256D)。以上のどの条件も満足していなければ、
{−rot_x+(cpx−spx)/2}をpmda
xに代入し、{−rot_y+(cpx−spx)/
2}をpmdayに代入する(ステップS256E)。
If the angle θ> 0 and both sides c and d are positive (steps S2562 and S2
NO at 565 and YES at step S2568) or when angle θ <0 and both sides d and a are positive (steps S2563 and S256)
No. 6 and YES in step S2569),
(−rot_x + cpx−spx) is substituted for pmdax, and −rot_y is substituted for pmday (step S
256A). If the angle θ> 0 and both sides d and a are positive (steps S2562 and S2
565 and NO in step S2568, step S256
B is YES) or the angle θ <0 and both sides a and b are positive (step S256)
3, NO in steps S2566 and S2569, and YES in step S256C), (-rot_x + c
(px-spx) into pmdax, and (-rot_y
+ Cpy-spy) is substituted for pmday (step S256D). If none of the above conditions are met,
{-Rot_x + (cpx-spx) / 2} is converted to pmda
x, and {−rot_y + (cpx−spx) /
2} is substituted for pmday (step S256E).

【0047】図39は、90°回転のデスティネーショ
ン設定(図27、ステップS257)のフローチャート
である。90°回転を組み合わせる場合は、デスティネ
ーションの基準を変える必要がある。θ90=90である
場合(ステップS2571でYES)、pmdayをp
mdaxに代入し、cpx−pmdaxをpmdayに
代入する(ステップS2572)。また、θ90=180
である場合(ステップS2573でYES)、cpx−
pmdaxをpmdaxに代入し、cpx−pmday
をpmdayに代入する(ステップS2574)。ま
た、θ90=270である場合(ステップS2575でY
ES)、cpy−pmdayをpmdaxに代入し、p
mdaxをpmdayに代入する(ステップS257
6)。なお、上述のデスティネーション設定の内容は、
通常モードの場合について説明したが、綴じ代シフト、
複数原稿を1枚にコピーする節約コピーなどと組み合わ
せる場合、それを考慮した設定をすることも可能であ
る。
FIG. 39 is a flow chart of the destination setting for 90 ° rotation (FIG. 27, step S257). If 90 ° rotation is combined, it is necessary to change the destination criterion. If θ 90 = 90 (YES in step S2571), pmday is set to p
mdx, and cpx-pmdax is substituted for pmday (step S2572). Also, θ 90 = 180
(YES in step S2573), cpx-
Substituting pmdx into pmdx, cpx-pmday
Is substituted for pmday (step S2574). If θ 90 = 270 (Y in step S2575)
ES), substituting cpy-pmday for pmdax, p
mmax is substituted for pmday (step S257)
6). In addition, the contents of the above destination setting are
Although the case of the normal mode has been described, the binding margin shift,
When combining with a saving copy that copies a plurality of originals into one, it is also possible to make settings in consideration of this.

【0048】図40は、メモリユニット部30を制御す
る第3CPU103のメインフローチャートである。ま
ずRAMやレジスタなどを初期化する初期設定をおこな
う(ステップS31)。次に、コマンド受信処理(ステ
ップS32)、ステータス送信処理(ステップS3
3)、画像メモリ書き込み処理(ステップS34)、圧
縮制御処理(ステップS35)、伸長制御処理(ステッ
プS36)、編集制御処理(ステップS37、図41参
照)、スムージング制御処理(ステップS38)、画像
メモリ読み出し処理(ステップS39)、および、その
他の処理(ステップS3A)をする。次に、ステップS
32に戻り、上述の処理をくり返す。図41は、編集制
御(図40、ステップS37)のフローチャートであ
る。プリント用のデータの準備がすんだら(ステップS
371でYES)、サイズパラメータ(cpx,cp
y)、(spx,spy)を設定し(ステップS37
2)、90°単位回転パラメータ(90θ)を設定し
(ステップS373)、任意角回転パラメータθを設定
し(ステップS374)、回転座標パラメータを設定し
(ステップS375)、デスティネーションパラメータ
(pmdax,pmday)を設定する(ステップS3
76)。そして、他のパラメータを設定して(ステップ
S377)、リターンする。
FIG. 40 is a main flowchart of the third CPU 103 for controlling the memory unit 30. First, initial settings for initializing a RAM, a register, and the like are performed (step S31). Next, a command receiving process (step S32) and a status transmitting process (step S3)
3), image memory writing processing (step S34), compression control processing (step S35), decompression control processing (step S36), editing control processing (step S37, see FIG. 41), smoothing control processing (step S38), image memory The reading process (step S39) and other processes (step S3A) are performed. Next, step S
32, and repeats the above processing. FIG. 41 is a flowchart of the editing control (FIG. 40, step S37). Once the data for printing is ready (step S
371, YES), size parameters (cpx, cp
y) and (spx, spy) are set (step S37).
2) A 90 ° unit rotation parameter (90θ) is set (step S373), an arbitrary angle rotation parameter θ is set (step S374), a rotation coordinate parameter is set (step S375), and destination parameters (pmdax, pmday) are set. Is set (step S3).
76). Then, other parameters are set (step S377), and the process returns.

【0049】図42は、プリンタ部を制御する第4CP
U104のメインフローチャートである。RAMやレジ
スタなどを初期化する初期設定をおこなった後(ステッ
プS41)、1ルーチンの長さを規定する内部タイマー
をセットする(ステップS42)。次に、現像・転写系
の制御(ステップS43)、搬送系の制御(ステップS
44)、定着系の制御(ステップS45)、印字処理部
の制御(ステップS46)をする。そして、その他の処
理をする(ステップS47)。次に、内部タイマーの終
了を待って(ステップS48でYES)、ステップS4
2に戻り、上述の処理をくり返す。図43は、複写機全
体の制御を統括する第5CPU105のメインフローチ
ャートである。RAMやレジスタなどを初期化する初期
設定をおこなった後(ステップS51)、1ルーチンの
長さを規定する内部タイマーをセットする(ステップS
52)。次に、他のCPUからの入力データをチェック
する入力データ解析処理(ステップS53)、操作内容
に応じて動作モードを定めるモード設定処理(ステップ
S54)、割り込み切換処理(ステップS55)、モー
ドに応じたコマンド設定処理(ステップS56)、コマ
ンドを通信ポートに待機させる出力データ設定(ステッ
プS57)、および、その他の処理(ステップS58)
をする。次に、内部タイマーの終了を待って(ステップ
S59でYES)、ステップS52に戻り、上述の処理
をくり返す。
FIG. 42 shows a fourth CP for controlling the printer unit.
It is a main flowchart of U104. After the initialization for initializing the RAM and the registers is performed (step S41), an internal timer that defines the length of one routine is set (step S42). Next, control of the development / transfer system (step S43) and control of the transport system (step S43)
44), control of the fixing system (step S45), and control of the print processing unit (step S46). Then, other processing is performed (step S47). Next, after waiting for the end of the internal timer (YES in step S48), step S4
2 and repeat the above processing. FIG. 43 is a main flowchart of the fifth CPU 105 which controls the control of the entire copying machine. After the initialization for initializing the RAM and the registers is performed (step S51), an internal timer that defines the length of one routine is set (step S51).
52). Next, an input data analysis process for checking input data from another CPU (step S53), a mode setting process for determining an operation mode according to the operation content (step S54), an interrupt switching process (step S55), and a mode Command setting processing (step S56), output data setting for making the command wait in the communication port (step S57), and other processing (step S58).
do. Next, waiting for the end of the internal timer (YES in step S59), the process returns to step S52, and the above-described processing is repeated.

【0050】以上で、原稿読取装置から入力した画像デ
ータの任意角回転処理について述べたが、同様にネット
ワーク上の外部機器から通信される画像データ(角度パ
ラメータ付き)を処理することも可能である。たとえ
ば、外部機器から入力される画像データについて任意角
回転処理をして印字処理部で印字できる。また、画像読
取装置で読み取った画像データについて任意角回転処理
をして外部機器に出力できる。また、外部機器から入力
される画像データについて任意角回転処理をして再び外
部機器に出力できる。
In the above, the arbitrary angle rotation processing of the image data input from the document reading apparatus has been described. Similarly, it is also possible to process image data (with angle parameters) transmitted from an external device on the network. . For example, image data input from an external device can be rotated by an arbitrary angle and printed by the print processing unit. Further, the image data read by the image reading device can be subjected to an arbitrary angle rotation process and output to an external device. In addition, image data input from an external device can be subjected to arbitrary angle rotation processing and output to the external device again.

【0051】[0051]

【発明の効果】原稿が原稿ガラス上に傾いて置かれた場
合、原稿が読取領域からはみ出していても、読み取った
画像データから原稿の4隅を推定して、傾き補正のため
の任意角回転に必要な各種パラメータを算出できる。こ
れにより、原稿が読取領域からはみ出していても、自動
的に傾斜角を補正して本来求められる画像が再現され
る。また、各種パラメータは、原稿の画像データを基
に、最も信頼できる値を設定できるので、最適な画像が
得られる。また、信頼できるパラメータが得られない場
合は、任意角回転を禁止するので、むだな画像再現が避
けられる。
According to the present invention, when an original is placed on the original glass at an angle, even if the original is out of the reading area, the four corners of the original are estimated from the read image data, and the arbitrary angle rotation for correcting the inclination is performed. Various parameters required for can be calculated. As a result, even if the document is out of the reading area, the inclination angle is automatically corrected, and the originally required image is reproduced. Further, since various parameters can be set to the most reliable values based on the image data of the document, an optimal image can be obtained. If a reliable parameter cannot be obtained, the rotation at an arbitrary angle is prohibited, so that useless image reproduction can be avoided.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明に係る複写機の図式的な断面図であ
る。
FIG. 1 is a schematic sectional view of a copying machine according to the present invention.

【図2】 複写機の操作パネルの平面図である。FIG. 2 is a plan view of an operation panel of the copying machine.

【図3】 複写機を含むシステム形態の1例の図であ
る。
FIG. 3 is a diagram illustrating an example of a system configuration including a copying machine;

【図4】 複写機の制御部の1部のブロック図である。FIG. 4 is a block diagram of a part of a control unit of the copying machine.

【図5】 複写機の制御部の1部のブロック図である。FIG. 5 is a block diagram of a part of a control unit of the copying machine.

【図6】 コントローラのブロック図である。FIG. 6 is a block diagram of a controller.

【図7】 画像信号処理部のブロック図である。FIG. 7 is a block diagram of an image signal processing unit.

【図8】 メモリユニット部のブロック図である。FIG. 8 is a block diagram of a memory unit.

【図9】 メモリ書き込み動作の図である。FIG. 9 is a diagram of a memory write operation.

【図10】 メモリ読み出し動作の図である。FIG. 10 is a diagram of a memory read operation.

【図11】 スキャンにより原稿画像入力の説明するた
めの図である。
FIG. 11 is a diagram for explaining input of a document image by scanning.

【図12】 読み取った画像のイメージの1例の図であ
る。
FIG. 12 is a diagram illustrating an example of an image of a read image.

【図13】 読み取った画像のイメージの1例の図であ
る。
FIG. 13 is a diagram illustrating an example of an image of a read image.

【図14】 読み取った画像のイメージの1例の図であ
る。
FIG. 14 is a diagram illustrating an example of an image of a read image.

【図15】 読み取った画像のイメージの1例の図であ
る。
FIG. 15 is a diagram illustrating an example of an image of a read image.

【図16】 読み取った画像のイメージの1例の図であ
る。
FIG. 16 is a diagram illustrating an example of an image of a read image.

【図17】 読み取った画像のイメージの1例の図であ
る。
FIG. 17 is a diagram illustrating an example of an image of a read image.

【図18】 読み取った画像のイメージの1例の図であ
る。
FIG. 18 is a diagram illustrating an example of an image of a read image.

【図19】 メモリユニット内の編集処理部のブロック
図である。
FIG. 19 is a block diagram of an edit processing unit in the memory unit.

【図20】 画像データの90°回転処理を説明するた
めの図である。
FIG. 20 is a diagram for describing 90 ° rotation processing of image data.

【図21】 画像データのビットスワップ処理を説明す
るための図である。
FIG. 21 is a diagram for explaining bit swap processing of image data.

【図22】 画像データの任意角回転処理(シフトシフ
ト処理)を説明するための図である。
FIG. 22 is a diagram illustrating an arbitrary angle rotation process (shift shift process) of image data.

【図23】 画像データの任意角回転処理(シフトシフ
ト処理)と変倍処理を同時に行なう処理を説明するため
の図である。
FIG. 23 is a diagram illustrating a process of simultaneously performing an arbitrary angle rotation process (shift shift process) and a scaling process on image data.

【図24】 第1CPUのメインフローチャートであ
る。
FIG. 24 is a main flowchart of the first CPU.

【図25】 第2CPUのメインフローチャートであ
る。
FIG. 25 is a main flowchart of the second CPU.

【図26】 原稿検出のフローチャートである。FIG. 26 is a flowchart of document detection.

【図27】 辺抽出のフローチャートである。FIG. 27 is a flowchart of edge extraction.

【図28】 角度検出のフローチャートである。FIG. 28 is a flowchart of angle detection.

【図29】 角度θa検出のフローチャートである。29 is a flowchart of an angle theta a detection.

【図30】 角度θb検出のフローチャートである。Is a flow chart of FIG. 30 the angle theta b detected.

【図31】 角度θc検出のフローチャートである。FIG. 31 is a flowchart of angle θ c detection.

【図32】 角度θd検出のフローチャートである。FIG. 32 is a flowchart of an angle theta d detection.

【図33】 サイズ検出のフローチャートである。FIG. 33 is a flowchart of size detection.

【図34】 傾き原稿サイズ検出のフローチャートであ
る。
FIG. 34 is a flowchart of skew document size detection.

【図35】 通常原稿サイズ検出のフローチャートであ
る。
FIG. 35 is a flowchart of normal document size detection.

【図36】 サイズ設定のフローチャートである。FIG. 36 is a flowchart of size setting.

【図37】 回転座標設定のフローチャートである。FIG. 37 is a flowchart of setting rotation coordinates.

【図38】 デスティネーション設定のフローチャート
である。
FIG. 38 is a flowchart of destination setting.

【図39】 90°回転のデスティネーション設定のフ
ローチャートである。
FIG. 39 is a flowchart of setting a 90 ° rotation destination.

【図40】 第3CPUのメインフローチャートであ
る。
FIG. 40 is a main flowchart of the third CPU.

【図41】 編集制御のフローチャートである。FIG. 41 is a flowchart of editing control.

【図42】 第4CPUのメインフローチャートであ
る。
FIG. 42 is a main flowchart of the fourth CPU.

【図43】 第5CPUのメインフローチャートであ
る。
FIG. 43 is a main flowchart of the fifth CPU.

【符号の説明】[Explanation of symbols]

30 メモリユニット部、 103 第3CPU、 2
00 画像読取部、 304 画像メモリ、 307
編集処理部。
30 memory unit section, 103 third CPU, 2
00 image reading unit, 304 image memory, 307
Editing section.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 原稿ガラスの読取領域上に置かれている
原稿の2次元画像データを入力する画像入力手段と、 画像入力手段により入力された原稿の画像データより、
原稿ガラス上に置かれている原稿が存在する領域を検出
する検出手段と、 検出手段により検出された原稿の領域が傾いている場合
に、2次元の入力画像データを任意角回転する任意角回
転手段と、 原稿が読取領域からはみ出ている場合に、検出手段によ
り検出された原稿の領域の座標より原稿の傾き角度と原
稿の位置のずれを算出し、それらに基づいて前記の任意
角回転手段を動作させる制御手段とを備えることを特徴
とする画像形成装置。
An image input means for inputting two-dimensional image data of an original placed on a reading area of an original glass, and image data of the original input by the image input means
Detecting means for detecting an area where the original placed on the original glass is present; and an arbitrary angle rotation for rotating the two-dimensional input image data by an arbitrary angle when the area of the original detected by the detecting means is inclined. Means for calculating the inclination angle of the document and the deviation of the position of the document from the coordinates of the area of the document detected by the detecting means when the document is out of the reading area, and based on these, the arbitrary angle rotation means An image forming apparatus comprising: a control unit that operates the image forming apparatus.
【請求項2】 請求項1に記載された画像形成装置にお
いて、 前記の制御手段は、原稿領域の座標より、読取領域内の
原稿の辺の長さを検出し、前記の傾き角度と読取領域内
の原稿の辺の長さから読取領域外の辺の長さを設定し、
これらに基づいて用紙サイズを演算し、傾き角度、用紙
サイズおよびずれに基づいて前記の任意角回転手段を動
作させることを特徴とする画像形成装置。
2. The image forming apparatus according to claim 1, wherein the control unit detects a length of a side of the document in the reading area from coordinates of the document area, and determines the inclination angle and the reading area. Set the length of the side outside the reading area from the length of the side of the original inside,
An image forming apparatus which calculates a paper size based on these, and operates the arbitrary angle rotation unit based on the inclination angle, the paper size and the deviation.
【請求項3】 請求項2に記載された画像形成装置にお
いて、 前記の制御手段は、前記の原稿領域の座標から得られた
直線を原稿領域の各辺とみなして傾き角度を抽出するこ
とを特徴とする画像形成装置。
3. The image forming apparatus according to claim 2, wherein the control unit extracts a tilt angle by regarding a straight line obtained from coordinates of the document area as each side of the document area. Characteristic image forming apparatus.
【請求項4】 請求項2に記載された画像形成装置にお
いて、 前記制御手段は、前記の傾き角度を、前記の抽出された
原稿の各辺のうち最も長い辺より算出することを特徴と
する画像形成装置。
4. The image forming apparatus according to claim 2, wherein the control unit calculates the inclination angle from a longest one of the sides of the extracted document. Image forming device.
【請求項5】 請求項2に記載された画像形成装置にお
いて、 前記の制御手段は、前記の原稿領域を示す辺を抽出でき
なかった場合、前記の任意角回転手段を動作させないこ
とを特徴とする画像形成装置。
5. The image forming apparatus according to claim 2, wherein the control unit does not operate the arbitrary-angle rotating unit when a side indicating the document area cannot be extracted. Image forming apparatus.
【請求項6】 請求項2に記載された画像形成装置にお
いて、 前記の制御手段は、前記の抽出された原稿領域の各辺か
ら算出したそれぞれの傾き角度のうち、ほかの算出結果
と著しく異なる角度のある場合、前記の任意角回転手段
を動作させないことを特徴とする画像形成装置。
6. The image forming apparatus according to claim 2, wherein the control unit is significantly different from other calculation results among the respective inclination angles calculated from each side of the extracted document area. An image forming apparatus characterized in that when there is an angle, the arbitrary angle rotation unit is not operated.
【請求項7】 請求項2に記載された画像形成装置にお
いて、 前記の制御手段は、前記の原稿検出手段により検出した
原稿領域を含み、抽出した辺を辺の1部とする長方形領
域から用紙サイズを算出することを特徴とする画像形成
装置。
7. The image forming apparatus according to claim 2, wherein said control means includes a document area detected by said document detection means, and a rectangular area having an extracted side as one side. An image forming apparatus for calculating a size.
【請求項8】 請求項7に記載された画像形成装置にお
いて、 前記の制御手段は、前記の算出した用紙サイズが最大用
紙サイズより大きい場合、前記の任意角回転手段を動作
させないことを特徴とする画像形成装置。
8. The image forming apparatus according to claim 7, wherein the control unit does not operate the arbitrary-angle rotating unit when the calculated paper size is larger than a maximum paper size. Image forming apparatus.
【請求項9】 請求項8に記載された画像形成装置にお
いて、 さらに、画像を90°回転させる90°回転手段を備
え、 前記の制御手段は、前記の算出した用紙サイズが最大用
紙サイズより大きく、かつ、用紙の縦横を入れ替えると
最大用紙サイズより小さい場合、任意角回転手段ととも
に、90°回転手段を動作させることを特徴とする画像
形成装置。
9. The image forming apparatus according to claim 8, further comprising: a 90 ° rotation unit configured to rotate the image by 90 °, wherein the control unit determines that the calculated sheet size is larger than a maximum sheet size. An image forming apparatus characterized by operating a 90 ° rotation unit together with an arbitrary angle rotation unit when the length and width of the paper are switched to be smaller than the maximum paper size.
【請求項10】 請求項1に記載された画像形成装置に
おいて、 前記の制御手段は、抽出された辺のうち隣り合う2以上
の辺がある場合、それと前記の算出された用紙サイズよ
り画像の平行移動量を算出することを特徴とする画像形
成装置。
10. The image forming apparatus according to claim 1, wherein, when there are two or more adjacent sides among the extracted sides, the control unit determines an image based on the calculated size and the calculated paper size. An image forming apparatus for calculating a parallel movement amount.
JP9152344A 1997-06-10 1997-06-10 Image-forming device Pending JPH10341332A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP9152344A JPH10341332A (en) 1997-06-10 1997-06-10 Image-forming device
US09/095,311 US6433896B1 (en) 1997-06-10 1998-06-10 Image processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9152344A JPH10341332A (en) 1997-06-10 1997-06-10 Image-forming device

Publications (1)

Publication Number Publication Date
JPH10341332A true JPH10341332A (en) 1998-12-22

Family

ID=15538496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9152344A Pending JPH10341332A (en) 1997-06-10 1997-06-10 Image-forming device

Country Status (1)

Country Link
JP (1) JPH10341332A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007088654A (en) * 2005-09-21 2007-04-05 Pfu Ltd Image reading apparatus
JP2008147976A (en) * 2006-12-08 2008-06-26 Nec Corp Image inclination correction device and image inclination correcting method
JP2009017409A (en) * 2007-07-06 2009-01-22 Pfu Ltd Image reading processor, image reader and image reading processing method
JP2009164809A (en) * 2007-12-28 2009-07-23 Brother Ind Ltd Image reader
JP2010220060A (en) * 2009-03-18 2010-09-30 Casio Computer Co Ltd Image processing apparatus, program, method and system
JP2011086090A (en) * 2009-10-15 2011-04-28 Konica Minolta Holdings Inc Image conversion method, image converting device, image conversion system, and image conversion program
US8174737B2 (en) 2007-12-28 2012-05-08 Brother Kogyo Kabushiki Kaisha Image reading apparatus
US8284463B2 (en) 2007-12-28 2012-10-09 Brother Kogyo Kabushiki Kaisha Image reading apparatus
JP2015211321A (en) * 2014-04-25 2015-11-24 ブラザー工業株式会社 Reading apparatus and program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007088654A (en) * 2005-09-21 2007-04-05 Pfu Ltd Image reading apparatus
US7826679B2 (en) 2005-09-21 2010-11-02 Pfu Limited Image reading apparatus
JP2008147976A (en) * 2006-12-08 2008-06-26 Nec Corp Image inclination correction device and image inclination correcting method
JP2009017409A (en) * 2007-07-06 2009-01-22 Pfu Ltd Image reading processor, image reader and image reading processing method
JP2009164809A (en) * 2007-12-28 2009-07-23 Brother Ind Ltd Image reader
US8174737B2 (en) 2007-12-28 2012-05-08 Brother Kogyo Kabushiki Kaisha Image reading apparatus
US8284463B2 (en) 2007-12-28 2012-10-09 Brother Kogyo Kabushiki Kaisha Image reading apparatus
JP2010220060A (en) * 2009-03-18 2010-09-30 Casio Computer Co Ltd Image processing apparatus, program, method and system
JP2011086090A (en) * 2009-10-15 2011-04-28 Konica Minolta Holdings Inc Image conversion method, image converting device, image conversion system, and image conversion program
JP2015211321A (en) * 2014-04-25 2015-11-24 ブラザー工業株式会社 Reading apparatus and program

Similar Documents

Publication Publication Date Title
US6433896B1 (en) Image processing apparatus
JP3432736B2 (en) Image processing device
US6191405B1 (en) Image processing apparatus including image rotator for correcting tilt of the image data
US5444550A (en) Image processing apparatus
EP0797344B1 (en) Image forming system
JP3354227B2 (en) Digital copier operation control method
JP4981000B2 (en) Image concealment method and image forming apparatus
JPH10341332A (en) Image-forming device
JP3343367B2 (en) Image direction determining method and apparatus using vertical and horizontal direction data
EP0395402A2 (en) Image processing system
JP3814995B2 (en) Image forming apparatus
JPH10276316A (en) Image forming device
JPH10276317A (en) Image forming device
JPH10341331A (en) Image processor
JPH10276318A (en) Image forming device
JP2005111852A (en) Imaging device, printing control method and program
JPH10341330A (en) Image-forming device
JP3658924B2 (en) Image forming apparatus
JP3562329B2 (en) Image forming device
JP3337830B2 (en) Composite image input / output device and printer control device
JP2004153567A (en) Image input/output device and control method therefor, image input/output system and control program
JP3359651B2 (en) Image direction recognition / unification method and image direction recognition / unification device
JP2008103919A (en) Image forming apparatus and method thereof
JPH10285380A (en) Image-forming device
JP2911478B2 (en) Image processing device