JPH10341331A - Image processor - Google Patents

Image processor

Info

Publication number
JPH10341331A
JPH10341331A JP9149468A JP14946897A JPH10341331A JP H10341331 A JPH10341331 A JP H10341331A JP 9149468 A JP9149468 A JP 9149468A JP 14946897 A JP14946897 A JP 14946897A JP H10341331 A JPH10341331 A JP H10341331A
Authority
JP
Japan
Prior art keywords
image
document
rotation
processing
magnification
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
JP9149468A
Other languages
Japanese (ja)
Inventor
Kazuhiro Ueda
和弘 上田
Nobuhiro Mishima
信広 三縞
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 JP9149468A priority Critical patent/JPH10341331A/en
Priority to US09/092,234 priority patent/US6191405B1/en
Publication of JPH10341331A publication Critical patent/JPH10341331A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To reduce the degradation of image quality in the case of arbitrary angle rotation by reading an original, while enlarging an image at the time of image read according to a reading scale factor calculated based on an inclined angle detected by an inclination detecting means. SOLUTION: First, a reader reads an original through the prescan of original and detects the inclined angle of original. Corresponding to the inclined angle, a memory unit part 30 calculates the image reading scale factor. Next, an image signal processing part 20 reads the original, while enlarging it according to the scale factor in the case of main scan of original. Afterwards, the memory unit part 30 corrects the inclination of image quality according to the inclined angle of the read image signal. The obtained image is an image in normal direction. In this case, when a user sets the desired copying scale factor, the image reading scale factor is calculated from the copying scale factor and the detected inclined angle. Thus, after an arbitrary angle rotating processing, the image becomes a corrected image in the normal direction with the desired copying scale factor.

Description

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

【0001】[0001]

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

【0002】[0002]

【従来の技術】原稿画像を読み取るために原稿ガラス上
に置かれた原稿の位置が誤って傾いている場合に、この
原稿の傾きを補正することが望ましい。このため、画像
読取装置から出力するための2次元画像データの任意角
回転処理機能が提案されている(たとえば特公昭63−
9266号公報)。この任意角回転処理では、原稿ガラ
ス上の置かれた原稿の傾きを検出して、画像データを正
常な向きに回転し、こうして補正された画像データにつ
いて画像を形成する。これにより、ユーザーが不慮に傾
いて置いた原稿も、自動的に画像の傾きを補正して出力
できる。
2. Description of the Related Art When a document placed on a document glass for reading a document image is erroneously tilted, it is desirable to correct the tilt of the document. For this reason, an arbitrary angle rotation processing function of two-dimensional image data to be output from the image reading device has been proposed (for example, Japanese Patent Publication No. 63-63).
No. 9266). In the arbitrary angle rotation processing, the inclination of the original placed on the original glass is detected, the image data is rotated in a normal direction, and an image is formed using the corrected image data. As a result, a document placed by the user inadvertently tilted can be automatically corrected in image tilt and output.

【0003】[0003]

【発明が解決しようとする課題】任意角回転による傾き
補正処理の1つの手法では、2つの走査方向について画
像データのシフト処理と90°回転とを組み合わせて回
転処理を行なう。この場合、元画像のサイズを変えない
ようにするために、各走査方向のシフト処理の後で電気
変倍処理を行っている。しかし、この場合、シフト処理
ごとに電気変倍処理を行なう必要があるため、電気変倍
処理によるラインの挿入などが生じ、画質の劣化が起こ
ることになる。このため良好な補正画像が得られない。
また、回転処理に要する処理時間が多くかかる。
In one method of the inclination correction processing by the arbitrary angle rotation, rotation processing is performed by combining image data shift processing and 90 ° rotation in two scanning directions. In this case, in order to keep the size of the original image unchanged, the electrical scaling process is performed after the shift process in each scanning direction. However, in this case, since it is necessary to perform the electric scaling process for each shift process, a line is inserted by the electric scaling process, and the image quality is deteriorated. Therefore, a good corrected image cannot be obtained.
Further, a long processing time is required for the rotation processing.

【0004】本発明の目的は、任意角回転の際に画質劣
化の小さい画像形成装置を提供することである。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an image forming apparatus in which image quality is hardly deteriorated when rotating at an arbitrary angle.

【0005】[0005]

【課題を解決するための手段】本発明に係る画像処理装
置は、原稿ガラス上に置かれている原稿の傾き角度を検
出する傾き検出手段と、前記傾き検出手段により検出さ
れた傾き角度により、画像読取の倍率を算出する倍率算
出手段と、前記倍率算出手段により算出された倍率にし
たがって原稿を読み取り画像信号に変換して出力する画
像読取手段と、前記画像読取手段により読み取られた画
像信号について、前記傾き検出手段により検出された傾
き角度に応じて画像の傾きを補正する傾き補正手段とを
備える。こうして、傾き検出手段により検出された傾き
角度に応じて倍率算出手段によって算出された読取倍率
に従い、画像読み取り時に画像を拡大して原稿を読み取
る。傾き補正において、画像は元の画像の大きさに戻さ
れ、正常な向きに補正される。これにより正常な画像信
号が出力される。こうして、傾き角補正における画質の
劣化が少なくなり、また、補正画像が高速に生成され
る。好ましくは、前記の倍率は副走査方向の画像読取の
倍率である。こうして、画像読み取り時に副走査方向に
画像を拡大して原稿を読み取るので、変倍と90°回転
とを各走査方向について行うシフトシフト処理におい
て、副走査方向の電気変倍処理が不必要となり、電気変
倍処理による処理時間の増加と電気変倍処理のライン挿
入などによる画質の劣化がなくなる。好ましくは、さら
に、所望の倍率を設定する倍率設定手段を備え、前記倍
率算出手段は、前記傾き検出手段により検出された傾き
角度と、前記の倍率設定手段で設定された倍率とより画
像読取の倍率を算出する。これにより、画像回転の後に
倍率設定手段により設定された倍率の画像信号が出力さ
れる。
An image processing apparatus according to the present invention comprises: an inclination detecting means for detecting an inclination angle of a document placed on a document glass; and an inclination angle detected by the inclination detecting means. Magnification calculating means for calculating a magnification of image reading, image reading means for converting a document into an image signal according to the magnification calculated by the magnification calculating means and outputting the image signal, and an image signal read by the image reading means And a tilt correcting means for correcting the tilt of the image according to the tilt angle detected by the tilt detecting means. Thus, according to the reading magnification calculated by the magnification calculating means in accordance with the inclination angle detected by the inclination detecting means, the image is enlarged and the original is read at the time of image reading. In the tilt correction, the image is returned to the original image size and corrected in a normal direction. As a result, a normal image signal is output. Thus, the deterioration of the image quality in the inclination angle correction is reduced, and the corrected image is generated at high speed. Preferably, the magnification is a magnification for reading an image in the sub-scanning direction. In this way, when reading the image, the original is read by enlarging the image in the sub-scanning direction. Therefore, in the shift shift process in which the scaling and the 90 ° rotation are performed in each scanning direction, the electric scaling process in the sub-scanning direction becomes unnecessary. An increase in processing time due to the electric scaling process and deterioration in image quality due to insertion of a line in the electric scaling process are eliminated. Preferably, the apparatus further comprises a magnification setting means for setting a desired magnification, wherein the magnification calculation means performs image reading based on the inclination angle detected by the inclination detection means and the magnification set by the magnification setting means. Calculate the magnification. Thus, after the image rotation, an image signal having the magnification set by the magnification setting means is output.

