JP6228522B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP6228522B2
JP6228522B2 JP2014170533A JP2014170533A JP6228522B2 JP 6228522 B2 JP6228522 B2 JP 6228522B2 JP 2014170533 A JP2014170533 A JP 2014170533A JP 2014170533 A JP2014170533 A JP 2014170533A JP 6228522 B2 JP6228522 B2 JP 6228522B2
Authority
JP
Japan
Prior art keywords
image data
buffer
image
read
image processing
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
JP2014170533A
Other languages
Japanese (ja)
Other versions
JP2016046714A (en
Inventor
石田 圭太郎
圭太郎 石田
Original Assignee
株式会社沖データ
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 株式会社沖データ filed Critical 株式会社沖データ
Priority to JP2014170533A priority Critical patent/JP6228522B2/en
Publication of JP2016046714A publication Critical patent/JP2016046714A/en
Application granted granted Critical
Publication of JP6228522B2 publication Critical patent/JP6228522B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、画像処理装置に関するものであり、例えば、原稿を読み取って(スキャンして)得られた画像データに画像処理を行う複写機などの画像処理装置に適用して好適なものである。   The present invention relates to an image processing apparatus, and is suitable for application to an image processing apparatus such as a copying machine that performs image processing on image data obtained by reading (scanning) a document.

従来の画像処理装置は、原稿読取装置から原稿をプレスキャンして得られた画像データが入力されると、この画像データに対して像域分離などの予備評価の為の画像処理を行い、その後、原稿読取装置から原稿を本スキャンして得られた画像データが入力されると、この画像データをメモリに保存する。そして、画像処理装置は、この画像データをメモリから読み出し、この画像データに対してプレスキャン処理の結果に基づいた画像処理を行い、この画像データを出力するようになっている(例えば特許文献1参照)。   When the image data obtained by pre-scanning the document is input from the document reading device, the conventional image processing device performs image processing for preliminary evaluation such as image area separation on the image data, and then When image data obtained by performing a main scan on a document is input from the document reading device, the image data is stored in a memory. Then, the image processing apparatus reads the image data from the memory, performs image processing based on the result of the pre-scan process on the image data, and outputs the image data (for example, Patent Document 1). reference).

このような従来の画像処理装置では、画像データを保存するメモリの容量をできるだけ小さくする為に、画像データを圧縮してメモリに保存し、読み出し後に伸張するようになっている。尚、この場合の圧縮は、不可逆圧縮である。   In such a conventional image processing apparatus, in order to reduce the capacity of the memory for storing the image data as much as possible, the image data is compressed and stored in the memory, and is expanded after being read out. The compression in this case is irreversible compression.

特開2001−69345号公報JP 2001-69345 A

ところで、従来の画像処理装置のように、画像データを圧縮すると、圧縮時に画像データの一部が破棄される為、伸張しても圧縮前の画像データを完全に復元することはできない。この為、従来の画像処理装置では、画像データを保存するメモリの容量を小さくできる反面、出力する画像データの画質が非圧縮のものと比べて劣化するという問題を有していた。   By the way, when image data is compressed as in a conventional image processing apparatus, a part of the image data is discarded at the time of compression. Therefore, even before decompression, the image data before compression cannot be completely restored. For this reason, the conventional image processing apparatus can reduce the capacity of the memory for storing the image data, but has a problem that the image quality of the output image data is deteriorated as compared with the non-compressed one.

本発明は以上の点を考慮したもので、画像データを保存する記憶部の容量を低減させつつ、画像データの画質の劣化を防ぐことができる画像処理装置を提案しようとするものである。   The present invention has been made in consideration of the above points, and an object of the present invention is to propose an image processing apparatus capable of preventing the image quality of image data from being deteriorated while reducing the capacity of a storage unit for storing image data.

かかる課題を解決するため本発明においては、原稿の一部分をスキャンして得られた画像データを用いるプレスキャン処理と、当該プレスキャン処理の結果に基づいて原稿の全部分をスキャンして得られた画像データを用いる本スキャン処理とを行う画像処理部と、前記プレスキャン処理に必要となる原稿の一部分をスキャンして得られた画像データを保存し得る容量でなるバッファと、前記バッファへの画像データの書き込み及び読み出しを当該画像データのライン単位で制御する制御部とを有し、前記制御部は、前記プレスキャン処理時に、原稿の一部分をスキャンして得られた画像データを前記バッファに書き込んで保存し、当該バッファに保存した画像データを当該バッファから消去せずに読み出して前記画像処理部へと送り、前記本スキャン処理時に、前記プレスキャン処理時に前記バッファに保存した画像データをライン順に当該バッファから読み出して前記画像処理部へと送るとともに当該バッファから消去して当該バッファの空き領域を確保し、さらに原稿の残りの部分をスキャンして得られた前記画像データを当該バッファの空き領域にライン順に書き込みながら、先に書き込んだラインの画像データから順に当該バッファから読み出して前記画像処理部へと送るとともに当該バッファから消去していくようにした。   In order to solve such a problem, in the present invention, a pre-scan process using image data obtained by scanning a part of a document, and a whole part of the document is scanned based on the result of the pre-scan process. An image processing unit for performing a main scan process using image data, a buffer having a capacity capable of storing image data obtained by scanning a part of a document required for the pre-scan process, and an image to the buffer A control unit that controls writing and reading of data in units of lines of the image data, and the control unit writes image data obtained by scanning a part of a document to the buffer during the prescan process. The image data stored in the buffer is read without erasing from the buffer and sent to the image processing unit, During the scan process, the image data stored in the buffer during the pre-scan process is read from the buffer in the line order, sent to the image processing unit, and erased from the buffer to secure a free space in the buffer, and While writing the image data obtained by scanning the remaining part in the empty area of the buffer in line order, the image data of the previously written line is read from the buffer in order and sent to the image processing unit and the buffer. It was made to erase from.

こうすることで、本発明では、画像データを保存するバッファの容量を、プレスキャン処理に必要な原稿の一部分をスキャンして得られる画像データを保存し得る容量に抑えることができるので、例えば、バッファの容量を、原稿の全部分をスキャンして得られる画像データを保存し得る容量にする場合と比べて大幅に小さくすることができる。また、本発明では、本スキャン処理を行うときには、画像データをライン順にバッファに書き込みながら、先に書き込んだラインの画像データから順にバッファから読み出してバッファから消去するようにしたことで、原稿の全部分をスキャンして得られる画像データを保存し得る容量よりも小さい容量のバッファを用いながらも、原稿をスキャンして得られる全ラインの画像データを圧縮することなくバッファリングして本スキャン処理を行うことができる。   In this way, in the present invention, the capacity of the buffer that stores the image data can be suppressed to a capacity that can store the image data obtained by scanning a part of the document necessary for the pre-scan process. The capacity of the buffer can be significantly reduced as compared with a case where the capacity of the image data obtained by scanning the entire part of the original can be saved. Further, in the present invention, when performing the main scan processing, the image data is written in the buffer in the line order, while the image data of the previously written line is sequentially read from the buffer and erased from the buffer. While using a buffer with a capacity smaller than the capacity for storing image data obtained by scanning minutes, the image data of all lines obtained by scanning the original is buffered without being compressed and the main scanning process is performed. It can be carried out.

本発明によれば、バッファの容量を、原稿の全部分をスキャンして得られる画像データを保存し得る容量にする場合と比べて大幅に小さくすることができ、且つこのような小容量のバッファを用いながらも、原稿をスキャンして得られる全ラインの画像データを圧縮することなくバッファリングして本スキャン処理を行うことができる。かくしてバッファとして利用される記憶部の容量を低減させつつ、画像データの画質の劣化を防ぐことができる画像処理装置を実現できる。   According to the present invention, the capacity of the buffer can be significantly reduced as compared with the case where the capacity of the image data obtained by scanning all parts of the document can be stored, and such a small capacity buffer. However, it is possible to perform the main scanning process by buffering the image data of all the lines obtained by scanning the document without compressing it. Thus, it is possible to realize an image processing apparatus capable of preventing the image quality of image data from being deteriorated while reducing the capacity of a storage unit used as a buffer.

画像処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of an image processing apparatus. 画像データバッファの構成を示す略線図である。It is a basic diagram which shows the structure of an image data buffer. スキャン処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of a scanning process. プレスキャン処理時の画像データバッファに対するリード及びライトの説明に供する略線図である。It is an approximate line figure used for explanation of reading and writing to an image data buffer at the time of prescan processing. 本スキャン処理時の画像データバッファに対するリード及びライトの説明に供する略線図である。It is an approximate line figure used for explanation of reading and writing to an image data buffer at the time of this scan processing.

以下、発明を実施するための形態(以下、これを実施の形態と呼ぶ)について、図面を用いて詳細に説明する。   Hereinafter, modes for carrying out the invention (hereinafter referred to as embodiments) will be described in detail with reference to the drawings.

[1.画像処理装置の機能構成]
図1に、本実施の形態による画像処理装置1の機能構成を示す。この図1は、画像処理装置1の機能ごとのブロックを示す図である。画像処理装置1は、画像入力I/F(Interface)2と、画像処理部3と、ライトDMA(Direct Memory Access)コントローラ4と、画像データバッファ制御部5と、リードDMAコントローラ6と、背景除去部7と、画像処理部8と、ライトDMAコントローラ9と、リードDMAコントローラ10と、画像出力I/F11と、共通バス12と、メモリ13と、CPU14とで構成される。
[1. Functional configuration of image processing apparatus]
FIG. 1 shows a functional configuration of an image processing apparatus 1 according to this embodiment. FIG. 1 is a diagram showing blocks for each function of the image processing apparatus 1. The image processing apparatus 1 includes an image input I / F (Interface) 2, an image processing unit 3, a write DMA (Direct Memory Access) controller 4, an image data buffer control unit 5, a read DMA controller 6, and a background removal. Unit 7, image processing unit 8, write DMA controller 9, read DMA controller 10, image output I / F 11, common bus 12, memory 13, and CPU 14.

