JP4384124B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP4384124B2
JP4384124B2 JP2006021423A JP2006021423A JP4384124B2 JP 4384124 B2 JP4384124 B2 JP 4384124B2 JP 2006021423 A JP2006021423 A JP 2006021423A JP 2006021423 A JP2006021423 A JP 2006021423A JP 4384124 B2 JP4384124 B2 JP 4384124B2
Authority
JP
Japan
Prior art keywords
image processing
data
image
memory
area
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.)
Expired - Fee Related
Application number
JP2006021423A
Other languages
Japanese (ja)
Other versions
JP2006139803A (en
Inventor
勝利 牛田
誠 福尾
善昭 片平
浩一 森下
裕一 直井
康幸 仲村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2006021423A priority Critical patent/JP4384124B2/en
Publication of JP2006139803A publication Critical patent/JP2006139803A/en
Application granted granted Critical
Publication of JP4384124B2 publication Critical patent/JP4384124B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Input (AREA)

Description

本発明は、画像処理装置及び画像処理方法に関するものである。   The present invention relates to an image processing apparatus and an image processing method.

従来の画像処理装置における、スキャナ画像処理回路の構成を示すブロック図を図27に示す。画像読み取りデバイスとしては、CCD2010またはCIS2110といった光学素子が用いられる。主走査方向のライン単位に所定の出力形式に従ったデータが、それぞれCCDインタフェース(I/F)回路2000、CISインタフェース(I/F)回路2100によりA/D変換され、メインメモリ2200に格納される。この場合、CCD2010はR、G、Bに対応したデータがそれぞれパラレルに出力されるの対し、CIS2110から出力される信号はLEDの点灯順位に従い、R,G、Bのデータがシリアルに出力される。この出力データの特性の相違により、それぞれ専用のインタフェース回路が設けられ、所定のA/D変換処理を経て、読み取られた画像データがメインメモリ(SDRAM)2200に格納される構成となっていた。   FIG. 27 is a block diagram showing the configuration of the scanner image processing circuit in the conventional image processing apparatus. As the image reading device, an optical element such as a CCD 2010 or CIS 2110 is used. Data according to a predetermined output format for each line in the main scanning direction is A / D converted by the CCD interface (I / F) circuit 2000 and the CIS interface (I / F) circuit 2100, respectively, and stored in the main memory 2200. The In this case, the CCD 2010 outputs data corresponding to R, G, and B in parallel, while the signal output from the CIS 2110 outputs R, G, and B data serially according to the lighting order of the LEDs. . Due to the difference in characteristics of the output data, a dedicated interface circuit is provided, and the read image data is stored in the main memory (SDRAM) 2200 through a predetermined A / D conversion process.

また、図27において、各画像処理ブロック(シェーディング補正(SHD)2300、文字判定処理2320、フィルタ処理2340等)には、専用のラインバッファ2400a〜dが設けられている。このような回路構成において、メインメモリ(SDRAM)2200に格納されたデータを、主走査方向に複数ライン分読み出し、専用のラインバッファ(2400a〜d)に格納して、個別の画像処理を施すという構成が採られていた。   In FIG. 27, dedicated line buffers 2400a to 2400d are provided in each image processing block (shading correction (SHD) 2300, character determination processing 2320, filter processing 2340, etc.). In such a circuit configuration, the data stored in the main memory (SDRAM) 2200 is read for a plurality of lines in the main scanning direction, stored in dedicated line buffers (2400a to 2400d), and subjected to individual image processing. The composition was taken.

上記の従来例の構成を開示する先行技術としては、例えば、特許文献1により開示されるものがある。
特開平7−170372号公報
As a prior art disclosing the configuration of the above-described conventional example, there is one disclosed in Patent Document 1, for example.
JP-A-7-170372

しかしながら、各処理部毎に専用のラインバッファ2400a〜dを設ける回路構成では、処理できる主走査方向の最大画素数は各処理部に設けられた専用のラインバッファのメモリ容量に依存することとなり、処理のスループットを制限する要因となっていた。   However, in the circuit configuration in which dedicated line buffers 2400a to 2400d are provided for each processing unit, the maximum number of pixels that can be processed in the main scanning direction depends on the memory capacity of the dedicated line buffer provided in each processing unit. This was a factor limiting the throughput of processing.

また、処理能力を向上させるために、画像処理回路のハードウエア構成において、ラインバッファの容量の増加はコスト負担を大きくし、画像処理装置全体の低コスト化を阻む要因となっていた。例えば、装置の解像度や主走査幅などを向上させようとすると、ラインバッファの容量の増加が必要であった。   Further, in order to improve the processing capability, in the hardware configuration of the image processing circuit, an increase in the capacity of the line buffer increases the cost burden, and hinders cost reduction of the entire image processing apparatus. For example, in order to improve the resolution and main scanning width of the apparatus, it is necessary to increase the capacity of the line buffer.

上記課題を鑑み、画像処理モードに応じた矩形領域をメモリ上に設定し、この矩形領域の単位を切り替えることにより、各画像処理モードに応じた解像度、高精彩処理を実現する画像処理装置等を提供することを目的とする。   In view of the above problems, by setting a rectangular area according to the image processing mode on the memory and switching the unit of the rectangular area, an image processing apparatus that realizes resolution and high-definition processing according to each image processing mode, etc. The purpose is to provide.

あるいは、画像処理モードに応じて、所定ののり代量を含む矩形領域を設定し、この矩形領域単位に画像処理を行なうことにより、各画像処理部の個別のラインバッファの介在無しに所定の画像処理を実行する画像処理装置等を提供することを目的とする。   Alternatively, according to the image processing mode, a rectangular area including a predetermined margin is set, and image processing is performed in units of the rectangular area, so that a predetermined image can be obtained without intervening individual line buffers in each image processing unit. An object of the present invention is to provide an image processing apparatus or the like that executes processing.

あるいは、画像処理装置の主走査幅、解像度を変更してもラインバッファの容量の増加によらず対応することが可能な画像処理装置等を提供することを目的とする。   Another object of the present invention is to provide an image processing apparatus and the like that can cope with changes in the main scanning width and resolution of the image processing apparatus without increasing the capacity of the line buffer.

上記目的を達成するべく、本発明にかかる画像処理装置は主として以下の構成を備えることを特徴とする。   In order to achieve the above object, an image processing apparatus according to the present invention mainly includes the following configuration.

すなわち、画像処理装置は、
画像データを入力する入力手段と、
前記入力手段により入力された画像データを記憶する第1メモリと、
前記第1メモリに記憶された画像データを、前記入力手段により入力された前記画像データを分割して得られる有効画素領域と前記有効画素領域に隣接する隣接領域とを含む矩形領域ごとに読み出すための第1のアドレス情報を生成するアドレス生成手段と、
前記生成された前記第1のアドレス情報に基づいて、前記入力手段により入力された前記画像データを前記矩形領域単位で前記第1メモリから読出して第2メモリに転送する転送手段と、
複数種類の画像処理を実行するための複数の画像処理部を有し、複数の画像処理モードに含まれるいずれかの画像処理モードで、前記第2メモリに記憶された前記矩形領域単位の画像データに対して前記複数種類の画像処理に含まれる2以上の画像処理を連続的に実行する画像処理手段と、
前記画像処理手段が実行する前記画像処理モードを設定する設定手段とを有し、
前記第2メモリは、前記設定された画像処理モードで用いられる2以上の画像処理部が前記第2メモリに記憶された前記矩形領域の画像データに前記2以上の画像処理を連続的に実行するためのバッファメモリとして用いられ、
前記設定手段により設定された画像処理モードにおける前記矩形領域は、前記有効画素領域と、前記設定された画像処理モードで用いられる2以上の画像処理部のそれぞれが前記有効画素領域の画像データに対して画像処理を実行するのに必要な前記隣接領域のサイズに含まれる最大サイズの隣接領域と、を含み、
前記アドレス生成手段は、前記設定された前記画像処理モードで用いられる2以上の画像処理部により連続的に前記2以上の画像処理が実行された前記矩形領域の画像データを前記第1メモリに記憶させるための第2のアドレス情報を生成し、
前記転送手段は、前記生成された第2のアドレス情報に基づいて前記2以上の画像処理が実行された前記矩形領域の画像データを前記第1メモリに転送することを特徴とする。
That is, the image processing apparatus
Input means for inputting image data;
A first memory for storing image data input by the input means;
The image data stored in the first memory, read for each rectangular area including an adjacent region adjacent to the effective pixel region and the effective pixel area obtained by dividing an input said image data by said input means Address generating means for generating first address information for issuing;
Transfer means for reading out the image data input by the input means from the first memory in units of the rectangular area and transferring the image data to the second memory based on the generated first address information;
The rectangular area unit image data stored in the second memory in any one of the image processing modes included in the plurality of image processing modes having a plurality of image processing units for executing a plurality of types of image processing image processing means for executing pairs with two or more image processing included in the plurality of types of image processing to continuously,
Anda setting means for setting the image processing mode by the image processing means is performed,
In the second memory, two or more image processing units used in the set image processing mode continuously execute the two or more image processes on the image data of the rectangular area stored in the second memory. Used as a buffer memory for
The rectangular area in the image processing mode set by the setting means includes the effective pixel area and each of two or more image processing units used in the set image processing mode for image data in the effective pixel area. An adjacent area of a maximum size included in the size of the adjacent area necessary for performing image processing,
The address generation unit stores, in the first memory, image data of the rectangular area in which the two or more image processing units are continuously executed by the two or more image processing units used in the set image processing mode. generating a second address information for,
The transfer means transfers the image data of the rectangular area on which the two or more image processes have been executed based on the generated second address information to the first memory .

本発明によれば、矩形領域単位の画像データに画像処理を実行する画像処理装置及び画像処理方法において、画像処理モードに応じて矩形領域を異ならせることにより、各画像処理モードに応じた適切な画像処理を実行することができる。   According to the present invention, in an image processing apparatus and an image processing method for performing image processing on image data in units of rectangular areas, the rectangular areas are made different according to the image processing modes, so that appropriate values corresponding to the respective image processing modes can be obtained. Image processing can be performed.

あるいは、矩形領域単位の画像データを記憶するメモリを複数の画像処理部で共有し、各画像処理部に専用のバッファを設けることなく適切に画像処理を実行するので、主走査幅や解像度を変更してもバッファの容量の増加によらず対応することが可能となる。   Alternatively, the memory that stores image data in units of rectangular areas is shared by multiple image processing units, and image processing is executed appropriately without providing a dedicated buffer for each image processing unit, so the main scanning width and resolution are changed. Even in this case, it is possible to cope with an increase in the buffer capacity.

図1は、本発明の実施形態にかかる画像処理装置200の概略的な構成を示すブロック図である。スキャナインタフェース(以下、「スキャナI/F」という。)部10には、アナログフロントエンド(AFE)15を介して、CCD17、CIS18が接続し、個別の専用回路を介在することなく、その読み取りデータを画像処理装置200に取り込むことができる。スキャナI/F部10のデータ処理については、後に詳細に説明する。   FIG. 1 is a block diagram showing a schematic configuration of an image processing apparatus 200 according to an embodiment of the present invention. A scanner interface (hereinafter referred to as “scanner I / F”) unit 10 is connected to a CCD 17 and a CIS 18 via an analog front end (AFE) 15, and the read data without interposing dedicated dedicated circuits. 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, which corresponds to the image processing operation mode (color copy, monochrome copy, color scan, monochrome scan, etc.) for the image data developed in the main memory 100 by the processing of the scanner I / F unit 10. A processing unit that executes the image processing. Details of the scanner image processing unit 20 will be described later.

プリンタ画像処理部30は、画像処理の結果、得られた画像データをプリンタ出力するための処理ユニットであり、LBPインタフェース(I/F)40を介して接続するレーザビームプリンタ(LBP)45に画像処理結果を出力するための処理を実行する。   The printer image processing unit 30 is a processing unit for outputting image data obtained as a result of image processing to a printer, and an image is connected to a laser beam printer (LBP) 45 connected through an LBP interface (I / F) 40. Execute processing to output the processing result.

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はメモリ制御部であり、画像処理系の第1BUS80及びコンピュータ系の第2BUS85と接続し、メインメモリ(SDRAM)100に対するデータの書き込み、読み出しに関するDMA制御を実行する処理ユニット(LDMAC_A〜F(105a〜105f))の全体的な制御を行なう。ここで、「DMA(DirectMemoryAccess)」とは、主記憶装置と周辺装置の間において、データを直接移動させる処理をいう。   Reference numeral 70 denotes a memory control unit, which is connected to the first BUS 80 of the image processing system and the second BUS 85 of the computer system, and is a processing unit (LDMAC_A to F (105a) for executing DMA control related to writing and reading of data with respect to the main memory (SDRAM) 100. To 105f)). Here, “DMA (Direct Memory Access)” refers to processing for directly moving data between the main storage device and the peripheral device.

