JP2006007638A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2006007638A
JP2006007638A JP2004189462A JP2004189462A JP2006007638A JP 2006007638 A JP2006007638 A JP 2006007638A JP 2004189462 A JP2004189462 A JP 2004189462A JP 2004189462 A JP2004189462 A JP 2004189462A JP 2006007638 A JP2006007638 A JP 2006007638A
Authority
JP
Japan
Prior art keywords
processing unit
processing
data
hardware
image data
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.)
Withdrawn
Application number
JP2004189462A
Other languages
Japanese (ja)
Inventor
Kimitoshi Sato
公俊 佐藤
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.)
Oki Electric Industry Co Ltd
Oki Data Systems Co Ltd
Original Assignee
Oki Data Corp
Oki Data Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Data Corp, Oki Data Systems Co Ltd filed Critical Oki Data Corp
Priority to JP2004189462A priority Critical patent/JP2006007638A/en
Publication of JP2006007638A publication Critical patent/JP2006007638A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Facsimiles In General (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Record Information Processing For Printing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce a time period for processing data and to simplify the work therefor. <P>SOLUTION: This data processor comprises a hardware processing section, a software processing section, a data size comparison processing means for comparing a data size of data with a threshold, and a processing section selection processing means for selecting one of the hardware processing section and the software processing section from the comparison result output by the data size comparison processing means. As one of the hardware processing section and the software processing section is selected from the comparison result between the data size and the threshold, it is possible to reduce the time period for processing the data. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、データ処理装置に関するものである。   The present invention relates to a data processing apparatus.

従来、プリンタ、例えば、ページプリンタにおいては、多値イメージデータを2値化したり、カラーマッチングを行ったり、多値イメージデータを実数倍に拡大したり、2値イメージデータを圧縮したりする等のデータの処理、例えば、画像処理を行うに当たり、処理速度を高くするためにハードウェアを使用するようにしている(例えば、特許文献1参照。)。
特開平7−137353号公報
Conventionally, in a printer such as a page printer, binarization of multi-valued image data, color matching, enlargement of multi-valued image data by a real number, compression of binary image data, etc. In performing data processing, for example, image processing, hardware is used to increase the processing speed (see, for example, Patent Document 1).
JP 7-137353 A

しかしながら、前記従来のページプリンタにおいては、画像処理を行うためのデータの単位、すなわち、データサイズがある程度大きい場合には、ハードウェアを使用する方が処理速度を高くすることができ、処理時間を短くすることができるが、データサイズが小さい場合には、CPUの能力、キャッシュの有無、データバスの速度等のハードウェアの能力によっては、処理速度が低くなり、処理時間が長くなってしまう。   However, in the conventional page printer, when the data unit for image processing, that is, when the data size is large to some extent, the processing speed can be increased by using hardware, and the processing time can be reduced. Although it can be shortened, when the data size is small, the processing speed becomes low and the processing time becomes long depending on the capacity of the CPU, the presence / absence of a cache, and the hardware capacity such as the speed of the data bus.

本発明は、前記従来のページプリンタの問題点を解決して、データの処理を行う際の処理時間を短くすることができ、そのための作業を簡素化することができるデータ処理装置を提供することを目的とする。   The present invention solves the problems of the conventional page printer, and provides a data processing apparatus capable of shortening the processing time when processing data and simplifying the work for that. With the goal.

そのために、本発明のデータ処理装置においては、ハードウェアを使用してデータを処理するハードウェア処理部と、ソフトウェアを使用してデータを処理するソフトウェア処理部と、処理するデータのデータサイズと、あらかじめハードウェア及びソフトウェアを使用して設定された所定の閾値とを比較するデータサイズ比較処理手段と、該データサイズ比較処理手段による比較結果に基づいて、前記ハードウェア処理部及びソフトウェア処理部のうちの一方を選択する処理部選択処理手段とを有する。   Therefore, in the data processing apparatus of the present invention, a hardware processing unit that processes data using hardware, a software processing unit that processes data using software, a data size of data to be processed, A data size comparison processing means for comparing with a predetermined threshold set in advance using hardware and software, and based on the comparison result by the data size comparison processing means, the hardware processing section and the software processing section And a processing section selection processing means for selecting one of the above.

本発明によれば、データ処理装置においては、ハードウェアを使用してデータを処理するハードウェア処理部と、ソフトウェアを使用してデータを処理するソフトウェア処理部と、処理するデータのデータサイズと、あらかじめハードウェア及びソフトウェアを使用して設定された所定の閾値とを比較するデータサイズ比較処理手段と、該データサイズ比較処理手段による比較結果に基づいて、前記ハードウェア処理部及びソフトウェア処理部のうちの一方を選択する処理部選択処理手段とを有する。   According to the present invention, in the data processing device, a hardware processing unit that processes data using hardware, a software processing unit that processes data using software, a data size of data to be processed, A data size comparison processing means for comparing with a predetermined threshold set in advance using hardware and software, and based on a comparison result by the data size comparison processing means, the hardware processing section and the software processing section And a processing section selection processing means for selecting one of the above.

この場合、処理するデータのデータサイズと、あらかじめハードウェア及びソフトウェアを使用して設定された所定の閾値とが比較され、比較結果に基づいて、前記ハードウェア処理部及びソフトウェア処理部のうちの一方が選択されるので、データの処理を行う際の処理時間を短くすることができ、そのための作業を簡素化することができる。   In this case, the data size of the data to be processed is compared with a predetermined threshold set in advance using hardware and software, and one of the hardware processing unit and the software processing unit is determined based on the comparison result. Is selected, the processing time for processing the data can be shortened, and the work for that can be simplified.

以下、本発明の実施の形態について図面を参照しながら詳細に説明する。なお、この場合、データ処理装置として、プリンタ、特に、ページプリンタについて説明する。また、データの処理としての画像処理について説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In this case, a printer, particularly a page printer will be described as the data processing apparatus. Further, image processing as data processing will be described.

図1は本発明の第1の実施の形態におけるページプリンタのブロック図である。   FIG. 1 is a block diagram of a page printer according to the first embodiment of the present invention.

図において、11は上位装置、例えば、図示されないホストコンピュータから送信された多値イメージデータ、コマンド等を受信する受信部としてのコマンド受信部、13はデータ処理部としてのイメージデータ処理部であり、該イメージデータ処理部13は、ハードウェア処理部としてのハードウェア2値化処理部16、ソフトウェア処理部としてのソフトウェア2値化処理部17、記憶装置18及び初期化処理部21と接続される。前記記憶装置18には、ディザパターンデータ領域15が形成され、該ディザパターンデータ領域15に、処理を必要とするデータ、本実施の形態においては、2値化される多値イメージデータ、及び多値イメージデータを2値化するために必要なディザパターンデータが記録される。   In the figure, 11 is a command receiving unit as a receiving unit for receiving multivalued image data, commands, etc. transmitted from a host device (not shown) such as a host computer, 13 is an image data processing unit as a data processing unit, The image data processing unit 13 is connected to a hardware binarization processing unit 16 as a hardware processing unit, a software binarization processing unit 17 as a software processing unit, a storage device 18 and an initialization processing unit 21. In the storage device 18, a dither pattern data area 15 is formed. In the dither pattern data area 15, data that requires processing, in this embodiment, multi-value image data that is binarized, and multiple Dither pattern data necessary for binarizing the value image data is recorded.

前記イメージデータ処理部13は、前記コマンド受信部11によって受信された多値イメージデータを2値化するために、受信された多値イメージデータを記憶装置18の多値イメージデータ領域14に記録する。   The image data processing unit 13 records the received multi-valued image data in the multi-valued image data area 14 of the storage device 18 in order to binarize the multi-valued image data received by the command receiving unit 11. .

ところで、本実施の形態においては、ハードウェア2値化処理部16とソフトウェア2値化処理部17とを切り替えて処理を行うようにしている。この場合、ハードウェア及びソフトウェアの処理速度の差は、専らハードウェアの能力によって決まるので、ハードウェアとソフトウェアとの切替えのために所定の閾(しきい)値が設定される。そして、イメージデータ処理部13は、多値イメージデータのデータサイズと、前記閾値とを比較することによって、ハードウェア2値化処理部16及びソフトウェア2値化処理部17のうちの一方を選択して使用する。   In the present embodiment, the hardware binarization processing unit 16 and the software binarization processing unit 17 are switched to perform processing. In this case, the difference between the processing speeds of the hardware and software is determined solely by the capability of the hardware, so that a predetermined threshold value is set for switching between the hardware and software. Then, the image data processing unit 13 selects one of the hardware binarization processing unit 16 and the software binarization processing unit 17 by comparing the data size of the multi-value image data with the threshold value. To use.

すなわち、前記イメージデータ処理部13は、多値イメージデータのデータサイズが閾値より大きい場合、ハードウェア2値化処理部16を選択してハードウェア2値化処理を行うように指示し、多値イメージデータのデータサイズが閾値以下である場合、ソフトウェア2値化処理部17を選択してソフトウェア2値化処理を行うように指示する。   That is, when the data size of the multi-valued image data is larger than the threshold value, the image data processing unit 13 selects the hardware binarization processing unit 16 and instructs to perform the hardware binarization processing. When the data size of the image data is equal to or smaller than the threshold value, the software binarization processing unit 17 is selected to instruct to perform the software binarization process.

そして、前記ハードウェア2値化処理部16及びソフトウェア2値化処理部17は、ディザパターンデータ及び多値イメージデータを読み込み、多値イメージデータを2値化し、2値イメージデータを作成する。すなわち、前記ハードウェア2値化処理部16はハードウェアを使用して多値イメージデータを2値化し、ソフトウェア2値化処理部17はソフトウェアを使用して多値イメージデータを2値化する。そして、前記ハードウェア2値化処理部16及びソフトウェア2値化処理部17は、前記2値イメージデータを、展開部としての2値イメージデータ展開処理部19に送る。該2値イメージデータ展開処理部19は、前記2値イメージデータを印刷用ラスタデータとして展開し、印刷処理部20に送る。また、該印刷処理部20は、印刷用ラスタデータに従って画像を形成し、印刷を行う。   The hardware binarization processing unit 16 and the software binarization processing unit 17 read dither pattern data and multi-value image data, binarize the multi-value image data, and create binary image data. That is, the hardware binarization processing unit 16 binarizes the multi-value image data using hardware, and the software binarization processing unit 17 binarizes the multi-value image data using software. Then, the hardware binarization processing unit 16 and the software binarization processing unit 17 send the binary image data to a binary image data development processing unit 19 as a development unit. The binary image data development processing unit 19 develops the binary image data as print raster data and sends it to the print processing unit 20. The print processing unit 20 forms an image according to the print raster data and performs printing.

ところで、異なる機種のページプリンタが開発されるたびに前記閾値を設定する必要があるが、そのたびにハードウェア及びソフトウェアによる画像処理を行い、処理時間を測定して閾値を設定し、データサイズ比較処理部にセットするようにすると、作業が極めて煩わしい。そこで、本実施の形態においては、前記閾値を初期化処理部21において設定するようにしている。   By the way, it is necessary to set the threshold every time a different type of page printer is developed. Every time image processing by hardware and software is performed, the processing time is measured, the threshold is set, and the data size is compared. If it is set in the processing section, the work is extremely troublesome. Therefore, in the present embodiment, the threshold value is set in the initialization processing unit 21.

そのために、該初期化処理部21は、イメージデータ処理部13を介してハードウェア2値化処理部16及びソフトウェア2値化処理部17を選択的に呼び出す。そして、サンプルデータについて、前記ハードウェア2値化処理部16は、ハードウェアを使用して多値イメージデータを2値化し、また、前記ソフトウェア2値化処理部17は、ソフトウェアを使用して多値イメージデータを2値化し、このとき、前記初期化処理部21は計時処理部としてのフリーランカウンタ22によって各処理時間を測定する。そして、前記初期化処理部21は、ハードウェア2値化処理部16における処理時間、及びソフトウェア2値化処理部17における処理時間に基づいて閾値を算出して設定する。   For this purpose, the initialization processing unit 21 selectively calls the hardware binarization processing unit 16 and the software binarization processing unit 17 via the image data processing unit 13. For the sample data, the hardware binarization processing unit 16 binarizes the multi-value image data using hardware, and the software binarization processing unit 17 uses the software. The value image data is binarized, and at this time, the initialization processing unit 21 measures each processing time by a free run counter 22 as a time measuring processing unit. The initialization processing unit 21 calculates and sets a threshold based on the processing time in the hardware binarization processing unit 16 and the processing time in the software binarization processing unit 17.

次に、前記構成のページプリンタの動作について説明する。   Next, the operation of the page printer configured as described above will be described.

図2は本発明の第1の実施の形態におけるページプリンタの動作を示すメインフローチャート、図3は本発明の第1の実施の形態における初期化処理のサブルーチンを示す図、図4は本発明の第1の実施の形態における第1の時間測定処理のサブルーチンを示す図、図5は本発明の第1の実施の形態における第2の時間測定処理のサブルーチンを示す図、図6は本発明の第1の実施の形態における第3の時間測定処理のサブルーチンを示す図、図7は本発明の第1の実施の形態における第4の時間測定処理のサブルーチンを示す図、図8は本発明の第1の実施の形態におけるイメージデータ処理のサブルーチンを示す図、図9は本発明の第1の実施の形態における閾値の設定方法を示す図である。なお、図9において、横軸にデータサイズを、縦軸に処理時間を採ってある。   FIG. 2 is a main flowchart showing the operation of the page printer in the first embodiment of the present invention, FIG. 3 is a diagram showing a subroutine of initialization processing in the first embodiment of the present invention, and FIG. The figure which shows the subroutine of the 1st time measurement process in 1st Embodiment, FIG. 5 is the figure which shows the subroutine of the 2nd time measurement process in the 1st Embodiment of this invention, FIG. 6 is FIG. FIG. 7 is a diagram showing a third time measurement processing subroutine in the first embodiment, FIG. 7 is a diagram showing a fourth time measurement processing subroutine in the first embodiment of the present invention, and FIG. FIG. 9 is a diagram showing a subroutine of image data processing in the first embodiment, and FIG. 9 is a diagram showing a threshold setting method in the first embodiment of the present invention. In FIG. 9, the horizontal axis represents the data size and the vertical axis represents the processing time.

まず、装置、すなわち、ページプリンタの図示されない電源が投入されると、オンラインの状態が設定されるまでに、初期化処理部21(図1)は、初期化処理を行い、閾値を算出する。   First, when a power source (not shown) of the apparatus, that is, the page printer is turned on, the initialization processing unit 21 (FIG. 1) performs initialization processing and calculates a threshold value until an online state is set.

そのために、前記初期化処理部21は、イメージデータ処理部13を介してハードウェア2値化処理部16及びソフトウェア2値化処理部17を選択的に呼び出す。該ハードウェア2値化処理部16及びソフトウェア2値化処理部17は、サンプルデータである多値イメージデータを2値化し、前記初期化処理部21はそのときの処理時間を測定する。この場合、測定は、ハードウェア2値化処理部16及びソフトウェア2値化処理部17において、それぞれ、多値イメージデータのデータサイズを異ならせて複数回、本実施の形態においては、2回行われ、各データサイズごとに処理時間が算出される。   For this purpose, the initialization processing unit 21 selectively calls the hardware binarization processing unit 16 and the software binarization processing unit 17 via the image data processing unit 13. The hardware binarization processing unit 16 and the software binarization processing unit 17 binarize the multi-value image data as sample data, and the initialization processing unit 21 measures the processing time at that time. In this case, the measurement is performed a plurality of times in the hardware binarization processing unit 16 and the software binarization processing unit 17 by changing the data size of the multi-value image data, and twice in the present embodiment. The processing time is calculated for each data size.

そのために、前記初期化処理部21の図示されない第1の時間測定処理手段は、第1の時間測定処理を行い、イメージデータ処理部13を介してハードウェア2値化処理部16を呼び出す。そして、前記第1の時間測定処理手段は、ハードウェア2値化処理部16を呼び出す際に、フリーランカウンタ22を参照し、処理時間の測定を開始した時点のカウント値を読み込み、記憶する。   For this purpose, a first time measurement processing unit (not shown) of the initialization processing unit 21 performs a first time measurement processing and calls the hardware binarization processing unit 16 via the image data processing unit 13. Then, the first time measurement processing unit refers to the free-run counter 22 when calling the hardware binarization processing unit 16, and reads and stores the count value at the time when the measurement of the processing time is started.

続いて、前記第1の時間測定処理手段は、前記ハードウェア2値化処理部16に指示を出し、該ハードウェア2値化処理部16は、2値化処理を行い、ハードウェアを使用して第1のデータサイズの多値イメージデータを2値化する。そして、2値化処理が終了すると、前記第1の時間測定処理手段は、フリーランカウンタ22を参照し、2値化処理が終了した時点のカウント値を読み込み、記憶する。続いて、前記第1の時間測定処理手段は、2値化処理が終了した時点のカウント値から測定を開始した時点のカウント値を減算することによって、処理時間t1を算出し、記憶する。   Subsequently, the first time measurement processing unit issues an instruction to the hardware binarization processing unit 16, and the hardware binarization processing unit 16 performs binarization processing and uses hardware. Then, the multi-value image data having the first data size is binarized. When the binarization process is completed, the first time measurement processing unit refers to the free-run counter 22 and reads and stores the count value at the time when the binarization process is completed. Subsequently, the first time measurement processing means calculates and stores the processing time t1 by subtracting the count value at the time of starting the measurement from the count value at the time of the end of the binarization processing.

また、同様に、前記初期化処理部21の図示されない第2の時間測定処理手段は、第2の時間測定処理を行い、イメージデータ処理部13を介してハードウェア2値化処理部16を呼び出す。そして、前記第2の時間測定処理手段は、ハードウェア2値化処理部16を呼び出す際に、フリーランカウンタ22を参照し、処理時間の測定を開始した時点のカウント値を読み込み、記憶する。   Similarly, the second time measurement processing unit (not shown) of the initialization processing unit 21 performs the second time measurement processing and calls the hardware binarization processing unit 16 via the image data processing unit 13. . The second time measurement processing unit refers to the free-run counter 22 when calling the hardware binarization processing unit 16, and reads and stores the count value when the measurement of the processing time is started.

続いて、前記第2の時間測定処理手段は、前記ハードウェア2値化処理部16に指示を出し、該ハードウェア2値化処理部16は、ハードウェア2値化処理を行い、ハードウェアを使用して第2のデータサイズの多値イメージデータを2値化する。そして、2値化処理が終了すると、前記第2の時間測定処理手段は、フリーランカウンタ22を参照し、2値化処理が終了した時点のカウント値を読み込み、記憶する。続いて、前記第2の時間測定処理手段は、2値化処理が終了した時点のカウント値から測定を開始した時点のカウント値を減算することによって、処理時間t2を算出し、記憶する。   Subsequently, the second time measurement processing unit issues an instruction to the hardware binarization processing unit 16, and the hardware binarization processing unit 16 performs hardware binarization processing to replace the hardware. The multi-valued image data having the second data size is binarized using it. When the binarization process is completed, the second time measurement processing means refers to the free-run counter 22 and reads and stores the count value at the time when the binarization process is completed. Subsequently, the second time measurement processing means calculates and stores the processing time t2 by subtracting the count value at the time of starting the measurement from the count value at the time of the end of the binarization processing.

次に、前記初期化処理部21の図示されない第3の時間測定処理手段は、第3の時間測定処理を行い、イメージデータ処理部13を介してソフトウェア2値化処理部17を呼び出す。そして、前記第3の時間測定処理手段は、ソフトウェア2値化処理部17を呼び出す際に、フリーランカウンタ22を参照し、処理時間の測定を開始した時点のカウント値を読み込み、記憶する。   Next, a third time measurement processing unit (not shown) of the initialization processing unit 21 performs a third time measurement processing and calls the software binarization processing unit 17 via the image data processing unit 13. Then, the third time measurement processing unit refers to the free-run counter 22 when calling the software binarization processing unit 17, and reads and stores the count value at the time when the measurement of the processing time is started.

続いて、前記第3の時間測定処理手段は、前記ソフトウェア2値化処理部17に指示を出し、該ソフトウェア2値化処理部17は、2値化処理を行い、ソフトウェアを使用して前記第1のデータサイズの多値イメージデータを2値化する。そして、2値化処理が終了すると、前記第3の時間測定処理手段は、フリーランカウンタ22を参照し、2値化処理が終了した時点のカウント値を読み込み、記憶する。続いて、前記第3の時間測定処理手段は、2値化処理が終了した時点のカウント値から測定を開始した時点のカウント値を減算することによって、処理時間t3を算出し、記憶する。   Subsequently, the third time measurement processing unit issues an instruction to the software binarization processing unit 17, and the software binarization processing unit 17 performs binarization processing and uses the software to Multi-valued image data having a data size of 1 is binarized. When the binarization process is completed, the third time measurement processing means refers to the free-run counter 22 and reads and stores the count value at the time when the binarization process is completed. Subsequently, the third time measurement processing means calculates and stores the processing time t3 by subtracting the count value at the time of starting the measurement from the count value at the time of the end of the binarization processing.

また、同様に、前記初期化処理部21の図示されない第4の時間測定処理手段は、第4の時間測定処理を行い、イメージデータ処理部13を介してソフトウェア2値化処理部17を呼び出す。そして、前記第4の時間測定処理手段は、ソフトウェア2値化処理部17を呼び出す際に、フリーランカウンタ22を参照し、処理時間の測定を開始した時点のカウント値を読み込み、記憶する。   Similarly, a fourth time measurement processing unit (not shown) of the initialization processing unit 21 performs a fourth time measurement process and calls the software binarization processing unit 17 via the image data processing unit 13. Then, the fourth time measurement processing means refers to the free-run counter 22 when calling the software binarization processing unit 17 and reads and stores the count value at the time when the measurement of the processing time is started.

続いて、前記第4の時間測定処理手段は、前記ソフトウェア2値化処理部17に指示を出し、該ソフトウェア2値化処理部17は、ソフトウェア2値化処理を行い、ソフトウェアを使用して前記第2のデータサイズの多値イメージデータを2値化する。そして、2値化処理が終了すると、前記第4の時間測定処理手段は、フリーランカウンタ22を参照し、2値化処理が終了した時点のカウント値を読み込み、記憶する。続いて、前記第4の時間測定処理手段は、2値化処理が終了した時点のカウント値から測定を開始した時点のカウント値を減算することによって、処理時間t4を算出し、記憶する。   Subsequently, the fourth time measurement processing unit issues an instruction to the software binarization processing unit 17, and the software binarization processing unit 17 performs software binarization processing and uses the software to The multi-valued image data having the second data size is binarized. When the binarization process is completed, the fourth time measurement processing means refers to the free-run counter 22 and reads and stores the count value at the time when the binarization process is completed. Subsequently, the fourth time measurement processing means calculates and stores the processing time t4 by subtracting the count value at the time of starting the measurement from the count value at the time of the end of the binarization processing.

続いて、前記初期化処理部21の閾値算出処理手段は、閾値算出処理を行い、前記各処理時間t1、t2に基づいて、ハードウェア2値化処理部16における処理時間t1、t2の変化率Δthを、前記各処理時間t3、t4に基づいて、ソフトウェア2値化処理部17における処理時間t3、t4の変化率Δtsを算出するとともに、第1、第2のデータサイズと処理時間t1〜t4の関係から、図9に示されるような、ハードウェア2値化処理部16の特性を表すラインLH及びソフトウェア2値化処理部17の特性を表すラインLSを算出し、各ラインLH、LSの交点cr決定し、該交点crのデータサイズを、ハードウェア2値化処理部16とソフトウェア2値化処理部17との切替えのための閾値として記憶する。該閾値は、前記イメージデータ処理部13において、ハードウェア2値化処理部16及びソフトウェア2値化処理部17のうちのいずれを選択するかを決定する際に使用される。なお、図9において、各ラインLH、LSは、処理時間t1〜t4の測定を4回行うことによって得られたものである。   Subsequently, the threshold value calculation processing means of the initialization processing unit 21 performs threshold value calculation processing, and based on the respective processing times t1 and t2, the rate of change of the processing times t1 and t2 in the hardware binarization processing unit 16 Based on the respective processing times t3 and t4, Δth is calculated as a change rate Δts of the processing times t3 and t4 in the software binarization processing unit 17, and the first and second data sizes and the processing times t1 to t4 are calculated. From the relationship, a line LH representing the characteristics of the hardware binarization processing unit 16 and a line LS representing the characteristics of the software binarization processing unit 17 as shown in FIG. 9 are calculated, and the lines LH and LS are calculated. The intersection cr is determined, and the data size of the intersection cr is stored as a threshold for switching between the hardware binarization processing unit 16 and the software binarization processing unit 17. The threshold value is used when the image data processing unit 13 determines which of the hardware binarization processing unit 16 and the software binarization processing unit 17 is to be selected. In FIG. 9, the lines LH and LS are obtained by measuring the processing times t1 to t4 four times.

このようにして、初期化処理が終了すると、前記コマンド受信部11は、コマンド受信処理を行い、ホストコンピュータから送信された多値イメージデータ、コマンド等を受信し、ページ記述言語からイメージデータ印刷コマンドを読み取る。   In this way, when the initialization process is completed, the command receiving unit 11 performs the command receiving process, receives the multi-value image data, commands, etc. transmitted from the host computer, and receives the image data print command from the page description language. Read.

そして、前記イメージデータ処理部13は、イメージデータ処理を行い、多値イメージデータを2値化し、2値イメージデータを作成する。   The image data processing unit 13 performs image data processing, binarizes the multi-value image data, and creates binary image data.

そのために、前記イメージデータ処理部13は、前記イメージデータ印刷コマンドを読み込み、イメージデータ印刷コマンドに従って動作指定が自動指定であるかどうかを判断する。そして、動作指定が自動指定でない場合、前記イメージデータ処理部13は、前記イメージデータ印刷コマンドに従って動作指定がハードウェア指定であるかどうかを判断し、動作指定がハードウェア指定である場合は、ハードウェア2値化処理部16にハードウェア2値化処理を行うように指示する。そして、前記ハードウェア2値化処理部16は、ハードウェア2値化処理を行い、ハードウェアを使用して多値イメージデータを2値化する。また、動作指定がハードウェア指定でない場合、前記イメージデータ処理部13は、ソフトウェア2値化処理部17にソフトウェア2値化処理を行うように指示する。そして、前記ソフトウェア2値化処理部17は、ソストウェア2値化処理を行い、ソフトウェアを使用して多値イメージデータを2値化する。   For this purpose, the image data processing unit 13 reads the image data print command and determines whether the operation designation is automatic designation according to the image data print command. If the operation designation is not automatic designation, the image data processing unit 13 determines whether the operation designation is hardware designation according to the image data print command. If the operation designation is hardware designation, The hardware binarization processing unit 16 is instructed to perform hardware binarization processing. The hardware binarization processing unit 16 performs hardware binarization processing, and binarizes the multi-value image data using hardware. If the operation designation is not hardware designation, the image data processing unit 13 instructs the software binarization processing unit 17 to perform software binarization processing. The software binarization processing unit 17 performs a software binarization process and binarizes the multi-value image data using software.

一方、動作指定が自動指定である場合、前記イメージデータ処理部13の図示されないデータサイズ比較処理手段は、データサイズ比較処理を行い、多値イメージデータのデータサイズが閾値より大きいかどうかを判断する。データサイズが閾値より大きい場合、前記イメージデータ処理部13の図示されない処理部選択処理手段は、処理部選択処理を行い、ハードウェア2値化処理部16を選択し、ハードウェア2値化処理部16にハードウェア2値化処理を行うように指示する。そして、前記ハードウェア2値化処理部16は、ハードウェア2値化処理を行い、ハードウェアを使用して多値イメージデータを2値化する。また、データサイズが閾値以下である場合、前記処理部選択処理手段は、ソフトウェア2値化処理部17を選択し、ソフトウェア2値化処理部17にソフトウェア2値化処理を行うように指示する。そして、前記ソフトウェア2値化処理部17は、ソストウェア2値化処理を行い、ソフトウェアを使用して多値イメージデータを2値化する。   On the other hand, when the operation designation is automatic designation, the data size comparison processing means (not shown) of the image data processing unit 13 performs data size comparison processing to determine whether the data size of the multi-value image data is larger than the threshold value. . When the data size is larger than the threshold, the processing unit selection processing unit (not shown) of the image data processing unit 13 performs processing unit selection processing, selects the hardware binarization processing unit 16, and selects the hardware binarization processing unit. 16 is instructed to perform hardware binarization processing. The hardware binarization processing unit 16 performs hardware binarization processing, and binarizes the multi-value image data using hardware. When the data size is equal to or smaller than the threshold value, the processing unit selection processing unit selects the software binarization processing unit 17 and instructs the software binarization processing unit 17 to perform the software binarization processing. The software binarization processing unit 17 performs a software binarization process and binarizes the multi-value image data using software.

次に、前記2値イメージデータ展開処理部19は、2値イメージデータ展開処理を行い、2値イメージデータを、印刷用ラスタデータとして展開する。   Next, the binary image data expansion processing unit 19 performs a binary image data expansion process to expand the binary image data as print raster data.

そして、印刷処理部20は、印刷処理を行い、展開された印刷用ラスタデータに従って印刷を行う。   Then, the print processing unit 20 performs a printing process, and performs printing according to the developed raster data for printing.

このように、初期化処理において、ハードウェア2値化処理部16及びソフトウェア2値化処理部17による2値化処理を行うための処理時間t1〜t4が測定され、該処理時間t1〜t4に基づいて、ハードウェア2値化処理部16及びソフトウェア2値化処理部17のうちのいずれを選択するかを決定するための閾値が算出されるので、該閾値を設定するための作業を簡素化することができる。   As described above, in the initialization process, the processing times t1 to t4 for performing the binarization processing by the hardware binarization processing unit 16 and the software binarization processing unit 17 are measured, and the processing times t1 to t4 are measured. Based on this, a threshold value for determining which of the hardware binarization processing unit 16 and the software binarization processing unit 17 is to be selected is calculated, and thus the work for setting the threshold value is simplified. can do.

また、前記閾値に基づいて、データサイズに対して最適な2値化処理を行うことができるので、画像処理を行う際の処理時間を短くすることができ、そのための作業を簡素化することができる。   In addition, since it is possible to perform the binarization process optimal for the data size based on the threshold value, it is possible to shorten the processing time when performing image processing, and to simplify the work for that. it can.

しかも、前記閾値は、あらかじめプログラムに組み込まれているのではなく、処理時間t1〜t4の測定に基づいて設定されるので、ハードウェアの性能が変化しても、プログラムを書き換えることなく適正な閾値の設定を行うことができる。   In addition, since the threshold is not incorporated in the program in advance, but is set based on the measurement of the processing times t1 to t4, even if the performance of the hardware changes, the appropriate threshold is not rewritten. Can be set.

そして、前記初期化処理は、ページプリンタの電源が投入されるのに伴って行われるので、ページプリンタを使用する時点のハードウェアの構成に対応させて閾値を設定することができる。したがって、ページプリンタに、オプションとして、メモリが追加されたり、ネットワークが挿入されたり、ソータが装着されたりしたときに、それに伴って、適宜閾値が変化させられるので、画像処理を行う際の処理時間を確実に短くすることができる。   Since the initialization process is performed as the page printer is turned on, the threshold value can be set according to the hardware configuration at the time of using the page printer. Therefore, when a memory is added to the page printer as an option, a network is inserted, or a sorter is attached, the threshold value is appropriately changed accordingly. Can be reliably shortened.

なお、本実施の形態においては、前記初期化処理において、第1〜第4の時間測定処理は、ページプリンタの電源が投入されると、オンラインの状態が設定されるまでに、1回だけ行われるようになっているが、オンラインの状態でオプションを装着することが可能なページプリンタにおいては、オプションが装着されたことを認識するごとに、初期化処理を行い、第1〜第4の時間測定処理を行うこともできる。   In the present embodiment, in the initialization process, the first to fourth time measurement processes are performed only once when the page printer is turned on until the online state is set. However, in a page printer in which an option can be installed in an online state, an initialization process is performed each time it is recognized that the option is installed, and the first to fourth times Measurement processing can also be performed.

次に、図2のフローチャートについて説明する。
ステップS1 初期化処理を行う。
ステップS2 コマンド受信処理を行う。
ステップS3 イメージデータ処理を行う。
ステップS4 2値イメージデータ展開処理を行う。
ステップS5 印刷処理を行う。
ステップS6 電源がオフにされたかどうかを判断する。電源がオフにされた場合は処理を終了し、オフにされていない場合はステップS2に戻る。
Next, the flowchart of FIG. 2 will be described.
Step S1 An initialization process is performed.
Step S2 Command reception processing is performed.
Step S3 Perform image data processing.
Step S4: Binary image data development processing is performed.
Step S5 Print processing is performed.
Step S6: Determine whether the power is turned off. If the power is turned off, the process ends. If not, the process returns to step S2.

次に、図3のフローチャートについて説明する。
ステップS1−1 第1の時間測定処理を行う。
ステップS1−2 第2の時間測定処理を行う。
ステップS1−3 第3の時間測定処理を行う。
ステップS1−4 第4の時間測定処理を行う。
ステップS1−5 閾値を算出し、リターンする。
Next, the flowchart of FIG. 3 will be described.
Step S1-1: A first time measurement process is performed.
Step S1-2 A second time measurement process is performed.
Step S1-3 A third time measurement process is performed.
Step S1-4 A fourth time measurement process is performed.
Step S1-5: A threshold value is calculated, and the process returns.

次に、図4のフローチャートについて説明する。
ステップS1−1−1 フリーランカウンタ22を参照する。
ステップS1−1−2 ハードウェアを使用して第1のデータサイズの多値イメージデータを2値化する。
ステップS1−1−3 フリーランカウンタ22を参照し、リターンする。
Next, the flowchart of FIG. 4 will be described.
Step S1-1-1 Refer to the free-run counter 22.
Step S1-1-2: Multilevel image data having the first data size is binarized using hardware.
Step S1-1-3 Refers to the free-run counter 22 and returns.

次に、図5のフローチャートについて説明する。
ステップS1−2−1 フリーランカウンタ22を参照する。
ステップS1−2−2 ハードウェアを使用して第2のデータサイズの多値イメージデータを2値化する。
ステップS1−2−3 フリーランカウンタ22を参照し、リターンする。
Next, the flowchart of FIG. 5 will be described.
Step S1-2-1 Refer to the free-run counter 22.
Step S1-2-2: Multilevel image data having the second data size is binarized using hardware.
Step S1-2-3 Refers to the free-run counter 22 and returns.

次に、図6のフローチャートについて説明する。
ステップS1−3−1 フリーランカウンタ22を参照する。
ステップS1−3−2 ソフトウェアを使用して第1のデータサイズの多値イメージデータを2値化する。
ステップS1−3−3 フリーランカウンタ22を参照し、リターンする。
Next, the flowchart of FIG. 6 will be described.
Step S1-3-1: Refer to the free-run counter 22.
Step S1-3-2: The multi-value image data having the first data size is binarized using software.
Step S1-3-3 Refers to the free-run counter 22 and returns.

次に、図7のフローチャートについて説明する。
ステップS1−4−1 フリーランカウンタ22を参照する。
ステップS1−4−2 ソフトウェアを使用して第2のデータサイズの多値イメージデータを2値化する。
ステップS1−4−3 フリーランカウンタ22を参照し、リターンする。
Next, the flowchart of FIG. 7 will be described.
Step S1-4-1: Refer to the free-run counter 22.
Step S1-4-2: The multivalued image data having the second data size is binarized using software.
Step S1-4-3 Refers to the free-run counter 22 and returns.

次に、図8のフローチャートについて説明する。
ステップS3−1 動作指定が自動指定であるかどうかを判断する。動作指定が自動指定である場合はステップS3−5に、自動指定でない場合はステップS3−2に進む。
ステップS3−2 動作指定がハードウェア指定であるかどうかを判断する。動作指定がハードウェア指定である場合はステップS3−3に、ハードウェア指定でない場合はステップS3−4に進む。
ステップS3−3 ハードウェア2値化処理を行い、リターンする。
ステップS3−4 ソフトウェア2値化処理を行い、リターンする。
ステップS3−5 データサイズが閾値より大きいかどうかを判断する。データサイズが閾値より大きい場合はステップS3−6に、データサイズが閾値以下である場合はステップS3−7に進む。
ステップS3−6 ハードウェア2値化処理を行い、リターンする。
ステップS3−7 ソフトウェア2値化処理を行い、リターンする。
Next, the flowchart of FIG. 8 will be described.
Step S3-1: It is determined whether or not the operation designation is automatic designation. If the operation designation is automatic designation, the process proceeds to step S3-5, and if not, the process proceeds to step S3-2.
Step S3-2: Determine whether the operation designation is hardware designation. If the operation designation is hardware designation, the process proceeds to step S3-3. If the operation designation is not hardware designation, the process proceeds to step S3-4.
Step S3-3: Performs hardware binarization processing and returns.
Step S3-4: Performs a software binarization process and returns.
Step S3-5: It is determined whether the data size is larger than a threshold value. If the data size is larger than the threshold, the process proceeds to step S3-6. If the data size is equal to or smaller than the threshold, the process proceeds to step S3-7.
Step S3-6: Performs hardware binarization processing and returns.
Step S3-7: Performs a software binarization process and returns.

次に、本発明の第2の実施の形態について説明する。   Next, a second embodiment of the present invention will be described.

図10は本発明の第2の実施の形態におけるページプリンタのブロック図である。   FIG. 10 is a block diagram of a page printer according to the second embodiment of the present invention.

図において、31は2値イメージデータ等のイメージデータを圧縮するデータ処理部としてのイメージデータ圧縮処理部であり、該イメージデータ圧縮処理部31は、ハードウェア処理部としてのハードウェア圧縮処理部34、ソフトウェア処理部としてのソフトウェア圧縮処理部35、記憶装置38及び初期化処理部41と接続されるほかに、第1の実施の形態におけるハードウェア処理部としてのハードウェア2値化処理部16(図1)、ソフトウェア処理部としてのソフトウェア2値化処理部17等と接続され、ハードウェア2値化処理部16、ソフトウェア2値化処理部17等から2値イメージデータを受ける。前記記憶装置38の2値イメージデータ領域33には、圧縮される2値イメージデータが記録される。   In the figure, 31 is an image data compression processing unit as a data processing unit for compressing image data such as binary image data, and the image data compression processing unit 31 is a hardware compression processing unit 34 as a hardware processing unit. In addition to being connected to the software compression processing unit 35, the storage device 38, and the initialization processing unit 41 as a software processing unit, the hardware binarization processing unit 16 (as a hardware processing unit in the first embodiment) 1), is connected to a software binarization processing unit 17 or the like as a software processing unit, and receives binary image data from the hardware binarization processing unit 16, the software binarization processing unit 17 or the like. In the binary image data area 33 of the storage device 38, binary image data to be compressed is recorded.