【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 commands, reports, and data 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) Document Reading When Document is Tilt Next, image reading when the document read on the document glass 18 is tilted 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部とし、読み取った原稿領域を含む長方形領
域を有効原稿領域とした場合の各辺の長さおよび座標を
算出することができる。
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.

【0021】(4)任意角回転による傾斜角補正 読み取った原稿の傾きが検出された場合に、画像を傾斜
角だけ自動的に回転して、傾かない画像を得る。したが
って、使用者が原稿を原稿ガラス上に置く場合に、誤っ
て傾いて置いた場合などにおいて、画像は自動的に傾斜
角だけ回転されるので、正常な画像が得られる。任意角
回転処理では、まず原稿のプリスキャンにより原稿を読
取り、原稿の傾き角度を検出する。そして、この傾き角
に対応して、画像読取の倍率を算出する。次に、原稿の
本スキャンで、この倍率にしたがって原稿を拡大して読
み取る。次に、こうして読み取られた画像信号に対して
傾き角度に応じて画像の傾きを補正する。得られた画像
は、正常な向きの画像である。なお、使用者が所望の複
写倍率を設定した場合は、この複写倍率と、検出された
傾き角度とから画像読取の倍率を算出する。これによ
り、任意角回転処理の後の画像は、所望の複写倍率の正
常な向きの補正画像である。本実施形態の任意角回転処
理では、2つの走査方向について画像データのシフト処
理と90°回転とを組み合わせて回転処理を行なう(式
(8)参照)。この場合、元画像のサイズを変えないよう
にするために、各走査方向についてシフト処理の後で変
倍処理(拡大と縮小)が必要である。この変倍処理にお
いて電気的変倍処理を用いると、電気変倍処理によるラ
インの挿入などにより画質の劣化が起こり、また、回転
処理に要する処理時間が多くかかる。そこで、検出され
た傾き角度に応じて読取倍率を算出し、画像読み取り時
に画像を副走査方向に光学的に拡大して原稿を読み取
る。これにより、電気変倍処理の回数が2回から1回に
減少するので、電気変倍処理による画質劣化と処理時間
の増加が少なくなる。
(4) Correction of Tilt Angle 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. In the arbitrary angle rotation processing, first, the original is read by prescanning the original, and the inclination angle of the original is detected. Then, the magnification of the image reading is calculated in accordance with the tilt angle. Next, in the actual scan of the original, the original is enlarged and read according to the magnification. Next, the inclination of the image is corrected according to the inclination angle with respect to the image signal thus read. The obtained image is an image in a normal orientation. When the user sets a desired copy magnification, the image reading magnification is calculated from the copy magnification and the detected inclination angle. Thus, the image after the arbitrary angle rotation processing is a corrected image in a normal direction at a desired copy magnification. In the arbitrary angle rotation processing according to the present embodiment, rotation processing is performed by combining image data shift processing and 90 ° rotation in two scanning directions (Equation 2).
(8)). In this case, in order to keep the size of the original image unchanged, scaling processing (enlargement and reduction) is required after the shift processing in each scanning direction. If an electric scaling process is used in this scaling process, the image quality will be degraded due to the insertion of lines by the electrical scaling process, and the processing time required for the rotation process will be long. Therefore, the reading magnification is calculated according to the detected inclination angle, and the image is optically enlarged in the sub-scanning direction when reading the image, and the original is read. As a result, the number of times of the electric scaling process is reduced from two to one, so that the image quality deterioration and the increase in the processing time due to the electric scaling process are reduced.

【0022】以下で、この任意角回転処理についてさら
に詳しく説明する。任意角回転は、画像読取により検出
された編集パラメータに基づいて、メモリユニット30
内の編集処理部307において行われる。まず、編集処
理部307について説明する。図15は、メモリユニッ
ト30内の編集処理部307の任意角回転に関連する部
分と画像メモリ304を示す。編集処理部307による
回転などの編集は、画像メモリ304を利用し、シフト
処理、X−Y変換処理およびビットスワップ処理を組み
合わせて進められる(図16、図17参照)。なお、回
転処理をしない場合(0°回転)は、破線で示すよう
に、ビットスワップ処理のみがおこなわれ、信号W2、
R2のみがアクセスされる。回転処理をする場合、伸長
部312より転送される入力画像データは、16ビット
であり、編集処理部307において、まず16→32変
換部3070で32ビットに変換される。編集処理部3
07の内部動作および画像メモリ304へのアクセスを
高速に処理するため、データ処理はすべて32ビットで
行われる。第1シフト部3071は、ビット変換後のデ
ータが必要であれば、シフト処理をし、画像メモリ30
4内の第1-1スライスエリア部3040と第1-2スラ
イスエリア部3041に書き込む。第1-1X-Y変換部
3072と第1-2X-Y変換部3073は、それぞれ、
第1-1スライスエリア部3040と第1-2スライスエ
リア部3041から読み出されたデータR1についてX
-Y変換処理をする。第2シフト部3074はX-Y変換
後のデータについて必要であればシフト処理をする。第
1ビットスワップ部3075は、16→32変換部30
70からのデータまたは第2シフト部3074からのデ
ータを必要であればビットスワップ処理をし、画像メモ
リ304内の編集用の仮想用紙エリア3042(最大で
A3サイズの容量)に書き込む。第2X-Y変換部30
76は、プリント出力時に、必要であれば第2ビットス
ワップ部3077により、画像メモリ304内のプリン
ト出力用の仮想用紙エリア3042から読み出したR2
データのX-Y変換処理をして、画像メモリ304内の
第2スライスエリア3043に書き込む。プリント出力
動作時に仮想用紙エリア3042から読み出されたR2
データまたは第2スライスエリア3043から読み出さ
れたR3データは、32→1変換部3078により1ビ
ットに変換され、多値化処理部308へ転送される。連
続動作時には、画像メモリ304へのアクセス(信号W
1〜W3、R1〜R3)は、32ビットバスラインにて
時分割で並列処理される。
Hereinafter, the arbitrary angle rotation processing will be described in more detail. The arbitrary angle rotation is performed based on the editing parameters detected by the image reading.
In the editing processing unit 307. First, the editing processing unit 307 will be described. FIG. 15 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 (see FIGS. 16 and 17). When the rotation processing is not performed (0 ° rotation), only the bit swap processing is performed as shown by the broken line, and the signal W2,
Only R2 is accessed. In the case of performing the rotation processing, the input image data transferred from the decompression unit 312 is 16 bits, and is converted into 32 bits by the 16 → 32 conversion unit 3070 in the editing processing unit 307 first. Editing unit 3
In order to process the internal operation of 07 and access to the image memory 304 at high speed, all data processing is performed in 32 bits. The first shift unit 3071 performs a shift process if the data after the bit conversion is necessary, and
4 are written to the 1-1 slice area unit 3040 and the 1-2 slice area unit 3041. The 1-1X-Y conversion section 3072 and the 1-2X-Y conversion section 3073 respectively
For data R1 read from the 1-1 slice area unit 3040 and the 1-2 slice area unit 3041, X
-Perform Y conversion processing. The second shift unit 3074 performs a shift process on the data after the XY conversion, if necessary. The first bit swap unit 3075 includes a 16 → 32 conversion unit 30
If necessary, the data from the memory 70 or the data from the second shift unit 3074 is subjected to bit swap processing, and is written into the virtual paper area 3042 for editing in the image memory 304 (capacity of A3 size at maximum). Second XY converter 30
Reference numeral 76 denotes R2 read from the virtual paper area 3042 for print output in the image memory 304 by the second bit swap unit 3077 if necessary at the time of print output.
The data is subjected to XY conversion processing and written to the second slice area 3043 in the image memory 304. R2 read from virtual paper area 3042 during print output operation
The data or the R3 data read from the second slice area 3043 is converted into one bit by the 32 → 1 conversion unit 3078 and transferred to the multi-value processing unit 308. During continuous operation, access to the image memory 304 (signal W
1 to W3, R1 to R3) are processed in parallel on a 32-bit bus line in a time division manner.

【0023】次に、図16を参照して、画像データの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は、対になっていて、上記の処理がダブルバッフ
ァ動作で行われる。次に、図17を参照して、第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. 17, 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.

【0024】次に、任意角回転のための回転アドレス演
算について説明する。次の式は、アフィン変換における
回転処理を示す。式(6)に示されるように、座標
(X,Y)は角度θだけ回転されて座標(U,V)にな
る。この演算は、通常は、式(7)に示すように分解さ
れ、第1シフト、変倍(拡大)、90°回転、変倍(縮
小)、第2シフト、−90°回転の組み合わせとなる。
上述の編集処理部307では、これらの処理を組み合わ
せて演算が行われる。第1シフトと第2シフトでは、Y
軸パラメータ固定でX軸パラメータのみが処理される。
Next, a description will be given of a rotation address calculation for an arbitrary angle rotation. The following equation shows a rotation process in the affine transformation. As shown in Expression (6), the coordinates (X, Y) are rotated by the angle θ to become coordinates (U, V). This operation is usually decomposed as shown in Expression (7), and is a combination of the first shift, scaling (enlargement), 90 ° rotation, scaling (reduction), 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, Y
Only the X-axis parameters are processed with the axis parameters fixed.

【数1】 (Equation 1)

【0025】また、式(6)、(8)は、副走査方向の
変倍処理を読み取り時に行うときの処理を示す。式
(8)は、副走査方向の変倍処理をおこなうときの分解
を示し、回転アドレス演算は、変倍(拡大)、第1シフ
ト、90°回転、第2シフト、変倍(縮小)、−90°
回転の組み合わせとなる。式(8)は、式(7)に比べ
て、第1シフトと変倍(拡大)の処理の順序が異なる。
Equations (6) and (8) show the processing when the variable magnification processing in the sub-scanning direction is performed at the time of reading. Equation (8) shows decomposition when performing scaling processing in the sub-scanning direction. The rotation address calculation includes scaling (enlargement), first shift, 90 ° rotation, second shift, scaling (reduction), -90 °
It becomes a combination of rotation. Equation (8) differs from Equation (7) in the order of the first shift and the scaling (enlargement) processing.

【数2】 (Equation 2)

【0026】画像データの任意角回転処理では、上述の
任意角回転のための演算に従って画像データが処理され
る。図18により、画像データの任意角回転処理(シフ
トシフト方式)を説明する。編集処理部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. The arbitrary angle rotation processing (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.

【0027】図19と図20は、上述の任意角回転処理
(シフトシフト処理)を用いた通常の回転アドレス演算
を、式(7)の右側から処理するときの様子を図式化し
たものである。まず、読取エリアの画像データは、第1
シフト部において設定された回転角度に応じた第1シフ
ト処理がなされる。その後、入力画像データのサイズに
回転処理後のデータを合わせるために、電気変倍処理
(拡大)が行われる。そして、次のシフト処理をX方向
で処理するために、−90°回転の処理がなされ、次
に、回転処理後のデータを入力画像データのサイズに合
わせるために、電気変倍処理(縮小)が行われる。次
に、2回目のシフト処理が行われる。これまでの処理
で、画像データは(90+θ)°回転した状態になるの
で,それを90°回転して、θ°回転した状態に戻す。
FIG. 19 and FIG. 20 are diagrams schematically showing a state where the normal rotation address calculation using the above-described arbitrary angle rotation processing (shift shift processing) is performed from the right side of the equation (7). . First, the image data of the reading area is the first
A first shift process is performed according to the rotation angle set in the shift unit. Thereafter, an electric scaling process (enlargement) is performed in order to match the data after the rotation process with the size of the input image data. Then, in order to process the next shift process in the X direction, a process of -90 ° rotation is performed. Next, in order to adjust the data after the rotation process to the size of the input image data, an electric scaling process (reduction) is performed. Is performed. Next, a second shift process is performed. Since the image data has been rotated by (90 + θ) ° by the processing so far, it is rotated by 90 ° and returned to the state rotated by θ °.

【0028】図21と図22は、上述の任意角回転処理
(シフトシフト処理)を用いた、副走査方向の変倍をす
る場合の回転アドレス演算を、式(8)の右側から処理
するときの様子を図式化したものである。まず、読取エ
リアの画像データは、入力画像データのサイズに回転処
理後のデータを合わせるために、読み取り時の副走査変
倍処理により、Y方向にcos-1θ倍拡大される。次に、
第1シフト部において設定された回転角度に応じた第1
シフト処理がなされる。そして、次のシフト処理をX方
向で処理するために、−90°回転の処理がなされる。
次に、回転処理後のデータを入力画像データのサイズに
合わせるために、電気変倍処理(縮小)が行われる。次
に、2回目のシフト処理が行われる。これまでの処理
で、画像データは(90+θ)°回転した状態になるの
で,それを90°回転して、θ°回転した状態に戻す。
FIGS. 21 and 22 show the case where the rotation address calculation for changing the magnification in the sub-scanning direction using the above-described arbitrary angle rotation processing (shift shift processing) is performed from the right side of equation (8). Is a diagrammatic representation of the situation. First, the image data in the reading area is enlarged by cos −1 θ times in the Y direction by a sub-scanning magnification process during reading in order to match the data after the rotation process with the size of the input image data. next,
The first shift unit according to the rotation angle set in the first shift unit
Shift processing is performed. Then, in order to process the next shift process in the X direction, a process of -90 ° rotation is performed.
Next, in order to adjust the data after the rotation processing to the size of the input image data, an electric scaling process (reduction) is performed. Next, a second shift process is performed. Since the image data has been rotated by (90 + θ) ° by the processing so far, it is rotated by 90 ° and returned to the state rotated by θ °.

【0029】(5)複写機の制御 以下に本複写機の制御のフローを説明する。図23は、
操作パネルを制御する第1CPU101のメインフロー
チャートである。電源が投入されると、まず、RAMや
レジスタなどを初期化する初期設定を行なう(ステップ
S11)。その後、1ルーチンの長さを規定する内部タ
イマーをセットし(ステップS12)、キー操作を受け
付けるキー入力処理をし(ステップS13)、キー操作
に応じた表示を行なうパネル表示処理をする(ステップ
S14)。そして、傾斜角回転処理のためチョイス設定
処理をする(ステップS15)。さらに、その他の処理
をした後(ステップS16)、内部タイマーの終了を待
って(ステップS17でYES)、ステップS12に戻
り、上述の処理をくり返す。また、適時に割り込み処理
として、他のCPUとの通信をおこなう。
(5) 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, a choice setting process is performed for the tilt angle rotation process (step S15). Further, after performing other processing (step S16), the process waits for the end of the internal timer (YES in step S17), returns to step S12, and repeats the above processing. In addition, communication with another CPU is performed as interrupt processing at an appropriate time.

【0030】図24と図25は、画像信号処理部20を
制御する第2CPU102のメインフローチャートであ
る。RAMやレジスタなどを初期化する初期設定をおこ
なった後(ステップS21)、1ルーチンの長さを規定
する内部タイマーをセットする(ステップS22)。次
に、画像読込制御をする。スキャンが開始されると(ス
テップS23でYES)、次に、プリスキャンであるか
否かを判断する(ステップS24)。プリスキャンであ
れば、副走査倍率を1に設定し(ステップS25)、画
像データを入力し(ステップS26)、原稿を検出する
(ステップS27、図26参照)。そして、傾き角度θ
に基づいた倍率を副走査倍率として算出する(ステップ
S28)。そして、その他の処理をし(ステップS2
9)、次に、内部タイマーの終了を待って(ステップS
2AでYES)、ステップS22に戻り、上述の処理を
くり返す。また、プリスキャンでなければ、すなわち、
本スキャンであれば、図25において、まず、ステップ
S28で算出された副走査倍率を設定し(ステップS2
B、図36参照)、画像データを入力し(ステップS2
C)、原稿を検出し(ステップS2D)、画像処理をし
て(ステップS2E)、データを出力する(ステップS
2F)。そして、その他の処理をし(ステップS2
9)、次に、内部タイマーの終了を待って(ステップS
2AでYES)、ステップS22に戻り、上述の処理を
くり返す。
FIGS. 24 and 25 are main flowcharts of the second CPU 102 for controlling the image signal processing section 20. After the initial setting for initializing the RAM and the registers is performed (step S21), an internal timer that defines the length of one routine is set (step S22). Next, image reading control is performed. When the scan is started (YES in step S23), it is determined whether or not a pre-scan is performed (step S24). If it is a pre-scan, the sub-scanning magnification is set to 1 (step S25), image data is input (step S26), and a document is detected (step S27, see FIG. 26). And the tilt angle θ
Is calculated as the sub-scanning magnification (step S28). Then, other processing is performed (step S2).
9) Next, wait for the end of the internal timer (step S).
2A), returns to step S22, and repeats the above processing. Also, if it is not pre-scan,
In the case of the main scan, in FIG. 25, first, the sub-scanning magnification calculated in step S28 is set (step S2).
B, see FIG. 36) and input image data (step S2).
C), a document is detected (Step S2D), image processing is performed (Step S2E), and data is output (Step S2).
2F). Then, other processing is performed (step S2).
9) Next, wait for the end of the internal timer (step S).
2A), returns to step S22, and repeats the above processing.

【0031】図26は、原稿検出処理(図24、ステッ
プS27、図25、ステップS2D)のフローチャート
である。まず、原稿画像のデータから辺、座標を抽出
し、原稿の読取領域からのはみ出しを検出する(ステッ
プS251)。さらに、角度検出(ステップS252、
図27〜図28参照)、サイズ検出(ステップS25
3、図29〜図31参照)、サイズ設定(ステップS2
54、図32参照)、回転座標設定(ステップS25
5、図33参照)、デスティネーション設定(ステップ
S256、図34参照)、90°回転デスティネーショ
ン設定(ステップS257、図35参照)、および、そ
の他の処理(ステップS258)を順次おこなう。(な
お、プリスキャンの場合は、ステップS254〜S25
7の処理はなされない。) この処理において、読取領域からはみ出して置かれてい
る場合でも、原稿が存在する領域(原稿領域)を画像デ
ータから検出し、検出した原稿領域の座標から各辺を抽
出して長方形であることを仮定して原稿の4隅を推定す
る。次に、任意角回転のための各種パラメータを決定す
る。パラメータには、以下のものが含まれる。傾斜角
(回転角)θ(ステップS252参照)は、有効原稿領
域の傾きを表す。有効原稿領域サイズspx,spy
(ステップS253参照)は、検出された原稿のサイズ
(原稿が傾いていないとしたときのx方向とy方向)を
表すパラメータである。なお、サイズcpx,cpy
は、画像データを展開するための仮想用紙エリアを設定
するサイズパラメータ(x方向とy方向)である。用紙
サイズ(ステップS254参照)は、通常は、有効原稿
領域を含む最小定形用紙サイズである。回転座標rot
_x,rot_y(ステップS255参照)は、読取領域
の原点を基準とした回転中心となる座標(x方向とy方
向)を表す。たとえば、図14の例では、左上隅を読取
領域の原点としているので、回転座標rot_x,ro
t_yは、原点に最も近い左上有効原稿領域10(破線
で表す)の隅を表し、原稿のずれを表す量である。デス
ティネーション(ずれ量)pmdax,pmday(ス
テップS256参照)は、回転座標から仮想用紙エリア
の原点に対する座標を表し、画像データを仮想用紙エリ
アに展開するときに、デスティネーションだけ座標を移
動して、仮想用紙エリアの原点から画像データを展開す
る。なお、90°回転パラメータ(ステップS257参
照)は、画像を90°回転するときに用いるパラメータ
である。求められた各種パラメータは、画像メモリに対
する編集制御(図38参照)において設定される。
FIG. 26 is a flowchart of the document detection process (FIG. 24, step S27, FIG. 25, step S2D). First, sides and coordinates are extracted from the data of the document image, and a protrusion from the reading area of the document is detected (step S251). Further, angle detection (step S252,
27 to 28), size detection (step S25)
3, see FIGS. 29 to 31), size setting (step S2)
54, refer to FIG. 32), setting the rotation coordinates (step S25)
5, see FIG. 33), destination setting (step S256, see FIG. 34), 90 ° rotation destination setting (step S257, see FIG. 35), and other processing (step S258). (In the case of pre-scan, steps S254 to S25
7 is not performed. 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. And 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) θ (see step S252) represents the tilt of the effective document area. Effective document area size spx, spy
(See 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 (see step S254) is usually the minimum standard paper size including the effective document area. Rotation coordinates rot
_x and rot_y (see step S255) represent coordinates (x direction and y direction) that are the rotation center with respect to the origin of the reading area. 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, ro
t_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 (refer to 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 by the destination only. The image data is developed from the origin of the virtual paper area. The 90 ° rotation parameter (see step S257) is a parameter used when rotating an image by 90 °. The various parameters obtained are set in editing control for the image memory (see FIG. 38).

【0032】図27は、角度検出(図26、ステップS
252)のフローチャートである。まず、原稿領域の各
辺a、b、c、dよりそれぞれ角度θa、θb、θc、θd
を検出する(ステップS2521、図28参照)。角度
検出が終了したら実際の回転処理に用いる角度を選定す
る。もしすべての角度θa、θb、θc、θdがすべて誤っ
ている場合(ステップS2522でYES)、または、
θa≒θb≒θc≒θd(誤った角度を除く)でない場合
(ステップS2525でNO)、すなわち、4辺より検
出した角度のうち、他と著しく異なるものがある場合、
すなわち、長方形でない場合、size_errを1と
して任意角回転を禁止するとともに(ステップS252
3)、θをθ0とする(ステップS2523)。また、
θa≒θb≒θc≒θd(誤った角度を除く)であるが(ス
テップS2525でYES)、θa≒θb≒θc≒θd>0
(誤った角度を除く)でない場合(ステップS2526
でNO)、θをθ0とする(ステップS2524)。以
上の条件にあてはまらない場合(ステップS2526で
YES)、辺a〜dの長さを比較し(ステップS252
7)、読取領域から抽出した辺a、b、c、dのうち最
も長い辺から算出した角度θa、θb、θcまたはθdを角
度θとして採用する(ステップS2527a〜S247
d)。そして、その他の設定(ステップS2528)を
して、リターンする。
FIG. 27 shows the angle detection (FIG. 26, 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 FIG. 28). When the angle detection is completed, the angle used for the actual rotation processing is selected. If all the angles θ a , θ b , θ c , θ d are incorrect (YES in step S2522), or
If it is not θ a ≒ θ b ≒ θ c ≒ θ d (excluding an incorrect angle) (NO in step S2525), that is, if there is an angle detected from the four sides that is significantly different from the others,
In other words, if it is not a rectangle, size_err is set to 1 and the arbitrary angle rotation is prohibited (step S252).
3), θ is set to θ 0 (step S2523). Also,
θ a ≒ θ b ≒ θ c ≒ θ d (excluding wrong angles) (YES in step S2525), but θ a ≒ θ b ≒ θ c ≒ θ d > 0
If not (excluding wrong angle) (step S2526)
Is NO), and θ is set to θ 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 S252).
7), the side a extracted from the read area, b, c, the angle was calculated from the longest side of d theta a, theta b, a theta c or theta d adopted as an angle theta (step S2527a~S247
d). Then, other settings (step S2528) are performed, and the process returns.

【0033】図28は、図27のステップS2521に
おいて辺aに基づく角度θa検出のフローチャートであ
る。辺a>0でない場合(ステップS25211aでN
O)、角度θaをerrとして(ステップS25219
a)、リターンする。辺a>0である場合(ステップS
25211aでYES)、次に原稿がはみ出しているか
を判断する。Ymin=Ymin0である場合、すなわち、辺
eが存在する場合(ステップS25212a)、X11
1とする(ステップS25213a)。また、Xmax
max0である場合、すなわち、辺gが存在する場合(ス
テップS25214a)、Y20をY2とする(ステップ
S25215a)。そして、(Y2−Ymin)と(Xmax
−X1)の長さを比較し(ステップS25216a)、
回転角θの小さくなるような回転方向に決定する。すな
わち、(Y2−Ymin)<(Xmax−X1)であるとき、ta
n-1{(Xmax−X1)/(Y2−Ymin)}を角度θとし(ス
テップS25217a)、(Y2−Ymin)<(Xmax
1)でないとき、tan-1{(Y2−Ymin)/(Xmax
1)}を角度θとする(ステップS25218a)。角
度θb、θc、θdも角度θaと同様に検出されるが説明
を省略する。
FIG. 28 is a flowchart for detecting the angle θa based on the side a in step S2521 in FIG. If the side a> 0 is not satisfied (N in step S25211a
O), the angle theta a as err (step S25219
a) Return. If side a> 0 (step S
Next, it is determined whether or not the original protrudes. If a Y min = Y min0, i.e., if the edge e is present (step S25212a), the X 11 and X 1 (step S25213a). Also, X max =
If a 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 S25216a),
The rotation direction is determined so that the rotation angle θ becomes smaller. That is, when (Y 2 −Y min ) <(X max −X 1 ), ta
n -1 {(X max -X 1 ) / (Y 2 -Y min)} was an angle theta (step S25217a), (Y 2 -Y min ) <(X max -
X 1 ), tan -1 {(Y 2 −Y min ) / (X max
X 1 )} is set to the angle θ (step S25218a). The angles θ b , θ c , and θ d are detected in the same manner as the angle θa, but the description is omitted.

【0034】図29は、サイズ検出(図26、ステップ
S253)のフローチャートである。原稿用紙のサイズ
は、傾斜角と読取領域内の原稿用紙の辺の長さとから読
取領域外の辺の長さを設定し、それに基づいて検出され
る。ここで、spxとspyは、設定されるべき原稿用
紙のx方向とy方向のサイズである。size_err
=1である場合は(ステップS2531でNO)、原稿
の辺が正常に検出できなかったので、角度θをθ0とし
て(ステップS2535)、通常原稿サイズの検出をお
こなう(ステップS2536)。そして、spxをsp
x3に設定し、spyをspy3に設定し(ステップS
2537)、その他の設定をする(ステップS253
8)。size_err=1でない場合は(ステップS
2531でYES)、傾き原稿サイズの検出を行なう
(ステップS2532、図41参照)。そして、spx
1とspx2およびspy1とspy2の長さを比較し
(ステップS2533)、著しく異なっている場合は
(ステップS2533でNO)、ステップS2535に
進み、通常原稿サイズの検出をおこなう。そうでない場
合は(ステップS2533でYES)、spx1をsp
xに設定し、spy1をspyに設定し(ステップS2
534)、その他の設定をする(ステップS253
8)。
FIG. 29 is a flowchart of the size detection (FIG. 26, step S253). The size of the document sheet is detected based on the inclination angle and the length of the side of the document sheet in the reading area, 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_err
= If it is 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 is sp
x3 and set spy to spy3 (step S
2537), and make other settings (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. 41). 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 original size. If not (YES in step S2533), spx1 is replaced by sp
x, and spy1 is set to spy (step S2).
534), and make other settings (step S253)
8).

【0035】図30は、傾き原稿サイズ検出(図29、
ステップ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)。図31
は、通常原稿サイズ検出(図29、ステップS253
6)のフローチャートである。Xmaxをspx3に代入
し(ステップS25361)、Ymaxをspy3に代入
する(ステップS25362)。
FIG. 30 shows the detection of the skewed original size (FIG. 29,
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. 29, 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).

【0036】図32は、サイズ設定(図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. 32 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.

【0037】図33は、回転座標設定(図26、ステッ
プ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. 33 is a flowchart for setting the rotational coordinates (FIG. 26, 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.

【0038】図34は、デスティネーション設定(図2
6、ステップS256)のフローチャートである。デス
ティネーションは、仮想用紙に展開する入力画像の読取
領域原点に対応する(仮想用紙原点を基準とした)座標
pmdax、pmdayとする。仮想用紙エリアが定型
サイズに設定されているのに対し、原稿検出から各辺を
抽出することにより決定した入力画像サイズがそれと一
致しているとは限らない。そのため、読取基準側(回転
中心側)を優先に、抽出した2以上の辺がある場合、隣
り合った2辺が抽出できた隅が仮想用紙エリアの隅に合
致するように、その2辺と設定した用紙サイズとからデ
スティネーション(平行移動量)を設定する。ここで、
spx、spyは、検出された原稿用紙のサイズであり
(図40参照)、cpx、cpyは仮想用紙エリア30
42の設定サイズを表し、rot_xとrot_yは、読
取領域の原点を基準とした回転中心をあらわす座標であ
る(図33参照)。まず、角度θ>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. 34 shows a destination setting (FIG. 2).
6, 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. 40), 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. 33). 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).

【0039】また、角度θ>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).

【0040】図35は、90°回転のデスティネーショ
ン設定(図26、ステップ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枚にコピーする節約コピーなどと組み合わ
せる場合、それを考慮した設定をすることも可能であ
る。図36は、副走査倍率設定(図25、ステップS2
B)のフローチャートである。まず、原稿サイズ検出の
角度検出処理により求められている傾き角度からcosθ
を副走査方向の読取倍率として算出する(ステップS2
B1)。また、使用者により複写倍率が設定されている
場合は、その副走査倍率と掛け合わせた読取倍率を副走
査倍率に設定する(ステップS2B2)。その後、その
他の処理をして(ステップS2B3)、リターンする。
FIG. 35 is a flowchart of the destination setting for 90 ° rotation (FIG. 26, 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. FIG. 36 shows the setting of the sub-scanning magnification (FIG. 25, step S2).
It is a flowchart of B). First, cosθ is calculated from the inclination angle obtained by the angle detection process of document size detection.
Is calculated as the reading magnification in the sub-scanning direction (step S2).
B1). If the copying magnification has been set by the user, the reading magnification multiplied by the sub-scanning magnification is set as the sub-scanning magnification (step S2B2). Thereafter, other processing is performed (step S2B3), and the process returns.

【0041】図37は、メモリユニット部30を制御す
る第3CPU103のメインフローチャートである。ま
ずRAMやレジスタなどを初期化する初期設定をおこな
う(ステップS31)。次に、コマンド受信処理(ステ
ップS32)、ステータス送信処理(ステップS3
3)、画像メモリ書き込み処理(ステップS34)、圧
縮制御処理(ステップS35)、伸長制御処理(ステッ
プS36)、編集制御処理(ステップS37)、スムー
ジング制御処理(ステップS38)、画像メモリ読み出
し処理(ステップS39)、および、その他の処理(ス
テップS3A)をする。次に、ステップS32に戻り、
上述の処理をくり返す。
FIG. 37 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), smoothing control processing (step S38), image memory read processing (step S38) S39) and other processing (step S3A). Next, returning to step S32,
The above processing is repeated.

【0042】図38は、編集制御(図37、ステップS
37)のフローチャートである。プリント用のデータの
準備がすんだら(ステップS371でYES)、サイズ
パラメータ(cpx,cpy)、(spx,spy)を
設定し(ステップS372)、90°単位回転パラメー
タ(90θ)を設定し(ステップS373)、任意角回
転パラメータθを設定し(ステップS374)、回転座
標パラメータを設定し(ステップS375)、デスティ
ネーションパラメータ(pmdax、pmday)を設
定する(ステップS376)。そして、他のパラメータ
を設定して(ステップS377)、リターンする。
FIG. 38 shows the editing control (FIG. 37, step S
37 is a flowchart of FIG. When the data for printing has been prepared (YES in step S371), the size parameters (cpx, cpy) and (spx, spy) are set (step S372), and the 90 ° unit rotation parameter (90θ) is set (step S371). (S373), the arbitrary angle rotation parameter θ is set (step S374), the rotation coordinate parameter is set (step S375), and the destination parameter (pmdx, pmday) is set (step S376). Then, other parameters are set (step S377), and the process returns.

【0043】図39は、プリンタ部を制御する第4CP
U104のメインフローチャートである。RAMやレジ
スタなどを初期化する初期設定をおこなった後(ステッ
プS41)、1ルーチンの長さを規定する内部タイマー
をセットする(ステップS42)。次に、現像・転写系
の制御(ステップS43)、搬送系の制御(ステップS
44)、定着系の制御(ステップS45)、印字処理部
の制御(ステップS46)をする。そして、その他の処
理をする(ステップS47)。次に、内部タイマーの終
了を待って(ステップS48でYES)、ステップS4
2に戻り、上述の処理をくり返す。図40は、複写機全
体の制御を統括する第5CPU105のメインフローチ
ャートである。RAMやレジスタなどを初期化する初期
設定をおこなった後(ステップS51)、1ルーチンの
長さを規定する内部タイマーをセットする(ステップS
52)。次に、他のCPUからの入力データをチェック
する入力データ解析処理(ステップS53)、操作内容
に応じて動作モードを定めるモード設定処理(ステップ
S54)、割り込み切換処理(ステップS55)、モー
ドに応じたコマンド設定処理(ステップS56)、コマ
ンドを通信ポートに待機させる出力データ設定(ステッ
プS57)、および、その他の処理(ステップS58)
をする。次に、内部タイマーの終了を待って(ステップ
S59でYES)、ステップS52に戻り、上述の処理
をくり返す。
FIG. 39 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. 40 is a main flowchart of the fifth CPU 105 for controlling 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.

【0044】以上で、原稿読取装置から入力した画像デ
ータの任意角回転処理について述べたが、同様にネット
ワーク上の外部機器から通信される画像データ(角度パ
ラメータ付き)を処理することも可能である。たとえ
ば、外部機器から入力される画像データについて任意角
回転処理をして印字処理部で印字できる。また、画像読
取装置で読み取った画像データについて任意角回転処理
をして外部機器に出力できる。また、外部機器から入力
される画像データについて任意角回転処理をして再び外
部機器に出力できる。
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) communicated 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.

【0045】[0045]

【発明の効果】原稿が原稿ガラス上に傾いて置かれた場
合、原稿の傾き角補正処理において、検出された原稿の
傾き角に応じて算出された倍率で原稿を光学的に読み取
るので、電気的変倍の回数が減少する。したがって、電
気変倍による処理時間の増加と、電気変倍処理のライン
挿入などによる画質の劣化がなくなり、また、画質の良
好な補正画像が高速に生成される。
According to the present invention, when a document is placed on the document glass at an angle, the document is optically read at a magnification calculated in accordance with the detected document tilt angle in the document tilt angle correction process. The number of times of variable magnification is reduced. Accordingly, an increase in processing time due to electric scaling and deterioration in image quality due to insertion of lines in the electric scaling processing are eliminated, and a corrected image with good image quality is generated at high speed.

【図面の簡単な説明】[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 a part of a process of simultaneously performing an arbitrary angle rotation process (shift shift process) and a scaling process on image data.

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

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

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

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

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

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

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

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

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

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

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

【図27】 はみ出し検出のフローチャートである。FIG. 27 is a flowchart of protrusion detection.

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

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

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

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

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

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

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

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

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

【図37】 副走査方向倍率設定のフローチャートであ
る。
FIG. 37 is a flowchart for setting a magnification in the sub-scanning direction.

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

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

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

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

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

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 原稿ガラス上に置かれている原稿の傾き
角度を検出する傾き検出手段と、 前記傾き検出手段により検出された傾き角度により、画
像読取の倍率を算出する倍率算出手段と、 前記倍率算出手段により算出された倍率にしたがって画
像を拡大して原稿を読み取り画像信号に変換して出力す
る画像読取手段と、 前記画像読取手段により読み取られた画像信号につい
て、前記傾き検出手段により検出された傾き角度に応じ
て画像の傾きを補正した画像信号を出力する傾き補正手
段とを備えることを特徴とする画像処理装置。
An inclination detecting means for detecting an inclination angle of an original placed on an original glass; a magnification calculating means for calculating an image reading magnification based on the inclination angle detected by the inclination detecting means; Image reading means for enlarging an image according to the magnification calculated by the magnification calculation means, reading the original, converting the read image signal into an image signal, and outputting the image signal; and detecting the image signal read by the image reading means, by the inclination detecting means. And an inclination correcting unit for outputting an image signal in which the inclination of the image is corrected according to the inclination angle.
【請求項2】 前記の倍率は副走査方向の画像読取の倍
率であることを特徴とする請求項1に記載された画像処
理装置。
2. The image processing apparatus according to claim 1, wherein the magnification is a magnification for reading an image in a sub-scanning direction.
【請求項3】 請求項1に記載された画像処理装置にお
いて、さらに、 所望の倍率を設定する倍率設定手段を備え、 前記倍率算出手段は、前記傾き検出手段により検出され
た傾き角度と、前記の倍率設定手段で設定された倍率と
より画像読取の倍率を算出することを特徴とする画像処
理装置。
3. The image processing apparatus according to claim 1, further comprising a magnification setting unit configured to set a desired magnification, wherein the magnification calculation unit includes: a tilt angle detected by the tilt detection unit; An image processing apparatus for calculating an image reading magnification based on a magnification set by a magnification setting unit.
JP9149468A 1997-06-06 1997-06-06 Image processor Pending JPH10341331A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP9149468A JPH10341331A (en) 1997-06-06 1997-06-06 Image processor
US09/092,234 US6191405B1 (en) 1997-06-06 1998-06-05 Image processing apparatus including image rotator for correcting tilt of the image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9149468A JPH10341331A (en) 1997-06-06 1997-06-06 Image processor

Publications (1)

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

Family

ID=15475802

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9149468A Pending JPH10341331A (en) 1997-06-06 1997-06-06 Image processor

Country Status (1)

Country Link
JP (1) JPH10341331A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007081486A (en) * 2005-09-09 2007-03-29 Ricoh Co Ltd Image forming apparatus, image processing apparatus, image output apparatus, mobile terminal, image processing system, image forming method, image processing method, image output method, image forming program, image processing program, and image output program
JP2010220060A (en) * 2009-03-18 2010-09-30 Casio Computer Co Ltd Image processing apparatus, program, method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007081486A (en) * 2005-09-09 2007-03-29 Ricoh Co Ltd Image forming apparatus, image processing apparatus, image output apparatus, mobile terminal, image processing system, image forming method, image processing method, image output method, image forming program, image processing program, and image output program
JP2010220060A (en) * 2009-03-18 2010-09-30 Casio Computer Co Ltd Image processing apparatus, program, method and system

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
JP3226109B2 (en) Image processing device
US6477282B1 (en) Image forming device
US20040046972A1 (en) Image processing apparatus, image processing apparatus administration information display method, system, program and storage medium
JP3435043B2 (en) Image forming device
EP0797344B1 (en) Image forming system
US6256107B1 (en) Image forming system including interconnected and priority allocated image forming devices
JPH0937028A (en) Image processor
JPH09130577A (en) Image forming device
JP3354227B2 (en) Digital copier operation control method
JP4981000B2 (en) Image concealment method and image forming apparatus
US7679768B2 (en) Image processing apparatus and method
JPH10341332A (en) Image-forming device
JP3814995B2 (en) Image forming apparatus
EP0395402A2 (en) Image processing system
JPH10276316A (en) Image forming device
JPH10341331A (en) Image processor
JPH10276317A (en) Image forming device
JPH10341330A (en) Image-forming device
JP3658924B2 (en) Image forming apparatus
JP2005111852A (en) Imaging device, printing control method and program
JPH10276318A (en) Image forming device
JPH11109793A (en) Image forming device