JP2013121154A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2013121154A
JP2013121154A JP2011269530A JP2011269530A JP2013121154A JP 2013121154 A JP2013121154 A JP 2013121154A JP 2011269530 A JP2011269530 A JP 2011269530A JP 2011269530 A JP2011269530 A JP 2011269530A JP 2013121154 A JP2013121154 A JP 2013121154A
Authority
JP
Japan
Prior art keywords
data
attribute information
encoding
image
flag
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
JP2011269530A
Other languages
Japanese (ja)
Inventor
Naoto Yamada
直人 山田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2011269530A priority Critical patent/JP2013121154A/en
Publication of JP2013121154A publication Critical patent/JP2013121154A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To solve a problem that, in the case that a code amount exceeds an allowable range in encoding of attribute information related to each pixel, because a part of information is converted and encoded independently of characteristics of each attribute flag to improve a compression rate, reversibility is lost even in data that can maintain reversibility, and an effect of image processing based on the attribute information cannot be obtained.SOLUTION: By arranging for each attribute flag, encoding, and changing an encoding method of each attribute flag on the basis of a code amount of each attribute flag group, encoding with the minimum loss in reversibility can be executed.

Description

本発明は、画像データを前記画像データに付随する一定符号量以内に圧縮符号化するための機能を有する画像処理装置に関するものである。   The present invention relates to an image processing apparatus having a function for compressing and encoding image data within a predetermined code amount accompanying the image data.

従来,静止画像の圧縮方式には,離散コサイン変換を利用したJPEG方式や,Wavelet変換を利用した方式が多く使われている.この種の符号化方式は,可変長符号化方式であるので,符号化対象の画像毎に符号量が変化する。   Conventionally, the JPEG method using discrete cosine transform and the method using Wavelet transform are often used as still image compression methods. Since this type of encoding method is a variable length encoding method, the amount of code changes for each image to be encoded.

国際標準化方式であるJPEG方式では,画像に対して1組の量子化マトリクスしか定義できないので、プリスキャン無しには、符号量調整が行なえず、限られたメモリに記憶するシステムで使用する場合においては、メモリオーバーを起こす可能性があった。   In the JPEG method, which is an international standardization method, only one set of quantization matrices can be defined for an image. Therefore, without pre-scanning, the code amount cannot be adjusted and used in a system that stores in a limited memory. Could cause memory over.

これを防止するために、予定した符号量よりオーバーした場合は、圧縮率を変更して、原稿の再読み込みを行なう方法や、予めプリスキャンによる符号量見積もりを行ない、符号量を調整するために,量子化パラメータの再設定を行なう方法などがとられていた。   In order to prevent this, in order to adjust the code amount by changing the compression rate and re-reading the original when the code amount exceeds the planned code amount, or by estimating the code amount by pre-scanning in advance , The method of resetting the quantization parameter was taken.

一方、画像情報には、元の画像データ以外に、該画像データに付随する属性情報というものがある。属性情報は主に、画像出力時の見栄えを良くするために、画像出力部での色処理や階調数の調整に用いられる。有彩色と無彩色が混在する自然画像と、原稿中に多く見られる黒文字とでは、同じ黒色でも使用するインクの種類を変えることで、自然画像を自然画像らしく見せる一方で、鮮明な文字を出力することが出来る。   On the other hand, image information includes attribute information associated with the image data in addition to the original image data. The attribute information is mainly used for color processing in the image output unit and adjustment of the number of gradations in order to improve the appearance at the time of image output. For natural images that contain both chromatic and achromatic colors and black characters that are often found in the original, changing the type of ink used in the same black makes the natural image look like a natural image while outputting clear characters. I can do it.

このように、画素毎に、有彩色か無彩色、文字部かそうでないか、といった各々1ビットの属性フラグデータを持つことにより、画像出力時、特にプリントアウト時に出力画像の画質向上を図ることが出来る。属性情報には前記以外の他の情報もある。   As described above, each pixel has 1-bit attribute flag data indicating whether it is a chromatic color or an achromatic color and whether it is a character portion, thereby improving the image quality of the output image at the time of image output, particularly at the time of printout. I can do it. The attribute information includes information other than the above.

画像情報を圧縮するには、画像データの圧縮はもちろんのこと、上記属性情報も圧縮する必要がある。属性情報は2値データの集まりであり、これを圧縮するには基本的に可逆の符号化方式を用いる必要がある。従来、属性情報の圧縮にはPackbitsやJBIG符号化方式が用いられてきた。   In order to compress the image information, it is necessary to compress the attribute information as well as the image data. The attribute information is a collection of binary data, and in order to compress it, it is basically necessary to use a reversible encoding method. Conventionally, Packbits and JBIG encoding methods have been used for compression of attribute information.

ここで前記属性情報をこれらの符号化方式で圧縮するだけでは、場合により符号化する前の符号量より大きくなる場合などが発生し、符号量調整を行なえず、限られたメモリに記憶するシステムで使用する場合においては、メモリオーバーを起こす可能性があり、大きな問題であった。   Here, if the attribute information is simply compressed by these encoding methods, the code amount may be larger than the code amount before encoding, and the code amount cannot be adjusted and stored in a limited memory. In the case of using it in the memory, there is a possibility that the memory is over, which is a big problem.

この問題について、最初の符号化工程において符号量が大きい場合には、属性情報を一部固定するように変換し、再圧縮工程を行うことで圧縮率を高めてメモリオーバーを回避するものがある(例えば、特許文献1参照)。   With respect to this problem, when the code amount is large in the first encoding step, there is a method that converts the attribute information to be partially fixed and increases the compression rate by performing the recompression step to avoid memory over. (For example, refer to Patent Document 1).

特許第3840076号明細書Japanese Patent No. 3840076

しかしながら先行技術のように、すべての属性情報の符号量がある許容量を超えた場合に属性フラグを一部固定するように変換する手法では、本来、属性フラグ毎に圧縮率が異なり各属性フラグデータの圧縮方法を制御することで可逆性の維持が可能なデータにおいても可逆性を失うことになる。その結果、各属性フラグに基づいて像域分離していた領域を同一としてみなし、画像処理を行うことになる。よって像域分離を行うことで画質向上を期待していた処理が行えず、再符号化動作が発生した場合には、本来の像域分離により望まれる画質向上が望めないという課題があった。   However, as in the prior art, in the method of converting so that the attribute flag is partially fixed when the code amount of all the attribute information exceeds a certain allowable amount, the compression rate is originally different for each attribute flag. By controlling the data compression method, the reversibility is lost even in data that can maintain reversibility. As a result, the areas that have been separated based on the attribute flags are regarded as the same, and image processing is performed. Therefore, when the image area separation is performed, the processing expected to improve the image quality cannot be performed, and when a re-encoding operation occurs, there is a problem that the desired image quality improvement cannot be expected by the original image area separation.

多値画像データの各画素の属性情報(305~311)を入力し、圧縮符号化する画像処理装置(100)であって、画像情報を任意の画素ブロックに分割する分割手段(131、132)と、前記画素ブロックの各画素に対応する属性情報を属性情報毎にまとめて配列する属性情報配列手段(601、602)と、配列された属性情報群にて可逆符号化する符号化手段(605)と、前記符号化手段で得られる各属性情報群の符号化データ量を監視し、前記各属性情報群の符号化データ量が所定基準を満たしたか否かを判断する符号量監視手段(606)とを備え、前記符号量監視手段において各属性情報群の全ての符号化データ量が第1の基準を満たした場合には、各属性情報群のそれぞれが第2の基準を満たしているか否かを判断し、基準を満たしている対象の属性情報群に対して条件を変更して符号化することを特徴とする画像処理装置。   An image processing apparatus (100) for inputting attribute information (305 to 311) of each pixel of multi-valued image data and compressing and encoding the dividing means (131, 132) for dividing the image information into arbitrary pixel blocks Attribute information arrangement means (601, 602) for arranging attribute information corresponding to each pixel of the pixel block for each attribute information, and encoding means (605) for lossless encoding using the arranged attribute information group ) And the amount of encoded data of each attribute information group obtained by the encoding means, and a code amount monitoring means (606) for determining whether or not the amount of encoded data of each attribute information group satisfies a predetermined standard ), And if all the encoded data amounts of each attribute information group satisfy the first criterion in the code amount monitoring means, whether each of the attribute information groups satisfies the second criterion Judgment and criteria The image processing apparatus characterized by encoding by changing the conditions for the attribute information group for which meets.

画素ブロック毎の属性情報を属性情報毎にてまとめて配列、符号化し、さらに画素ブロック毎の全ての属性情報の符号化データ量を監視し、属性情報の全ての符号化データ量が所定の符号化データ量を超えた場合には各属性情報群の符号化データ量をそれぞれ確認する。これにより符号化前データ量より大きくなった属性情報群には符号化しないでそのまま出力することにより、属性情報毎に符号化データを分離でき、圧縮率の高い属性情報群には従来の可逆符号化技術を利用しながらも、可逆符号化の特性でもある符号化後のデータ量が符号化前よりも大きくなるような属性情報群には符号化しないで可逆性を保つことで属性情報を利用した画像処理が可能となり、本来の画質向上が望めるものである。   Attribute information for each pixel block is arranged and encoded together for each attribute information, and the encoded data amount of all attribute information for each pixel block is monitored, and all encoded data amounts of attribute information are predetermined codes. When the encoded data amount is exceeded, the encoded data amount of each attribute information group is confirmed. As a result, by outputting the attribute information group that is larger than the pre-encoding data amount without encoding, the encoded data can be separated for each attribute information. Attribute information is used by maintaining reversibility without encoding into attribute information groups that have a larger amount of data after encoding, which is also a characteristic of lossless encoding, while using encoding technology. Therefore, it is possible to improve the original image quality.

本実施の形態に係る画像処理システムの全体構成を示すブロック図である。1 is a block diagram showing an overall configuration of an image processing system according to the present embodiment. 本実施の形態に係るソフトウェアモジュールを示すブロック図である。It is a block diagram which shows the software module which concerns on this Embodiment. 本実施の形態に係る1画素のデータ構成を示す一例である。It is an example which shows the data structure of 1 pixel which concerns on this Embodiment. 本実施の形態に係るパケットデータを示す構成図である。It is a block diagram which shows the packet data which concern on this Embodiment. 本実施の形態に係る画像圧縮部103の内部ブロック図である。It is an internal block diagram of the image compression part 103 which concerns on this Embodiment. 本実施の形態に係る属性フラグ用符号化部505の内部ブロック図である。It is an internal block diagram of the attribute flag encoding unit 505 according to the present embodiment. 本実施の形態に係る符号量演算部606の内部ブロック図である。It is an internal block diagram of the code amount calculating part 606 which concerns on this Embodiment. 本実施の形態に係る属性フラグデータの符号化動作のフローチャートである。It is a flowchart of the encoding operation | movement of the attribute flag data which concerns on this Embodiment.

以下、本発明を実施するための最良の形態について図面を用いて説明する。   The best mode for carrying out the present invention will be described below with reference to the drawings.

[実施例]
図1は、本実施形態に係る画像処理システムの全体構成を示すブロック図である。図1において、画像形成装置100は、画像入力デバイスであるスキャナ101やデータを受信、処理されたデータにプリンタ側の画像処理を行うためのプリンタ画像処理部119を介して画像出力デバイスであるプリンタエンジン102が内部で接続されている。そして画像データの読み取りやプリント出力のための制御を行う。また、画像形成装置100は、LAN10や公衆回線104と接続することで、画像情報やデバイス情報をLAN10経由で入出力するための制御を行う。
[Example]
FIG. 1 is a block diagram showing the overall configuration of the image processing system according to the present embodiment. In FIG. 1, an image forming apparatus 100 receives a scanner 101 that is an image input device and a printer that is an image output device via a printer image processing unit 119 that performs image processing on the printer side for received and processed data. An engine 102 is connected internally. Then, control for reading image data and printing is performed. Further, the image forming apparatus 100 is connected to the LAN 10 or the public line 104 to perform control for inputting / outputting image information and device information via the LAN 10.

CPU105は画像形成装置100を制御するための中央処理装置である。RAM106は、CPU105が動作するためのシステムワークメモリであり、入力された画像データを一時記憶するための画像メモリでもある。さらに、ROM107はブートROMであり、システムのブートプログラムが格納されている。HDD108はハードディスクドライブであり、各種処理のためのシステムソフトウェア及び入力された画像データ等を格納する。操作部I/F109は、画像データ等を表示可能な表示画面を有する操作部110に対するインタフェース部であり、操作部110に対して操作画面データを出力する。また、操作部I/F109は、操作部110から操作者が入力した情報をCPU105に伝える役割をする。ネットワークI/F111は、例えばLANカード等で実現され、LAN10に接続して外部装置との間で情報の入出力を行う。さらにまた、モデム112は公衆回線104に接続し、外部装置との間で情報の入出力を行う。以上のユニットがシステムバス113上に配置されている。   A CPU 105 is a central processing unit for controlling the image forming apparatus 100. A RAM 106 is a system work memory for the CPU 105 to operate, and is also an image memory for temporarily storing input image data. A ROM 107 is a boot ROM that stores a system boot program. An HDD 108 is a hard disk drive, and stores system software for various processes, input image data, and the like. The operation unit I / F 109 is an interface unit for the operation unit 110 having a display screen capable of displaying image data and the like, and outputs operation screen data to the operation unit 110. The operation unit I / F 109 serves to transmit information input by the operator from the operation unit 110 to the CPU 105. The network I / F 111 is realized by a LAN card, for example, and is connected to the LAN 10 to input / output information to / from an external device. Furthermore, the modem 112 is connected to the public line 104 and inputs / outputs information to / from an external device. The above units are arranged on the system bus 113.

イメージバスI/F114は、システムバス113と画像データを高速で転送する画像バス115とを接続するためのインタフェースであり、データ構造を変換するバスブリッジである。そして、画像バス115上には、以下で詳述するRIP用パケット生成部131とそれを介してラスタイメージプロセッサ(RIP)部116、デバイスI/F117、スキャナ画像処理部118、画像編集用画像処理部120、画像圧縮部103、画像伸張部121、カラーマネージメントモジュール(CMM)130が接続される。   The image bus I / F 114 is an interface for connecting the system bus 113 and an image bus 115 that transfers image data at high speed, and is a bus bridge that converts a data structure. On the image bus 115, a RIP packet generation unit 131, which will be described in detail below, and a raster image processor (RIP) unit 116, a device I / F 117, a scanner image processing unit 118, and image processing for image editing are provided. A unit 120, an image compression unit 103, an image expansion unit 121, and a color management module (CMM) 130 are connected.

ラスタイメージプロセッサ(RIP)部116は、ページ記述言語(PDL)コードをビットマップの画像データに展開する。RIP用パケット生成部131はRIP部116より出力されたビットマップの画像データを所定のサイズの矩形タイルに分割し、さらにヘッダ等を加え、後述するフォーマットに変換してパケットとして出力するものである。デバイスI/F117は、スキャナ画像処理部118とプリンタ画像処理部119を介してスキャナ101やプリンタエンジン102とを接続し、画像データの同期系/非同期系の変換を行う。   A raster image processor (RIP) unit 116 expands a page description language (PDL) code into bitmap image data. The RIP packet generation unit 131 divides the bitmap image data output from the RIP unit 116 into rectangular tiles of a predetermined size, adds a header or the like, converts the data into a format described later, and outputs the packet as a packet. . The device I / F 117 connects the scanner 101 and the printer engine 102 via the scanner image processing unit 118 and the printer image processing unit 119, and performs synchronous / asynchronous conversion of image data.

また、スキャナ画像処理部118は、スキャナ101からスキャン用パケット生成部132にてヘッダ等を加え、所定のフォーマットに変換し、パケット化した入力画像データに対して、補正、加工、編集等の各種処理を行う。画像編集用画像処理部120は、画像データの回転や、変倍、色処理、トリミング・マスキング、2値変換、多値変換、白紙判定等の各種画像処理を行う。画像圧縮部103はRIP部116やスキャナ画像処理部118、画像編集用画像処理部120で処理された画像データをHDD108で一度格納する際に所定の圧縮方式で符号化するものである。画像伸張部121はHDD108で圧縮されている画像データを必要に応じて画像編集用画像処理部120での処理や、プリンタ画像処理部119で画像処理し、プリンタエンジン102で出力する場合において、一度圧縮され符号化されているデータを、複号化し伸張するものである。   The scanner image processing unit 118 adds a header or the like from the scanner 101 to the scan packet generation unit 132, converts it to a predetermined format, and performs various corrections, processing, editing, and the like on the packetized input image data. Process. The image editing image processing unit 120 performs various types of image processing such as image data rotation, scaling, color processing, trimming / masking, binary conversion, multi-value conversion, and blank page determination. The image compression unit 103 encodes image data processed by the RIP unit 116, the scanner image processing unit 118, and the image editing image processing unit 120 by a predetermined compression method when the HDD 108 stores the image data once. The image decompression unit 121 once processes the image data compressed by the HDD 108 in the image editing image processing unit 120 or the image processing by the printer image processing unit 119 as necessary, and outputs it by the printer engine 102. Data that has been compressed and encoded is decoded and expanded.

プリンタ画像処理部119は、プリント出力する画像データに対して、プリンタエンジンに応じた画像処理補正や、本発明に関わるトナー制御のためにビデオデータのカウント処理等を行う。CMM130は、画像データに対して、プロファイルやキャリブレーションデータに基づいた、色変換処理(色空間変換処理ともいう)を施す専用ハードウェアモジュールである。プロファイルとは、機器に依存した色空間で表現したカラー画像データを機器に依存しない色空間(例えばLabなど)に変換するための関数のような情報である。キャリブレーションデータは、スキャナ101やプリンタエンジン102の色再現特性を修正するためのデータである。   The printer image processing unit 119 performs image processing correction corresponding to the printer engine and video data count processing for toner control according to the present invention on image data to be printed out. The CMM 130 is a dedicated hardware module that performs color conversion processing (also referred to as color space conversion processing) on image data based on a profile or calibration data. A profile is information such as a function for converting color image data expressed in a device-dependent color space into a device-independent color space (eg, Lab). The calibration data is data for correcting the color reproduction characteristics of the scanner 101 and the printer engine 102.

図2で示される各ソフトウェアモジュールは主にCPU105上で動作する。   Each software module shown in FIG. 2 mainly operates on the CPU 105.

図2に示すジョブコントロール処理201は図示/不図示の各ソフトウェアモジュールを統括・制御し、コピー、プリント、スキャン、FAX送受信などの図示しない画像形成装置100内で発生するあらゆるジョブの制御を行う。   A job control process 201 shown in FIG. 2 controls and controls each software module (not shown), and controls all jobs generated in the image forming apparatus 100 (not shown) such as copying, printing, scanning, and FAX transmission / reception.

ネットワーク処理202は、主にネットワークI/F111を介して行われる、外部との通信を制御するモジュールであり、LAN10上の各機器との通信制御を行う。ネットワーク処理202はLAN10の各機器からの制御コマンドやデータを受信すると、その内容を、ジョブコントロール処理201へ通知する。また、ジョブコントロール処理201からの指示に基づき、LAN10の各機器へ制御コマンドやデータの送信を行う。   The network processing 202 is a module that controls communication with the outside, which is mainly performed via the network I / F 111, and performs communication control with each device on the LAN 10. When the network process 202 receives a control command or data from each device of the LAN 10, it notifies the job control process 201 of the contents. Also, based on an instruction from the job control process 201, a control command and data are transmitted to each device of the LAN 10.

UI処理203は、主に操作部110、操作部I/F109に係る制御をおこなう。操作者が操作部110を操作した内容を、ジョブコントロール処理201へ通知すると共に、ジョブコントロール処理201からの指示に基づいて、操作部110上の表示画面の表示内容を制御する。   The UI process 203 mainly performs control related to the operation unit 110 and the operation unit I / F 109. The content of the operation of the operation unit 110 by the operator is notified to the job control process 201, and the display content of the display screen on the operation unit 110 is controlled based on an instruction from the job control process 201.

FAX処理204は、FAX機能の制御をおこなう。FAX処理204は、モデム112を介してFAX受信を行い、FAX画像特有の画像処理を施した後、受信画像をジョブコントロール処理201へ通知する。また、ジョブコントロール処理201からの指定される画像を、指定通知先へFAX送信を行う。   The FAX process 204 controls the FAX function. The FAX processing 204 performs FAX reception via the modem 112, performs image processing unique to the FAX image, and notifies the job control processing 201 of the received image. Also, the designated image from the job control process 201 is faxed to the designated notification destination.

プリント処理207は、ジョブコントロール処理201の指示に基づいて、画像編集用画像処理部120、プリンタ画像処理部119およびプリンタエンジン102を制御し、指定画像の印刷処理を行う。プリント処理207は、ジョブコントロール処理201より、画像データ、画像情報(画像データのサイズ、カラーモード、解像度など)、レイアウト情報(オフセット、拡大縮小、面つけなど)および出力用紙情報(サイズ、印字方向など)の情報を受け付ける。そして、画像圧縮部103、画像伸張部121、画像編集用画像処理部120およびプリンタ画像処理部119を制御して、画像データに対して適切な画像処理を施し、プリンタエンジン102を制御して指定用紙への印刷を行わせる。   The print processing 207 controls the image editing image processing unit 120, the printer image processing unit 119, and the printer engine 102 based on an instruction from the job control processing 201, and performs a specified image printing process. The print processing 207 receives image data, image information (image data size, color mode, resolution, etc.), layout information (offset, enlargement / reduction, imposition, etc.) and output paper information (size, print direction) from the job control processing 201. Etc.). Then, the image compression unit 103, the image expansion unit 121, the image editing image processing unit 120, and the printer image processing unit 119 are controlled to perform appropriate image processing on the image data, and the printer engine 102 is controlled and designated. Lets you print on paper.

スキャン処理210は、ジョブコントロール処理201の指示に基づいて、スキャナ101、およびスキャナ画像処理118を制御して、スキャナ101上にある原稿の読み込みを行わせる。ジョブコントロール処理201の指示には、カラーモードが含まれており、スキャン処理210ではカラーモードに応じた処理が行われる。すなわち、カラーモードがカラーであれば、原稿をカラー画像として入力し、カラーモードがモノクロであれば、原稿をモノクロ画像として入力する。また、カラーモードがAutoである場合には、プレスキャンなどにより原稿のカラー/モノクロ判定を行った後、判定結果に基づいた画像として再度原稿をスキャンして画像を入力する。スキャン処理210は、スキャナ101の原稿台にある原稿のスキャンを実行し、デジタルデータとして画像の入力を行う。入力した画像のカラー情報は、ジョブコントロール処理201へ通知される。さらに、スキャン処理210は入力画像に対し、スキャナ画像処理218を制御して画像の圧縮等、適切な画像処理を施した後、ジョブコントロール処理201へ画像処理済みの入力画像を通知する。   The scan process 210 controls the scanner 101 and the scanner image process 118 based on an instruction from the job control process 201 to read a document on the scanner 101. The instruction of the job control process 201 includes a color mode, and the scan process 210 performs a process according to the color mode. That is, if the color mode is color, the document is input as a color image, and if the color mode is monochrome, the document is input as a monochrome image. If the color mode is Auto, the color / monochrome determination of the document is performed by pre-scanning, and then the document is scanned again as an image based on the determination result and the image is input. A scan process 210 scans a document on a document table of the scanner 101 and inputs an image as digital data. The color information of the input image is notified to the job control process 201. Further, the scan processing 210 controls the scanner image processing 218 to perform appropriate image processing such as image compression on the input image, and then notifies the job control processing 201 of the input image that has undergone image processing.

色変換処理209は、ジョブコントロール処理201の指示に基づいて、指示画像に対して、色変換処理を行い、色変換処理後の画像をジョブコントロール処理201へ通知する。   The color conversion process 209 performs a color conversion process on the instruction image based on an instruction from the job control process 201 and notifies the job control process 201 of the image after the color conversion process.

ジョブコントロール処理201は、色変換処理209に対して、入力色空間情報、出力色空間情報および色変換を適用する画像を通知する。色変換処理209に通知された出力色空間が、入力機器に依存しない色空間(例えばLab空間)である場合には、入力機器に依存する入力色空間(例えば、RGB)からLabに変換するための情報である入力プロファイル情報があわせて通知される。この場合、色変換処理209は入力プロファイルより、入力色空間からLab空間へマッピングするルックアップテーブル(LUT)を作成し、このLUTを利用して入力画像の色変換を行う。   The job control process 201 notifies the color conversion process 209 of input color space information, output color space information, and an image to which color conversion is applied. When the output color space notified to the color conversion process 209 is a color space (for example, Lab space) that does not depend on the input device, the input color space (for example, RGB) that depends on the input device is converted to Lab. The input profile information, which is the information of, is also notified. In this case, the color conversion processing 209 creates a lookup table (LUT) that maps from the input color space to the Lab space from the input profile, and performs color conversion of the input image using this LUT.

また、色変換処理209に通知された入力色空間が、Lab空間である場合には、Lab空間から出力機器に依存する出力色空間に変換するための出力プロファイル情報があわせて通知される。この場合、色変換処理209は出力プロファイルより、Lab色空間から出力色空間へマッピングするLUTを作成し、このLUTを利用して入力画像の色変換を行う。   When the input color space notified to the color conversion process 209 is a Lab space, output profile information for conversion from the Lab space to an output color space depending on the output device is also notified. In this case, the color conversion processing 209 creates an LUT that maps from the Lab color space to the output color space from the output profile, and performs color conversion of the input image using the LUT.

また、色変換処理209に通知された入力色空間、出力色空間の双方が、デバイスに依存する色空間である場合には、入力プロファイルと出力プロファイルの双方が通知される。この場合、色変換処理209は入力プロファイルおよび出力プロファイルより、入力色空間から出力色空間へダイレクトにマッピングするLUTを作成し、このLUTを利用して入力画像の色変換を行う。   If both the input color space and the output color space notified to the color conversion processing 209 are device-dependent color spaces, both the input profile and the output profile are notified. In this case, the color conversion processing 209 creates an LUT that directly maps from the input color space to the output color space from the input profile and the output profile, and performs color conversion of the input image using the LUT.

色変換処理209では、CMM130が機器内にあれば、CMM130へ生成したLUTを設定することより、CMM130を利用して色変換を行う。一方、CMM130がない場合にはCPU205がソフト的に色変換処理を行う。   In the color conversion process 209, if the CMM 130 is in the device, color conversion is performed using the CMM 130 by setting the generated LUT in the CMM 130. On the other hand, when there is no CMM 130, the CPU 205 performs color conversion processing in software.

RIP処理211は、ジョブコントロール処理201の指示に基づいて、PDL(ページ記述言語)の解釈(インタプリット)を行い、RIP部116を制御してレンダリングすることで、ビットマップイメージへの展開を行う。   The RIP processing 211 interprets (interprets) a PDL (page description language) based on an instruction from the job control processing 201, controls the RIP unit 116, and renders it to develop a bitmap image. .

以上のような構成で、本画像処理システムがLAN10より印刷ジョブを受けて、画像データおよび関連する属性フラグデータの符号化動作を行いデータ圧縮し、HDD108に順次格納するまでの動作について詳細に説明する。   With the above configuration, the image processing system receives a print job from the LAN 10, encodes image data and related attribute flag data, compresses the data, and sequentially stores the data in the HDD 108. To do.

まず始めに、上述したように図示しないホストコンピュータよりLAN10を介して送信されてきたPDL(ページ記述原語)は、ネットワークI/F111にて受信し、イメージバスI/F114よりRIP部116へ入力される。PDLデータには、線画の描画コマンド、書体(フォント名)やサイズ、文字コード等で構成する文字描画コマンドが含まれる。RIP部116は送信されたPDL解釈(インタプリット)を行い、RIP部116にて処理できるコードデータへ変換し、それに基づいてレンダリングを実行する。   First, as described above, a PDL (page description original language) transmitted from a host computer (not shown) via the LAN 10 is received by the network I / F 111 and input to the RIP unit 116 from the image bus I / F 114. The The PDL data includes a line drawing command, a character drawing command composed of a typeface (font name) and size, a character code, and the like. The RIP unit 116 interprets (interprets) the transmitted PDL, converts it into code data that can be processed by the RIP unit 116, and executes rendering based on the code data.

このとき、レンダリング処理によって個々の画素の属性が判明するので、それを属性フラグとして、各画素データに付加する。   At this time, since the attribute of each pixel is determined by the rendering process, it is added to each pixel data as an attribute flag.

図3は1画素のデータ構成を示す一例である。本実施の形態ではR(レッド)、G(グリーン)、B(ブルー)の3原色の構成の画像データに、その画素の属性を示すフラグを属性フラグとして8ビットを付加したものを1画素としている。   FIG. 3 shows an example of the data structure of one pixel. In the present embodiment, one pixel is obtained by adding 8 bits using an attribute flag as a flag indicating the attribute of the pixel to image data of the three primary colors R (red), G (green), and B (blue). Yes.

305は文字/非文字を示す文字フラグ、306は有彩色/無彩色を示す有彩色フラグ、307は線画を示す線画フラグ、308はスキャンジョブであるか、PDLジョブであるかを示すジョブフラグ、309はフラット0、1の2ビットで写真やグラフィックなどフラットなオブジェクトの種類を示すフラットフラグ、その他必要に応じて処理1フラグ310、処理2フラグ311を割り当てたものである。   305 is a character flag indicating character / non-character, 306 is a chromatic color flag indicating chromatic / achromatic color, 307 is a line drawing flag indicating a line drawing, 308 is a job flag indicating whether it is a scan job or a PDL job, Reference numeral 309 denotes a flat flag indicating the type of a flat object such as a photograph or graphic with two bits of flat 0 and 1, and a processing 1 flag 310 and a processing 2 flag 311 as necessary.

次にRIP部116でレンダリングされ、属性フラグが付加された画像データはRIP用パケット生成部131で後述する矩形サイズにデータが分割され、さらに各画像データにヘッダデータを付加することにより成り立つパケットデータが生成される。   Next, the image data rendered by the RIP unit 116 and added with the attribute flag is divided into pieces of rectangular data, which will be described later, by the RIP packet generation unit 131, and further packet data is realized by adding header data to each image data. Is generated.

図4は本実施の形態におけるパケットデータを示す構成図である。   FIG. 4 is a configuration diagram showing packet data in the present embodiment.

パケットデータ全体の構成としてはヘッダデータ部401、画像データ部402、属性フラグデータ部403より成り立っている。   The entire packet data configuration includes a header data portion 401, an image data portion 402, and an attribute flag data portion 403.

ヘッダデータ部401は、ジョブファイルにおけるページ情報や、RGB、YMCK、YUVといったイメージのタイプの識別情報、符号化されたデータか、否かの識別情報、そのパケット自体のデータサイズなどがヘッダ情報として格納されているものである。   The header data portion 401 includes page information in the job file, identification information of image types such as RGB, YMCK, and YUV, identification information whether or not encoded data, and the data size of the packet itself as header information. It is stored.

画像データ部402は、画像データを任意の矩形サイズに分割したものをデータとしてパッキングしたものである。本実施の形態では図3で示したRGBの部分であり、矩形サイズとして32×32画素のデータが格納されているものである。   The image data unit 402 is obtained by packing image data divided into arbitrary rectangular sizes as data. In the present embodiment, it is the RGB portion shown in FIG. 3 and stores data of 32 × 32 pixels as a rectangular size.

また属性フラグデータ部403は先ほど説明したようにRIP部116にて画素ごとに付加された属性フラグ305〜311が格納されているものである。   The attribute flag data unit 403 stores the attribute flags 305 to 311 added for each pixel by the RIP unit 116 as described above.

このようにしてRIP用パケット生成部131にてパケット化されたパケットデータは次に画像バス115を介して画像圧縮部103にて圧縮符号化される。   The packet data packetized by the RIP packet generation unit 131 in this way is then compression encoded by the image compression unit 103 via the image bus 115.

図5は画像圧縮部103の構成を示すブロック図である。   FIG. 5 is a block diagram showing the configuration of the image compression unit 103.

入力されてきたパケットデータはパケットデータ分割部501にてヘッダデータ、画像データ、属性フラグデータにそれぞれ分割する。画像データは、画像データ用タイルバッファ502にて一度バッファリングされた後、画像データ用符号化部504で非可逆な圧縮方式(本実施の形態ではJPEG方式)で圧縮符号化される。JPEG圧縮方式であるので、最小の符号化ウィンドウサイズは8×8画素であるので、32×32画素タイルの場合、その中に4×4個(16個)の8×8画素が存在することになるので1タイルの符号化では8×8画素単位で画像データ用タイルバッファ502よりデータを読み出し、JPEG圧縮を16回行なうことになる。このようにして画像データ用符号化部504では32×32画素のタイル画像データに含まれる16個の8×8画素ウィンドウに対し周知のDCT(離散コサイン)変換を施して量子化する。そして、量子化後のデータに対してハフマン符号語を割り当て、画像データの符号化を終了する。   The input packet data is divided by the packet data dividing unit 501 into header data, image data, and attribute flag data. The image data is once buffered by the image data tile buffer 502 and then compressed and encoded by the image data encoding unit 504 using an irreversible compression method (JPEG method in the present embodiment). Since it is a JPEG compression method, the minimum encoding window size is 8x8 pixels, so in the case of a 32x32 pixel tile, there must be 4x4 (16) 8x8 pixels in it. Therefore, when encoding one tile, data is read from the image data tile buffer 502 in units of 8 × 8 pixels, and JPEG compression is performed 16 times. In this manner, the image data encoding unit 504 quantizes the 16 8 × 8 pixel windows included in the 32 × 32 pixel tile image data by performing known DCT (discrete cosine) transformation. Then, a Huffman code word is assigned to the quantized data, and the encoding of the image data is finished.

一方、属性フラグデータは属性フラグデータ用タイルバッファ503に一度バッファリングされた後、属性フラグデータ用符号化部505で可逆な圧縮方式(本実施の形態ではPackBits方式)で圧縮符号化される。   On the other hand, the attribute flag data is buffered once in the attribute flag data tile buffer 503 and then compressed and encoded by the attribute flag data encoding unit 505 using a lossless compression method (PackBits method in this embodiment).

図6は本実施の形態における属性フラグデータ用符号化部505の構成を示すブロック図である。   FIG. 6 is a block diagram showing the configuration of the attribute flag data encoding unit 505 in the present embodiment.

以下、属性フラグデータ用符号化部505における属性フラグデータの符号化のフローを図8のフローチャートを用いて説明する。   The attribute flag data encoding flow in the attribute flag data encoding unit 505 will be described below with reference to the flowchart of FIG.

入力された各画素8ビットで構成される属性フラグデータ(図中FlagDataIn[7:0])は属性情報分割部601にて各属性フラグに分割され、各属性フラグバッファ602[0]〜[6]へ入力される(S1001)。なお本実施の形態において属性フラグの種類は図3で説明したように7種類であり、それぞれ属性フラグバッファ602[0]〜[6]に画素順に格納されていく。また2ビットで1つのフラットオブジェクトの種類を示すフラットフラッグはフラットフラグ部分の2ビットずつを抽出し、対応する属性フラグバッファ602[4]へ格納される。よって本実施の形態では対応する属性フラグバッファ602[4]は他の属性フラグバッファより2倍の容量が必要となる。   The attribute flag data (FlagDataIn [7: 0] in the figure) composed of the input 8 bits of each pixel is divided into attribute flags by the attribute information dividing unit 601 and each attribute flag buffer 602 [0] to [6]. ] (S1001). In this embodiment, there are seven types of attribute flags as described with reference to FIG. 3, and the attribute flags are stored in the attribute flag buffers 602 [0] to [6] in pixel order. A flat flag indicating the type of one flat object with 2 bits is extracted for each 2 bits of the flat flag portion, and stored in the corresponding attribute flag buffer 602 [4]. Therefore, in the present embodiment, the corresponding attribute flag buffer 602 [4] requires twice as much capacity as other attribute flag buffers.

属性フラッグバッファ602[0]〜[6]に全ての属性フラグデータが格納された後、まず始めに属性フラグバッファリード制御部603にて属性フラグバッファ602[0]から順次属性フラグデータを読み出していく。本実施の形態では属性フラグバッファ602[0]〜[6]の順に属性フラグデータを読み出すので、次段の可逆圧縮部605には1パケット分の文字フラグデータ、有彩色フラグデータ、線画フラグデータ、ジョブフラグデータ、フラットフラグデータ、処理1フラグデータ、処理2フラグデータの順に入力され符号化されていく(S1002)。   After all the attribute flag data is stored in the attribute flag buffer 602 [0] to [6], the attribute flag buffer read control unit 603 first reads the attribute flag data sequentially from the attribute flag buffer 602 [0]. Go. In this embodiment, the attribute flag data is read in the order of the attribute flag buffer 602 [0] to [6], so that the next-stage lossless compression unit 605 stores character flag data, chromatic color flag data, and line drawing flag data for one packet. , Job flag data, flat flag data, processing 1 flag data, and processing 2 flag data are input and encoded in this order (S1002).

なお属性フラグバッファリード制御部603は出力信号としてリードステータス信号[6:0]の7ビットの信号幅を持ち、属性フラグバッファ602[0]~[6]のどこのバッファをリードしているのかを信号として出力する。つまり例えば属性フラグバッファ[0]よりリードしている場合には1ビット目を‘1’とした”0b0000001”を出力し、属性フラグバッファ[6]よりリードしている場合には7ビット目を‘1’として“0b1000000”を出力するものである。   The attribute flag buffer read control unit 603 has a 7-bit signal width of the read status signal [6: 0] as an output signal, and which buffer of the attribute flag buffer 602 [0] to [6] is being read. Is output as a signal. In other words, for example, when reading from the attribute flag buffer [0], “0b0000001” is output with the first bit set to “1”, and when reading from the attribute flag buffer [6], the seventh bit is output. “0b1000000” is output as “1”.

可逆圧縮部605には先ほど説明したとおりPackBits符号化手法にて逐次圧縮されていき後述する符号量制御部606を介し、後段の符号化データバッファ607に一時格納される。   The lossless compression unit 605 is sequentially compressed by the PackBits encoding method as described above, and is temporarily stored in the subsequent-stage encoded data buffer 607 via the code amount control unit 606 described later.

符号化データバッファ607は1パケットデータ内の属性フラグデータ部における符号化前の属性フラグデータ分の容量を持っているものとする。PackBits符号化手法は周知のとおり可逆圧縮手法の1つなので属性フラグデータにより符号化前のデータ量より大きくなってしまう場合がある。したがって可逆圧縮部605からの符号化された属性フラグデータの符号量が符号化データバッファの容量を超えた場合、つまり符号化前のデータ量を超えた場合はそれ以上符号化データを格納しないものとする。   It is assumed that the encoded data buffer 607 has a capacity for attribute flag data before encoding in the attribute flag data portion in one packet data. Since the PackBits encoding method is one of the lossless compression methods as is well known, it may be larger than the data amount before encoding due to the attribute flag data. Therefore, when the code amount of the encoded attribute flag data from the lossless compression unit 605 exceeds the capacity of the encoded data buffer, that is, exceeds the data amount before encoding, the encoded data is not stored any more. And

次に先ほどの符号量制御部606の動作について詳しく説明する。   Next, the operation of the code amount control unit 606 will be described in detail.

図7は符号量制御部606の内部構成を示すブロック図である。   FIG. 7 is a block diagram showing an internal configuration of the code amount control unit 606.

先ほど可逆圧縮部605によりPackBits符号化される各属性フラグデータは属性フラグデータ毎にそのデータの符号量を符号量カウンタ701にてカウントされる(S1003)。本実施の形態では文字フラグデータ、有彩色フラグデータ、線画フラグデータ、ジョブフラグデータ、フラットフラグデータ、処理1フラグデータ、処理2フラグデータの順に先ほどの属性フラグバッファ602[0]~[6]から読み出し、符号化、符号量のカウントを実行する。そして各属性フラグデータの符号化データのカウントが終了するたびに、その結果を図の対応する符号量サイズレジスタ702[0]~[6]へ逐次格納していく。先ほど説明したように1パケットデータ内の属性フラグデータが全て符号化され、符号化データバッファ607に格納された後、符号化データバッファ607は符号化バッファライトエンド信号を符号量演算部705に送信する。符号量演算部705では符号化バッファライトエンド信号を受信し、これにより符号化が終了したことを検知する(S1004)。そしてまず1パケットデータの属性フラグデータの符号量を計算する。具体的には先ほど符号量サイズレジスタ702[0]~[6]の各属性フラグの符号量の総和の値を算出する(S1005)。今、この符号量の総和値をSUMとするとSUMは以下の式で表される。   Each attribute flag data that is PackBits-encoded by the lossless compression unit 605 is counted by the code amount counter 701 for each attribute flag data (S1003). In the present embodiment, the attribute flag buffer 602 [0] to [6] in the order of character flag data, chromatic color flag data, line drawing flag data, job flag data, flat flag data, processing 1 flag data, and processing 2 flag data. Is read out, encoded, and the code amount is counted. Each time the count of the encoded data of each attribute flag data is completed, the result is sequentially stored in the corresponding code amount size registers 702 [0] to [6] in the figure. As described above, after all the attribute flag data in one packet data is encoded and stored in the encoded data buffer 607, the encoded data buffer 607 transmits the encoded buffer write end signal to the code amount calculation unit 705. To do. The code amount calculation unit 705 receives the encoding buffer write end signal, and detects that encoding has been completed (S1004). First, the code amount of the attribute flag data of one packet data is calculated. Specifically, the sum of the code amounts of the attribute flags of the code amount size registers 702 [0] to [6] is calculated (S1005). Now, assuming that the total value of the code amount is SUM, SUM is expressed by the following equation.

SUM = 文字フラグ符号量+有彩色フラグ符号量+線画フラグ符号量
+ジョブフラグ符号量+フラットフラグ符号量+処理1フラグ符号量
+処理2フラグ符号量
次にこの符号量の総和SUMが実際の目標とする圧縮率に収まったか、否かを符号量閾値レジスタ703の値と比較する。
SUM = character flag code amount + chromatic color flag code amount + line drawing flag code amount + job flag code amount + flat flag code amount + processing 1 flag code amount + processing 2 flag code amount Next, the sum SUM of this code amount is actually It is compared with the value of the code amount threshold register 703 whether or not the compression rate is within the target.

符号量閾値レジスタ703は、1パケットデータ内の属性フラグデータの目標とする圧縮率に応じた値を格納するものである。例えば1パケットデータの全ての属性フラグデータの符号化前のデータ量は1画素につき8ビットのデータが1024画素分あるので合計1024バイトである。先ほどの目標とする圧縮率を1/2とする場合には512バイトを示す値をレジスタに設定しておけばよい。本レジスタは予めCPU105より図示しないレジスタバスにより設定可能であるレジスタであるものとする。   The code amount threshold register 703 stores a value corresponding to the target compression rate of the attribute flag data in one packet data. For example, the data amount before encoding of all attribute flag data of one packet data is 1024 bytes in total because there are 1024 pixels of 8-bit data per pixel. If the target compression rate is 1/2, a value indicating 512 bytes may be set in the register. This register is a register that can be set in advance by the CPU 105 via a register bus (not shown).

この符号量閾値レジスタ703と先ほどの属性フラグの符号量の総和SUMを比較する(S1006)。総和SUMが符号量閾値レジスタ703の設定された閾値よりも小さい場合(S1006のYes)、つまり予め設定した目標とする圧縮率に収まった場合には、符号量演算部705の出力信号の1つである符号化バッファリードスタート信号を符号化データバッファ607へ送信する。符号化データバッファ607は、符号量演算部705より符号化バッファリードスタート信号を受信した後、符号化された属性フラグデータをバッファ内よりリードし、後段の符号化パケットデータ生成部506へ出力する。   The code amount threshold register 703 is compared with the sum SUM of the code amounts of the attribute flags as described above (S1006). If the sum SUM is smaller than the threshold value set in the code amount threshold register 703 (Yes in S1006), that is, if it falls within the preset target compression rate, one of the output signals of the code amount calculation unit 705 The encoded buffer read start signal is transmitted to the encoded data buffer 607. The encoded data buffer 607 receives the encoded buffer read start signal from the code amount calculation unit 705, reads the encoded attribute flag data from the buffer, and outputs it to the encoded packet data generation unit 506 at the subsequent stage. .

次に符号量閾値レジスタ703と先ほどの属性フラグの符号量の総和SUMを比較して、総和SUMが符号量閾値レジスタ703の設定された閾値よりも大きい場合(S1006のNo)、つまり予め設定した目標とする圧縮率に収まらなかった場合について説明する。最初に先ほどの符号量サイズレジスタ702の各レジスタを順次確認し(S1007)、各々の属性フラグデータの符号量が符号前より大きくなっているか、否かを判断する。例えば符号量サイズレジスタ702[0]には、文字フラグデータの符号化後の符号量が格納されており、符号化前の1パケットデータの文字フラグデータ量は128バイトの固定値でありこの値より大きいかを比較することで判断できる。具体的には符号量サイズレジスタ702[0]〜[6]の各レジスタの値と符号化前の各フラグデータのデータ量を比較することにより可逆圧縮部605にてPackBits符号化され、符号量が大きくなってしまった属性フラグを特定できる(S1008)。   Next, the code amount threshold register 703 is compared with the code amount total sum SUM of the previous attribute flag. If the sum SUM is larger than the threshold set in the code amount threshold register 703 (No in S1006), that is, set in advance. A case where the compression rate is not within the target will be described. First, each register of the code amount size register 702 is checked sequentially (S1007), and it is determined whether or not the code amount of each attribute flag data is larger than that before the code. For example, the code amount size register 702 [0] stores the encoded code amount of character flag data, and the character flag data amount of one packet data before encoding is a fixed value of 128 bytes. It can be judged by comparing whether it is larger. More specifically, the lossless compression unit 605 performs PackBits encoding by comparing the value of each register of the code amount size registers 702 [0] to [6] with the data amount of each flag data before encoding. The attribute flag that has become larger can be identified (S1008).

符号量演算部705ではこの符号化により符号量が大きくなってしまった属性フラグを符号化前のデータ量に変換して(S1009)、先ほどの総和SUMを算出する。   The code amount calculation unit 705 converts the attribute flag whose code amount has increased by this encoding into the data amount before encoding (S1009), and calculates the sum SUM as described above.

例えば、今、処理1フラグデータ310と処理2フラグデータ311が符号量前より大きくなったと判断された場合には、先ほどの属性フラグデータの符号量の総和SUMの式は以下のように変換して算出される(S1010)。   For example, if it is determined that the processing 1 flag data 310 and the processing 2 flag data 311 are larger than before the code amount, the expression of the sum SUM of the code amounts of the attribute flag data is converted as follows. (S1010).

SUM = 文字フラグ符号量+有彩色フラグ符号量+線画フラグ符号量
+ジョブフラグ符号量+フラットフラグ符号量
+128バイト(処理1フラグの符号化前データ量)
+128バイト(処理2フラグの符号化前データ量)
このようにして、算出された総和SUMの値を先ほどと同様に符号量閾値レジスタ703の値と比較する(S1011)。
SUM = character flag code amount + chromatic color flag code amount + line drawing flag code amount + job flag code amount + flat flag code amount + 128 bytes (data amount before processing 1 flag encoding)
+128 bytes (data amount before encoding of processing 2 flag)
In this way, the value of the calculated sum SUM is compared with the value of the code amount threshold register 703 as before (S1011).

この場合の総和SUMの値が符号量閾値レジスタ703の設定された閾値よりも小さい場合(S1011のYes)、つまり予め設定した目標とする圧縮率に収まった場合には、符号量演算部705の出力信号の1つである符号化マスク信号[6:0]を変更して出力する。符号化マスク信号[6:0]は7ビット幅を有する信号であり、各々が各属性フラグに対応している。先ほどの例のように、いま処理1フラグ310と処理2フラグ311が符号化後の符号量が大きいと判断された場合には符号化マスク信号の6ビット目と7ビット目を‘1’とし、“0b1100000”として圧縮制御部604へ出力する。さらに入力バッファリードスタート信号を属性フラグバッファリード制御部603へ出力し、再度、各々の属性フラグバッファ602[0]~[6]からの属性フラグデータのリードを実行し、可逆圧縮部605へ属性フラグデータを送信していく。   In this case, if the value of the sum SUM is smaller than the threshold value set in the code amount threshold register 703 (Yes in S1011), that is, if it falls within the preset target compression rate, the code amount calculation unit 705 The encoding mask signal [6: 0], which is one of the output signals, is changed and output. The encoding mask signal [6: 0] is a signal having a 7-bit width, and each corresponds to each attribute flag. As in the previous example, if it is determined that the processing 1 flag 310 and the processing 2 flag 311 have a large code amount after encoding, the sixth and seventh bits of the encoding mask signal are set to “1”. , “0b1100000” is output to the compression control unit 604. Further, an input buffer read start signal is output to the attribute flag buffer read control unit 603, the attribute flag data is read again from each attribute flag buffer 602 [0] to [6], and the attribute is sent to the lossless compression unit 605. Send flag data.

このときに圧縮制御部604では上記説明したリードステータス信号[6:0]と符号化マスク信号[6:0]の2つの信号を入力として受信し、出力信号である符号化イネーブル信号を制御し、可逆圧縮部605の圧縮動作の可否を決める。具体的には符号化マスク信号[6:0]=”0b1100000”で、リードステータス信号[6:0]=”0b0100000”もしくは”0b1000000”のとき(処理1フラグ310もしくは処理2フラグ311をリードしている状態)、符号化イネーブル信号を‘0’とする。よって可逆圧縮部605は属性フラグバッファ602[5]と[6]をリードしているとき、つまり処理1フラグ310もしくは処理2フラグ311をリードして可逆圧縮部605に入力しているときにはPackBits符号化動作は行わずにそのまま後段の符号化データバッファ607へ格納していく(S1012)。1パケット分の属性フラグデータが符号化データバッファ607へ格納された時点で属性フラグデータの符号化を終了する(S1013)。   At this time, the compression control unit 604 receives the two signals of the read status signal [6: 0] and the encoding mask signal [6: 0] described above as inputs, and controls the encoding enable signal which is an output signal. Then, whether or not the reversible compression unit 605 can perform the compression operation is determined. Specifically, when the encoding mask signal [6: 0] = “0b1100000” and the read status signal [6: 0] = “0b0100000” or “0b1000000” (the processing 1 flag 310 or the processing 2 flag 311 is read) The encoding enable signal is set to '0'. Therefore, when the lossless compression unit 605 reads the attribute flag buffers 602 [5] and [6], that is, when the processing 1 flag 310 or the processing 2 flag 311 is read and input to the lossless compression unit 605, the PackBits code The data is stored in the subsequent encoded data buffer 607 without performing the conversion operation (S1012). When the attribute flag data for one packet is stored in the encoded data buffer 607, the encoding of the attribute flag data is finished (S1013).

これにより、一部の符号化により符号化前より大きくなった属性フラグデータを圧縮せずにそのまま出力することで目標の圧縮率に収めることが可能となる。   As a result, attribute flag data that has become larger than before encoding due to partial encoding can be output as it is without being compressed, so that the target compression rate can be achieved.

次に符号量制御部606にて符号量閾値レジスタ703と先ほどの属性フラグの符号量の総和SUMを比較して、総和SUMが符号量閾値レジスタ703の設定された閾値よりも大きく、さらに先ほどのように一部の符号化前より大きくなった属性フラグデータの符号量を符号化前のデータ量に置き換えても大きかった場合(S1011のNo)について説明する。   Next, the code amount control unit 606 compares the code amount threshold register 703 with the code amount total sum SUM of the attribute flag, and the sum SUM is larger than the threshold set in the code amount threshold register 703. As described above, a case will be described in which the amount of code of attribute flag data that has become larger than that before encoding is large even if it is replaced with the amount of data before encoding (No in S1011).

この場合には、一部の属性フラグデータをいずれかの値に固定化していくことで圧縮率を高める手法をとる。符号量演算部705には、この手法の際に固定化する属性フラグデータの優先度を設定できる優先度設定レジスタ704[0]~[6]を設けている。   In this case, a method of increasing the compression rate by fixing some attribute flag data to any value is adopted. The code amount calculation unit 705 is provided with priority setting registers 704 [0] to [6] that can set the priority of attribute flag data to be fixed in this method.

このレジスタは画像処理等の画質への影響度により、固定化する属性フラグの優先度を設定できるものであり、優先度設定レジスタ704[0]には最も優先度の高い属性フラグの識別コードを設定し、優先度設定レジスタ704[6]には最も優先度の低い属性フラグの識別コードを設定するものとする。   This register can set the priority of the attribute flag to be fixed depending on the degree of influence on the image quality such as image processing. The priority setting register 704 [0] contains the identification code of the attribute flag having the highest priority. It is assumed that the identification code of the attribute flag with the lowest priority is set in the priority setting register 704 [6].

例えば優先度設定レジスタ704の一番優先度の低いことを示す属性フラグ優先レジスタ704[6]に処理2フラグ311を示す識別コードが設定されていた場合には処理2フラグ311は全て’0’ or ‘1’に固定した符号量として換算される。よってこの場合は、処理2フラグ311は1024画素分で1024ビット=128バイトである。これがすべて‘0’になりPackBitsの符号化を行うと2バイトとなる(S1014)。   For example, when the identification code indicating the processing 2 flag 311 is set in the attribute flag priority register 704 [6] indicating that the priority is the lowest in the priority setting register 704, all the processing 2 flags 311 are “0”. or Converted as a code amount fixed to '1'. Therefore, in this case, the processing 2 flag 311 is 1024 bits = 128 bytes for 1024 pixels. This becomes all “0”, and when PackBits is encoded, it becomes 2 bytes (S1014).

したがって上記の手法をとった場合の符号量の総和SUMは、処理1フラグはすでに先ほどの手法で符号化前のデータ量に置き換えられるものとして以下のように算出できる(S1015)。   Therefore, the sum SUM of the code amount when the above method is used can be calculated as follows, assuming that the processing 1 flag is already replaced with the data amount before encoding by the above method (S1015).

SUM = 文字フラグ符号量+有彩色フラグ符号量+線画フラグ符号量
+ジョブフラグ符号量+フラットフラグ符号量
+128バイト(処理1フラグの符号化前データ量)
+2バイト(処理2フラグを固定値として符号化したデータ量)
なお、この処理は符号量の総和SUMが符号量閾値レジスタ703に設定された目標の圧縮率に達するための値より小さくなるまで、逐次優先度設定レジスタ[0]〜[6]の優先度に従って対応する属性フラグデータを固定化した符号量に置き換えて総和SUMの値を算出していくものである。
SUM = character flag code amount + chromatic color flag code amount + line drawing flag code amount + job flag code amount + flat flag code amount + 128 bytes (data amount before processing 1 flag encoding)
+2 bytes (data amount encoded with processing 2 flag as a fixed value)
This process is performed in accordance with the priorities of the sequential priority setting registers [0] to [6] until the total sum SUM of the code amounts becomes smaller than the value for reaching the target compression rate set in the code amount threshold register 703. The value of the sum SUM is calculated by replacing the corresponding attribute flag data with a fixed code amount.

このような処理により最終的に総和SUMの値が符号量閾値レジスタ703の値を超えない結果が算出された時点で処理を終了する(S1016)。   The process is terminated when a result that the sum SUM value does not exceed the value of the code amount threshold register 703 is finally calculated by such a process (S1016).

処理が終了した時点で符号量演算部705はデータマスク信号[6:0]にこの算出結果の情報を反映する。データマスク信号[6:0]は7ビット幅を有する出力制御信号であり、各ビットは各属性フラグに対応する。   When the processing is completed, the code amount calculation unit 705 reflects the information on the calculation result in the data mask signal [6: 0]. The data mask signal [6: 0] is an output control signal having a 7-bit width, and each bit corresponds to each attribute flag.

例えば、処理2フラグ311のみ固定化するだけでよい場合には、データマスク信号[6:0]=“0b1000000”とし出力することで処理2フラグ311のデータの固定化を制御する。
また、先ほどの符号化マスク信号[6:0]はこの場合、処理1フラグ310のみ符号化をマスクするために”0b0100000”が圧縮制御部604へ出力される。
For example, when only the processing 2 flag 311 needs to be fixed, the data mask signal [6: 0] = “0b1000000” is output and the fixing of the data of the processing 2 flag 311 is controlled.
Further, in this case, “0b0100000” is output to the compression control unit 604 in order to mask only the processing 1 flag 310 in the previous encoding mask signal [6: 0].

このように符号量演算部705により決定されたデータマスク信号[6:0]は、前段の属性フラグバッファリード制御部603へ出力される。   In this way, the data mask signal [6: 0] determined by the code amount calculation unit 705 is output to the attribute flag buffer read control unit 603 in the previous stage.

さらに符号量演算部705は入力バッファリードスタート信号も属性フラグバッファリード制御部603へ出力し、再度、各々の属性フラグバッファ602[0]~[6]からの属性フラグデータのリードを実行し、可逆圧縮部605へ属性フラグデータを送信していく。   Further, the code amount calculation unit 705 also outputs an input buffer read start signal to the attribute flag buffer read control unit 603, and again reads attribute flag data from each attribute flag buffer 602 [0] to [6], The attribute flag data is transmitted to the lossless compression unit 605.

このときに属性フラグバッファリード制御部603では上記説明したデータマスク信号[6:0]を入力として受信し、対応するビットの属性フラグデータを属性フラグバッファ602からリードしているときにその属性フラグバッファを固定値に置き換えて可逆圧縮部605へ送信する。先ほどの例では属性フラグバッファ602[6]から処理2フラグ311をリードしているのときに属性フラグバッファリード制御部603はそのデータを常に‘0’もしくは‘1’に置き換えて可逆圧縮部605へ出力する(S1017)。可逆圧縮部605ではこの固定値のままPackBits符号化を行い、先ほど算出した2バイトの符号量データが処理2フラグの符号化データとして符号化データバッファ607へ格納される。1パケットの属性フラグデータが符号化データバッファ607へ格納された時点で属性フラグデータの符号化を終了する(S1018)。   At this time, the attribute flag buffer read control unit 603 receives the data mask signal [6: 0] described above as an input, and when the attribute flag data of the corresponding bit is read from the attribute flag buffer 602, the attribute flag is read. The buffer is replaced with a fixed value and transmitted to the lossless compression unit 605. In the previous example, when the process 2 flag 311 is read from the attribute flag buffer 602 [6], the attribute flag buffer read control unit 603 always replaces the data with “0” or “1” and the lossless compression unit 605. (S1017). The lossless compression unit 605 performs PackBits encoding with this fixed value, and the previously calculated 2-byte code amount data is stored in the encoded data buffer 607 as encoded data of the process 2 flag. When the attribute flag data of one packet is stored in the encoded data buffer 607, the encoding of the attribute flag data is finished (S1018).

これにより、一部の符号化前より大きくなった属性フラグデータを圧縮せずにそのまま出力する手法に加え、さらに一部の画像処理に対して優先度の低い属性フラグデータを固定化して出力し、符号化することで目標の圧縮率に収めることが可能となる。   As a result, in addition to the method of outputting attribute flag data that has become larger than before encoding without compression, attribute flag data with a lower priority for some image processing is also fixed and output. By encoding, it becomes possible to achieve the target compression rate.

なお、本実施の形態では符号量演算部705の符号量の総和SUMの値の算出処理は全て符号量演算部のハードウェアが行う構成で説明したが、CPU105が符号量サイズレジスタ[0]〜[6]を確認し、その都度、符号量の総和SUMの値を算出し、各制御信号を制御する形態であっても構わない。   In the present embodiment, the code amount total SUM calculation process of the code amount calculation unit 705 has been described as being configured by the hardware of the code amount calculation unit. However, the CPU 105 uses the code amount size registers [0] to [0] to [6] may be confirmed, and the value of the sum SUM of code amounts may be calculated each time to control each control signal.

以上のような処理により、最終的に目標の圧縮率に収まった符号化された属性フラグデータは符号化データバッファ607より図5の符号化パケットデータ生成部506に出力される。符号化パケットデータ生成部506では画像データ用符号化部504よりJPEG圧縮を施された1パケット分の符号化画像データと、先ほど説明してきた属性フラグ用符号化部505よりPackBits圧縮を施された1パケット分の符号化属性フラグデータとを結合する。さらに入力段でパケットデータ分割部501より分割されたヘッダデータの一部を適切な値に書き換えてヘッダデータとして付加することにより符号化されたパケットデータを生成する。その結果、画像圧縮部103より符号化されたパケットデータは順次イメージバスI/F114を介し、HDD108へ格納されていき、圧縮処理を終了する。   Through the processing as described above, the encoded attribute flag data that finally falls within the target compression rate is output from the encoded data buffer 607 to the encoded packet data generation unit 506 in FIG. In the encoded packet data generation unit 506, one packet of encoded image data subjected to JPEG compression from the image data encoding unit 504, and PackBits compression from the attribute flag encoding unit 505 described above. Combines the encoded attribute flag data for one packet. Further, a part of the header data divided by the packet data division unit 501 at the input stage is rewritten to an appropriate value and added as header data, thereby generating encoded packet data. As a result, the packet data encoded by the image compression unit 103 is sequentially stored in the HDD 108 via the image bus I / F 114, and the compression process ends.

また本実施の形態ではRIP用パケット生成部131で画像データを32×32の矩形データに分割し、画像圧縮部103で圧縮処理を行う構成で記載したが、1ページ全体の画像データを圧縮する場合においても、先ほどの各バッファの容量を大きく持ち、圧縮率の目標に応じて符号量のサイズを決めていた属性フラグ符号量閾値レジスタを1ページ分の符号量を設定できるレジスタを設けることで、本手法は適用できるものである。   In this embodiment, the RIP packet generation unit 131 divides the image data into 32 × 32 rectangular data and the image compression unit 103 compresses the image data. However, the image data of one page is compressed. Even in this case, by providing a register that can set the code amount for one page as the attribute flag code amount threshold register that has a large capacity for each buffer and has determined the code amount size according to the compression rate target. This method can be applied.

以上、説明してきたように本実施の形態のような属性フラグデータの圧縮手法を用いることにより、属性データの可逆性を保ったまま、もしくは最低限の属性データ情報の損失で属性フラグデータを目標の圧縮率の範囲で圧縮することが可能となる。   As described above, by using the attribute flag data compression method as in the present embodiment, the attribute flag data can be targeted while maintaining the reversibility of the attribute data or with a minimum loss of attribute data information. It is possible to compress within the range of the compression rate.

103・・・画像圧縮部
505・・・属性フラグ符号化部
601・・・属性情報分割部
602・・・属性フラグバッファ
606・・・符号量制御部
701・・・符号量カウンタ
702・・・符号量サイズレジスタ
703・・・符号量閾値レジスタ
704・・・優先度設定レジスタ
705・・・符号量演算部
103 ... Image compression unit 505 ... Attribute flag encoding unit 601 ... Attribute information division unit 602 ... Attribute flag buffer 606 ... Code amount control unit 701 ... Code amount counter 702 ... Code amount size register 703... Code amount threshold register 704... Priority setting register 705.

Claims (6)

多値画像データの各画素の属性情報(305~311)を入力し、圧縮符号化する画像処理装置(100)であって、画像情報を任意の画素ブロックに分割する分割手段(131、132)と、前記画素ブロックの各画素に対応する属性情報を属性情報毎にまとめて配列する属性情報配列手段(601、602)と、配列された属性情報群にて可逆符号化する符号化手段(605)と、前記符号化手段で得られる各属性情報群の符号化データ量を監視し、前記各属性情報群の符号化データ量が所定基準を満たしたか否かを判断する符号量監視手段(606)とを備え、前記符号量監視手段において各属性情報群の全ての符号化データ量が第1の基準を満たした場合には、各属性情報群のそれぞれが第2の基準を満たしているか否かを判断し、基準を満たしている対象の属性情報群に対して条件を変更して符号化することを特徴とする画像処理装置。   An image processing apparatus (100) for inputting attribute information (305 to 311) of each pixel of multi-valued image data and compressing and encoding the dividing means (131, 132) for dividing the image information into arbitrary pixel blocks Attribute information arrangement means (601, 602) for arranging attribute information corresponding to each pixel of the pixel block for each attribute information, and encoding means (605) for lossless encoding using the arranged attribute information group ) And the amount of encoded data of each attribute information group obtained by the encoding means, and a code amount monitoring means (606) for determining whether or not the amount of encoded data of each attribute information group satisfies a predetermined standard ), And if all the encoded data amounts of each attribute information group satisfy the first criterion in the code amount monitoring means, whether each of the attribute information groups satisfies the second criterion Judgment and criteria The image processing apparatus characterized by encoding by changing the conditions for the attribute information group for which meets. 前記符号量監視手段の第1の基準は符号化された各属性情報群の全ての符号量が所定のデータ量内であるかを示す閾値との比較に基づく基準であり、符号化された各属性情報群のデータ量の総和と前記閾値を比較し、前記符号化された各属性情報群の総和のデータ量が前記閾値より大きい場合には前記第1の基準を満たした判断する第1基準判断手段を有することを特徴とする請求項1に記載の画像処理装置。   The first criterion of the code amount monitoring means is a criterion based on a comparison with a threshold value indicating whether or not all code amounts of each encoded attribute information group are within a predetermined data amount. The first criterion for comparing the total amount of data of the attribute information group with the threshold value and determining that the total amount of data of the encoded attribute information groups is greater than the threshold value satisfies the first criterion The image processing apparatus according to claim 1, further comprising a determination unit. 前記符号量監視手段の第2の基準は各属性情報群に設けられた符号化しない場合の各属性情報群のデータ量を閾値とした比較に基づく基準であり、この閾値を超えた場合には基準を満たしたと判断する第2基準判断手段を有することを特徴とする請求項1に記載の画像処理装置。   The second criterion of the code amount monitoring means is a criterion based on a comparison with the data amount of each attribute information group provided in each attribute information group as a threshold when not encoded, and when this threshold is exceeded The image processing apparatus according to claim 1, further comprising a second reference determination unit that determines that the reference is satisfied. 請求項2記載の前記第1基準判断手段における第1の基準を満たし、かつ請求項3記載の前記第2基準判断手段における第2の基準を満たした属性情報群に対して前記符号化手段は当該属性情報群の符号化を行わないで出力する符号化制御手段を有することを特徴とする請求項1に記載の画像処理装置。   The encoding means for the attribute information group that satisfies the first reference in the first reference determination means according to claim 2 and that satisfies the second reference in the second reference determination means according to claim 3, The image processing apparatus according to claim 1, further comprising an encoding control unit that outputs the attribute information group without encoding the attribute information group. 請求項2記載の前記第1の基準を満たし、かつ請求項3記載の前記第2の基準を満たした属性情報群に対して前記符号化手段は当該属性情報群を固定の情報に変換して符号化し、出力する固定出力手段を有することを特徴とする請求項1に記載の画像処理装置。   For the attribute information group that satisfies the first criterion of claim 2 and that satisfies the second criterion of claim 3, the encoding means converts the attribute information group into fixed information. The image processing apparatus according to claim 1, further comprising fixed output means for encoding and outputting. 請求項5記載の前記固定出力手段において、固定の情報に変換する属性情報の優先度を設定可能とする優先度設定手段を有することを特徴とする請求項5に記載の画像処理装置。
6. The image processing apparatus according to claim 5, further comprising priority setting means for enabling setting of priority of attribute information to be converted into fixed information.
JP2011269530A 2011-12-09 2011-12-09 Image processing device Pending JP2013121154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011269530A JP2013121154A (en) 2011-12-09 2011-12-09 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011269530A JP2013121154A (en) 2011-12-09 2011-12-09 Image processing device

Publications (1)

Publication Number Publication Date
JP2013121154A true JP2013121154A (en) 2013-06-17

Family

ID=48773587

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011269530A Pending JP2013121154A (en) 2011-12-09 2011-12-09 Image processing device

Country Status (1)

Country Link
JP (1) JP2013121154A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813063A (en) * 2020-06-29 2020-10-23 南昌欧菲光电技术有限公司 Method and device for monitoring production equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813063A (en) * 2020-06-29 2020-10-23 南昌欧菲光电技术有限公司 Method and device for monitoring production equipment
CN111813063B (en) * 2020-06-29 2021-11-19 南昌欧菲光电技术有限公司 Method and device for monitoring production equipment

Similar Documents

Publication Publication Date Title
US8660347B2 (en) Image processing apparatus and processing method therefor
US8553301B2 (en) Image processing apparatus, method, and program product to perform color-reduction processing for a block
US7715637B2 (en) Image processing apparatus and control method therefor
JP5052569B2 (en) Image compression apparatus, image compression method, image expansion apparatus, image expansion method, image forming apparatus, computer program, and recording medium
JP5432450B2 (en) Lossless color image data compression using entropy coding
US7454070B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP5132517B2 (en) Image processing apparatus and image processing method
US8159718B2 (en) Image processing to determine if pixel in compressed data is chromatic or achromtic based on selection threshold
JP4393319B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2011071658A (en) Apparatus and system for processing image, control method therefor and program
US8014622B2 (en) Image processing apparatus and method for attribute data encoding
JP2011254405A (en) Image processor and image processing method
JP2003046789A (en) Image coding apparatus and image decoding apparatus
JP2013121154A (en) Image processing device
JP2011139162A (en) Image encoding device, control method, and program
US8494261B2 (en) Image processing apparatus, image processing method, and computer-readable medium
US9049404B2 (en) Image processing apparatus and method that perform multiple image processes, and storage medium storing a program thereof, for decompressing a compressed image according to first and second information indicating image processing to be performed
JP7110962B2 (en) Image processing method and image processing apparatus
JP3997851B2 (en) Image coding apparatus and image coding program
JP5595142B2 (en) Image processing apparatus and image processing method
JP2005086353A (en) Picture processor, control method therefor, computer program and computer readable storage medium
JP5643578B2 (en) Image processing apparatus, image processing method, and program
JP2014099742A (en) Color/monochromatic determination
JP2013085173A (en) Image processing device and control method therefor
JP2012074897A (en) Image processing device, image processing method, and program