前記イメージデータ圧縮処理部31は、前記2値イメージデータを圧縮するために、前記2値イメージデータ領域33に記録された2値イメージデータのデータサイズと、あらかじめ設定された所定の閾値とを比較することによって、ハードウェア圧縮処理部34及びソフトウェア圧縮処理部35のうちの一方を選択して使用する。   The image data compression processing unit 31 compares the data size of the binary image data recorded in the binary image data area 33 with a predetermined threshold value in order to compress the binary image data. Thus, one of the hardware compression processing unit 34 and the software compression processing unit 35 is selected and used.

すなわち、前記イメージデータ圧縮処理部31は、2値イメージデータのデータサイズが閾値より大きい場合、ハードウェア圧縮処理部34を選択してハードウェア圧縮処理を行うように指示し、2値イメージデータのデータサイズが閾値以下である場合、ソフトウェア圧縮処理部35を選択してソフトウェア圧縮処理を行うように指示する。   That is, when the data size of the binary image data is larger than the threshold value, the image data compression processing unit 31 selects the hardware compression processing unit 34 to instruct to perform the hardware compression processing, and When the data size is equal to or smaller than the threshold value, the software compression processing unit 35 is selected to instruct to perform software compression processing.

そして、前記ハードウェア圧縮処理部34及びソフトウェア圧縮処理部35は、2値イメージデータを読み込み、2値イメージデータを圧縮し、圧縮イメージデータを作成する。すなわち、前記ハードウェア圧縮処理部34はハードウェアを使用して2値イメージデータを圧縮し、ソフトウェア圧縮処理部35はソフトウェアを使用して2値イメージデータを圧縮する。   The hardware compression processing unit 34 and the software compression processing unit 35 read binary image data, compress the binary image data, and create compressed image data. That is, the hardware compression processing unit 34 compresses binary image data using hardware, and the software compression processing unit 35 compresses binary image data using software.

ところで、前記閾値は初期化処理部41において設定される。そのために、該初期化処理部41は、イメージデータ圧縮処理部31を介してハードウェア圧縮処理部34及びソフトウェア圧縮処理部35を選択的に呼び出す。そして、記憶装置38にあらかじめ記憶されたサンプルデータについて、前記ハードウェア圧縮処理部34は、ハードウェアを使用して2値イメージデータを圧縮し、また、前記ソフトウェア圧縮処理部35は、ソフトウェアを使用して2値イメージデータを圧縮し、このとき、初期化処理部41は計時処理部としてのフリーランカウンタ42によって各処理時間を測定する。そして、初期化処理部41は、ハードウェア圧縮処理部34における処理時間、及びソフトウェア圧縮処理部35における処理時間に基づいて閾値を算出して設定する。   By the way, the threshold value is set in the initialization processing unit 41. For this purpose, the initialization processing unit 41 selectively calls the hardware compression processing unit 34 and the software compression processing unit 35 via the image data compression processing unit 31. For the sample data stored in advance in the storage device 38, the hardware compression processing unit 34 compresses binary image data using hardware, and the software compression processing unit 35 uses software. Then, the binary image data is compressed, and at this time, the initialization processing unit 41 measures each processing time by a free-run counter 42 as a timing processing unit. The initialization processing unit 41 calculates and sets a threshold value based on the processing time in the hardware compression processing unit 34 and the processing time in the software compression processing unit 35.

次に、前記構成のページプリンタの動作について説明する。   Next, the operation of the page printer configured as described above will be described.

図11は本発明の第2の実施の形態におけるページプリンタの動作を示すメインフローチャート、図12は本発明の第2の実施の形態における初期化処理のサブルーチンを示す図、図13は本発明の第2の実施の形態における第1の時間測定処理のサブルーチンを示す図、図14は本発明の第2の実施の形態における第2の時間測定処理のサブルーチンを示す図、図15は本発明の第2の実施の形態における第3の時間測定処理のサブルーチンを示す図、図16は本発明の第2の実施の形態における第4の時間測定処理のサブルーチンを示す図、図17は本発明の第2の実施の形態におけるイメージデータ圧縮処理のサブルーチンを示す図である。   FIG. 11 is a main flowchart showing the operation of the page printer according to the second embodiment of the present invention, FIG. 12 is a diagram showing a subroutine of initialization processing according to the second embodiment of the present invention, and FIG. The figure which shows the subroutine of the 1st time measurement process in 2nd Embodiment, FIG. 14 is the figure which shows the subroutine of the 2nd time measurement process in 2nd Embodiment of this invention, FIG. 15 is FIG. The figure which shows the subroutine of the 3rd time measurement process in 2nd Embodiment, FIG. 16 is the figure which shows the subroutine of the 4th time measurement process in 2nd Embodiment of this invention, FIG. It is a figure which shows the subroutine of the image data compression process in 2nd Embodiment.

まず、ページプリンタの電源が投入されると、オンラインの状態が設定されるまでに、初期化処理部41(図10)は、初期化処理を行い、閾値を算出する。   First, when the page printer is turned on, the initialization processing unit 41 (FIG. 10) performs an initialization process and calculates a threshold value until an online state is set.

そのために、前記初期化処理部41は、イメージデータ圧縮処理部31を介してハードウェア圧縮処理部34及びソフトウェア圧縮処理部35を選択的に呼び出す。該ハードウェア圧縮処理部34及びソフトウェア圧縮処理部35は、サンプルデータである2値イメージデータを圧縮し、初期化処理部41はそのときの処理時間を測定する。この場合、測定は、ハードウェア圧縮処理部34及びソフトウェア圧縮処理部35において、それぞれ、2値イメージデータのデータサイズを異ならせて複数回、本実施の形態においては、2回行われ、各データサイズごとに処理時間が算出される。   For this purpose, the initialization processing unit 41 selectively calls the hardware compression processing unit 34 and the software compression processing unit 35 via the image data compression processing unit 31. The hardware compression processing unit 34 and the software compression processing unit 35 compress binary image data as sample data, and the initialization processing unit 41 measures the processing time at that time. In this case, the measurement is performed a plurality of times in the hardware compression processing unit 34 and the software compression processing unit 35 with different data sizes of the binary image data, and twice in the present embodiment. Processing time is calculated for each size.

そのために、前記初期化処理部41の図示されない第1の時間測定処理手段は、第1の時間測定処理を行い、処理時間t11を算出し、記憶し、前記初期化処理部41の図示されない第2の時間測定処理手段は、第2の時間測定処理を行い、処理時間t12を算出し、記憶し、前記初期化処理部41の図示されない第3の時間測定処理手段は、第3の時間測定処理を行い、処理時間t13を算出し、記憶し、前記初期化処理部41の図示されない第4の時間測定処理手段は、第4の時間測定処理を行い、処理時間t14を算出し、記憶する。   Therefore, a first time measurement processing unit (not shown) of the initialization processing unit 41 performs a first time measurement process, calculates and stores a processing time t11, and a first time measurement processing unit (not shown) of the initialization processing unit 41. The second time measurement processing unit performs a second time measurement process, calculates and stores a processing time t12, and a third time measurement processing unit (not shown) of the initialization processing unit 41 performs a third time measurement process. The processing time t13 is calculated and stored, and the fourth time measurement processing unit (not shown) of the initialization processing unit 41 performs the fourth time measurement processing to calculate and store the processing time t14. .

続いて、前記初期化処理部41の閾値算出処理手段は、閾値算出処理を行い、前記各処理時間t11〜t14に基づいて変化率を算出し、該変化率に基づいて閾値を算出し、設定する。   Subsequently, the threshold value calculation processing means of the initialization processing unit 41 performs threshold value calculation processing, calculates a change rate based on each of the processing times t11 to t14, calculates a threshold value based on the change rate, and sets To do.

このようにして、初期化処理が終了すると、前述されたような、コマンド受信処理及びイメージデータ処理が行われ、続いて、前記イメージデータ圧縮処理部31は、イメージデータ圧縮処理を行い、2値イメージデータを圧縮する。   In this way, when the initialization process is completed, the command reception process and the image data process as described above are performed. Subsequently, the image data compression processing unit 31 performs the image data compression process and performs binary processing. Compress image data.

そのために、前記イメージデータ圧縮処理部31は、イメージデータ圧縮コマンドを読み込み、イメージデータ圧縮コマンドに従って動作指定が自動指定であるかどうかを判断する。そして、動作指定が自動指定でない場合、前記イメージデータ圧縮処理部31は、前記イメージデータ圧縮コマンドに従って動作指定がハードウェア指定であるかどうかを判断し、動作指定がハードウェア指定である場合は、ハードウェア圧縮処理部34にハードウェア圧縮処理を行うように指示し、動作指定がハードウェア指定でない場合、前記イメージデータ圧縮処理部31は、ソフトウェア圧縮処理部35にソフトウェア圧縮処理を行うように指示する。   For this purpose, the image data compression processing unit 31 reads an image data compression command and determines whether the operation designation is automatic designation according to the image data compression command. When the operation designation is not automatic designation, the image data compression processing unit 31 determines whether the operation designation is hardware designation according to the image data compression command, and when the operation designation is hardware designation, Instructs the hardware compression processing unit 34 to perform hardware compression processing, and if the operation designation is not hardware designation, the image data compression processing unit 31 instructs the software compression processing unit 35 to perform software compression processing. To do.

一方、動作指定が自動指定である場合、前記イメージデータ圧縮処理部31の図示されないデータサイズ比較処理手段は、データサイズ比較処理を行い、2値イメージデータのデータサイズが閾値より大きいかどうかを判断し、データサイズが閾値より大きい場合、イメージデータ圧縮処理部31の図示されない処理部選択処理手段は、処理部選択処理を行い、ハードウェア圧縮処理部34にハードウェア圧縮処理を行うように指示し、データサイズが閾値以下である場合、前記処理部選択処理手段は、ソフトウェア圧縮処理部35にソフトウェア圧縮処理を行うように指示する。   On the other hand, when the operation designation is automatic designation, the data size comparison processing means (not shown) of the image data compression processing unit 31 performs data size comparison processing to determine whether the data size of the binary image data is larger than the threshold value. If the data size is larger than the threshold value, the processing unit selection processing unit (not shown) of the image data compression processing unit 31 performs processing unit selection processing and instructs the hardware compression processing unit 34 to perform hardware compression processing. When the data size is equal to or smaller than the threshold value, the processing unit selection processing unit instructs the software compression processing unit 35 to perform software compression processing.

このように、前記閾値に基づいて、データサイズに対して最適な圧縮処理を行うことができるので、画像処理を行う際の処理時間を短くすることができ、そのための作業を簡素化することができる。   As described above, since the optimum compression processing can be performed on the data size based on the threshold value, the processing time when performing image processing can be shortened, and the work for that can be simplified. it can.

このようにしてイメージデータ圧縮処理が終了すると、前述されたように、2値イメージデータ展開処理が行われ、その後、印刷処理が行われる。   When the image data compression process ends in this way, the binary image data expansion process is performed as described above, and then the print process is performed.

次に、図11のフローチャートについて説明する。
ステップS11 初期化処理を行う。
ステップS12 コマンド受信処理を行う。
ステップS13 イメージデータ処理を行う。
ステップS14 イメージデータ圧縮処理を行う。
ステップS15 2値イメージデータ展開処理を行う。
ステップS16 印刷処理を行う。
ステップS17 電源がオフにされたかどうかを判断する。電源がオフにされた場合は処理を終了し、オフにされていない場合はステップS12に戻る。
Next, the flowchart of FIG. 11 will be described.
Step S11 An initialization process is performed.
Step S12: Command reception processing is performed.
Step S13 Perform image data processing.
Step S14 Image data compression processing is performed.
Step S15: Binary image data expansion processing is performed.
Step S16 Print processing is performed.
Step S17: It is determined whether the power is turned off. If the power is turned off, the process ends. If the power is not turned off, the process returns to step S12.

次に、図12のフローチャートについて説明する。
ステップS11−1 第1の時間測定処理を行う。
ステップS11−2 第2の時間測定処理を行う。
ステップS11−3 第3の時間測定処理を行う。
ステップS11−4 第4の時間測定処理を行う。
ステップS11−5 閾値を算出し、リターンする。
Next, the flowchart of FIG. 12 will be described.
Step S11-1 A first time measurement process is performed.
Step S11-2: A second time measurement process is performed.
Step S11-3 Performs a third time measurement process.
Step S11-4 A fourth time measurement process is performed.
Step S11-5: The threshold value is calculated, and the process returns.

次に、図13のフローチャートについて説明する。
ステップS11−1−1 フリーランカウンタ42を参照する。
ステップS11−1−2 ハードウェアを使用して第1のデータサイズの2値イメージデータを圧縮する。
ステップS11−1−3 フリーランカウンタ42を参照し、リターンする。
Next, the flowchart of FIG. 13 will be described.
Step S11-1-1: Refer to the free-run counter 42.
Step S11-1-2: Binary image data having the first data size is compressed using hardware.
Step S11-1-3 Refers to the free-run counter 42 and returns.

次に、図14のフローチャートについて説明する。
ステップS11−2−1 フリーランカウンタ42を参照する。
ステップS11−2−2 ハードウェアを使用して第2のデータサイズの2値イメージデータを圧縮する。
ステップS11−2−3 フリーランカウンタ42を参照し、リターンする。
Next, the flowchart of FIG. 14 will be described.
Step S11-2-1: Refer to the free-run counter 42.
Step S11-2-2: Binary image data having the second data size is compressed using hardware.
Step S11-2-3: The free-run counter 42 is referred to and the process returns.

次に、図15のフローチャートについて説明する。
ステップS11−3−1 フリーランカウンタ42を参照する。
ステップS11−3−2 ソフトウェアを使用して第1のデータサイズの2値イメージデータを圧縮する。
ステップS11−3−3 フリーランカウンタ42を参照し、リターンする。
Next, the flowchart of FIG. 15 will be described.
Step S11-3-1: Refer to the free-run counter 42.
Step S11-3-2: Binary image data having the first data size is compressed using software.
Step S11-3-3: Refer to the free-run counter 42 and return.

次に、図16のフローチャートについて説明する。
ステップS11−4−1 フリーランカウンタ42を参照する。
ステップS11−4−2 ソフトウェアを使用して第2のデータサイズの2値イメージデータを圧縮する。
ステップS11−4−3 フリーランカウンタ42を参照し、リターンする。
Next, the flowchart of FIG. 16 will be described.
Step S11-4-1: Refer to the free-run counter 42.
Step S11-4-2: Binary image data having the second data size is compressed using software.
Step S11-4-3 Refer to the free-run counter 42 and return.

次に、図17のフローチャートについて説明する。
ステップS14−1 動作指定が自動指定であるかどうかを判断する。動作指定が自動指定である場合はステップS14−5に、自動指定でない場合はステップS14−2に進む。
ステップS14−2 動作指定がハードウェア指定であるかどうかを判断する。動作指定がハードウェア指定である場合はステップS14−3に、ハードウェア指定でない場合はステップS14−4に進む。
ステップS14−3 ハードウェア圧縮処理を行い、リターンする。
ステップS14−4 ソフトウェア圧縮処理を行い、リターンする。
ステップS14−5 データサイズが閾値より大きいかどうかを判断する。データサイズが閾値より大きい場合はステップS14−6に、データサイズが閾値以下である場合はステップS14−7に進む。
ステップS14−6 ハードウェア圧縮処理を行い、リターンする。
ステップS14−7 ソフトウェア圧縮処理を行い、リターンする。
Next, the flowchart of FIG. 17 will be described.
Step S14-1: It is determined whether or not the operation designation is automatic designation. If the operation designation is automatic designation, the process proceeds to step S14-5. If the action designation is not automatic designation, the process proceeds to step S14-2.
Step S14-2: It is determined whether the operation designation is hardware designation. If the operation designation is hardware designation, the process proceeds to step S14-3. If the operation designation is not hardware designation, the process proceeds to step S14-4.
Step S14-3: Perform hardware compression processing and return.
Step S14-4: Perform software compression processing and return.
Step S14-5: It is determined whether the data size is larger than a threshold value. If the data size is larger than the threshold, the process proceeds to step S14-6. If the data size is equal to or smaller than the threshold, the process proceeds to step S14-7.
Step S14-6: Perform hardware compression processing and return.
Step S14-7 Performs software compression processing and returns.

前記各実施の形態においては、多値イメージデータの2値化処理、及び2値イメージデータの圧縮処理について説明しているが、カラーマッチング処理、拡大処理、縮小処理等のイメージデータに対する各種の画像処理に適用することができる。   In each of the above embodiments, binarization processing of multi-value image data and compression processing of binary image data have been described. However, various images for image data such as color matching processing, enlargement processing, and reduction processing are described. It can be applied to processing.

また、各実施の形態においては、サンプルデータとしてデータサイズの異なる二つの多値イメージデータに基づいて初期化処理を行うようになっているが、各データサイズごとに、複数の多値イメージデータを使用し、処理時間の平均値を算出したり、閾値の平均値を算出したりすることができる。この場合、写真画像、テキスト、グラフィック等のデータの種類ごとに多値イメージデータを選択することができる。例えば、使用されるページプリンタが、主として写真画像を印刷するために使用される場合には、写真画像の多値イメージデータをサンプルデータとして使用することができる。   In each embodiment, the initialization processing is performed based on two multi-value image data having different data sizes as sample data. However, a plurality of multi-value image data is obtained for each data size. It is possible to calculate the average value of the processing times or the average value of the threshold values. In this case, multi-value image data can be selected for each type of data such as photographic images, texts, graphics, and the like. For example, when the used page printer is mainly used for printing a photographic image, multivalued image data of the photographic image can be used as sample data.

なお、本発明は前記実施の形態に限定されるものではなく、本発明の趣旨に基づいて種々変形させることが可能であり、それらを本発明の範囲から排除するものではない。   In addition, this invention is not limited to the said embodiment, It can change variously based on the meaning of this invention, and does not exclude them from the scope of the present invention.

本発明の第1の実施の形態におけるページプリンタのブロック図である。1 is a block diagram of a page printer according to a first embodiment of the present invention. 本発明の第1の実施の形態におけるページプリンタの動作を示すメインフローチャートである。It is a main flowchart which shows operation | movement of the page printer in the 1st Embodiment of this invention. 本発明の第1の実施の形態における初期化処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the initialization process in the 1st Embodiment of this invention. 本発明の第1の実施の形態における第1の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 1st time measurement process in the 1st Embodiment of this invention. 本発明の第1の実施の形態における第2の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 2nd time measurement process in the 1st Embodiment of this invention. 本発明の第1の実施の形態における第3の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 3rd time measurement process in the 1st Embodiment of this invention. 本発明の第1の実施の形態における第4の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 4th time measurement process in the 1st Embodiment of this invention. 本発明の第1の実施の形態におけるイメージデータ処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the image data process in the 1st Embodiment of this invention. 本発明の第1の実施の形態における閾値の設定方法を示す図である。It is a figure which shows the setting method of the threshold value in the 1st Embodiment of this invention. 本発明の第2の実施の形態におけるページプリンタのブロック図である。It is a block diagram of the page printer in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるページプリンタの動作を示すメインフローチャートである。It is a main flowchart which shows operation | movement of the page printer in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における初期化処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the initialization process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における第1の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 1st time measurement process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における第2の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 2nd time measurement process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における第3の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 3rd time measurement process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態における第4の時間測定処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the 4th time measurement process in the 2nd Embodiment of this invention. 本発明の第2の実施の形態におけるイメージデータ圧縮処理のサブルーチンを示す図である。It is a figure which shows the subroutine of the image data compression process in the 2nd Embodiment of this invention.

符号の説明Explanation of symbols

13 イメージデータ処理部
16 ハードウェア2値化処理部
17 ソフトウェア2値化処理部
31 イメージデータ圧縮処理部
34 ハードウェア圧縮処理部
35 ソフトウェア圧縮処理部
13 Image data processing unit 16 Hardware binarization processing unit 17 Software binarization processing unit 31 Image data compression processing unit 34 Hardware compression processing unit 35 Software compression processing unit

Claims (8)

(a)ハードウェアを使用してデータを処理するハードウェア処理部と、
(b)ソフトウェアを使用してデータを処理するソフトウェア処理部と、
(c)処理するデータのデータサイズと、あらかじめハードウェア及びソフトウェアを使用して設定された所定の閾値とを比較するデータサイズ比較処理手段と、
(d)該データサイズ比較処理手段による比較結果に基づいて、前記ハードウェア処理部及びソフトウェア処理部のうちの一方を選択する処理部選択処理手段とを有することを特徴とするデータ処理装置。
(A) a hardware processing unit that processes data using hardware;
(B) a software processing unit for processing data using software;
(C) data size comparison processing means for comparing the data size of the data to be processed with a predetermined threshold value set in advance using hardware and software;
(D) A data processing apparatus comprising: a processing unit selection processing unit that selects one of the hardware processing unit and the software processing unit based on a comparison result by the data size comparison processing unit.
前記データの処理は2値化処理である請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the data processing is binarization processing. 前記データの処理は圧縮処理である請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the data processing is compression processing. 前記閾値は、装置の電源が投入されるごとに設定される請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the threshold is set every time the apparatus is turned on. 前記閾値は、装置にオプションが装着されるごとに設定される請求項1に記載のデータ処理装置。   The data processing apparatus according to claim 1, wherein the threshold is set every time an option is installed in the apparatus. 前記閾値は、前記ハードウェア処理部及びソフトウェア処理部においてそれぞれサンプルデータを処理したときの処理時間に基づいて設定される請求項4又は5に記載のデータ処理装置。   The data processing apparatus according to claim 4, wherein the threshold is set based on a processing time when sample data is processed in each of the hardware processing unit and the software processing unit. 前記閾値は、複数のサンプルデータについて測定された処理時間に基づいて設定される請求項6に記載のデータ処理装置。   The data processing apparatus according to claim 6, wherein the threshold is set based on a processing time measured for a plurality of sample data. 前記閾値は、各サンプルデータについて測定された処理時間の平均値に基づいて設定される請求項7に記載のデータ処理装置。
The data processing apparatus according to claim 7, wherein the threshold is set based on an average value of processing times measured for each sample data.
JP2004189462A 2004-06-28 2004-06-28 Data processor Withdrawn JP2006007638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004189462A JP2006007638A (en) 2004-06-28 2004-06-28 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004189462A JP2006007638A (en) 2004-06-28 2004-06-28 Data processor

Publications (1)

Publication Number Publication Date
JP2006007638A true JP2006007638A (en) 2006-01-12

Family

ID=35775404

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004189462A Withdrawn JP2006007638A (en) 2004-06-28 2004-06-28 Data processor

Country Status (1)

Country Link
JP (1) JP2006007638A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009015507A (en) * 2007-07-03 2009-01-22 Canon Inc Data processor and method for controlling data processor, and program and recording medium
JP2010045764A (en) * 2008-06-18 2010-02-25 Ricoh Co Ltd Control unit and method of controlling the same
US8041842B2 (en) 2006-09-19 2011-10-18 Seiko Epson Corporation Printing device and logic packet processing method
US8271767B2 (en) 2007-06-29 2012-09-18 Kabushiki Kaisha Toshiba Controlling arithmetic processing according to asynchronous and synchronous modes based upon data size threshold

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8041842B2 (en) 2006-09-19 2011-10-18 Seiko Epson Corporation Printing device and logic packet processing method
US8271767B2 (en) 2007-06-29 2012-09-18 Kabushiki Kaisha Toshiba Controlling arithmetic processing according to asynchronous and synchronous modes based upon data size threshold
JP2009015507A (en) * 2007-07-03 2009-01-22 Canon Inc Data processor and method for controlling data processor, and program and recording medium
JP2010045764A (en) * 2008-06-18 2010-02-25 Ricoh Co Ltd Control unit and method of controlling the same

Similar Documents

Publication Publication Date Title
JP2007183742A (en) Image processor, image processing method and computer program
JP2009116400A (en) Information processing apparatus and information processing method
JP2009032299A (en) Document image processing method, document image processor, document image processing program, and storage medium
JP2002142084A (en) Image reader
CN101256630B (en) Denoising apparatus and method for improving document image binaryzation performance
US20120144304A1 (en) System and method for reducing artifacts in images
US8554003B2 (en) Image data processing apparatus, image data processing method, and computer readable medium
JP2006007638A (en) Data processor
US5900948A (en) Image processing apparatus and method
JPH10294862A (en) Image processor
JP2006011967A (en) Character recognition device and character recognition program
JP2007086956A (en) Image processor, image processing method and computer program
US10360471B2 (en) Image retrieving device, image retrieving method, and recording medium
JP2008042545A (en) Image processing apparatus and its program
US10970817B2 (en) Image magnifying apparatus
JP5325744B2 (en) Image processing apparatus and image processing program
JP2009164897A (en) Binarizing device and binarization processing program
US10803368B2 (en) Image decompressing apparatus, control method thereof, and non-transitory computer-readable storage medium
EP2061003B1 (en) Method of embedding information into image
JP4052500B2 (en) Character detection device
JP2007166138A (en) Computer program, image input device, image input system, and image input method
JP2003189090A (en) Image processing apparatus and method, image processing program and storage medium
JP3080937B2 (en) JBIG encoding method and recording medium recording JBIG program
JP6226206B2 (en) Image processing apparatus, image processing method, and image processing program
JP2005311992A (en) Image processing apparatus, image processing method, storage medium, and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070904