JP2005124071A - Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program - Google Patents

Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program Download PDF

Info

Publication number
JP2005124071A
JP2005124071A JP2003359581A JP2003359581A JP2005124071A JP 2005124071 A JP2005124071 A JP 2005124071A JP 2003359581 A JP2003359581 A JP 2003359581A JP 2003359581 A JP2003359581 A JP 2003359581A JP 2005124071 A JP2005124071 A JP 2005124071A
Authority
JP
Japan
Prior art keywords
data
image processing
image
unit
memory
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
JP2003359581A
Other languages
Japanese (ja)
Inventor
Atsushi Otani
篤志 大谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2003359581A priority Critical patent/JP2005124071A/en
Publication of JP2005124071A publication Critical patent/JP2005124071A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storing Facsimile Image Data (AREA)
  • Image Input (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a buffer management processing burden in image data processing for the unit of a predetermined rectangular shape by ensuring an intermediate buffer for the rectangular shape unit adaptively for the set condition such as an image processing mode, and optimizing the size of the intermediate buffer between blocks in accordance with processing contents and capability. <P>SOLUTION: An intermediate buffer for temporarily storing processing data for data write processing or data read processing for the unit of the predetermined rectangular shape is secured in a main memory 100, the amount of stored data on the intermediate buffer is monitored and on the basis of the stored data amount, buffer arbitration sections 77, 78 arbitrates data write processing or data read processing for the unit of the predetermined rectangular shape due to a DMAC 91 onto the intermediate buffer. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、メインメモリに確保され、処理データを一時滞留させる中間バッファと、前記中間バッファの前段に配置され、入力される画像データを所定の矩形形状単位で加工して前記中間バッファへの入力データを生成する第1の画像処理ブロックと、前記中間バッファの後段に配置され、前記中間バッファから読み出したデータを加工する第2の画像処理ブロックとを備える画像処理装置および画像処理方法およびコンピュータが読み取り可能なプログラムを格納した記憶媒体およびプログラムに関するものである。   The present invention provides an intermediate buffer that is secured in a main memory and temporarily stores processing data, and is arranged in a preceding stage of the intermediate buffer. The input image data is processed in a predetermined rectangular unit and input to the intermediate buffer. An image processing apparatus, an image processing method, and a computer comprising: a first image processing block that generates data; and a second image processing block that is arranged after the intermediate buffer and that processes data read from the intermediate buffer. The present invention relates to a storage medium storing a readable program and a program.

図35は、従来の画像処理装置におけるスキャナ画像処理回路・記録画像処理回路の構成を示すブロック図である。   FIG. 35 is a block diagram showing a configuration of a scanner image processing circuit / recorded image processing circuit in a conventional image processing apparatus.

図35に示すように、画像読み取りデバイスとしては、CCD(Charged Coupled Device)2010またはCIS(Contact Image Sensor)2110といった光学素子が用いられ、主走査方向のライン単位に所定の出力形式に従ったデータが、それぞれCCDインタフェース(CCDi/f)回路2000、CISインタフェース(CISi/f)回路2100によりA/D変換され、メインメモリ2200に格納される。   As shown in FIG. 35, an optical element such as a CCD (Charged Coupled Device) 2010 or a CIS (Contact Image Sensor) 2110 is used as an image reading device, and data in accordance with a predetermined output format for each line in the main scanning direction. Are A / D converted by the CCD interface (CCDi / f) circuit 2000 and the CIS interface (CISi / f) circuit 2100, respectively, and stored in the main memory 2200.

この場合、CCD2010はR、G、Bに対応したデータがそれぞれパラレルに出力されるの対し、CIS2110から出力される信号はLEDの点灯順位に従い、R、G、Bのデータがシリアルに出力されるという、出力データの特性の相違により、それぞれ専用のインタフェース回路が設けられ、所定のA/D変換処理を経て、読み取られた画像データがメインメモリ(SDRAM)2200内の中間バッファ2200−1に格納される構成となっていた。   In this case, the CCD 2010 outputs data corresponding to R, G, B in parallel, whereas the signal output from the CIS 2110 outputs R, G, B data serially according to the lighting order of the LEDs. Due to the difference in the characteristics of the output data, a dedicated interface circuit is provided, and the read image data is stored in the intermediate buffer 2200-1 in the main memory (SDRAM) 2200 through a predetermined A / D conversion process. It became the composition to be.

LBP記録系では圧縮データをメモリより読み出し、伸長後メインメモリ(SDRAM)2200内の中間バッファ2200−2に格納され、中間バッファ2200−2を介して記録画像処理を施し、LBP2530に出力する構成になっていた。   The LBP recording system reads compressed data from the memory, stores the compressed data in the intermediate buffer 2200-2 in the main memory (SDRAM) 2200, performs recording image processing via the intermediate buffer 2200-2, and outputs the processed data to the LBP 2530. It was.

図35において、読み取り系の各画像処理ブロック(シェーディング補正(SHD)2300、文字判定処理(ZSG)2320、フィルタ処理(NSF)2340(NSF),LIP2350等)には、専用のラインバッファ2400a〜2400dが設けられている。このような回路構成において、メインメモリ(SDRAM)2200内の中間バッファ2200−1に格納されたデータを、主走査方向にライン単位で読み出し、専用のラインバッファ(2400a〜2400d)に格納して、個別の画像処理を施すという構成が採られていた。   In FIG. 35, dedicated line buffers 2400a to 2400d are used for image processing blocks of the reading system (shading correction (SHD) 2300, character determination processing (ZSG) 2320, filter processing (NSF) 2340 (NSF), LIP 2350, etc.)). Is provided. In such a circuit configuration, data stored in the intermediate buffer 2200-1 in the main memory (SDRAM) 2200 is read in line units in the main scanning direction and stored in dedicated line buffers (2400a to 2400d). A configuration in which individual image processing is performed has been adopted.

記録系の各画像処理ブロック(解像度変換)には、専用のラインバッファ2510が設けられている。このような回路構成において、メインメモリ(SDRAM)2200内の中間バッファ2200−2に格納されたデータ2520を、主走査方向にライン単位で読み出し、専用のラインバッファ2510に格納して解像度変換部2500で解像度変換を行った後、LBP2530に出力印字するという構成が採られていた。   Each image processing block (resolution conversion) of the recording system is provided with a dedicated line buffer 2510. In such a circuit configuration, the data 2520 stored in the intermediate buffer 2200-2 in the main memory (SDRAM) 2200 is read line by line in the main scanning direction, stored in the dedicated line buffer 2510, and stored in the resolution converter 2500. Then, after the resolution conversion is performed, the output printing is performed on the LBP 2530.

また、中間バッファ2200−1,2200−2に対する書き込み読み出しの制御はソフトウエア上で管理していた。   Control of writing / reading on the intermediate buffers 2200-1 and 2200-2 is managed by software.

従来の方法ではメインメモリ(SDRAM)2200内の中間バッファ2200−1,2200−2を主走査ライン単位で制御するため、中間バッファ2200−1,2200−2のライン数はソフトウエアで管理する場合でも、ハードウェアの処理能力に応じてソフトウエアが制御可能なバッファ単位を2面備える処理系を取ることでバッファ容量が極端に増大することはなかった。   In the conventional method, since the intermediate buffers 2200-1 and 2200-2 in the main memory (SDRAM) 2200 are controlled in units of main scanning lines, the number of lines in the intermediate buffers 2200-1 and 2200-2 is managed by software. However, the buffer capacity does not increase extremely by adopting a processing system having two buffer units that can be controlled by software according to the processing capability of the hardware.

上記の従来例の構成を開示する先行技術としては、例えば、特許文献1〜3により開示されるものがある。   As prior art which discloses the configuration of the above-described conventional example, for example, there are those disclosed in Patent Documents 1 to 3.

特に、特許文献2には、専用のラインバッファに対して、ライン単位で書き込みを制御する調停回路についての記載がある。   In particular, Patent Document 2 describes an arbitration circuit that controls writing in line units for a dedicated line buffer.

また、特許文献3には、リング形状で使用するラインバッファの、残量検出手段についての記載がある。
特開平5−327989号公報 特開平5−284364号公報 特開平7−319799号公報
Further, Patent Document 3 describes a remaining amount detecting means for a line buffer used in a ring shape.
JP-A-5-327989 JP-A-5-284364 Japanese Patent Laid-Open No. 7-319799

しかしながら、各処理部ごとに専用のラインバッファ2400a〜2400dを持たず各画像読み取りデバイスにより読み取った画像データの中間バッファ2200−1,2200−2への格納と、画像処理部における処理を、個別のラインバッファ2200−1,2200−2の介在無しに、メインメモリ2200のデータを画像処理モードに適応した所定の単位(例えば矩形形状)に切出して、データ処理を制御する画像処理装置では、中間バッファ2200−1,2200−2からの読み出し単位が複数ライン単位となるため、ソフトウェア上でのバッファ管理を行うと、バッファメモリの増大もしくはソフトウェア処理の負荷増を招いてしまう他にハードウェア性能を活かせないと言った問題があった。   However, each processing unit does not have a dedicated line buffer 2400a to 2400d, and the image data read by each image reading device is stored in the intermediate buffers 2200-1 and 2200-2 and the processing in the image processing unit is individually performed. In an image processing apparatus that controls data processing by cutting out data in the main memory 2200 into a predetermined unit (for example, a rectangular shape) adapted to the image processing mode without the intervention of the line buffers 2200-1 and 2200-2, an intermediate buffer Since the unit of reading from 2200-1 and 2200-2 is a unit of multiple lines, performing buffer management on software may cause an increase in buffer memory or an increase in software processing load as well as use hardware performance. There was a problem that said no.

また、ハードウェアの処理能力によって中間バッファを増加させる必要があるという問題点があった。中間バッファの容量の増加はコスト負担を大きくし、画像処理装置全体の低コスト化を阻む要因となっていた。   In addition, there is a problem that it is necessary to increase the number of intermediate buffers depending on the processing capability of hardware. An increase in the capacity of the intermediate buffer increases the cost burden and hinders cost reduction of the entire image processing apparatus.

また、ソフトウエアの負荷低減のためにライン単位で中間バッファの監視を行う調停回路を構成する場合に於いても、入出力のデータ単位が矩形形状の場合には対応できない。   Further, even in the case of configuring an arbitration circuit that monitors the intermediate buffer in units of lines in order to reduce the software load, it cannot cope with the case where the input / output data units are rectangular.

本発明は、上記の問題点を解決するためになされたもので、本発明の目的は、メインメモリに確保され、処理データを一時滞留させる中間バッファと、前記中間バッファの前段に配置され、入力される画像データを所定の矩形形状単位で加工して前記中間バッファへの入力データを生成する第1の画像処理ブロックと、前記中間バッファの後段に配置され、前記中間バッファから読み出したデータを加工する第2の画像処理ブロックとを備える画像処理装置において、中間バッファ上の滞留データ量をモニタし、該滞留データ量に基づいてDMACによる中間バッファ上への所定の矩形形状単位毎のデータ書き込み処理またはデータ読み出し処理を調停することにより、設定される画像処理モード等の条件に適応して確保される矩形形状単位の中間バッファを確保して、各ブロック間の中間バッファのサイズを処理内容と能力に応じて最適化して、所定の矩形形状単位の画像データ処理時におけるバッファ管理処理負担を軽減して効率よく画像処理を行える安価な画像処理装置および画像処理方法およびコンピュータが読み取り可能なプログラムを格納した記憶媒体およびプログラムを提供することである。   The present invention has been made in order to solve the above-described problems. The object of the present invention is to secure an intermediate buffer that is secured in a main memory and temporarily stores processing data, and is arranged in the preceding stage of the intermediate buffer. A first image processing block for processing input image data in a unit of a predetermined rectangular shape to generate input data to the intermediate buffer, and processing the data read from the intermediate buffer, which is arranged after the intermediate buffer In the image processing apparatus including the second image processing block, the amount of staying data on the intermediate buffer is monitored, and data writing processing for each predetermined rectangular shape unit on the intermediate buffer by the DMAC based on the amount of staying data Or a rectangular unit that can be secured by adapting the conditions such as the set image processing mode by arbitrating the data reading process By securing an intermediate buffer and optimizing the size of the intermediate buffer between each block according to the processing content and capability, it reduces the burden of buffer management processing when processing image data in units of a predetermined rectangular shape and efficiently performs image processing. An inexpensive image processing apparatus, image processing method, and storage medium storing a computer-readable program and a program are provided.

本発明に係る第1の発明は、画像入力手段によって入力された前記画像データを主走査方向にそって、順次メモリに書き込む書込手段(図1に示す画像処理DMAC91)と、前記書き込み手段によって前記メモリに書き込まれた前記画像データが所定の副走査幅分蓄積されたかどうか判断する判断手段と、メモリに書き込まれた前記画像データを主走査方向に所定の主走査幅で分割し、前記所定の主走査幅と前記所定の副走査幅からなる矩形形状単位で前記画像データを前記メモリから画像処理手段に出力するために画像を読み出す読出手段(図1に示す画像処理DMAC91)と、前記メモリに蓄積された前記画像データ量が前記矩形形状で読出し可能であるかどうかに基づいて、前記読出手段により前記矩形形状での読出しを行うよう調停する調停手段(図1に示すバッファ調停部77)を有することを特徴とする。   According to a first aspect of the present invention, a writing unit (image processing DMAC 91 shown in FIG. 1) that sequentially writes the image data input by the image input unit in a memory along the main scanning direction, and the writing unit. Determining means for determining whether or not the image data written in the memory has been accumulated for a predetermined sub-scanning width; and dividing the image data written in the memory by a predetermined main scanning width in the main scanning direction; Reading means (image processing DMAC 91 shown in FIG. 1) for reading out the image data in order to output the image data from the memory to the image processing means in units of a rectangular shape having the main scanning width and the predetermined sub-scanning width; and the memory Based on whether the amount of image data stored in the image can be read out in the rectangular shape, the reading means reads out the rectangular shape. Characterized in that it has an arbitration unit for stop (buffer arbitration unit 77 shown in FIG. 1).

本発明に係る第2の発明は、前記メモリに蓄積された前記画像データ量を計数する計数手段を有し、前記書込手段が主走査方向に1ラインの前記画像データが書き込まれるごとに前記計数手段をカウントアップし、前記読出手段が、前記矩形形状単位ごとに主走査方向に前記1ライン分読み出すごとに所定数減算することを特徴とする。   According to a second aspect of the present invention, there is provided a counting means for counting the amount of the image data stored in the memory, and the writing means writes the image data for one line in the main scanning direction each time the image data is written. The counting means counts up, and the reading means subtracts a predetermined number every time one line is read in the main scanning direction for each rectangular unit.

本発明に係る第3の発明は、前記画像入力手段によって入力された画像データを前記画像入力手段の入力方式に従って一時的に蓄積する蓄積手段を有し、前記書込手段は、前記蓄積手段に蓄積された画像データを前記画像入力手段の入力方式にしたがって前記メモリに書き込み動作を行い、前記読出手段は前記画像入力手段の入力方式によらずに読み出すことを特徴とする。   According to a third aspect of the present invention, there is provided storage means for temporarily storing the image data input by the image input means according to the input method of the image input means, and the writing means is stored in the storage means. The stored image data is written into the memory according to the input method of the image input means, and the reading means reads out regardless of the input method of the image input means.

本発明に係る第4の発明は、前記調停手段は、残量検出部を備え、前記メモリのフル状態が発生すると、前記書込手段に対して停止信号を出力し、書き込み側の動作を停止させること特徴とする。   According to a fourth aspect of the present invention, the arbitration unit includes a remaining amount detection unit, and when the memory is full, outputs a stop signal to the writing unit and stops the operation on the writing side. It is characterized by letting.

本発明に係る第5の発明は、前記調停手段は、トリガ発生手段を備え、予め決められた読み出し側の処理ライン単位分の所定ライン数のデータが前記メモリに蓄積されると、前記読出手段に起動信号を出力し、読み出し制御を開始させること特徴とする。   According to a fifth aspect of the present invention, the arbitration unit includes a trigger generation unit, and when the predetermined number of lines of data corresponding to a predetermined processing line unit on the reading side is accumulated in the memory, the reading unit A start signal is output to start reading control.

本発明に係る第6の発明は、前記所定の矩形形状単位は、画像処理モードに基づいて可変量に設定可能とすることを特徴とする。   A sixth aspect of the present invention is characterized in that the predetermined rectangular shape unit can be set to a variable amount based on an image processing mode.

本発明に係る第7の発明は、前記書込み手段は、複数タイプの画像読み取りデバイスを接続可能とすることを特徴とする。   A seventh invention according to the present invention is characterized in that the writing means can connect a plurality of types of image reading devices.

本発明に係る第8の発明は、画像入力手段によって入力された前記画像データを主走査方向にそって、順次メモリに書き込む書込ステップと、前記書き込みステップによって前記メモリに書き込まれた前記画像データが所定の副走査幅分蓄積されたかどうか判断する判断ステップと、メモリに書き込まれた前記画像データを主走査方向に所定の主走査幅で分割し、前記所定の主走査幅と前記所定の副走査幅からなる矩形形状単位で前記画像データを前記メモリから画像処理手段に出力するために画像を読み出す読出ステップと、前記メモリに蓄積された前記画像データ量が前記矩形形状での読出し可能であるかどうかに基づいて、前記読出手段により前記矩形形状での読出しを行うよう調停する調停ステップ(図26に示すステップS33)を有することを特徴とする。   According to an eighth aspect of the present invention, there is provided a writing step of sequentially writing the image data input by the image input means in the main scanning direction into the memory, and the image data written in the memory by the writing step. Determining whether or not a predetermined sub-scanning width has been accumulated, and dividing the image data written in the memory by a predetermined main scanning width in the main scanning direction, so that the predetermined main scanning width and the predetermined sub-scanning width are divided. A reading step of reading out the image data in order to output the image data from the memory to the image processing means in a rectangular shape unit comprising a scanning width, and the amount of the image data stored in the memory can be read out in the rectangular shape. An arbitration step (step S33 shown in FIG. 26) for arbitrating to read out the rectangular shape by the reading means based on whether or not Characterized in that it has.

本発明に係る第9の発明は、第8の発明の画像処理方法を実現するプログラムをコンピュータが読み取り可能な記憶媒体に記憶したことを特徴とする。   According to a ninth aspect of the present invention, a program for realizing the image processing method of the eighth aspect is stored in a computer-readable storage medium.

本発明に係る第10の発明は、第8の発明の画像処理方法を実現するプログラムであることを特徴とする。 A tenth aspect of the present invention is a program for realizing the image processing method of the eighth aspect.

本発明によれば、メインメモリに確保され、処理データを一時滞留させる中間バッファと、前記中間バッファの前段に配置され、入力される画像データを所定の矩形形状単位で加工して前記中間バッファへの入力データを生成する第1の画像処理ブロックと、前記中間バッファの後段に配置され、前記中間バッファから読み出したデータを加工する第2の画像処理ブロックとを備える画像処理装置において、中間バッファ上の滞留データ量をモニタし、該滞留データ量に基づいてDMACによる中間バッファ上への所定の矩形形状単位毎のデータ書き込み処理またはデータ読み出し処理を調停することにより、設定される画像処理モード等の条件に適応して確保される矩形形状単位の中間バッファを確保して、各ブロック間の中間バッファのサイズを処理内容と能力に応じて最適化して、所定の矩形形状単位の画像データ処理時におけるバッファ管理処理負担を軽減して効率よく画像処理を行える効果を奏する。   According to the present invention, an intermediate buffer that is secured in the main memory and temporarily retains processing data, and is arranged in the preceding stage of the intermediate buffer, and processes input image data in a predetermined rectangular shape unit to the intermediate buffer. In an image processing apparatus comprising: a first image processing block that generates input data of a second image processing block; and a second image processing block that is arranged downstream of the intermediate buffer and processes data read from the intermediate buffer. The amount of staying data is monitored, and based on the amount of staying data, the data writing process or data reading process for each predetermined rectangular shape unit on the intermediate buffer by the DMAC is arbitrated, thereby setting the image processing mode etc. Secure an intermediate buffer of rectangular units to be secured according to the conditions, and save the intermediate buffer between each block. Optimized according to size as the process type and capacity, an effect capable of performing efficient image processing to reduce the buffer management processing load at the time of image data processing in a predetermined rectangular units.

次に本発明を実施するための最良の形態について図面を参照して説明する。   Next, the best mode for carrying out the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態を示す画像処理装置の概略的な構成を示すブロック図である。   FIG. 1 is a block diagram showing a schematic configuration of an image processing apparatus showing an embodiment of the present invention.

図1において、10はスキャナインタフェース(以下、「スキャナI/F」という)部であり、アナログフロントエンド(AFE)15を介して、CCD17、CIS18が接続し、個別の専用回路を介在することなく、その読み取りデータを画像処理装置200に取り込むことができる。スキャナI/F部10のデータ処理については、後に詳細に説明する。   In FIG. 1, reference numeral 10 denotes a scanner interface (hereinafter referred to as “scanner I / F”) unit, which is connected to a CCD 17 and a CIS 18 via an analog front end (AFE) 15 without interposing dedicated dedicated circuits. The read data can be taken into the image processing apparatus 200. Data processing of the scanner I / F unit 10 will be described in detail later.

20はスキャナ画像処理部であり、スキャナI/F部10の処理によりメインメモリ100に展開された画像データに対して、画像処理動作モード(カラーコピー、モノクロコピー、カラースキャン、モノクロスキャン等)に応じた画像処理を実行する処理部である。スキャナ画像処理部20の詳細については、後に説明する。   Reference numeral 20 denotes a scanner image processing unit. The image data developed in the main memory 100 by the processing of the scanner I / F unit 10 is set in an image processing operation mode (color copy, monochrome copy, color scan, monochrome scan, etc.). It is a processing unit that executes corresponding image processing. Details of the scanner image processing unit 20 will be described later.

バッファ調停部77はスキャナI/F部10とスキャナ画像処理部20間のデータの受け渡しをメインメモリ100上のリングバッファ領域を介して行う場合、データの書き込みと、読み出しを後述するように調停する。   When the data transfer between the scanner I / F unit 10 and the scanner image processing unit 20 is performed via the ring buffer area on the main memory 100, the buffer arbitration unit 77 arbitrates data writing and reading as described later. .

プリンタ画像処理部30は、入力する画像の領域編集や、解像度変換を行い、得られた画像データをプリンタ出力するための処理ユニットであり、40は接続するレーザビームプリンタ(LBP)45に画像処理結果を出力するためのLBPインタフェース(I/F)部である。   The printer image processing unit 30 is a processing unit for performing region editing and resolution conversion of an input image, and outputting the obtained image data to a printer. Reference numeral 40 denotes a laser beam printer (LBP) 45 to be connected. It is an LBP interface (I / F) unit for outputting a result.

バッファ調停部78は、プリンタ画像処理部30とLBPインタフェース部40間のデータの受け渡しをメインメモリ100上のリングバッファ領域を介して行う場合、データの書き込みと、読み出しを後述するように調停する。バッファ調停部77,78は基本構成は同一のブロックであるが、使用する用途により、制御方法が異なる。詳細については後述する。   When the data transfer between the printer image processing unit 30 and the LBP interface unit 40 is performed via the ring buffer area on the main memory 100, the buffer arbitration unit 78 arbitrates data writing and reading as described later. The buffer arbitration units 77 and 78 have the same basic configuration, but the control method differs depending on the application to be used. Details will be described later.

50,60はJPEG、JBIGモジュールであり、所定の規格に準拠した画像データの圧縮、伸長処理を実行する処理部である。   Reference numerals 50 and 60 denote JPEG and JBIG modules, which are processing units for executing image data compression / decompression processing conforming to a predetermined standard.

70はメモリ制御部であり、画像処理系の第1BUS83,第2BUS84及びコンピュータ系の第3BUS85とそれぞれ接続し、メインメモリ(SDRAM)100に対するデータの書き込み、読み出しのためのデータ転送制御を行う。   Reference numeral 70 denotes a memory control unit, which is connected to the first BUS 83 and second BUS 84 of the image processing system and the third BUS 85 of the computer system, and performs data transfer control for writing / reading data to / from the main memory (SDRAM) 100.

90はDMAコントローラ(DMAC)であり、メモリ制御部70と協働して、ROMISA97を介してROM95と接続し、外部デバイスや種々のインタフェース部170、とメインメモリ100との間のデータ授受に関し、DMA制御するための所定のアドレス情報を生成したり、設定したりする。   Reference numeral 90 denotes a DMA controller (DMAC), which is connected to the ROM 95 via the ROMISA 97 in cooperation with the memory control unit 70, and relates to data exchange between the external device and various interface units 170 and the main memory 100. Predetermined address information for DMA control is generated or set.

91はDMAコントローラ(画像処理DMAC)であり、メモリ制御部70と協働して、各画像処理部(10、20、30、40)とメインメモリ100との間のデータ授受に関し、DMA制御するための所定のアドレス情報を生成したり、設定したりする。   Reference numeral 91 denotes a DMA controller (image processing DMAC), which cooperates with the memory control unit 70 to perform DMA control regarding data exchange between each image processing unit (10, 20, 30, 40) and the main memory 100. Predetermined address information is generated or set.

例えば、画像読み取りデバイスの種類、CCD17、CIS18の別に応じて、スキャナI/F部10で読み取り処理された画像データをメインメモリ100にDMA転送するためのアドレス情報をDMAのチャンネルごとに生成し、または、メインメモリ100上に展開された画像データを読み出すためのアドレス情報をDMAのチャンネルに応じて生成し、スキャナ画像処理部20にDMA転送する等、メインメモリ100と、画像処理部(10,20、30、40)とメインメモリ100間におけるDMA制御を、メモリ制御部70と共に司るユニットとして機能する。   For example, according to the type of image reading device, CCD 17 and CIS 18, address information for DMA transfer of image data read by the scanner I / F unit 10 to the main memory 100 is generated for each DMA channel. Alternatively, the address information for reading out the image data developed on the main memory 100 is generated according to the DMA channel and DMA-transferred to the scanner image processing unit 20. 20, 30, 40) and the main memory 100 function as a unit that manages the DMA control together with the memory control unit 70.

ROM95には画像読み取りデバイス(CCD17やCIS18)に応じて、適した制御パラメータ、制御プログラムデータが格納されており、制御パラメータ等を画像読み取りデバイスに応じて種々設定することができるので、CCD17、CIS18の個別のデータ出力形式に応じた画像データの入力処理が可能となるため、専用のインタフェース回路を設ける必要がなくなる。   The ROM 95 stores appropriate control parameters and control program data according to the image reading device (CCD 17 and CIS 18), and various control parameters can be set according to the image reading device. Since it is possible to input image data in accordance with the individual data output format, it is not necessary to provide a dedicated interface circuit.

83は第1BUSで、メインメモリ100から読み出したデータを画像処理系の各処理部(10〜60)に送出することが可能に構成されている。84は第2BUSで、画像処理系の各処理部(10〜60)から読み出したデータをメインメモリ100に送出することが可能であり、第1BUS83,第2BUS84は対になって画像処理ブロックとメインメモリ100間の画像データの授受を行う。85は第3BUSで、CPU180、通信及びインタフェース部170、メカトロ系制御部125、画像処理部内部の制御レジスタ、及びDMAC90が接続するコンピュータ系のバスとして機能する。   Reference numeral 83 denotes a first BUS, which is configured to transmit data read from the main memory 100 to each processing unit (10 to 60) of the image processing system. Reference numeral 84 denotes a second BUS, which can send data read from each processing unit (10 to 60) of the image processing system to the main memory 100. The first BUS 83 and the second BUS 84 are paired with the image processing block and the main. Transfer image data between the memories 100. Reference numeral 85 denotes a third BUS, which functions as a computer system bus to which the CPU 180, the communication and interface unit 170, the mechatronic system control unit 125, the control register in the image processing unit, and the DMAC 90 are connected.

メカトロ系制御部125にはモータ制御部110と、モータの駆動タイミングや、画像処理系の処理の同調を制御するためのタイミング制御を司る割り込みタイマ制御部120が含まれる。   The mechatronics system control unit 125 includes a motor control unit 110 and an interrupt timer control unit 120 that controls timing for controlling motor drive timing and image processing system processing.

LCD制御部130は、画像処理装置の種々の設定、処理状況等をLCD135に表示するための表示制御を司るユニットである。140、150は周辺機器との接続を可能にするUSBインタフェース部であり、図1では、BJ−プリンタ175が接続した状態を示している。   The LCD control unit 130 is a unit that controls display for displaying various settings, processing statuses, and the like of the image processing apparatus on the LCD 135. Reference numerals 140 and 150 denote USB interface units that enable connection with peripheral devices. FIG. 1 shows a state in which the BJ-printer 175 is connected.

160はメディアアクセス制御(MAC)部であり、接続する機器に対してデータをどのようなタイミングで送り出せばよいか(アクセス)等を制御するユニットである。180はCPUであり、画像処理装置200の全体的な動作を制御する。93はモデム(MODEM)である。   Reference numeral 160 denotes a media access control (MAC) unit that controls at what timing (access) data should be sent to a connected device. A CPU 180 controls the overall operation of the image processing apparatus 200. Reference numeral 93 denotes a modem (MODEM).

<スキャナI/F部10の構成>
スキャナI/F部10は、画像読み取りデバイスとして、CCD17及びCIS18に対応可能であり、両画像読み取りデバイスの信号を入力処理する。ここで入力された画像データは、メモリ制御部70によりDMA転送されてメインメモリ100上に展開される。
<Configuration of Scanner I / F Unit 10>
The scanner I / F unit 10 can correspond to the CCD 17 and the CIS 18 as image reading devices, and inputs signals of both image reading devices. The image data input here is DMA-transferred by the memory control unit 70 and developed on the main memory 100.

図2は、図1に示したスキャナI/F部10の概略的な構成を示すブロック図であり、図1と同一のものには同一の符号を付してある。   2 is a block diagram showing a schematic configuration of the scanner I / F unit 10 shown in FIG. 1, and the same components as those in FIG. 1 are denoted by the same reference numerals.

図2において、CCD17/CIS18に対して、タイミング制御部11aは読み取りスピードに応じた読み取りデバイスの制御信号を生成して出力する。このデバイス制御信号は、スキャナI/F部10内で生成される同期信号に同期するものであり、これにより主走査方向の読み取りタイミングと、読み取り処理の同調を図ることができる。   In FIG. 2, for the CCD 17 / CIS 18, the timing control section 11a generates and outputs a reading device control signal corresponding to the reading speed. This device control signal is synchronized with a synchronization signal generated in the scanner I / F unit 10, whereby the reading timing in the main scanning direction and the reading process can be synchronized.

LED点灯制御部11bは、CCD17/CIS18の光源となるLED19の点灯を制御するユニットであり、R、G、B各色要素に対応したLEDの順次点灯制御のための同期信号(TG、SP、図3、図4を参照)、クロック信号(CLK、図4等を参照)及びCCD17/CIS18に対応した調光の制御、点灯の開始、消灯の制御を実行する。この制御タイミングは、上述のタイミング制御部11aから受信する同期信号に基づくものであり、画像読み取りデバイスの駆動と同期したLED19の点灯が制御される。   The LED lighting control unit 11b is a unit that controls the lighting of the LED 19 serving as the light source of the CCD 17 / CIS 18, and is a synchronization signal (TG, SP, FIG. 5) for controlling the sequential lighting of LEDs corresponding to the R, G, and B color elements. 3, refer to FIG. 4), clock signal (CLK, refer to FIG. 4, etc.) and dimming control corresponding to the CCD 17 / CIS 18, start of lighting, and extinction control. This control timing is based on the synchronization signal received from the above-described timing control unit 11a, and the lighting of the LED 19 synchronized with the driving of the image reading device is controlled.

図3は、図2に示したCCD17による出力信号例を説明するタイミングチャートである。   FIG. 3 is a timing chart for explaining an example of an output signal from the CCD 17 shown in FIG.

図2に示すように、LED19から照射された光が原稿面を照らし、その反射光がCCD17に導かれ、光電変換される。例えば、主走査方向であるCCD17のライン方向と直角方向(副走査方向)に、読み取り位置を定速移動させながら、その原稿面を主走査方向のライン毎に順次走査して原稿面全体の画像を読み取ることができる。   As shown in FIG. 2, the light emitted from the LED 19 illuminates the document surface, and the reflected light is guided to the CCD 17 for photoelectric conversion. For example, the original surface is sequentially scanned for each line in the main scanning direction while moving the reading position at a constant speed in the direction perpendicular to the line direction of the CCD 17 that is the main scanning direction (sub-scanning direction). Can be read.

図3に示す通り、タイミング制御部11aから出力される同期信号(TG)に基づき、CCD17の1ライン分のR、G、B要素に対応した信号がパラレルに出力される(図3(b)、(c)、(d)を参照)。   As shown in FIG. 3, based on the synchronization signal (TG) output from the timing controller 11a, signals corresponding to the R, G, B elements for one line of the CCD 17 are output in parallel (FIG. 3B). , (C), (d)).

図4は、図2に示したCIS18に対するLED19の点灯制御に関するタイミングチャートであり、LED点灯制御部11bにより生成された同期信号(SP)とクロック(CLK)に基づき、各R、G、BのLEDの点灯開始と消灯のタイミングが制御される。   FIG. 4 is a timing chart relating to the lighting control of the LED 19 with respect to the CIS 18 shown in FIG. 2, and based on the synchronization signal (SP) and the clock (CLK) generated by the LED lighting control unit 11b, each R, G, B The timing for starting and turning off the LED is controlled.

図4において、同期信号(SP)の周期はTstgで示され、この時間内に各色(R、G、B)のいずれか、又はこれらの組合わせによりLEDが点灯制御される。Tledは、同期信号(SP)の1周期(Tstg)におけるLEDの点灯時間を示すものである。   In FIG. 4, the period of the synchronization signal (SP) is indicated by Tstg, and the lighting of the LED is controlled by any one of these colors (R, G, B) or a combination thereof within this time. Tled indicates the lighting time of the LED in one cycle (Tstg) of the synchronization signal (SP).

図5は、図4に示したタイミングチャートに従った、R、G、Bに対応するLEDの点灯((a)〜(d))とその点灯時間内に蓄積されたLEDの反射光により光電変換された出力(e)との関係を示すタイミングチャートである。   FIG. 5 shows a photoelectrical operation based on the lighting of the LEDs corresponding to R, G, and B ((a) to (d)) and the reflected light of the LED accumulated during the lighting time according to the timing chart shown in FIG. It is a timing chart which shows the relationship with the output (e) converted.

図5の出力(e)より明らかなように、R、G、B各色に対応した信号の出力は、R出力、G出力、B出力と、それぞれがシリアルのデータとして出力され、先に説明したCCD17の出力信号とは相違する。   As is clear from the output (e) of FIG. 5, the output of the signals corresponding to the R, G, and B colors is output as R data, G output, and B output, respectively, as serial data. This is different from the output signal of the CCD 17.

また、図6は、図2に示したLEDの点灯制御動作を説明するタイミングチャートであり、CIS18の制御に関連し、同期信号(SP)の1周期以内にR、G、Bの各LED19が順次点灯する場合のタイミングを示すタイミングチャート例であり、R、G、Bデータの合成により、この場合の画像読み取りデバイスの入力はモノクロ画像のデータとして画像処理装置200に取り込むことが可能になる。   FIG. 6 is a timing chart for explaining the LED lighting control operation shown in FIG. 2. In relation to the control of the CIS 18, each of the R, G, B LEDs 19 is within one cycle of the synchronization signal (SP). It is an example of a timing chart which shows the timing in the case of turning on sequentially, The input of the image reading device in this case can be taken in into the image processing apparatus 200 as monochrome image data by the synthesis | combination of R, G, B data.

図7は、図2に示したCIS18が主走査方向に2チャンネル設けられた場合の出力例を示すタイミングチャートである。   FIG. 7 is a timing chart showing an output example when the CIS 18 shown in FIG. 2 is provided with two channels in the main scanning direction.

図7に示すように、チャンネル1の出力(図7の(c))は、N番目のCLK信号(図7の(b)を参照)の立ち下がりと同期して、任意のダミーのビット列(図7の場合は22ビット)を出力し、その後、有効ビット数3254ビットに対する信号を出力する(図7の(c))。一方、チャンネル2の出力(図7の(d))は、N番目のCLK信号の立ち下がりと同期して、有効ビット3255ビット目(チャンネル1のセンサ出力の最終ビット3254に後続するビット)から有効ビットとして2794ビットを出力する。   As shown in FIG. 7, the output of channel 1 ((c) in FIG. 7) is synchronized with the falling edge of the Nth CLK signal (see (b) in FIG. 7) in any dummy bit string ( In the case of FIG. 7, 22 bits) are output, and then a signal for the number of effective bits of 3254 bits is output ((c) of FIG. 7). On the other hand, the output of channel 2 ((d) in FIG. 7) is synchronized with the falling edge of the Nth CLK signal from the valid bit 3255th bit (the bit following the last bit 3254 of the sensor output of channel 1). 2794 bits are output as valid bits.

2つのチャンネルのセンサ出力により、主走査方向1ライン分のデータを分割して読み取ることができる。尚、CISの構成は最大2チャンネルに限るものではなく、例えば、3チャンネルの構成にしても、有効ビット数の出力数が変わるのみで、本発明の趣旨が限定されるものではない。   The data for one line in the main scanning direction can be divided and read by the sensor outputs of the two channels. Note that the configuration of the CIS is not limited to a maximum of 2 channels. For example, even if the configuration is a 3 channel, only the number of outputs of the number of effective bits changes, and the gist of the present invention is not limited.

以下、図2に示したブロック図に説明を戻し、画像読み取りデバイス(CCD17/CIS18)の出力信号は、AFE(アナログフロントエンド)15に入力される。   Returning to the block diagram shown in FIG. 2, the output signal of the image reading device (CCD 17 / CIS 18) is input to an AFE (analog front end) 15.

図8は、図2に示したAFE15の構成を説明するブロック図であり、図2と同一のものには同一の符号を付してある。   FIG. 8 is a block diagram for explaining the configuration of the AFE 15 shown in FIG. 2, and the same components as those in FIG. 2 are denoted by the same reference numerals.

AFE15の処理は、図8に示すように、CCD17、CIS18の出力信号に対して、ゲイン調整(15a,15d)、A/D変換処理(15b,15c,15e)を施し、さらにライン間補正処理15cを各画像読み取りデバイスより出力されるアナログ信号をデジタル信号に変換して、スキャナI/F部10に入力する。また、AFE15は画像読み取りデバイスより出力されるパラレルなデータをシリアルなデータに変換して出力することができる。   As shown in FIG. 8, the AFE 15 performs gain adjustment (15a, 15d) and A / D conversion processing (15b, 15c, 15e) on the output signals of the CCD 17 and CIS 18, and further performs inter-line correction processing. The analog signal output from each image reading device 15c is converted into a digital signal and input to the scanner I / F unit 10. The AFE 15 can convert parallel data output from the image reading device into serial data and output the serial data.

図2における同期制御部11cは、AFE15に対して、各デバイス(17、18)のアナログ信号に応じて所定の閾値レベルを設定し、画像読み取りデバイスの相違による出力信号レベルの調整を行う。更に、アナログ信号のサンプリング制御とデジタル信号をAFE15に出力させるための同期クロックを生成して出力し、AFE15から所定のデジタル信号による読み取り画像データを受信する。このデータは、同期制御部11cを介して出力データ制御部11dに入力され、出力データ制御部11dは、スキャナI/F部10の出力モードに合わせて、AFE15より受信した画像データをバッファ(11e,11f,11g)に格納する。   The synchronization control unit 11c in FIG. 2 sets a predetermined threshold level for the AFE 15 according to the analog signal of each device (17, 18), and adjusts the output signal level according to the difference in the image reading device. Further, a sampling clock for analog signals and a synchronous clock for outputting a digital signal to the AFE 15 are generated and output, and read image data by a predetermined digital signal is received from the AFE 15. This data is input to the output data control unit 11d via the synchronization control unit 11c. The output data control unit 11d buffers the image data received from the AFE 15 in accordance with the output mode of the scanner I / F unit 10 (11e , 11f, 11g).

スキャナI/F部10の出力モードには、シングルモード、2チャンネル(ch)モード、3チャンネル(ch)モードと、接続する画像読み取りデバイスに応じて出力モードを切り替えることができる。   The output mode of the scanner I / F unit 10 can be switched between a single mode, a 2-channel (ch) mode, and a 3-channel (ch) mode, depending on the image reading device to be connected.

シングルモードとは、AFE15から主走査方向データがシリアル入力される場合に選択されるモードであり、この場合、1つのバッファのみが利用可能な状態になる。   The single mode is a mode selected when main scanning direction data is serially input from the AFE 15, and in this case, only one buffer is available.

2chモードは、AFE15から入力されるデータが、画像読み取りデバイスの2チャンネル分の情報として、同じタイミングで入力される場合に選択されるモードであり、この場合は、2つのバッファ(例えば、11e,11f)が利用可能な状態に設定される。   The 2ch mode is a mode selected when data input from the AFE 15 is input at the same timing as information for two channels of the image reading device. In this case, two buffers (for example, 11e, 11f) is set to an available state.

3chモードは、AFE15から受信する画像データが、R、G,B出力として、同じタイミングで入力される場合に選択されるモードであり、この場合は、3つのバッファ(11e,11f,11g)が利用可能な状態に設定される。   The 3ch mode is a mode that is selected when image data received from the AFE 15 is input at the same timing as R, G, and B outputs. In this case, three buffers (11e, 11f, and 11g) are provided. Set to available state.

カラー画像データを、シングルモードによりCIS18で読み取った場合、AFE15より受信するデータは、図5の(e)に示すように、LEDの点灯順位に従ったR,G,Bデータの出力がシリアルに配列したものとなり、出力データ制御部11dは、この配列に従って、データを1つのバッファ(例えば第1バッファ11e)に格納する。モノクロ画像データをCIS18で読み取った場合でも同様であり、モノクロ画像データが1つのバッファに格納される。   When color image data is read by the CIS 18 in the single mode, the data received from the AFE 15 is serially output as R, G, B data according to the lighting order of the LEDs as shown in FIG. The output data control unit 11d stores the data in one buffer (for example, the first buffer 11e) according to this arrangement. The same applies when monochrome image data is read by the CIS 18, and the monochrome image data is stored in one buffer.

カラー画像データを2チャンネルのCIS18により読み取った場合、上述の2chモードが設定される。AFE15より受信するデータは、図7の(c)、(d)で示すように、主走査方向に2分割した領域毎のデータとなり、これら領域毎のデータを格納するために、出力データ制御部11dは、受信したデータを2つのバッファ(例えば、第1バッファ11e及び第2バッファ11f)に格納する。この処理はモノクロ画像データをCIS2チャンネルで読み取った場合でも同様である。   When the color image data is read by the 2-channel CIS 18, the above-described 2ch mode is set. As shown in FIGS. 7C and 7D, the data received from the AFE 15 is data for each area divided into two in the main scanning direction. In order to store the data for each area, the output data control unit 11d stores the received data in two buffers (for example, the first buffer 11e and the second buffer 11f). This process is the same even when monochrome image data is read by the CIS2 channel.

カラー画像データをCCD17で読み取った場合、出力データ制御部11dは、AFE15から受信したデータを上述の3chモードによりR、G、Bデータごとに、3つのバッファ(第1、第2、第3バッファ11e,11f,11g)に振り分けて格納することができる。   When the color image data is read by the CCD 17, the output data control unit 11d receives the data received from the AFE 15 in three buffers (first, second, and third buffers) for each of R, G, and B data in the above-described 3ch mode. 11e, 11f, and 11g).

<メモリ制御部70の構成>
次に、スキャナI/F部10の処理により、所定のバッファ(11e,11f,11g)に格納された画像データをメインメモリ(SDRAM)100にDMA転送し、格納する処理について説明する。画像データをメインメモリ100にDMA転送して格納する処理は、画像処理DMAC91のI/O制御ユニット71により制御される。
<Configuration of Memory Control Unit 70>
Next, a description will be given of a process in which the image data stored in the predetermined buffer (11e, 11f, 11g) is DMA-transferred to the main memory (SDRAM) 100 and stored by the process of the scanner I / F unit 10. The process of transferring the image data to the main memory 100 by DMA transfer is controlled by the I / O control unit 71 of the image processing DMAC 91.

図9は、図1に示した画像処理DMAC(DMAC)91の概略的な構成を説明するブロック図であり、図1に示したバッファ調停部77の接続、画像読み取りデバイス(17、18)により読み取った画像データを格納するメインメモリ(SDRAM)100との関係及びプリンタ画像処理部30とバッファ調停部78との接続の関係を示す図に対応する。   FIG. 9 is a block diagram for explaining a schematic configuration of the image processing DMAC (DMAC) 91 shown in FIG. 1, and the connection of the buffer arbitration unit 77 shown in FIG. 1 and the image reading devices (17, 18). This corresponds to a diagram illustrating a relationship between the main memory (SDRAM) 100 storing the read image data and a connection relationship between the printer image processing unit 30 and the buffer arbitration unit 78.

DMAC91は、スキャナI/F部10により入力処理された画像データをメインメモリ100にDMA転送するI/O制御ユニット71、メインメモリ100とスキャナ画像処理部20との間でデータの授受を制御するI/P制御ユニット73を含む。I/O制御ユニット71とI/P制御ユニット72間のデータ受け渡しはメインメモリ100上の中間バッファを介して行われる。この中間バッファをリングバッファとして使用する場合、データの書き込みと、読み出しを調停するためのバッファ調停部77が使用される。   The DMAC 91 controls transfer of data between the main memory 100 and the scanner image processing unit 20, an I / O control unit 71 that DMA-transfers image data input by the scanner I / F unit 10 to the main memory 100. An I / P control unit 73 is included. Data exchange between the I / O control unit 71 and the I / P control unit 72 is performed via an intermediate buffer on the main memory 100. When this intermediate buffer is used as a ring buffer, a buffer arbitration unit 77 for arbitrating data writing and reading is used.

<I/O制御ユニット71の構成>
ここで、I/O制御ユニット71は、データ調停ユニット71aと、第1書き込みデータインタフェース(I/F)部71bと、I/Oインタフェース部71cとを有している。
<Configuration of I / O control unit 71>
Here, the I / O control unit 71 includes a data arbitration unit 71a, a first write data interface (I / F) unit 71b, and an I / O interface unit 71c.

I/Oインタフェース部71cは、メインメモリ100にデータを格納するために上述のDMAC91により生成された所定のアドレス情報を第1書き込みデータI/F部71bに設定する。また、スキャナI/F部10より出力される画像データを受信して、I/O制御ユニット71内の各バッファチャンネル(以下、「チャンネル」という。)(ch0〜ch2)にデータを格納する。   The I / O interface unit 71c sets predetermined address information generated by the above-described DMAC 91 to store data in the main memory 100 in the first write data I / F unit 71b. Further, the image data output from the scanner I / F unit 10 is received, and the data is stored in each buffer channel (hereinafter referred to as “channel”) (ch0 to ch2) in the I / O control unit 71.

第1書き込みデータI/F部71bはメインメモリ100に対してデータの書き込みを行うための第1BUS83と接続し、生成された所定のアドレス情報に従って各チャンネル(ch0〜ch2)に格納されているデータをメインメモリ100にDMA転送する。データ調停ユニット71aは、各チャンネルに格納されているデータの読み出しを行い、第1書き込みデータI/F部71bの書き込み処理に合わせて各チャンネルのデータの受け渡しを行う。   The first write data I / F unit 71b is connected to the first BUS 83 for writing data to the main memory 100, and the data stored in each channel (ch0 to ch2) according to the generated predetermined address information. Are transferred to the main memory 100 by DMA. The data arbitration unit 71a reads the data stored in each channel, and transfers the data of each channel in accordance with the writing process of the first write data I / F unit 71b.

第1書き込みデータI/F部71bはバッファ調停部77と接続し、後に説明するI/P制御ユニット72によるデータの読み出し、若しくは書き込みと、メモリアクセスが競合しないよう制御される。メインメモリ100に対するアクセスの制御により、メインメモリ100をリングバッファとして使用した場合であっても、メインメモリ100に格納されているデータの読み出し前に、同一のメモリアドレスにデータをオーバライトする等のトラブルを防止することができ、メモリリソースを有効に活用することが可能になる。   The first write data I / F unit 71b is connected to the buffer arbitration unit 77, and is controlled so that memory access does not compete with data read or write by the I / P control unit 72 described later. Even when the main memory 100 is used as a ring buffer by controlling access to the main memory 100, data is overwritten to the same memory address before the data stored in the main memory 100 is read. Troubles can be prevented and memory resources can be used effectively.

図10は、図1に示したバッファ調停部77,78の概略構成とDMAC91との接続関係を説明するブロック図である。   FIG. 10 is a block diagram for explaining the schematic configuration of the buffer arbitration units 77 and 78 shown in FIG.

図10に示すように、バッファ調停部77は、制御レジスタ771、読み出し側DMACチャンネルからの転送完了信号Read_end信号を検出する読み出し更新検出部773、書き込み側DMACチャンネルからの転送完了信号Write_end信号を検出する書き込み更新検出部772、中間バッファ1の滞留量をカウントする滞留カウンタ774、滞留ライン数に応じてDMAC91への制御信号を生成するDMAC制御信号生成部775からなる。   As shown in FIG. 10, the buffer arbitration unit 77 detects the control register 771, the read update detection unit 773 that detects the transfer completion signal Read_end signal from the read side DMAC channel, and the transfer completion signal Write_end signal from the write side DMAC channel. And a DMAC control signal generator 775 that generates a control signal to the DMAC 91 according to the number of staying lines.

I/O制御ユニット71内のチャンネルch0〜ch2の各チャンネルは次元毎の転送完了信号を生成する機能を持ち、転送完了信号Write_end1−3は1次元(以降ラインと記述)の転送終了信号が接続されている。即ち、主走査方向1ライン分の転送を検出すると転送完了信号Write_end1−3が出力される。書き込み更新検出部772は接続される3チャンネルの転送終了信号の内、実際に使用されるチャンネルに応じて入力を許可することで、全ての使用されるチャンネルの終了を検出する。   Each of the channels ch0 to ch2 in the I / O control unit 71 has a function of generating a transfer completion signal for each dimension, and the transfer completion signal Write_end1-3 is connected to a one-dimensional (hereinafter referred to as line) transfer end signal. Has been. That is, when transfer for one line in the main scanning direction is detected, a transfer completion signal Write_end1-3 is output. The write update detection unit 772 detects the end of all the used channels by permitting the input according to the actually used channel among the transfer end signals of the three channels to be connected.

以上図8,図9,図10で述べたように、画像読み取りデバイス(CCD17/CIS18)や画像読み取りデバイスの出力モード(シングルモード、2チャンネルモード、3チャネルモード)にしたがって、メインメモリ100に書き込む画像データの書込み方法を選択しているので、スキャナ画像処理部20側は画像読み取りデバイスや画像読み取りデバイスの出力モードによらずにメインメモリから画像データを読み出すことが可能になり、簡単な構成で様々な読み取りデバイス、読み取り方式に対応できる。   As described above with reference to FIGS. 8, 9, and 10, data is written into the main memory 100 in accordance with the image reading device (CCD17 / CIS18) and the output mode (single mode, two-channel mode, and three-channel mode) of the image reading device. Since the image data writing method is selected, the scanner image processing unit 20 side can read the image data from the main memory regardless of the image reading device or the output mode of the image reading device, and has a simple configuration. Compatible with various reading devices and reading methods.

図11は、図10に示したバッファ調停部77,78とDMAC91との動作を説明するためのタイミングチャートであり、図11の(a),(b)はそれぞれ1,2チャンネルを有効とした場合のタイミングチャートである。図11の(a)ではバッファ調停部78が1チャンネルの終了検出によってcount_up信号が生成され、滞留カウンタ774のカウント値が更新されるのに対して、図11の(b)ではバッファ調停部77が2つのチャンネルの終了までカウント値は更新されない。   FIG. 11 is a timing chart for explaining the operation of the buffer arbitration units 77 and 78 and the DMAC 91 shown in FIG. 10, and (a) and (b) of FIG. It is a timing chart in the case. In FIG. 11A, the buffer arbitration unit 78 generates a count_up signal when the end of one channel is detected and the count value of the stay counter 774 is updated, whereas in FIG. 11B, the buffer arbitration unit 77 is updated. However, the count value is not updated until the end of the two channels.

図11の(a)は、印刷用のリングバッファへの書き込みの調停を示している。また、図11の(a)のsuspend信号は制御レジスタ771に設定されたリングバッファの要領に相当するRING_LINE値と滞留数が一致したときにプリント用のバッファがFULLであると判定し、プリンタ画像処理部からの書き込み側DMACを停止するための一時停止信号で、I/O制御ユニット71はこの信号がアサートされている間は中間バッファ1に対する書き込み転送を停止する。   FIG. 11A shows arbitration of writing to the ring buffer for printing. Further, the suspend signal in FIG. 11A determines that the print buffer is FULL when the RING_LINE value corresponding to the ring buffer set in the control register 771 matches the number of stays, and the printer image This is a temporary stop signal for stopping the write side DMAC from the processing unit, and the I / O control unit 71 stops the write transfer to the intermediate buffer 1 while this signal is asserted.

図11の(b)は、スキャナインタフェース部10から画像データの書き込みを示している。図11の(b)の転送完了信号Write_end2の出力、即ち、主走査方向で1ライン分の画像データの書き込みが終了する毎に、滞留数が加算される。TRIGGER信号は制御レジスタ771に設定されたストライプ幅分に相当するTRIGGER_LINE値と滞留数が一致したときに生成されるパルス信号で、予め転送データを設定し、待機中のI/P制御ユニット72がこのパルス信号受けるとスキャナ画像処理部へのデータ転送処理を開始する。   FIG. 11B shows the writing of image data from the scanner interface unit 10. Each time the output of the transfer completion signal Write_end2 in FIG. 11B, that is, writing of one line of image data in the main scanning direction is completed, the staying number is added. The TRIGGER signal is a pulse signal generated when the number of stays matches the TRIGGER_LINE value corresponding to the stripe width set in the control register 771. The transfer data is set in advance, and the waiting I / P control unit 72 When this pulse signal is received, data transfer processing to the scanner image processing unit is started.

I/P制御ユニット72内のチャンネルch3〜ch6の各チャンネルは次元毎の転送完了信号を生成する機能を持ち、転送完了信号Read_end1−4は3次元(以降ストライプ領域と呼ぶ)の転送終了信号が接続されている。バッファ調停部77内の読み出し更新検出部773は接続される4チャンネルの転送終了信号の内、実際に使用されるチャンネルに応じて入力を許可することで、全ての使用するチャンネルの終了を検出する。   Each of the channels ch3 to ch6 in the I / P control unit 72 has a function of generating a transfer completion signal for each dimension, and the transfer completion signals Read_end1-4 are three-dimensional (hereinafter referred to as stripe regions) transfer end signals. It is connected. The read update detection unit 773 in the buffer arbitration unit 77 detects the end of all used channels by permitting input according to the channel actually used among the transfer end signals of the connected four channels. .

図11の(c)はバッファ調停部77,78それぞれ1,2チャンネルを有効とした場合のタイミングチャートであり、図11の(c)は、バッファ調停部77に関しては、図11の(c)では1チャンネルの終了検出、即ち1ストライプ幅分のスキャナ画像処理部20のための読み出しの終了によってcount_down信号が生成され、滞留カウンタのカウント値が更新される(即ち1ストライプ分カウント値を減算する)。バッファ調停部78に対しては、リングバッファからプリンタ部へ画像データが1ライン読み出されるごとにカウント値が更新されるのに対して、図11の(d)はバッファ調停部78の2チャンネル並行してプリンタ部に出力する場合のタイミングチャートである。これは、LBPのレーザビーム発生器(不図示)が2つあって、2本のレーザビームを同時に点灯さて高速にプリントさせる場合の例である。図11の(d)では2つのチャンネルの終了までリングバッファのカウント値は更新されない。   FIG. 11C is a timing chart when 1 and 2 channels of the buffer arbitration units 77 and 78 are enabled. FIG. 11C shows the buffer arbitration unit 77 in FIG. In this case, the count_down signal is generated by detecting the end of one channel, that is, the end of reading for the scanner image processing unit 20 for one stripe width, and the count value of the stay counter is updated (that is, the count value for one stripe is subtracted). ). For the buffer arbitration unit 78, the count value is updated every time one line of image data is read from the ring buffer to the printer unit, whereas FIG. 6 is a timing chart when output to the printer unit. This is an example in which there are two LBP laser beam generators (not shown) and the two laser beams are simultaneously turned on to print at high speed. In FIG. 11D, the count value of the ring buffer is not updated until the end of the two channels.

図11の(d)のsuspend信号はcount_down信号の入力により滞留カウンタ774のカウント値が更新され、結果としてsuspend解除の状態に移行している。   In the suspend signal in FIG. 11D, the count value of the stay counter 774 is updated by the input of the count_down signal, and as a result, the state is shifted to the suspend release state.

I/O制御ユニット71はsuspend信号の解除により中間バッファ1に対する書き込み転送を再開する。バッファ調停部77、78が生成するsuspendは生成を許可・禁止する機能がある。TRIGGER信号は許可、禁止、初回の条件発生時のみ許可の3つの切り替え機能を有する。   The I / O control unit 71 resumes the write transfer to the intermediate buffer 1 by releasing the suspend signal. The suspend generated by the buffer arbitration units 77 and 78 has a function of permitting / prohibiting the generation. The TRIGGER signal has three switching functions: permission, prohibition, and permission only when the first condition occurs.

以上説明したとおり、スキャナインタフェース部10からの画像データをメインメモリ100に主走査方向にそって順次書き込む処理と、スキャナ画像処理部20で処理するための矩形データとして読み出す処理の調停を、簡単に行うことができる。   As described above, arbitration between the process of sequentially writing the image data from the scanner interface unit 10 in the main memory 100 along the main scanning direction and the process of reading out the rectangular data for processing by the scanner image processing unit 20 is simple. It can be carried out.

また、書き込みはライン単位でバッファの滞留数を加算し、読み出しはストライプ単位での読み出しの完了で滞留数を減算することで、必要なメモリ領域を削減し、簡単に調停を行うことができる。   In addition, the number of stays in the buffer is added for writing, and the number of stays is subtracted when reading is completed for each stripe, so that the necessary memory area can be reduced and arbitration can be easily performed.

図8,図9,図10で示されるとおり、スキャナで読み取った画像を各色成分毎にメインメモリ100に格納してスキャン画像処理部20で処理する場合も、各色ごとに上述と同様の調停をすればよい。   As shown in FIGS. 8, 9, and 10, when the image read by the scanner is stored in the main memory 100 for each color component and processed by the scan image processing unit 20, the same arbitration as described above is performed for each color. do it.

<(1)1チャンネルのデータの格納>
図12は、図10に示したI/O制御ユニット71がメインメモリ(SDRAM)100に1チャンネル分のデータを書き込む処理を説明する図であり、図12の(a)は1チャンネルのカラー画像データをR、G、Bデータに分離して格納する処理を示し、図12の(b)は図5の(b)で示したLEDの点灯タイミングで得られるCIS18によるモノクロ画像データの書き込み処理を示す。
<(1) Storage of data for one channel>
FIG. 12 is a diagram for explaining a process in which the I / O control unit 71 shown in FIG. 10 writes data for one channel to the main memory (SDRAM) 100. FIG. 12A shows a color image for one channel. FIG. 12 (b) shows a process of writing monochrome image data by the CIS 18 obtained at the LED lighting timing shown in FIG. 5 (b). Show.

図5の(e)で示した出力例のように、主走査方向の1ライン分のR、G、Bデータがシリアルに出力され、スキャナI/F部10の1つのバッファ(図2の11e)にデータが格納された場合、I/O制御ユニット71内の対応する1つのチャンネル(ch0、図9を参照)にデータが転送される。   As in the output example shown in FIG. 5E, R, G, and B data for one line in the main scanning direction are serially output, and one buffer (11e in FIG. 2) of the scanner I / F unit 10 is output. ), The data is transferred to one corresponding channel (ch0, see FIG. 9) in the I / O control unit 71.

ここで、図12、図13、図14において、チャンネル(ch0)のデータをデータ調停ユニット71a,第1書き込みデータI/F部71bにより格納処理するための構成を「第1LDMAC」と標記し、チャンネル(ch1)のデータを処理するための構成を「第2LDMAC」、チャンネル(ch2)のデータを処理するための構成を「第3LDMAC」と標記する。   Here, in FIG. 12, FIG. 13, and FIG. 14, the configuration for storing the data of the channel (ch0) by the data arbitration unit 71a and the first write data I / F unit 71b is denoted as “first LDMAC”. The configuration for processing the data of the channel (ch1) is denoted as “second LDMAC”, and the configuration for processing the data of the channel (ch2) is denoted as “third LDMAC”.

1チャンネルのカラー画像データをR、G、Bデータに分離して格納する処理を行う場合は、図12の(a)に示すように、第1LDMACは、ライン順位のR、G、Bデータのうち、主走査方向1ライン分(R1〜R2)のRデータをメインメモリ100のR領域1000aに書き込み、次の書き込み領域であるG領域(1000b)の先頭アドレス(G1)に書き込みアドレスを切り替える。   In the case where the process of storing color image data of one channel separately into R, G, and B data is performed, as shown in FIG. Among them, R data for one line (R1 to R2) in the main scanning direction is written in the R area 1000a of the main memory 100, and the write address is switched to the start address (G1) of the G area (1000b) which is the next writing area.

そして、第1LDMACは、R、G、Bデータのうち、主走査方向1ライン分(G1〜G2)のGデータをメインメモリ100のG領域(1000b)に書き込み、次の書き込み領域であるB領域(1000c)の先頭アドレス(B1)に書き込みアドレスを切り替える。   Then, the first LDMAC writes the G data for one line (G1 to G2) in the main scanning direction among the R, G, and B data to the G area (1000b) of the main memory 100, and the next B area that is the next writing area The write address is switched to the start address (B1) of (1000c).

そして、第1LDMACは、主走査方向1ライン分(B1〜B2)のBデータをメインメモリ100のB領域(1000c)に書き込み後、アドレスをR領域(1000a)の2ライン目の先頭アドレス(R2)に切り替える。以下、Gデータ、Bデータも同様にデータの書き込みアドレスを副走査方向の2ライン目にシフトさせてデータの書き込みを行う。   The first LDMAC writes the B data for one line (B1 to B2) in the main scanning direction to the B area (1000c) of the main memory 100, and then the address is the leading address (R2) of the second line in the R area (1000a). ). Thereafter, the G data and B data are similarly written by shifting the data write address to the second line in the sub-scanning direction.

第1LDMACがデータを書き込むDMA制御において、Rデータ、Gデータ、Bデータに対応したデータの格納先となるメモリの番地をオフセット情報(A、B)として与え、各色データ毎の格納領域を切り替えることで、ライン順位のR、G、Bデータを、Rデータ、Gデータ、Bデータと分離してメインメモリ100に格納することが可能になる。   In the DMA control in which the first LDMAC writes data, the address of the memory that is the storage destination of data corresponding to the R data, G data, and B data is given as offset information (A, B), and the storage area for each color data is switched. Thus, the R, G, and B data in the line order can be stored in the main memory 100 separately from the R data, the G data, and the B data.

DMA転送を開始するスタートアドレス(図12の(a)の場合R1)、オフセット情報(A、B)等は上述のDMAC90の生成によるものである。   The start address for starting DMA transfer (R1 in the case of FIG. 12A), offset information (A, B), and the like are due to the generation of the DMAC 90 described above.

バッファ調停部77はこの場合、第1LDMAC(ch0)のWite_end信号のみ書き込み更新検出部772への入力を有効として使用する。R,G,B各ライン転送毎にWrite_end信号が発生し、滞留カウンタ774は1カウントアップするのでカラー1ラインの入力に対して、滞留カウンタ774は3カウントアップする。従って、制御レジスタ771にはRING_LINE値としてR、G、Bデータ格納にそれぞれに割り当てられるライン数の合計を設定する。   In this case, the buffer arbitration unit 77 uses the input to the write update detection unit 772 as valid only for the Wite_end signal of the first LDMAC (ch0). A Write_end signal is generated for each R, G, B line transfer, and the stay counter 774 counts up by 1. Therefore, the stay counter 774 counts up by 3 for the input of one color line. Therefore, the total number of lines allocated to each of R, G, and B data storage is set in the control register 771 as the RING_LINE value.

図6で示したLEDの点灯タイミングで得られるCIS18によるモノクロ画像データの書き込み処理を行う場合は、図12の(b)に示すように、モノクロ画像データの場合は、R、G、Bごとにデータを分離する必要がないので、ライン順位のモノクロ画像データを、メインメモリ100の主走査方向に1ライン分(M1〜M2)のデータを書き込み、同領域1000dの副走査方向に書き込みアドレスをシフトさせて、次の2ライン目(M3〜M4)のデータの書き込みをする。以下、順次同様の処理を実行することにより、モノクロ画像データをメインメモリ100の領域1000dに格納することができる。   When performing monochrome image data writing processing by the CIS 18 obtained at the LED lighting timing shown in FIG. 6, as shown in FIG. 12B, in the case of monochrome image data, for each of R, G, and B Since there is no need to separate the data, the line order monochrome image data is written for one line (M1 to M2) in the main scanning direction of the main memory 100, and the writing address is shifted in the sub-scanning direction of the area 1000d. Then, the data for the next second line (M3 to M4) is written. Thereafter, monochrome image data can be stored in the area 1000d of the main memory 100 by sequentially executing the same processing.

バッファ調停部77はこの場合、第1LDMAC(ch0)のWite_end信号のみ書き込み更新検出部772への入力を有効として使用する。モノクロ各ライン転送毎にWrite_end信号が発生し、滞留カウンタ774は1カウントアップするのでモノクロ1ラインの入力に対して、滞留カウンタ774は1カウントアップする。従って、制御レジスタ771にはRING_LINE値としてモノクロデータ格納に割り当てられるライン数を設定する。   In this case, the buffer arbitration unit 77 uses the input to the write update detection unit 772 as valid only for the Wite_end signal of the first LDMAC (ch0). A Write_end signal is generated for each monochrome line transfer, and the stay counter 774 counts up by one, so the stay counter 774 counts up by one for monochrome one line input. Therefore, the number of lines allocated to monochrome data storage is set in the control register 771 as the RING_LINE value.

<2チャンネルCISによるデータの格納>
図13は、図1に示した画像処理DMAC91によるSDRAM100に対するデータ格納処理を説明する図であり、図13の(a)は、図7で示したように2チャンネルのカラー画像データをR、G、Bデータに分離して格納する処理例に対応し、かつ、図6で示したLEDの点灯タイミングで得られる2チャンネルのCISによるモノクロ画像データの書き込み処理例に対応する。なお、主走査方向のメモリ領域は2つのチャンネルに対応して分割される。
<Data storage by 2-channel CIS>
FIG. 13 is a diagram for explaining a data storing process in the SDRAM 100 by the image processing DMAC 91 shown in FIG. 1. FIG. 13A shows two-channel color image data as R, G, as shown in FIG. This corresponds to a processing example of storing data separately into B data, and corresponds to a processing example of monochrome image data writing by CIS of two channels obtained at the lighting timing of the LED shown in FIG. The memory area in the main scanning direction is divided corresponding to two channels.

2チャンネルのCIS18(chip0,chip1)により読み取られた画像データは、スキャナI/F部10の2つのバッファ(11e,11f)に格納され、I/O制御ユニット71の制御の下、2つのバッファ(11e,11f)のデータは、同制御ユニット71内のチャンネル(ch0、ch1)に転送される。   Image data read by the two-channel CIS 18 (chip 0, chip 1) is stored in the two buffers (11e, 11f) of the scanner I / F unit 10, and is controlled by the I / O control unit 71. The data (11e, 11f) is transferred to the channels (ch0, ch1) in the control unit 71.

第1LDMACは、チャンネル(ch0)のデータ(chip0_data)を、図13の(a)の第1R領域(1100a)、第1G領域(1200a)、第1B領域(1300a)として示される領域に格納する。   The first LDMAC stores the data (chip0_data) of the channel (ch0) in the areas indicated as the first R area (1100a), the first G area (1200a), and the first B area (1300a) in FIG.

図13の(a)において、第1LDMACは、chip0から入力されたR、G、Bデータのうち、Rデータ(RA1〜RA2)をメインメモリの第1R領域(1100a)に書き込み、次の書き込み領域である第1G領域(1200a)の先頭アドレス(GA1)に書き込みアドレスを切り替える(オフセット情報C)。   In FIG. 13A, the first LDMAC writes R data (RA1 to RA2) out of R, G, and B data input from chip0 to the first R area (1100a) of the main memory, and the next writing area. The write address is switched to the first address (GA1) of the first G area (1200a) (offset information C).

第1LDMACは、R、G、Bデータのうち、Gデータ(GA1〜GA2)をメインメモリの第1G領域(1200a)に書き込み、次の書き込み領域である第1B領域(1300a)の先頭アドレス(BA1)に書き込みアドレスを切り替える(オフセット情報C)。   The first LDMAC writes G data (GA1 to GA2) among R, G, and B data to the first G area (1200a) of the main memory, and the first address (BA1) of the first B area (1300a) that is the next writing area. ) To switch the write address (offset information C).

そして、第1LDMACは、R、G、Bデータのうち、Bデータ(BA1〜BA2)をメインメモリのB領域(1300a)に書き込み、処理の終了後、アドレスをR領域(1100a)の副走査方向の2ライン目の先頭アドレス(RA2)に切り替える(オフセット情報D)。以下、Gデータ、Bデータも同様にデータの書き込みアドレスを副走査方向の2ライン目にシフトさせてデータの書き込みを行う。   Then, the first LDMAC writes B data (BA1 to BA2) among the R, G, and B data to the B area (1300a) of the main memory, and after the processing is completed, the address is set in the sub-scanning direction of the R area (1100a). To the first address (RA2) of the second line (offset information D). Thereafter, the G data and B data are similarly written by shifting the data write address to the second line in the sub-scanning direction.

第1LDMACは、メインメモリのデータ格納領域として、図13(a)の第1R領域(1100a)、第1G領域(1200a)、第1B領域(1300a)として示される領域毎に、データの格納先となるメモリの番地をオフセット情報(C、D)に基づき、任意に設定することができ、その設定に従ってチャンネル(ch0)に格納されているデータをメインメモリ100に格納する。   The first LDMAC has a data storage area for each of the areas indicated as the first R area (1100a), the first G area (1200a), and the first B area (1300a) in FIG. The memory address can be arbitrarily set based on the offset information (C, D), and the data stored in the channel (ch0) is stored in the main memory 100 according to the setting.

第2LDMACは、チャンネル(ch1)のデータ(chip1_data)を、図13の(a)の第2R領域(1100b)、第2G領域(1200b)、第2B領域(1300b)として示される領域に格納する。   The second LDMAC stores the data (chip1_data) of the channel (ch1) in the areas indicated as the second R area (1100b), the second G area (1200b), and the second B area (1300b) in FIG.

図13の(a)において、第2LDMACは、chip1から入力されたR、G、Bデータのうち、Rデータ(RB1〜RB2)をメインメモリの第2R領域(1100b)に書き込み、次の書き込み領域である第2G領域(1200b)の先頭アドレス(GB1)に書き込みアドレスを切り替える(オフセット情報E)。   In FIG. 13A, the second LDMAC writes R data (RB1 to RB2) among the R, G, and B data input from chip1 to the second R area (1100b) of the main memory, and the next writing area. The write address is switched to the start address (GB1) of the second G area (1200b) (offset information E).

第2LDMACは、R、G、Bデータのうち、Gデータ(GB1〜GB2)をメインメモリ100の第2G領域(1200b)に書き込み、次の書き込み領域である第2B領域(1300b)の先頭アドレス(BB1)に書き込みアドレスを切り替える(オフセット情報E)。   The second LDMAC writes G data (GB1 to GB2) among the R, G, and B data to the second G area (1200b) of the main memory 100, and the first address of the second B area (1300b) that is the next writing area ( The write address is switched to BB1) (offset information E).

そして、第2LDMACは、R、G、Bデータのうち、Bデータ(BB1〜BB2)をメインメモリ100の第2B領域(1300b)に書き込み、処理の終了後、アドレスを第2R領域(1100b)の副走査方向の2ライン目の先頭アドレス(RA2)に切り替える(オフセット情報F)。以下、Gデータ、Bデータも同様にデータの書き込みアドレスを副走査方向の2ライン目にシフトさせてデータの書き込みを行う。   Then, the second LDMAC writes the B data (BB1 to BB2) among the R, G, and B data to the second B area (1300b) of the main memory 100, and after the processing is completed, the address is stored in the second R area (1100b). Switch to the first address (RA2) of the second line in the sub-scanning direction (offset information F). Thereafter, the G data and B data are similarly written by shifting the data write address to the second line in the sub-scanning direction.

第1及び第2LDMACがデータを書き込むDMA制御において、Rデータ、Gデータ、Bデータに対応したデータの格納先となるメモリの番地をオフセット情報(C、D、E、F)として与え、各色データ毎の格納領域を切り替えることで、ライン順位のR、G、Bデータを、Rデータ、Gデータ、Bデータと分離してメインメモリ100に格納することが可能になる。   In the DMA control in which the first and second LDMACs write data, the address of the memory serving as the data storage destination corresponding to the R data, G data, and B data is given as offset information (C, D, E, F), and each color data By switching the storage area for each line, the R, G, and B data in the line order can be separated from the R data, the G data, and the B data and stored in the main memory 100.

DMA転送を開始するスタートアドレス(図12(a)の場合RA1,RB1)、オフセット情報(C、D、E、F)等は上述のDMAC90の生成によるものである。   The start address for starting DMA transfer (RA1, RB1 in the case of FIG. 12A), offset information (C, D, E, F), and the like are due to the generation of the DMAC 90 described above.

バッファ調停部77はこの場合、第1LDMAC(ch0)と第2LDMAC(ch1)のWite_end信号のみ書き込み更新検出部772への入力を有効として使用する。R,G,B各ライン転送毎に第1LDMAC、第2LDMACのWrite_end信号が発生し滞留カウンタ774は1カウントアップするのでカラー1ラインの入力に対して、滞留カウンタ774は3カウントアップする。従って、制御レジスタ771にはRING_LINE値としてR、G、Bデータ格納にそれぞれに割り当てられるライン数の合計を設定する。   In this case, the buffer arbitration unit 77 uses the input to the write update detection unit 772 as valid only for the Wite_end signals of the first LDMAC (ch0) and the second LDMAC (ch1). The first LDMAC and second LDMAC Write_end signals are generated for each R, G, B line transfer, and the stay counter 774 counts up by 1. Therefore, the stay counter 774 counts up by 3 for the input of one color line. Therefore, the total number of lines allocated to each of R, G, and B data storage is set in the control register 771 as the RING_LINE value.

以下、図6で示したLEDの点灯タイミングで得られる2チャンネルのCISによるモノクロ画像データの書き込み処理を説明する。   In the following, the writing process of monochrome image data by the 2-channel CIS obtained at the LED lighting timing shown in FIG. 6 will be described.

図13の(b)に示すように、モノクロ画像データの場合は、上述のカラー画像データの場合と異なり、R、G、Bごとにデータを分離する必要がないので、ライン順位のモノクロ画像データを、メインメモリ100の主走査方向に1ライン分(MA1〜MA2、MB1〜MB2)のデータを書き込みし、同領域(1400a,1400b)の副走査方向に書き込みアドレスをシフトさせて、次の2ライン目(MA3〜MA4,MB3〜MB4)のデータの書き込みをする。以下、順次同様の処理をしていくことにより、モノクロ画像データをメインメモリの領域(1400a,1400b)に格納することができる。   As shown in FIG. 13B, in the case of monochrome image data, unlike the case of the color image data described above, it is not necessary to separate the data for each of R, G, and B. Is written for one line (MA1 to MA2, MB1 to MB2) in the main scanning direction of the main memory 100, and the write address is shifted in the subscanning direction of the same area (1400a, 1400b). Data of the line (MA3 to MA4, MB3 to MB4) is written. Thereafter, monochrome image data can be stored in the main memory area (1400a, 1400b) by sequentially performing the same processing.

バッファ調停部77はこの場合、第1LDMAC(ch0)と第2LDMAC(ch1)のWite_end信号のみ書き込み更新検出部772への入力を有効として使用する。モノクロ各ライン転送毎に第1LDMAC、第2LDMACのWrite_end信号が発生し滞留カウンタ774は1カウントアップするのでモノクロ1ラインの入力に対して、滞留カウンタ774は1カウントアップする。従って、制御レジスタ771にはRING_LINE値としてモノクロデータ格納にに割り当てられるライン数を設定する。   In this case, the buffer arbitration unit 77 uses the input to the write update detection unit 772 as valid only for the Wite_end signals of the first LDMAC (ch0) and the second LDMAC (ch1). The first LDMAC and second LDMAC Write_end signals are generated for each monochrome line transfer, and the stay counter 774 counts up by 1. Therefore, the stay counter 774 counts up by 1 for monochrome one line input. Therefore, the number of lines assigned to monochrome data storage is set in the control register 771 as the RING_LINE value.

<(3)3チャンネルのデータの格納>
図14は、図1に示した画像処理DMAC91によるデータ書き込み処理例を説明する図であり、図1に示したスキャナI/F部10における出力データ制御部11dが、CCD17により読み取った画像データを3チャンネルのデータ(Rデータ、Gデータ、Bデータ)とした場合、第1乃至第3LDMACがメインメモリ100にデータを書き込む処理例に対応する。
<(3) Storage of 3 channel data>
FIG. 14 is a diagram for explaining an example of data writing processing by the image processing DMAC 91 shown in FIG. 1, and the image data read by the CCD 17 by the output data control unit 11d in the scanner I / F unit 10 shown in FIG. When three channels of data (R data, G data, and B data) are used, this corresponds to a processing example in which the first to third LDMACs write data to the main memory 100.

3つのバッファ(図2に示した11e,11f,11g)に格納されたデータは、I/O制御ユニット71の制御の下、同制御ユニット71内のチャンネル(ch0、ch1、ch2)に転送される。ch0に転送されたデータは、第1LDMACによりメインメモリ100にデータが書き込まれ、ch1に転送されたデータは、第2LDMACによりメインメモリ100にデータが書き込まれ、そして、ch2に転送されたデータは、第3LDMACによりメインメモリ100にデータが書き込まれる。   Data stored in the three buffers (11e, 11f, and 11g shown in FIG. 2) is transferred to channels (ch0, ch1, and ch2) in the control unit 71 under the control of the I / O control unit 71. The The data transferred to ch0 is written to the main memory 100 by the first LDMAC, the data transferred to ch1 is written to the main memory 100 by the second LDMAC, and the data transferred to ch2 is Data is written to the main memory 100 by the third LDMAC.

各LDMACがメインメモリ100のR領域(1500a)、G領域(1500b)、B領域(1500c)に対応する領域にデータを書き込むことにより、R、G、Bデータを分離してメインメモリ100上に格納することができる。   Each LDMAC writes data to areas corresponding to the R area (1500a), G area (1500b), and B area (1500c) of the main memory 100, thereby separating the R, G, and B data onto the main memory 100. Can be stored.

この場合、DMA転送を開始するスタートアドレス(図14の場合SA1,SA2、SA3)等は上述のDMAC90の生成によるものである。   In this case, the start address (SA1, SA2, SA3 in the case of FIG. 14) for starting the DMA transfer is due to the generation of the DMAC 90 described above.

バッファ調停部77はこの場合、第1LDMAC(ch0)と第2LDMAC(ch1)と第3LDMAC(ch2)のWite_end信号のみ書き込み更新検出部772への入力を有効として使用する。R,G,B各ライン転送毎に第1LDMAC、第2LDMAC、第3LDMACのWrite_end信号が発生し滞留カウンタ774は1カウントアップするのでカラー1ラインの入力に対して、滞留カウンタ774は1カウントアップする。従って、制御レジスタ771にはRING_LINE値としてR、G、Bデータ格納にそれぞれに割り当てられるライン数を設定する。   In this case, the buffer arbitration unit 77 uses the input to the write update detection unit 772 as valid only for the first LDMAC (ch0), second LDMAC (ch1), and third LDMAC (ch2) Wite_end signals. The Write_end signal of the first LDMAC, the second LDMAC, and the third LDMAC is generated for each R, G, B line transfer, and the stay counter 774 counts up by 1. Therefore, the stay counter 774 counts up by 1 for the input of one color line. . Accordingly, the control register 771 sets the number of lines allocated to each of R, G, and B data storage as the RING_LINE value.

以上説明したように、画像読み取りデバイス(CCD17、CIS18)により読み取った画像データを、その出力形式に応じてDMA転送を制御するチャンネルに振り分け、振り分けたデータに対してDMAを制御するアドレス情報とオフセット情報を生成することにより、種々の画像読み取りデバイスに対応することが可能になる。   As described above, the image data read by the image reading device (CCD 17, CIS 18) is distributed to channels for controlling DMA transfer according to the output format, and address information and offset for controlling DMA with respect to the distributed data. By generating information, it is possible to cope with various image reading devices.

<メインメモリ上の領域設定とDMA転送>
メインメモリ100に画像データをDMA転送するために、メインメモリ100に対するアドレス情報が設定され、I/O制御ユニット71はこのアドレス情報に従ってDMA転送を制御する。
<Main memory area setting and DMA transfer>
In order to DMA transfer image data to the main memory 100, address information for the main memory 100 is set, and the I / O control unit 71 controls DMA transfer according to this address information.

図15は、図1に示したメインメモリ100を所定の矩形領域(ブロック)に分割した状態を示す図であり、図15の(a)はメインメモリ100を所定の矩形領域(ブロック)に分割した状態に対応し、図15の(b)はメインメモリ100をリングバッファとして利用する例に対応する。   FIG. 15 is a diagram showing a state in which the main memory 100 shown in FIG. 1 is divided into predetermined rectangular areas (blocks). FIG. 15A shows the main memory 100 divided into predetermined rectangular areas (blocks). FIG. 15B corresponds to an example in which the main memory 100 is used as a ring buffer.

図15に示すように、メインメモリ100に格納された画像データに対して、矩形領域単位に画像処理を施すために、画像処理モード(コピーモードあるいはスキャナモード)に応じて、矩形領域を定義するためのアドレス情報が設定される。図15の(a)中において、SAはDMAのスタートアドレスを示し、主走査方向(X軸方向)の領域は所定のバイト長(XA、XB)により分割される。副走査方向(Y軸方向)の領域は、所定のライン数(YA、YB)により分割される。リングバッファとして使用する場合(図15の(b))、ハッチングを付して示した領域101a及び101bは同一のメモリ領域となる。   As shown in FIG. 15, in order to perform image processing in units of rectangular areas on the image data stored in the main memory 100, rectangular areas are defined according to the image processing mode (copy mode or scanner mode). Address information is set. In FIG. 15A, SA indicates a start address of DMA, and an area in the main scanning direction (X-axis direction) is divided by a predetermined byte length (XA, XB). A region in the sub-scanning direction (Y-axis direction) is divided by a predetermined number of lines (YA, YB). When used as a ring buffer (FIG. 15B), the areas 101a and 101b shown with hatching are the same memory area.

矩形領域(0,0)に対するDMAは、スタートアドレスSAから始まり、主走査方向にXA分のデータが転送されると、副走査方向に1ライン分シフトした転送アドレスとして、オフセットデータ(OFF1A)で示されるアドレスが設定される。以下同様に主走査方向の転送とオフセットデータ(OFF1A)によるアドレスのシフトが制御されて矩形領域(0,0)に対するDMAが完了すると、次の矩形領域(1,0)に対するDMAに移行する。   The DMA for the rectangular area (0, 0) starts from the start address SA, and when data for XA is transferred in the main scanning direction, it is offset data (OFF1A) as a transfer address shifted by one line in the sub-scanning direction. The indicated address is set. Similarly, when transfer in the main scanning direction and address shift by offset data (OFF1A) are controlled and DMA for the rectangular area (0, 0) is completed, the DMA shifts to DMA for the next rectangular area (1, 0).

矩形領域(1、0)に対するDMAは、オフセットアドレス(OFF2A)で示されるアドレスにジャンプし、以下、矩形領域(0、0)の場合と同様に主走査方向の転送と、オフセットデータ(OFF1A)によるアドレスのシフトが制御され、矩形領域(1、0)に対するDMAが終了すると、次の矩形領域(2、0)に処理を進める。以下同様に領域(n、0)まで、YAライン分のDMAが完了すると、次のDMAをオフセットデータ(OFF3)で示されるアドレスにジャンプして、矩形領域(0,1)に対する処理に移行する。以下同様に領域(1,1)、(2,1)・・・に対するDMAが制御される。メモリ容量により、例えば、矩形領域のサイズが異なる場合(XB、YBにより定義される場合)、その領域サイズに応じたオフセットデータ(OFF1B、OFF2B)が更に設定されてDMAが制御される。   The DMA for the rectangular area (1, 0) jumps to the address indicated by the offset address (OFF2A). Hereinafter, similarly to the rectangular area (0, 0), transfer in the main scanning direction and offset data (OFF1A). When the address shift by is controlled and DMA for the rectangular area (1, 0) is completed, the process proceeds to the next rectangular area (2, 0). Similarly, when the DMA for the YA line is completed up to the area (n, 0), the next DMA is jumped to the address indicated by the offset data (OFF3), and the process proceeds to the process for the rectangular area (0, 1). . Similarly, the DMA for the areas (1, 1), (2, 1). For example, when the size of the rectangular area differs depending on the memory capacity (when defined by XB and YB), offset data (OFF1B, OFF2B) corresponding to the area size is further set to control the DMA.

以上説明した矩形領域は、設定された画像処理モードに応じた主走査方向の解像度と、参照するべき画素領域とにより矩形領域間で重複する領域(のり代領域)として主走査方向の画素及び副走査方向のライン数が設定され、メモリ上に展開されている画像データの割り当て(分割)が制御される。   The rectangular area described above is a pixel and sub-pixel in the main scanning direction as an overlapping area between the rectangular areas due to the resolution in the main scanning direction according to the set image processing mode and the pixel area to be referred to. The number of lines in the scanning direction is set, and the allocation (division) of image data developed on the memory is controlled.

<具体例>
図16は、図1に示したメインメモリ100に必要となる容量を画像処理モード別に例示する図であり、各処理モードにより以下のように設定される。
<Specific example>
FIG. 16 is a diagram illustrating capacity required for the main memory 100 shown in FIG. 1 for each image processing mode, and is set as follows according to each processing mode.

図16の(a)は、カラーコピーモードの場合に対応し、有効画素:主走査方向に600dpi、文字判定(ZSG)処理:上下11ライン、左12画素、右13画素、色判定フィルタリング(NSF)処理:上下2ライン、左2画素、右3画素、変倍処理:下1ラインの例である。   16A corresponds to the case of the color copy mode. Effective pixels: 600 dpi in the main scanning direction, character determination (ZSG) processing: upper and lower 11 lines, left 12 pixels, right 13 pixels, color determination filtering (NSF) ) Processing: Upper and lower 2 lines, left 2 pixels, right 3 pixels, scaling processing: lower 1 line.

図16の(b)は、白黒コピーモードの場合に対応し、有効画素:主走査方向に600dpi、色判定フィルタリング(NSF)処理:上下2ライン、左右2画素、変倍処理:下1ラインの例である。   (B) in FIG. 16 corresponds to the case of the monochrome copy mode. Effective pixels: 600 dpi in the main scanning direction, color determination filtering (NSF) processing: upper and lower 2 lines, left and right 2 pixels, scaling processing: lower 1 line It is an example.

図16の(c)は、カラースキャンモードモードの場合に対応し、有効画素:主走査方向に1200dpi、変倍処理:下1ラインの例である。   FIG. 16C corresponds to the case of the color scan mode mode, and is an example of effective pixels: 1200 dpi in the main scanning direction and scaling processing: the lower one line.

更に、のり代量の設定は、メモリリソースの他、メインメモリ100とスキャナ画像処理部20との間の転送効率にも影響する。転送効率はのり代領域を含めた画像領域に対する有効画素領域の面積比として定義され、上述のように、コピーモードにおいては、のり代領域の確保が不可欠であることから転送効率は低くなるが、スキャナモードでは、変倍処理を除いて、のり代が無いために転送効率は高くなる。   Further, the setting of the glue amount affects not only memory resources but also transfer efficiency between the main memory 100 and the scanner image processing unit 20. The transfer efficiency is defined as the area ratio of the effective pixel area to the image area including the margin area, and as described above, in the copy mode, since the margin area is indispensable, the transfer efficiency is low. In the scanner mode, the transfer efficiency is high because there is no margin for excluding scaling processing.

例えば、図16の(a)に示すカラーコピーモードの場合、のり代領域を含む矩形領域を283画素×49ラインとすると、最大ののり代領域分(文字判定処理(ZSG)分)を差し引いた有効な領域は、256画素×24ラインとなり、転送効率は(256画素×24ライン)/(283画素×49ライン)≒44%となる。   For example, in the case of the color copy mode shown in FIG. 16A, if the rectangular area including the margin area is 283 pixels × 49 lines, the maximum margin area (character determination processing (ZSG)) is subtracted. The effective area is 256 pixels × 24 lines, and the transfer efficiency is (256 pixels × 24 lines) / (283 pixels × 49 lines) ≈44%.

一方、図16の(c)のカラースキャンモード時は変倍処理をしなければ、のり代は無いので転送効率は100%となる。   On the other hand, in the color scan mode shown in FIG. 16C, if the scaling process is not performed, there is no margin and the transfer efficiency is 100%.

スキャナモード、またはコピーモードは画像処理の内容が異なるため、必要となるメモリの領域は、その処理内容に応じて適切に設定される。例えば、図16に示すように、カラーコピーモード時には、文字判定(ZSG)処理や色判定フィルタリング(NSF)処理が必要なために、有効画素領域を抽出するのり代量(図中では、有効画素周辺に確保されている領域として示す。)は多くなるが、主走査方向の有効画素数として解像度600dpi程度を確保する必要があるため、メモリ領域とのトレードオフによりのり代領域は決定される。   Since the contents of the image processing differ between the scanner mode and the copy mode, the necessary memory area is appropriately set according to the processing contents. For example, as shown in FIG. 16, since character determination (ZSG) processing and color determination filtering (NSF) processing are required in the color copy mode, a margin amount for extracting an effective pixel region (in the drawing, effective pixels) However, since it is necessary to secure a resolution of about 600 dpi as the number of effective pixels in the main scanning direction, the margin area is determined by a trade-off with the memory area.

一方、スキャンモード時は、変倍処理以外ではのり代量の確保は不要であるが、主走査方向の有効画素数として1200dpi程度を確保する必要がある。従って、メモリの割当量をスキャンモードとコピーモードとで同程度とする場合は、副走査方向のライン数を、例えば、24ラインとすれば、カラーコピーモードとスキャンモードにおけるメインメモリの割り当て量を同程度とすることができる。以下、画像処理モード別の格納処理の流れを図17、図18により説明する。   On the other hand, in the scan mode, it is not necessary to secure the amount of paste except for the scaling process, but it is necessary to secure about 1200 dpi as the number of effective pixels in the main scanning direction. Therefore, when the memory allocation amount is approximately the same in the scan mode and the copy mode, if the number of lines in the sub-scanning direction is, for example, 24 lines, the main memory allocation amount in the color copy mode and the scan mode can be reduced. It can be about the same. Hereinafter, the flow of storage processing for each image processing mode will be described with reference to FIGS.

<コピーモード時の格納処理>
図17は、本発明に係る画像処理装置における第1のデータ処理手順の一例を示すフローチャートであり、例えばコピーモード時におけるデータの格納処理手順に対応する。なお、S11〜S18は各ステップを示す。
<Storage processing in copy mode>
FIG. 17 is a flowchart showing an example of a first data processing procedure in the image processing apparatus according to the present invention, and corresponds to, for example, a data storage processing procedure in the copy mode. S11 to S18 indicate each step.

まず、ステップS11で、コピーモードがカラーであるか否かを判断し、カラーであると判断した場合(ステップS11でYES)、処理をステップS12に進め、カラーコピーモード時のDMA転送のためのアドレス情報を以下のように設定する。   First, in step S11, it is determined whether or not the copy mode is color. If it is determined that the copy mode is color (YES in step S11), the process proceeds to step S12 to perform DMA transfer in the color copy mode. Set the address information as follows.

図16の(a)のり代を含めて書き込む場合は、バッファの先頭から有効画素(例えば、主走査方向の解像度600dpi)を確保し、更に、その周辺にのり代(上下11ライン、左12画素、右13画素)を設定する(図16の(a)を参照)。   In the case of writing including the margin of (a) in FIG. 16, an effective pixel (for example, resolution 600 dpi in the main scanning direction) is secured from the top of the buffer, and the margin (upper and lower 11 lines, left 12 pixels) is also provided in the periphery. , 13 pixels on the right) are set (see (a) of FIG. 16).

一方、図16の(b)有効画素のみを書き込む場合は、
スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)+のり代を含めた1頁画像の主走査方向の画素数(TOTALWIDTH)×11(副走査方向ののり代(上))+12(主走査方向ののり代(左))となる。
On the other hand, when writing only effective pixels (b) in FIG.
Start address (SA) = Memory top address (BUFTOP) + Number of pixels in the main scanning direction (TOTALWIDTH) x 11 (sub scanning margin (upper) in the sub scanning direction) + 12 (main scanning direction) Norihiro (left)).

なお、(TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)+左のり代画素数+右のり代画素数)
UA=メモリのエンドアドレス(BUFFBOTTOM)+1=リングバッファの折り返しアドレスと、OFF1A=TOTALWIDTH−IMAGEWIDTHとなる。
In addition, (TOTALWIDTH = number of effective main scanning pixels (IMAGEWIDTH) of one page image + number of left margin pixels + number of right margin pixels)
UA = memory end address (BUFFBOTTOM) + 1 = ring buffer return address and OFF1A = TOTALWIDTH-IMAGEWIDTH.

一方、ステップ(11)で、モノクロであると判断した場合は、ステップS13へ進み、モノクロコピーモードにおけるDMA転送のアドレス情報を、以下のように設定する。   On the other hand, if it is determined in step (11) that the image is monochrome, the process proceeds to step S13, and the address information for DMA transfer in the monochrome copy mode is set as follows.

図16の(a)に示すようにのり代を含めて書き込む場合は、バッファの先頭から有効画素(例えば、主走査方向の解像度600dpi)を確保し、更に、その周辺にのり代(上下2ライン、左右2画素)を設定する(図16の(b)を参照)。   When writing including a margin as shown in FIG. 16A, an effective pixel (for example, resolution 600 dpi in the main scanning direction) is secured from the head of the buffer, and a margin (upper and lower two lines) is provided in the periphery. , Left and right 2 pixels) are set (see FIG. 16B).

図16の(b)有効画素のみを書き込む場合は、スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)+のり代を含めた1頁画像の主走査方向の画素数(TOTALWIDTH)×2(副走査方向ののり代(上))+2(主走査方向ののり代(左))と、UA=メモリのエンドアドレス(BUFFBOTTOM)+1と、OFF1A=TOTALWIDTH−IMAGEWIDTHと設定される。   When writing only effective pixels in FIG. 16B, start address (SA) = start address of memory (BUFTOP) + number of pixels in the main scanning direction of the one-page image including the margin (TOTALWIDTH) × 2 (sub- The margin in the scanning direction (top) +2 (the margin in the main scanning direction (left)), UA = memory end address (BUFFBOTTOM) +1, and OFF1A = TOTALWIDTH-IMAGEWIDTH.

このようにステップS12、ステップS13でそれぞれDMA転送のためのアドレス情報が設定されると、処理をステップS14に進めて、データ転送が開始される。   When address information for DMA transfer is set in steps S12 and S13 as described above, the process proceeds to step S14, and data transfer is started.

次に、ステップS15で、I/O制御ユニット71内の各チャンネルに格納されたデータは、順次読み取りされ、所定のアドレス情報に従って、DMA転送される。そして、チャンネル(ch0〜ch2)に格納されたデータの書き込みが終了すると(S16)、読み取りを終了して(S17)、DMA転送は終了して(S18)、処理を終了する。   Next, in step S15, the data stored in each channel in the I / O control unit 71 is sequentially read and DMA-transferred according to predetermined address information. When the data stored in the channels (ch0 to ch2) has been written (S16), the reading is finished (S17), the DMA transfer is finished (S18), and the processing is finished.

<スキャナモード時の格納処理>
図18は、本発明に係る画像処理装置における第2のデータ処理手順の一例を示すフローチャートであり、例えばスキャナモード時におけるデータの格納処理手順に対応する。なお、S21〜S26は各ステップを示す。
<Storage process in scanner mode>
FIG. 18 is a flowchart showing an example of a second data processing procedure in the image processing apparatus according to the present invention, and corresponds to, for example, a data storage processing procedure in the scanner mode. S21 to S26 indicate each step.

まず、ステップS21で、スキャナモード時のDMA転送のためのアドレス情報を以下のように設定する。   First, in step S21, address information for DMA transfer in the scanner mode is set as follows.

図16の(a)に示すように、のり代を含めて書き込む場合は、バッファの先頭から有効画素(例えば、主走査方向の解像度1200dpi)を確保し、更に、副走査方向に下1ラインののり代を設定する(図16の(c)を参照)。   As shown in FIG. 16A, when writing including a margin, an effective pixel (for example, resolution of 1200 dpi in the main scanning direction) is secured from the top of the buffer, and further, the lower one line in the sub scanning direction is secured. A margin is set (see (c) of FIG. 16).

図16の(b)に示すように、有効画素のみを書き込む場合は、スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)と、UA=メモリのエンドアドレス(BUFFBOTTOM)+1=リングバッファの折り返しアドレスと、OFF1A=0(TOTALWIDTH=IMAGEWIDTH)と設定する。   As shown in FIG. 16B, when only valid pixels are written, start address (SA) = start address of memory (BUFTOP), UA = end address of memory (BUFFBOTTOM) + 1 = folding address of ring buffer And OFF1A = 0 (TOTALWIDTH = IMAGEWIDTH).

ステップS21で、アドレス情報が設定されると、ステップS22で、DMA転送が開始する。I/O制御ユニット71内の各チャンネルに格納されたデータは、順次読み取りされ(S23)、所定のアドレス情報に従って、DMA転送される。そして、チャンネル(ch0〜ch2)に格納されたデータの書き込みが終了すると(S24)、読み取りを終了して(S25)、DMA転送を終了して(S26)、処理を終了する。   When the address information is set in step S21, DMA transfer starts in step S22. The data stored in each channel in the I / O control unit 71 is read sequentially (S23) and DMA-transferred according to predetermined address information. When the data stored in the channels (ch0 to ch2) has been written (S24), the reading is finished (S25), the DMA transfer is finished (S26), and the process is finished.

以上、図17、図18の処理により、画像データは設定された処理モードに応じてメインメモリ100に展開される。尚、図17、図18で示したのり代量は任意に設定可能なパラメータであり、本発明の趣旨はこの条件により限定されるものではない。   As described above, the image data is developed in the main memory 100 according to the set processing mode by the processing of FIGS. 17 and 18. 17 and 18 are parameters that can be arbitrarily set, and the gist of the present invention is not limited by these conditions.

<データの読み出し>
メインメモリ100に展開された画像データは、所定の矩形領域ごとに、対応するR、G、Bデータ、若しくはモノクロ画像データとして、スキャナ画像処理部20にローディングされ、各矩形領域毎に画像処理が実行される。矩形領域ごとに画像処理を行うために、CPU180は画像読み取りデバイス(CCD17/CIS18)の受光素子の感度のばらつきやLED19の光量のばらつき等を補正するシェーディング(SHD)補正データをメインメモリ100内に準備し、矩形領域のシェーディングデータ及び矩形領域の画像データは、後に説明するI/P制御ユニット72によりスキャナ画像処理部20にDMA転送される。
<Reading data>
The image data developed in the main memory 100 is loaded into the scanner image processing unit 20 as corresponding R, G, B data or monochrome image data for each predetermined rectangular area, and image processing is performed for each rectangular area. Executed. In order to perform image processing for each rectangular area, the CPU 180 stores in the main memory 100 shading (SHD) correction data for correcting variations in sensitivity of the light receiving elements of the image reading device (CCD 17 / CIS 18), variations in the amount of light of the LEDs 19, and the like. The shading data of the rectangular area and the image data of the rectangular area are DMA-transferred to the scanner image processing unit 20 by the I / P control unit 72 described later.

図19は、本発明に係る画像処理装置におけるデータ読み出し処理を説明する図であり、矩形領域の画像データをスキャナ画像処理部20のブロックバッファRAM210(図21)に転送する際のデータの読み出し処理例に対応する。   FIG. 19 is a diagram for explaining data read processing in the image processing apparatus according to the present invention. Data read processing when image data in a rectangular area is transferred to the block buffer RAM 210 (FIG. 21) of the scanner image processing unit 20. Corresponds to the example.

図19において、領域(0,0)に関しては、その有効画素領域(abcd)に対して、のり代領域AB1CD1が設定されており(図19の(a))、画像データの読み出しはAをスタートアドレスとして、対応するデータが主走査方向B1アドレスまで読み出される。   In FIG. 19, with respect to the area (0, 0), the margin area AB1CD1 is set for the effective pixel area (abcd) ((a) of FIG. 19), and image data reading starts A. Corresponding data is read up to the main scanning direction B1 address as the address.

そして、主走査方向のデータの読み出しが終了すると、次に読み出すデータのアドレスを、副走査方向に1ライン分をシフトした図中のA2アドレスに移し、主走査方向にB3アドレスの画素までデータが読み出される。以下同様にデータが読み出され、のり代領域の最終ラインに相当するCアドレスからD1アドレスまでの主走査方向のデータの読み出しが行われて、領域(0,0)のデータの読み出しが完了する。   When the reading of the data in the main scanning direction is completed, the address of the data to be read next is moved to the A2 address in the figure shifted by one line in the sub-scanning direction, and the data reaches the B3 address pixel in the main scanning direction. Read out. In the same manner, data is read out, and data in the main scanning direction from the C address corresponding to the last line in the margin area is read in the main scanning direction, and the reading of data in the area (0, 0) is completed. .

領域(0、1)に関しては、その有効画素領域(bedf)に対して、のり代領域B2ED2Fが設定されており(図19の(b))、画像データの読み出しはB2をスタートアドレスとして、対応するデータが主走査方向Eアドレスまで読み出される。主走査方向のデータの読み出しが終了すると、次に読み出すデータのアドレスを、副走査方向に1ライン分シフトした図中のB4アドレスに移し、主走査方向にB5アドレスの画素までデータが読み出される。   For the area (0, 1), the margin area B2ED2F is set for the effective pixel area (bedf) ((b) of FIG. 19), and image data is read using B2 as the start address. Data to be read is read up to the E address in the main scanning direction. When the reading of the data in the main scanning direction is completed, the address of the next data to be read is moved to the B4 address in the figure shifted by one line in the sub-scanning direction, and the data is read up to the pixel at the B5 address in the main scanning direction.

そして、のり代領域の最終ラインに相当するD2アドレスからFアドレスまでの主走査方向の画像データの読み出しが行われて、第2領域のデータの読み出しが完了する。以上の処理により、のり代領域を含む矩形領域のデータが読み出される。以下、同様の処理が各矩形領域に対して行われる。   Then, the image data in the main scanning direction from the D2 address to the F address corresponding to the last line in the margin area is read, and the reading of the data in the second area is completed. Through the above processing, the data of the rectangular area including the margin area is read out. Thereafter, the same processing is performed for each rectangular area.

<I/P制御ユニット72の構成>
メインメモリ100に格納されたデータの読み出しは、図9における画像処理DMA91内のI/P制御ユニット72により制御される。第1読み出しデータI/F部72aは、データ読み出し用の第2BUS74を介してメインメモリ100と接続し、第1読み出しデータI/F部72aは、DMAC91により生成されたアドレス情報を参照して、メインメモリ100から所定の画像データを読み出すことができる。
<Configuration of I / P control unit 72>
Reading of data stored in the main memory 100 is controlled by the I / P control unit 72 in the image processing DMA 91 in FIG. The first read data I / F unit 72a is connected to the main memory 100 via the second BUS 74 for reading data, and the first read data I / F unit 72a refers to the address information generated by the DMAC 91, Predetermined image data can be read from the main memory 100.

読み出されたデータはデータ設定ユニット72bにより、複数個設けられた所定のチャンネル(ch3〜ch6)に設定される。例えば、シェーディング補正用の画像データをチャンネル3(ch3)、面順次のRデータをチャンネル4(ch4)、面順次のGデータをチャンネル5(ch5)、面順次のBデータをチャンネル6(ch6)と、各データが設定される。   The read data is set to a plurality of predetermined channels (ch3 to ch6) by the data setting unit 72b. For example, image data for shading correction is channel 3 (ch3), frame sequential R data is channel 4 (ch4), frame sequential G data is channel 5 (ch5), and frame sequential B data is channel 6 (ch6). Each data is set.

各チャンネル(ch3〜ch6)に設定されたデータは、I/Oインタフェース72cを介して、I/P制御ユニット72の制御の下、順次にDMA転送され、スキャナ画像処理部20のブロックバッファRAM210(図21)にローディングされる。   Data set in each channel (ch3 to ch6) is sequentially DMA-transferred via the I / O interface 72c under the control of the I / P control unit 72, and the block buffer RAM 210 (scanner image processing unit 20). 21).

バッファ調停部77は、ch3〜ch6のRead_end信号を読み出し更新検出部773への入力に接続する。使用されるチャンネルに応じた有効設定を行うのは書き込み側の更新検出における制御と同様に行う。使用されるチャンネルはカラー処理時にはch3〜ch6全チャンネルを使用する。モノクロ時にはch3〜ch6全チャンネルもしくはch3,ch4を使用する。Read_end信号の有効設定は上記設定に応じて切り換えて使用する。   The buffer arbitration unit 77 connects the read_end signals of ch3 to ch6 to the input to the read update detection unit 773. The effective setting corresponding to the channel to be used is performed in the same manner as the control in the update detection on the writing side. Channels used are all channels ch3 to ch6 during color processing. For monochrome, all channels ch3 to ch6 or ch3 and ch4 are used. The valid setting of the Read_end signal is switched according to the above setting.

また、Read_end信号は図15に示した(0,0)から(n,0)の領域(ストライプ領域)分の転送が終了すると発生する。有効と設定された全chのRead_end信号が入力されると、図11の(c),(d)に示すようにcount_down信号が生成され滞留カウンタ774の値から予め制御レジスタ771に設定された減算値(DEC_VALUE)分減算する。このDEC_VALUEの値は動作モードによって異なる。即ち、ストライプ幅×主走査幅分の画像データをスキャナ画像処理部20に転送すると、滞留カウンタを減算するのでスキャナインタフェース部10から次の画像データの書き込みを行うことが可能になる。   The Read_end signal is generated when the transfer of the area (stripe area) from (0, 0) to (n, 0) shown in FIG. When the Read_end signals for all the channels set as valid are input, a count_down signal is generated as shown in FIGS. 11C and 11D, and the subtraction preset in the control register 771 from the value of the stay counter 774 is performed. Subtract the value (DEC_VALUE). The value of DEC_VALUE varies depending on the operation mode. That is, when image data corresponding to stripe width × main scanning width is transferred to the scanner image processing unit 20, the stay counter is subtracted, so that the next image data can be written from the scanner interface unit 10.

TRIGGER_LINE値は、例えば読み出し側のストライプライン分の値を設定する。TRIGGER_LINE値はカラーCCDの様にR,G,B出力間に副走査方向の位置ずれがある場合には、中間バッファ101−1でこの位置の差を吸収する必要があるためその値をTRIGGER_LINEに加算する必要がある。   As the TRIGGER_LINE value, for example, a value corresponding to the stripe line on the reading side is set. If the TRIGGER_LINE value is misaligned in the sub-scanning direction between the R, G, and B outputs as in the color CCD, the intermediate buffer 101-1 needs to absorb this position difference, and the value is set to TRIGGER_LINE. It is necessary to add.

RING_LINE値は、例えばストライプライン分+8ラインの値を設定する。この値はシステムに求めるパフォーマンスによって変更する必要がある。またRING_LINEの値はTRIGGER_LINEよりも大きく設定する。   As the RING_LINE value, for example, a value of stripe line +8 lines is set. This value should be changed according to the performance required for the system. Set the value of RING_LINE to be larger than TRIGGER_LINE.

図20は、本発明に係る画像処理装置における読み取りモード毎のDEC_VALUE、TRIGGER_LINE、RING_LINEの設定例を示す図である。   FIG. 20 is a diagram showing a setting example of DEC_VALUE, TRIGGER_LINE, and RING_LINE for each reading mode in the image processing apparatus according to the present invention.

図20に示す設定は、読み取り動作の開始前に行い、開始後に設定を変更しなくても、DMAC91の設定のみを更新すれば、継続的にバッファの管理と読み出し側の起動制御を行うことが出来る。   The setting shown in FIG. 20 is performed before the start of the reading operation. Even if the setting is not changed after the start, if only the setting of the DMAC 91 is updated, the management of the buffer and the activation control on the reading side can be continuously performed. I can do it.

また、チャンネル7(ch7)は、所定の画像処理が施されたデータをメインメモリ100に格納するために、スキャナ画像処理部20から出力される点順次の画像データを格納するチャンネルである。スキャナ画像処理部20は、点順次の画像データの出力に合わせて、アドレス情報(ブロック・エンド信号、ライン・エンド信号)を出力し、このアドレス情報に基づいて、第2書き込みデータI/F72dは、チャンネル7に格納されている画像データをメインメモリ100に格納する。この処理の内容は後に詳細に説明する。   Channel 7 (ch7) is a channel for storing dot-sequential image data output from the scanner image processing unit 20 in order to store data subjected to predetermined image processing in the main memory 100. The scanner image processing unit 20 outputs address information (block end signal, line end signal) in accordance with the output of dot sequential image data, and based on this address information, the second write data I / F 72d is The image data stored in the channel 7 is stored in the main memory 100. The contents of this process will be described later in detail.

<画像処理>
図21は、本発明に係る画像処理装置におけるデータ処理例を説明する図であり、図1に示したスキャナ画像処理部20の概略的な構成を説明するブロック図であり、ブロックバッファRAM210にローディングされたデータに対して、各画像処理モードに応じた処理が実行される。
<Image processing>
FIG. 21 is a diagram for explaining an example of data processing in the image processing apparatus according to the present invention, is a block diagram for explaining a schematic configuration of the scanner image processing unit 20 shown in FIG. 1, and is loaded into the block buffer RAM 210. Processing corresponding to each image processing mode is performed on the processed data.

また、図22は、本発明に係る画像処理装置における各画像処理に要する矩形領域のサイズを説明する模式図である。   FIG. 22 is a schematic diagram for explaining the size of a rectangular area required for each image processing in the image processing apparatus according to the present invention.

スキャナ画像処理部20は、設定された画像処理モードに応じて、矩形領域に対して参照するべき矩形画素領域を切替えて処理を実行する。以下、画像処理の内容を図21により、また、その処理の際に参照する矩形領域のサイズを図22を参照して説明する。   The scanner image processing unit 20 executes processing by switching a rectangular pixel region to be referenced with respect to the rectangular region in accordance with the set image processing mode. The contents of the image processing will be described below with reference to FIG. 21, and the size of the rectangular area referred to during the processing will be described with reference to FIG.

図21において、シェーディング補正ブロック(SHD)22は、主走査方向の光源(LED19)の光量分布のばらつきや、画像読み取りデバイスの受光素子のばらつき、暗出力のオフセットを補正する処理ブロックである。   In FIG. 21, a shading correction block (SHD) 22 is a processing block for correcting variations in the light amount distribution of the light source (LED 19) in the main scanning direction, variations in light receiving elements of the image reading device, and dark output offset.

シェーディングデータはメインメモリ100上で明R、明G、明B、暗R、暗G、暗Bの順に1画素分の補正データが面順次に格納されており、矩形領域に対応した画素数(主走査方向にX画素、副走査方向にY画素(図22の(a)を参照))が入力される。   The shading data stores correction data for one pixel in the order of bright R, bright G, bright B, dark R, dark G, and dark B on the main memory 100, and the number of pixels corresponding to the rectangular area ( X pixels are input in the main scanning direction, and Y pixels (see FIG. 22A) are input in the sub-scanning direction.

そして、入力された面順次の補正データは、入力データ処理部21により点順次のデータに変換され、スキャナ画像処理部20のブロックバッファRAM210に格納される。そして、矩形領域のシェーディングデータの取り込みが終了すると、画像データの転送に移行する。   The input frame sequential correction data is converted into dot sequential data by the input data processing unit 21 and stored in the block buffer RAM 210 of the scanner image processing unit 20. Then, when the shading data capturing of the rectangular area is completed, the process proceeds to image data transfer.

入力データ処理部21は、R、G、Bに分離した面順次のデータを点順次のデータに再構成する処理を実行する処理部である。1画素のデータはメインメモリ100上に面順次のデータとしてR、G、B各色毎に格納されており、これらのデータがブロックバッファRAM210にローディングされると、入力データ処理部21は、各色データごとに1画素データを取り出し、1画素のR、G、Bデータとして再構成する。再構成の処理を各画素毎に行い、面順次の画像データを点順次のデータに変換する。   The input data processing unit 21 is a processing unit that executes processing for reconstructing frame sequential data separated into R, G, and B into dot sequential data. One-pixel data is stored in the main memory 100 as frame-sequential data for each color of R, G, and B, and when these data are loaded into the block buffer RAM 210, the input data processing unit 21 One pixel data is taken out every time and reconstructed as R, G, B data of one pixel. Reconstruction processing is performed for each pixel, and frame sequential image data is converted to dot sequential data.

図23は、本発明に係る画像処理装置における画像処理領域を説明する図であり、例えば画像処理の対象領域とその処理を実行するためのフィルタ処理等をするための参照領域(ABCD)を概略的に示してある。   FIG. 23 is a diagram for explaining an image processing region in the image processing apparatus according to the present invention. For example, a target region for image processing and a reference region (ABCD) for performing filter processing for executing the processing are schematically illustrated. Is shown.

図23において、有効画素領域(abcd)に対して、主走査方向(X方向)ののり代量として、「Na」、「Nb」画素が設定され、副走査方向(Y方向)ののり代量として、「Nc」、「Nd」画素が設定されている。   In FIG. 23, “Na” and “Nb” pixels are set as the margin amounts in the main scanning direction (X direction) for the effective pixel region (abcd), and the margin amounts in the sub scanning direction (Y direction). “Nc” and “Nd” pixels are set.

図24は、本発明に係る画像処理装置における画像処理モード別(カラーコピーモード、モノクロコピーモード、スキャナモード)ののり代を例示する図であり、変倍時は変倍処理の必要から、1画素だけ、等倍時よりも参照領域は大きくなる。   FIG. 24 is a diagram exemplifying a margin for each image processing mode (color copy mode, monochrome copy mode, scanner mode) in the image processing apparatus according to the present invention. The reference area is larger than that at the same magnification only for pixels.

カラーコピーモードの場合は、黒文字の判定をするため、画像処理モードの内で最も大きい参照領域が必要である。黒文字の検出のためには、網点と黒文字の判定を確実にする必要があり、そのため網点の周期を判定するために、主走査方向26画素、副走査方向26画素(変倍時)を参照領域としている。   In the color copy mode, the largest reference area is required in the image processing mode in order to determine black characters. In order to detect black characters, it is necessary to ensure the determination of halftone dots and black characters. Therefore, in order to determine the period of halftone dots, 26 pixels in the main scanning direction and 26 pixels in the sub-scanning direction (when zooming) are used. The reference area.

モノクロコピーモードの場合は、文字部に対してエッジ強調を行うため主走査方向5画素、副走査方向5画素(変倍時)を参照領域としている。スキャナモードは、ホストコンピュータ上のスキャナドライバやアプリケーションにより必要な画像処理を行うため、等倍時には参照領域は必要としないが、変倍時には副走査方向に1画素分、参照領域が設定される。尚、ここで示したのり代量に、本発明の趣旨は限定されるものではなく、任意に設定することが可能であることはいうまでもない。   In the monochrome copy mode, 5 pixels in the main scanning direction and 5 pixels in the sub-scanning direction (during zooming) are used as reference regions in order to perform edge enhancement on the character portion. In the scanner mode, necessary image processing is performed by a scanner driver or an application on the host computer. Therefore, a reference area is not required at the time of magnification, but a reference area is set for one pixel in the sub-scanning direction at the time of magnification. Needless to say, the gist of the present invention is not limited to the amount of glue shown here, and can be set arbitrarily.

図21に示す処理ブロック23において、平均化処理部(SUBS)は、主走査方向の読み取り解像度を落とすためのサブサンプリング(単純間引き)、あるいは平均化処理を行う処理ブロックであり、入力マスキング処理部(INPMSK)は、入力されたR、G、Bデータの色補正を演算する処理ブロックである。γ補正処理部(LUT)は入力されたデータに対して、所定の階調特性を与える処理ブロックである。   In the processing block 23 shown in FIG. 21, the averaging processing unit (SUBS) is a processing block that performs sub-sampling (simple decimation) for reducing the reading resolution in the main scanning direction or averaging processing, and an input masking processing unit. (INPMSK) is a processing block that calculates color correction of input R, G, and B data. The γ correction processing unit (LUT) is a processing block that gives predetermined gradation characteristics to input data.

文字判定処理(ZSG)ブロック24は、入力画像データに対して、黒文字判別、線画輪郭の画素判別を行う処理ブロックである。黒文字判別処理においては、上述のように網点周期よりも広いエリアを参照する必要があるので、主走査方向26画素、副走査方向26画素(ライン)相当ののり代領域を参照するのが望ましい。文字判定処理ブロック(ZSG)24の入力データは、シェーディング補正ブロック(SHD)22の入力と同様に主走査方向XA画素(有効画素+のり代)×副走査方向YA画素(有効画素+のり代)のデータ(図22の(a))を参照する。   The character determination processing (ZSG) block 24 is a processing block that performs black character determination and line drawing contour pixel determination on input image data. In the black character discrimination process, since it is necessary to refer to an area wider than the halftone dot period as described above, it is desirable to refer to a margin area corresponding to 26 pixels (lines) in the main scanning direction and 26 pixels (lines) in the sub scanning direction. . Similar to the input of the shading correction block (SHD) 22, the input data of the character determination processing block (ZSG) 24 is the XA pixel in the main scanning direction (effective pixel + replacement) × the YA pixel in the sub-scanning direction (effective pixel + replacement). The data (FIG. 22A) is referred to.

処理ブロック25において、MTF補正処理部は、画像読み取りデバイスを変更した際の、MTF差補正、縮小変倍時のモアレ低減のために主走査方向にフィルタ処理を行う処理部であり、注目領域に対して、主走査方向の所定画素について、各係数を乗加算処理するブロックである。   In the processing block 25, the MTF correction processing unit is a processing unit that performs filter processing in the main scanning direction for MTF difference correction and moiré reduction at the time of zooming when the image reading device is changed. On the other hand, this is a block for multiplying and adding each coefficient for a predetermined pixel in the main scanning direction.

図22の(b)では、注目領域G1に対して左側ハッチング部(b1)2画素と、右側ハッチング部(b2)3画素を確保して、領域G1に対する処理を実行する。   In FIG. 22B, the left hatched part (b1) 2 pixels and the right hatched part (b2) 3 pixels are secured for the attention area G1, and the process for the area G1 is executed.

(RGB→(L、Ca、Cb))変換処理部(CTRN)は、後続のフィルタ処理(NSF)ブロック26で行うフィルタリング(明度強調、彩度強調、色判定)に際し、R,G、B各色の多値画像データの変換処理を行う。   The (RGB → (L, Ca, Cb)) conversion processing unit (CTRN) performs R, G, and B colors for filtering (brightness enhancement, saturation enhancement, color determination) performed in the subsequent filter processing (NSF) block 26. The multivalued image data is converted.

下地濃度補正処理部(ABC)は、原稿の下地濃度を自動認識し、下地濃度値を白側に補正することによりファクシミリ通信等に適した二値化データを得るための処理を実行する。   The background density correction processing unit (ABC) automatically recognizes the background density of the document and corrects the background density value to the white side to execute binarized data suitable for facsimile communication or the like.

フィルタ処理(NSF)ブロック26は、先のCTRN処理において、得られたデータに対して色判定とフィルタリングを行うための処理として、画像の明度成分(L)のエッジ強度処理及び彩度(Ca、Cb)の強調処理を行う。更に、入力画像の彩色判定を行い、その結果を出力する。また、文字判定処理(ZSG)ブロック24で生成された文字、線画輪郭部の判定信号等に基づき、強調量のパラメータを変化させることができる。フィルタ処理(NSF)後のデータは、L、Ca、CbからR、G、Bデータに変換されて出力される。この処理ブロックはモノクロ画像データを処理する場合は5画素×5画素のエッジ強調フィルタとして機能する。   The filter processing (NSF) block 26 performs edge strength processing and saturation (Ca, Ca) of the lightness component (L) of the image as processing for performing color determination and filtering on the obtained data in the previous CTRN processing. The enhancement process of Cb) is performed. Further, the color determination of the input image is performed and the result is output. Further, the emphasis amount parameter can be changed based on the character generated in the character determination processing (ZSG) block 24, the determination signal of the line drawing outline portion, and the like. The data after the filter process (NSF) is converted from L, Ca, Cb to R, G, B data and output. This processing block functions as an edge enhancement filter of 5 pixels × 5 pixels when processing monochrome image data.

図22の(c)では、注目領域G2に対して、上下2画素(ライン)、左右2画素の領域(ハッチングを付した領域)を参照データとして、上述のフィルタ処理(NSF)が実行される。   In FIG. 22C, the above-described filtering process (NSF) is executed with respect to the attention area G2, using the upper and lower two pixels (line) and the left and right two pixel areas (hatched areas) as reference data. .

変倍処理(LIP)ブロック27は、主走査、副走査方向の線形補間変倍処理を施す処理ブロックである。図22の(d)では、領域G3が線形保管変倍処理された結果、得られる領域であり、画像データ(d:(XA−26画素)×(YA−26画素))から、ハッチングを付した領域が所定の変倍率に応じて、主走査方向、副走査方向に変倍し、領域G3の面積が決定される。   The scaling process (LIP) block 27 is a processing block that performs linear interpolation scaling processing in the main scanning and sub-scanning directions. In FIG. 22D, the region G3 is a region obtained as a result of the linear storage scaling process, and hatching is applied from the image data (d: (XA−26 pixels) × (YA−26 pixels)). The scaled area is scaled in the main scanning direction and the sub-scanning direction according to a predetermined scaling ratio, and the area of the area G3 is determined.

以上の画像処理が、設定された画像処理モード(コピーモード、スキャナモード)に応じて、矩形領域単位の画像データに施される。画像処理モードに応じた矩形領域をメモリ上に設定し、この矩形領域の単位を切り替えることにより、各画像処理モードに応じた解像度、高精彩処理を実現することが可能になる。   The image processing described above is performed on the image data in units of rectangular areas according to the set image processing mode (copy mode, scanner mode). By setting a rectangular area corresponding to the image processing mode on the memory and switching the unit of the rectangular area, it becomes possible to realize resolution and high-definition processing corresponding to each image processing mode.

また、各矩形領域は、各処理ブロックの画像処理に必要なだけのり代を含んでいるので、処理対象の矩形画像データの端部を処理するために、隣接する領域の画像データを矩形単位で読み出す必要がなく、単純に画像を矩形単位で区切って画像処理する方法よりも、さらなるワークメモリの削減が達成できる。   In addition, each rectangular area includes a margin required for image processing of each processing block. Therefore, in order to process the edge of the rectangular image data to be processed, the image data in the adjacent area is processed in rectangular units. There is no need to read out data, and a further reduction in work memory can be achieved as compared with a method in which an image is simply divided into rectangles and processed.

図25は、本発明に係る画像処理装置における矩形データのDMA転送処理状態を説明する図であり、例えば1つの矩形データの処理が終了して、次の矩形データの画像データをDMA転送するためのDMA主走査方向の開始点を説明する図に対応する。   FIG. 25 is a diagram for explaining the DMA transfer processing state of rectangular data in the image processing apparatus according to the present invention. For example, when processing of one rectangular data is completed, the image data of the next rectangular data is DMA transferred. 6 corresponds to a diagram for explaining a starting point in the DMA main scanning direction.

図25に示すように、最初の矩形領域ABCDのDMAが終了し、D点の画素まで転送が終了すると、主走査方向の開始点は、主走査方向にNa+Nb画素分戻した位置(図中のS1点)となる。以下、順次1列分の矩形データのDMAが終了し、1列目の最終の矩形データに対応するE点のDMAが転送されると、次の列の矩形データを転送するために、副走査方向にシフトする開始点はNc+Nd画素分戻した位置(図中のS2)となる。   As shown in FIG. 25, when the DMA of the first rectangular area ABCD is completed and the transfer to the pixel of point D is completed, the start point in the main scanning direction is the position returned by Na + Nb pixels in the main scanning direction (in FIG. 25). S1 point). Thereafter, when the DMA of the rectangular data for one column is sequentially completed and the DMA at the point E corresponding to the final rectangular data of the first column is transferred, the sub-scan is performed to transfer the rectangular data of the next column. The starting point for shifting in the direction is the position returned by Nc + Nd pixels (S2 in the figure).

図26は、本発明に係る画像処理装置における第3のデータ処理手順の一例を示すフローチャートであり、例えばコピーモード時におけるデータの読み出しと、画像処理手順に対応し、その際の画像処理モード別のDMA転送処理と、画像処理を説明する。なお、(S31)〜(S45)は各ステップを示す。また、図26及び図27で説明するアドレス情報は、図22と対応した数値を例示的に用いているが、この数値に限定されるものではなく、任意に設定することは可能である。   FIG. 26 is a flowchart showing an example of a third data processing procedure in the image processing apparatus according to the present invention. For example, the processing corresponds to the data reading in the copy mode and the image processing procedure, and is classified according to the image processing mode at that time. DMA transfer processing and image processing will be described. In addition, (S31)-(S45) show each step. The address information described in FIGS. 26 and 27 uses numerical values corresponding to those in FIG. 22 as an example, but is not limited to these numerical values, and can be set arbitrarily.

<コピーモード時の処理>
まず、ステップS31において、カラーモードであるか、モノクロモードであるかを判断して、カラーモードであると判断(YES)した場合は、処理をステップS33に進め、モノクロモードであると判断(NO)した場合は、処理をステップS32に進める。
<Processing in copy mode>
First, in step S31, it is determined whether the mode is the color mode or the monochrome mode, and if it is determined that the mode is the color mode (YES), the process proceeds to step S33 to determine that the mode is the monochrome mode (NO). ), The process proceeds to step S32.

そして、ステップS33では、カラーコピーモード時の読み出しのためのアドレス情報を、以下のように設定する。   In step S33, address information for reading in the color copy mode is set as follows.

スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)と、UA=メモリのエンドアドレス(BUFFBOTTOM)+1と、XA=矩形有効主走査画素数+のり代(左のり代画素数(12画素)、右のり代画素数(13画素))と、YA=矩形有効副走査画素(ライン)+のり代(上のり代画素数(11画素(ライン))、下のり代画素数(11画素(ライン)))と、OFF1A=TOTALWIDTH−XAと、OFF2A=-(TOTALWIDTH×YA+のり代(左12画素、右13画素))と、OFF3A=-(TOTALWIDTH×(のり代(上11画素、下11画素)+有効主走査画素+のり代(左12画素、右13画素))と、XANUM=有効主走査画素/矩形有効主走査画素とを設定する。   Start address (SA) = memory start address (BUFTOP), UA = memory end address (BUFFBOTTOM) +1, XA = rectangular effective main scanning pixel number + left margin (left margin pixel number (12 pixels), right The number of margin pixels (13 pixels)) and YA = rectangular effective sub-scanning pixel (line) + margin (the number of upper margin pixels (11 pixels (line)), the number of lower margin pixels (11 pixels (line)) ), OFF1A = TOTALWIDTH-XA, OFF2A = − (TOTALWIDTH × YA + margin (12 pixels left, 13 pixels right)), OFF3A = − (TOTALWIDTH × (group margin (upper 11 pixels, lower 11 pixels)) + (Effective main scanning pixel + margin (12 left pixels, 13 right pixels)) and XANUM = effective main scanning pixels / rectangular effective main scanning pixels are set.

この設定時にバッファ調停部77に対して、図20に示したようにモードに応じた各種パラメータを設定する。ただし、TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)+左のり代画素数+右のり代画素数とする。   At this time, various parameters corresponding to the mode are set in the buffer arbitration unit 77 as shown in FIG. However, TOTALWIDTH = the number of effective main scanning pixels (IMAGEWIDTH) of one page image + the number of left margin pixels + the number of right margin pixels.

一方、ステップS32では、モノクロコピーモード時の読み出しのためのアドレス情報を以下のように設定する。   On the other hand, in step S32, address information for reading in the monochrome copy mode is set as follows.

スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)と、メモリのエンドアドレス(BUFFBOTTOM)+1と、XA=矩形有効主走査画素数+のり代(左のり代画素数(2画素)、右のり代画素数(2画素))と、YA=矩形有効副走査画素(ライン)+のり代(上のり代画素数(2画素(ライン))、下のり代画素数(2画素(ライン)))と、OFF1A=TOTALWIDTH−XAと、OFF2A=-(TOTALWIDTH×YA+のり代(左2画素、右2画素))と、OFF3A=-(TOTALWIDTH×(のり代(上2画素、下2画素)+有効主走査画素+のり代(左12画素、右13画素))と、XANUM=有効主走査画素/矩形有効主走査画素とをそれぞれ設定する。ただし、TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)+左のり代画素数+右のり代画素数とする。   Start address (SA) = memory start address (BUFTOP), memory end address (BUFFBOTTOM) + 1, XA = rectangle effective main scanning pixel number + margin (left margin pixel number (2 pixels), right margin Number of pixels (2 pixels)), YA = rectangular effective sub-scanning pixel (line) + margin (upper margin pixel number (2 pixels (line)), lower margin pixel number (2 pixels (line))) and , OFF1A = TOTALWIDTH-XA, OFF2A =-(TOTALWIDTH x YA + margin (left 2 pixels, right 2 pixels)), OFF3A =-(TOTALWIDTH x (glue margin (top 2 pixels, bottom 2 pixels) + effective main Scan pixel + margin (12 pixels on the left and 13 pixels on the right)) and XANUM = effective main scan pixel / rectangular effective main scan pixel, respectively, where TOTALWIDTH = number of main scan effective pixels of one page image (IMAGEWIDTH ) + Left margin pixel number + Right margin pixel number And

このようにしてステップS33、S32により、アドレス情報が第1読み出しデータI/F部72aに設定されると、処理をステップS34に進め、I/P制御ユニット72がデータの読み出しが可能な状態にあるか否かを判断する。   Thus, when the address information is set in the first read data I / F unit 72a in steps S33 and S32, the process proceeds to step S34, and the I / P control unit 72 is ready to read data. Judge whether there is.

例えば、バッファ調停部77からの起動信号が発行されていない場合はバッファ調停部77のバッファの滞留ライン数が起動ライン数になり、TRIGGER信号が生成されるまで待機し、バッファリードが可能であれば、処理をステップS35に進める。   For example, if the activation signal from the buffer arbitration unit 77 has not been issued, the number of lines retained in the buffer of the buffer arbitration unit 77 becomes the number of activation lines, and it waits until the TRIGGER signal is generated, so that buffer read is possible. If so, the process proceeds to step S35.

ステップS35において、第1読み出しデータI/F部72aは設定されたアドレス情報に従ってデータを読み出し、データ調停ユニット72bは所定のチャンネル(ch3〜ch6)にデータを設定する。   In step S35, the first read data I / F unit 72a reads the data according to the set address information, and the data arbitration unit 72b sets the data for a predetermined channel (ch3 to ch6).

そして、I/P制御ユニット72は各チャンネルに設定されたデータをスキャナ画像処理部20のブロックバッファRAM210にDMA転送をする。ここでDMA転送されたデータは、スキャナ画像処理部20のバッファにローディングされ、各画像処理モードに合わせた画像処理が実行される。個別の画像処理の内容は先に説明したので、ここではその詳細な説明は省略する。   The I / P control unit 72 then DMA-transfers the data set for each channel to the block buffer RAM 210 of the scanner image processing unit 20. Here, the DMA transferred data is loaded into the buffer of the scanner image processing unit 20, and image processing corresponding to each image processing mode is executed. Since the contents of the individual image processing have been described above, detailed description thereof is omitted here.

ローディングされたシェーディング補正データ、画像データは上述の入力データ処理部21により、面順次のデータから点順次のデータに変換され、以下の画像処理が施される。   The loaded shading correction data and image data are converted from frame sequential data to dot sequential data by the above-described input data processing unit 21, and the following image processing is performed.

ステップS36で、カラーコピーモードであるか、モノクロコピーモードであるかを判断し、カラーコピーモードであると判断した場合は、処理をステップS37に進めて、文字判定処理を実行する。   In step S36, it is determined whether the color copy mode or the monochrome copy mode is selected. If it is determined that the color copy mode is selected, the process proceeds to step S37 to execute the character determination process.

一方、ステップS36で、カラーコピーモードでないと判断された場合は、例えばモノクロコピーモードの場合は、ステップS37(文字判定処理)をスキップして、ステップS38のフィルタ処理を実行し、ステップS39で変倍処理を実行する。   On the other hand, if it is determined in step S36 that the color copy mode is not selected, for example, in the case of the monochrome copy mode, step S37 (character determination process) is skipped, the filter process of step S38 is executed, and the process is changed in step S39. Execute double processing.

以上の処理が矩形領域のデータごとに実行され、ステップS40で、画像処理済みの点順次の画像データは、画像処理済みデータを格納する所定のメモリ領域に更にDMA転送され、格納される。この格納処理は後に詳細に説明する。   The above processing is executed for each piece of rectangular area data. In step S40, the image-processed dot-sequential image data is further DMA-transferred and stored in a predetermined memory area for storing the image-processed data. This storage process will be described in detail later.

ステップS41で、矩形領域の画像処理及びそのデータの格納処理が完了したか否か判断し、処理が完了していないと判断した場合は、処理を再びステップS36に戻し、同様の処理を実行する。   In step S41, it is determined whether the image processing of the rectangular area and the data storage processing have been completed. If it is determined that the processing has not been completed, the processing returns to step S36 again, and the same processing is executed. .

一方、ステップS41で、矩形領域の処理が完了したと判断した場合は、処理をステップS42に進めて、ページ全体を構成する矩形領域の処理が終了したか否かを判断して、ページ全体の処理が終了していないと判断した場合は、処理をステップS34に戻し、メインメモリ100から後続の画像データを読み出し、そのデータに対する画像処理(ステップS34以降のステップ)を実行する。   On the other hand, if it is determined in step S41 that the processing of the rectangular area has been completed, the process proceeds to step S42 to determine whether or not the processing of the rectangular area constituting the entire page has been completed. If it is determined that the process has not been completed, the process returns to step S34, the subsequent image data is read from the main memory 100, and image processing (steps subsequent to step S34) is executed on that data.

一方、ステップS42で、ページ処理が終了したと判断した場合は、処理をステップS43に進め、スキャナ画像処理部20に対するDMA転送を終了させるとともに、ステップS44で、スキャナ画像処理部20のバッファへのデータ書き込み処理を終了させ、ステップS45で、スキャナ画像処理部20における画像処理を終了させ、本処理を終了する。   On the other hand, if it is determined in step S42 that the page processing has been completed, the process proceeds to step S43, the DMA transfer to the scanner image processing unit 20 is terminated, and the buffer of the scanner image processing unit 20 is transferred to the buffer in step S44. The data writing process is terminated, and in step S45, the image processing in the scanner image processing unit 20 is terminated, and the present process is terminated.

以上の処理により、コピーモードで読み取ったデータに対する画像処理が完了する。   With the above processing, the image processing for the data read in the copy mode is completed.

<スキャナモード時の処理>
図27は、本発明に係る画像処理装置における第4のデータ処理手順の一例を示すフローチャートであり、例えばスキャナモード時におけるデータの読み出しと、画像処理手順に対応し、その際の画像処理モード別のDMA転送処理と、画像処理を説明する。なお、(S51)〜(S60)は各ステップを示す。
<Processing in scanner mode>
FIG. 27 is a flowchart showing an example of a fourth data processing procedure in the image processing apparatus according to the present invention. For example, the processing corresponds to the reading of data in the scanner mode and the image processing procedure according to the image processing mode at that time. DMA transfer processing and image processing will be described. In addition, (S51)-(S60) show each step.

まず、ステップS51において、メインメモリ100からデータを読み出すためのアドレス情報を、以下のように設定する。   First, in step S51, address information for reading data from the main memory 100 is set as follows.

スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)と、UA=メモリのエンドアドレス(BUFFBOTTOM)+1と、XA=矩形有効主走査画素と、YA=矩形有効副走査画素(ライン)+のり代(下のり代画素数(1画素(ライン)))と、OFF1A=TOTALWIDTH−XAと、OFF2A=-(TOTALWIDTH×YA)と、OFF3A=-(TOTALWIDTH×(のり代(下のり代画素数(1画素))+有効主走査画素)と、XANUM=有効主走査画素/矩形有効主走査画素とをそれぞれ設定する。ただし、TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)+左のり代画素数+右のり代画素数とする。   Start address (SA) = memory start address (BUFTOP), UA = memory end address (BUFFBOTTOM) +1, XA = rectangular effective main scanning pixel, YA = rectangular effective sub-scanning pixel (line) + margin ( The number of lower margin pixels (one pixel (line))), OFF1A = TOTALWIDTH-XA, OFF2A =-(TOTALWIDTH × YA), OFF3A =-(TOTALWIDTH × (number of margin margin (number of lower margin pixels (1 pixel)) )) + Effective main scanning pixel) and XANUM = effective main scanning pixel / rectangular effective main scanning pixel, respectively, where TOTALWIDTH = number of main scanning effective pixels of one page image (IMAGEWIDTH) + number of left margin pixels + The number of pixels on the right.

このようにして、ステップS51により、アドレス情報が第1読み出しデータI/F部72aに設定されると、処理をステップS52に進め、I/P制御ユニット72がデータの読み出しが可能な状態にあるか否かを判断して、例えば、バッファ調停部77からの起動信号が発行されていないと判断した場合は、バッファのバッファ調停部77の滞留ライン数が起動ライン数になり、TRIGGER信号が生成されるまで待機し(S52−NO)、バッファリードが可能であると判断した場合は、処理をステップS53に進める。   In this way, when the address information is set in the first read data I / F unit 72a in step S51, the process proceeds to step S52, and the I / P control unit 72 is ready to read data. For example, if it is determined that the activation signal from the buffer arbitration unit 77 has not been issued, the number of staying lines in the buffer arbitration unit 77 of the buffer becomes the number of activation lines, and a TRIGGER signal is generated. (S52—NO), and if it is determined that buffer reading is possible, the process proceeds to step S53.

そして、ステップS53において、第1読み出しデータI/F部72aは設定されたアドレス情報に従ってデータを読み出し、データ調停ユニット72bは所定のチャンネル(ch3〜ch6)にデータを設定する。   In step S53, the first read data I / F unit 72a reads the data according to the set address information, and the data arbitration unit 72b sets the data for a predetermined channel (ch3 to ch6).

そして、I/P制御ユニット72は各チャンネルに設定されたデータをスキャナ画像処理部20のバッファにDMA転送をする。ここで、DMA転送されたデータは、ステップS54で、スキャナ画像処理部のバッファにローディングされ、各画像処理モードに合わせた画像処理が実行される。該画像処理の内容は先に説明したので、その詳細な説明は省略する。   The I / P control unit 72 then DMA-transfers the data set for each channel to the buffer of the scanner image processing unit 20. Here, the DMA-transferred data is loaded into the buffer of the scanner image processing unit in step S54, and image processing corresponding to each image processing mode is executed. Since the details of the image processing have been described above, a detailed description thereof will be omitted.

このようにローディングされた画像データは上述の入力データ処理部21により、面順次のデータから点順次のデータに変換され、ステップS54において変倍処理を実行する。   The image data loaded in this way is converted from the frame sequential data to the dot sequential data by the above-described input data processing unit 21, and the scaling process is executed in step S54.

次に、ステップS55において、画像処理済みの点順次の画像データは、画像処理済みデータを格納する所定のメモリ領域に更にDMA転送され、格納される。この格納処理は後に詳細に説明する。   Next, in step S55, the image-processed dot-sequential image data is further DMA-transferred and stored in a predetermined memory area for storing the image-processed data. This storage process will be described in detail later.

そして、ステップS56で、矩形領域の画像処理及びそのデータの格納処理が完了したか否か判断し、処理が完了していないと判断した場合は、処理を再びステップS54に戻し、同様の処理を実行する。   In step S56, it is determined whether the image processing of the rectangular area and the data storage processing are completed. If it is determined that the processing is not completed, the process returns to step S54 again, and the same processing is performed. Execute.

一方、ステップS56で矩形領域の処理が完了したと判断した場合、処理をステップS57に進めて、ページ全体の処理が終了したか否かを判断して、ページ全体の処理が終了していないと判断した場合は、処理をステップS52に戻し、メインメモリ100から後続の画像データを読み出し、そのデータに対する画像処理を実行する。   On the other hand, if it is determined in step S56 that the processing of the rectangular area has been completed, the process proceeds to step S57 to determine whether the processing for the entire page has been completed. If it is determined, the process returns to step S52, the subsequent image data is read from the main memory 100, and image processing is executed on the data.

一方、ステップS57で、ページ処理が終了したと判断した場合は、処理をステップS58に進め、スキャナ画像処理部20に対するDMA転送を終了させるとともに、ステップS59で、スキャナ画像処理部20のバッファへのデータ書き込み処理を終了させ、さらに、ステップS60で、スキャナ画像処理部20における画像処理を終了して、本処理を終了する。   On the other hand, if it is determined in step S57 that the page processing has been completed, the process proceeds to step S58 to end the DMA transfer to the scanner image processing unit 20, and in step S59 to the buffer of the scanner image processing unit 20 The data writing process is terminated, and in step S60, the image processing in the scanner image processing unit 20 is terminated, and the present process is terminated.

以上の処理により、スキャナモードで読み取った画像データに対する画像処理が完了する。   With the above processing, the image processing for the image data read in the scanner mode is completed.

画像処理モードに応じて、所定ののり代量を含む矩形領域を設定し、この矩形領域単位に画像処理を行うことにより、各画像処理部の個別のラインバッファの介在無しに所定の画像処理を実行することが可能になる。   Depending on the image processing mode, a rectangular area including a predetermined margin is set, and image processing is performed in units of the rectangular area, thereby performing predetermined image processing without intervening individual line buffers in each image processing unit. It becomes possible to execute.

<画像処理済みデータの格納>
図28は、本発明に係る画像処理装置における画像処理済みデータの格納処理を説明する図であり、例えば変倍処理された矩形データを変倍処理ブロック(LIP)27からメインメモリ100に転送する処理であり、一例として256画素×256画素の矩形データを70%に縮小する場合、256画素×0.7=179.2画素となり、数値計算上179.2画素×179.2画素の矩形データを作る必要があるが、少数点以下の数値を反映した画素データを生成することができないので、主走査方向、副走査方向に、180画素と179画素の出現確率を2:8にして、全体的に縮小倍率70%相当の179.2画素を実現するものである。
<Storage of image processed data>
FIG. 28 is a diagram for explaining the storage processing of the image processed data in the image processing apparatus according to the present invention. For example, the rectangular data subjected to the scaling process is transferred from the scaling process block (LIP) 27 to the main memory 100. As an example, when the rectangular data of 256 pixels × 256 pixels is reduced to 70%, 256 pixels × 0.7 = 179.2 pixels, and the rectangular data of 179.2 pixels × 179.2 pixels in numerical calculation However, since pixel data reflecting a numerical value below the decimal point cannot be generated, the appearance probability of 180 pixels and 179 pixels is set to 2: 8 in the main scanning direction and the sub-scanning direction. In particular, 179.2 pixels corresponding to a reduction ratio of 70% are realized.

図28では、矩形領域のサイズが領域B11(XA1=180画素)、B12(XA2=179画素)と主走査方向に異なり、B11(YA1=180画素)とB21(YA2=179画素)とでは副走査方向にそれぞれ矩形領域のサイズが異なっている。変倍処理の結果に応じてサイズが異なる矩形領域の出現確率は制御され、所定の変倍画像データを得ることができる。メインメモリ100に対して、画像処理されたデータを戻すために、DMAを制御する信号は変倍処理ブロック(LIP)27からI/P制御ユニット72に対して通知される(図29)。   In FIG. 28, the size of the rectangular area is different from the areas B11 (XA1 = 180 pixels) and B12 (XA2 = 179 pixels) in the main scanning direction, and the sizes of the subareas are B11 (YA1 = 180 pixels) and B21 (YA2 = 179 pixels). The sizes of the rectangular areas are different in the scanning direction. Appearance probabilities of rectangular areas having different sizes are controlled according to the result of the scaling process, and predetermined scaled image data can be obtained. In order to return the image-processed data to the main memory 100, a signal for controlling the DMA is notified from the scaling processing block (LIP) 27 to the I / P control unit 72 (FIG. 29).

図29は、本発明に係る画像処理装置における要部構成を説明する図である。   FIG. 29 is a diagram for explaining a main configuration of the image processing apparatus according to the present invention.

次に、図26に示したステップS40および図27に示したステップS55における格納処理について詳述する。   Next, the storage process in step S40 shown in FIG. 26 and step S55 shown in FIG. 27 will be described in detail.

図30は、図29に示した変倍処理ブロック(LIP)27からI/P制御ユニット72との動作を説明するタイミングチャートであり、画像処理済みのデータをメインメモリ100にDMA転送するために、変倍処理ブロック(LIP)27からI/P制御ユニット72に送出されるデータ及び信号の関係を示すタイミングチャート例である。   FIG. 30 is a timing chart for explaining the operation from the scaling processing block (LIP) 27 to the I / P control unit 72 shown in FIG. 29 for transferring the image-processed data to the main memory 100 by DMA transfer. 10 is an example of a timing chart showing the relationship between data and signals sent from the scaling processing block (LIP) 27 to the I / P control unit 72.

図30に示すように、I/P制御ユニット72は、矩形の主走査長、副走査長が未知の状態でDMA転送を開始する。変倍処理ブロック27から1つの矩形内における主走査幅の最終データ(XA1、XA2)の転送時にライン・エンド信号が出力され、そのライン・エンド信号により矩形の主走査長が変倍処理ブロック27からI/P制御ユニット72に通知される。   As shown in FIG. 30, the I / P control unit 72 starts DMA transfer with the rectangular main scanning length and sub-scanning length unknown. When the final data (XA1, XA2) of the main scanning width in one rectangle is transferred from the scaling processing block 27, a line end signal is output, and the main scanning length of the rectangle is changed by the line end signal. To the I / P control unit 72.

変倍処理ブロック27から1つの矩形内の最終データ転送時にブロック・エンド信号がI/P制御ユニット72に対して出力され、これによって副走査長を認識することができる。副走査方向YA1のデータがすべて出力されると、DMA転送を領域B21、B22の列(図28を参照)にシフトして、同様に主走査方向のデータXAを送出する。DMAはライン・エンド信号、ブロック・エンド信号により制御される。これにより、変倍処理ブロック27の演算結果に応じて動的にDMAの矩形領域を切り替えることができるようになる。   A block end signal is output to the I / P control unit 72 at the time of final data transfer within one rectangle from the scaling processing block 27, whereby the sub-scan length can be recognized. When all the data in the sub-scanning direction YA1 is output, the DMA transfer is shifted to the columns of the areas B21 and B22 (see FIG. 28), and similarly the data XA in the main scanning direction is sent out. The DMA is controlled by a line end signal and a block end signal. Thereby, the rectangular area of the DMA can be dynamically switched according to the calculation result of the scaling processing block 27.

上述のライン・エンド信号、ブロック・エンド信号、および点順次の画像データは、I/P制御ユニット72のインタエース部72cに入力され、このうち画像データはチャンネル(ch)7に格納される。ライン・エンド信号及びブロック・エンド信号は、チャンネル(ch)7に格納したデータをメインメモリ100上に展開する際のアドレス情報として用いられ、第2書き込みデータI/F部72dは、これらのアドレス情報に基づき、ch7のデータを読み出し、メインメモリ100上にデータを格納する。   The line end signal, block end signal, and dot sequential image data described above are input to the interface unit 72c of the I / P control unit 72, and the image data is stored in the channel (ch) 7. The line end signal and the block end signal are used as address information when the data stored in the channel (ch) 7 is expanded on the main memory 100, and the second write data I / F unit 72d receives these addresses. Based on the information, the data of ch7 is read and stored in the main memory 100.

図31は、本発明に係る画像処理装置における画像データの展開処理例を説明する図であり、例えばライン・エンド信号及びブロック・エンド信号に従って、データをメインメモリ100に展開した状態に対応する。   FIG. 31 is a diagram for explaining an example of image data expansion processing in the image processing apparatus according to the present invention, and corresponds to a state where data is expanded in the main memory 100 in accordance with, for example, a line end signal and a block end signal.

図31において、SAはDMA転送のスタートアドレスを示し、このアドレスから主走査方向に点順次のRGBデータを格納していく。ライン・エンド信号に基づき、DMA転送のアドレスをオフセット情報(OFF1A)により切り替え、副走査方向に1画素(ライン)シフトしたアドレスから同様に主走査方向にデータを格納していく。   In FIG. 31, SA indicates a start address of DMA transfer, and dot sequential RGB data is stored from this address in the main scanning direction. Based on the line end signal, the DMA transfer address is switched by offset information (OFF1A), and data is similarly stored in the main scanning direction from the address shifted by one pixel (line) in the sub-scanning direction.

そして、矩形領域(0,0)のブロック・エンド信号に基づき、次の矩形領域(1,0)に対するデータの格納に移行する。DMA転送のアドレスはオフセット情報(OFF2A)により切り替えられる。この場合のOFF2Aは、領域(0、0)に対して主走査方向に1画素シフトし、副走査方向1ライン目にジャンプしたアドレスとして切り替えられる。   Then, based on the block end signal of the rectangular area (0, 0), the process proceeds to data storage for the next rectangular area (1, 0). The DMA transfer address is switched by the offset information (OFF2A). In this case, OFF2A is switched as an address shifted by one pixel in the main scanning direction with respect to the region (0, 0) and jumped to the first line in the sub-scanning direction.

以下、同様に領域(2、0)、・・・・(n−1,0)、(n、0)とデータを格納していき、n個分のブロックの格納が完了すると、オフセット情報(OFF3)によりDMA転送のアドレスを切り替える。この場合のOFF3は、領域(0,0)の最終ラインの画素に対して副走査方向に1画素(ライン)シフトし、主走査方向1画素目にジャンプしたアドレスとして切り替えられる。   Hereinafter, similarly, the area (2, 0),... (N−1, 0), (n, 0) and data are stored, and when storage of n blocks is completed, the offset information ( The address of DMA transfer is switched by OFF3). In this case, OFF3 is switched as an address that is shifted by one pixel (line) in the sub-scanning direction with respect to the pixel in the last line of the region (0, 0) and jumped to the first pixel in the main scanning direction.

以上、スキャナI/F部10,スキャナ画像処理部20、DMAC91とバッファ調停部77の制御の説明を行ったが、以下、プリンタ画像処理部30、LBPI/F部40、DMAC91、バッファ調停部78について説明を行う。DMAC91の詳細な制御については既に説明を行ったので概要のみを示す。   The control of the scanner I / F unit 10, the scanner image processing unit 20, the DMAC 91, and the buffer arbitration unit 77 has been described above. Hereinafter, the printer image processing unit 30, the LBPI / F unit 40, the DMAC 91, and the buffer arbitration unit 78 will be described. Will be described. Since the detailed control of the DMAC 91 has already been described, only the outline is shown.

図9を参照してDMAC91、バッファ調停部78、プリンタ画像処理部30、LBPI/F部40の接続状態を説明する。   A connection state of the DMAC 91, the buffer arbitration unit 78, the printer image processing unit 30, and the LBPI / F unit 40 will be described with reference to FIG.

DMAC91は、プリンタ画像処理部30にデータを入力するI/P制御ユニット74、プリンタ画像処理部30からの出力画像データをメインメモリ100にDMA転送するI/O制御ユニット75,メインメモリ100とLBPI/F部40との間でデータの授受を制御するI/P制御ユニット76を含む。   The DMAC 91 includes an I / P control unit 74 that inputs data to the printer image processing unit 30, an I / O control unit 75 that DMA-transfers output image data from the printer image processing unit 30 to the main memory 100, the main memory 100, and the LBPI. An I / P control unit 76 that controls data exchange with the / F unit 40 is included.

I/O制御ユニット75とI/P制御ユニット76間のデータ受け渡しはメインメモリ100上の中間バッファを介して行われる。この中間バッファをリングバッファとして使用する場合、データの書き込みと、読み出しを調停するためのバッファ調停部78が使用される。   Data exchange between the I / O control unit 75 and the I / P control unit 76 is performed via an intermediate buffer on the main memory 100. When this intermediate buffer is used as a ring buffer, a buffer arbitration unit 78 for arbitrating data writing and reading is used.

プリンタ画像処理部30とLBPI/F部40は従来例の解像度変換部2500に該当するブロックで、プリンタ画像処理部30とLBPI/F部40の2つのブロックに分割されているのは、印字系としてBJプリンタ175もしくはLBP45の双方に対応を行うためである。   The printer image processing unit 30 and the LBPI / F unit 40 are blocks corresponding to the resolution conversion unit 2500 of the conventional example. The printer image processing unit 30 and the LBPI / F unit 40 are divided into two blocks, the printing system. This is to cope with both the BJ printer 175 and the LBP 45.

印字系にLBP45を持つ装置ではプリンタ画像処理部30の出力データをLBPI/F40経由でLBP45に送信し印字出力するのに対して、BJプリンタ175が印字系の場合はUSB1.1HOST150を介して印字データはBJプリンタに送信、印字する。   In an apparatus having an LBP 45 in the printing system, the output data of the printer image processing unit 30 is transmitted to the LBP 45 via the LBPI / F 40 and printed out. On the other hand, when the BJ printer 175 is a printing system, printing is performed via the USB 1.1 HOST 150. Data is sent to a BJ printer and printed.

バッファ調停部78はLBP記録計を備え、LBPI/F部40を使用するときのみ使用される。   The buffer arbitration unit 78 includes an LBP recorder and is used only when the LBPI / F unit 40 is used.

また、LBPI/F部40はch1,2の2つのブロックより構成される。それぞれのブロックは等価でLBPの走査ビームに対応している。走査ビーム数が1の時にはLBPI/F部40のch1のみが使用され、走査ビーム数が2の時には、LBPI/F部40のch1,ch2が各々のビームに対応付けられて使用される。LBPI/F部40のch1はI/P制御ユニット76のch10に、LBPI/F部40のch2はI/P制御ユニット76のch11に接続される。   The LBPI / F unit 40 is composed of two blocks, ch1 and ch2. Each block is equivalent and corresponds to an LBP scanning beam. When the number of scanning beams is 1, only ch1 of the LBPI / F unit 40 is used, and when the number of scanning beams is 2, ch1 and ch2 of the LBPI / F unit 40 are used in association with each beam. The ch1 of the LBPI / F unit 40 is connected to the ch10 of the I / P control unit 76, and the ch2 of the LBPI / F unit 40 is connected to the ch11 of the I / P control unit 76.

<I/O制御ユニット75の構成>
I/O制御ユニット75の構成は基本的にI/O制御ユニット71の構成と同等である。
<Configuration of I / O control unit 75>
The configuration of the I / O control unit 75 is basically the same as the configuration of the I / O control unit 71.

異なるのはバッファチャンネルの数のみで、チャンネル数が1であるためにデータ調停ユニット71aに該当するユニットはない。   The only difference is the number of buffer channels. Since the number of channels is 1, there is no unit corresponding to the data arbitration unit 71a.

図10に示すように、バッファ調停部77,78の概略構成とDMAC91とは接続されており、バッファ調停部78は制御レジスタ781、読み出し側DMACチャンネルからの転送完了信号Read_end信号を検出する読み出し更新検出部783、書き込み側DMACチャンネルからの転送完了信号Write_end信号を検出する書き込み更新検出部782、中間バッファ1の滞留量をカウントする滞留カウンタ784、滞留ライン数に応じてDMAC91への制御信号を生成するLDMAC制御信号生成部785からなる。   As shown in FIG. 10, the schematic configuration of the buffer arbitration units 77 and 78 and the DMAC 91 are connected. The buffer arbitration unit 78 detects the transfer completion signal Read_end signal from the control register 781 and the read-side DMAC channel. A detection unit 783, a write update detection unit 782 that detects a transfer completion signal Write_end signal from the write-side DMAC channel, a stay counter 784 that counts the stay amount of the intermediate buffer 1, and a control signal to the DMAC 91 according to the number of stay lines And an LDMAC control signal generation unit 785.

<I/P制御ユニット74,76の構成>
I/O制御ユニット74,76の構成は基本的にI/P制御ユニット72の構成と同等である。
<Configuration of I / P control units 74 and 76>
The configuration of the I / O control units 74 and 76 is basically the same as that of the I / P control unit 72.

異なるのはバッファチャンネルの数のみで、I/O制御ユニット74のチャンネル数が「1」であるためにデータ調停ユニット72bに該当するユニットはない。   Only the number of buffer channels is different. Since the number of channels of the I / O control unit 74 is “1”, there is no unit corresponding to the data arbitration unit 72b.

バッファ調停部77,78は、構成は全く同じで、接続されるI/O制御ユニット76内のチャンネル数が1,I/P制御ユニット76内のチャンネル数が2になっている点が異なっているだけである。転送終了信号はI/O制御ユニットではライン、I/P制御ユニット76では2次元(以降タイルと記述する)の転送終了信号がバッファ調停部78に接続されている。I/P制御ユニット76のタイル転送終了信号を使用するのは同一ラインを重複して読み出すことで副走査方向の解像度変換を可能にするためである。   The buffer arbitration units 77 and 78 have the same configuration except that the number of channels in the connected I / O control unit 76 is 1, and the number of channels in the I / P control unit 76 is two. There is only. The transfer end signal is connected to the buffer arbitration unit 78 in the I / O control unit, and the I / P control unit 76 is connected to the buffer arbitration unit 78 in a two-dimensional (hereinafter referred to as tile) transfer end signal. The reason why the tile transfer end signal of the I / P control unit 76 is used is to enable resolution conversion in the sub-scanning direction by reading the same line repeatedly.

図32は、本発明に係る画像処理装置におけるモード設定例を説明する図であり、例えば記録モード毎のDEC_VALUE、TRIGGER_LINE、RING_LINEの設定例である。   FIG. 32 is a diagram for explaining an example of mode setting in the image processing apparatus according to the present invention. For example, DEC_VALUE, TRIGGER_LINE, and RING_LINE are set for each recording mode.

この設定及びDMAC91のI/P制御ユニット76の設定は記録動作の開始前に行い、開始後に設定を変更しなくても、継続的にバッファの管理を行うことが出来る。   This setting and the setting of the I / P control unit 76 of the DMAC 91 are performed before the start of the recording operation, and the buffer can be continuously managed without changing the setting after the start of the recording operation.

図33は、図1に示したLBPI/F部40へのデータ転送とDMAC91のチャンネル対応を示す図であり、メインメモリ上に確保される中間バッファ100からデータを読み出してLBP45へ出力するまでの流れに対応する。   FIG. 33 is a diagram showing the data transfer to the LBPI / F unit 40 shown in FIG. 1 and the channel correspondence of the DMAC 91 until data is read from the intermediate buffer 100 secured on the main memory and output to the LBP 45. Corresponds to the flow.

例えばLBP45が1ビームプリンタで構成される場合は、図33の(a)に示すように、DMAC91のch10、LBPI/F部40のch10のみを使用する。中間バッファに展開される印字イメージをライン順次にLBPI/F部40に転送し、LBP45で印字出力する。   For example, when the LBP 45 is configured by a one-beam printer, only the ch10 of the DMAC 91 and the ch10 of the LBPI / F unit 40 are used as shown in FIG. The print image developed in the intermediate buffer is transferred line by line to the LBPI / F unit 40 and printed out by the LBP 45.

LBP45が2ビームプリンタで構成される場合は図33の(b)に示すように、DMAC91のch10、LBPI/F部40のch1は中間バッファに展開される印字イメージの奇数ラインをライン順次にLBPI/F部40に転送し、LBP45で印字出力する。DMAC91のch11、LBPI/F部40のch2は中間バッファに展開される印字イメージの偶数ラインをライン順次にLBPI/F部40に転送し、LBP45で印字出力する。   When the LBP 45 is constituted by a two-beam printer, as shown in FIG. 33 (b), the ch10 of the DMAC 91 and the ch1 of the LBPI / F unit 40 are LBPI in order of the odd lines of the print image developed in the intermediate buffer. The data is transferred to the / F unit 40 and printed out by the LBP 45. The ch11 of the DMAC 91 and the ch2 of the LBPI / F unit 40 transfer the even lines of the print image developed in the intermediate buffer to the LBPI / F unit 40 in a line-sequential manner and print out at the LBP 45.

DEC_VALUEはLBP45のビーム数によって異なる。ビーム数が1の時には読み出し側のI/P制御ユニット76のch10のみを使用するので、転送完了信号Read_end一回の発生に対してライン数1だけ滞留数から減算する。ビーム数が2の時には読み出し側のI/P制御ユニット76のch10のみを使用するので、転送完了信号Read_end一回の発生に対してライン数2だけ滞留数から減算する。   DEC_VALUE differs depending on the number of LBP 45 beams. When the number of beams is 1, only the channel 10 of the I / P control unit 76 on the reading side is used. Therefore, the number of lines is subtracted from the staying number by one for each occurrence of the transfer completion signal Read_end. When the number of beams is 2, only the channel 10 of the I / P control unit 76 on the reading side is used, so that the number of lines is subtracted from the staying number by 2 for one generation of the transfer completion signal Read_end.

以上説明したとおり、ライン・エンド信号及びブロック・エンド信号により、オフセット情報(OFF1A、OFF2A、OFF3)を動的に切り替えることにより、画像処理されたデータをメインメモリ100の所定の領域にDMA転送し、格納することができる。   As described above, the image-processed data is DMA-transferred to a predetermined area of the main memory 100 by dynamically switching the offset information (OFF1A, OFF2A, OFF3) by the line end signal and the block end signal. Can be stored.

<他の実施形態>
上記実施形態では、各種画像入出力機能を有する複合型の画像処理装置で、本発明を説明したが、本発明はこれに限るものではなく、単機能のスキャナ装置、プリンタ装置、あるいは他の装置に拡張接続するためのオプションカード等にも、適用可能である。また、本発明に関わる装置のユニット構成も限定するものではなく、例えば、ネットワークを介して接続された複数の装置により、達成されるように、本発明に関わる装置またはシステムを構成してもよい。
<Other embodiments>
In the above embodiment, the present invention has been described with a composite image processing apparatus having various image input / output functions. However, the present invention is not limited to this, and a single-function scanner apparatus, printer apparatus, or other apparatus. The present invention can also be applied to an option card for expansion connection. Further, the unit configuration of the apparatus related to the present invention is not limited, and for example, the apparatus or system related to the present invention may be configured to be achieved by a plurality of apparatuses connected via a network. .

上記各実施形態によれば、中間バッファを介して矩形形状を単位として入出力を行う画像ブロックを備えた画像処理装置において、ブロック間の中間バッファのサイズを処理内容と能力に応じて最適化できる。   According to each of the above embodiments, in an image processing apparatus including an image block that performs input / output in units of a rectangular shape via an intermediate buffer, the size of the intermediate buffer between blocks can be optimized according to the processing content and capability. .

更に、上記中間バッファの制御に於いてソフトウエアのバッファ管理負荷を逓減させることが可能になる。   Furthermore, it is possible to reduce the buffer management load of software in the control of the intermediate buffer.

また、画像処理モードに応じた矩形領域をメモリ上に設定し、この矩形領域の単位を切り替えることにより、各画像処理モードに応じた解像度、高精彩処理を実現することが可能になる。   Further, by setting a rectangular area corresponding to the image processing mode on the memory and switching the unit of the rectangular area, it is possible to realize resolution and high-definition processing corresponding to each image processing mode.

また、画像処理モードに応じて、所定ののり代量を含む矩形領域を設定し、この矩形領域単位に画像処理を行うことにより、各画像処理部の個別のラインバッファの介在無しに所定の画像処理を実行することが可能になる。   In addition, by setting a rectangular area including a predetermined margin amount according to the image processing mode and performing image processing in units of the rectangular area, a predetermined image can be obtained without intervening individual line buffers in each image processing unit. It becomes possible to execute processing.

以下、図34に示すメモリマップを参照して本発明に係る印刷装置で読み取り可能なデータ処理プログラムの構成について説明する。   The configuration of a data processing program that can be read by the printing apparatus according to the present invention will be described below with reference to the memory map shown in FIG.

図34は、本発明に係る印刷装置で読み取り可能な各種データ処理プログラムを格納する記憶媒体のメモリマップを説明する図である。   FIG. 34 is a diagram illustrating a memory map of a storage medium that stores various data processing programs readable by the printing apparatus according to the present invention.

なお、特に図示しないが、記憶媒体に記憶されるプログラム群を管理する情報、例えばバージョン情報,作成者等も記憶され、かつ、プログラム読み出し側のOS等に依存する情報、例えばプログラムを識別表示するアイコン等も記憶される場合もある。   Although not particularly illustrated, information for managing a program group stored in the storage medium, for example, version information, creator, etc. is also stored, and information depending on the OS on the program reading side, for example, a program is identified and displayed. Icons may also be stored.

さらに、各種プログラムに従属するデータも上記ディレクトリに管理されている。また、各種プログラムをコンピュータにインストールするためのプログラムや、インストールするプログラムが圧縮されている場合に、解凍するプログラム等も記憶される場合もある。   Further, data depending on various programs is also managed in the directory. In addition, a program for installing various programs in the computer, and a program for decompressing when the program to be installed is compressed may be stored.

本実施形態における図17,図18,図26,図27に示す機能が外部からインストールされるプログラムによって、ホストコンピュータにより遂行されていてもよい。そして、その場合、CD−ROMやフラッシュメモリやFD等の記憶媒体により、あるいはネットワークを介して外部の記憶媒体から、プログラムを含む情報群を出力装置に供給される場合でも本発明は適用されるものである。   The functions shown in FIGS. 17, 18, 26, and 27 in this embodiment may be performed by a host computer by a program installed from the outside. In this case, the present invention is applied even when an information group including a program is supplied to the output device from a storage medium such as a CD-ROM, a flash memory, or an FD, or from an external storage medium via a network. Is.

以上のように、前述した実施形態の機能を実現するソフトウエアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、本発明の目的が達成されることは言うまでもない。   As described above, a storage medium storing software program codes for realizing the functions of the above-described embodiments is supplied to the system or apparatus, and the computer (or CPU or MPU) of the system or apparatus stores the storage medium in the storage medium. It goes without saying that the object of the present invention can also be achieved by reading and executing the programmed program code.

この場合、記憶媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the novel function of the present invention, and the storage medium storing the program code constitutes the present invention.

従って、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。   Therefore, as long as it has the function of the program, the form of the program such as an object code, a program executed by an interpreter, or script data supplied to the OS is not limited.

プログラムを供給するための記憶媒体としては、例えばフレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVDなどを用いることができる。   As a storage medium for supplying the program, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD, etc. Can be used.

この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

その他、プログラムの供給方法としては、クライアントコンピュータのブラウザを用いてインターネットのホームページに接続し、該ホームページから本発明のコンピュータプログラムそのもの、もしくは、圧縮され自動インストール機能を含むファイルをハードディスク等の記録媒体にダウンロードすることによっても供給できる。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバやftpサーバ等も本発明の請求項に含まれるものである。   As another program supply method, a browser of a client computer is used to connect to a homepage on the Internet, and the computer program itself of the present invention or a compressed file including an automatic installation function is stored on a recording medium such as a hard disk from the homepage. It can also be supplied by downloading. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server, an ftp server, and the like that allow a plurality of users to download a program file for realizing the functional processing of the present invention on a computer are also included in the claims of the present invention.

また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。   In addition, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM, distributed to users, and key information for decryption is downloaded from a homepage via the Internet to users who have cleared predetermined conditions. It is also possible to execute the encrypted program by using the key information and install the program on a computer.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) or the like running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, after the program code read from the storage medium is written to a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the case where the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.

本発明は上記実施形態に限定されるものではなく、本発明の趣旨に基づき種々の変形(各実施形態の有機的な組合せを含む)が可能であり、それらを本発明の範囲から排除するものではない。   The present invention is not limited to the above embodiments, and various modifications (including organic combinations of the embodiments) are possible based on the spirit of the present invention, and these are excluded from the scope of the present invention. is not.

本発明の様々な例と実施形態を示して説明したが、当業者であれば、本発明の趣旨と範囲は、本明細書内の特定の説明に限定されるのではない。   Although various examples and embodiments of the present invention have been shown and described, those skilled in the art will not limit the spirit and scope of the present invention to the specific description in the present specification.

尚、本発明は、上記した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。   It should be noted that the present invention is not limited to the above-described embodiment, and it is needless to say that various modifications can be made without departing from the gist of the present invention.

本発明の一実施形態を示す画像処理装置の概略的な構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an image processing apparatus according to an embodiment of the present invention. 図1に示したスキャナI/F部の概略的な構成を示すブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of a scanner I / F unit illustrated in FIG. 1. 図2に示したCCDによる出力信号例を説明するタイミングチャートである。3 is a timing chart for explaining an example of an output signal from the CCD shown in FIG. 2. 図2に示したCISに対するLEDの点灯制御に関するタイミングチャートである。It is a timing chart regarding the lighting control of LED with respect to CIS shown in FIG. 図4に示したタイミングチャートに従った、R、G、Bに対応するLEDの点灯((a)〜(d))とその点灯時間内に蓄積されたLEDの反射光により光電変換された出力(e)との関係を示すタイミングチャートである。According to the timing chart shown in FIG. 4, the LEDs corresponding to R, G, and B are turned on ((a) to (d)), and the output is photoelectrically converted by the reflected light of the LEDs accumulated during the lighting time. It is a timing chart which shows the relationship with (e). 図2に示したLEDの点灯制御動作を説明するタイミングチャートである。3 is a timing chart for explaining an LED lighting control operation shown in FIG. 2. 図2に示したCISが主走査方向に2チャンネル設けられた場合の出力例を示すタイミングチャートである。3 is a timing chart showing an output example when the CIS shown in FIG. 2 is provided with two channels in the main scanning direction. 図2に示したAFEの構成を説明するブロック図である。FIG. 3 is a block diagram illustrating a configuration of the AFE illustrated in FIG. 2. 図1に示した画像処理DMACの概略的な構成を説明するブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of the image processing DMAC illustrated in FIG. 1. 図1に示したバッファ調停部の概略構成とDMACとの接続関係を説明するブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of a buffer arbitration unit illustrated in FIG. 1 and a connection relationship between DMACs. 図10に示したバッファ調停部とDMACとの動作を説明するためのタイミングチャートである。It is a timing chart for demonstrating operation | movement of the buffer arbitration part shown in FIG. 10, and DMAC. 図10に示したI/O制御ユニットがメインメモリ(SDRAM)に1チャンネル分のデータを書き込む処理を説明する図である。FIG. 11 is a diagram illustrating a process in which the I / O control unit shown in FIG. 10 writes data for one channel in a main memory (SDRAM). 図1に示した画像処理DMACによるSDRAMに対するデータ格納処理を説明する図である。It is a figure explaining the data storage process with respect to SDRAM by the image processing DMAC shown in FIG. 図1に示した画像処理DMACによるデータ書き込み処理例を説明する図である。It is a figure explaining the example of a data writing process by the image processing DMAC shown in FIG. 図1に示したメインメモリを所定の矩形領域(ブロック)に分割した状態を示す図である。It is a figure which shows the state which divided | segmented the main memory shown in FIG. 1 into the predetermined | prescribed rectangular area (block). 図1に示したメインメモリに必要となる容量を画像処理モード別に例示する図である。It is a figure which illustrates the capacity | capacitance required for the main memory shown in FIG. 1 according to image processing mode. 本発明に係る画像処理装置における第1のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 1st data processing procedure in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における第2のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 2nd data processing procedure in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置におけるデータ読み出し処理を説明する図である。It is a figure explaining the data reading process in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における読み取りモード毎のDEC_VALUE、TRIGGER_LINE、RING_LINEの設定例を示す図である。It is a figure which shows the example of a setting of DEC_VALUE, TRIGGER_LINE, and RING_LINE for every reading mode in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置におけるデータ処理例を説明する図である。It is a figure explaining the example of a data processing in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における各画像処理に要する矩形領域のサイズを説明する模式図である。It is a schematic diagram explaining the size of the rectangular area required for each image processing in the image processing apparatus according to the present invention. 本発明に係る画像処理装置における画像処理領域を説明する図である。It is a figure explaining the image processing area | region in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における画像処理モード別(カラーコピーモード、モノクロコピーモード、スキャナモード)ののり代を例示する図である。It is a figure which illustrates the margin for each image processing mode (color copy mode, monochrome copy mode, scanner mode) in the image processing apparatus according to the present invention. 本発明に係る画像処理装置における矩形データのDMA転送処理状態を説明する図である。It is a figure explaining the DMA transfer processing state of the rectangular data in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における第3のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 3rd data processing procedure in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における第4のデータ処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the 4th data processing procedure in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における画像処理済みデータの格納処理を説明する図である。It is a figure explaining the storage process of the image processed data in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置における要部構成を説明する図である。It is a figure explaining the principal part structure in the image processing apparatus which concerns on this invention. 図29に示した変倍処理ブロック(LIP)とI/P制御ユニットとの動作を説明するタイミングチャートである。FIG. 30 is a timing chart for explaining operations of a scaling processing block (LIP) and an I / P control unit shown in FIG. 29. FIG. 本発明に係る画像処理装置における画像データの展開処理例を説明する図である。It is a figure explaining the example of expansion | deployment processing of the image data in the image processing apparatus which concerns on this invention. 本発明に係る画像処理装置におけるモード設定例を説明する図である。It is a figure explaining the example of a mode setting in the image processing apparatus which concerns on this invention. 図1に示したLBPI/Fへのデータ転送とDMACのチャンネル対応を示す図である。It is a figure which shows the data transfer to LBPI / F shown in FIG. 1, and a DMAC channel correspondence. 本発明に係る印刷装置で読み取り可能な各種データ処理プログラムを格納する記憶媒体のメモリマップを説明する図である。It is a figure explaining the memory map of the storage medium which stores the various data processing program which can be read with the printing apparatus which concerns on this invention. 従来の画像処理装置におけるスキャナ画像処理回路・記録画像処理回路の構成を示すブロック図である。It is a block diagram which shows the structure of the scanner image processing circuit and the recording image processing circuit in the conventional image processing apparatus.

符号の説明Explanation of symbols

15 AFE
17 CCD
18 CIS
77,78 バッファ調停部
91 画像処理DMAC
100 メインメモリ
15 AFE
17 CCD
18 CIS
77, 78 Buffer arbitration unit 91 Image processing DMAC
100 main memory

Claims (10)

画像入力手段によって入力された前記画像データを主走査方向にそって、順次メモリに書き込む書込手段と、
前記書き込み手段によって前記メモリに書き込まれた前記画像データが所定の副走査幅分蓄積されたかどうか判断する判断手段と、
前記メモリに書き込まれた前記画像データを主走査方向に所定の主走査幅で分割し、
前記所定の主走査幅と前記所定の副走査幅からなる矩形形状単位で前記画像データを前記メモリから画像処理手段に出力するために画像を読み出す読出手段と、
前記メモリに蓄積された前記画像データ量が前記矩形形状で読出し可能であるかどうかに基づいて、前記読出手段により前記矩形形状での読出しを行うよう調停する調停手段と、
を有することを特徴とする画像処理装置。
Writing means for sequentially writing the image data input by the image input means to the memory along the main scanning direction;
Determining means for determining whether the image data written in the memory by the writing means has been accumulated for a predetermined sub-scanning width;
Dividing the image data written in the memory in a main scanning direction with a predetermined main scanning width;
Reading means for reading out the image data in order to output the image data from the memory to the image processing means in a rectangular shape unit comprising the predetermined main scanning width and the predetermined sub-scanning width;
Based on whether or not the image data amount stored in the memory is readable in the rectangular shape, arbitration means for arbitrating to read out the rectangular shape by the reading means;
An image processing apparatus comprising:
前記メモリに蓄積された前記画像データ量を計数する計数手段を有し、
前記書込手段が主走査方向に1ラインの前記画像データが書き込まれるごとに前記計数手段をカウントアップし、前記読出手段が、前記矩形形状単位ごとに主走査方向に前記1ライン分読み出すごとに所定数減算することを特徴とする請求項1記載の画像処理装置。
Counting means for counting the amount of image data stored in the memory;
The writing unit counts up each time the image data of one line is written in the main scanning direction, and the reading unit reads out the one line in the main scanning direction for each rectangular unit. The image processing apparatus according to claim 1, wherein a predetermined number is subtracted.
前記画像入力手段によって入力された画像データを前記画像入力手段の入力方式に従って一時的に蓄積する蓄積手段を有し、
前記書込手段は、前記蓄積手段に蓄積された画像データを前記画像入力手段の入力方式にしたがって前記メモリに書き込み動作を行い、前記読出手段は、前記画像入力手段の入力方式によらずに読み出すことを特徴とする請求項1または2に記載の画像処理装置。
Storage means for temporarily storing the image data input by the image input means according to the input method of the image input means;
The writing means writes the image data stored in the storage means into the memory according to the input method of the image input means, and the reading means reads regardless of the input method of the image input means. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記調停手段は、残量検出部を備え、前記メモリのフル状態が発生すると、前記書込手段に対して停止信号を出力し、書き込み側の動作を停止させること特徴とする請求項1ないし3のいずれかに記載の画像処理装置。   4. The arbitration unit includes a remaining amount detection unit, and outputs a stop signal to the writing unit to stop the operation on the writing side when the memory is full. An image processing apparatus according to any one of the above. 前記調停手段は、トリガ発生手段を備え、予め決められた読み出し側の処理ライン単位分の所定ライン数のデータが前記メモリに蓄積されると、前記読出手段に起動信号を出力し、読み出し制御を開始させること特徴とする請求項1ないし4のいずれか記載の画像処理装置。   The arbitration unit includes a trigger generation unit, and when a predetermined number of lines of data corresponding to a processing line unit on a read side is accumulated in the memory, an output signal is output to the read unit to perform read control. The image processing apparatus according to claim 1, wherein the image processing apparatus is started. 前記所定の矩形形状単位は、画像処理モードに基づいて可変量に設定可能とすることを特徴とする請求項1ないし6のいずれかに記載の画像処理装置。   7. The image processing apparatus according to claim 1, wherein the predetermined rectangular shape unit can be set to a variable amount based on an image processing mode. 前記書込み手段は、複数タイプの画像読み取りデバイスを接続可能とすることを特徴とする請求項1ないし6のいずれかに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the writing unit is capable of connecting a plurality of types of image reading devices. 画像入力手段によって入力された前記画像データを主走査方向にそって、順次メモリに書き込む書込ステップと、
前記書き込みステップによって前記メモリに書き込まれた前記画像データが所定の副走査幅分蓄積されたかどうか判断する判断ステップと、
前記メモリに書き込まれた前記画像データを主走査方向に所定の主走査幅で分割し、前記所定の主走査幅と前記所定の副走査幅からなる矩形形状単位で前記画像データを前記メモリから画像処理手段に出力するために画像を読み出す読出ステップと、
前記メモリに蓄積された前記画像データ量が前記矩形形状での読出し可能であるかどうかに基づいて、前記読出手段により前記矩形形状での読出しを行うよう調停する調停ステップと、
を有することを特徴とする画像処理方法。
A writing step of sequentially writing the image data input by the image input means in the memory along the main scanning direction;
A determination step of determining whether or not the image data written in the memory by the writing step has been accumulated for a predetermined sub-scanning width;
The image data written in the memory is divided by a predetermined main scanning width in the main scanning direction, and the image data is read from the memory in units of a rectangular shape including the predetermined main scanning width and the predetermined sub scanning width. A reading step for reading the image for output to the processing means;
An arbitration step for arbitrating to read out the rectangular shape by the reading means based on whether the image data amount stored in the memory is readable in the rectangular shape;
An image processing method comprising:
請求項8記載の画像処理方法を実現するプログラムを記憶したことを特徴とするコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing a program for realizing the image processing method according to claim 8. 請求項8記載の画像データ処理方法を実現することを特徴とするプログラム。   A program for realizing the image data processing method according to claim 8.
JP2003359581A 2003-10-20 2003-10-20 Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program Pending JP2005124071A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003359581A JP2005124071A (en) 2003-10-20 2003-10-20 Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003359581A JP2005124071A (en) 2003-10-20 2003-10-20 Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program

Publications (1)

Publication Number Publication Date
JP2005124071A true JP2005124071A (en) 2005-05-12

Family

ID=34615761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003359581A Pending JP2005124071A (en) 2003-10-20 2003-10-20 Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program

Country Status (1)

Country Link
JP (1) JP2005124071A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008299519A (en) * 2007-05-30 2008-12-11 Ricoh Co Ltd Image processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008299519A (en) * 2007-05-30 2008-12-11 Ricoh Co Ltd Image processor

Similar Documents

Publication Publication Date Title
US7495669B2 (en) Image processing apparatus and image processing method
US7123385B2 (en) Image processing apparatus
JP3732702B2 (en) Image processing device
US7817297B2 (en) Image processing apparatus and image processing method
JP4384124B2 (en) Image processing apparatus and image processing method
JP3939855B2 (en) Double-sided original reading method and apparatus
KR100386095B1 (en) Method and apparatus for processing images,and a computer product
JP2004220584A (en) Image processing device and image processing method
JP3870190B2 (en) Image processing device
US7072058B1 (en) Image processing apparatus
US20090244577A1 (en) Image processing apparatus and image forming apparatus
US6930808B2 (en) Image processing apparatus and method
JP2005124071A (en) Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program
US6963420B1 (en) Image processing apparatus
JP2005173926A (en) Image processing apparatus, method, program, and storage medium
JPH10178537A (en) Image processor and method therefor
JP5304169B2 (en) Image processing apparatus and image processing method
JP4328608B2 (en) Image processing apparatus, method, program, and storage medium
JP2000032258A (en) Image processing unit and image processing method
JP2007058878A (en) Image processor, image processing method and computer readable recording medium recording program executing its method by computer
JP4328609B2 (en) Image processing apparatus, method, program, and storage medium
JP3887135B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing program for causing computer to execute the method
JP2007194955A (en) Image processing device
JP2001184502A (en) Device and method for processing image and computer readable recording medium with recorded program for computer to execute the same method
JP2006166251A (en) Image processing apparatus and control method thereof