CPU14は、この画像処理装置1の全体を制御する。ライトDMAコントローラ4、リードDMAコントローラ6、ライトDMAコントローラ9及びリードDMAコントローラ10は、共通バス12を介してメモリ13にアクセスでき、メモリ13へのデータのライト(書き込み)及びリード(読み出し)を実施する。画像入力I/F2は、スキャナなどで構成される画像読取装置20と接続するインタフェースであり、画像出力I/F11は、プリンタなどの画像出力装置21と接続するインタフェースである。   The CPU 14 controls the entire image processing apparatus 1. The write DMA controller 4, the read DMA controller 6, the write DMA controller 9, and the read DMA controller 10 can access the memory 13 via the common bus 12, and write (write) and read (read) data to the memory 13. To do. The image input I / F 2 is an interface connected to the image reading device 20 configured by a scanner or the like, and the image output I / F 11 is an interface connected to an image output device 21 such as a printer.

画像入力I/F2は、画像読取装置20から原稿をスキャンして得られた画像データが入力されると、これを画像処理部3に送る。画像処理部3は、画像読取装置20の特性に関連するシェーディング補正、色補正、ガンマ補正などの補正処理を画像データに対して行う。尚、この補正処理には、画像データのデータ量を削減する為の圧縮処理は含まれない。そして、画像処理部3は、補正処理後の画像データをライトDMAコントローラ4に送る。   The image input I / F 2 sends image data obtained by scanning a document from the image reading device 20 to the image processing unit 3. The image processing unit 3 performs correction processing such as shading correction, color correction, and gamma correction related to the characteristics of the image reading device 20 on the image data. Note that this correction processing does not include compression processing for reducing the amount of image data. Then, the image processing unit 3 sends the corrected image data to the write DMA controller 4.

ライトDMAコントローラ4は、画像データを、共通バス12を介してメモリ13にライトする。尚、画像入力I/F2には、画像読取装置20から原稿をラインスキャンして得られた画像データがライン毎に入力されるようになっていて、ライトDMAコントローラ4は、画像データをライン毎にライン順にメモリ13にライトするようになっている。また、このライトDMAコントローラ4は、画像データバッファ制御部5からメモリ管理情報Mdを受け取る一方で、ライト情報Wdを画像データバッファ制御部5に送る。尚、メモリ管理情報Md及びライト情報Wdについて詳しくは後述する。   The write DMA controller 4 writes the image data to the memory 13 via the common bus 12. Note that image data obtained by line scanning the document from the image reading device 20 is input to the image input I / F 2 for each line, and the write DMA controller 4 receives the image data for each line. The data is written to the memory 13 in line order. The write DMA controller 4 receives the memory management information Md from the image data buffer control unit 5 and sends the write information Wd to the image data buffer control unit 5. Details of the memory management information Md and the write information Wd will be described later.

リードDMAコントローラ6は、ライトDMAコントローラ4によってメモリ13にライトされた画像データを、共通バス12を介して、ライン毎にライン順にメモリ13からリードして背景除去部7に送る。また、このリードDMAコントローラ6は、画像データバッファ制御部5からメモリ管理情報Mdを受け取る一方で、リード情報Rdを画像データバッファ制御部5に送る。尚、リード情報Rdについて詳しくは後述する。   The read DMA controller 6 reads the image data written in the memory 13 by the write DMA controller 4 from the memory 13 in the line order for each line via the common bus 12 and sends the read image data to the background removal unit 7. The read DMA controller 6 receives the memory management information Md from the image data buffer control unit 5, and sends the read information Rd to the image data buffer control unit 5. The read information Rd will be described later in detail.

背景除去部7は、画像データに対して背景除去処理を行う。背景除去処理とは、画像データから原稿の背景色(用紙色)を検出してこれを除去する画像処理であり、背景除去処理を行うことで、原稿から背景汚れや裏写りなどを取り除いた画像データを得ることができる。このような背景除去処理のアルゴリズムとしては、例えば、原稿の一部分をスキャンして得られた画像データを構成する画素群の明度ヒストグラムから最多度数の明度を背景除去レベルとして設定し、この背景除去レベル以上の明度を有する画素を背景色として除去する手法が知られている。背景除去部7も、このようなアルゴリズムの背景除去処理を行うようになっていて、背景除去処理後の画像データを、画像処理部8に送る。また、背景除去部7は、バッファ構成情報Bdを画像データバッファ制御部5に送る。尚、バッファ構成情報Bdについて詳しくは後述する。   The background removal unit 7 performs background removal processing on the image data. Background removal processing is image processing that detects the background color (paper color) of a document from image data and removes it. By performing background removal processing, an image obtained by removing background dirt or show-through from the document. Data can be obtained. As an algorithm for such background removal processing, for example, the most frequent lightness is set as the background removal level from the lightness histogram of the pixel group constituting the image data obtained by scanning a part of the document, and this background removal level is set. A technique for removing pixels having the above brightness as a background color is known. The background removal unit 7 also performs background removal processing of such an algorithm, and sends the image data after the background removal processing to the image processing unit 8. Further, the background removal unit 7 sends the buffer configuration information Bd to the image data buffer control unit 5. The buffer configuration information Bd will be described later in detail.

画像処理部8は、例えば、像域分離、解像度変換、色変換などの画像処理を画像データに対して行う。この画像処理では、例えば、ユーザによって低解像度への変換が設定されている場合に、画像データのデータ量が削減される場合がある。画像処理部8は、画像処理後の画像データをライトDMAコントローラ9に送る。ライトDMAコントローラ9は、画像データを、共通バス12を介してメモリ13にライトする。リードDMAコントローラ10は、ライトDMAコントローラ9によってメモリ13にライトされた画像データを、共通バス12を介してメモリ13からリードして画像出力I/F11に送る。画像出力I/F11は、一連の画像処理が施された画像データを、画像出力装置21に出力する。   For example, the image processing unit 8 performs image processing such as image area separation, resolution conversion, and color conversion on the image data. In this image processing, for example, when conversion to low resolution is set by the user, the amount of image data may be reduced. The image processing unit 8 sends the image data after the image processing to the write DMA controller 9. The write DMA controller 9 writes the image data to the memory 13 via the common bus 12. The read DMA controller 10 reads the image data written to the memory 13 by the write DMA controller 9 from the memory 13 via the common bus 12 and sends it to the image output I / F 11. The image output I / F 11 outputs image data subjected to a series of image processing to the image output device 21.

画像処理装置1の機能構成はこのような構成となっている。実際、この画像処理装置1は、画像読取装置20から入力される原稿の一部分をスキャンして得られた画像データを用いてプレスキャン処理を実行した後、画像読取装置20から入力される原稿の全部分をスキャンして得られた画像データを用いて本スキャン処理を実行し、本スキャン処理後の画像データを画像出力装置21に出力するようになっている。尚、プレスキャン処理及び本スキャン処理について詳しくは後述するが、簡単に説明すると、本スキャン処理は、原稿の全部分の画像データを得て、この画像データに背景除去処理などを実施する処理であり、プレスキャン処理は、原稿の一部分の画像データを得て、この画像データをもとに背景除去処理を行う為に必要な予備評価を行う処理である。   The functional configuration of the image processing apparatus 1 is such a configuration. Actually, the image processing apparatus 1 executes a pre-scan process using image data obtained by scanning a part of a document input from the image reading device 20, and then performs a process for the document input from the image reading device 20. The main scan process is executed using the image data obtained by scanning the entire part, and the image data after the main scan process is output to the image output device 21. Although the details of the pre-scan process and the main scan process will be described later, in brief explanation, the main scan process is a process for obtaining image data of all parts of a document and performing a background removal process on the image data. The prescan process is a process for obtaining image data of a part of a document and performing a preliminary evaluation necessary for performing background removal processing based on the image data.

尚、メモリ13には、ライトDMAコントローラ4及びリードDMAコントローラ6がアクセスする領域である画像データバッファと、ライトDMAコントローラ9及びリードDMAコントローラ10がアクセスする領域である画像データバッファとが別々に確保され、ライトDMAコントローラ4及びリードDMAコントローラ6と、ライトDMAコントローラ9及びリードDMAコントローラ6は、画像データバッファ制御部5の制御に従って、それぞれの画像データバッファにアクセスするようになっている。   In the memory 13, an image data buffer which is an area accessed by the write DMA controller 4 and the read DMA controller 6 and an image data buffer which is an area accessed by the write DMA controller 9 and the read DMA controller 10 are separately secured. The write DMA controller 4 and the read DMA controller 6, and the write DMA controller 9 and the read DMA controller 6 access the respective image data buffers according to the control of the image data buffer control unit 5.

ここで、図2を用いて、ライトDMAコントローラ4及びリードDMAコントローラ6がアクセスする画像データバッファ100について説明する。画像データバッファ100は、複数の連続するライン格納領域101で構成され、各ライン格納領域101は、1ライン分の画像データを格納し得るサイズとなっている。図2に示す画像データバッファ100は、一例として、0番〜15番までの16個の連続するライン格納領域101で構成され、16ライン分のバッファサイズ(容量)となっている。   Here, the image data buffer 100 accessed by the write DMA controller 4 and the read DMA controller 6 will be described with reference to FIG. The image data buffer 100 includes a plurality of continuous line storage areas 101, and each line storage area 101 has a size capable of storing image data for one line. The image data buffer 100 shown in FIG. 2 includes, for example, 16 continuous line storage areas 101 from 0 to 15, and has a buffer size (capacity) for 16 lines.

また、この画像データバッファ100は、最終(15番)のライン格納領域101の次のライン格納領域101が先頭(0番)のライン格納領域101となるように、所謂リングバッファとして管理される。   The image data buffer 100 is managed as a so-called ring buffer so that the line storage area 101 next to the last (15th) line storage area 101 becomes the first (0th) line storage area 101.

この画像データバッファ100のバッファサイズは、背景除去部7によって決定される。具体的に、背景除去部7は、プレスキャン処理時に、背景色を検出する為に必要なライン数を、画像読取装置20から入力される画像データの解像度に基づいて設定するようになっている。実際、原稿1頁を、例えば縦70画素×横70画素の解像度でスキャンする場合、スキャンして得られる画像データは、横70画素を1ラインとする70ライン分の画像データとなる。背景色の検出には、例えば、全体の10分1程度のラインが必要となる為、この場合、背景色の検出に必要なライン数は例えば「7」となる。背景除去部7は、このようにして、背景色の検出に必要なライン数を設定する。   The buffer size of the image data buffer 100 is determined by the background removal unit 7. Specifically, the background removal unit 7 sets the number of lines necessary for detecting the background color based on the resolution of the image data input from the image reading device 20 during the prescan process. . Actually, when one page of a document is scanned with a resolution of, for example, vertical 70 pixels × horizontal 70 pixels, the image data obtained by scanning is image data for 70 lines in which the horizontal 70 pixels are one line. In order to detect the background color, for example, about 1/10 of the total lines are required. In this case, the number of lines necessary for detecting the background color is, for example, “7”. In this way, the background removing unit 7 sets the number of lines necessary for detecting the background color.

画像処理装置1では、このようにして設定されたライン数(例えば7ライン分)の画像データを、プレスキャン処理時にメモリ13にライトして本スキャン処理時まで保存するようになっている。この為、画像データバッファ100のバッファサイズは、背景色の検出に必要なライン数(例えば7ライン分)以上のサイズが必要となる。尚、背景色の検出に必要な画像データのサイズ(すなわちプレスキャン処理に必要な画像データのサイズ)をプレスキャンデータサイズと呼び、画像データバッファ100のバッファサイズは、このプレスキャンデータサイズ以上にする必要がある。   In the image processing apparatus 1, the image data of the number of lines set in this way (for example, for 7 lines) is written to the memory 13 during the pre-scan process and stored until the main scan process. For this reason, the buffer size of the image data buffer 100 needs to be larger than the number of lines (for example, 7 lines) necessary for detecting the background color. The size of the image data necessary for detecting the background color (that is, the size of the image data necessary for the prescan process) is called a prescan data size, and the buffer size of the image data buffer 100 is larger than the prescan data size. There is a need to.

さらに、画像処理装置1では、画像データをライン毎に画像データバッファ100にライトしながら、先にライトした画像データから順にライン毎に画像データバッファ100からリードする所謂先入れ先出し方式で画像データのライト及びリードを実施するようになっている。この場合、画像データバッファ100上のライト位置とリード位置とが衝突しないようにする為には、画像データバッファ100に画像データをライトするのに要する時間(これをライト時間と呼ぶ)と画像データバッファ100から画像データをリードするのに要する時間(これをリード時間と呼ぶ)の差を吸収する為のライン格納領域101が、プレスキャンデータサイズ分のライン格納領域101とは別に必要となる。   Further, the image processing apparatus 1 writes image data in a so-called first-in first-out method in which image data is written to the image data buffer 100 line by line while reading from the image data buffer 100 line by line in order from the previously written image data. Lead is to be implemented. In this case, in order to prevent the write position on the image data buffer 100 from colliding with the read position, the time required to write the image data to the image data buffer 100 (this is called the write time) and the image data A line storage area 101 for absorbing a difference in the time required to read image data from the buffer 100 (referred to as a read time) is required separately from the line storage area 101 corresponding to the prescan data size.

実際、画像処理装置1の場合、ライト時間は、例えば、画像読取装置20から画像入力I/F2へ画像データが入力される速度(これを入力速度と呼ぶ)と、入力される画像データのデータ量に依存する。また、リード時間は、例えば、画像出力I/F11から画像出力装置21へ画像データが出力される速度(これを出力速度と呼ぶ)と、出力される画像データのデータ量に依存する。   Actually, in the case of the image processing apparatus 1, the write time is, for example, the speed at which image data is input from the image reading apparatus 20 to the image input I / F 2 (referred to as input speed) and the data of the input image data. Depends on the amount. The read time depends on, for example, the speed at which image data is output from the image output I / F 11 to the image output device 21 (this is referred to as output speed) and the data amount of the output image data.

ゆえに、背景除去部7では、入力速度と入力される画像データのデータ量からライト時間を得るとともに、出力速度と出力される画像データのデータ量からリード時間を得て、別途必要となるライン格納領域101の数を、ライト時間とリード時間との差に応じた数に設定するようになっている。具体的には、例えば、背景除去部7の内部に、ライト時間とリード時間との差と、この差に対応する別途必要となるライン格納領域101の数とを記したデータを保持するようにして、背景除去部7がこのデータを参照することで、別途必要となるライン格納領域101の数を、ライト時間とリード時間との差に応じた数に設定するようにすればよい。尚、画像処理装置1は、そもそも入力速度と出力速度の差が開きすぎないよう動作する為、別途必要となるライン格納領域101の数は、多くても、プレスキャンデータサイズの3、4倍に収まるようになっている。   Therefore, the background removal unit 7 obtains the write time from the input speed and the data amount of the input image data, and obtains the read time from the output speed and the data amount of the output image data. The number of areas 101 is set to a number corresponding to the difference between the write time and the read time. Specifically, for example, data describing the difference between the write time and the read time and the number of line storage areas 101 required separately corresponding to this difference is held in the background removal unit 7. Thus, the background removal unit 7 may refer to this data to set the number of line storage areas 101 required separately to a number corresponding to the difference between the write time and the read time. Since the image processing apparatus 1 operates so that the difference between the input speed and the output speed is not too large in the first place, the number of line storage areas 101 required separately is at most three or four times the prescan data size. To fit in.

このようにして、背景除去部7は、別途必要となるライン格納領域101の数を例えば「9」に設定して、最終的に、画像データバッファ100のバッファサイズを、7ライン分のプレスキャンデータサイズに9ライン分を追加してなる16ライン分のサイズに決定する。原稿1頁の全ラインの画像データを保存する為に必要なバッファサイズは例えば70ライン分となるので、背景除去部7によって決定される画像データバッファ100のバッファサイズ(16ライン分)は、原稿1頁の全ラインの画像データを保存する場合と比べて1/4程度のサイズとなる。   In this way, the background removal unit 7 sets the number of separately required line storage areas 101 to “9”, for example, and finally sets the buffer size of the image data buffer 100 to a pre-scan for 7 lines. The size is determined to be 16 lines by adding 9 lines to the data size. Since the buffer size necessary for storing the image data of all lines of one page of the document is, for example, 70 lines, the buffer size (16 lines) of the image data buffer 100 determined by the background removal unit 7 is the document size. Compared to storing image data of all lines of one page, the size is about 1/4.

背景除去部7は、このようにして決定した画像データバッファ100のバッファサイズを、バッファ構成情報Bdとして画像データバッファ制御部5に送る。尚、このバッファ構成情報Bdには、プレスキャンデータサイズも記されているとする。そして、画像データバッファ制御部5は、メモリ13上に、バッファ構成情報Bdに記されているバッファサイズの画像データバッファ100を確保する。このとき、16個のライン格納領域101のうち、0番〜6番までの7個のライン格納領域101が、プレスキャンデータサイズとなり、この7個のライン格納領域101が、背景色の検出に必要な7ライン分の画像データを格納する領域となる。   The background removal unit 7 sends the buffer size of the image data buffer 100 determined in this way to the image data buffer control unit 5 as buffer configuration information Bd. It is assumed that the pre-scan data size is also written in the buffer configuration information Bd. Then, the image data buffer control unit 5 secures the image data buffer 100 having the buffer size described in the buffer configuration information Bd on the memory 13. At this time, of the 16 line storage areas 101, 7 line storage areas 101 from No. 0 to No. 6 have the pre-scan data size, and these 7 line storage areas 101 are used for detection of the background color. This is an area for storing the required image data for seven lines.

画像データバッファ制御部5は、ライン格納領域101毎のデータの有無を示す状態ビットSbと、現在のライト位置を示すライトポインタWpと、現在のリード位置を示すリードポインタRpとによって、画像データバッファ100を管理する。これら状態ビットSb、ライトポインタWp及びリードポインタRpは、画像データバッファ制御部5の内部に保持される。   The image data buffer control unit 5 uses the status bit Sb indicating the presence / absence of data for each line storage area 101, the write pointer Wp indicating the current write position, and the read pointer Rp indicating the current read position to generate an image data buffer. 100 is managed. The status bit Sb, the write pointer Wp, and the read pointer Rp are held inside the image data buffer control unit 5.

状態ビットSbは、「0」であれば、ライン格納領域101に画像データが格納されていないことを表し、「1」であれば、ライン格納領域101に画像データが格納されていることを表す。状態ビットSbが「0」のライン格納領域101には、画像データが格納されていないので、ライトDMAコントローラ4はこのライン格納領域101に画像データをライトできる。一方で、リードDMAコントローラ6はこのライン格納領域101から画像データをリードすることはできない。状態ビットSbが「0」のライン格納領域101に、ライトDMAコントローラ4が画像データをライトすると、このライン格納領域101の状態ビットは「0」から「1」に更新される。   If the status bit Sb is “0”, it indicates that image data is not stored in the line storage area 101, and if it is “1”, it indicates that image data is stored in the line storage area 101. . Since no image data is stored in the line storage area 101 in which the status bit Sb is “0”, the write DMA controller 4 can write the image data in this line storage area 101. On the other hand, the read DMA controller 6 cannot read image data from the line storage area 101. When the write DMA controller 4 writes image data to the line storage area 101 whose status bit Sb is “0”, the status bit of this line storage area 101 is updated from “0” to “1”.

状態ビットSbが「1」のライン格納領域101には、画像データが格納されているので、ライトDMAコントローラ4はこのライン格納領域101に画像データをライトすることはできない。一方で、リードDMAコントローラ6はこのライン格納領域101から画像データをリードすることができる。状態ビットSbが「1」のライン格納領域101から、ライトDMAコントローラ4が画像データをリードすると、このライン格納領域101の状態ビットは「1」から「0」に更新され、このライン格納領域101から画像データが消去される。   Since the image data is stored in the line storage area 101 whose status bit Sb is “1”, the write DMA controller 4 cannot write the image data in this line storage area 101. On the other hand, the read DMA controller 6 can read image data from the line storage area 101. When the write DMA controller 4 reads image data from the line storage area 101 whose status bit Sb is “1”, the status bit of this line storage area 101 is updated from “1” to “0”. The image data is deleted from.

尚、画像処理装置1では、プレスキャン処理時に、0番〜6番までの7個のライン格納領域101に、背景色の検出に必要な7ライン分の画像データをライトし、これをリードして背景除去部7に送るようになっていて、且つこの7ライン分の画像データを、本スキャン処理時まで保存しなくてはならない。この為、画像処理装置1では、プレスキャン処理時には、状態ビットSbが「1」のライン格納領域101から画像データをリードしても、このライン格納領域101から画像データを消去せずに状態ビットを「1」のまま維持するようになっている。   The image processing apparatus 1 writes 7 lines of image data necessary for background color detection to the 7 line storage areas 101 from No. 0 to No. 6 during the pre-scan process, and reads them. The image data for 7 lines must be stored until the main scanning process. For this reason, in the image processing apparatus 1, during pre-scan processing, even if image data is read from the line storage area 101 whose status bit Sb is “1”, the status bit is not erased from the line storage area 101. Is maintained as “1”.

ライトポインタWpは、ライトDMAコントローラ4が次にライトすべきライン格納領域101を指し示す。このライトポインタWpは、指し示しているライン格納領域101へのライトDMAコントローラ4によるライトが完了すると、次のライン格納領域101へと移り、最終(15番)のライン格納領域へのライトが完了すると、先頭(0番)のライン格納領域101へと戻るようになっている。尚、ライトDMAコントローラ4は、ライン格納領域101へのライトが完了すると、その都度、ライトが完了したライン格納領域101を示すライト情報Wdを、画像データバッファ制御部5に送るようになっている。これにより、画像データバッファ制御部5は、画像データバッファ100のどのライン格納領域101まで画像データがライトされているかをライト情報Wdから知ることができる。   The write pointer Wp points to the line storage area 101 that the write DMA controller 4 should write next. The write pointer Wp moves to the next line storage area 101 when the write by the write DMA controller 4 to the indicated line storage area 101 is completed, and when writing to the final (15th) line storage area is completed. Return to the first (0th) line storage area 101. The write DMA controller 4 sends write information Wd indicating the line storage area 101 for which writing has been completed to the image data buffer control unit 5 every time writing to the line storage area 101 is completed. . Accordingly, the image data buffer control unit 5 can know from the write information Wd to which line storage area 101 of the image data buffer 100 the image data has been written.

リードポインタRpは、リードDMAコントローラ6が次にリードすべきライン格納領域101を指し示す。このリードポインタRpは、指し示しているライン格納領域101からのリードDMAコントローラ6によるリードが完了すると、次のライン格納領域101へと移り、最終(15番)のライン格納領域からのリードが完了すると、先頭(0番)のライン格納領域101へと戻るようになっている。尚、リードDMAコントローラ6は、ライン格納領域101からのリードが完了すると、その都度、リードが完了したライン格納領域101を示すリード情報Rdを、画像データバッファ制御部5に送るようになっている。これにより、画像データバッファ制御部5は、画像データバッファ100のどのライン格納領域101まで画像データがリードされているかをリード情報Rdから知ることができる。   The read pointer Rp indicates the line storage area 101 to be read next by the read DMA controller 6. The read pointer Rp moves to the next line storage area 101 when reading from the indicated line storage area 101 by the read DMA controller 6 is completed, and when reading from the final (15th) line storage area is completed. Return to the first (0th) line storage area 101. Each time the read from the line storage area 101 is completed, the read DMA controller 6 sends read information Rd indicating the completed line storage area 101 to the image data buffer control unit 5. . Thereby, the image data buffer control unit 5 can know from the read information Rd to which line storage area 101 of the image data buffer 100 the image data has been read.

画像データバッファ制御部5は、ライト情報Wd及びリード情報Rdに基づいて、画像データバッファ100の各ライン格納領域101の状態ビットSbと、ライトポインタWp及びリードポインタRpを更新する。状態ビットSbとライトポインタWpは、メモリ管理情報Mdとして、画像データバッファ制御部5からライトDMAコントローラ4へと送られる。ライトDMAコントローラ4は、このメモリ管理情報Mdをもとに、画像データバッファ100のどのライン格納領域101にライトすべきかを判別するようになっている。また、状態ビットSbとリードポインタRpは、メモリ管理情報Mdとして、画像データバッファ制御部5からリードDMAコントローラ6へと送られる。リードDMAコントローラ6は、このメモリ管理情報Mdをもとに、画像データバッファ100のどのライン格納領域101からリードすべきかを判別するようになっている。   The image data buffer control unit 5 updates the status bit Sb of each line storage area 101 of the image data buffer 100, the write pointer Wp, and the read pointer Rp based on the write information Wd and the read information Rd. The status bit Sb and the write pointer Wp are sent from the image data buffer control unit 5 to the write DMA controller 4 as memory management information Md. The write DMA controller 4 determines which line storage area 101 of the image data buffer 100 should be written based on the memory management information Md. The status bit Sb and the read pointer Rp are sent from the image data buffer control unit 5 to the read DMA controller 6 as memory management information Md. The read DMA controller 6 determines which line storage area 101 of the image data buffer 100 should be read based on the memory management information Md.

[2.画像処理装置によるスキャン処理]
次に、図3に示すフローチャートを用いて、プレスキャン処理と本スキャン処理からなるスキャン処理の手順について説明する。尚、このスキャン処理は、CPU14が画像処理装置1の各機能部と協働して行う処理であり、図3に示すステップSP1〜SP4の処理がプレスキャン処理、ステップSP5〜SP7の処理が本スキャン処理となっている。
[2. Scan processing by image processing apparatus]
Next, a procedure of scan processing including pre-scan processing and main scan processing will be described with reference to the flowchart shown in FIG. This scanning process is a process performed by the CPU 14 in cooperation with each functional unit of the image processing apparatus 1, and the processes in steps SP1 to SP4 shown in FIG. 3 are the pre-scan process, and the processes in steps SP5 to SP7 are the main processes. Scan processing.

スキャン処理を開始すると、まずステップSP1において、背景除去部7が、プレスキャンデータサイズと画像データバッファ100のバッファサイズとを決定する。ここでは、一例として、背景除去部7が、プレスキャンデータサイズを、7ライン分のサイズに決定して、さらに画像データバッファサイズを、プレスキャンデータサイズ+9ライン分の計16ライン分のサイズに決定する。そして、背景除去部7は、このようにして決定したプレスキャンデータサイズと画像データバッファ100のバッファサイズとを示すバッファ構成情報Bdを画像データバッファ制御部5に送る。画像データバッファ制御部5は、このバッファ構成情報Bdをもとに、7ライン分のプレスキャンデータサイズ+9ライン分の計16ライン分のサイズでなる画像データバッファ100を、メモリ13上に確保する。   When the scanning process is started, first, in step SP1, the background removal unit 7 determines the pre-scan data size and the buffer size of the image data buffer 100. Here, as an example, the background removal unit 7 determines the prescan data size as a size corresponding to 7 lines, and further increases the image data buffer size to a size corresponding to a total of 16 lines corresponding to the prescan data size + 9 lines. decide. Then, the background removal unit 7 sends buffer configuration information Bd indicating the prescan data size determined in this way and the buffer size of the image data buffer 100 to the image data buffer control unit 5. Based on this buffer configuration information Bd, the image data buffer control unit 5 secures an image data buffer 100 on the memory 13 having a prescan data size for 7 lines + a total of 16 lines for 9 lines. .

このときの画像データバッファ100と、各ライン格納領域101の状態ビットSbの値、ライトポインタWp及びリードポインタRpの位置を、図4(A)に示す。この時点では、まだ画像データバッファ100に画像データがライトされていないので、全てのライン格納領域101の状態ビットSbの値は「0」であり、ライトポインタWpとリードポインタRpは、ともに先頭(0番)のライン格納領域101を指し示している。   FIG. 4A shows the image data buffer 100 and the value of the status bit Sb of each line storage area 101 and the positions of the write pointer Wp and the read pointer Rp at this time. At this time, since the image data has not yet been written to the image data buffer 100, the value of the status bit Sb of all the line storage areas 101 is “0”, and both the write pointer Wp and the read pointer Rp are at the head ( No. 0) line storage area 101 is indicated.

つづくステップSP2において、画像読取装置20から画像入力I/F2への画像データの入力を開始する。このとき、画像入力I/F2には、原稿をスキャンして得られた画像データが先頭ラインから順に入力され、画像処理部3で補正処理が行われた後、ライトDMAコントローラ4によって画像データバッファ100に先頭ラインから順にライン毎にライトされていく。さらに、このようにして、画像データバッファ100にライトされた画像データは、リードDMAコントローラ6によって先頭ラインから順にライン毎にリードされ、背景除去部7に送られる。   In subsequent step SP2, input of image data from the image reading device 20 to the image input I / F 2 is started. At this time, image data obtained by scanning the document is input to the image input I / F 2 in order from the first line, and after correction processing is performed by the image processing unit 3, the image data buffer is written by the write DMA controller 4. 100 is written for each line in order from the first line. Further, the image data written in the image data buffer 100 in this way is read for each line in order from the first line by the read DMA controller 6 and sent to the background removal unit 7.

ここで、画像データバッファ100の0番から6番のライン格納領域101まで画像データのライトが完了して、且つ0番から2番のライン格納領域101まで画像データのリードが完了して3番のライン格納領域101から画像データをリード中であるとする。尚、画像データのリードは、画像データのライトと同時に開始されるのではなく、数ライン分のライトが完了してから開始されるようになっている。   Here, the writing of the image data from the 0th to the 6th line storage areas 101 of the image data buffer 100 is completed, and the reading of the image data from the 0th to the 2nd line storage areas 101 is completed to the 3rd. It is assumed that image data is being read from the line storage area 101. The reading of the image data is not started at the same time as the writing of the image data, but is started after the writing for several lines is completed.

このとき、図4(B)に示すように、ライトポインタWpはライトが完了した6番の次の7番のライン格納領域101を指し示し、リードポインタRpはリード中の3番のライン格納領域101を指し示している。また、プレスキャン処理時には、ライトした画像データをリードしても画像データバッファ100から消去しないようになっている為、リード位置に関係なく、ライトが完了している0番から6番までのライン格納領域101の状態ビットSbが「1」で、7番から15番までの状態ビットSbが「0」となっている。この時点で、画像データバッファ100には、原稿の一部分をスキャンして得られたプレスキャンデータサイズ分の画像データがライトされたことになる。   At this time, as shown in FIG. 4B, the write pointer Wp points to the 7th line storage area 101 next to the 6th write, and the read pointer Rp is the 3rd line storage area 101 being read. Pointing. In addition, during the pre-scan process, even if the written image data is read, it is not erased from the image data buffer 100. Therefore, lines 0 to 6 where writing has been completed regardless of the read position. The status bit Sb of the storage area 101 is “1”, and the status bits Sb from No. 7 to No. 15 are “0”. At this time, the image data buffer 100 has been written with the image data for the pre-scan data size obtained by scanning a part of the document.

つづくステップSP3において、画像データバッファ制御部5は、プレスキャンデータサイズ分の画像データのリードが完了するまで、ライトDMAコントローラ4及びリードDMAコントローラ6に画像データのライトとリードを継続させる。   In subsequent step SP3, the image data buffer control unit 5 causes the write DMA controller 4 and the read DMA controller 6 to continue writing and reading the image data until reading of the image data corresponding to the pre-scan data size is completed.

そして、画像データバッファ100の6番のライン格納領域101まで画像データのリードが完了して、プレスキャンデータサイズ分の画像データのリードが完了したとする。このとき、背景除去部7には、プレスキャンデータサイズ分の画像データ、すなわち背景色の検出に必要な7ライン分の画像データが送られたことになる。また、このとき、画像データのライトは、例えば10番のライン格納領域101まで完了しているとする。   Assume that reading of image data is completed up to the sixth line storage area 101 of the image data buffer 100, and reading of image data corresponding to the prescan data size is completed. At this time, the image data for the prescan data size, that is, the image data for 7 lines necessary for detecting the background color is sent to the background removal unit 7. At this time, it is assumed that the writing of the image data has been completed up to, for example, the tenth line storage area 101.

このとき、図4(C)に示すように、ライトポインタWpはライトが完了した10番の次の11番のライン格納領域101を指し示し、リードポインタRpはリードが完了した6番の次の7番のライン格納領域101を指し示している。また、ライトが完了している0番から10番までのライン格納領域101の状態ビットSbが「1」で、11番から15番までの状態ビットSbが「0」となっている。   At this time, as shown in FIG. 4C, the write pointer Wp points to the eleventh line storage area 101 next to the tenth when the write is completed, and the read pointer Rp is the next 7th after the sixth when the read is completed. No. line storage area 101 is indicated. Further, the status bits Sb of the line storage areas 101 from No. 0 to No. 10 where the writing is completed are “1”, and the status bits Sb from No. 11 to No. 15 are “0”.

このようにして、プレスキャンデータサイズ分の画像データのリードが完了して、背景除去部7に背景色の検出に必要な7ライン分の画像データが送られると、つづくステップSP4において、背景除去部7が、この7ライン分の画像データから原稿の背景色を検出して、この背景色をもとに、本スキャン処理で背景除去処理を行うときに必要な背景除去処理パラメータを決定する。   In this way, when reading of the image data for the pre-scan data size is completed and image data for 7 lines necessary for detecting the background color is sent to the background removal unit 7, background removal is performed in step SP4. The unit 7 detects the background color of the document from the image data for the seven lines, and determines background removal processing parameters required when performing background removal processing in the main scanning processing based on the background color.

このように、ステップSP1からこのステップSP4までのプレスキャン処理では、原稿の一部分をスキャンして得られたプレスキャンデータサイズ分(7ライン分)の画像データを圧縮せずに画像データバッファ100を介して背景除去部7に送り、背景除去部7によって背景除去処理パラメータを決定するようになっている。   As described above, in the pre-scan process from step SP1 to step SP4, the image data buffer 100 is stored without compressing the image data corresponding to the pre-scan data size (7 lines) obtained by scanning a part of the document. The background removal unit 7 determines the background removal processing parameters.

つづくステップSP5において、画像データバッファ制御部5は、図5(A)に示すように、リードポインタRpを一旦先頭(0番)のライン格納領域101まで戻すことで、画像データバッファ100にライトされた画像データを、リードDMAコントローラ6によって、再度、先頭ラインからリードさせる。   In subsequent step SP5, as shown in FIG. 5A, the image data buffer control unit 5 returns the read pointer Rp to the first (0th) line storage area 101 to write to the image data buffer 100. The read image data is again read from the first line by the read DMA controller 6.

一方で、画像データバッファ100への画像データのライトは、プレスキャン処理から継続して行われる。実際、プレスキャン処理時に、原稿をスキャンして得られた先頭ラインから11番目のラインまでの画像データが、既に0番から10番のライン格納領域101にライトされているので、ここでは、12番目のラインから最終ラインまでの画像データが、11番のライン格納領域101から順にライトされていく。   On the other hand, the writing of the image data to the image data buffer 100 is continued from the pre-scan process. Actually, the image data from the first line to the eleventh line obtained by scanning the document during the pre-scan process has already been written in the 0th to 10th line storage areas 101. The image data from the 1st line to the last line is written in order from the 11th line storage area 101.

また、本スキャン処理では、プレスキャン処理のときとは異なり、プレスキャン処理時にライトされた画像データ(すなわち原稿1頁の一部分をスキャンして得られる先頭ラインから11番目のラインまでの画像データ)をリードするとともに、残りの画像データ(すなわち原稿1頁の残りの部分をスキャンして得られる12番目のラインから最終ラインまでの画像データ)を順次、画像データバッファ100にライトしながらリードしていく必要がある為、画像データがライトされたライン格納領域101から画像データがリードされると、このライン格納領域101の状態ビットを「1」から「0」に更新して順次ライン格納領域101に格納されている画像データを消去するようになっている。リードDMAコントローラ6によって画像データバッファ100からリードされた画像データは、順次、背景除去部7に送られる。   In the main scanning process, unlike the pre-scan process, the image data written during the pre-scan process (that is, image data from the first line to the eleventh line obtained by scanning a part of one page of the document). And reading the remaining image data (that is, the image data from the 12th line to the last line obtained by scanning the remaining portion of one page of the original) while sequentially writing to the image data buffer 100. Therefore, when the image data is read from the line storage area 101 to which the image data has been written, the status bit of the line storage area 101 is updated from “1” to “0” and sequentially the line storage area 101 The image data stored in is deleted. The image data read from the image data buffer 100 by the read DMA controller 6 is sequentially sent to the background removal unit 7.

ここで、画像データバッファ100の0番から12番のライン格納領域101まで画像データのライトが完了して、且つ0番から1番のライン格納領域101まで画像データのリードが完了したとする。   Here, it is assumed that the writing of the image data from the 0th to the 12th line storage area 101 of the image data buffer 100 is completed and the reading of the image data from the 0th to the 1st line storage area 101 is completed.

このとき、図5(B)に示すように、ライトポインタWpはライトが完了した12番の次の13番のライン格納領域101を指し示し、リードポインタRpはリードが完了した1番の次の2番のライン格納領域101を指し示している。また、ライトされていない13番から15番までのライン格納領域101の状態ビットSbと、ライトが完了した0番から12番までのライン格納領域101のうち、リードが完了した0番から1番までのライン格納領域101の状態ビットSbとが「0」で、ライトが完了して且つまだリードされていない2番から12番までの状態ビットSbが「1」となっている。   At this time, as shown in FIG. 5B, the write pointer Wp points to the 13th line storage area 101 next to the 12th when the writing is completed, and the read pointer Rp is the 2nd next to the 1st after the reading is completed. No. line storage area 101 is indicated. In addition, among the state bits Sb of the line storage areas 101 from No. 13 to No. 15 that have not been written and the line storage areas 101 from No. 0 to No. 12 where writing has been completed, No. 0 to No. 1 from which reading has been completed The status bits Sb of the line storage area 101 until “0” are “0”, and the status bits Sb from No. 2 to No. 12 that have not been read yet are “1”.

その後、図5(C)に示すように、画像データバッファ100の最終(15番)のライン格納領域101まで画像データのライトが完了すると、画像データバッファ制御部5は、ライトポインタWpを、画像データバッファ100の先頭(0番)のライン格納領域101に移す。また、図示しないが、画像データバッファ制御部5は、リードポインタRpについても、画像データバッファ100の最終(15番)のライン格納領域101まで画像データのリードが完了すると、画像データバッファ100の先頭(0番)のライン格納領域101に移すようになっている。   After that, as shown in FIG. 5C, when the writing of the image data is completed up to the final (15th) line storage area 101 of the image data buffer 100, the image data buffer control unit 5 sets the write pointer Wp to the image pointer. Move to the first (0th) line storage area 101 of the data buffer 100. Although not shown, the image data buffer controller 5 also reads the image data buffer 100 when the read of the read pointer Rp is completed up to the last (15th) line storage area 101 of the image data buffer 100. The (0th) line storage area 101 is moved.

このように画像データバッファ制御部5は、画像データバッファ100をリングバッファとして機能させて、原稿1頁の全部分をスキャンして得られる全ラインの画像データのリードが完了するまで、ライトDMAコントローラ4及びリードDMAコントローラ6に画像データのライトとリードを継続させる。   As described above, the image data buffer control unit 5 causes the image data buffer 100 to function as a ring buffer, and the write DMA controller until reading of the image data of all lines obtained by scanning all parts of one page of the original is completed. 4 and the read DMA controller 6 continue to write and read image data.

つづくステップSP6において、背景除去部7は、プレスキャン処理時に決定した背景除去処理パラメータに基づいて、ライン単位で順次送られてくる画像データに対して背景除去処理を行う。背景除去処理後の画像データは、画像処理部8へ送られ、所定の画像処理が行われた後、ライトDMAコントローラ9へと送られる。ライトDMAコントローラ9は、画像処理部8から送られてくる画像データを、メモリ13の画像データバッファ100とは別に確保された画像データバッファにライン毎にライトしていく。   In subsequent step SP6, the background removal unit 7 performs background removal processing on the image data sequentially sent in units of lines based on the background removal processing parameters determined during the prescan processing. The image data after the background removal processing is sent to the image processing unit 8, subjected to predetermined image processing, and then sent to the write DMA controller 9. The write DMA controller 9 writes the image data sent from the image processing unit 8 to the image data buffer secured separately from the image data buffer 100 of the memory 13 for each line.

つづくステップSP7において、リードDMAコントローラ10が、ライトDMAコントローラ9によってメモリ13にライトされた画像データをライン毎にリードして、これを画像出力I/F11に送り、画像出力I/F11を介して画像出力装置21に出力する。   In the next step SP7, the read DMA controller 10 reads the image data written to the memory 13 by the write DMA controller 9 line by line, sends it to the image output I / F 11, and via the image output I / F 11 The image is output to the image output device 21.

尚、ステップSP5、SP6、SP7の処理は同時並行で行われる。つまり、ステップSP5で、画像データバッファ100に対する画像データのライトとリードをライン単位で実施しながら、ステップSP6で、画像データバッファ100からリードされた画像データに対してライン単位で背景除去処理を行い、さらにステップSP7で、背景除去処理後の画像データをメモリ13を介してライン単位で出力するようになっている。そして、画像処理装置1は、原稿1頁分の全ラインの画像データの出力が完了するまで、ステップSP5からステップSP7までの処理を継続する。   Note that the processes of steps SP5, SP6, and SP7 are performed in parallel. In other words, while performing writing and reading of image data to / from the image data buffer 100 in units of lines in step SP5, background removal processing is performed in units of lines on the image data read from the image data buffer 100 in step SP6. Further, in step SP7, the image data after the background removal processing is output line by line via the memory 13. Then, the image processing apparatus 1 continues the processing from step SP5 to step SP7 until the output of the image data of all lines for one page of the document is completed.

このように、ステップSP5からステップSP7までの本スキャン処理では、原稿1頁分の全ラインの画像データを画像データバッファ100にバッファリングして背景除去部7に送り、背景除去部7によって背景除去処理パラメータに基づく背景処理が行われた後、これを画像出力装置21に出力するようになっている。   As described above, in the main scanning process from step SP5 to step SP7, the image data of all lines for one page of the document is buffered in the image data buffer 100 and sent to the background removal unit 7, and the background removal unit 7 removes the background. After background processing based on the processing parameters is performed, this is output to the image output device 21.

尚、上述の本スキャン処理では、背景除去処理後の画像データを、メモリ13に確保された画像データバッファ100とは別の画像データバッファにライトするようにしたが、この画像データバッファのバッファサイズは、例えば、原稿1頁分の全ライン(例えば70ライン)の画像データを保存し得るサイズとする。これは、例えば、出力が失敗したときなどに、再度、この画像データバッファから画像データをリードして再出力できるようにする為である。   In the above-described main scan processing, the image data after the background removal processing is written to an image data buffer different from the image data buffer 100 secured in the memory 13, but the buffer size of this image data buffer Is, for example, a size capable of storing image data of all lines (for example, 70 lines) for one page of a document. This is because, for example, when output fails, the image data can be read again from the image data buffer and re-outputted.

[3.まとめと効果]
上述したように、画像処理装置1は、プレスキャン処理を開始すると、まず画像データを保存する為の画像データバッファ100のバッファサイズを、原稿の背景色を検出する際に必要となる原稿の一部分をスキャンして得られる画像データを保存し得るサイズに設定する。
[3. Summary and Effect]
As described above, when the image processing apparatus 1 starts the pre-scan process, first, the buffer size of the image data buffer 100 for storing the image data is set to a part of the document required for detecting the background color of the document. Is set to a size that can store image data obtained by scanning.

そして、画像処理装置1は、画像読取装置20から入力される原稿の一部分をスキャンして得られる画像データを画像データバッファ100にライトし、この画像データを画像データバッファ100に残したままリードして背景除去部7に送り、この画像データをもとに原稿の背景色を検出して背景除去処理パラメータを設定する。   Then, the image processing apparatus 1 writes the image data obtained by scanning a part of the document input from the image reading apparatus 20 to the image data buffer 100, and reads the image data while remaining in the image data buffer 100. The image is sent to the background removal unit 7 to detect the background color of the document based on the image data and set the background removal processing parameter.

その後、画像処理装置1は、本スキャンを開始する。このとき、画像処理装置1は、画像データバッファ100に保存されているプレスキャン処理時にライトされた数ライン分の画像データを、先頭ラインからライン毎にリードして背景除去部7に送るとともに、画像データバッファ100の空き領域を確保する為に、リードした画像データを画像データバッファ100から削除していく。さらに、画像処理装置1は、画像読取装置20から入力される、プレスキャン処理時にライトされたラインにつづく残りのラインの画像データをライン毎に画像データバッファ100の空き領域にライトするとともに、ライトした画像データを画像データバッファ100からリードして背景除去部7に送る。   Thereafter, the image processing apparatus 1 starts a main scan. At this time, the image processing apparatus 1 reads the image data for several lines written at the time of the pre-scan processing stored in the image data buffer 100 for each line from the first line and sends it to the background removal unit 7. In order to secure a free space in the image data buffer 100, the read image data is deleted from the image data buffer 100. Furthermore, the image processing apparatus 1 writes the image data of the remaining lines following the lines written during the prescan process, which are input from the image reading apparatus 20, into the empty area of the image data buffer 100 for each line, and write The read image data is read from the image data buffer 100 and sent to the background removal unit 7.

そして、画像処理装置1は、背景除去部7に送られてくる画像データに対して、プレスキャン処理で設定した背景除去処理パラメータを用いた背景除去処理を行い、背景除去処理後の画像データを画像出力装置21へと出力する。   Then, the image processing apparatus 1 performs a background removal process using the background removal process parameters set in the prescan process on the image data sent to the background removal unit 7, and obtains the image data after the background removal process. The image is output to the image output device 21.

このように、画像処理装置1では、画像データバッファ100のバッファサイズを、プレスキャン処理で必要となるサイズ、すなわち原稿の一部分をスキャンした画像データを保存し得るサイズに抑えることができるので、例えば、原稿の全部分をスキャンした画像データを保存し得るサイズを確保する場合と比べて、画像データバッファ100のバッファサイズを小さくすることができる。   As described above, in the image processing apparatus 1, the buffer size of the image data buffer 100 can be suppressed to a size necessary for the pre-scan process, that is, a size capable of storing image data obtained by scanning a part of a document. The buffer size of the image data buffer 100 can be reduced as compared with a case where a size capable of storing image data obtained by scanning the entire part of the document is secured.

そのうえで、画像処理装置1では、本スキャン処理時に、原稿の全部分をスキャンした画像データをライン毎に画像データバッファ100にライトしながら、先に書き込んだラインの画像データから順に画像データバッファ100からリードするとともに画像データバッファ100から消去するようにしたことで、原稿の全部分をスキャンして得られる全ラインの画像データを保存し得るサイズより小容量の画像データバッファ100を用いながら、原稿の全部分をスキャンして得られる画像データを圧縮することなくバッファリングして本スキャン処理を行うことができる。   In addition, in the image processing apparatus 1, during the main scanning process, the image data obtained by scanning all parts of the document is written to the image data buffer 100 line by line, and the image data of the previously written line is sequentially read from the image data buffer 100. By reading and erasing from the image data buffer 100, the image data buffer 100 having a smaller capacity than the size capable of storing the image data of all lines obtained by scanning all parts of the document is used. The main scanning process can be performed by buffering the image data obtained by scanning the entire part without compressing the image data.

かくして、画像処理装置1では、原稿の全部分をスキャンして得られる画像データを保存し得るサイズの画像データバッファ100を用意する場合と比べて、画像データバッファ100のバッファサイズを大幅に小さくすることができ、且つこの小容量の画像データバッファ100を用いて、原稿の全部分をスキャンして得られる画像データを圧縮することなくバッファリングして背景除去部7に送ることができるので、画像データを保存する画像データバッファの容量を低減させつつ、画像データの画質劣化を防ぐことができる。   Thus, in the image processing apparatus 1, the buffer size of the image data buffer 100 is significantly reduced as compared with the case where the image data buffer 100 having a size capable of storing the image data obtained by scanning all parts of the document is prepared. Since this small-capacity image data buffer 100 can be used to buffer the image data obtained by scanning the entire portion of the document without compression and send it to the background removal unit 7. Image quality deterioration of image data can be prevented while reducing the capacity of an image data buffer for storing data.

尚、画像データバッファ100のバッファサイズを低減させることができるということは、この画像データバッファ100として利用するメモリ13の容量も低減させることができることを意味する。   Note that the fact that the buffer size of the image data buffer 100 can be reduced means that the capacity of the memory 13 used as the image data buffer 100 can also be reduced.

くわえて、画像処理装置1では、プレスキャン処理時に画像データバッファ100にライトした画像データ(すなわちプレスキャン処理に必要な画像データ)については、プレスキャン処理時に画像データバッファ100からリードしても消去せず、本スキャン処理時に再リードするようにした。   In addition, in the image processing apparatus 1, the image data written to the image data buffer 100 during the prescan process (that is, image data necessary for the prescan process) is erased even if read from the image data buffer 100 during the prescan process. Without re-reading, this read process was re-read.

こうすることで、例えば、本スキャン処理時には、プレスキャン処理時にライトされたラインの画像データを画像データバッファ100からリードして、プレスキャン処理時にライトされたラインにつづくラインの画像データから画像データバッファ100にライトすることができるので、本スキャン処理時に、全ラインの画像データを再度先頭ラインから画像データバッファ100にライトしてリードする場合と比べて、本スキャン処理に要する時間を短縮できる。   In this way, for example, during the main scan process, the image data of the line written during the pre-scan process is read from the image data buffer 100, and the image data from the image data of the line following the line written during the pre-scan process is read out. Since the data can be written to the buffer 100, the time required for the main scanning process can be shortened in the main scanning process as compared with the case where the image data of all lines is written to the image data buffer 100 from the first line again and read.

[4.他の実施の形態]
[4−1.他の実施の形態1]
尚、上述した実施の形態では、背景除去部7による背景除去処理及び画像処理部8による画像処理を行った画像データを、画像出力I/F11を介してプリンタなどの画像出力装置21に出力するようにした。これに限らず、例えば、画像処理装置1の画像出力I/F11に、USB(Universal Sirial Bus)メモリなどの外部記憶装置を接続するようにして、背景除去部7による背景除去処理及び画像処理部8による画像処理を行った画像データを、画像出力I/F11を介して外部記憶装置に出力して記憶させるようにしてもよい。また、これら以外の装置に出力するようにしてもよい。
[4. Other Embodiments]
[4-1. Other Embodiment 1]
In the above-described embodiment, the image data subjected to the background removal processing by the background removal unit 7 and the image processing by the image processing unit 8 is output to the image output device 21 such as a printer via the image output I / F 11. I did it. Not limited to this, for example, an external storage device such as a USB (Universal Sirial Bus) memory is connected to the image output I / F 11 of the image processing device 1 so that the background removal processing and the image processing unit are performed by the background removal unit 7. The image data that has undergone the image processing according to 8 may be output and stored in the external storage device via the image output I / F 11. Moreover, you may make it output to apparatuses other than these.

さらに、上述した実施の形態では、画像処理部8による画像処理を行った画像データを、メモリ13上に画像データバッファ100とは別に確保された画像データバッファにバッファリングして出力するようにしたが、これに限らず、例えば、画像処理部8による画像処理を行った画像データを、そのまま画像出力I/F11を介して画像出力装置21に出力するようにしてもよい。さらに、画像出力I/F11に外部記憶装置を接続するようにして、画像処理部8による画像処理を行った画像データを、そのまま画像出力I/F11を介して外部記憶装置に出力して記憶させるようにしてもよい。さらに、これら以外の装置にそのまま出力するようにしてもよい。   Furthermore, in the above-described embodiment, the image data subjected to the image processing by the image processing unit 8 is buffered and output to the image data buffer secured on the memory 13 separately from the image data buffer 100. However, the present invention is not limited to this. For example, the image data that has been subjected to image processing by the image processing unit 8 may be output to the image output device 21 via the image output I / F 11 as it is. Further, an external storage device is connected to the image output I / F 11 so that the image data subjected to the image processing by the image processing unit 8 is directly output to the external storage device via the image output I / F 11 and stored. You may do it. Further, it may be output as it is to other devices.

[4−2.他の実施の形態2]
また、上述した実施の形態では、原稿からスキャンして得られた画像データを画像データバッファ100に1ライン毎にライトして、画像データバッファ100から1ライン毎にリードするようにした。これに限らず、画像データを複数ライン毎にライト及びリードするようにしてもよい。また、ライトは1ライン毎に、リードは2ライン毎になどというように、ライトする単位とリードする単位を変えるようにしてもよい。この場合も、画像データバッファ100に対するリード位置がライト位置に追い付くことのないよう、背景除去部7が、画像データバッファ100のバッファサイズを決定するようにすればよい。
[4-2. Other Embodiment 2]
In the above-described embodiment, the image data obtained by scanning from the document is written to the image data buffer 100 for each line and read from the image data buffer 100 for each line. However, the present invention is not limited to this, and image data may be written and read for each of a plurality of lines. Further, the unit of writing and the unit of reading may be changed such that writing is performed for each line and reading is performed for every two lines. In this case as well, the background removal unit 7 may determine the buffer size of the image data buffer 100 so that the read position for the image data buffer 100 does not catch up with the write position.

[4−3.他の実施の形態3]
さらに、上述した実施の形態では、本スキャン処理で背景除去処理を行い、プレスキャン処理で背景除去処理を行う為に必要となる予備評価として背景色の検出を行うようにした。これに限らず、本スキャン処理とプレスキャン処理で、背景除去に関する画像処理とは異なる画像処理及び予備評価を行うようにしてもよい。
[4-3. Other Embodiment 3]
Further, in the above-described embodiment, the background removal process is performed in the main scan process, and the background color is detected as a preliminary evaluation necessary for performing the background removal process in the pre-scan process. The present invention is not limited to this, and image processing and preliminary evaluation different from image processing related to background removal may be performed in the main scan processing and the prescan processing.

このように、本スキャン処理とプレスキャン処理で、背景除去に関する画像処理とは異なる画像処理及び予備評価を行う場合も、上述した実施の形態と同様、プレスキャン処理で必要となるライン数の画像データを保存し得るサイズに画像データバッファ100のバッファサイズを設定するようにすればよい。尚、この場合のプレスキャン処理は、あくまで原稿の全部分をスキャンして得られる画像データを必要とするものではなく、原稿の一部分をスキャンして得られる画像データを必要とするものであるとする。   As described above, even when image processing and preliminary evaluation different from image processing related to background removal are performed in the main scan processing and the prescan processing, the number of lines required for the prescan processing is the same as in the above-described embodiment. The buffer size of the image data buffer 100 may be set to a size that can store data. Note that the pre-scan process in this case does not require image data obtained by scanning the entire part of the document, but requires image data obtained by scanning a part of the document. To do.

[4−4.他の実施の形態4]
さらに、上述した実施の形態では、ライトDMAコントローラ4とリードDMAコントローラ6がアクセスする画像データバッファ100と、ライトDMAコントローラ9とリードDMAコントローラ10がアクセスする画像データバッファとを、1つのメモリ13上に確保するようにしたが、これに限らず、例えば、画像処理装置1に、メモリ13とは別のメモリを設け、メモリ13は、ライトDMAコントローラ4とリードDMAコントローラ6がアクセスする画像データバッファ100として利用するようにして、別途設けたメモリを、ライトDMAコントローラ9とリードDMAコントローラ10がアクセスする画像データバッファとして利用するようにしてもよい。
[4-4. Other Embodiment 4]
Further, in the above-described embodiment, the image data buffer 100 accessed by the write DMA controller 4 and the read DMA controller 6 and the image data buffer accessed by the write DMA controller 9 and the read DMA controller 10 are stored on one memory 13. However, the present invention is not limited to this. For example, the image processing apparatus 1 is provided with a memory different from the memory 13, and the memory 13 is an image data buffer accessed by the write DMA controller 4 and the read DMA controller 6. The memory provided separately as 100 may be used as an image data buffer accessed by the write DMA controller 9 and the read DMA controller 10.

[4−5.他の実施の形態5]
さらに、上述した実施の形態では、画像読取装置20によって原稿をスキャンして得られた画像データを、画像処理装置1に入力して、この画像データに対して画像処理装置1が一連の画像処理を行った後、画像出力装置21に出力するようにした。これに限らず、例えば、画像処理装置1に画像読取装置20の機能を持たせるようにしてもよく、このような画像処理装置1は例えばスキャナに適用できる。また、画像処理装置1に画像出力装置21の機能を持たせるようにしてもよく、このような画像処理装置1は例えばプリンタに適用できる。さらに、画像処理装置1に画像読取装置20の機能と画像出力装置21の機能の両方を持たせるようにしてもよく、このような画像処理装置1は例えばMFP(Multi Function Product:複合機)に適用できる。
[4-5. Other Embodiment 5]
Furthermore, in the above-described embodiment, image data obtained by scanning a document by the image reading device 20 is input to the image processing device 1, and the image processing device 1 performs a series of image processing on the image data. Then, the image is output to the image output device 21. For example, the image processing apparatus 1 may be provided with the function of the image reading apparatus 20, and the image processing apparatus 1 can be applied to, for example, a scanner. Further, the image processing apparatus 1 may be provided with the function of the image output apparatus 21. Such an image processing apparatus 1 can be applied to, for example, a printer. Further, the image processing apparatus 1 may be provided with both the function of the image reading apparatus 20 and the function of the image output apparatus 21. Such an image processing apparatus 1 is provided in, for example, an MFP (Multi Function Product). Applicable.

[4−6.他の実施の形態6]
さらに、上述した実施の形態では、ライトDMAコントローラ9及びリードDMAコントローラ10がアクセスする画像データバッファのバッファサイズを、原稿1頁分の全ラインの画像データを保存し得るサイズとしたが、これに限らず、この画像データバッファを、画像データバッファ100と同様に先入れ先出し方式のリングバッファとして機能させることで、原稿1頁分の全ラインの画像データを保存し得るサイズよりも小さいサイズにしてもよい。
[4-6. Other Embodiment 6]
Further, in the above-described embodiment, the buffer size of the image data buffer accessed by the write DMA controller 9 and the read DMA controller 10 is set to a size that can store the image data of all lines for one page of the document. Not limited to this, the image data buffer may function as a first-in first-out ring buffer in the same manner as the image data buffer 100, so that the size of the image data for one page of the original can be made smaller than the size capable of storing the image data. .

[4−7.他の実施の形態7]
さらに、上述した実施の形態では、画像データバッファ100のバッファサイズを、プレスキャンデータサイズに、画像データバッファ100へのリード時間とライト時間との差を吸収する為に必要なバッファサイズを足した大きさとしたが、これに限らず、例えば、画像データバッファ100へのリード時間とライト時間との差がほとんどない場合には、画像データバッファ100のバッファサイズを、プレスキャンデータサイズと等しくしてもよい。
[4-7. Other Embodiment 7]
Further, in the above-described embodiment, the buffer size of the image data buffer 100 is added to the pre-scan data size and the buffer size necessary for absorbing the difference between the read time and the write time to the image data buffer 100. The size is not limited to this. For example, when there is almost no difference between the read time and the write time to the image data buffer 100, the buffer size of the image data buffer 100 is made equal to the prescan data size. Also good.

[4−8.他の実施の形態8]
さらに、上述した実施の形態では、プレスキャン処理及び本スキャン処理を行う画像処理部の具体例として、背景除去部7を用いるようにした。これに限らず、プレスキャン処理及び本スキャン処理を行う機能を有するものであれば、例えば、背景除去部7とは異なるプレスキャン処理及び本スキャン処理を行う画像処理部を用いるようにしてもよい。
[4-8. Other Embodiment 8]
Furthermore, in the above-described embodiment, the background removal unit 7 is used as a specific example of the image processing unit that performs the pre-scan process and the main scan process. For example, an image processing unit that performs prescan processing and main scan processing different from the background removal unit 7 may be used as long as it has a function of performing prescan processing and main scan processing. .

さらに、上述した実施の形態では、画像データバッファ100への画像データのライト及びリードを制御する制御部の具体例として、画像データバッファ制御部5、ライトDMAコントローラ4及びリードDMAコントローラ6を用いるようにした。これに限らず、画像データバッファ100へのライト及びリードを制御する機能を有するものであれば、これらとは異なる制御部を用いるようにしてもよく、また、例えば、画像データバッファ制御部5にライトDMAコントローラ4とリードDMAコントローラ6を内蔵させるようにしてもよい。   Further, in the above-described embodiment, the image data buffer control unit 5, the write DMA controller 4, and the read DMA controller 6 are used as specific examples of the control unit that controls writing and reading of image data to the image data buffer 100. I made it. However, the present invention is not limited to this, and a control unit different from these may be used as long as it has a function of controlling writing to and reading from the image data buffer 100. The write DMA controller 4 and the read DMA controller 6 may be incorporated.

[4−9.他の実施の形態9]
さらに、本発明は、上述した実施の形態及び他の実施の形態に限定されるものではない。すなわち本発明は、上述した実施の形態と他の実施の形態の一部または全部を任意に組み合わせた実施の形態や、一部を抽出した実施の形態にもその適用範囲が及ぶものである。
[4-9. Other Embodiment 9]
Furthermore, the present invention is not limited to the above-described embodiment and other embodiments. That is, the scope of application of the present invention extends to embodiments in which some or all of the above-described embodiments and other embodiments are arbitrarily combined, and embodiments in which some are extracted.

本発明は、原稿をスキャンして得られた画像データをバッファリングして画像処理する画像処理装置で広く利用することができる。   The present invention can be widely used in image processing apparatuses that perform image processing by buffering image data obtained by scanning a document.

1……画像処理装置、3、8……画像処理部、4、9……ライトDMAコントローラ、6、10……リードDMAコントローラ、7……背景除去部、13……メモリ、14……CPU、20……画像読取装置、21……画像出力装置、100……画像データバッファ、101……ライン格納領域。   DESCRIPTION OF SYMBOLS 1 ... Image processing device, 3, 8 ... Image processing part, 4, 9 ... Write DMA controller, 6, 10 ... Read DMA controller, 7 ... Background removal part, 13 ... Memory, 14 ... CPU , 20... Image reading device, 21... Image output device, 100... Image data buffer, 101.

Claims (6)

原稿の一部分をスキャンして得られた画像データを用いるプレスキャン処理と、当該プレスキャン処理の結果に基づいて原稿の全部分をスキャンして得られた画像データを用いる本スキャン処理とを行う画像処理部と、
プレスキャン処理に必要となる原稿の一部分をスキャンして得られた画像データを保存し得る容量でなるバッファと、
前記バッファへの画像データの書き込み及び読み出しを当該画像データのライン単位で制御する制御部と
を有し、
前記制御部は、
前記プレスキャン処理時に、原稿の一部分をスキャンして得られた画像データを前記バッファに書き込んで保存し、当該バッファに保存した画像データを当該バッファから消去せずに読み出して前記画像処理部へと送り、
前記本スキャン処理時に、前記プレスキャン処理時に前記バッファに保存した画像データをライン順に当該バッファから読み出して前記画像処理部へと送るとともに当該バッファから消去して当該バッファの空き領域を確保し、さらに原稿の残りの部分をスキャンして得られた前記画像データを当該バッファの空き領域にライン順に書き込みながら、先に書き込んだラインの画像データから順に当該バッファから読み出して前記画像処理部へと送るとともに当該バッファから消去していく
ことを特徴とする画像処理装置。
An image for performing a pre-scan process using image data obtained by scanning a part of a document and a main scan process using image data obtained by scanning all parts of the document based on the result of the pre-scan process. A processing unit;
A buffer having a capacity capable of storing image data obtained by scanning a part of a document required for pre-scan processing;
A controller that controls writing and reading of image data to and from the buffer in units of lines of the image data,
The controller is
During the pre-scan process, the image data obtained by scanning a part of the document is written and stored in the buffer, and the image data stored in the buffer is read from the buffer without being erased and sent to the image processing unit. Send,
During the main scan process, the image data stored in the buffer during the pre-scan process is read from the buffer in line order and sent to the image processing unit and erased from the buffer to secure a free space in the buffer; While writing the image data obtained by scanning the remaining portion of the document in the buffer empty area in line order, the image data of the previously written line is read from the buffer in order and sent to the image processing unit. An image processing apparatus characterized by being erased from the buffer.
前記バッファの容量は、
前記プレスキャン処理に必要となる画像データのデータサイズに、前記バッファへの画像データの書き込みに要する時間と前記バッファからの画像データの読み出しに要する時間との差を吸収する為に必要となる容量を足した大きさでなる
請求項1に記載の画像処理装置。
The capacity of the buffer is
Capacity required to absorb the difference between the time required to write image data to the buffer and the time required to read image data from the buffer to the data size of the image data required for the prescan process The image processing apparatus according to claim 1, wherein the image processing apparatus has a size obtained by adding
前記制御部は、
前記バッファ内の画像データの読み出し位置を示すポインタを前記バッファから画像データをライン単位で読み出す度に更新し、前記プレスキャン処理で、前記バッファに保存した画像データの読み出しが完了すると、前記ポインタの位置を当該バッファに保存した画像データの先頭ラインを示す位置に戻す
請求項1に記載の画像処理装置。
The controller is
The pointer indicating the reading position of the image data in the buffer is updated each time the image data is read from the buffer line by line, and when the reading of the image data stored in the buffer is completed in the pre-scan process, the pointer The image processing apparatus according to claim 1, wherein the position is returned to a position indicating the first line of the image data stored in the buffer.
前記画像処理部は、
前記プレスキャン処理で行う画像処理と、前記バッファへの画像データの書き込みに要する時間と前記バッファからの画像データの読み出しに要する時間との差とをもとに前記バッファの容量を決定し、
前記制御部は、
前記画像処理部によって決定された容量の前記バッファを所定のメモリ内に確保する
ことを特徴とする請求項1に記載の画像処理装置。
The image processing unit
Determining the capacity of the buffer based on the image processing performed in the pre-scan process, the difference between the time required to write image data to the buffer and the time required to read image data from the buffer,
The controller is
The image processing apparatus according to claim 1, wherein the buffer having a capacity determined by the image processing unit is secured in a predetermined memory.
前記プレスキャン処理には、
前記本スキャン処理を行う為の原稿の予備評価を行う画像処理が含まれる
ことを特徴とする請求項1に記載の画像処理装置。
For the pre-scan process,
The image processing apparatus according to claim 1, further comprising image processing for performing preliminary evaluation of a document for performing the main scanning processing.
前記本スキャン処理には、原稿の背景色を除去する背景色除去処理が含まれ、
前記プレスキャン処理は、前記背景色除去処理を行う為の原稿の背景色の検出を行う
ことを特徴とする請求項5に記載の画像処理装置。
The main scanning process includes a background color removal process for removing the background color of the document,
The image processing apparatus according to claim 5, wherein the prescan process detects a background color of a document for performing the background color removal process.
JP2014170533A 2014-08-25 2014-08-25 Image processing device Expired - Fee Related JP6228522B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014170533A JP6228522B2 (en) 2014-08-25 2014-08-25 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014170533A JP6228522B2 (en) 2014-08-25 2014-08-25 Image processing device

Publications (2)

Publication Number Publication Date
JP2016046714A JP2016046714A (en) 2016-04-04
JP6228522B2 true JP6228522B2 (en) 2017-11-08

Family

ID=55636875

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014170533A Expired - Fee Related JP6228522B2 (en) 2014-08-25 2014-08-25 Image processing device

Country Status (1)

Country Link
JP (1) JP6228522B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04373081A (en) * 1991-06-21 1992-12-25 Fuji Photo Film Co Ltd Method and device for storing image data
JP4135429B2 (en) * 2002-08-05 2008-08-20 富士ゼロックス株式会社 Image reader
JP2007272667A (en) * 2006-03-31 2007-10-18 Matsushita Electric Ind Co Ltd Ring buffer device
JP2010251917A (en) * 2009-04-13 2010-11-04 Murata Machinery Ltd Image read/storage device

Also Published As

Publication number Publication date
JP2016046714A (en) 2016-04-04

Similar Documents

Publication Publication Date Title
US8855438B2 (en) Image processing apparatus, image processing method of image processing apparatus, and program
US20180063547A1 (en) Motion vector detection apparatus and method for controlling the same
JP4929073B2 (en) Multi-function printer
JP2011077837A (en) Image processing apparatus
JP2010187169A (en) Image processing apparatus, and image processing method thereof
US8488893B2 (en) Image compression apparatus and image compression method
CN110910301B (en) Image processing device and method, and recording medium storing image processing program
US7933465B2 (en) Processing data supply method and image processing apparatus
US10389912B2 (en) Image processing apparatus and method for controlling image processing apparatus
JP6228522B2 (en) Image processing device
US20150120683A1 (en) Data compression apparatus, data compression method, and non-transitory computer readable medium
JP5124509B2 (en) Image processing apparatus, tilt correction method, and program
US10325189B2 (en) Image processing apparatus and image processing method that perform, in units of band areas, rasterization based on second intermediate data stored in a first memory area and compressed raster data stored in a second memory area
JP5566411B2 (en) Image reading device
US20130235235A1 (en) Data transfer apparatus and data transfer method
JP5298154B2 (en) Data processing apparatus and data processing program
JP2015201677A (en) Image processing system and image processing method
US10594877B2 (en) Image processing apparatus, control method thereof, and storage medium
JP5422640B2 (en) Image reading device
JP2000232587A (en) Image processor and image processing method
JP2009044547A (en) Image processor and image processing method
JP3901869B2 (en) Memory device
CN110072032B (en) Image processing apparatus
EP2323099A1 (en) Image reading device and method of writing image data in an image reading device
JP6135440B2 (en) Image processing apparatus and image forming apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170808

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: 20170926

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171013

R150 Certificate of patent or registration of utility model

Ref document number: 6228522

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees