JP2009044547A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2009044547A
JP2009044547A JP2007208281A JP2007208281A JP2009044547A JP 2009044547 A JP2009044547 A JP 2009044547A JP 2007208281 A JP2007208281 A JP 2007208281A JP 2007208281 A JP2007208281 A JP 2007208281A JP 2009044547 A JP2009044547 A JP 2009044547A
Authority
JP
Japan
Prior art keywords
processing
data
unit
image
predetermined size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007208281A
Other languages
Japanese (ja)
Inventor
Yasunori Harada
恭典 原田
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2007208281A priority Critical patent/JP2009044547A/en
Publication of JP2009044547A publication Critical patent/JP2009044547A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide technique for shortening a processing time and saving a memory area, by performing image processing on respective blocks of predetermined size and remainder parts smaller than the predetermined size by different processing units for an image processor which divides an image into blocks of a predetermined size and performs image processings on the respective blocks. <P>SOLUTION: The image processor comprises an input unit for inputting image data from the outside; a block division unit which divides the input data into blocks of the predetermined size; a remainder decision unit which decides whether the image data can be divided into the block of the predetermined size without remainders; a first processing unit which processes remainder parts, when the remainder parts are generated; a second processing unit which processes the respective blocks of a predetermined size, and an output unit which combines and outputs the data processed by the first processing unit or second processing unit, to the outside. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明は、画像データの圧縮および伸張を行う画像処理装置および画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method for compressing and expanding image data.

画像をデジタルデータ(画像データ)に変換して処理する画像処理装置において、記憶容量を節約し、また、転送時間を短縮するために画像データを圧縮することが多い。圧縮された画像データを用いる際は、元の画像データに復元する処理、即ち伸張処理が行われる。画像データの圧縮および伸張(圧縮/伸張)処理の方式として、種々のものが知られている。例えば、主に2値静止画像に用いられるMH、MR、MMR、LZWおよびJBIG、主に多値静止画像に用いられるJPEGなどの方式が知られている。これらの圧縮/伸張処理は、ハードウェアで実現することもできるしソフトウェアで実現することもできる。一般に、ハードウェア処理はソフトウェア処理に比べて高速である。一方、ソフトウェア処理はパーソナルコンピュータ等本来的にCPUを備える機器で処理する場合にそのCPUを使用できる点でコストメリットがある。そこで、ハードウェア処理とソフトウェア処理は、用途や機器に応じて使い分けられている。   In an image processing apparatus that converts an image into digital data (image data) and processes the image data, the image data is often compressed in order to save storage capacity and shorten the transfer time. When using the compressed image data, a process for restoring the original image data, that is, a decompression process is performed. Various types of image data compression and expansion (compression / decompression) processing methods are known. For example, methods such as MH, MR, MMR, LZW and JBIG mainly used for binary still images and JPEG mainly used for multi-value still images are known. These compression / decompression processes can be realized by hardware or software. In general, hardware processing is faster than software processing. On the other hand, software processing has a cost merit in that the CPU can be used when processing is performed by a device such as a personal computer that is inherently equipped with a CPU. Therefore, hardware processing and software processing are properly used according to the application and equipment.

また、一つの機器でハードウェア処理とソフトウェア処理の両方を使い分けることも提案されている。例えば、ホストコンピュータ上でプリンタドライバ等に印刷用のページ記述言語をレンダリングさせて印刷を行う場合、ホストコンピュータ上にレンダリング機能を行う特別なハードウェア機能が存在した場合に前記ハードウェア機能と連携しながら効率よく処理を行う手法として、次のものが提案されている。即ち、記憶装置に対して管理されている第1のジョブをレンダリングする場合、ハードウエアレンダリング対象として記憶装置に記憶されている全ての第2のジョブのレンダリング終了時間と、ソフトウェアレンダリング対象として前記記憶装置に記憶されている全ての第3のジョブの終了時間をCPUが比較し、該比較された終了時間に基づいて、記憶装置に記憶された第1のジョブを第2のジョブあるいは第3のジョブとして登録制御するものである(例えば、特許文献1参照)。   It has also been proposed to use both hardware processing and software processing separately in one device. For example, when printing is performed by rendering a page description language for printing to a printer driver or the like on the host computer, if there is a special hardware function for performing the rendering function on the host computer, the hardware function is linked. However, the following methods have been proposed as methods for efficiently performing processing. That is, when rendering the first job managed with respect to the storage device, the rendering end time of all the second jobs stored in the storage device as hardware rendering targets and the storage as the software rendering target The CPU compares the end times of all the third jobs stored in the device, and based on the compared end times, the first job stored in the storage device is changed to the second job or the third job. Registration control is performed as a job (see, for example, Patent Document 1).

また、一般的にハードウェアによる画像データの圧縮処理および伸張処理は、ソフトウェア処理に比べて高速であるといわれているが、いかなる場合でもハードウェア処理の方が速いという訳ではない。ハードウェア処理とソフトウェア処理はそれぞれ特性が異なる。   In general, it is said that the compression processing and decompression processing of image data by hardware is faster than software processing, but the hardware processing is not always faster in any case. Hardware processing and software processing have different characteristics.

例えば、処理対象の画像データ量が小さい場合は、ソフトウェア処理のほうが早い場合がある。ハードウェア処理の場合、通常、そのハードウェアを動作させる前(あるいは前後)に動作条件を設定しなければならない。設定箇所が多かったり、設定値を求めるまでの処理が複雑であったりすると、動作条件の設定に要する処理時間が無視できなくなる。   For example, when the amount of image data to be processed is small, software processing may be faster. In the case of hardware processing, usually, operating conditions must be set before (or before and after) operating the hardware. If there are many setting locations or the processing until obtaining the setting value is complicated, the processing time required for setting the operating condition cannot be ignored.

また、準備されたハードウェアの数だけ処理が実行されると次の処理は使用中のハードウェア資源が空くまで待たざるを得ない。従って、ハードウェアの資源管理が必要となる。ハードウェア資源は、コストとの兼ね合いもあって冗長な数が用意されるわけではない。一方、マルチタスクなど並列処理可能な構造を有するソフトウェアの場合、ある程度動的に資源(処理タスク)の数を増減させることができ融通が利きやすいという特性がある。   Further, when the processing is executed by the number of prepared hardware, the next processing must wait until the hardware resources in use are available. Therefore, hardware resource management is required. A redundant number of hardware resources is not prepared due to a cost balance. On the other hand, software having a structure capable of parallel processing, such as multitasking, has a characteristic that the number of resources (processing tasks) can be increased or decreased dynamically to some extent and is flexible.

従って、ハードウェアの動作条件設定や資源獲得に要する処理時間(いわゆるオーバーヘッド)を含めると、画像データ量がある程度以下になるとソフトウェア処理の方が速度的に有利になる。ただし、どの程度からソフトウェア処理が有利かについては、実際に処理が行われる際の負荷や各資源の数および能力に依存するので一概にはいえない。
特開2003−76511号公報
Therefore, if the processing time required for setting hardware operating conditions and acquiring resources (so-called overhead) is included, software processing becomes more advantageous in terms of speed when the amount of image data falls below a certain level. However, the extent to which software processing is advantageous is unclear because it depends on the load at the time of actual processing and the number and capacity of each resource.
JP 2003-76511 A

画像データを所定サイズのブロック単位で処理するハードウェアを設け、前記ハードウェアを用いて画像データの処理を行い、ソフトウェア処理に比べて画像処理の高速化を図ろうとする画像処理装置が知られている。例えば、JPEG圧縮方式では8画素×8画素を1つのブロック(処理単位)として圧縮処理を行う。そこで、前記処理単位を対象とするハードウェアを用意し、そのハードウェアにブロック単位で画像データを転送することにより、ハードウェア的に圧縮/伸張処理を実現することができる。   2. Description of the Related Art An image processing apparatus is known that has hardware for processing image data in units of a predetermined size block, processes image data using the hardware, and attempts to speed up image processing compared to software processing. Yes. For example, in the JPEG compression method, compression processing is performed with 8 pixels × 8 pixels as one block (processing unit). Therefore, by preparing hardware for the processing unit and transferring image data to the hardware in block units, compression / decompression processing can be realized in hardware.

しかしながら、処理対象の画像データの縦方向あるいは横方向の画素数は、8画素の倍数とは限らず、むしろそうでない方が通常である。その場合、画像の端部では、画素幅が処理単位の8画素に満たない剰余の部分(冗長領域)が存在する。冗長領域は、8画素×8画素を処理単位として設計されたハードウェアでは処理できない。   However, the number of pixels in the vertical direction or the horizontal direction of the image data to be processed is not necessarily a multiple of 8 pixels, and is usually not the case. In that case, there is a surplus portion (redundant area) whose pixel width is less than 8 pixels of the processing unit at the edge of the image. The redundant area cannot be processed by hardware designed with 8 pixels × 8 pixels as a processing unit.

そこで、例えば、圧縮または伸張処理前に冗長領域の画素幅を8画素に拡張するように画素データを付加してハードウェアの圧縮器または伸張器へ転送し、前記画像データが付加された状態で画像の圧縮または伸張処理を行い、処理後の画像から付加した画素分を削除する(クリッピング処理)といった対処が行われている。ここで、冗長領域に付加する画素データは、画像の背景色に合わせ、白色背景であれば白色に対応する画素値(例えば、画素値ゼロ)を付加する必要がある。そうしなければ、その処理単位について好ましい結果は得られない。   Therefore, for example, before compression or decompression processing, the pixel data is added so that the pixel width of the redundant area is expanded to 8 pixels and transferred to a hardware compressor or decompressor, and the image data is added. A countermeasure is taken such that image compression or expansion processing is performed, and added pixels are deleted from the processed image (clipping processing). Here, the pixel data to be added to the redundant area needs to be added with a pixel value (for example, pixel value zero) corresponding to white if it is a white background in accordance with the background color of the image. Otherwise, favorable results will not be obtained for that processing unit.

なお、8画素×8画素を圧縮/伸張処理の単位とするのはJPEG方式に特有のものである。しかし、一般に、ハードウェア的に圧縮/伸張処理を行う場合は、圧縮器または伸張器へ所定サイズのデータを単位とした転送が行われる。そして、主走査方向の画素幅を転送可能な単位に丸める処理を行う。その観点から、この発明に係る画像データの分割処理はJPEG方式に限定されない。例えば、画像処理装置が64bit幅のバスで構成され、前記バスを介して1画素が8bitの画像データを転送する場合、データ転送の転送はバス幅の64bit、即ち8画素単位で行われる。ここで、主走査方向の1ラインの画素数が8画素の倍数でない場合、各ラインの末尾に画素データを付加し、各ラインの画素数を8の倍数にして転送する。あるいは、データの転送がDMA転送により行われる場合、1ラインの画素数が1バーストの倍数になるよう、各ラインの末尾に画素データを付加して圧縮器または伸張器へ転送する場合もある。各ラインと処理の単位を整合させることによって画像データを管理し易くするためである。   Note that the unit of compression / expansion processing of 8 pixels × 8 pixels is unique to the JPEG system. However, generally, when compression / decompression processing is performed by hardware, transfer in units of data of a predetermined size is performed to the compressor or decompressor. Then, a process of rounding the pixel width in the main scanning direction to a transferable unit is performed. From this viewpoint, the image data division processing according to the present invention is not limited to the JPEG format. For example, when the image processing apparatus is configured by a 64-bit width bus and one pixel transfers 8-bit image data via the bus, the data transfer is performed in a bus width of 64 bits, that is, in units of 8 pixels. If the number of pixels in one line in the main scanning direction is not a multiple of 8 pixels, pixel data is added to the end of each line, and the number of pixels in each line is set to a multiple of 8 for transfer. Alternatively, when data transfer is performed by DMA transfer, pixel data may be added to the end of each line and transferred to a compressor or decompressor so that the number of pixels in one line is a multiple of one burst. This is because image data can be easily managed by matching each line with the unit of processing.

このようにして各ラインを転送単位の倍数に丸めた状態で圧縮/伸張処理されたデータは、圧縮器または伸張器から転送先として一時的に確保されたメモリ領域へ格納される。転送先メモリ領域のライン幅は、丸め処理後の幅である。その後、各ラインの末尾に付加された画素データに相当する部分のクリッピング処理を行う。   The data compressed / expanded in such a manner that each line is rounded to a multiple of the transfer unit is stored in a memory area temporarily secured as a transfer destination from the compressor or the expander. The line width of the transfer destination memory area is the width after the rounding process. After that, clipping processing is performed on the portion corresponding to the pixel data added to the end of each line.

以上の説明から明らかなように、ハードウェアで圧縮/伸張処理を行う装置において、その内容を詳細に検討すると、ハードウェアによる圧縮/伸張機能を利用するための準備処理が行われる。通常、前記準備処理、即ち、資源管理、動作条件設定やクリッピング処理は、ソフトウェアで処理される。そして、それらの処理時間は、オーバーヘッドを生じさせる。さらに、画素データが付加された分だけ転送先メモリ領域が転送元データの容量より余分に占有される。   As is clear from the above description, in the apparatus that performs compression / decompression processing by hardware, when the contents are examined in detail, preparation processing for using the compression / decompression function by hardware is performed. Usually, the preparation processing, that is, resource management, operation condition setting, and clipping processing are processed by software. Those processing times cause overhead. Furthermore, the transfer destination memory area is occupied more than the capacity of the transfer source data by the amount of pixel data added.

発明者は、冗長領域を従来のようにハードウェア的に圧縮または伸張処理を行うことが適切であるのかという点に疑問を感じ、ソフトウェア的に圧縮または伸張処理を行う場合との比較検討を行った。そして、本願の出願に至った。   The inventor feels doubtful about whether it is appropriate to compress or expand the redundant area by hardware as in the conventional case, and performs a comparative study with the case of performing compression or expansion by software. It was. And it came to the application of this application.

この発明は、以上のような事情からなされたものであって、画像を所定サイズのブロックに分割し、各ブロックについて画像処理を行う画像処理装置において、所定サイズの各ブロックと所定サイズに満たない剰余部分とで画像処理を行う処理部を異ならせ、処理時間の短縮とメモリ領域の節約とを実現し得る手法を提供するものである。   The present invention has been made under the circumstances as described above. In an image processing apparatus that divides an image into blocks of a predetermined size and performs image processing on each block, the block does not reach a predetermined size with each block of a predetermined size. The present invention provides a technique that makes it possible to realize a reduction in processing time and a memory area by making a processing unit that performs image processing different from that in a surplus part.

この発明は、外部からの画像データを入力させる入力部と、入力されたデータを所定サイズのブロックに分割するブロック分割部と、前記画像データが所定サイズのブロックに剰余なく分割できるか否かを判定する剰余判定部と、剰余が生じる場合に剰余の部分を処理する第1処理部と、所定サイズの各ブロックを処理する第2処理部と、第1処理部または第2処理部で処理された各データを組み合わせて外部へ出力する出力部とを備えることを特徴とする画像処理装置を提供する。   The present invention relates to an input unit for inputting image data from the outside, a block dividing unit for dividing the input data into blocks of a predetermined size, and whether or not the image data can be divided into blocks of a predetermined size without any remainder. It is processed by a residue determination unit that determines, a first processing unit that processes a remainder part when a residue occurs, a second processing unit that processes each block of a predetermined size, and a first processing unit or a second processing unit And an output unit that outputs the combined data to the outside.

また、異なる観点から、この発明は、外部からの画像データを入力させる工程部と、入力されたデータを所定サイズのブロックに分割する工程と、前記画像データが所定サイズのブロックに剰余なく分割できるか否かを判定する工程と、剰余が生じる場合に剰余の部分を処理する第1の処理工程と、所定サイズの各ブロックを処理する第2の処理工程と、第1または第2の処理工程で処理された各ブロックを組み合わせて外部へ出力する工程とを備えることを特徴とする画像処理方法を提供する。   Further, from a different point of view, the present invention is capable of dividing the input data into blocks of a predetermined size, the step of inputting image data from the outside, the step of dividing the input data into blocks of a predetermined size, and without any remainder Determining whether or not, a first processing step for processing a surplus portion when a surplus occurs, a second processing step for processing each block of a predetermined size, and a first or second processing step And a step of combining the blocks processed in step 1 and outputting them to the outside.

この発明の画像処理装置は、前記画像データが所定サイズのブロックに剰余なく分割できるか否かを判定する剰余判定部と、剰余が生じる場合に剰余の部分を処理する第1処理部と、所定サイズの各ブロックを処理する第2処理部とので、所定サイズの各ブロックと所定サイズに満たない剰余部分とで画像処理を行う処理部を異ならせ、各ブロックの特性に応じた処理部に処理させることにより処理時間の短縮とメモリ領域の節約とを実現することができる。即ち、第1処理部は、所定サイズのデータを第2処理部に比べて短時間で処理できるように構成され、第2処理部は、対象の画像データによってサイズが変わる剰余部分を、第1処理部と並行して処理し得るように構成される。第2処理部は、種々のサイズに柔軟に対応でき、そのためのコスト的な負担あるいは処理時間の変動が第1処理部に比べて抑制されるように構成される。   An image processing apparatus according to the present invention includes a remainder determination unit that determines whether the image data can be divided into blocks of a predetermined size without a remainder, a first processing section that processes a remainder when a remainder occurs, a predetermined processing Since the second processing unit that processes each block of the size, the processing unit that performs image processing is different for each block of the predetermined size and the remainder portion that does not satisfy the predetermined size, and the processing unit according to the characteristics of each block By doing so, it is possible to reduce the processing time and save the memory area. That is, the first processing unit is configured so that data of a predetermined size can be processed in a shorter time than the second processing unit, and the second processing unit converts the surplus portion whose size varies depending on the target image data to the first processing unit. It is comprised so that it can process in parallel with a process part. The second processing unit can be flexibly adapted to various sizes, and is configured such that a cost burden for that purpose or a variation in processing time is suppressed compared to the first processing unit.

以下、この発明の好ましい態様について説明する。
前記剰余判定部は、主走査方向の画素の並びからなる各ラインが所定画素数のブロックに剰余なく分割できるか否かを判定してもよい。
Hereinafter, preferred embodiments of the present invention will be described.
The remainder determination unit may determine whether or not each line formed by the arrangement of pixels in the main scanning direction can be divided into blocks having a predetermined number of pixels without a remainder.

前記剰余判定部は、主走査方向に直交する副走査方向において、各ラインが所定ライン数に剰余なく分割できるか否かをさらに判定してもよい。   The remainder determination unit may further determine whether or not each line can be divided into a predetermined number of lines without a remainder in the sub-scanning direction orthogonal to the main scanning direction.

また、前記第1処理部は、CPUがプログラムを実行することにより剰余の部分を画像処理する画像処理部であってもよい。   The first processing unit may be an image processing unit that performs image processing on a surplus portion when the CPU executes a program.

さらにまた、前記第2処理部は、画像処理回路により各ブロックを画像処理する画像処理部であってもよい。   Furthermore, the second processing unit may be an image processing unit that performs image processing on each block by an image processing circuit.

前記第1および第2画像処理部は、対象のデータを圧縮処理または伸張処理するものであってもよい。   The first and second image processing units may perform compression processing or decompression processing on target data.

また、前記圧縮処理または伸張処理の方式は、JPEG、JBIGまたはTIFFの何れかの方式であってもよい。
ここで示した種々の好ましい態様は、それら複数を組み合わせることもできる。
Further, the compression processing or expansion processing method may be any one of JPEG, JBIG, and TIFF.
The various preferable aspects shown here can also be combined.

以下、図面を用いてこの発明をさらに詳述する。なお、以下の説明は、すべての点で例示であって、この発明を限定するものと解されるべきではない。   Hereinafter, the present invention will be described in more detail with reference to the drawings. In addition, the following description is an illustration in all the points, Comprising: It should not be interpreted as limiting this invention.

図1は、この発明の画像処理装置の構成例を示すブロック図である。図1で、画像データ処理部は11は、データ入力部21から入力された画像データを処理し、データ出力部23へ出力する。
画像データ処理部11には、CPU17、メモリ19、ハードウェア的に構成されたJPEG圧縮器13およびハードウェア的に構成されたJPEG伸張器15が含まれる。
FIG. 1 is a block diagram showing a configuration example of an image processing apparatus according to the present invention. In FIG. 1, the image data processing unit 11 processes the image data input from the data input unit 21 and outputs the processed image data to the data output unit 23.
The image data processing unit 11 includes a CPU 17, a memory 19, a JPEG compressor 13 configured in hardware, and a JPEG decompressor 15 configured in hardware.

メモリ19は、RAMである。メモリ19には、画像データ処理部11の電源オン時、図示しない不揮発性記憶素子に格納された制御プログラムが展開される。また、データ入力部21から入力された画像データを一時的に格納する。即ち、転送元データ領域を提供する。さらに、JPEG圧縮器13あるいはJPEG伸張器15から出力される処理後の画像データを一時的に格納する。即ち、転送先データ領域を提供する。さらに、CPU17が画像データ等の処理を行う際のワークエリアを提供する。   The memory 19 is a RAM. When the image data processing unit 11 is powered on, the memory 19 is loaded with a control program stored in a non-volatile storage element (not shown). The image data input from the data input unit 21 is temporarily stored. That is, a transfer source data area is provided. Furthermore, the processed image data output from the JPEG compressor 13 or JPEG decompressor 15 is temporarily stored. That is, a transfer destination data area is provided. Furthermore, a work area is provided when the CPU 17 processes image data or the like.

CPU17は、前記制御プログラムを実行することにより、画像データの処理を制御する。即ち、JPEG圧縮器13、JPEG伸張器15を動作させる際の動作条件設定を行う。また、JPEG圧縮器13およびJPEG伸張器15の資源管理を行う。さらに、CPU17は、データ入力部21から入力された画像データをソフト的にJPEG圧縮およびJPEG伸張することができる。即ち、ソフトウェア的なJPEG圧縮器およびJPEG伸張器としての処理が可能である。CPU17は、入力部21から入力された画像データの構成を判別する。そして、画像データを処理単位(ブロック)に分割した場合、冗長領域が存在するか否かを判別し、判別結果に応じて各ブロックの圧縮処理または伸張処理をハードウェアの圧縮器13で行うか、あるいは、ソフトウェア的にCPU17が処理するかを判断し、判断結果に応じて対象のブロックを処理するように制御する。この実施形態では、JPEG圧縮およびJPEG伸張の処理単位である8画素×8画素をブロックの単位として説明する。他の圧縮/伸張方式(周知のMH、MR、MMRなどの方式)の場合は主として転送処理の単位でブロック化されるが、この発明の本質はいずれの場合にも共通する。   The CPU 17 controls the processing of the image data by executing the control program. That is, operating conditions are set for operating the JPEG compressor 13 and JPEG decompressor 15. Also, resource management of the JPEG compressor 13 and JPEG decompressor 15 is performed. Further, the CPU 17 can perform JPEG compression and JPEG decompression on the image data input from the data input unit 21 in a software manner. That is, processing as a software JPEG compressor and JPEG decompressor is possible. The CPU 17 determines the configuration of the image data input from the input unit 21. Then, when the image data is divided into processing units (blocks), it is determined whether or not there is a redundant area, and whether compression processing or expansion processing of each block is performed by the hardware compressor 13 according to the determination result. Alternatively, it is determined whether the CPU 17 performs processing in terms of software, and control is performed so that the target block is processed according to the determination result. In this embodiment, description will be made with 8 pixels × 8 pixels, which is a processing unit of JPEG compression and JPEG expansion, as a block unit. Other compression / decompression schemes (known MH, MR, MMR, etc.) are mainly blocked in units of transfer processing, but the essence of the present invention is common to both cases.

この実施形態で、JPEG圧縮器13およびJPEG伸張器15は、ASIC(Application Specific Integrated Circuit、特定用途向けIC)として設計され提供されるものである。
データ入力部21は、外部のユニットから画像データを取得するためのインターフェイス回路である。外部のユニットの一例は、原稿の画像を走査して読み取るイメージスキャナである。この実施形態において、データ入力部21と外部のユニットとの間はデータバスで接続されており、画像データは外部のユニットからデータ入力部21へDMA転送される。データ入力部21は、バス・インターフェイス回路やDMAコントローラを含んでなる回路である。
In this embodiment, the JPEG compressor 13 and the JPEG decompressor 15 are designed and provided as application specific integrated circuits (ASICs).
The data input unit 21 is an interface circuit for acquiring image data from an external unit. An example of the external unit is an image scanner that scans and reads an image of a document. In this embodiment, the data input unit 21 and an external unit are connected by a data bus, and image data is DMA-transferred from the external unit to the data input unit 21. The data input unit 21 is a circuit including a bus interface circuit and a DMA controller.

データ出力部31は、外部のユニットへ画像データを出力するためのインターフェイス回路である。ここで、前記ユニットは、通常、データ入力部へ画像データを提供するユニットとは異なるが、同一のユニットの場合もあり得る。前記ユニットの一例は画像を印刷する印刷装置である。他の一例は、圧縮処理後の画像データを格納する補助記憶装置、具体的にはハードディスクドライブ(HDD)である。なお、HDDに格納された画像データを伸張する場合、データ入力部21を介してHDDからの画像データを取得し、伸張処理する。この場合、デ―タ入力部に画像データを提供する外部のユニットは前記HDDである。この実施形態において、データ出力部23と外部のユニットとの間はデータバスで接続されており、画像データは、データ出力部23から外部のユニットへDMA転送される。データ出力部23は、バス・インターフェイス回路やDMAコントローラを含んでなる回路である。   The data output unit 31 is an interface circuit for outputting image data to an external unit. Here, the unit is usually different from the unit that provides image data to the data input unit, but may be the same unit. An example of the unit is a printing apparatus that prints an image. Another example is an auxiliary storage device that stores image data after compression processing, specifically, a hard disk drive (HDD). Note that when decompressing image data stored in the HDD, the image data from the HDD is acquired via the data input unit 21 and decompressed. In this case, the external unit that provides image data to the data input unit is the HDD. In this embodiment, the data output unit 23 and an external unit are connected by a data bus, and image data is DMA-transferred from the data output unit 23 to the external unit. The data output unit 23 is a circuit including a bus interface circuit and a DMA controller.

次に、この発明に係る圧縮/伸張処理の処理手順について説明する。ここで、この発明に係る処理手順の詳細を説明する前に、参考例として画像データをすべてハードウェア処理あるいはソフトウェア処理する際の手順について簡単に説明する。これにより、後述する本願発明の処理手順の特徴がより理解し易くなるであろう。   Next, a processing procedure of compression / decompression processing according to the present invention will be described. Here, before explaining the details of the processing procedure according to the present invention, a procedure for processing all image data by hardware or software will be briefly described as a reference example. This will make it easier to understand the features of the processing procedure of the present invention described later.

図8は、この発明の画像処理装置の機能的な構成を示すブロック図である。図8に示すように、画像処理装置1は、入力部2、剰余判定部3、ブロック分割部4、第1処理部5、第2処理部6および出力部7から構成される。   FIG. 8 is a block diagram showing a functional configuration of the image processing apparatus according to the present invention. As shown in FIG. 8, the image processing apparatus 1 includes an input unit 2, a remainder determination unit 3, a block division unit 4, a first processing unit 5, a second processing unit 6, and an output unit 7.

外部からの画像データは、入力部2を介して入力される。ブロック分割部4は、入力されたデータを所定サイズのブロックに分割する。剰余判定部3は、前記画像データが所定サイズのブロックに剰余なく分割できるか否かを判定する。第1処理部5は、分割されたデータに剰余が生じる場合、剰余の部分を処理する。第2処理部6は、所定サイズからなる各ブロックを処理する。第1処理部または第2処理部で処理された各データは、メモリ19上で組み合わされ、処理後の画像データとして出力部7から外部へ出力される。なお、図8の画像処理装置1は、この発明に係るブロックを示すものである。従って、画像処理装置1が、図8に示しないブロックを含むことを排除するものではない。   Image data from the outside is input via the input unit 2. The block dividing unit 4 divides input data into blocks of a predetermined size. The remainder determination unit 3 determines whether or not the image data can be divided into blocks of a predetermined size without a remainder. The first processing unit 5 processes the remainder when there is a remainder in the divided data. The second processing unit 6 processes each block having a predetermined size. The data processed by the first processing unit or the second processing unit are combined on the memory 19 and output to the outside from the output unit 7 as processed image data. Note that the image processing apparatus 1 of FIG. 8 shows a block according to the present invention. Therefore, it does not exclude that the image processing apparatus 1 includes blocks not shown in FIG.

図2は、参考例として、入力された画像データを無条件にハードウェアあるいはソフトウェアで圧縮/伸張処理する手順を示すフローチャートである。図2(a)は、ハードウェア処理の手順であり、図2(b)は、ソフトウェア処理の手順である。画像処理装置の構成としては、ハードウェア処理の場合は図1の構成と同様であり、ソフトウェア処理の場合は、図1の構成から圧縮器13、伸張器15を除いたものを想定すればよい。図3は、図2の処理を行う際に使用されるメモリ領域を模式的に示す説明図である。図3(a)は、ハードウェア処理の場合を示し、図3(b)は、ソフトウェア処理の場合を示す。以下に述べるように、ソフトウェア処理の場合は、処理後の画像データが格納される領域に冗長領域を確保する必要がない。   FIG. 2 is a flowchart showing a procedure for unconditionally compressing / decompressing input image data by hardware or software as a reference example. FIG. 2A shows a procedure of hardware processing, and FIG. 2B shows a procedure of software processing. The configuration of the image processing apparatus is similar to the configuration of FIG. 1 in the case of hardware processing, and in the case of software processing, the configuration in FIG. 1 excluding the compressor 13 and the decompressor 15 may be assumed. . FIG. 3 is an explanatory diagram schematically showing a memory area used when performing the processing of FIG. FIG. 3A shows the case of hardware processing, and FIG. 3B shows the case of software processing. As will be described below, in the case of software processing, it is not necessary to secure a redundant area in the area where the processed image data is stored.

図2(a)のハードウェア処理の場合について説明する。なお、フロー開始時点で、資源としての圧縮器13または伸張器15が確保されているものとする。さらに、メモリ資源として転送元データ領域と転送先データ領域がメモリ19上に確保されているものとする。   A case of the hardware processing of FIG. 2A will be described. It is assumed that the compressor 13 or the decompressor 15 as a resource is secured at the start of the flow. Furthermore, it is assumed that a transfer source data area and a transfer destination data area are secured on the memory 19 as memory resources.

まず、CPU17は、圧縮器13または伸張器15の動作条件をレジスタに設定する(ステップS11)。前記設定には、転送元(図3(a)の転送元データ領域31)のメモリアドレス、転送先(図3(a)の転送先データ領域33)のメモリアドレスの指定が含まれる。   First, the CPU 17 sets the operating condition of the compressor 13 or the decompressor 15 in the register (step S11). The setting includes designation of the memory address of the transfer source (transfer source data area 31 in FIG. 3A) and the memory address of the transfer destination (transfer destination data area 33 in FIG. 3A).

その後、圧縮/伸張処理が開始される。即ち、CPU17あるいは外部からデータ転送のトリガが与えられ、転送元データ領域31の画像データが圧縮器13または伸張器15へ転送される。データが転送されると、圧縮器13または伸張器15は、転送されたデータを圧縮処理または伸張処理する(ステップS13)。圧縮処理または伸張処理後のデータは、転送先データ領域33へ転送されて格納される。転送先データ領域33に格納されるデータには、冗長領域が含まれる。圧縮器13または伸張器15は、8画素×8画素のサイズを単位としてデータを処理し、それを転送元データ領域31へ格納するからである。   Thereafter, compression / decompression processing is started. That is, a data transfer trigger is given from the CPU 17 or the outside, and the image data in the transfer source data area 31 is transferred to the compressor 13 or the decompressor 15. When the data is transferred, the compressor 13 or the decompressor 15 compresses or decompresses the transferred data (step S13). The data after the compression process or the expansion process is transferred to the transfer destination data area 33 and stored. The data stored in the transfer destination data area 33 includes a redundant area. This is because the compressor 13 or the decompressor 15 processes data in units of 8 pixels × 8 pixels and stores it in the transfer source data area 31.

CPU17は、転送先データ領域33に格納された画像データのうちの冗長領域に対して、画像背景と同じ画像データを書き込む。いわゆるゴミ消し処理である(ステップS15)。即ち、ゴミ消し処理は、ソフトウェア処理である。   The CPU 17 writes the same image data as the image background in the redundant area of the image data stored in the transfer destination data area 33. This is so-called dust removal processing (step S15). That is, the dust erasing process is a software process.

ゴミ消し処理後、画像データは、データ出力部23を介して外部へ出力される(ステップS17)。   After the dust erasing process, the image data is output to the outside via the data output unit 23 (step S17).

次に、図2(b)のソフトウェア処理の場合を説明する。フロー開始時点で、メモリ資源としての転送元データ領域31と圧縮/伸張処理後のデータを格納する出力データ領域35がメモリ上に確保されているものとする。ソフトウェア処理の場合、CPUが各ブロックの位置を認識して処理を行うので、出力データ領域35中に冗長領域を確保する必要がない。即ち、出力データ領域35の大きさは転送元データ領域31と一致する。CPU17は、8画素×8画素以下の画素が処理対象であるブロックの場合、ワークエリア上でそのブロックに画素を付加して処理し、処理後のデータを出力データ領域に格納する際には不要な画素を格納しない。   Next, the case of software processing in FIG. 2B will be described. Assume that a transfer source data area 31 as a memory resource and an output data area 35 for storing data after compression / decompression processing are secured on the memory at the start of the flow. In the case of software processing, since the CPU recognizes the position of each block and performs processing, it is not necessary to secure a redundant area in the output data area 35. That is, the size of the output data area 35 coincides with the transfer source data area 31. When the block is a processing target of pixels of 8 pixels × 8 pixels or less, the CPU 17 performs processing by adding the pixel to the block on the work area and storing the processed data in the output data area. Do not store any pixels.

CPU17は、圧縮/伸張処理に適用する各種パラメータを決定する(ステップS21)。次に、CPU17は、転送元データ領域31中の8画素×8画素のブロックを対象に圧縮または伸張処理を行う(ステップS23)。そして、処理されたデータを出力データ領域33へ格納する。次に、CPU17は、処理すべきブロックが残っているか否かを判断する(ステップS25)。処理すべきブロックが残っている場合、ルーチンはステップS23へ進み、次のブロックを対象に圧縮または伸張処理を行う。一方、処理すべきブロックが残っていない場合は、圧縮/伸張処理を終了する。   The CPU 17 determines various parameters to be applied to the compression / decompression process (step S21). Next, the CPU 17 performs compression or expansion processing on a block of 8 pixels × 8 pixels in the transfer source data area 31 (step S23). Then, the processed data is stored in the output data area 33. Next, the CPU 17 determines whether or not there remains a block to be processed (step S25). If there remains a block to be processed, the routine proceeds to step S23 and performs compression or expansion processing on the next block. On the other hand, when no block to be processed remains, the compression / decompression process is terminated.

このように、ソフトウェア処理の場合、CPU17は、処理対象の各ブロックの画像データ中の位置を認識したうえで圧縮/伸張処理を行う。その認識に基づいてデータの格納を行うので出力データ領域35に冗長領域を確保する必要がない。ハードウェア処理と比べて、冗長領域の分だけ少ないメモリ領域で圧縮/伸張処理を行うことが可能となる。しかし、画像データのサイズが大きくなると、ハードウェア処理と比較して処理時間を要するようになる。   Thus, in the case of software processing, the CPU 17 performs compression / decompression processing after recognizing the position in the image data of each block to be processed. Since data is stored based on the recognition, it is not necessary to secure a redundant area in the output data area 35. Compared to hardware processing, compression / decompression processing can be performed in a memory area that is smaller than the redundant area. However, when the size of the image data is increased, processing time is required as compared with hardware processing.

以上、参考例によってハードウェア処理とソフトウェア処理の特性を説明した。次に、この発明に係る圧縮/伸張処理の手順を説明する。なお、処理開始時点で、資源としての圧縮器13または伸張器15が確保されているものとする。さらに、メモリ資源として転送元データ領域と出力データ領域がメモリ19上に確保されているものとする。   In the above, the characteristics of hardware processing and software processing have been described by reference examples. Next, the procedure of compression / decompression processing according to the present invention will be described. It is assumed that the compressor 13 or the decompressor 15 as a resource is secured at the start of processing. Further, it is assumed that a transfer source data area and an output data area are secured on the memory 19 as memory resources.

図6は、この発明に係る圧縮/伸張処理の手順を示すフローチャートである。図7は、図6の処理において、ハードウェア処理を行う際に使用されるメモリ領域を模式的に示す説明図である。図7で、メモリ資源として確保された転送元データ領域を符号31で、出力データ領域を符号41で示している。   FIG. 6 is a flowchart showing a procedure of compression / decompression processing according to the present invention. FIG. 7 is an explanatory diagram schematically showing a memory area used when performing hardware processing in the processing of FIG. In FIG. 7, a transfer source data area secured as a memory resource is denoted by reference numeral 31, and an output data area is denoted by reference numeral 41.

図6で、CPU17は、圧縮/伸張処理開始の指示を受領すると、処理対象となる画像データのデータ量を取得し(ステップS31)、所定のデータ量よりも大きいか否かを判断する(ステップS33)。ここで、データ量は、フロー開始に先立って転送元データ領域を確保するために算出された値を参照してもよい。   In FIG. 6, upon receiving an instruction to start compression / decompression processing, the CPU 17 acquires the amount of image data to be processed (step S31), and determines whether the amount is larger than a predetermined data amount (step S31). S33). Here, the data amount may refer to a value calculated for securing the transfer source data area prior to the start of the flow.

画像データのデータ量が所定のデータ量以下の場合は、ソフトウェアで圧縮/伸張処理を行うと決定する(ステップS35)。この場合、ソフトウェア処理の手順は、既に参考例として示した図2(b)と同様である。   If the data amount of the image data is equal to or smaller than the predetermined data amount, it is determined that the compression / decompression process is performed by software (step S35). In this case, the software processing procedure is the same as that shown in FIG.

一方、処理容量が所定量を超える場合には、ハードウェアで圧縮/伸張処理を行うと決定する。それを前提に、CPU17は、画像データのサイズから冗長領域があるか、即ち、画像データの縦横の画素数がいずれも8の倍数であるか否かを判断する(ステップS37)。   On the other hand, when the processing capacity exceeds the predetermined amount, it is determined that the compression / decompression process is performed by hardware. Based on this assumption, the CPU 17 determines whether there is a redundant area from the size of the image data, that is, whether the number of vertical and horizontal pixels of the image data is a multiple of 8 (step S37).

判断の結果、縦横の画素数がいずれも8の倍数で冗長領域が無い場合は、画像データの全領域が8画素×8画素のブロックに分割できる。そこで、各ブロックをハードウェア処理の対象とするように圧縮器13または伸張器15の動作条件を設定する(ステップS41)。即ち、転送元データ領域の全領域が圧縮器13または伸張器15に転送されるように設定する。設定終了後、各ブロックの圧縮処理または伸張処理を開始する(ステップS43)。その後、ルーチンは後述するステップS51へ進む。なお、縦横の画素数がいずれも8の倍数であるので、転送先データ領域33のメモリ容量は、転送元データ領域31と一致する。   As a result of the determination, if the number of vertical and horizontal pixels is a multiple of 8 and there is no redundant area, the entire area of the image data can be divided into blocks of 8 pixels × 8 pixels. Therefore, the operating conditions of the compressor 13 or the decompressor 15 are set so that each block is subject to hardware processing (step S41). That is, the entire transfer source data area is set to be transferred to the compressor 13 or the decompressor 15. After completing the setting, the compression processing or decompression processing of each block is started (step S43). Thereafter, the routine proceeds to step S51 described later. Note that since the number of vertical and horizontal pixels is a multiple of 8, the memory capacity of the transfer destination data area 33 matches that of the transfer source data area 31.

一方、前記判断の結果、冗長領域がある場合、CPU17は、転送元データ領域31を各ブロックが8画素×8画素からなる基本領域37(図7参照)とそれ以外の冗長領域39とに分類する。そして、基本領域37を対象にハードウェア処理を行い、冗長領域を対象にソフトウェア処理を行うように決定する。   On the other hand, as a result of the determination, if there is a redundant area, the CPU 17 classifies the transfer source data area 31 into a basic area 37 (see FIG. 7) in which each block has 8 pixels × 8 pixels and another redundant area 39. To do. Then, the hardware process is performed for the basic area 37 and the software process is determined for the redundant area.

まず、基本領域37の各ブロックをハードウェア処理の対象とするように圧縮器13または伸張器15の動作条件を設定する(ステップS45)。即ち、転送元データ領域の全領域が圧縮器13または伸張器15に転送されるように設定する。設定終了後、基本領域37の各ブロックの圧縮処理または伸張処理を開始する(ステップS47)。これによって、基本領域37の各ブロックのデータが圧縮器13または伸張器15へ転送される。図7に示すように、処理された画像データの転送先は、出力データ領域41中の領域43である。領域43は、基本領域37に対応する。
ハードウェアによる基本領域37の処理が開始された後、CPU17は、冗長領域39の圧縮処理または伸張処理を実行する(ステップS49)。冗長領域39に対するソフトウェア処理の手順は、既に参考例として示した図2(b)と同様である。図7に示すように、処理された画像データの転送先は、出力データ領域41中の領域45である。領域45は、冗長領域39に対応する。
冗長領域39のソフトウェア処理が終了したら、CPU17は、前記ステップS47で開始した基本領域37ハードウェア処理が終了したか否かを確認し(ステップS51)、終了を待つ。
First, the operating conditions of the compressor 13 or the decompressor 15 are set so that each block in the basic area 37 is subject to hardware processing (step S45). That is, the entire transfer source data area is set to be transferred to the compressor 13 or the decompressor 15. After the setting is completed, compression processing or decompression processing for each block in the basic area 37 is started (step S47). As a result, the data of each block in the basic area 37 is transferred to the compressor 13 or the decompressor 15. As shown in FIG. 7, the transfer destination of the processed image data is an area 43 in the output data area 41. The area 43 corresponds to the basic area 37.
After the processing of the basic area 37 by hardware is started, the CPU 17 executes a compression process or an expansion process of the redundant area 39 (step S49). The software processing procedure for the redundant area 39 is the same as that shown in FIG. As shown in FIG. 7, the transfer destination of the processed image data is an area 45 in the output data area 41. The area 45 corresponds to the redundant area 39.
When the software processing of the redundant area 39 is completed, the CPU 17 confirms whether or not the basic area 37 hardware processing started in step S47 is completed (step S51), and waits for completion.

冗長領域39と基本領域37の両方の処理が終了したことが確認されたら、CPU17は、出力データ領域41に格納された画像データをデータ出力部23を介して出力する(ステップS53)。   When it is confirmed that both the redundant area 39 and the basic area 37 have been processed, the CPU 17 outputs the image data stored in the output data area 41 via the data output unit 23 (step S53).

ここで、図6のステップS47で開始されたハードウェア処理と、ステップS49のソフトウェア処理は並行して行われる。このように構成されているので、画像データを全てハードウェア処理する場合、あるいは全てソフトウェア処理する場合に比べて、画像データの処理時間の短縮することができる。   Here, the hardware processing started in step S47 in FIG. 6 and the software processing in step S49 are performed in parallel. Since it is configured in this way, it is possible to reduce the processing time of image data compared to the case where all image data is processed by hardware or the case where all image data is processed by software.

図7で、出力データ領域41中の領域45のメモリ容量は、冗長領域39のメモリ容量と等しい。冗長領域39がソフトウェア処理されるためである。また、出力データ領域41中の領域43のメモリ容量は、基本領域37のメモリ容量と等しい。基本領域37の各ブロックは、いずれも8画素×8画素からなるためである。従って、出力データ領域41のメモリ容量は、転送元データ領域31のメモリ容量と等しい。   In FIG. 7, the memory capacity of the area 45 in the output data area 41 is equal to the memory capacity of the redundant area 39. This is because the redundant area 39 is processed by software. Further, the memory capacity of the area 43 in the output data area 41 is equal to the memory capacity of the basic area 37. This is because each block of the basic area 37 is composed of 8 pixels × 8 pixels. Therefore, the memory capacity of the output data area 41 is equal to the memory capacity of the transfer source data area 31.

先に、画像データ量がある程度以下になるとソフトウェア処理の方が速度的に有利になると述べた。その傾向を実証する参考値を以下に説明する。ただし、先にも述べたように、どの程度からソフトウェア処理が有利かについては結果に影響を与える種々の要因があり、一概にはいえない。   Previously, it was stated that software processing would be advantageous in terms of speed when the amount of image data was below a certain level. Reference values demonstrating the tendency are explained below. However, as described above, there are various factors that affect the result, and it cannot be said that the extent to which software processing is advantageous is unclear.

参考例として、1MBの画像データをすべてハードウェア処理した場合の全体の処理時間と、すべてソフトウェア処理した場合の処理時間の一例を挙げると、ハードウェア処理した場合は350msecを要し、ソフトウェア処理した場合は670msecを要した。   As a reference example, given an example of the overall processing time when all 1 MB image data is processed by hardware and the processing time when all software processing is performed, 350 msec is required for hardware processing and software processing is performed. In this case, 670 msec was required.

さらに、おなじ画像処理装置で150kBの画像データを処理した場合、すべてハードウェア処理した場合は30msecを要し、すべてソフトウェア処理した場合は22msecを要した。   Further, when 150 kB image data was processed by the same image processing apparatus, 30 msec was required for all hardware processing, and 22 msec was required for all software processing.

図4および図5は、上記処理において、図2(a)のハードウェア処理の各ステップおよび図2(b)のソフトウェア処理の各ステップが全体の処理時間に占める割合を示すグラフである。図4は1MBの画像データを処理したときの結果、図5は、1kBの画像データを処理したときの結果をそれぞれ示している。   4 and 5 are graphs showing the ratio of each step of the hardware processing of FIG. 2 (a) and each step of the software processing of FIG. 2 (b) to the total processing time in the above processing. FIG. 4 shows the results when 1 MB image data is processed, and FIG. 5 shows the results when 1 kB image data is processed.

図4(a)および図5(a)は、ハードウェア処理の場合を示している。「レジスタ設定」は図2(a)のステップS11に相当する処理時間を、「画像処理」は図2(a)のステップS13およびS15に相当する処理時間を、「データ転送」は図2(a)のステップS17に相当する処理時間をそれぞれ示している。   4A and 5A show the case of hardware processing. “Register setting” is the processing time corresponding to step S11 of FIG. 2A, “Image processing” is the processing time corresponding to steps S13 and S15 of FIG. 2A, and “Data transfer” is FIG. The processing time corresponding to step S17 of a) is shown.

図4(b)および図5(b)は、ソフトウェア処理の場合を示している。「パラメータ設定」は図2(b)のステップS21に相当する処理時間を、「画像処理」は図2(b)のステップS23およびS25に相当する処理時間をそれぞれ示している。図4と図5とを比較すると、データ量が小さくなるといわゆるオーバーヘッドの処理時間の全体に占める割合が増えていることがわかる。その変化の割合がソフトウェア処理とハードウェア処理とで異なるために、データ量が小さい場合はソフトウェア処理の処理時間が全体としてハードウェア処理に比べて短縮されるといえる。   FIG. 4B and FIG. 5B show the case of software processing. “Parameter setting” indicates the processing time corresponding to step S21 in FIG. 2B, and “Image processing” indicates the processing time corresponding to steps S23 and S25 in FIG. 2B. Comparing FIG. 4 with FIG. 5, it can be seen that the proportion of the so-called overhead processing time increases as the amount of data decreases. Since the rate of change differs between software processing and hardware processing, it can be said that the processing time of software processing as a whole is shortened compared to hardware processing when the amount of data is small.

前述した実施の形態の他にも、この発明について種々の変形例があり得る。それらの変形例は、この発明の範囲に属さないと解されるべきものではない。この発明には、請求の範囲と均等の意味および前記範囲内でのすべての変形とが含まれるべきである。   In addition to the embodiments described above, there can be various modifications of the present invention. These modifications should not be construed as not belonging to the scope of the present invention. The present invention should include the meaning equivalent to the scope of the claims and all modifications within the scope.

この発明の画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus of this invention. 参考例として、入力された画像データを無条件にハードウェアあるいはソフトウェアで圧縮/伸張処理する手順を示すフローチャートである。As a reference example, it is a flowchart showing a procedure for unconditionally compressing / decompressing input image data by hardware or software. 参考例としての図2の処理を行う際に使用されるメモリ領域を模式的に示す説明図である。It is explanatory drawing which shows typically the memory area used when performing the process of FIG. 2 as a reference example. 参考例において、図2(a)のハードウェア処理の各ステップおよび図2(b)のソフトウェア処理の各ステップが全体の処理時間に占める割合を示す第1のグラフである。In a reference example, it is the 1st graph which shows the ratio which each step of the hardware processing of Drawing 2 (a) and each step of the software processing of Drawing 2 (b) occupy for the whole processing time. 参考例において、図2(a)のハードウェア処理の各ステップおよび図2(b)のソフトウェア処理の各ステップが全体の処理時間に占める割合を示す第2のグラフである。In a reference example, it is the 2nd graph which shows the ratio which each step of the hardware processing of Fig.2 (a) and each step of the software processing of FIG.2 (b) occupies for the whole processing time. この発明に係る圧縮/伸張処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the compression / decompression process based on this invention. この発明に係る圧縮/伸張処理において、ハードウェア処理を行う際に使用されるメモリ領域を模式的に示す説明図である。It is explanatory drawing which shows typically the memory area used when performing a hardware process in the compression / decompression process which concerns on this invention. この発明の画像処理装置の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the image processing apparatus of this invention.

符号の説明Explanation of symbols

1:画像処理装置
2:入力部
3:剰余判定部
4:ブロック分割部
5:第1処理部
6:第2処理部
7:出力部
11:画像データ処理部
13:圧縮器(ハードウェア)
15:伸張器(ハードウェア)
17:CPU
19:メモリ
21:データ入力部
23:データ出力部
31:転送元データ領域
33:転送先データ領域(ハードウェア処理)
35:出力データ領域(ソフトウェア処理)
37:基本領域
39:冗長領域
41:出力データ領域(本願処理)
43:基本領域対応部分
45:冗長領域対応部分
1: Image processing device 2: Input unit 3: Remainder determination unit 4: Block division unit 5: First processing unit 6: Second processing unit 7: Output unit 11: Image data processing unit 13: Compressor (hardware)
15: Stretcher (hardware)
17: CPU
19: Memory 21: Data input unit 23: Data output unit 31: Transfer source data area 33: Transfer destination data area (hardware processing)
35: Output data area (software processing)
37: Basic area 39: Redundant area 41: Output data area (application processing)
43: Basic area corresponding part 45: Redundant area corresponding part

Claims (8)

外部からの画像データを入力させる入力部と、
入力されたデータを所定サイズのブロックに分割するブロック分割部と、
前記画像データが所定サイズのブロックに剰余なく分割できるか否かを判定する剰余判定部と、
剰余が生じる場合に剰余の部分を処理する第1処理部と、
所定サイズの各ブロックを処理する第2処理部と、
第1処理部または第2処理部で処理された各データを組み合わせて外部へ出力する出力部とを備えることを特徴とする画像処理装置。
An input unit for inputting image data from the outside;
A block dividing unit that divides input data into blocks of a predetermined size;
A remainder determination unit that determines whether the image data can be divided into blocks of a predetermined size without a remainder;
A first processing unit that processes a portion of the surplus when a surplus occurs;
A second processing unit for processing each block of a predetermined size;
An image processing apparatus comprising: an output unit configured to combine and output the data processed by the first processing unit or the second processing unit to the outside.
前記剰余判定部は、主走査方向の画素の並びからなる各ラインが所定画素数のブロックに剰余なく分割できるか否かを判定する請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the remainder determination unit determines whether or not each line composed of an array of pixels in the main scanning direction can be divided into blocks having a predetermined number of pixels without a remainder. 前記剰余判定部は、主走査方向に直交する副走査方向において、各ラインが所定ライン数に剰余なく分割できるか否かをさらに判定する請求項2記載の画像処理装置。   The image processing apparatus according to claim 2, wherein the remainder determination unit further determines whether each line can be divided into a predetermined number of lines without a remainder in the sub-scanning direction orthogonal to the main scanning direction. 前記第1処理部は、CPUがプログラムを実行することにより剰余の部分を画像処理する画像処理部である請求項1〜3の何れか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first processing unit is an image processing unit that performs image processing on a surplus portion when the CPU executes a program. 前記第2処理部は、画像処理回路により各ブロックを画像処理する画像処理部である請求項1〜4の何れか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the second processing unit is an image processing unit that performs image processing on each block using an image processing circuit. 前記第1および第2画像処理部は、対象のデータを圧縮処理または伸張処理するものである請求項1〜5の何れか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the first and second image processing units perform compression processing or decompression processing on target data. 前記圧縮処理または伸張処理の方式は、JPEG、JBIGまたはLZWの何れかの方式である請求項1〜6の何れか一つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the compression processing or decompression processing is any one of JPEG, JBIG, and LZW. 外部からの画像データを入力させる工程部と、
入力されたデータを所定サイズのブロックに分割する工程と、
前記画像データが所定サイズのブロックに剰余なく分割できるか否かを判定する工程と、
剰余が生じる場合に剰余の部分を処理する第1の処理工程と、
所定サイズの各ブロックを処理する第2の処理工程と、
第1または第2の処理工程で処理された各ブロックを組み合わせて外部へ出力する工程とを備えることを特徴とする画像処理方法。
A process part for inputting image data from the outside;
Dividing the input data into blocks of a predetermined size;
Determining whether the image data can be divided into blocks of a predetermined size without any remainder;
A first processing step for processing a surplus portion when a surplus occurs; and
A second processing step for processing each block of a predetermined size;
And a step of combining the blocks processed in the first or second processing step and outputting them to the outside.
JP2007208281A 2007-08-09 2007-08-09 Image processor and image processing method Pending JP2009044547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007208281A JP2009044547A (en) 2007-08-09 2007-08-09 Image processor and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007208281A JP2009044547A (en) 2007-08-09 2007-08-09 Image processor and image processing method

Publications (1)

Publication Number Publication Date
JP2009044547A true JP2009044547A (en) 2009-02-26

Family

ID=40444786

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007208281A Pending JP2009044547A (en) 2007-08-09 2007-08-09 Image processor and image processing method

Country Status (1)

Country Link
JP (1) JP2009044547A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076575A (en) * 2009-09-04 2011-04-14 Canon Inc Image processor, image processing method, and program
JP2012015652A (en) * 2010-06-29 2012-01-19 Canon Inc Image processing apparatus, and control method and program for the apparatus
JP2017177361A (en) * 2016-03-28 2017-10-05 コニカミノルタ株式会社 Image formation apparatus, image formation method and control program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076575A (en) * 2009-09-04 2011-04-14 Canon Inc Image processor, image processing method, and program
JP2012015652A (en) * 2010-06-29 2012-01-19 Canon Inc Image processing apparatus, and control method and program for the apparatus
JP2017177361A (en) * 2016-03-28 2017-10-05 コニカミノルタ株式会社 Image formation apparatus, image formation method and control program

Similar Documents

Publication Publication Date Title
JP4476909B2 (en) Printing apparatus, printing processing method, printing processing program, and recording medium
JP2010103681A (en) Image processing device and method
JP5614122B2 (en) Image data decoding device
JP2009044547A (en) Image processor and image processing method
JP3384553B2 (en) Printing system
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
JP4855917B2 (en) Image forming apparatus, image forming method, and image forming program
JP4446389B2 (en) Interface device for compression / decompression module
JP5441676B2 (en) Image processing apparatus and processing method thereof
JP2002300407A (en) Image processor, image processing method, image processing program and computer-readable recording medium recorded with the program
JP6775558B2 (en) Image stretcher and its control method and program
JP5732765B2 (en) Image data decoding device
US11314995B2 (en) Image processing apparatus, image processing method, and storage medium
JP4771095B2 (en) Image compression device
JP3997851B2 (en) Image coding apparatus and image coding program
JP3214617B2 (en) Multi-value image printer
JP3117987B2 (en) Image processing device
JP2020116803A (en) Image processing device and image formation apparatus having image processing device
JP2001306275A (en) Image processing system
JPH11259243A (en) Printing system
JP2002127510A (en) Image processing device
JP2016046597A (en) Image processing apparatus, and control method, program of image processing apparatus
JP2019077133A (en) Image formation apparatus, image formation method and program
JP2005244748A (en) Image processing method and image processing apparatus
JPH05205015A (en) Image processor