上述のスキャナI/F部10、スキャナ画像処理部20、プリンタ画像処理部30、LBPI/F部40、JPEG処理部50及びJBIG処理部60と、第1BUS80との間には、各処理部(10〜60)に対応し、画像データのDMA制御を実行するための処理ユニット(LDMAC_A〜F(105a〜105f)が接続している。   Between the above-described scanner I / F unit 10, scanner image processing unit 20, printer image processing unit 30, LBPI / F unit 40, JPEG processing unit 50, JBIG processing unit 60, and the first BUS 80, each processing unit ( 10 to 60), processing units (LDMAC_A to F (105a to 105f)) for executing DMA control of image data are connected.

各LDMAC_A〜F(105a〜105f)は、各画像処理部(10〜60)とメインメモリ100との間のデータ授受に関し、DMA制御を実行するための所定のアドレス情報を生成し、この情報に基づいてDMAを制御する。例えば、LDMAC_A(105a)は、画像読み取りデバイスの種類、CCD17、CIS18の別に応じて、スキャナI/F部10で読み取り処理された画像データをメインメモリ100にDMA転送するためのアドレス情報(DMAを開始するスタートアドレス、メモリのアドレスを切り替えるオフセット情報等)をDMAのチャンネルごとに生成する。また、LDMAC_B(105b)は、メインメモリ100上に展開された画像データを読み出すためのアドレス情報をDMAのチャンネルに応じて生成する。   Each of the LDMAC_A to F (105a to 105f) generates predetermined address information for executing DMA control regarding data exchange between each image processing unit (10 to 60) and the main memory 100, and stores the information in this information. Based on this, the DMA is controlled. For example, the LDMAC_A (105a) stores address information (DMA) for transferring the image data read by the scanner I / F unit 10 to the main memory 100 according to the type of the image reading device, the CCD 17, and the CIS 18. Start address, offset information for switching the memory address, etc.) are generated for each DMA channel. Also, the LDMAC_B (105b) generates address information for reading the image data expanded on the main memory 100 according to the DMA channel.

また、LDMAC_C〜F(105c〜f)についても同様に、所定のアドレス情報を生成し、その情報に基づいてメインメモリ100との間でデータ授受に関するDMA制御を実行することができる。すなわち、LDMAC_C〜F(105c〜f)は、データの書き込みと、読み出しに対応したチャンネルを有し、これらのチャンネルに対応したアドレス情報を生成してDMAを制御する。   Similarly, for LDMAC_C to F (105c to f), predetermined address information can be generated, and DMA control related to data exchange with the main memory 100 can be executed based on the information. In other words, the LDMAC_C to F (105c to f) have channels corresponding to data writing and reading, generate address information corresponding to these channels, and control the DMA.

80は、画像処理系の各処理部(10〜60)間でデータを授受することが可能な第1BUSであり、85は、CPU180、通信及びユーザインタフェース制御部170、メカトロ系制御部125及びROM95が接続するコンピュータ系の第2BUSである。CPU180は、ROM95に格納された制御パラメータや制御プログラムに基づき、上述のLDMAC_A〜F(105a〜f)を制御することができる。   Reference numeral 80 denotes a first BUS capable of transferring data between the processing units (10 to 60) of the image processing system. Reference numeral 85 denotes a CPU 180, a communication and user interface control unit 170, a mechatronics system control unit 125, and a ROM 95. Is the second BUS of the computer system to be connected. The CPU 180 can control the above-described LDMAC_A to F (105a to f) based on the control parameter and the control program stored in the ROM 95.

メカトロ系制御部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に表示するための表示制御を司るユニットである。   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.

140、150は周辺機器との接続を可能にするUSBインタフェース部であり、図1では、BJ−プリンタ175が接続した状態を示している。   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)部であり、接続する機器に対してデータをどのようなタイミングで送り出せばよいか(アクセス)等を制御するユニットである。   Reference numeral 160 denotes a media access control (MAC) unit that controls at what timing (access) data should be sent to a connected device.

180はCPUであり、画像処理装置200の全体的な動作を制御する。   A CPU 180 controls the overall operation of the image processing apparatus 200.

<スキャナI/F部10の構成>
スキャナI/F部10は、画像読み取りデバイスとして、CCD17及びCIS18に対応可能であり、両画像読み取りデバイスの信号を入力処理する。ここで入力された画像データは、LDMAC_A(105a)により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 LDMAC_A (105a) and developed on the main memory 100.

図2はスキャナI/F部10の概略的な構成を示すブロック図である。CCD17/CIS18に対して、タイミング制御部11aは読み取りスピードに応じた読み取りデバイスの制御信号を生成し、出力する。このデバイス制御信号は、スキャナI/F部10内で生成される同期信号に同期するものであり、これにより主走査方向の読み取りタイミングと、読み取り処理の同調を図ることができる。   FIG. 2 is a block diagram illustrating a schematic configuration of the scanner I / F unit 10. For the CCD 17 / CIS 18, the timing controller 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(a)、図4を参照)、クロック信号(CLK、図4等を参照)及びCCD17/CIS18に対応した調光の制御、点灯の開始、消灯の制御を実行する。この制御タイミングは、上述のタイミング制御部から受信する同期信号に基づくものであり、画像読み取りデバイスの駆動と同期した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 (a) (see FIG. 4), clock signal (CLK, see FIG. 4) 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, and the lighting of the LED 19 synchronized with the driving of the image reading device is controlled.

図3(a)〜(d)は、CCD17による出力信号を例示する図である。LED19から照射された光が原稿面を照らし、その反射光がCCD17に導かれ、光電変換される。例えば、主走査方向であるCCD17のライン方向と直角方向(副走査方向)に、読み取り位置を定速移動させながら、その原稿面を主走査方向のライン毎に順次走査して原稿面全体の画像を読み取ることができる。図3(a)に示すとおり、タイミング制御部11aから出力される同期信号(TG)に基づき、CCD17の1ライン分のR、G、B要素に対応した信号がパラレルに出力される(図3(b)、(c)、(d)を参照)。   3A to 3D are diagrams illustrating an output signal from the CCD 17. 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. As shown in FIG. 3A, signals corresponding to R, G, and B elements for one line of the CCD 17 are output in parallel based on the synchronization signal (TG) output from the timing controller 11a (FIG. 3). (See (b), (c), (d)).

一方、図4は、CIS18に対するLED19の点灯制御に関するタイミングチャートであり、LED点灯制御部11bにより生成された同期信号(SP)とクロック(CLK)に基づき、各R、G、BのLEDの点灯開始と消灯のタイミングが制御される。同期信号(SP)の周期はTstgで示され、この時間内に各色(R、G、B)のいずれか、又はこれらの組合わせによりLEDが点灯制御される。Tledは、同期信号(SP)の1周期(Tstg)におけるLEDの点灯時間を示すものである。   On the other hand, FIG. 4 is a timing chart regarding the lighting control of the LED 19 with respect to the CIS 18, and based on the synchronization signal (SP) and the clock (CLK) generated by the LED lighting control unit 11b, the lighting of each R, G, B LED is performed. Start and turn-off timing are controlled. 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).

図5Aは、上述の図4のタイミングチャートに従った、R、G、Bに対応するLEDの点灯((a)〜(d))と、その点灯時間内に蓄積されたLEDの反射光により光電変換された出力(e)と、を示すタイミングチャートである。図5A(e)より明らかなように、R、G、B各色に対応した信号の出力は、R出力、G出力、B出力と、それぞれがシリアルのデータとして出力され、先に説明したCCD17の出力信号とは相違する。   FIG. 5A shows the lighting of LEDs corresponding to R, G, and B ((a) to (d)) according to the timing chart of FIG. 4 described above, and the reflected light of the LED accumulated during the lighting time. It is a timing chart which shows the photoelectrically converted output (e). As is clear from FIG. 5A (e), the output of the signals corresponding to the R, G, and B colors are output as R data, G output, and B output, respectively, as serial data. It is different from the output signal.

また、図5Bは、CIS18の制御に関連し、同期信号(SP)の1周期以内にR、G、Bの各LED19が順次点灯する場合のタイミングを示す図であり、R、G、Bデータの合成により、この場合の画像読み取りデバイスの入力はモノクロ画像のデータとして画像処理装置200に取り込むことが可能になる。   FIG. 5B is a diagram showing the timing when the R, G, B LEDs 19 are sequentially lit within one cycle of the synchronization signal (SP) in relation to the control of the CIS 18, and R, G, B data Thus, the input of the image reading device in this case can be taken into the image processing apparatus 200 as monochrome image data.

図5Cは、CIS18が主走査方向に2チャンネル設けられた場合の出力を例示する図である。チャンネル1の出力(図5Cの(c))は、N番目のCLK信号(図5Cの(b)を参照)の立ち下がりと同期して、任意のダミーのビット列(図5Cの(c)の場合は22ビット)を出力し、その後、有効ビット数3254ビットに対する信号を出力する(図5Cの(c))。一方、チャンネル2の出力(図5Cの(d))は、N番目のCLK信号の立ち下がりと同期して、有効ビット3255ビット目(チャンネル1のセンサ出力の最終ビット3254に後続するビット)から有効ビットとして2794ビットを出力する。   FIG. 5C is a diagram illustrating an output when the CIS 18 is provided with two channels in the main scanning direction. The output of channel 1 ((c) of FIG. 5C) is synchronized with the falling edge of the Nth CLK signal (see (b) of FIG. 5C), and an arbitrary dummy bit string (of (c) of FIG. 5C). In this case, 22 bits) are output, and then a signal corresponding to 3254 effective bits is output ((c) in FIG. 5C). On the other hand, the output of channel 2 ((d) in FIG. 5C) 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に入力される。AFE15の処理は、図6に示すように、CCD17、CIS18の出力信号に対して、ゲイン調整(15a,15d)、A/D変換処理(15b,c,e)を施し、各画像読み取りデバイスより出力されるアナログ信号をデジタル信号に変換して、スキャナI/F部10に入力する。また、AFE15は画像読み取りデバイスより出力されるパラレルなデータをシリアルなデータに変換して出力することができる。   Returning to the block diagram of FIG. 2, the output signal of the image reading device (CCD 17 / CIS 18) is input to an AFE (analog front end) 15. As shown in FIG. 6, the processing of the AFE 15 performs gain adjustment (15a, 15d) and A / D conversion processing (15b, c, e) on the output signals of the CCD 17 and the CIS 18, and from each image reading device. The output analog signal 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,f,g)に格納する。   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, sampling control of the analog signal and generation and output of a synchronous clock for outputting the digital signal to the AFE 15 are received, 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 , F, g).

スキャナ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,f,g)が利用可能な状態に設定される。   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, f, and g) are provided. Set to available state.

カラー画像データを、シングルモードによりCIS18で読み取った場合、AFE15より受信するデータは、図5Aの(e)に示すように、LEDの点灯順位に従ったR,G,Bデータの出力がシリアルに配列したものとなり、出力データ制御部11dは、この配列に従って、データを1つのバッファ(例えば第1バッファ(11e))に格納する。モノクロ画像データをCIS18で読み取った場合でも同様であり、モノクロ画像データが1つのバッファに格納される。   When the 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. 5A (e). 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より受信するデータは、図5Cの(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. 5C and 5D, 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,f,g))に振り分けて格納することができる。   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, f, g)) can be sorted and stored.

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

図7は、画像読み取りデバイス(17、18)により読み取った画像データをメインメモリ(SDRAM)100にDMA転送するためのLDMAC_A(105a)と、メインメモリ100及びスキャナ画像処理部20との間でDMAを制御するLDMAC_B(105b)の概略的な構成を示す図である。   FIG. 7 shows an example of a DMA between the LDMAC_A (105a) for DMA transfer of image data read by the image reading device (17, 18) to the main memory (SDRAM) 100, and the main memory 100 and the scanner image processing unit 20. It is a figure which shows the schematic structure of LDMAC_B (105b) which controls.

75はバッファコントローラであり、メインメモリ100をリングバッファとして使用する場合、データの書き込みと読み出しを調停するために、LDMAC_A(105a)とLDMAC_B(105b)を制御する。   A buffer controller 75 controls the LDMAC_A (105a) and the LDMAC_B (105b) in order to arbitrate data writing and reading when the main memory 100 is used as a ring buffer.

<LDMAC_A(105a)の構成>
ここで、LDMAC_A(105a)は、データ調停ユニット71aと、第1書き込みデータインタフェース(I/F)部71bと、I/Oインタフェース部71cと、を有している。
<Configuration of LDMAC_A (105a)>
Here, the LDMAC_A (105a) 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にデータを格納するために、LDMAC_Aが生成した所定のアドレス情報を第1書き込みデータI/F部71bに設定する。また、スキャナI/F部10より画像データを受信して、LDMAC_A(105a)内の各バッファチャンネル(以下、「チャンネル」という。)(ch0〜ch2)にデータを格納する。   In order to store data in the main memory 100, the I / O interface unit 71c sets predetermined address information generated by the LDMAC_A in the first write data I / F unit 71b. Also, the image data is received from the scanner I / F unit 10 and stored in each buffer channel (hereinafter referred to as “channel”) (ch0 to ch2) in the LDMAC_A (105a).

第1書き込みデータI/F部71bはメインメモリ100に対してデータの書き込みを行なうための第3BUS73と接続し、生成された所定のアドレス情報に従って各チャンネル(ch0〜ch2)に格納されているデータをメインメモリ100にDMA転送する。データ調停ユニット71aは、各チャンネルに格納されているデータの読み出しを行ない、第1書き込みデータI/F部71bの書き込み処理に合わせて各チャンネルのデータの受け渡しを行なう。   The first write data I / F unit 71b is connected to the third BUS 73 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 delivers the data of each channel in accordance with the writing process of the first write data I / F unit 71b.

第1書き込みデータI/F部71bはバッファコントローラ75と接続し、後に説明するLDMAC_B(105b)によるデータの読み出し、若しくは書き込みと、メモリアクセスが競合しないよう制御される。メインメモリ100に対するアクセスの制御により、メインメモリ100をリングバッファとして使用した場合であっても、メインメモリ100に格納されているデータの読み出し前に、同一のメモリアドレスにデータをオーバライトする等のトラブルを防止することができ、メモリリソースを有効に活用することが可能になる。   The first write data I / F unit 71b is connected to the buffer controller 75, and is controlled so that memory access does not compete with data read or write by the LDMAC_B (105b) 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.

<(1)1チャンネルのデータの格納>
図8(a)、(b)は、LDMAC_A105aがメインメモリ(SDRAM)100に1チャンネル分のデータを書き込む処理を説明する図である。図5Aの(e)で示した出力例のように、主走査方向の1ライン分のR、G、Bデータがシリアルに出力され、スキャナI/F部10の1つのバッファ(図2の11(e))にデータが格納された場合、LDMAC_A(105a)内の対応する1つのチャンネル(ch0、図7を参照)にデータが転送される。ここで、図8(a)、(b)、図9(a)、(b)、図10において、チャンネル(ch0)のデータをデータ調停ユニット71aと,第1書き込みデータI/F部71bとによりDMA転送し、メインメモリ100に格納処理するための構成を「第1LDMAC」と標記し、チャンネル(ch1)のデータを処理するための構成を「第2LDMAC」、チャンネル(ch2)のデータを処理するための構成を「第3LDMAC」と標記する。
<(1) Storage of data for one channel>
FIGS. 8A and 8B are diagrams for describing processing in which the LDMAC_A 105 a writes data for one channel to the main memory (SDRAM) 100. Like the output example shown in FIG. 5A (e), R, G, B data for one line in the main scanning direction is serially output, and one buffer (11 in FIG. 2) of the scanner I / F unit 10 is output. When data is stored in (e)), the data is transferred to one corresponding channel (ch0, see FIG. 7) in LDMAC_A (105a). Here, in FIGS. 8A, 8B, 9A, 9B, and 10, the data of the channel (ch0) is transferred to the data arbitration unit 71a and the first write data I / F unit 71b. The configuration for performing DMA transfer and storing in the main memory 100 is denoted as “first LDMAC”, the configuration for processing channel (ch1) data is “second LDMAC”, and the channel (ch2) data is processed. The configuration for this is denoted as “third LDMAC”.

図8(a)は、1チャンネルのカラー画像データをR、G、Bデータに分離して格納する処理を示す図である。第1LDMACは、ライン順位のR、G、Bデータのうち、主走査方向1ライン分(R1〜R2)のRデータをメインメモリ100のR領域(1000a)に書き込み、次の書き込み領域であるG領域(1000b)の先頭アドレス(G1)に書き込みアドレスを切り替える。そして、第1LDMACは、R、G、Bデータのうち、主走査方向1ライン分(G1〜G2)のGデータをメインメモリ100のG領域(1000b)に書き込み、次の書き込み領域であるB領域(1000c)の先頭アドレス(B1)に書き込みアドレスを切り替える。そして第1LDMACは、主走査方向1ライン分(B1〜B2)のBデータをメインメモリ100のB領域(1000c)に書き込み後、アドレスをR領域(1000a)の2ライン目の先頭アドレス(R2)に切り替える。以下、Gデータ、Bデータも同様にデータの書き込みアドレスを副走査方向の2ライン目にシフトさせてデータの書き込みを行なう。   FIG. 8A is a diagram illustrating a process of storing color image data of one channel separately into R, G, and B data. The first LDMAC writes R data for one line (R1 to R2) in the main scanning direction among the R, G, and B data in the line order to the R area (1000a) of the main memory 100, and is the next writing area G. The write address is switched to the start address (G1) of the area (1000b). 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). 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 addresses the first address (R2) of the second line in the R area (1000a). Switch to. 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転送を開始するスタートアドレス(図8(a)の場合R1)、オフセット情報(A、B)等は上述のLDMAC_A(105a)の生成によるものである。   The start address for starting DMA transfer (R1 in the case of FIG. 8A), offset information (A, B), and the like are due to the generation of the above-described LDMAC_A (105a).

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

<(2)CIS2チャンネルによるデータの格納>
図9(a)は、図5Cで示したように2チャンネルのカラー画像データをR、G、Bデータに分離して格納する処理を示す図である。主走査方向のメモリ領域は2つのチャンネルに対応して分割される。
<(2) Data storage by CIS2 channel>
FIG. 9A is a diagram illustrating a process of storing color image data of two channels separated into R, G, and B data as shown in FIG. 5C. The memory area in the main scanning direction is divided corresponding to the two channels.

2チャンネルのCIS18(chip0,chip1)により読み取られた画像データは、スキャナI/F部10の2つのバッファ(11e,11f)に格納され、LDMAC_A105aの制御の下、2つのバッファ(11e,11f)のデータは、105a内のチャンネル(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 the two buffers (11e, 11f) are controlled by the LDMAC_A 105a. Is transferred to the channels (ch0, ch1) in 105a.

第1LDMACは、チャンネル(ch0)のデータ(chip0_data)を、図9(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.

図9(a)において、第1LDMACは、chip0から入力されたR、G、Bデータのうち、Rデータ(RA1〜RA2)をメインメモリの第1R領域(1100a)に書き込み、次の書き込み領域である第1G領域(1200a)の先頭アドレス(GA1)に書き込みアドレスを切り替える(オフセット情報C)。第1LDMACは、R、G、Bデータのうち、Gデータ(GA1〜GA2)をメインメモリの第1G領域(1200a)に書き込み、次の書き込み領域である第1B領域(1300a)の先頭アドレス(BA1)に書き込みアドレスを切り替える(オフセット情報C)。そして、第1LDMACは、R、G、Bデータのうち、Bデータ(BA1〜BA2)をメインメモリのB領域(1300a)に書き込み、処理の終了後、アドレスをR領域(1100a)の副走査方向の2ライン目の先頭アドレス(RA3)に切り替える(オフセット情報D)。以下、Gデータ、Bデータも同様にデータの書き込みアドレスを副走査方向の2ライン目にシフトさせてデータの書き込みを行なう。   In FIG. 9A, the first LDMAC writes R data (RA1 to RA2) among the R, G, and B data input from chip0 to the first R area (1100a) of the main memory, and in the next writing area. The write address is switched to the start address (GA1) of a certain first G area (1200a) (offset information 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). 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 (RA3) 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は、メインメモリのデータ格納領域として、図9(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)を、図9(ajの第2R領域(1100b)、第2G領域(1200b)、第2B領域(1300b)として示される領域に格納する。   The second LDMAC stores the data (chip1_data) of the channel (ch1) in the areas shown as the second R area (1100b), the second G area (1200b), and the second B area (1300b) in FIG.

図9(a)において、第2LDMACは、chip1から入力されたR、G、Bデータのうち、Rデータ(RB1〜RB2)をメインメモリの第2R領域(1100b)に書き込み、次の書き込み領域である第2G領域(1200b)の先頭アドレス(GB1)に書き込みアドレスを切り替える(オフセット情報E)。第2LDMACは、R、G、Bデータのうち、Gデータ(GB1〜GB2)をメインメモリ100の第2G領域(1200b)に書き込み、次の書き込み領域である第2B領域(1300b)の先頭アドレス(BB1)に書き込みアドレスを切り替える(オフセット情報E)。そして、第2LDMACは、R、G、Bデータのうち、Bデータ(BB1〜BB2)をメインメモリ100の第2B領域(1300b)に書き込み、処理の終了後、アドレスを第2R領域(1100b)の副走査方向の2ライン目の先頭アドレス(RB3)に切り替える(オフセット情報F)。以下、Gデータ、Bデータも同様にデータの書き込みアドレスを副走査方向の2ライン目にシフトさせてデータの書き込みを行なう。   In FIG. 9A, 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 in the next writing area. The write address is switched to the start address (GB1) of a certain second G area (1200b) (offset information 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). 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 (RB3) 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転送を開始するスタートアドレス(図8(a)の場合RA1,RB1)、オフセット情報(C、D、E、F)等は上述のLDMAC_A(105a)の生成によるものである。   The start address for starting DMA transfer (RA1, RB1 in the case of FIG. 8A), offset information (C, D, E, F), etc. are due to the generation of the above-mentioned LDMAC_A (105a).

図9(b)は、図5Bで示したLEDの点灯タイミングで得られる2チャンネルのCISによるモノクロ画像データの書き込み処理を説明する図である。モノクロ画像データの場合は、上述のカラー画像データの場合と異なり、R、G、Bごとにデータを分離する必要がないので、ライン順位のモノクロ画像データを、メインメモリ100の主走査方向に1ライン分(MA1〜MA2、MB1〜MB2)のデータを書き込みし、同領域(1400a,1400b)の副走査方向に書き込みアドレスをシフトさせて、次の2ライン目(MA3〜MA4,MB3〜MB4)のデータの書き込みをする。以下、順次同様の処理をしていくことにより、モノクロ画像データをメインメモリの領域(1400a,1400b)に格納することができる。   FIG. 9B is a diagram for explaining monochrome image data writing processing by CIS of two channels obtained at the lighting timing of the LEDs shown in FIG. 5B. 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. Write the data for the lines (MA1 to MA2, MB1 to MB2), shift the write address in the sub-scanning direction of the same area (1400a, 1400b), and then the next second line (MA3 to MA4, MB3 to MB4) Write the data. Thereafter, monochrome image data can be stored in the main memory area (1400a, 1400b) by sequentially performing the same processing.

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

3つのバッファ(図2の11e,11f,11g)に格納されたデータは、LDMAC_A(105a)の制御の下、105a内のチャンネル(ch0、ch2、ch3)に転送される。ch0に転送されたデータは、第1LDMACによりメインメモリ100にデータが書き込まれ、ch1に転送されたデータは、第2LDMACによりメインメモリ100にデータが書き込まれ、そして、ch2に転送されたデータは、第3LDMACによりメインメモリ100にデータが書き込まれる。第1乃至第3LDMACがメインメモリ100のR領域(1500a)、G領域(1500b)、B領域(1500c)に対応する領域にデータを書き込むことにより、R、G、Bデータを分離してメインメモリ100上に格納することができる。   Data stored in the three buffers (11e, 11f, and 11g in FIG. 2) is transferred to the channels (ch0, ch2, and ch3) in the 105a under the control of the LDMAC_A (105a). 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. The first to third LDMACs write R into the 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 into the main memory. 100 can be stored.

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

以上説明したように、画像読み取りデバイス(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.

また、本実施形態においては、画像読み取りデバイス(CCD17、CIS18)の出力形式に関わらずR、G、Bデータを分離してメインメモリ100上に画像データが格納される。このため、後述する後段の画像処理部に、画像読み取りデバイス(CCD17、CIS18)の出力形式に応じたDMA転送をする必要がなく、要求される画像処理に応じたDMA転送をするだけでよい。このため、極めて簡単な構成/制御で画像読み取りデバイス(CCD17、CIS18)の出力形式に対応した画像処理装置を提供できる。   In the present embodiment, R, G, and B data are separated and stored in the main memory 100 regardless of the output format of the image reading device (CCD 17, CIS 18). For this reason, it is not necessary to perform DMA transfer according to the output format of the image reading device (CCD 17, CIS 18) to the later-described image processing unit, and it is only necessary to perform DMA transfer according to the required image processing. Therefore, it is possible to provide an image processing apparatus corresponding to the output format of the image reading device (CCD 17, CIS 18) with a very simple configuration / control.

<メインメモリ上の領域設定とDMA転送>
メインメモリ100に画像データをDMA転送するために、メインメモリ100に対するアドレス情報をLDMAC_A(105a)は生成し、このアドレス情報に従ってDMA転送を制御する。図11(a)はメインメモリ100を所定の矩形領域(ブロック)に分割した状態を示す図であり、図11(b)はメインメモリ100をリングバッファとして利用する場合を示す図である。メインメモリ100に格納された画像データに対して、矩形領域単位に画像処理を施すために、画像処理モード(コピーモードあるいはスキャナモード)に応じて、矩形領域を定義するためのアドレス情報が設定される。図11(a)中において、SAはDMAのスタートアドレスを示し、主走査方向(X軸方向)の領域は所定のバイト長(XA、XB)により分割される。副走査方向(Y軸方向)の領域は、所定のライン数(YA、YB)により分割される。リングバッファとして使用する場合(図1111(b))、ハッチングを付して示した領域101a及び101bは同一のメモリ領域となる。
<Main memory area setting and DMA transfer>
In order to DMA transfer image data to the main memory 100, the LDMAC_A (105a) generates address information for the main memory 100, and controls DMA transfer according to the address information. FIG. 11A is a diagram illustrating a state where the main memory 100 is divided into predetermined rectangular areas (blocks), and FIG. 11B is a diagram illustrating a case where the main memory 100 is used as a ring buffer. In order to perform image processing in units of rectangular areas on the image data stored in the main memory 100, address information for defining the rectangular areas is set according to the image processing mode (copy mode or scanner mode). The In FIG. 11A, SA indicates a DMA start address, 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. 1111 (b)), 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 includes a 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 sub-scanning direction is set, and assignment (division) of image data developed on the memory is controlled.

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

(a)カラーコピーモードの場合
・有効画素:主走査方向に600dpi
・文字判定処理:上下11ライン、左12画素、右13画素
・色判定フィルタリング処理:上下2ライン、左2画素、右2画素
・変倍処理:下nライン、右m画素(m、nは変倍率による。)
(b)白黒コピーモードの場合
・有効画素:主走査方向に600dpi
・色判定フィルタリング処理:上下2ライン、左右2画素
・変倍処理:下1ライン
(c)カラースキャンモードモードの場合
・有効画素:主走査方向に1200dpi
・変倍処理:下1ライン
(A) Color copy mode • Effective pixels: 600 dpi in the main scanning direction
Character determination processing: top and bottom 11 lines, left 12 pixels, right 13 pixels Color judgment filtering processing: top and bottom 2 lines, left 2 pixels, right 2 pixels Scaling processing: bottom n lines, right m pixels (m and n are (Depending on magnification)
(B) In black and white copy mode • Effective pixels: 600 dpi in the main scanning direction
-Color judgment filtering processing: upper and lower 2 lines, left and right 2 pixels-Scaling processing: lower 1 line (c) In color scan mode mode-Effective pixels: 1200 dpi in the main scanning direction
-Scaling processing: Bottom 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.

例えば、図12(a)のカラーコピーモードの場合、のり代領域を含む矩形領域を281画素×46ラインとすると、最大ののり代領域分(文字判定処理分)を差し引いた有効な領域は、256画素×24ラインとなり、転送効率は(256画素×24ライン)/(281画素×46ライン)≒48%となる。一方、図12(c)のスキャナモード時は変倍処理をしなければ、のり代は無いので転送効率は100%となる。   For example, in the case of the color copy mode of FIG. 12A, if a rectangular area including a margin area is 281 pixels × 46 lines, an effective area obtained by subtracting the maximum margin area (character determination processing) is 256 pixels × 24 lines, and the transfer efficiency is (256 pixels × 24 lines) / (281 pixels × 46 lines) ≈48%. On the other hand, in the scanner mode of FIG. 12C, if the scaling process is not performed, there is no margin and the transfer efficiency is 100%.

スキャナモード、またはコピーモードは画像処理の内容が異なるため、必要となるメモリの領域は、その処理内容に応じて適切に設定される。例えば、図12に示すように、カラーコピーモード時には、文字判定処理や色判定フィルタリング処理が必要なために、有効画素領域を抽出するのり代量(図中では、有効画素周辺に確保されている領域として示す。)は多くなるが、主走査方向の有効画素数として解像度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. 12, since character determination processing and color determination filtering processing are necessary in the color copy mode, the amount of margin for extracting an effective pixel region (in the figure, secured around the effective pixel). However, since it is necessary to ensure 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ラインとすれば、カラーコピーモードとスキャナモードにおけるメインメモリの割り当て量を同程度とすることができる。以下、画像処理モード別の格納処理の流れを図13、図14により説明する。   On the other hand, in the scanner mode, it is not necessary to secure the amount of margin 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 scanner 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 scanner 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.

<コピーモード時の格納処理>
図13は、コピーモード時におけるデータの格納処理の流れを説明する図である。まず、ステップS10で、コピーモードがカラーであるか否かを判断し、カラーである場合(S10−YES)、処理をステップS20に進め、カラーコピーモード時のDMA転送のためのアドレス情報を以下のように設定する。
<Storage processing in copy mode>
FIG. 13 is a diagram for explaining the flow of data storage processing in the copy mode. First, in step S10, it is determined whether or not the copy mode is color. If it is color (S10-YES), the process proceeds to step S20, and address information for DMA transfer in the color copy mode is as follows. Set as follows.

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

(b)有効画素のみを書き込む場合
・スタートアドレス(SA)
=メモリの先頭アドレス(BUFTOP)
+のり代を含めた1頁画像の主走査方向の画素数(TOTALWIDTH)×11(副走査方向ののり代(上))+12(主走査方向ののり代(左))
(TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)
+左のり代画素数+右のり代画素数)
・UA=メモリのエンドアドレス(BUFFBOTTOM)+1
=リングバッファの折り返しアドレス
・OFF1A=TOTALWIDTH−IMAGEWIDTH
(B) When writing only valid pixels • Start address (SA)
= Start address of memory (BUFTOP)
+ Number of pixels in the main scanning direction of a one-page image including the margin (TOTALWIDTH) × 11 (sub scanning margin (top)) +12 (main scanning direction margin (left))
(TOTALWIDTH = number of effective main scan pixels for one page image (IMAGEWIDTH)
+ Left margin pixel number + Right margin pixel number)
-UA = Memory end address (BUFFBOTTOM) + 1
= Ring buffer loopback address ・ OFF1A = TOTALWIDTH-IMAGEWIDTH

一方、モノクロコピーモード時(ステップS30)は以下のようにDMA転送のアドレス情報を設定する。   On the other hand, in the monochrome copy mode (step S30), address information for DMA transfer is set as follows.

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

(b)有効画素のみを書き込む場合
・スタートアドレス(SA)
=メモリの先頭アドレス(BUFTOP)
+のり代を含めた1頁画像の主走査方向の画素数(TOTALWIDTH)×2(副走査方向ののり代(上))+2(主走査方向ののり代(左))
・UA=メモリのエンドアドレス(BUFFBOTTOM)+1
・OFF1A=TOTALWIDTH−IMAGEWIDTH
(B) When writing only valid pixels • Start address (SA)
= Start address of memory (BUFTOP)
+ Number of pixels in the main scanning direction of a one-page image including the margin (TOTALWIDTH) × 2 (sub scanning margin (upper)) +2 (main scanning direction margin (left))
-UA = Memory end address (BUFFBOTTOM) + 1
・ OFF1A = TOTALWIDTH-IMAGEWIDTH

ステップS20、ステップS30でそれぞれDMA転送のためのアドレス情報が設定されると、処理をステップS40に進めて、転送が開始する。LDMAC_A105a内の各チャンネルに格納されたデータは、順次読み取りされ所定のアドレス情報に従って、DMA転送される(S50、60)。そして、チャンネル(ch0〜ch2)に格納されたデータの読み取りが終了すると(S70)、DMA転送は終了する(S80)。   When address information for DMA transfer is set in step S20 and step S30, the process proceeds to step S40, and transfer starts. Data stored in each channel in the LDMAC_A 105a is sequentially read and DMA-transferred according to predetermined address information (S50, 60). When the reading of the data stored in the channels (ch0 to ch2) is completed (S70), the DMA transfer is completed (S80).

<スキャナモード時の格納処理>
図14は、スキャナモード時におけるデータの格納処理の流れを説明する図である。まず、ステップS100で、スキャナモード時のDMA転送のためのアドレス情報を以下のように設定する。
<Storage process in scanner mode>
FIG. 14 is a diagram for explaining the flow of data storage processing in the scanner mode. First, in step S100, address information for DMA transfer in the scanner mode is set as follows.

(a)のり代を含めて書き込む場合
バッファの先頭から有効画素(例えば、主走査方向の解像度1200dpi)を確保し、更に、副走査方向に下1ラインののり代を設定する(図12の(c)を参照)。
(A) In case of writing including a margin of 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, a margin for the lower one line is set in the sub-scanning direction ((( see c)).

(b)有効画素のみを書き込む場合
・スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)
・UA=メモリのエンドアドレス(BUFFBOTTOM)+1
=リングバッファの折り返しアドレス
・OFF1A=0(TOTALWIDTH=IMAGEWIDTH)
(B) When writing only effective pixels • Start address (SA) = start address of memory (BUFTOP)
-UA = Memory end address (BUFFBOTTOM) + 1
= Ring buffer return address • OFF1A = 0 (TOTALWIDTH = IMAGEWIDTH)

ステップS100でアドレス情報が設定されると、処理をステップS110に進めてDMA転送が開始する。LDMAC_A105a内の各チャンネルに格納されたデータは、順次読み取りされ、所定のアドレス情報に従って、DMA転送される(S120、130)。そして、チャンネル(ch0〜ch2)に格納されたデータの読み取りが終了すると(S140)、DMA転送は終了する(S150)。   When the address information is set in step S100, the process proceeds to step S110 to start DMA transfer. Data stored in each channel in the LDMAC_A 105a is sequentially read and DMA-transferred according to predetermined address information (S120, 130). When the reading of the data stored in the channels (ch0 to ch2) is completed (S140), the DMA transfer is completed (S150).

以上、図13、図14の処理により、画像データは設定された処理モードに応じてメインメモリ100に展開される。尚、図13、図14で示したのり代量は任意に設定可能なパラメータであり、本発明の趣旨はこの条件により限定されるものではない。例えば、写真のカラー送信等では、文字判定処理をはずし、フィルタ処理のみ実施するように必要な画像処理の参照画素数に応じて、任意にのり代量を設定してもよい。   As described above, the image data is developed in the main memory 100 according to the set processing mode by the processing of FIGS. 13 and 14. 13 and 14 are parameters that can be arbitrarily set, and the gist of the present invention is not limited by these conditions. For example, in color transmission of a photograph, the character determination process may be removed, and the amount of paste may be arbitrarily set according to the number of reference pixels for image processing necessary to perform only the filter process.

<データの読み出し>
メインメモリ100に展開された画像データは、所定の矩形領域ごとに、対応するR、G、Bデータ、若しくはモノクロ画像データとして、スキャナ画像処理部20にローディングされ、矩形領域毎に画像処理が実行される。矩形領域ごとに画像処理を行なうために、CPU180は画像読み取りデバイス(CCD17/CIS18)の受光素子の感度のばらつきやLED19の光量のばらつき等を補正するシェーディング(SHD)補正データをメインメモリ100内に準備し、矩形領域のシェーディングデータ及び矩形領域の画像データは、後に説明するLDMAC_B(105b)によりスキャナ画像処理部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 executed for each rectangular area. Is done. 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 rectangular area shading data and the rectangular area image data are DMA-transferred to the scanner image processing unit 20 by LDMAC_B (105b) described later.

図15(a)、(b)は、矩形領域の画像データをスキャナ画像処理部20のブロックバッファRAM210(図16)に転送する際のデータの読み出しを説明する図である。領域(0,0)に関しては、その有効画素領域(abcd)に対して、のり代領域AB1CD1が設定されており(図15(a))、画像データの読み出しはAをスタートアドレスとして、対応するデータが主走査方向B1アドレスまで読み出される。主走査方向のデータの読み出しが終了すると、次に読み出すデータのアドレスを、副走査方向に1ライン分をシフトした図中のA2アドレスに移し、主走査方向にB3アドレスの画素までデータが読み出される。以下同様にデータが読み出され、のり代領域の最終ラインに相当するCアドレスからD1アドレスまでの主走査方向のデータの読み出しが行われて、領域(0,0)のデータの読み出しが完了する。   FIGS. 15A and 15B are diagrams for explaining reading of data when image data in a rectangular area is transferred to the block buffer RAM 210 (FIG. 16) of the scanner image processing unit 20. For the area (0, 0), the margin area AB1CD1 is set for the effective pixel area (abcd) (FIG. 15A), and image data is read out with A as the start address. Data is read up to the B1 address in the main scanning direction. When the reading of data in the main scanning direction is completed, the address of the next data to be read is moved to the A2 address in the figure shifted by one line in the sub-scanning direction, and the data is read up to the pixel at the B3 address in the main scanning direction. . 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が設定されており(図15(b))、画像データの読み出しはB2をスタートアドレスとして、対応するデータが主走査方向Eアドレスまで読み出される。主走査方向のデータの読み出しが終了すると、次に読み出すデータのアドレスを、副走査方向に1ライン分シフトした図中のB4アドレスに移し、主走査方向にB5アドレスの画素までデータが読み出される。そして、のり代領域の最終ラインに相当するD2アドレスからFアドレスまでの主走査方向の画像データの読み出しが行われて、第2領域のデータの読み出しが完了する。以上の処理により、のり代領域を含む矩形領域のデータが読み出される。以下、同様の処理が各矩形領域に対して行われる。   For the area (0, 1), the margin area B2ED2F is set for the effective pixel area (bedf) (FIG. 15B), and image data is read out using B2 as the start address. Data is read up to the main scanning direction E address. 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. 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.

<LDMAC_B(105b)の構成>
メインメモリ100に格納されたデータの読み出しは、図7におけるLDMAC_B(105b)により制御される。読み出しデータI/F部72aは、データ読み出し用の第4BUS74を介してメインメモリ100と接続し、読み出しデータI/F部72aは、LDMAC_B(105b)が生成したアドレス情報を参照して、メインメモリ100から所定の画像データを読み出すことができる。
<Configuration of LDMAC_B (105b)>
Reading of data stored in the main memory 100 is controlled by the LDMAC_B (105b) in FIG. The read data I / F unit 72a is connected to the main memory 100 via the fourth BUS 74 for reading data, and the read data I / F unit 72a refers to the address information generated by the LDMAC_B (105b), and Predetermined image data can be read from 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/Pインタフェース72cを介して、LDMAC_B(105b)の制御の下、順次DMA転送され、スキャナ画像処理部20のブロックバッファRAM210(図16)にローディングされる。   The data set for each channel (ch3 to ch6) is sequentially DMA-transferred via the I / P interface 72c under the control of the LDMAC_B (105b), and the block buffer RAM 210 of the scanner image processing unit 20 (FIG. 16). To be loaded.

また、LDMAC_B(105b)内のチャンネル7(ch7)は、所定の画像処理が施されたデータをメインメモリ100に格納するために、スキャナ画像処理部20から出力される点順次の画像データを格納するチャンネルである。スキャナ画像処理部20は、点順次の画像データの出力に合わせて、アドレス情報(ブロック・エンド信号、ライン・エンド信号)を出力し、このアドレス情報に基づいて、第2書き込みデータI/F72dは、チャンネル7に格納されている画像データをメインメモリ100に格納する。この処理の内容は後に詳細に説明する。   Further, channel 7 (ch7) in LDMAC_B (105b) stores 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. It is a channel to do. 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.

<画像処理>
図16は、スキャナ画像処理部20の概略的な構成を説明するブロック図であり、ブロックバッファRAM210にローディングされたデータに対して、各画像処理モードに応じた処理が実行される。また、図19は、各画像処理に要する矩形領域のサイズを模式的に示す図である。スキャナ画像処理部20は、設定された画像処理モードに応じて、矩形領域に対して参照するべき矩形画素領域を切り替えて処理を実行する。以下、画像処理の内容を図16により、また、その処理の際に参照する矩形領域のサイズを図19により説明する。
<Image processing>
FIG. 16 is a block diagram illustrating a schematic configuration of the scanner image processing unit 20, and processing corresponding to each image processing mode is executed on the data loaded in the block buffer RAM 210. FIG. 19 is a diagram schematically showing the size of a rectangular area required for each image processing. 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. 16, and the size of the rectangular area referred to during the processing will be described with reference to FIG.

図16において、シェーディング補正ブロック(SHD)22は、主走査方向の光源(LED19)の光量分布のばらつきや、画像読み取りデバイスの受光素子のばらつき、暗出力のオフセットを補正する処理ブロックである。シェーディングデータはメインメモリ100上で明R、明G、明B、暗R、暗G、暗Bの順に1画素分の補正データが面順次に格納されており、矩形領域に対応した画素数(主走査方向にXA画素、副走査方向にYA画素(図19(a)を参照))が入力される。入力された面順次の補正データは、入力データ処理部21により点順次のデータに変換され、スキャナ画像処理部20のブロックバッファRAM210に格納される。そして、矩形領域のシェーディングデータの取り込みが終了すると、画像データの転送に移行する。   In FIG. 16, 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. 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 ( XA pixels in the main scanning direction and YA pixels (see FIG. 19A) in the sub-scanning direction are input. 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データとして再構成する。再構成の処理を画素毎に行ない、面順次の画像データを点順次のデータに変換する。ここで、再構成の処理は、矩形内の全ての画素(XA画素×YA画素)に対して行われる。   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. Here, the reconstruction process is performed on all pixels (XA pixels × YA pixels) in the rectangle.

図17は、画像処理の対象領域とその処理を実行するためのフィルタ処理等をするための参照領域(ABCD)を概略的に示す図であり、同図において、有効画素領域(abcd)に対して、主走査方向(X方向)ののり代量として、「Na」、「Nb」画素が設定され、副走査方向(Y方向)ののり代量として、「Nc」、「Nd」画素が設定されている。   FIG. 17 is a diagram schematically showing a target region for image processing and a reference region (ABCD) for performing filter processing for executing the processing, in which an effective pixel region (abcd) is illustrated. Thus, “Na” and “Nb” pixels are set as the margin amounts in the main scanning direction (X direction), and “Nc” and “Nd” pixels are set as the margin amounts in the sub scanning direction (Y direction). Has been.

図18は、画像処理モード別(カラーコピーモード、モノクロコピーモード、スキャナモード)ののり代を例示する図であり、変倍時は変倍処理の必要から、m画素、nラインだけ、等倍時よりも参照領域は大きくなる。カラーコピーモードの場合は、黒文字の判定をするため、画像処理モードの内で最も大きい参照領域が必要である。黒文字の検出のためには、網点と黒文字の判定を確実にする必要があり、そのため網点の周期を判定するために、主走査方向(24+m)画素、副走査方向(21+n)画素(変倍時)を参照領域としている。モノクロコピーモードの場合は、文字部に対してエッジ強調を行なうため主走査方向(4+m)画素、副走査方向(4+n)画素(変倍時)を参照領域としている。スキャナモードは、ホストコンピュータ上のスキャナドライバやアプリケーションにより必要な画像処理を行なうため、等倍時には参照領域は必要としないが、変倍時には、変倍率に応じて、主走査方向にm画素、副走査方向にn画素分、参照領域が設定される。尚、ここで示したのり代量に本発明の趣旨は限定されるものではなく、任意に設定することが可能であることはいうまでもない。   FIG. 18 is a diagram exemplifying a margin for each image processing mode (color copy mode, monochrome copy mode, scanner mode). Since scaling processing is required at the time of scaling, only m pixels and n lines are scaled. The reference area becomes larger than the time. 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, main scanning direction (24 + m) pixels, sub-scanning direction (21 + n) pixels (variable) Is the reference area. In the monochrome copy mode, the main scanning direction (4 + m) pixels and the sub-scanning direction (4 + n) pixels (during zooming) are used as reference areas in order to perform edge enhancement on the character portion. In the scanner mode, since a necessary image processing is performed by a scanner driver or application on the host computer, a reference area is not required at the same magnification, but at the time of magnification, m pixels and sub-pixels are arranged in the main scanning direction according to the magnification. Reference regions for n pixels are set in the scanning direction. Needless to say, the gist of the present invention is not limited to the amount of glue shown here, and can be arbitrarily set.

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

文字判定処理ブロック24は、入力画像データに対して、黒文字判別、線画輪郭の画素判別を行なう処理ブロックである。黒文字判別処理においては、上述のように網点周期よりも広いエリアを参照する必要があるので、主走査方向(24+m)画素、副走査方向(21+n)画素(ライン)(「m」、「n」は変倍処理の倍率による。)相当ののり代領域を参照するのが望ましい。文字判定処理ブロック24の入力データは、シェーディング補正ブロック(SHD)21の入力と同様に主走査方向XA画素(有効画素+のり代)×副走査方向YA画素(有効画素+のり代)のデータ(図19の(a))を参照する。即ち、矩形内の全ての画素(XA画素×YA画素)を参照する。   The character determination processing block 24 is a processing block for performing black character determination and line drawing outline pixel determination on input image data. In the black character discrimination process, as described above, it is necessary to refer to an area wider than the halftone dot period, so that the main scanning direction (24 + m) pixels and the sub scanning direction (21 + n) pixels (lines) (“m”, “n” "" Depends on the magnification of the scaling process.) It is desirable to refer to a corresponding margin area. Similar to the input of the shading correction block (SHD) 21, the input data of the character determination processing block 24 is data of main scanning direction XA pixels (effective pixels + replacement) × sub-scanning direction YA pixels (effective pixels + replacement) ( Reference is made to FIG. That is, all the pixels in the rectangle (XA pixel × YA pixel) are referred to.

処理ブロック25において、MTF補正処理部は、画像読み取りデバイスを変更した際の、MTF差補正、縮小変倍時のモアレ低減のために主走査方向にフィルタ処理を行なう処理部であり、注目領域に対して、主走査方向の所定画素について、各係数を乗加算処理するブロックである。図19(b)では、注目領域G1に対して左側ハッチング部(b1)2画素と、右側ハッチング部(b2)3画素を確保して、領域G1に対する処理を実行する。即ち、矩形内の注目領域G1とハッチング部b1、b2の領域を読み出して注目領域G1の領域を得る。
(RGB→(L、Ca、Cb))変換処理部(CTRN)は、後続のフィルタ処理ブロック26で行なうフィルタリング(明度強調、彩度強調、色判定)に際し、R,G、B各色の多値画像データの変換処理を行なう。
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 moire reduction at the time of reduction / magnification 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. In FIG. 19B, 2 pixels on the left hatched part (b1) and 3 pixels on the right hatched part (b2) are secured for the attention area G1, and the process for the area G1 is executed. That is, the attention area G1 and the hatched areas b1 and b2 in the rectangle are read to obtain the attention area G1.
The (RGB → (L, Ca, Cb)) conversion processing unit (CTRN) performs multiple values of R, G, and B colors in the filtering (lightness enhancement, saturation enhancement, color determination) performed in the subsequent filter processing block 26. Image data conversion processing is performed.

下地濃度調整処理部(ABC)は、原稿の下地濃度を自動認識し、下地濃度値を白側に補正することによりファクシミリ通信等に適した二値化データを得るための処理を実行する。   The background density adjustment 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.

フィルタ処理ブロック26は、先のCTRN処理において、得られたデータに対して色判定とフィルタリングを行なうための処理として、画像の明度成分(L)のエッジ強度処理及び彩度(Ca、Cb)の強調処理を行なう。更に、入力画像の彩色判定を行ない、その結果を出力する。また、文字判定処理ブロック24で生成された文字、線画輪郭部の判定信号等に基づき、強調量のパラメータを変化させることができる。フィルタ処理後のデータは、L、Ca、CbからR、G、Bデータに変換されて出力される。この処理ブロックはモノクロ画像データを処理する場合は5画素×5画素のエッジ強調フィルタとして機能する。   The filter processing block 26 performs edge determination and saturation (Ca, Cb) 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. Perform emphasis processing. Further, the coloring of the input image is determined and the result is output. Further, the emphasis amount parameter can be changed based on the character generated in the character determination processing block 24, the determination signal of the line drawing outline portion, and the like. The filtered data 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.

図19(c)では、注目領域G2に対して、上下2画素(ライン)、左右2画素の領域(ハッチングを付した領域)を参照データとして、上述のフィルタ処理が実行される。即ち、MTF補正処理部で処理された領域G1に対し、フィルタ処理後の領域G2を得る。   In FIG. 19C, the above-described filtering process is performed on the attention area G2 with reference to the upper and lower two pixel (line) and left and right two pixel areas (hatched areas). In other words, the filtered region G2 is obtained for the region G1 processed by the MTF correction processing unit.

変倍処理(LIP)ブロック27は、主走査、副走査方向の線形補間変倍処理を施す処理ブロックである。図19(d)では、領域G3が線形補間変倍処理された結果、得られる領域であり、画像データ(d:(X−(Na+Nb)画素)×(Y−(Nc+Nd)画素))から、ハッチングを付した領域が所定の変倍率(主走査方向(+m画素)、副走査方向(+nライン))に応じて、主走査方向、副走査方向に変倍し、領域G3の面積が決定される。即ち、フィルタ処理後の領域G2を入力として、変倍後の領域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. 19D, the region G3 is a region obtained as a result of the linear interpolation scaling process, and from the image data (d: (X− (Na + Nb) pixel) × (Y− (Nc + Nd) pixel)), The hatched area is scaled in the main scanning direction and the sub-scanning direction according to a predetermined scaling factor (main scanning direction (+ m pixels), sub-scanning direction (+ n line)), and the area of the region G3 is determined. The That is, the region G3 after scaling is obtained by using the region G2 after the filter processing as an input.

図19(b)〜(d)において、図中の「Na」、「Nb」は、図17と同様に主走査方向(X方向)ののり代量として設定された画素数を示し、「Nc」、「Nd」は、副走査方向(Y方向)ののり代量として設定された画素数を示すものである。   In FIGS. 19B to 19D, “Na” and “Nb” in the figure indicate the number of pixels set as the amount of margin in the main scanning direction (X direction) as in FIG. ”And“ Nd ”indicate the number of pixels set as the amount of margin in the sub-scanning direction (Y direction).

以上の画像処理が、設定された画像処理モード(コピーモード、スキャナモード)に応じて、矩形領域単位の画像データに施される。画像処理モードに応じた矩形領域をメモリ上に設定し、この矩形領域の単位を切り替えることにより、各画像処理モードに応じた解像度、高精彩処理を実現することが可能になる。また、各矩形領域は、各処理ブロックの画像処理に必要なだけのり代を含んでいるので、処理対象の矩形画像データの端部を処理するために、隣接する領域の画像データを矩形単位で読み出す必要がなく、単純に画像を矩形単位で区切って画像処理する方法よりも、さらなるワークメモリの削減が達成できる。   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.

このように、各画像処理部で必要な最大の矩形分の画像データを予めブロックバッファRAM210にローディングし、RAM210上の画像データを各画像処理部間で必要な画像データ量の受け渡しをするだけで、カラーコピー/モノクロコピー/スキャナモード等、各モードに必要な一連の画像処理を実現できる。これによって、画像処理ブロックに専用のラインバッファを不要にしている。さらに、ブロックバッファRAM210にローディングされた矩形単位の画像データで、全ての画像処理を行なえるので、主走査幅、解像度によらない画像処理が可能である。このため従来のように各画像処理部のラインバッファの容量を、主走査幅や解像度に合わせて拡張する必要がない。また、適時必要な画像処理を行なうコピー、スキャナなどの装置を、極めて単純な構成で提供できる。   As described above, the image data for the maximum rectangle necessary for each image processing unit is loaded in advance into the block buffer RAM 210, and the image data on the RAM 210 is simply transferred between the image processing units. A series of image processing necessary for each mode such as color copy / monochrome copy / scanner mode can be realized. This eliminates the need for a dedicated line buffer in the image processing block. Further, since all image processing can be performed with rectangular image data loaded in the block buffer RAM 210, image processing independent of the main scanning width and resolution is possible. For this reason, it is not necessary to expand the capacity of the line buffer of each image processing unit in accordance with the main scanning width and resolution as in the prior art. Further, it is possible to provide an apparatus such as a copy or a scanner that performs image processing necessary in a timely manner with a very simple configuration.

図20は、1つの矩形データの処理が終了して、次の矩形データの画像データをDMA転送するためのDMA主走査方向の開始点を説明する図である。最初の矩形領域ABCDのDMAが終了し、D点の画素まで転送が終了すると、主走査方向の開始点は、主走査方向にNa+Nb画素分戻した位置(図中のS1点)となる。以下、順次1列分の矩形データのDMAが終了し、1列目の最終の矩形データに対応するE点のDMAが転送されると、次の列の矩形データを転送するために、副走査方向にシフトする開始点はNc+Nd画素分戻した位置(図中のS2)となる。   FIG. 20 is a diagram for explaining the starting point in the DMA main scanning direction for DMA transfer of image data of the next rectangular data after the processing of one rectangular data is completed. When the DMA of the first rectangular area ABCD is completed and the transfer to the pixel of point D is completed, the starting point in the main scanning direction is a position (point S1 in the figure) that is returned by Na + Nb pixels in the main scanning direction. 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).

図21、図22は、画像処理モード別のDMA転送処理と、画像処理の流れを説明するフローチャートである。尚、図21及び図22で説明するアドレス情報は、具体的な数値を例示的に用いているが、この数値に限定されるものではなく、任意に設定することは可能である。   FIG. 21 and FIG. 22 are flowcharts for explaining the DMA transfer processing for each image processing mode and the flow of image processing. The address information described with reference to FIGS. 21 and 22 uses specific numerical values as an example, but is not limited to these numerical values, and can be arbitrarily set.

<コピーモード時の処理>
図21は、コピーモード時におけるデータの読み出しと、画像処理の流れを説明するフローチャートである。まず、ステップS200において、カラーモードであるか、モノクロモードであるかを判断する。カラーモードである場合(S200−YES)は、処理をステップS210に進め、モノクロモードである場合(S200−NO)は処理をステップS220に進める。
<Processing in copy mode>
FIG. 21 is a flowchart for explaining the flow of data reading and image processing in the copy mode. First, in step S200, it is determined whether the mode is the color mode or the monochrome mode. If it is the color mode (S200-YES), the process proceeds to step S210, and if it is the monochrome mode (S200-NO), the process proceeds to step S220.

ステップS210では、カラーコピーモード時の読み出しのためのアドレス情報を、以下のように設定する。このアドレス情報は、LDMAC_B(105b)が生成し(ステップS220も同様)、このアドレス情報に基づいて、LDMAC_B(105b)はDMAを制御する。   In step S210, address information for reading in the color copy mode is set as follows. This address information is generated by LDMAC_B (105b) (the same applies to step S220), and based on this address information, LDMAC_B (105b) controls the DMA.

・スタートアドレス(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画素))
(TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)
+左のり代画素数+右のり代画素数)
・XANUM=有効主走査画素/矩形有効主走査画素
-Start address (SA) = Memory start address (BUFTOP)
-UA = Memory end address (BUFFBOTTOM) + 1
XA = rectangular effective main scanning pixel
+ Glue margin (Left margin pixel number (12 pixels), Right margin pixel number (13 pixels))
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 x YA + margin (12 pixels on the left, 13 pixels on the right))
・ OFF3A =-(TOTALWIDTH × (paste (top 11 pixels, bottom 11 pixels)
+ Effective main scanning pixel + margin (left 12 pixels, right 13 pixels))
(TOTALWIDTH = number of effective main scan pixels for one page image (IMAGEWIDTH)
+ Left margin pixel number + Right margin pixel number)
XANUM = effective main scanning pixel / rectangular effective main scanning pixel

ステップS220では、モノクロコピーモード時の読み出しのためのアドレス情報を以下のように設定する。   In step S220, 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画素))
(TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)
+左のり代画素数+右のり代画素数)
・XANUM=有効主走査画素/矩形有効主走査画素
-Start address (SA) = Memory start address (BUFTOP)
-Memory end address (BUFFBOTTOM) + 1
XA = rectangular effective main scanning pixel + paste margin (number of left margin pixels (2 pixels), number of right margin 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)))
・ OFF1A = TOTALWIDTH-XA
・ OFF2A =-(TOTALWIDTH x YA + margin (2 pixels on the left, 2 pixels on the right))
・ OFF3A =-(TOTALWIDTH × (paste (top 2 pixels, bottom 2 pixels)
+ Effective main scanning pixel + margin (left 12 pixels, right 13 pixels))
(TOTALWIDTH = number of effective main scan pixels for one page image (IMAGEWIDTH)
+ Left margin pixel number + Right margin pixel number)
XANUM = effective main scanning pixel / rectangular effective main scanning pixel

ステップS210、S220により、アドレス情報が読み出しデータI/F部72aに設定されると、処理をステップS230に進め、LDMAC_B(105b)がデータの読み出しが可能な状態にあるか否かを判断する。例えば、バッファコントローラ75が、バッファリードを禁止した状態である場合は、その状態が解除されるまで待機し(S230−NO)、バッファリードが可能であれば(S230−YES)、処理をステップS240に進める。   When the address information is set in the read data I / F unit 72a in steps S210 and S220, the process proceeds to step S230, and it is determined whether the LDMAC_B (105b) is in a state where data can be read. For example, if the buffer controller 75 is in a state in which buffer reading is prohibited, the process waits until the state is canceled (S230-NO). If buffer reading is possible (S230-YES), the process proceeds to step S240. Proceed to

ステップS240において、読み出しデータI/F部72aは設定されたアドレス情報に従ってデータを読み出し、データ設定ユニット72bは所定のチャンネル(ch3〜ch6)にデータを設定する。そして、LDMAC_B(105b)は各チャンネルに設定されたデータをスキャナ画像処理部20のバッファRAM210にDMA転送をする。ここでDMA転送されたデータは、スキャナ画像処理部20のバッファにローディングされ、各画像処理モードに合わせた画像処理が実行される。個別の画像処理の内容は先に説明したので、ここではその詳細な説明は省略する。   In step S240, the read data I / F unit 72a reads the data according to the set address information, and the data setting unit 72b sets the data for a predetermined channel (ch3 to ch6). Then, the LDMAC_B (105b) DMA-transfers the data set for each channel to the 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.

ステップS250において、カラーコピーモードであるか、モノクロコピーモードであるかを判断し、カラーコピーモードの場合(S250−YES)は処理をステップS260に進めて、文字判定処理を実行する。モノクロコピーモードの場合(S250−NO)は、ステップS260(文字判定処理)をスキップして、ステップS270のフィルタ処理を実行し、ステップS280で変倍処理を実行する。   In step S250, it is determined whether the copy mode is the color copy mode or the monochrome copy mode. If the copy mode is the color copy mode (S250-YES), the process proceeds to step S260 to execute the character determination process. In the monochrome copy mode (S250-NO), step S260 (character determination process) is skipped, the filter process of step S270 is executed, and the scaling process is executed in step S280.

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

ステップS300で、矩形領域の画像処理及びそのデータの格納処理が完了したか否か判断し、処理が完了していない場合は処理を再びステップS250に戻し、同様の処理を実行する。矩形領域の処理が完了した場合(S300−YES)、処理をステップS310に進めてページ全体を構成する矩形領域の処理が終了したか否かを判断する(S310)。ページ全体の処理が終了していない場合(S310−NO)は、処理をステップS230に戻し、メインメモリ100から後続の画像データを読み出し、そのデータに対する画像処理(S230以降のステップ)を実行する。   In step S300, it is determined whether the image processing of the rectangular area and the data storage processing have been completed. If the processing has not been completed, the processing returns to step S250 again, and the same processing is executed. When the processing of the rectangular area is completed (S300-YES), the process proceeds to step S310, and it is determined whether the processing of the rectangular area constituting the entire page is completed (S310). If the processing for the entire page has not been completed (S310-NO), the process returns to step S230, the subsequent image data is read from the main memory 100, and the image processing (steps after S230) is performed on that data.

一方、ページ処理が終了した場合(S310−YES)は、処理をステップS320に進め、スキャナ画像処理部20に対するDMA転送(S320)と、スキャナ画像処理部20のバッファへのデータ書き込み処理を終了させ(S330)、スキャナ画像処理部20における画像処理を終了する(S340)。   On the other hand, if the page processing is completed (S310-YES), the process proceeds to step S320, and the DMA transfer (S320) to the scanner image processing unit 20 and the data writing process to the buffer of the scanner image processing unit 20 are ended. (S330), the image processing in the scanner image processing unit 20 is ended (S340).

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

<スキャナモード時の処理>
図22は、スキャナモード時におけるデータの読み出しと、画像処理の流れを説明するフローチャートである。まず、ステップS400において、メインメモリ100からデータを読み出すためのアドレス情報を、以下のように設定する。尚、このアドレス情報は、LDMAC_B(105b)が生成し、このアドレス情報に基づいて、LDMAC_B(105b)はDMAを制御する。
<Processing in scanner mode>
FIG. 22 is a flowchart for explaining the flow of data reading and image processing in the scanner mode. First, in step S400, address information for reading data from the main memory 100 is set as follows. The address information is generated by the LDMAC_B (105b), and the LDMAC_B (105b) controls the DMA based on the address information.

・スタートアドレス(SA)=メモリの先頭アドレス(BUFTOP)
・UA=メモリのエンドアドレス(BUFFBOTTOM)+1
・XA=矩形有効主走査画素
・YA=矩形有効副走査画素(ライン)
+のり代(下のり代画素数(1画素(ライン)))
・OFF1A=TOTALWIDTH−XA
・OFF2A=−(TOTALWIDTH×YA)
・OFF3A=−(TOTALWIDTH×(のり代(下のり代画素数(1画素))
+有効主走査画素)
(TOTALWIDTH=1ページ画像の主走査有効画素数(IMAGEWIDTH)
+左のり代画素数+右のり代画素数)
・XANUM=有効主走査画素/矩形有効主走査画素
-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)
+ Glue margin (number of pixels in the bottom glue (1 pixel (line))
・ OFF1A = TOTALWIDTH-XA
・ OFF2A =-(TOTALWIDTH × YA)
・ OFF3A =-(TOTALWIDTH x (paste margin (number of subplot margin pixels (1 pixel))
+ Effective main scanning pixel)
(TOTALWIDTH = number of effective main scan pixels for one page image (IMAGEWIDTH)
+ Left margin pixel number + Right margin pixel number)
XANUM = effective main scanning pixel / rectangular effective main scanning pixel

ステップS400により、アドレス情報が読み出しデータI/F部72aに設定されると、処理をステップS410に進め、LDMAC_B(105b)がデータの読み出しが可能な状態にあるか否かを判断する。例えば、バッファコントローラ75が、データの読み出しを禁止した状態である場合は、その状態が解除されるまで待機し(S230−NO)、バッファリードが可能であれば(S230−YES)、処理をステップS420に進める。   When the address information is set in the read data I / F unit 72a in step S400, the process proceeds to step S410, and it is determined whether the LDMAC_B (105b) is in a state where data can be read. For example, if the buffer controller 75 is in a state where reading of data is prohibited, the process waits until the state is canceled (S230-NO). If buffer reading is possible (S230-YES), the process is stepped. Proceed to S420.

ステップS420において、読み出しデータI/F部72aは設定されたアドレス情報に従ってデータを読み出し、データ設定ユニット72bは所定のチャンネル(ch3〜ch6)にデータを設定する。そして、LDMAC_B(105b)は各チャンネルに設定されたデータをスキャナ画像処理部20のバッファにDMA転送をする。ここでDMA転送されたデータは、スキャナ画像処理部のバッファにローディングされ、各画像処理モードに合わせた画像処理が実行される。画像処理の内容は先に説明したので、その詳細な説明は省略する。   In step S420, the read data I / F unit 72a reads the data according to the set address information, and the data setting unit 72b sets the data for a predetermined channel (ch3 to ch6). Then, the LDMAC_B (105b) 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, and image processing corresponding to each image processing mode is executed. Since the details of the image processing have been described above, detailed description thereof will be omitted.

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

ステップS440において、画像処理済みの点順次の画像データは、画像処理済みデータを格納する所定のメモリ領域に更にDMA転送され、格納される。この格納処理は後に詳細に説明する。   In step S440, 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.

ステップS450で、矩形領域の画像処理及びそのデータの格納処理が完了したか否か判断し、処理が完了していない場合は処理を再びステップS430に戻し、同様の処理を実行する。矩形領域の処理が完了した場合(S450−YES)、処理をステップS460に進めてページ全体の処理が終了したか否かを判断する(S460)。ページ全体の処理が終了していない場合(S460−NO)は、処理をステップS410に戻し、メインメモリ100から後続の画像データを読み出し、そのデータに対する画像処理を実行する。   In step S450, it is determined whether or not the image processing of the rectangular area and the data storage processing have been completed. If the processing has not been completed, the processing returns to step S430 and the same processing is executed. When the processing of the rectangular area is completed (S450-YES), the process proceeds to step S460, and it is determined whether the processing of the entire page is completed (S460). If the processing for the entire page has not been completed (S460-NO), the processing returns to step S410, the subsequent image data is read from the main memory 100, and the image processing is executed on that data.

一方、ページ処理が終了した場合(S460−YES)は、処理をステップS470に進め、スキャナ画像処理部20に対するDMA転送(S470)と、スキャナ画像処理部20のバッファへのデータ書き込み処理を終了させ(S480)、スキャナ画像処理部20における画像処理を終了する(S490)。   On the other hand, when the page processing is completed (S460-YES), the process proceeds to step S470, and the DMA transfer (S470) to the scanner image processing unit 20 and the data writing process to the buffer of the scanner image processing unit 20 are terminated. (S480), the image processing in the scanner image processing unit 20 is terminated (S490).

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

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

<画像処理済みデータの格納>
図23は、変倍処理された矩形データを変倍処理ブロック(LIP)27からメインメモリ100に転送する処理を説明する図である。例えば、256画素×256画素の矩形データを70%に縮小する場合、256画素×0.7=179.2画素となり、数値計算上179.2画素×179.2画素の矩形データを作る必要がある。しかし、少数点以下の数値を反映した画素データを生成することができないので、主走査方向、副走査方向に、180画素と179画素の出現確率を2:8に制御して、全体的に縮小倍率70%相当の179.2画素を生成する。図23では、矩形領域のサイズが領域B11(XA1=180画素)、B12(XA2=179画素)と主走査方向に画素数が異なり、B11(YA1=180画素)とB21(YA2=179画素)とでは副走査方向にそれぞれ矩形領域のサイズが異なっている。変倍処理の結果に応じてサイズが異なる矩形領域の出現確率は制御され、所定の変倍画像データを得ることができる。そして、メインメモリ100に対して、画像処理されたデータを戻すために、DMAを制御する信号は変倍処理ブロック(LIP)27からLDMAC_B(105b)に対して通知される(図24)。
<Storage of image processed data>
FIG. 23 is a diagram for explaining processing for transferring the scaling-processed rectangular data from the scaling processing block (LIP) 27 to the main memory 100. For example, when the rectangular data of 256 pixels × 256 pixels is reduced to 70%, 256 pixels × 0.7 = 179.2 pixels, and it is necessary to create rectangular data of 179.2 pixels × 179.2 pixels in numerical calculation. is there. However, since pixel data reflecting numerical values below the decimal point cannot be generated, the overall probability is reduced by controlling the appearance probability of 180 pixels and 179 pixels to 2: 8 in the main scanning direction and the sub-scanning direction. 179.2 pixels corresponding to a magnification of 70% are generated. In FIG. 23, the size of the rectangular area is different from the area B11 (XA1 = 180 pixels) and B12 (XA2 = 179 pixels) in the main scanning direction, and B11 (YA1 = 180 pixels) and B21 (YA2 = 179 pixels). And the sizes of the rectangular areas are different in the sub-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. Then, 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 LDMAC_B (105b) (FIG. 24).

次に、図21のステップS290、図22のステップS440における処理を説明する。図25は、画像処理済みのデータをメインメモリ100にDMA転送するために、変倍処理ブロック(LIP)27からLDMAC_B(105b)に送出されるデータ及び信号の関係を示すタイミングチャートである。   Next, processing in step S290 in FIG. 21 and step S440 in FIG. 22 will be described. FIG. 25 is a timing chart showing the relationship between data and signals sent from the scaling processing block (LIP) 27 to the LDMAC_B (105b) in order to DMA transfer image-processed data to the main memory 100.

LDMAC_B(105b)は、画像処理済みのデータをメインメモリ100に格納する際、矩形の主走査長、副走査長が未知の状態でDMA転送を開始する。変倍処理ブロック27から1つの矩形内における主走査幅の最終データ(XA1、XA2)の転送時にライン・エンド信号が出力され、そのライン・エンド信号により矩形の主走査長が変倍処理ブロック27からLDMAC_B(105b)に通知される。   When the image processed data is stored in the main memory 100, the LDMAC_B (105b) 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 LDMAC_B (105b).

変倍処理ブロック27から1つの矩形内の最終データ転送時にブロック・エンド信号がLDMAC_B(105b)に対して出力され、これによって副走査長を認識することができる。副走査方向YA1のデータがすべて処理されると、DMA転送を領域B21、B22(図23を参照)にシフトして、同様に主走査方向のデータXAを送出する。DMAはライン・エンド信号、ブロック・エンド信号により制御される。これにより、変倍処理ブロック27の演算結果に応じて動的にDMAの矩形領域を切り替えることができるようになる。   A block end signal is output to the LDMAC_B (105b) at the time of final data transfer within one rectangle from the scaling processing block 27, and thereby the sub-scanning length can be recognized. When all the data in the sub-scanning direction YA1 is processed, the DMA transfer is shifted to the areas B21 and B22 (see FIG. 23), 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.

上述のライン・エンド信号、ブロック・エンド信号、および点順次の画像データは、LDMAC_B(105b)のインタエース部72cに入力され、このうち画像データはチャンネル(ch)7に格納される。ライン・エンド信号及びブロック・エンド信号は、チャンネル(ch)7に格納したデータをメインメモリ100上に展開する際のアドレス情報として用いられ、第2書き込みデータI/F部72dは、これらのアドレス情報に基づき、ch7のデータを読み出し、メインメモリ100上にデータを格納する。   The above-described line end signal, block end signal, and dot sequential image data are input to the interface unit 72c of the LDMAC_B (105b), and among these, 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.

図26は、ライン・エンド信号及びブロック・エンド信号に従って、データをメインメモリ100に展開した状態を説明する図である。同図において、SAはDMA転送のスタートアドレスを示し、このアドレスから主走査方向に点順次のRGBデータを格納していく。ライン・エンド信号に基づき、DMA転送のアドレスをオフセット情報(OFF1A)により切り替え、副走査方向に1画素(ライン)シフトしたアドレスから同様に主走査方向にデータを格納していく。そして、矩形領域(0,0)のブロック・エンド信号に基づき、次の矩形領域(1,0)に対するデータの格納に移行する。DMA転送のアドレスはオフセット情報(OFF2A)により切り替えられる。この場合のOFF2Aは、領域(0、0)に対して主走査方向に1画素シフトし、副走査方向1ライン目にジャンプしたアドレスとして切り替えられる。   FIG. 26 is a diagram for explaining a state in which data is expanded in the main memory 100 in accordance with the line end signal and the block end signal. In the figure, SA indicates a DMA transfer start address, 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. 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)、(n、0)とデータを格納していき、n個分のブロックの格納が完了すると、オフセット情報(OFF3)によりDMA転送のアドレスを切り替える。この場合のOFF3は、領域(0,0)の最終ラインの画素に対して副走査方向に1画素(ライン)シフトし、主走査方向1画素目にジャンプしたアドレスとして切り替えられる。   Hereinafter, similarly, the area (2, 0),... (N−1), (n, 0) and data are stored, and when storage of n blocks is completed, the offset information (OFF3). To switch the DMA transfer address. 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.

以上説明したとおり、ライン・エンド信号及びブロック・エンド信号により、オフセット情報(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.

さらに、上記の実施形態によれば、種々の画像読み取りデバイスに対応することが可能な画像処理装置を提供することが可能になる。すなわち、画像読み取りデバイスにより読み取った画像データを、その出力形式に応じてDMA転送を制御するチャンネルに振り分け、振り分けたデータに対してDMAを制御するアドレス情報とオフセット情報を生成することにより、種々の画像読み取りデバイスに対応することが可能になる。   Furthermore, according to the above-described embodiment, it is possible to provide an image processing apparatus that can support various image reading devices. That is, image data read by an image reading device is distributed to channels that control DMA transfer according to the output format, and address information and offset information for controlling DMA are generated for the distributed data. It is possible to support an image reading device.

<他の実施形態>
上記の実施形態では、各種画像入出力機能を有する複合型の画像処理装置で、本発明を説明したが、本発明はこれに限るものではなく、単機能のスキャナ装置、プリンタ装置、あるいは他の装置に拡張接続するためのオプションカード等にも、適用可能である。また、本発明に関わる装置のユニット構成も限定するものではなく、例えば、ネットワークを介して接続された複数の装置により、達成されるように、本発明に関わる装置またはシステムを構成してもよい。
<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 device, printer device, or other The present invention can also be applied to an option card for expansion connection to the apparatus. 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. .

本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記憶した記憶媒体を、システムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し、実行することによっても達成される。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   An object of the present invention is to read and execute a program code stored in a storage medium by a computer (or CPU or MPU) of a system or apparatus that stores a program code of software that realizes the functions of the above-described embodiments. Is also achieved. 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.

プログラムコードを供給するための記憶媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることができる。   As a storage medium for supplying the program code, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, or the like is used. be able to.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動している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) operating on the computer based on the instruction of the program code. This includes a case where part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.

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

本発明の実施形態にかかる画像処理装置200の概略的な構成を示すブロック図である。1 is a block diagram showing a schematic configuration of an image processing apparatus 200 according to an embodiment of the present invention. スキャナI/F部10の概略的な構成を示すブロック図である。2 is a block diagram showing a schematic configuration of a scanner I / F unit 10. FIG. CCD17による出力信号を例示する図である。It is a figure which illustrates the output signal by CCD17. CIS18に対するLED19の点灯制御に関するタイミングチャートである。It is a timing chart regarding the lighting control of LED19 with respect to CIS18. 図4のタイミングチャートに従った、R、G、Bに対応するLEDの点灯と((a)〜(d))、出力(e)の関係を示すタイミングチャートである。FIG. 5 is a timing chart showing the relationship between LED lighting corresponding to R, G, and B, ((a) to (d)), and output (e) according to the timing chart of FIG. 4. CIS18の制御に関連し、同期信号(SP)の1周期以内にR、G、Bの各LED19が順次点灯する場合のタイミングを示す図である。It is a figure which shows the timing in case each LED19 of R, G, B lights up sequentially within 1 period of a synchronizing signal (SP) in connection with control of CIS18. CIS18が主走査方向に2チャンネル設けられた場合の出力を例示する図である。It is a figure which illustrates the output in case CIS18 is provided with 2 channels in the main scanning direction. AFE15の処理を説明するブロック図である。It is a block diagram explaining the process of AFE15. 画像読み取りデバイスにより読み取った画像データをメインメモリにDMA転送するためのLDMAC_Aと、メインメモリ及びスキャナ画像処理部との間でDMAを制御するLDMAC_Bの概略的な構成を示す図である。It is a figure which shows schematic structure of LDMAC_A for DMA-transferring the image data read with the image reading device to main memory, and LDMAC_B which controls DMA between a main memory and a scanner image process part. LDMAC_A105aがメインメモリ100に1チャンネル分のデータを書き込む処理を説明する図である。FIG. 10 is a diagram for describing processing in which the LDMAC_A 105a writes data for one channel to the main memory 100. LDMAC_A105aがメインメモリ100に2チャンネル分のデータを書き込む処理を説明する図である。FIG. 10 is a diagram for describing processing in which the LDMAC_A 105a writes data for two channels to the main memory 100. LDMAC_A105aがメインメモリ100に3チャンネル分のデータを書き込む処理を説明する図である。FIG. 10 is a diagram for describing processing in which the LDMAC_A 105a writes data for three channels to the main memory 100. メインメモリ100を所定の矩形領域(ブロック)に分割した状態を示す図である。It is a figure which shows the state which divided | segmented the main memory 100 into the predetermined | prescribed rectangular area | region (block). メインメモリに必要となる容量を画像処理モード別に例示する図である。It is a figure which illustrates the capacity | capacitance required for a main memory according to image processing mode. コピーモード時におけるデータの格納処理の流れを説明する図である。It is a figure explaining the flow of the storage process of the data at the time of copy mode. スキャナモード時におけるデータの格納処理の流れを説明する図である。It is a figure explaining the flow of the storage process of the data at the time of scanner mode. 矩形領域の画像データをスキャナ画像処理部20のブロックバッファRAMに転送する際のデータの読み出しを説明する図である。FIG. 5 is a diagram for explaining reading of data when image data in a rectangular area is transferred to the block buffer RAM of the scanner image processing unit 20. スキャナ画像処理部20の概略的な構成を説明するブロック図である。FIG. 2 is a block diagram illustrating a schematic configuration of a scanner image processing unit 20. 画像処理の対象領域とその処理を実行するためのフィルタ処理等をするための参照領域を概略的に示す図である。It is a figure which shows roughly the reference area | region for performing the filter process etc. for performing the object process of image processing, and the process. 画像処理モード別(カラーコピーモード、モノクロコピーモード、スキャナモード)ののり代を例示する図である。It is a figure which illustrates the transfer margin according to image processing mode (color copy mode, monochrome copy mode, scanner mode). 各画像処理に要する矩形領域のサイズを模式的に示す図である。It is a figure which shows typically the size of the rectangular area which each image processing requires. 1つの矩形データの処理が終了して、次の矩形データの画像データをDMA転送するためのDMA主走査方向の開始点を説明する図である。It is a figure explaining the starting point of the DMA main scanning direction for the DMA transfer of the image data of the following rectangular data after the process of one rectangular data is complete | finished. コピーモード時におけるデータの読み出しと、画像処理の流れを説明する図である。It is a figure explaining the reading of the data at the time of copy mode, and the flow of image processing. スキャナモード時におけるデータの読み出しと、画像処理の流れを説明する図である。It is a figure explaining the reading of the data in a scanner mode, and the flow of image processing. 変倍処理された矩形データを変倍処理ブロック(LIP)27からメインメモリ100に転送する処理を説明する図である。FIG. 5 is a diagram for describing processing for transferring rectangular data subjected to scaling processing from a scaling processing block (LIP) 27 to a main memory 100. 変倍処理ブロック(LIP)27とLDMAC_B(105b)との接続を示す図である。It is a figure which shows the connection of scaling process block (LIP) 27 and LDMAC_B (105b). 画像処理済みのデータをメインメモリ100にDMA転送するために、変倍処理ブロック(LIP)27からLDMAC_B(105b)に送出されるデータ及び信号の関係を示すタイミングチャートである。7 is a timing chart showing the relationship between data and signals sent from the scaling processing block (LIP) 27 to the LDMAC_B (105b) in order to DMA transfer image-processed data to the main memory 100. ライン・エンド信号及びブロック・エンド信号に従って、データをメインメモリ100に展開した状態を説明する図である。It is a figure explaining the state which expand | deployed the data to the main memory 100 according to the line end signal and the block end signal. 従来の画像処理装置における、スキャナ画像処理回路の構成を示すブロック図である。It is a block diagram which shows the structure of the scanner image processing circuit in the conventional image processing apparatus.

Claims (3)

画像データを入力する入力手段と、
前記入力手段により入力された画像データを記憶する第1メモリと、
前記第1メモリに記憶された画像データを、前記入力手段により入力された前記画像データを分割して得られる有効画素領域と前記有効画素領域に隣接する隣接領域とを含む矩形領域ごとに読み出すための第1のアドレス情報を生成するアドレス生成手段と、
前記生成された前記第1のアドレス情報に基づいて、前記入力手段により入力された前記画像データを前記矩形領域単位で前記第1メモリから読出して第2メモリに転送する転送手段と、
複数種類の画像処理を実行するための複数の画像処理部を有し、複数の画像処理モードに含まれるいずれかの画像処理モードで、前記第2メモリに記憶された前記矩形領域単位の画像データに対して前記複数種類の画像処理に含まれる2以上の画像処理を連続的に実行する画像処理手段と、
前記画像処理手段が実行する前記画像処理モードを設定する設定手段とを有し、
前記第2メモリは、前記設定された画像処理モードで用いられる2以上の画像処理部が前記第2メモリに記憶された前記矩形領域の画像データに前記2以上の画像処理を連続的に実行するためのバッファメモリとして用いられ、
前記設定手段により設定された画像処理モードにおける前記矩形領域は、前記有効画素領域と、前記設定された画像処理モードで用いられる2以上の画像処理部のそれぞれが前記有効画素領域の画像データに対して画像処理を実行するのに必要な前記隣接領域のサイズに含まれる最大サイズの隣接領域と、を含み、
前記アドレス生成手段は、前記設定された前記画像処理モードで用いられる2以上の画像処理部により連続的に前記2以上の画像処理が実行された前記矩形領域の画像データを前記第1メモリに記憶させるための第2のアドレス情報を生成し、
前記転送手段は、前記生成された第2のアドレス情報に基づいて前記2以上の画像処理が実行された前記矩形領域の画像データを前記第1メモリに転送することを特徴とする画像処理装置。
Input means for inputting image data;
A first memory for storing image data input by the input means;
The image data stored in the first memory, read for each rectangular area including an adjacent region adjacent to the effective pixel region and the effective pixel area obtained by dividing an input said image data by said input means Address generating means for generating first address information for issuing;
Transfer means for reading out the image data input by the input means from the first memory in units of the rectangular area and transferring the image data to the second memory based on the generated first address information;
The rectangular area unit image data stored in the second memory in any one of the image processing modes included in the plurality of image processing modes having a plurality of image processing units for executing a plurality of types of image processing image processing means for executing pairs with two or more image processing included in the plurality of types of image processing to continuously,
Anda setting means for setting the image processing mode by the image processing means is performed,
In the second memory, two or more image processing units used in the set image processing mode continuously execute the two or more image processes on the image data of the rectangular area stored in the second memory. Used as a buffer memory for
The rectangular area in the image processing mode set by the setting means includes the effective pixel area and each of two or more image processing units used in the set image processing mode for image data in the effective pixel area. An adjacent area of a maximum size included in the size of the adjacent area necessary for performing image processing,
The address generation unit stores, in the first memory, image data of the rectangular area in which the two or more image processing units are continuously executed by the two or more image processing units used in the set image processing mode. generating a second address information for,
The image processing apparatus , wherein the transfer means transfers image data of the rectangular area on which the two or more image processes have been executed based on the generated second address information to the first memory .
前記転送手段は、前記画像処理手段により画像処理が実行された前記矩形領域の画像データに含まれる有効領域部分を、前記第2メモリから前記第1メモリに転送することを特徴とする請求項に記載の画像処理装置。 Said transfer means, claims, characterized in that to transfer the effective area portion included in the image data of the rectangular area in which the image processing has been performed by the image processing means, said first memory from the second memory the image processing apparatus according to 1. 画像データを入力する入力工程と、
前記入力工程により入力された画像データを第1メモリに記憶する記憶工程と、
前記第1メモリに記憶された画像データを、前記入力工程で入力された前記画像データを分割して得られる有効画素領域と前記有効画素領域に隣接する隣接領域とを含む矩形領域ごとに読み出すための第1のアドレス情報を生成するアドレス生成工程と、
前記生成された前記第1のアドレス情報に基づいて、前記入力工程で入力された前記画像データを前記矩形領域単位で前記第1メモリから読み出して第2メモリに転送する転送工程と、
複数種類の画像処理を実行するための複数の画像処理部が、複数の画像処理モードに含まれるいずれかの画像処理モードで、前記第2メモリに記憶された前記矩形領域単位の画像データに対して前記複数種類の画像処理に含まれる2以上の画像処理を連続的に実行する画像処理工程と、
前記画像処理工程にて実行する前記画像処理モードを設定する設定工程とを有し、
前記第2メモリは、前記設定された画像処理モードで用いられる2以上の画像処理部が前記第2メモリに記憶された前記矩形領域の画像データに前記2以上の画像処理を連続的に実行するためのバッファメモリとして用いられ、
前記設定工程で設定された前記画像処理モードにおける前記矩形領域は、前記有効画素領域と、前記設定された画像処理モードで用いられる2以上の画像処理部のそれぞれが前記有効画素領域の画像データに対して画像処理を実行するのに必要な前記隣接領域のサイズに含まれる最大サイズの隣接領域と、を含み、
前記アドレス生成工程は、前記設定された前記画像処理モードで用いられる2以上の画像処理部により連続的に前記2以上の画像処理が実行された前記矩形領域の画像データを前記第1メモリに記憶させるための第2のアドレス情報を生成し、
前記転送工程は、前記生成された前記第2のアドレス情報に基づいて前記2以上の画像処理が実行された前記矩形領域の画像データを前記第1メモリに転送することを特徴とする画像処理方法。
An input process for inputting image data;
A storage step of storing the image data input in the input step in a first memory;
The image data stored in the first memory, read for each rectangular area including an adjacent region adjacent to the effective pixel region and the effective pixel area obtained by dividing the image data input in said input step An address generation step for generating first address information to be issued;
Based on the first address information said generated and transfer steps to forward the image data input in said input step to the second memory is read out from said first memory in the rectangular area unit,
A plurality of image processing unit for executing a plurality of types of image processing, in any of the image processing mode included in the plurality of image processing modes, versus the image data of the rectangular area unit stored in the second memory An image processing step of continuously executing two or more image processes included in the plurality of types of image processes ;
Anda setting step of setting the image processing mode for executing by the image processing step,
In the second memory, two or more image processing units used in the set image processing mode continuously execute the two or more image processes on the image data of the rectangular area stored in the second memory. Used as a buffer memory for
In the rectangular area in the image processing mode set in the setting step, the effective pixel area and each of two or more image processing units used in the set image processing mode are converted into image data of the effective pixel area. An adjacent area having a maximum size included in the size of the adjacent area necessary for performing image processing on the image processing,
The address generation step stores, in the first memory, image data of the rectangular area in which the two or more image processing units are continuously executed by the two or more image processing units used in the set image processing mode. generating a second address information for,
The transfer step transfers the image data of the rectangular area in which the two or more image processes are executed based on the generated second address information to the first memory. .
JP2006021423A 2002-12-26 2006-01-30 Image processing apparatus and image processing method Expired - Fee Related JP4384124B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006021423A JP4384124B2 (en) 2002-12-26 2006-01-30 Image processing apparatus and image processing method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2002378690 2002-12-26
JP2002378689 2002-12-26
JP2006021423A JP4384124B2 (en) 2002-12-26 2006-01-30 Image processing apparatus and image processing method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003422950A Division JP2004220584A (en) 2002-12-26 2003-12-19 Image processing device and image processing method

Publications (2)

Publication Number Publication Date
JP2006139803A JP2006139803A (en) 2006-06-01
JP4384124B2 true JP4384124B2 (en) 2009-12-16

Family

ID=36620547

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006021423A Expired - Fee Related JP4384124B2 (en) 2002-12-26 2006-01-30 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP4384124B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4956282B2 (en) * 2007-05-30 2012-06-20 株式会社リコー Image processing device
JP6117494B2 (en) * 2012-08-08 2017-04-19 株式会社メガチップス Image processing interface circuit
JP6117495B2 (en) * 2012-08-08 2017-04-19 株式会社メガチップス Image processing device
US9552619B2 (en) 2012-08-08 2017-01-24 Megachips Corporation Image processing apparatus and image processing interface circuit
WO2018105172A1 (en) 2016-12-08 2018-06-14 シャープ株式会社 Display device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000032258A (en) * 1998-07-09 2000-01-28 Canon Inc Image processing unit and image processing method
JP3781634B2 (en) * 2001-04-26 2006-05-31 シャープ株式会社 Image processing apparatus, image processing method, and portable video device

Also Published As

Publication number Publication date
JP2006139803A (en) 2006-06-01

Similar Documents

Publication Publication Date Title
US7495669B2 (en) Image processing apparatus and image processing method
US7599087B2 (en) Method and apparatus for image processing, and a computer product
US7200287B2 (en) Method and apparatus for image processing, and a computer product
US7817297B2 (en) Image processing apparatus and image processing method
US20080013133A1 (en) Contact-type color scanning unit, image scanning device, image scanning method, and computer program product
JP4384124B2 (en) Image processing apparatus and image processing method
JP3939855B2 (en) Double-sided original reading method and apparatus
JP4528843B2 (en) Line buffer circuit, image processing apparatus, and image forming apparatus
JP3870190B2 (en) Image processing device
JP2004220584A (en) Image processing device and image processing method
US8264730B2 (en) Image processing apparatus and image forming apparatus
KR20010051552A (en) Method and apparatus for processing images,and a computer product
JP2005173926A (en) Image processing apparatus, method, program, and storage medium
JP2007110605A (en) Image forming device
JP2005124071A (en) Image processing apparatus and image processing method, computer readable storage medium with program stored thereon, and program
JP4328608B2 (en) Image processing apparatus, method, program, and storage medium
JP2505823B2 (en) Document reader
JP5304169B2 (en) Image processing apparatus and image processing method
JP4328609B2 (en) Image processing apparatus, method, program, and storage medium
JP2000032258A (en) Image processing unit and image processing method
JP2008300948A (en) Data processing apparatus
JPH05268479A (en) Picture reader and picture processing method in picture reader
JP2001274993A (en) Image processor, printer device, copying device, facsimile equipment, image forming composite device, image processing method and computer readable recording medium with the processing method recorded therein
JP2001184499A (en) Device and method for processing image and computer readable recording medium having program for executing the same method by computer recorded thereon
JPH01129663A (en) Data arrangement converter

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090526

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090630

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090914

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090924

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121002

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4384124

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131002

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees