JP2011004284A - Image coding apparatus and method of controlling the same - Google Patents

Image coding apparatus and method of controlling the same Download PDF

Info

Publication number
JP2011004284A
JP2011004284A JP2009147007A JP2009147007A JP2011004284A JP 2011004284 A JP2011004284 A JP 2011004284A JP 2009147007 A JP2009147007 A JP 2009147007A JP 2009147007 A JP2009147007 A JP 2009147007A JP 2011004284 A JP2011004284 A JP 2011004284A
Authority
JP
Japan
Prior art keywords
encoding
block
encoded
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
JP2009147007A
Other languages
Japanese (ja)
Inventor
Minoru Kobegawa
実 神戸川
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 JP2009147007A priority Critical patent/JP2011004284A/en
Publication of JP2011004284A publication Critical patent/JP2011004284A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To reduce the number of times of switching configuration data in a reconfigurable processor.SOLUTION: The image coding apparatus includes: a first coder 102 for coding image data according to a first coding system for the unit of a block in a predetermined size of the image data; a second coder 103 for coding the image data according to a second coding system different from the first coding system; and an identification bit generator 110 for selecting either the data coded by the first coder 102 or the data coded by the second coder 103, as coded data of a current block, on the basis of code lengths of the data coded by the first and second coders 102 and 103 and a boundary function corresponding to a coding system selected in the preceding block.

Description

本発明は、画像データを符号化する技術に関するものである。   The present invention relates to a technique for encoding image data.

像域判定技術を用いずに、文字線画、自然画が混在した画像を効率良く、また画質的にも優れた符号化を行う符号化方法が提案されている(特許文献1)。この特許文献1の符号化方法では、画像データを所定サイズの画素ブロック単位で入力し、非可逆符号化により符号化したデータサイズLyと、可逆符号化により符号化したデータサイズLxとをそれぞれ求めている。そして、Ly≧f(Lx)かどうかにより出力する符号データを判別している。ここでf()は、非線形の境界関数で、この条件が満たされると可逆符号化した符号データを選択し、一方、この条件が満たされないときは非可逆符号化した符号データを選択している。つまり上記技術を実装したシステムでは、2つの方式の符号化データが混在することになる。   There has been proposed an encoding method that efficiently encodes an image in which a character line image and a natural image are mixed without using an image area determination technique and that is excellent in image quality (Patent Document 1). In the encoding method of Patent Document 1, image data is input in units of pixel blocks of a predetermined size, and a data size Ly encoded by lossy encoding and a data size Lx encoded by lossless encoding are respectively obtained. ing. The code data to be output is determined depending on whether Ly ≧ f (Lx). Here, f () is a non-linear boundary function. When this condition is satisfied, the lossless encoded code data is selected. On the other hand, when this condition is not satisfied, the lossy encoded code data is selected. . That is, in a system in which the above technique is implemented, encoded data of the two methods are mixed.

一般に画像の符号化は、画像データのサイズを削減し、データの転送及び格納を容易にするためになされ、符号化されたデータは画像の表示や印刷等のために復号される。従って、復号の際に都合の良い形態となる符号化を行う符号化装置であるのが望ましい。   In general, image encoding is performed in order to reduce the size of image data and facilitate data transfer and storage, and the encoded data is decoded for image display and printing. Therefore, it is desirable that the encoding device perform encoding that is a convenient form for decoding.

複数の異なる方式により符号化された複数の符号データを復号するためには、それぞれ専用の復号回路を用意するのが一般である。しかし、このような復号回路を備えることは実用的でなく、回路規模の削減と符号化方式に対する柔軟性を増すために再構成可能なロジック回路を用いることが提案されている。特に互いに異なる複数の符号化方法で符号化された複数の符号データに柔軟に対応でき、かつ高速に復号するために、リコンフィギュラブルロジックにより復号用の論理回路を構築する技術が提案されている(特許文献2)。   In order to decode a plurality of code data encoded by a plurality of different methods, it is common to prepare dedicated decoding circuits for each. However, it is not practical to provide such a decoding circuit, and it has been proposed to use a reconfigurable logic circuit in order to reduce the circuit scale and increase the flexibility of the encoding method. In particular, a technique for constructing a decoding logic circuit using reconfigurable logic has been proposed in order to flexibly support a plurality of code data encoded by a plurality of different encoding methods and to perform high-speed decoding. (Patent Document 2).

以上の技術を踏まえると、特許文献1の画像符号化装置により生成された可逆符号と非可逆符号とが混在した符号データは、特許文献2の復号化装置により復号できる。ここでリコンフィギュラブルプロセッサは、PE(Processor Element)と呼ばれる基本演算機能を持つ多機能素子から構成される回路構成面を複数備える。リコンフィギュラブルプロセッサの回路構成情報(コンフィギュレーションデータ)は、PEを基本単位として構成される。そのため、論理ゲート単位で構成されるFPGAやCPLDのコンフィギュレーションデータと比較してデータ量が小さく、FPGAやCPLDに比較してより短時間で回路の再構成ができる。リコンフィギュラブルロジックは、動的に複数の機能間で機能を切り替えることができる論理回路である。   Based on the above technique, code data in which a lossless code and an irreversible code generated by the image encoding device of Patent Literature 1 are mixed can be decoded by the decoding device of Patent Literature 2. Here, the reconfigurable processor includes a plurality of circuit configuration surfaces including multi-functional elements called PE (Processor Element) having a basic arithmetic function. The circuit configuration information (configuration data) of the reconfigurable processor is configured with PE as a basic unit. Therefore, the amount of data is small compared to the configuration data of FPGA or CPLD configured in units of logic gates, and the circuit can be reconfigured in a shorter time than that of FPGA or CPLD. The reconfigurable logic is a logic circuit that can dynamically switch functions between a plurality of functions.

特開2006−80792号公報(請求項1、図1)JP 2006-80792 A (Claim 1, FIG. 1) 特開2002−240368号公報(請求項6、図4)JP 2002-240368 A (Claim 6, FIG. 4)

リコンフィギュラブルプロセッサでは、FPGAやCPLDと比較して、より短時間で回路の再構成ができる。しかしながらリコンフィギュラブルプロセッサでは、回路構成の変更は、回路構成の切替トリガの検出、回路動作の停止、コンフィギュレーションの切替、回路動作の再開、といった複数の手順を経て行われるため一定の時間を要する。そのため特許文献1の画像符号化装置において、符号化方法が頻繁に切り替わるとコンフィギュレーションデータの切替回数が増大する。その結果、コンフィグレーションデータの切替に伴う時間的オーバーヘッドが増大し、トータルの処理時間が遅くなるという問題が生じる。   In the reconfigurable processor, the circuit can be reconfigured in a shorter time compared to the FPGA and CPLD. However, in a reconfigurable processor, a change in circuit configuration takes a certain amount of time because it is performed through a plurality of procedures such as detection of a circuit configuration switching trigger, circuit operation stop, configuration switching, and circuit operation restart. . For this reason, in the image encoding device of Patent Document 1, if the encoding method is frequently switched, the number of times configuration data is switched increases. As a result, there arises a problem that the time overhead associated with the switching of the configuration data increases and the total processing time is delayed.

本発明の目的は、上記従来技術の問題点を解決することにある。   An object of the present invention is to solve the above-mentioned problems of the prior art.

本願発明の目的は、第1と第2符号化方式を切り替えて符号化する画像符号化装置において、符号化方式の切り替え回数を減らすことにある。   An object of the present invention is to reduce the number of times of switching between coding systems in an image coding apparatus that performs coding by switching between the first and second coding systems.

上記目的を達成するために本発明の一態様に係る画像符号化装置は以下のような構成を備える。即ち、
画像データの所定サイズのブロック単位で、当該画像データを第1符号化方式で符号化する第1符号化手段と、
画像データの前記ブロック単位で、当該画像データを前記第1符号化方式とは異なる第2符号化方式で符号化する第2符号化手段と、
前記第1及び第2符号化手段で符号化した符号化データの符号長と、先行するブロックで選択した符号化方式に応じた境界関数とに基づいて、現ブロックの符号化データとして、前記第1符号化手段或いは第2符号化手段で符号化された符号化データのいずれかを選択する選択手段とを有することを特徴とする。
In order to achieve the above object, an image encoding apparatus according to an aspect of the present invention has the following arrangement. That is,
First encoding means for encoding the image data by a first encoding method in units of blocks of a predetermined size of the image data;
Second encoding means for encoding the image data in a second encoding scheme different from the first encoding scheme for each block of the image data;
Based on the code length of the encoded data encoded by the first and second encoding means and the boundary function according to the encoding method selected in the preceding block, the encoded data of the current block is And selecting means for selecting one of the encoded data encoded by the first encoding means or the second encoding means.

本発明によれば、第1と第2符号化方式を切り替えて符号化する画像符号化装置において、符号化方式の切り替え回数を従来の技術に比べて減らすことができる。   Advantageous Effects of Invention According to the present invention, in an image coding apparatus that performs coding by switching between the first and second coding methods, the number of times of switching between coding methods can be reduced as compared with the conventional technique.

実施形態に係る複写機のブロック構成図。1 is a block configuration diagram of a copier according to an embodiment. 本実施形態に係る符号化処理部のブロック図。The block diagram of the encoding process part which concerns on this embodiment. 本実施形態1に係る識別ビット生成部の構成を説明するブロック図。FIG. 3 is a block diagram illustrating a configuration of an identification bit generation unit according to the first embodiment. 本実施形態の可逆符号と非可逆符号を選択する境界条件を説明する図。The figure explaining the boundary conditions which select the lossless code and lossy code of this embodiment. 実施形態1における符号識別ビットの出力例を説明する図。FIG. 6 is a diagram for explaining an output example of code identification bits in the first embodiment. 実施形態でブロックの符号長をプロットした点が遷移する例を示す図。The figure which shows the example which the point which plotted the code length of the block changes in embodiment. 本実施形態に係る符号化処理部の処理を説明するフローチャート。The flowchart explaining the process of the encoding process part which concerns on this embodiment. 実施形態2に係る識別ビット生成部の構成を説明する図。FIG. 6 is a diagram for explaining a configuration of an identification bit generation unit according to the second embodiment. 本実施形態2に係る符号化処理部の処理を説明するフローチャート。9 is a flowchart for explaining processing of an encoding processing unit according to the second embodiment. 図6のブロックb1〜b12が入力されたときの結果の一例を示す図。The figure which shows an example of a result when the blocks b1-b12 of FIG. 6 are input. 本実施形態3に係る符号化処理部の処理を説明するフローチャート。10 is a flowchart for explaining processing of an encoding processing unit according to the third embodiment. 実施形態3の仮選択ビット信号と符号識別ビットを示す図である。It is a figure which shows the temporary selection bit signal and code | symbol identification bit of Embodiment 3.

以下、添付図面を参照して本発明の実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る本発明を限定するものでなく、また本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the present invention according to the claims, and all combinations of features described in the embodiments are not necessarily essential to the solution means of the present invention. .

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

図1は、本発明の実施形態に係る複写機のブロック構成図である。   FIG. 1 is a block diagram of a copying machine according to an embodiment of the present invention.

図中、制御部1は、この複合機全体の制御を司っており、CPU,ROM,RAM等を有している。操作部2は、液晶などの表示器や各種スイッチ、ボタン等を具備している。原稿読取部(イメージスキャナ)3は、ADF(Auto Document Feeder)を搭載して、原稿を光学的に読み取って画像データを発生する。こうして得られた画像データは、RGB各色成分毎に8ビット(256階調)のデジタルデータである。レンダリング部4は、不図示のインタフェース(ネットワークインタフェースを含む)を介して受信したPDL形式の印刷データに基づいて印刷画像を描画する。セレクタ5は、制御部1からの指示に従って、原稿読取部3及びレンダリング部4から出力されたイメージデータのいずれか一方を選択して符号化処理部6に出力する。符号化処理部6は、セレクタ5から出力されたイメージデータを符号化する。二次記憶装置7(実施形態ではハードディスク装置)は、符号化処理部6から出力された符号化データを格納する。復号処理部8は、二次記憶装置7に格納された符号化データを、その格納順に読出して復号する。復号処理部8は、復号を行うためのリコンフィギュラブルロジック801を有している。切替制御部802は、符号データの先頭に付加された符号化方式を示す符号識別ビットを読み取って、対応する構成情報でリコンフィギュラブルロジック801を構築する。構成情報1は、第1符号化方式に対応する復号回路の構成情報であり、構成情報2は第2符号化方式に対応する復号回路の構成情報である。画像処理部9は、復号処理部8からの復号画像を入力し、RGB色空間を記録色空間であるYMCへ変換し、UCR(Under Color Removal)処理を行うと共に、画像データの補正処理を行う。プリンタエンジン部10は、その印刷機構はレーザビームプリンタエンジンとしているが、インク液を吐出するインクジェットプリンタでも構わず、その種類は問わない。   In the figure, the control unit 1 controls the entire multifunction peripheral, and includes a CPU, a ROM, a RAM, and the like. The operation unit 2 includes a display such as liquid crystal, various switches, buttons, and the like. An original reading unit (image scanner) 3 is equipped with an ADF (Auto Document Feeder), and optically reads an original to generate image data. The image data obtained in this way is digital data of 8 bits (256 gradations) for each RGB color component. The rendering unit 4 renders a print image based on PDL format print data received via an interface (not shown) (including a network interface). The selector 5 selects one of the image data output from the document reading unit 3 and the rendering unit 4 in accordance with an instruction from the control unit 1 and outputs the selected image data to the encoding processing unit 6. The encoding processing unit 6 encodes the image data output from the selector 5. The secondary storage device 7 (hard disk device in the embodiment) stores the encoded data output from the encoding processing unit 6. The decoding processing unit 8 reads and decodes the encoded data stored in the secondary storage device 7 in the storage order. The decryption processing unit 8 has a reconfigurable logic 801 for performing decryption. The switching control unit 802 reads the code identification bit indicating the encoding method added to the head of the code data, and constructs the reconfigurable logic 801 with the corresponding configuration information. Configuration information 1 is configuration information of a decoding circuit corresponding to the first encoding scheme, and configuration information 2 is configuration information of a decoding circuit corresponding to the second encoding scheme. The image processing unit 9 receives the decoded image from the decoding processing unit 8, converts the RGB color space to YMC, which is a recording color space, performs UCR (Under Color Removal) processing, and also performs image data correction processing. . The printer engine unit 10 has a laser beam printer engine as its printing mechanism, but may be an ink jet printer that discharges ink liquid, and may be of any type.

以上の構成において、例えば、利用者が操作部2を操作して複写モードを選択し、原稿を原稿読取部3(ADF)にセットして複写開始キーを押下することにより,複写が開始される。このとき原稿読取部3で読取られた原稿画像データは、ラスタ順に、セレクタ5を介して符号化処理部6に転送され、ここで圧縮符号化されて二次記憶装置7に格納される。また、外部より印刷データを受信した場合は、セレクタ5をレンダリング部4を選択するように設定し、レンダリング部4が生成した印刷データに基づく画像を圧縮符号化して二次記憶装置7に格納する。復号処理部8は、プリンタエンジン部10の印刷速度に応じて、二次記憶装置7から符号化データを読み出して復号する。そして画像処理部9で復号した画像データからYMCK成分の画像データを生成する。そして、その結果をプリンタエンジン部10に出力して印刷する。   In the above configuration, for example, when the user operates the operation unit 2 to select the copy mode, sets the document in the document reading unit 3 (ADF), and presses the copy start key, the copy is started. . At this time, the document image data read by the document reading unit 3 is transferred to the encoding processing unit 6 via the selector 5 in raster order, where it is compression encoded and stored in the secondary storage device 7. When print data is received from the outside, the selector 5 is set to select the rendering unit 4, and an image based on the print data generated by the rendering unit 4 is compression-encoded and stored in the secondary storage device 7. . The decoding processing unit 8 reads the encoded data from the secondary storage device 7 and decodes it according to the printing speed of the printer engine unit 10. Then, YMCK component image data is generated from the image data decoded by the image processing unit 9. The result is output to the printer engine unit 10 and printed.

尚、二次記憶装置7への符号化データの格納処理と、復号して印刷するための読み出し処理は非同期である。つまり二次記憶装置7は、画像の符号化処理と復号処理との間に介在するバッファとして機能する。そして原稿の読取りと符号化処理は、復号と印刷(記録)処理に非依存なので、多数の原稿を高速に読取ることができ、次のジョブの原稿読取りに迅速に移行できる。以上、本実施形態における複合機全体の構成について説明した。次に、本複合機の特徴部分である符号化処理部6について説明する。   The process for storing the encoded data in the secondary storage device 7 and the reading process for decoding and printing are asynchronous. That is, the secondary storage device 7 functions as a buffer interposed between the image encoding process and the decoding process. Since the original reading and encoding process is independent of the decoding and printing (recording) process, a large number of originals can be read at a high speed, and the process can quickly move to the original reading of the next job. The overall configuration of the multifunction machine according to the present embodiment has been described above. Next, the encoding processing unit 6 that is a characteristic part of the multifunction peripheral will be described.

図2は、本実施形態に係る符号化処理部6のブロック図である。   FIG. 2 is a block diagram of the encoding processing unit 6 according to the present embodiment.

入力部101は、複数ライン分のラインバッファメモリを内蔵し、前述したように、セレクタ5を介して、原稿読取部3或いはレンダリング部4からの画像データをラスタ順に入力する。そして内蔵しているラインバッファに画像データを格納し、所定サイズ(ここでは32×32画素)のブロック単位で出力する。第1符号化部102は非可逆符号化部で、入力部101より入力した画素ブロック単位に非可逆符号化処理を行い、その結果(符号化データ)を出力する。但し、符号化データの先頭には、第1符号化部102で符号化されたことを示す符号識別ビット「0」(非可逆符号を示す)を付加する。本実施形態に係る第1符号化部102は、JPEG符号化(非可逆符号化)を適用した例を説明する。つまり、8×8画素単位に相当する画像データを直交変換し、所定の量子化ステップで量子化し、ハフマン符号化処理を行う。JPEGによる画像符号化は、自然画に適した技術として知られている。   The input unit 101 includes a line buffer memory for a plurality of lines, and inputs the image data from the document reading unit 3 or the rendering unit 4 via the selector 5 in the raster order as described above. Then, the image data is stored in a built-in line buffer, and is output in units of blocks of a predetermined size (here 32 × 32 pixels). The first encoding unit 102 is an irreversible encoding unit, performs irreversible encoding processing on a pixel block basis input from the input unit 101, and outputs the result (encoded data). However, a code identification bit “0” (indicating irreversible code) indicating that the data has been encoded by the first encoding unit 102 is added to the head of the encoded data. The first encoding unit 102 according to the present embodiment will explain an example in which JPEG encoding (lossy encoding) is applied. That is, image data corresponding to 8 × 8 pixel units is orthogonally transformed, quantized at a predetermined quantization step, and Huffman coding processing is performed. Image coding by JPEG is known as a technique suitable for natural images.

第2符号化部103は、第1符号化部102と異なり可逆符号化部である。このため、その復号結果は符号化する前の画像と同じとなり原理的に画質の劣化は発生しない。但し、圧縮率に影響を与えるパラメータの設定も無い。本実施形態では、この第2符号化部103の符号化にJPEG−LSを用いた。JPEG−LSは「JPEG」を冠するものの、第1符号化部102で採用している非可逆符号化JPEGとはそのアルゴリズムは全く異なる。JPEG−LS符号化の特徴は、文字線画、コンピュータグラフィックスに適した技術であり、これらの画像の場合には、非可逆符号化であるJPEGよりも遥かに少ない符号データを生成することができる。   Unlike the first encoding unit 102, the second encoding unit 103 is a lossless encoding unit. For this reason, the decoding result is the same as the image before encoding, and in principle there is no deterioration in image quality. However, there is no parameter setting that affects the compression rate. In the present embodiment, JPEG-LS is used for the encoding of the second encoding unit 103. Although JPEG-LS bears “JPEG”, its algorithm is completely different from the lossy encoded JPEG employed in the first encoding unit 102. The feature of JPEG-LS encoding is a technique suitable for character line drawing and computer graphics. In the case of these images, it is possible to generate much less code data than JPEG which is lossy encoding. .

また第2符号化部103は、第1符号化部102と実質的に同じタイミングで、同じ画素ブロックに対して符号化を行って符号化データを出力する。また第2符号化部103は、符号化データを出力する際に、その符号化データの先頭に第2符号化部103で符号化されたことを示す符号識別ビットの「1」(可逆符号を示す)を付加する。   The second encoding unit 103 performs encoding on the same pixel block at substantially the same timing as the first encoding unit 102 and outputs encoded data. In addition, when the second encoding unit 103 outputs the encoded data, the code identification bit “1” (reversible code indicates that the encoded data is encoded by the second encoding unit 103 at the head of the encoded data). Add).

第1符号長検出部108は、第1符号化部102から出力される画素ブロックの符号化データ長(符号識別ビット(1ビット)を含む)を検出し、その検出した符号長を識別ビット生成部110に出力する。第2符号長検出部109は、第2符号化部103から出力される画素ブロックの符号化データ長(符号識別ビット(1ビット)を含む)を検出し、その検出した符号長を識別ビット生成部110に出力する。識別ビット生成部110は、本実施形態に係る符号化処理部6の制御を司るものである。その処理の1つとして、第1及び第2符号長検出部108,109からの符号長と、内蔵したLUT(ルックアップテーブル)120(図3)を用いて、符号化処理部6から出力する符号化データを決定する。符号メモリ111,112はそれぞれ、可逆符号化データと非可逆符号化データを格納する。セレクタ125は、識別ビット生成部110からの符号識別ビット113に従って、符号メモリ111或いは112に記憶されている符号化データを二次記憶装置7に出力する。   The first code length detector 108 detects the encoded data length (including the code identification bit (1 bit)) of the pixel block output from the first encoder 102, and generates the detected code length as an identification bit. Output to the unit 110. The second code length detection unit 109 detects the encoded data length (including the code identification bit (1 bit)) of the pixel block output from the second encoding unit 103, and generates the detected code length as an identification bit. Output to the unit 110. The identification bit generator 110 controls the encoding processor 6 according to the present embodiment. As one of the processes, the code length from the first and second code length detectors 108 and 109 and the built-in LUT (lookup table) 120 (FIG. 3) are used to output from the encoding processor 6. Determine the encoded data. The code memories 111 and 112 store lossless encoded data and lossy encoded data, respectively. The selector 125 outputs the encoded data stored in the code memory 111 or 112 to the secondary storage device 7 in accordance with the code identification bit 113 from the identification bit generation unit 110.

図3は、本実施形態1に係る識別ビット生成部110の構成を説明するブロック図である。尚、図2と共通する部分は同じ記号で示し、その説明を省略する。   FIG. 3 is a block diagram illustrating a configuration of the identification bit generation unit 110 according to the first embodiment. Parts common to those in FIG. 2 are denoted by the same symbols, and description thereof is omitted.

LUT120には、アドレスとして、第1符号長検出部108からの符号長、第2符号長検出部109からの符号長、及び、一つ前のブロックで選択された符号化の符号識別ビット123が供給される。この一つ前のブロックで選択された符号識別ビット123は、2つの境界条件関数f1()、f2()のテーブルを選択するための信号とみなすことができる。この符号識別ビット123は符号化制御部130より出力される。符号化制御部130は、CPU,RAM,ROM等を具備し、符号識別ビット123の生成処理を含めて図7に示すフローチャートに従って符号化処理部6全体を統括制御する。   The LUT 120 includes, as addresses, a code length from the first code length detection unit 108, a code length from the second code length detection unit 109, and a code identification bit 123 of the encoding selected in the previous block. Supplied. The code identification bit 123 selected in the immediately preceding block can be regarded as a signal for selecting a table of two boundary condition functions f1 () and f2 (). The code identification bit 123 is output from the encoding control unit 130. The encoding control unit 130 includes a CPU, a RAM, a ROM, and the like, and comprehensively controls the entire encoding processing unit 6 according to the flowchart shown in FIG.

本実施形態では、第1符号化部102に非可逆符号化であるJPEGを採用し、第2符号化部103に可逆符号化であるJPEG−LSを採用する。JPEGは周知の通り自然画の圧縮に適した符号化技術であるが文字線画等についての圧縮率は高くない。一方、JPEG−LSは、文字線画(カラーを含む)や単調な棒グラフ等の画像の圧縮に好適なもので、可逆符号化であるために画像劣化は原理的に発生しない。但し、JPEG−LSは自然画についての圧縮率は高くない。つまり、これら2つの符号化技術は互いに補う関係にある。   In the present embodiment, JPEG that is lossy encoding is used for the first encoding unit 102, and JPEG-LS that is lossless encoding is used for the second encoding unit 103. As is well known, JPEG is an encoding technique suitable for natural image compression, but the compression rate for character line images and the like is not high. On the other hand, JPEG-LS is suitable for compression of images such as character line drawings (including color) and monotonous bar graphs, and since it is lossless encoding, image degradation does not occur in principle. However, JPEG-LS does not have a high compression ratio for natural images. That is, these two encoding techniques are complementary to each other.

本実施形態に係る複写機が扱うと想定される画像を複数サンプリングして32×32画素ブロック単位に可逆符号化して得られた符号化データの符号長をLx、同一画素ブロックを非可逆符号化で符号化して得られた符号化データの符号長をLyとする。そのときLx,Lyを座標とする点P(Lx,Ly)をプロットし、その点が発生する頻度が高い領域を示すのが図4である。   A plurality of images assumed to be handled by the copier according to the present embodiment are sampled and losslessly encoded in 32 × 32 pixel block units, the code length of the encoded data is Lx, and the same pixel block is irreversibly encoded. Let Ly be the code length of the encoded data obtained by encoding in step (b). At that time, a point P (Lx, Ly) having Lx and Ly as coordinates is plotted, and FIG. 4 shows a region where the frequency of occurrence of the point is high.

図4は、本実施形態における可逆符号と非可逆符号の一方を選択する際の境界条件を説明するための図である。   FIG. 4 is a diagram for explaining a boundary condition when selecting one of the lossless code and the lossy code in the present embodiment.

領域401は、文字線画などが主に存在する領域であり、領域403は自然画などに対応する領域である。ここで符号化データの圧縮効率の観点からすれば、符号化処理部6から出力する符号化データは次のような条件で決定するのが好ましい。
(1)Ly<Lxの関係にあるとき、符号化処理部6は、第1符号化部102からの非可逆符号化データを出力する。
(2)Ly≧Lxの関係にあるとき、符号化処理部6は、第2符号化部103からの可逆符号化データを出力する。このようにすると、符号化データ量を最小にできる。
An area 401 is an area where character line drawings and the like mainly exist, and an area 403 is an area corresponding to natural images and the like. Here, from the viewpoint of the compression efficiency of the encoded data, the encoded data output from the encoding processing unit 6 is preferably determined under the following conditions.
(1) When there is a relationship of Ly <Lx, the encoding processing unit 6 outputs the lossy encoded data from the first encoding unit 102.
(2) When there is a relationship of Ly ≧ Lx, the encoding processing unit 6 outputs the lossless encoded data from the second encoding unit 103. In this way, the amount of encoded data can be minimized.

しかしながら、境界条件Ly=Lxの場合は、図4に示す領域401が境界406で分断されることになり、非可逆符号化データと可逆符号化データが頻度の高い領域で混在するので好ましくない。そこで、領域401と領域403で符号化方式を別々に設定するのが好ましい。但し、両領域の間の領域についても頻度は低いものの確率的には必ず発生する。例えば自然画において局所的に線画の性質が強い部分は存在し、そのような部分を含むブロックは両領域の間に存在すると思われる。文字線画においても同様に局所的に自然画の性質の強い部分があり得る。そこで本実施形態では、実線407(f1(x))と境界線408(f2(x))で示される2つの非線形な境界条件を設定する。前述の境界関数f1()は実線407に相当し、境界関数f2()は境界線408に相当している。ここで比較の意味で従来技術における境界関数ついて言及すると、従来は図6の405示す破線のように1つの境界関数f()だけが設定されていた。   However, the boundary condition Ly = Lx is not preferable because the region 401 shown in FIG. 4 is divided by the boundary 406, and the lossy encoded data and the lossless encoded data are mixed in a high-frequency region. Therefore, it is preferable to set the encoding method separately in the region 401 and the region 403. However, although the frequency is low in the area between the two areas, it always occurs probabilistically. For example, there is a portion where the nature of a line drawing is locally strong in a natural image, and a block including such a portion is considered to exist between both regions. Similarly, a character / line image may have a portion having a strong natural image property locally. Therefore, in this embodiment, two nonlinear boundary conditions indicated by a solid line 407 (f1 (x)) and a boundary line 408 (f2 (x)) are set. The boundary function f 1 () corresponds to the solid line 407, and the boundary function f 2 () corresponds to the boundary line 408. Here, referring to the boundary function in the prior art for comparison, only one boundary function f () is conventionally set as shown by a broken line 405 in FIG.

本実施形態では、境界関数f1()とf2()の間の領域では、符号化処理部6は、先行する直前のブロックの符号化と同じ符号化データを選択する。即ち、前ブロックが領域401に存在していた場合は可逆符号化が選択されていたため符号識別ビットが「1」となって、境界関数f2()の境界が現ブロックの符号化選択に用いられる。また前ブロックが領域403にいた場合は非可逆符号が選択されていたため符号識別ビットが「0」となって、境界関数f1()が現ブロックの符号化選択に用いられる。   In the present embodiment, in the region between the boundary functions f1 () and f2 (), the encoding processing unit 6 selects the same encoded data as the encoding of the preceding preceding block. That is, when the previous block exists in the area 401, lossless encoding has been selected, so the code identification bit is “1”, and the boundary of the boundary function f2 () is used for encoding selection of the current block. . When the previous block is in the area 403, the lossy code has been selected, so that the code identification bit is “0”, and the boundary function f1 () is used for the coding selection of the current block.

以上の前提を踏まえて、LUT120は、例えば前ブロックにおいて第1符号化部102の出力である非可逆符号化データが選択されたときのために、LUT120の、符号識別ビットが「0」であるアドレスの領域に1ビットの信号を予め格納しておく。ここで、Ly≧f1(Lx)という関係にあるアドレス位置には「1」、Ly<f1(Lx)という関係にあるアドレス位置には「0」を格納する。   Based on the above assumptions, the LUT 120 has the code identification bit of “0” in the LUT 120 when, for example, the lossy encoded data that is the output of the first encoding unit 102 is selected in the previous block. A 1-bit signal is stored in advance in the address area. Here, “1” is stored in the address position having the relationship of Ly ≧ f 1 (Lx), and “0” is stored in the address position having the relationship of Ly <f 1 (Lx).

ここで、Ly≧f2(Lx)という関係にあるアドレス位置には「1」を、Ly<f2(Lx)という関係にあるアドレス位置には「0」を格納する。そして、アドレスされた際にそのビットを符号識別ビット113として出力する。この符符号識別ビット113は、セレクタ125の選択信号として供給される。また、この符号識別ビット113は符号化制御部130に取り込まれて、前ブロックの符号識別ビット123としてLUT120に出力され、次のブロックのための境界条件関数の選択に使用される。   Here, “1” is stored in the address position having the relationship Ly ≧ f 2 (Lx), and “0” is stored in the address position having the relationship Ly <f 2 (Lx). When addressed, the bit is output as the code identification bit 113. The code identification bit 113 is supplied as a selection signal for the selector 125. The code identification bit 113 is taken into the encoding control unit 130 and output to the LUT 120 as the code identification bit 123 of the previous block, and is used for selecting a boundary condition function for the next block.

図7は、本実施形態に係る符号化処理部6の処理を説明するフローチャートである。このフローチャートは、前ブロックの符号識別ビットが「1」(可逆符号化)のときに処理されるS100からS105までの処理と、前ブロックの符号識別ビットが「0」(非可逆符号化)のときに処理されるS110からS115とに分かれる。   FIG. 7 is a flowchart for explaining the processing of the encoding processing unit 6 according to this embodiment. In this flowchart, the processing from S100 to S105, which is performed when the code identification bit of the previous block is “1” (lossless coding), and the code identification bit of the previous block is “0” (lossy coding) The process is divided into S110 to S115 which are sometimes processed.

画像の最初のブロックでは、文字線画の領域であると見なしてS100から処理を開始する。S100で、ページの最後かどうかを判断し、そうであれば処理を終了するが、そうでなければS101に進む。S101では、最初のブロックを第1符号化部102、第2符号化部103を用いて符号化する。こうして符号化を終了すると、第1及び第2符号長検出部108,109により、その符号化データの符号長が検出されてLUT120に入力される。また符号化制御部130は、前ブロックの符号識別ビット123に「1」を出力する(S102)。   In the first block of the image, it is assumed that the area is a character line drawing area, and the process starts from S100. In S100, it is determined whether or not it is the end of the page. If so, the process ends. If not, the process proceeds to S101. In S101, the first block is encoded using the first encoding unit 102 and the second encoding unit 103. When the encoding is completed in this way, the code length of the encoded data is detected by the first and second code length detectors 108 and 109 and input to the LUT 120. Also, the encoding control unit 130 outputs “1” to the code identification bit 123 of the previous block (S102).

これによりLUT120は、S103で、それらの入力に従ってLy≧f2(Lx)の関係が成立したかどうかを判定する。そしてLy≧f2(Lx)であればS104に進み、符号識別ビットとして「1」を出力し、現ブロックの符号化データとして第2符号化部103の可逆符号化データを出力してS100に戻る。一方、Ly≧f2(Lx)が成立しないときはS105に進み、符号識別ビットとして「0」を出力し、現ブロックの符号化データとして第1符号化部102の非可逆符号化データを出力してS110に進む。   Thereby, the LUT 120 determines whether or not the relationship of Ly ≧ f2 (Lx) is established according to those inputs in S103. If Ly ≧ f2 (Lx), the process proceeds to S104, where “1” is output as the code identification bit, the lossless encoded data of the second encoding unit 103 is output as the encoded data of the current block, and the process returns to S100. . On the other hand, when Ly ≧ f2 (Lx) does not hold, the process proceeds to S105, where “0” is output as the code identification bit, and the lossy encoded data of the first encoding unit 102 is output as the encoded data of the current block. The process proceeds to S110.

S110では、S100と同様にページの最後かどうかを判定し、最後でないときはS111に進み、次のブロックを符号化処理する。S111では、そのブロックを第1符号化部102、第2符号化部103を用いて符号化する。こうして符号化を終了すると、第1及び第2符号長検出部108,109により、その符号化データの符号長が検出されてLUT120に入力される。また符号化制御部130は、前ブロックの符号識別ビット123に「0」を出力する(S112)。LUT120は、それらの入力に従ってLy≧f1(Lx)の関係が成立したかどうかを判定する(S113)。そしてLy≧f1(Lx)であればS114に進み、符号識別ビットとして「1」を出力し、現ブロックの符号化データとして第2符号化部103の可逆符号化データを出力してS100に戻る。一方、Ly≧f1(Lx)が成立しないときはS115に進み、符号識別ビットとして「0」を出力し、現ブロックの符号化データとして第1符号化部102の非可逆符号化データを出力してS110に進む。   In S110, it is determined whether or not it is the end of the page as in S100. If it is not the end, the process proceeds to S111, and the next block is encoded. In S111, the block is encoded using the first encoding unit 102 and the second encoding unit 103. When the encoding is completed in this way, the code length of the encoded data is detected by the first and second code length detectors 108 and 109 and input to the LUT 120. Also, the encoding control unit 130 outputs “0” to the code identification bit 123 of the previous block (S112). The LUT 120 determines whether a relationship of Ly ≧ f1 (Lx) is established according to those inputs (S113). If Ly ≧ f1 (Lx), the process proceeds to S114, where “1” is output as the code identification bit, the lossless encoded data of the second encoding unit 103 is output as the encoded data of the current block, and the process returns to S100. . On the other hand, when Ly ≧ f1 (Lx) does not hold, the process proceeds to S115, where “0” is output as the code identification bit, and the lossy encoded data of the first encoding unit 102 is output as the encoded data of the current block. The process proceeds to S110.

以上、本実施形態1に係る符号化処理部6の大まかな処理内容について説明した。次に、実施形態1における識別ビット生成部110での、符号化データを決定する原理について説明する。   The rough processing contents of the encoding processing unit 6 according to the first embodiment have been described above. Next, the principle of determining the encoded data in the identification bit generation unit 110 in the first embodiment will be described.

図5と図6は、本実施形態1で符号化方式の切替回数が減少する例を説明する図である。   5 and 6 are diagrams for explaining an example in which the number of times of switching of the coding method is decreased in the first embodiment.

図5は画像の一部を例に取り、32×32画素ブロック単位で、ブロックb1,b2,b3,…の順に符号化処理部6へ転送されるブロックが、それぞれどちらの符号化が選択されるかを示している。図において、500は、本実施形態における符号識別ビット(符号化の切換えに相当)を示し、501は従来の符号化の切換えを示している。   FIG. 5 shows a part of an image as an example. Which block is selected for each block transferred to the encoding processing unit 6 in the order of blocks b1, b2, b3,... In units of 32 × 32 pixel blocks. It shows that. In the figure, reference numeral 500 denotes a code identification bit (corresponding to encoding switching) in the present embodiment, and reference numeral 501 denotes conventional encoding switching.

また図6は、2種類の符号化による各ブロックの符号データ量をプロットした図である。   FIG. 6 is a diagram plotting the amount of code data of each block by two types of encoding.

図5において、ブロックb1,b2に対しては、第1方式である非可逆符号化が選択される。ブロックb3ではノイズの点で境界付近の領域に移っている。このため従来の選択方法では、境界線405で判断していたため、ブロックb3は第2符号化方法(可逆符号化)が選択される。これに対して本実施形態によれば、境界線408に基づいて判断されるため、ブロックb3は、図5に示すように、第1符号化(非可逆符号化)のままとなる。図5に示す本実施形態によれば、符号化の切換えが、従来と比べて2回減少することがわかる。   In FIG. 5, for the blocks b1 and b2, lossy encoding which is the first method is selected. In block b3, the area moves to the vicinity of the boundary in terms of noise. For this reason, in the conventional selection method, since the determination is made based on the boundary line 405, the second encoding method (lossless encoding) is selected for the block b3. In contrast, according to the present embodiment, since the determination is based on the boundary line 408, the block b3 remains in the first encoding (lossy encoding) as shown in FIG. According to the present embodiment shown in FIG. 5, it can be seen that the switching of encoding is reduced twice compared to the conventional case.

またブロックb4からb8では、図6からわかるように画像の性質が文字線画の領域401から自然画の領域403へ移行している。従来は境界線405で判定するため、ブロックb6から第2符号化方式(可逆符号化)に変更される。しかし本実施形態1では、境界線408に基づいて判定されるため、ブロックb6では第1符号化(非可逆符号化)が維持される。   In blocks b4 to b8, as can be seen from FIG. 6, the property of the image is shifted from the character / line drawing area 401 to the natural picture area 403. Conventionally, since the determination is made at the boundary line 405, the block b6 is changed to the second encoding method (lossless encoding). However, in this Embodiment 1, since it determines based on the boundary line 408, the 1st encoding (irreversible encoding) is maintained in the block b6.

同様にブロックb8からb12までは、図6のから分かるように画像の性質が自然画の領域403から文字線画の領域401へ移行している。従来は、境界線405で判定するため、ブロックb9から第2符号化(可逆符号化)に変更される。しかし本実施形態1では、ブロックb9は境界線408に基づいて判断されるとため第1符号化(非可逆符号化)が維持される。このような符号化方法の切替による画質と圧縮効率に対する影響は、境界付近に限られるので限定的である。尚、以上の説明で、本実施形態の符号化方式をLUT120により選択したが、境界関数f1()、f2()を演算回路で構成するなどの技術を用いて行っても良い。   Similarly, in blocks b8 to b12, as can be seen from FIG. 6, the nature of the image has shifted from the natural image region 403 to the character / line image region 401. Conventionally, since the determination is made at the boundary line 405, the block b9 is changed to the second encoding (lossless encoding). However, in the first embodiment, since the block b9 is determined based on the boundary line 408, the first encoding (lossy encoding) is maintained. The influence on image quality and compression efficiency due to such switching of the encoding method is limited because it is limited to the vicinity of the boundary. In the above description, the encoding method of this embodiment is selected by the LUT 120. However, the encoding may be performed using a technique such as configuring the boundary functions f1 () and f2 () with an arithmetic circuit.

以上説明したように本実施形態1によれば、符号化方法の切換え回数を減らすことができるため、コンフィグレーションデータの切替に伴う時間的オーバーヘッドを減少させてトータルの符号化時間を短くできるという効果がある。   As described above, according to the first embodiment, since the number of encoding method switching can be reduced, the time overhead associated with the switching of configuration data can be reduced and the total encoding time can be shortened. There is.

<実施形態2>
上記実施形態1では、直前のブロックの符号化方法を判定することにより、対象ブロックの判定に対して符号化方法が変化しない方向に重み付けるような境界関数を選んでいた。それにより例えば自然画の領域に局所的に文字線画的なブロックがノイズ的に発生しても符号化の切換え抑制していた。同様な効果を得る方法として、符号化方法が変化するためには、既定の回数、逆の判定が連続したときに初めて符号化方式を切り替える方法がある。以下、この切換え方法に係る実施形態2を説明する。尚、この実施形態2では、選択される符号が切り替わるために必要な、連続して発生するブロック数を予め定めておく。そして第1符号化方法から第2符号化方法に切り替るためには連続して2ブロック以上、第2符号化方法から第1符号化方法に切り替わるためには連続して3ブロック以上、逆の結果が得られることを条件(ヒステリシス特性をもたせる)としている。尚、本実施形態2に係る構成は、符号化処理部6の識別ビット生成部の構成が前述の実施形態1と異なるだけで、その他の構成は前述の実施形態1と同じである。よって、それらの構成の説明を省略する。
<Embodiment 2>
In the first embodiment, the boundary function is selected so as to weight the direction in which the encoding method does not change relative to the determination of the target block by determining the encoding method of the immediately preceding block. As a result, for example, even if a character / line-like block is locally generated in a natural image area as a noise, the switching of encoding is suppressed. As a method of obtaining the same effect, there is a method of switching the encoding method for the first time when the reverse determination continues for a predetermined number of times in order to change the encoding method. Hereinafter, Embodiment 2 according to this switching method will be described. In the second embodiment, the number of continuously generated blocks necessary for switching the selected code is determined in advance. In order to switch from the first encoding method to the second encoding method, two or more blocks are continuous. To switch from the second encoding method to the first encoding method, three or more blocks are consecutive. It is assumed that the result is obtained (having hysteresis characteristics). The configuration according to the second embodiment is the same as the first embodiment except that the configuration of the identification bit generation unit of the encoding processing unit 6 is different from that of the first embodiment. Therefore, description of those configurations is omitted.

図8は、本発明の実施形態2に係る識別ビット生成部110aの構成を説明する図である。   FIG. 8 is a diagram illustrating the configuration of the identification bit generation unit 110a according to the second embodiment of the present invention.

LUT220には、アドレスとして、第1符号長検出部108からの符号長、第2符号長検出部109からの符号長が供給されている。前述の実施形態1では、2つの境界条件関数f1()、f2()のテーブルが用意されていたのに対し、本実施形態2では、図6の境界線405で示す境界関数1つのみとしている。これは従来の技術の境界関数と同じでよく、f()とする。またLUT220は仮選択ビット信号124を出力する。ここでLUT220には以下のようにデータを用意しておく。つまり、第1符号長をLy、第2符号長をLxとしたときLy≧f(Lx)という条件が成立するアドレス位置には「1」、それ以外には「0」を予め格納している。またLUT220から出力された仮選択ビット信号124は、符号化制御部130aへ直接入力される。この符号化制御部130aは、CPU、RAM、ROMを具備し、符号処理部6の全体を制御すると共に仮選択ビット信号124に基づいて、図9のフローチャートに従って符号識別ビット113を生成する。   The LUT 220 is supplied with the code length from the first code length detection unit 108 and the code length from the second code length detection unit 109 as addresses. In the first embodiment described above, the table of the two boundary condition functions f1 () and f2 () is prepared, whereas in the second embodiment, only one boundary function indicated by the boundary line 405 in FIG. Yes. This may be the same as the boundary function of the prior art, and is assumed to be f (). The LUT 220 outputs a temporary selection bit signal 124. Here, data is prepared in the LUT 220 as follows. That is, when the first code length is Ly and the second code length is Lx, “1” is stored in advance at the address position where the condition Ly ≧ f (Lx) is satisfied, and “0” is stored in the other positions. . The temporary selection bit signal 124 output from the LUT 220 is directly input to the encoding control unit 130a. The encoding control unit 130 a includes a CPU, a RAM, and a ROM, controls the entire code processing unit 6, and generates a code identification bit 113 according to the flowchart of FIG. 9 based on the temporary selection bit signal 124.

図9は、本実施形態2に係る符号化処理部6の処理を説明するフローチャートである。このフローチャートは、前ブロックの符号識別ビットが「1」のときに実行されるS201からS205までの処理と、前ブロックの符号識別ビットが「0」のときに実行されるS211からS215とに分かれる。   FIG. 9 is a flowchart for explaining processing of the encoding processing unit 6 according to the second embodiment. This flowchart is divided into S201 to S205, which are executed when the code identification bit of the previous block is “1”, and S211 to S215, which are executed when the code identification bit of the previous block is “0”. .

ここでも前述の図7と同様に、画像の最初のブロックでは、文字線画の領域であると見なしてS201から開始する。S201はページの最後かどうかを判定し、最後でないときはS202に進み、最初のブロックを第1符号化部102、第2符号化部103を用いて符号化する。こうして符号化を終了すると、第1符号長と第2符号長がLUT220に入力される。これによりLUT220は、それらの入力に従い、Ly≧f(Lx)が成立したときは「1」を仮選択ビット信号124として出力する。符号化制御部130aは、その入力した仮選択ビット信号124と、以前に入力した仮選択ビット信号を保持している。ここでページの最初は文字線画領域と仮定しているため、過去に入力された仮選択ビット信号は全て「1」とする。   Here, similarly to the above-described FIG. 7, the first block of the image is regarded as a character / line drawing region and starts from S201. In step S201, it is determined whether the page is the last page. If the page is not the last page, the process proceeds to step S202, and the first block is encoded using the first encoding unit 102 and the second encoding unit 103. When the encoding is thus completed, the first code length and the second code length are input to the LUT 220. As a result, the LUT 220 outputs “1” as the temporary selection bit signal 124 when Ly ≧ f (Lx) is established according to these inputs. The encoding control unit 130a holds the input temporary selection bit signal 124 and the previously input temporary selection bit signal. Here, since it is assumed that the beginning of the page is a character / line drawing area, all temporarily selected bit signals input in the past are set to “1”.

S203で、符号化制御部130は現ブロックの仮選択ビット信号124を含めて2ブロック連続(nブロック連続)して「0」であるか判定する。そうであればS205に進み、符号識別ビット113として「0」を出力してS210に進む。一方、それ以外のときははS204に進み、符号識別ビット113として「1」を出力してS201に戻る。   In S <b> 203, the encoding control unit 130 determines whether it is “0” after two blocks (n blocks are continuous) including the temporary selection bit signal 124 of the current block. If so, the process proceeds to S205, where “0” is output as the code identification bit 113, and the process proceeds to S210. On the other hand, otherwise, the process proceeds to S204, where “1” is output as the code identification bit 113, and the process returns to S201.

S210では、ページの最後かどうかを判定し、最後以外のときはS211に進み、次のブロックを符号化する。この符号化が終了すると、第1符号長と第2符号長がLUT220に入力される。LUT220は、それらの入力に従い、Ly≧f(Lx)が成立したときは「1」を仮選択ビット信号124として出力する。符号化制御部130aは、その入力された仮選択ビット信号124と、以前に入力された仮選択ビット信号を保持している。そしてS213で、符号化制御部130aは、現ブロックの仮選択ビット信号を含めて3ブロック連続して「1」であるか判定する。そうであればS216に進み、符号識別ビット113として「1」を出力する。一方、それ以外のときはS215に進んで、符号識別ビット113として「0」を出力する。   In S210, it is determined whether or not the page is the last page. If it is not the last page, the process proceeds to S211 to encode the next block. When this encoding is completed, the first code length and the second code length are input to the LUT 220. In accordance with these inputs, the LUT 220 outputs “1” as the temporary selection bit signal 124 when Ly ≧ f (Lx) is established. The encoding control unit 130a holds the input temporary selection bit signal 124 and the previously input temporary selection bit signal. In step S213, the encoding control unit 130a determines whether the block is “1” continuously for three blocks including the temporary selection bit signal of the current block. If so, the process proceeds to S216, and “1” is output as the code identification bit 113. On the other hand, in other cases, the process proceeds to S215 to output “0” as the code identification bit 113.

このようにして、仮選択ビット信号124が3ブロック連続で「1」、即ち、第2符号化(可逆符号化)が3ブロック連続(mブロック連続)で仮選択されて初めて第2符号化が選択される。一方、仮選択信号が2ブロック連続で「0」、即ち2ブロック連続で第1符号化(非可逆)が仮選択されて初めて第1符号化が選択される。   In this way, the provisional selection bit signal 124 is “1” for three consecutive blocks, that is, the second coding (lossless coding) is provisionally selected for three consecutive blocks (continuous m blocks). Selected. On the other hand, the first encoding is selected only when the temporary selection signal is “0” for two consecutive blocks, that is, the first encoding (irreversible) is temporarily selected for two consecutive blocks.

このように実施形態2では、仮の選択ビット信号で、先行するブロックで選択した符号化方式とは異なる第1符号化方式が少なくともnブロック連続して選択される。このとき、第1符号化方式で符号化された符号化データを現ブロックの符号化データとして選択する第1選択を行う、また仮の選択ビット信号で、先行するブロックで選択した符号化方式とは異なる第2符号化方式が少なくともm(≠n)ブロック連続して選択される。このときは、第2符号化方式で符号化された符号化データを現ブロックの符号化データとして選択する第2選択を実行している。   As described above, in the second embodiment, at least n blocks of the first encoding scheme different from the encoding scheme selected in the preceding block are selected in succession using the temporary selection bit signal. At this time, the first selection for selecting the encoded data encoded by the first encoding method as the encoded data of the current block is performed, and the encoding method selected in the preceding block by the temporary selection bit signal; A different second encoding scheme is selected in succession for at least m (≠ n) blocks. At this time, the second selection for selecting the encoded data encoded by the second encoding method as the encoded data of the current block is executed.

図10は、実施形態2において、図6に示したブロックb1からb12の画像データが入力されたときの結果の一例を示す図である。   FIG. 10 is a diagram illustrating an example of a result when the image data of the blocks b1 to b12 illustrated in FIG. 6 are input in the second embodiment.

1000で示す仮選択ビット信号は、LUT220がブロックb1からb12に対して生成した従来例に基づく結果を示し、図6の境界関数f(x)で表される破線405により決定されている。1001は、本実施形態2に係る処理の結果を示している。   A temporary selection bit signal indicated by 1000 indicates a result based on the conventional example generated by the LUT 220 for the blocks b1 to b12, and is determined by a broken line 405 represented by a boundary function f (x) in FIG. Reference numeral 1001 denotes a result of the processing according to the second embodiment.

ブロックb3では、仮選択ビット信号124が「0」として1度だけしか出現していないので符号識別ビットは「1」になる。また仮選択ビット信号124が「1」から「0」に移行するブロックb5からb7では、「0」が2回続けて発生したブロックb7で初めて符号識別ビット113が「0」に変化している。また、仮選択ビット信号124が「0」から「1」に移行するブロックb8からb12では、「1」が3回続けて発生したブロックb11で初めて符号識別ビット113が「1」へ移行している。   In the block b3, the temporary selection bit signal 124 is “0” and appears only once, so the code identification bit is “1”. Further, in the blocks b5 to b7 in which the temporary selection bit signal 124 shifts from “1” to “0”, the code identification bit 113 is changed to “0” for the first time in the block b7 in which “0” is generated twice in succession. . Also, in the blocks b8 to b12 in which the temporary selection bit signal 124 shifts from “0” to “1”, the code identification bit 113 shifts to “1” for the first time in the block b11 in which “1” is generated three times in succession. Yes.

このように本実施形態に2によれば、前述の実施形態1の効果に加えて、境界関数を1つだけしか使用しないので回路規模が小さくて済むという効果がある。   As described above, according to the second embodiment, in addition to the effects of the first embodiment described above, only one boundary function is used, so that the circuit scale can be reduced.

<第3の実施形態>
前述の実施形態1,2では、画像が文字線画と自然画との間を移行するとき符号識別ビットの切替が遅れるという性質を持つ。これによる影響は限定的であるが、これを解決するための形態を実施形態3として説明する。それは実施形態2において、仮選択ビット信号が変化したとき、それがノイズ的に発生したものか、異なる性質の画像領域へ移行したために発生したものか判明するまで符号化処理部6からの出力を止めるというものである。そして、それが判明した後に過去のブロックの判定をまとめて行う。
<Third Embodiment>
The first and second embodiments have the property that the switching of the code identification bit is delayed when the image transitions between a character line image and a natural image. Although the influence by this is limited, the form for solving this is demonstrated as Embodiment 3. FIG. In the second embodiment, when the temporarily selected bit signal is changed, the output from the encoding processing unit 6 is output until it is determined whether the temporary selection bit signal is generated due to noise or because it is generated due to a shift to an image area having a different property. It is to stop. Then, after it is determined, the past blocks are collectively determined.

本実施形態3においても、実施形態2と同様に、第1符号化(非可逆)から第2符号化(可逆)に切り替わるために連続して2ブロック以上、第2符号化から第1符号化に切り替わるために連続して3ブロック以上の反対の仮選択ビット信号を必要とする。従って、実施形態3に係る装置構成は、前述の実施形態2と同じである。   Also in the third embodiment, in a manner similar to the second embodiment, two or more blocks are consecutively switched from the first encoding (lossy) to the second encoding (lossless), and the second encoding to the first encoding. In order to switch to, the reverse temporary selection bit signal of 3 blocks or more is required continuously. Therefore, the apparatus configuration according to the third embodiment is the same as that of the second embodiment.

図11は、本実施形態3に係る符号化処理部6の制御処理を説明するフローチャートである。このフローチャートは、前ブロックの符号識別ビットが「1」のときに実行されるS301からS310までの処理と、前ブロックの符号識別ビットが「0」のときに実行されるS311からS323とに分かれる。   FIG. 11 is a flowchart for explaining control processing of the encoding processing unit 6 according to the third embodiment. This flowchart is divided into processing from S301 to S310 executed when the code identification bit of the previous block is “1”, and S311 to S323 executed when the code identification bit of the previous block is “0”. .

ここでも画像の最初のブロックが文字線画の領域であるとして処理を開始し、S301で、ページの最後かどうかを判定する。ページの最後でないときはS302に進み、最初のブロックを第1符号化部102、第2符号化部103を用いて符号化する。この符号化が終了すると、可逆及び非可逆の符号化データを符号メモリ111,112に格納する。尚、ここでは説明のために、S302で処理したブロックを第1ブロックとして、後段のステップで参照する。また第1及び第2符号長検出部108,109で検出された符号長がLUT220に入力される。LUT220は、それらの入力に従いLy≧f(Lx)が成立したときは仮選択ビット信号124を「1」で出力する。次にS303に進み、符号化制御部130aは、その入力した仮選択ビット信号124が「1」かどうかを判定し、「1」であればS304に進んで、現ブロックの符号識別ビットを「1」に決定する。そして符号処理部6から符号化データを出力してS301へ戻る。一方、S303で、仮選択ビット信号124が「0」であればS305に進み、画像の最後かどうかを判定し、最後であればS304へ、画像の最後でなければS306に進む。S306では、現ブロック(第1ブロック)の符号化データを符号メモリ111と符号メモリ112に保持させたまま、次のブロックの符号化を行う。尚、ここでは説明のため、S306で符号化したブロックを第2ブロックとして後段で参照する。   Again, the process is started assuming that the first block of the image is a character / line drawing area, and it is determined in S301 whether or not it is the end of the page. When it is not the end of the page, the process proceeds to S <b> 302, and the first block is encoded using the first encoding unit 102 and the second encoding unit 103. When this encoding is completed, lossless and lossy encoded data are stored in the code memories 111 and 112. Here, for the sake of explanation, the block processed in S302 is referred to as a first block and referred to in a subsequent step. The code lengths detected by the first and second code length detectors 108 and 109 are input to the LUT 220. The LUT 220 outputs the temporary selection bit signal 124 as “1” when Ly ≧ f (Lx) is established according to these inputs. In step S303, the encoding control unit 130a determines whether the input temporary selection bit signal 124 is “1”. If “1”, the encoding control unit 130a advances to step S304, and sets the code identification bit of the current block to “ 1 ”. Then, the encoded data is output from the code processing unit 6 and the process returns to S301. On the other hand, if the temporary selection bit signal 124 is “0” in S303, the process proceeds to S305 to determine whether it is the end of the image. If it is the last, the process proceeds to S304. In S306, the next block is encoded while the encoded data of the current block (first block) is held in the code memory 111 and the code memory 112. Here, for the sake of explanation, the block encoded in S306 is referred to as a second block later.

次にS307に進み、第2ブロックの仮選択ビット信号124が「1」かどうかを判定する。ここで「1」であると判定するとS308に進み、符号メモリ111,112に格納している第1ブロックと第2ブロックの符号化データに、符号識別ビットの「1」をそれぞれに付加して符号処理部6から出力する。一方、S307で、第2ブロックの仮選択ビット信号124が「0」であれば、前述のS303の判定に続いて2回連続して仮選択ビット信号124が「0」となる。このため第1ブロック、第2ブロックともに符号識別ビットを「0」として符号化処理部6から出力する。前述の実施形態2では、第2ブロックのみの符号識別ビットが「0」となっていたが、ここでは第1ブロック、第2ブロックともに「0」となる点が異なっている。   In step S307, it is determined whether the temporary selection bit signal 124 of the second block is “1”. If it is determined that it is “1”, the process proceeds to S308, where “1” of the code identification bit is added to the encoded data of the first block and the second block stored in the code memories 111 and 112, respectively. Output from the code processing unit 6. On the other hand, if the temporary selection bit signal 124 of the second block is “0” in S307, the temporary selection bit signal 124 becomes “0” twice consecutively following the determination of S303 described above. Therefore, both the first block and the second block are output from the encoding processing unit 6 with the code identification bit set to “0”. In Embodiment 2 described above, the code identification bit of only the second block is “0”, but here the difference is that both the first block and the second block are “0”.

こうしてS309で符号識別ビット113が「0」で出力された後はS311に進み、画像の最後かどうかを判定し、最後でなければS312に進み、次のブロックの符号化処理を符号化制御部130aによって行う。尚、ここでは説明のため、S302で処理したブロックを第1ブロックとして後段で参照する。   After the code identification bit 113 is output as “0” in step S309, the process proceeds to step S311 to determine whether the image is the last. If not, the process proceeds to step S312 and the next block is encoded. 130a. Here, for the sake of explanation, the block processed in S302 is referred to as a first block later.

次にS313に進み、仮選択ビット信号124が「0」かどうかを判定し、「0」であればS314に進んで、符号化制御部130aは第1ブロックに符号識別ビット113「0」を付加して符号化処理部6から出力する。尚、S313で、仮選択ビット信号124が「1」であればステップS315に進む。S315では、画像の最後かどうかを判定し、最後でなければステップ316に進み、現ブロック(第1ブロック)の符号化データを符号メモリ111と符号メモリ112に保持させたまま、次のブロックの符号化を行う。尚、ここでは説明のため、S316で符号化処理したブロックを第2ブロックとして後段のステップで参照する。   Next, the process proceeds to S313, where it is determined whether or not the temporary selection bit signal 124 is “0”. If it is “0”, the process proceeds to S314, and the encoding control unit 130a sets the code identification bit 113 “0” in the first block. In addition, the data is output from the encoding processing unit 6. If the temporary selection bit signal 124 is “1” in S313, the process proceeds to Step S315. In S315, it is determined whether or not it is the end of the image. If it is not the end, the process proceeds to step 316, and the encoded data of the current block (first block) is held in the code memory 111 and the code memory 112, and the next block is read. Encoding is performed. Here, for the sake of explanation, the block encoded in S316 is referred to as a second block in a subsequent step.

次にS317に進み、S313と同様に、第2ブロックの仮選択ビット信号124が「0」かどうかを判定する。ここで「0」であると判定するとS318に進み、符号メモリ111と符号メモリ112に保持している第1ブロックと第2ブロックの符号化データに、符号識別ビット113「0」をそれぞれに付加して符号処理部6から出力する。一方、S317で、仮選択ビット信号が「1」であればS319に進み、ページの最後かどうかを判定する。ここで最後でないと判定するとS320に進み、現ブロック(第2ブロック)の符号化データを符号メモリ111と符号メモリ112に保持させたまま、次のブロックの符号化を行う。尚、ここでは説明のため、S320で符号化処理したブロックを第3のブロックとして後段のステップで参照する。   Next, the process proceeds to S317, and it is determined whether or not the temporary selection bit signal 124 of the second block is “0” as in S313. If it is determined to be “0”, the process proceeds to S318, and the code identification bit 113 “0” is added to the encoded data of the first block and the second block held in the code memory 111 and the code memory 112, respectively. And output from the code processing unit 6. On the other hand, if the temporary selection bit signal is “1” in S317, the process proceeds to S319, and it is determined whether or not it is the end of the page. If it is determined that it is not the last, the process proceeds to S320, and the next block is encoded while the encoded data of the current block (second block) is held in the code memory 111 and the code memory 112. For the sake of explanation, the block encoded in S320 is referred to as a third block in a subsequent step.

次にS321に進み、S317と同様に、第3のブロックの仮選択ビット信号が「0」かどうかを判定する。ここで「0」であると判定されるとS322に進み、S308で保持した第1ブロックと第2ブロック及び第3のブロックの符号データに、符号識別ビット113「0」をそれぞれに付加して符号処理部6から出力する。一方、S321で、仮選択ビット信号124が「1」であれば3回連続して仮選択ビット信号が「1」となる。よって、符号メモリ111と符号メモリ112に保持している第1ブロックと第2ブロック及び第3のブロックの符号データに、符号識別ビット113「1」をそれぞれに付加して符号処理部6から出力する。前述の実施形態2では、第3のブロックのみ符号識別ビットが「0」となっていたのに対して、実施形態3では、第1ブロックと第2ブロック及び第3のブロックの符号識別ビットが「1」となる点が異なっている。   Next, in S321, as in S317, it is determined whether or not the temporary selection bit signal of the third block is “0”. If it is determined to be “0”, the process proceeds to S322, and the code identification bit 113 “0” is added to the code data of the first block, the second block, and the third block held in S308, respectively. Output from the code processing unit 6. On the other hand, if the temporary selection bit signal 124 is “1” in S321, the temporary selection bit signal becomes “1” three times in succession. Therefore, the code identification bit 113 “1” is added to the code data of the first block, the second block, and the third block held in the code memory 111 and the code memory 112 and output from the code processing unit 6. To do. In Embodiment 2 described above, the code identification bit of the third block is “0”, whereas in Embodiment 3, the code identification bits of the first block, the second block, and the third block are The difference is “1”.

図12は、実施形態3に係る符号化処理部6に、図6に示したブロックb1〜b12が入力されたときの仮選択ビット信号と符号識別ビットを示す図である。   12 is a diagram illustrating a temporary selection bit signal and a code identification bit when the blocks b1 to b12 illustrated in FIG. 6 are input to the encoding processing unit 6 according to the third embodiment.

1200は、LUT220が、ブロックb1からb12のブロックに対して生成した仮選択ビット信号124を示している。この仮選択ビット信号124は、図6の境界関数f(x)で表される破線405により決定される。本実施形態3に係る結果を示す1201では、ブロックb3は仮選択ビット信号が「0」のブロックが1度だけ出現するため、ブロックb3の符号識別ビット113は「1」にとどまる。また、仮選択ビット信号124が「1」から「0」に移行するブロックb5からb7の過程では、ブロックb6を処理し、仮選択ビット信号124が「0」に1度だけなった時点では符号データを出力しない。そして次のブロックb7を処理して仮選択ビット信号124が「0」になって2回続けて「0」が発生した時点で、ブロックb6とb7の符号識別ビット113として「0」が選択されて出力される。   Reference numeral 1200 denotes a temporary selection bit signal 124 generated by the LUT 220 for the blocks b1 to b12. The temporary selection bit signal 124 is determined by a broken line 405 represented by the boundary function f (x) in FIG. In 1201 indicating the result according to the third embodiment, the block b3 has a block whose temporary selection bit signal is “0” appears only once, so the code identification bit 113 of the block b3 remains “1”. Further, in the process of blocks b5 to b7 in which the temporary selection bit signal 124 shifts from “1” to “0”, the block b6 is processed, and when the temporary selection bit signal 124 becomes “0” only once, the code is changed. Does not output data. Then, when the next block b7 is processed and the temporary selection bit signal 124 becomes “0” and “0” is generated twice in succession, “0” is selected as the code identification bit 113 of the blocks b6 and b7. Is output.

一方、仮選択ビット信号124が「0」から「1」に移行するブロックb8からb12の過程では、ブロックb9とb10が処理された時点では、2つともにその符号データは出力されない。そしてブロックb11が処理されて、仮選択ビット信号124が「1」となって「1」が3回連続して発生する。これにより、ブロックb9,b10及びb11ではそれぞれ符号識別ビット113が「1」となって出力される。   On the other hand, in the process of blocks b8 to b12 in which the temporary selection bit signal 124 shifts from “0” to “1”, the code data of the two is not output when the blocks b9 and b10 are processed. Then, the block b11 is processed, the temporary selection bit signal 124 becomes “1”, and “1” is generated three times in succession. As a result, in the blocks b9, b10, and b11, the code identification bit 113 is output as “1”.

このようにして、仮選択ビット信号の変化点であるブロックb6とb9において、符号識別ビット113も同様に変化していることが分かる。   In this way, it can be seen that the code identification bits 113 are similarly changed in the blocks b6 and b9 which are the changing points of the temporarily selected bit signal.

このように実施形態3では、仮の選択ビット信号で、先行するブロックで選択した符号化方式とは異なる第1符号化方式が少なくともnブロック連続して選択される。これにより始めて、符号メモリに記憶されたnブロックの第1符号化方式で符号化された符号化データを当該nブロックの符号化データとして選択する第1選択を行う。また仮の選択ビット信号で、先行するブロックで選択した符号化方式とは異なる第2符号化方式が少なくともm(≠n)ブロック連続して選択される。これにより始めて、符号メモリに記憶されたmブロック分の第2符号化方式で符号化された符号化データを、それらmブロックの符号化データとして選択する第2選択を行う。   As described above, in the third embodiment, at least n blocks of the first encoding method different from the encoding method selected in the preceding block are selected in succession using the temporary selection bit signal. As a result, first selection is performed in which encoded data encoded by the first encoding method of n blocks stored in the code memory is selected as encoded data of the n blocks. In addition, the second encoding method different from the encoding method selected in the preceding block is selected in succession by at least m (≠ n) blocks using the temporary selection bit signal. As a result, a second selection is performed in which encoded data encoded by the second encoding method for m blocks stored in the code memory is selected as encoded data for the m blocks.

これにより本実施形態3では、前述の実施形態1及び2の効果に加えて、画像が文字線画と自然画との間を移行するとき符号識別ビットの切替が遅れることがなくなるという効果がある。   Accordingly, in the third embodiment, in addition to the effects of the first and second embodiments described above, there is an effect that the switching of the code identification bit is not delayed when the image is shifted between the character line image and the natural image.

(他の実施形態)
本発明の目的は、以下の処理を実行することによっても達成される。即ち、上述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出す処理である。
(Other embodiments)
The object of the present invention can also be achieved by executing the following processing. That is, a storage medium that records a program code of software that realizes the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU, MPU, etc.) of the system or apparatus is stored in the storage medium. This is the process of reading the code.

この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施の形態の機能を実現することになり、そのプログラムコード及び該プログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the program code and the storage medium storing the program code constitute the present invention.

Claims (5)

画像データの所定サイズのブロック単位で、当該画像データを第1符号化方式で符号化する第1符号化手段と、
画像データの前記ブロック単位で、当該画像データを前記第1符号化方式とは異なる第2符号化方式で符号化する第2符号化手段と、
前記第1及び第2符号化手段で符号化した符号化データの符号長と、先行するブロックで選択した符号化方式に応じた境界関数とに基づいて、現ブロックの符号化データとして、前記第1符号化手段或いは第2符号化手段で符号化された符号化データのいずれかを選択する選択手段と、
を有することを特徴とする画像符号化装置。
First encoding means for encoding the image data by a first encoding method in units of blocks of a predetermined size of the image data;
Second encoding means for encoding the image data in a second encoding scheme different from the first encoding scheme for each block of the image data;
Based on the code length of the encoded data encoded by the first and second encoding means and the boundary function according to the encoding method selected in the preceding block, the encoded data of the current block is Selecting means for selecting one of the encoded data encoded by the first encoding means or the second encoding means;
An image encoding apparatus comprising:
前記境界関数は、前記第1及び第2符号化方式で得られた符号化データの符号長をそれぞれLx,Lyとしたとき、点P(Lx,Ly)の位置が属している領域を判定するための関数で、先行する3ブロックで選択した符号化方式が、前記第1符号化方式であるか前記第2符号化方式であるかに応じて、前記関数が互いに異なることを特徴とする請求項1に記載の画像符号化装置。   The boundary function determines an area to which the position of the point P (Lx, Ly) belongs when the code lengths of the encoded data obtained by the first and second encoding methods are Lx and Ly, respectively. The functions differ from each other depending on whether the encoding method selected in the preceding three blocks is the first encoding method or the second encoding method. Item 2. The image encoding device according to Item 1. 画像データの所定サイズのブロック単位で、当該画像データを第1符号化方式で符号化する第1符号化手段と、
画像データの前記ブロック単位で、当該画像データを前記第1符号化方式とは異なる第2符号化方式で符号化する第2符号化手段と、
前記第1及び第2符号化手段で符号化した符号化データの符号長に応じて、前記第1符号化方式或いは第2符号化方式のいずれかを仮に選択する仮の選択手段と、
前記仮の選択手段により、先行するブロックで選択した符号化方式とは異なる前記第1符号化方式が少なくともnブロック連続して選択されると、前記第1符号化方式で符号化された符号化データを現ブロックの符号化データとして選択する第1選択手段と、
前記仮の選択手段により、先行するブロックで選択した符号化方式とは異なる前記第2符号化方式が少なくともm(≠n)ブロック連続して選択されると、前記第2符号化方式で符号化された符号化データを現ブロックの符号化データとして選択する第2選択手段と、
を有することを特徴とする画像符号化装置。
First encoding means for encoding the image data by a first encoding method in units of blocks of a predetermined size of the image data;
Second encoding means for encoding the image data in a second encoding scheme different from the first encoding scheme for each block of the image data;
Temporary selection means for temporarily selecting either the first encoding method or the second encoding method according to the code length of the encoded data encoded by the first and second encoding means;
When at least n blocks of the first encoding scheme different from the encoding scheme selected in the preceding block are selected in succession by the temporary selection means, the encoding encoded by the first encoding scheme First selecting means for selecting data as encoded data of the current block;
When the second encoding scheme different from the encoding scheme selected in the preceding block is selected by the temporary selection means in succession at least m (≠ n) blocks, encoding is performed using the second encoding scheme. Second selection means for selecting the encoded data as encoded data of the current block;
An image encoding apparatus comprising:
画像データの所定サイズのブロック単位で、当該画像データを第1符号化方式で符号化する第1符号化手段と、
画像データの前記ブロック単位で、当該画像データを前記第1符号化方式とは異なる第2符号化方式で符号化する第2符号化手段と、
前記第1及び第2符号化手段で符号化された符号化データをそれぞれ記憶する記憶手段と、
前記第1及び第2符号化手段で符号化した符号化データの符号長に応じて、前記第1符号化方式或いは第2符号化方式のいずれかを仮に選択する仮の選択手段と、
前記仮の選択手段により、先行するブロックで選択した符号化方式とは異なる前記第1符号化方式が少なくともnブロック連続して選択されて始めて、前記記憶手段に記憶された前記nブロックの前記第1符号化方式で符号化された符号化データを当該nブロックの符号化データとして選択する第1選択手段と、
前記仮の選択手段により、先行するブロックで選択した符号化方式とは異なる前記第2符号化方式が少なくともm(≠n)ブロック連続して選択されて始めて、前記記憶手段に記憶された前記mブロックの前記第2符号化方式で符号化された符号化データを当該mブロックの符号化データとして選択する第2選択手段と、
を有することを特徴とする画像符号化装置。
First encoding means for encoding the image data by a first encoding method in units of blocks of a predetermined size of the image data;
Second encoding means for encoding the image data in a second encoding scheme different from the first encoding scheme for each block of the image data;
Storage means for storing the encoded data encoded by the first and second encoding means respectively;
Temporary selection means for temporarily selecting either the first encoding method or the second encoding method according to the code length of the encoded data encoded by the first and second encoding means;
The n-th block of the n blocks stored in the storage means is not selected until at least n blocks of the first encoding method different from the encoding method selected in the preceding block are selected by the temporary selection unit. First selection means for selecting encoded data encoded by one encoding method as encoded data of the n blocks;
The m stored in the storage means is not until the second encoding method different from the encoding method selected in the preceding block is selected continuously by the temporary selection unit at least m (≠ n) blocks. Second selection means for selecting encoded data encoded by the second encoding method of a block as encoded data of the m block;
An image encoding apparatus comprising:
画像符号化装置の制御方法であって、
前記画像符号化装置の第1符号化手段が、画像データの所定サイズのブロック単位で、当該画像データを第1符号化方式で符号化する第1符号化工程と、
前記画像符号化装置の第2符号化手段が、画像データの前記ブロック単位で、当該画像データを前記第1符号化方式とは異なる第2符号化方式で符号化する第2符号化工程と、
前記画像符号化装置の選択手段が、前記第1及び第2符号化工程で符号化した符号化データの符号長と、先行するブロックで選択した符号化方式に応じた境界関数とに基づいて、現ブロックの符号化データとして、前記第1符号化工程或いは第2符号化工程で符号化された符号化データのいずれかを選択する選択工程と、
を有することを特徴とする画像符号化装置の制御方法。
A control method for an image encoding device, comprising:
A first encoding step in which the first encoding means of the image encoding device encodes the image data in a block unit of a predetermined size of the image data by the first encoding method;
A second encoding step in which the second encoding means of the image encoding device encodes the image data in a second encoding scheme different from the first encoding scheme in units of blocks of the image data;
Based on the code length of the encoded data encoded in the first and second encoding steps and the boundary function according to the encoding method selected in the preceding block, the selection unit of the image encoding device, A selection step of selecting any one of the encoded data encoded in the first encoding step or the second encoding step as the encoded data of the current block;
A control method for an image encoding device, comprising:
JP2009147007A 2009-06-19 2009-06-19 Image coding apparatus and method of controlling the same Withdrawn JP2011004284A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009147007A JP2011004284A (en) 2009-06-19 2009-06-19 Image coding apparatus and method of controlling the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009147007A JP2011004284A (en) 2009-06-19 2009-06-19 Image coding apparatus and method of controlling the same

Publications (1)

Publication Number Publication Date
JP2011004284A true JP2011004284A (en) 2011-01-06

Family

ID=43561833

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009147007A Withdrawn JP2011004284A (en) 2009-06-19 2009-06-19 Image coding apparatus and method of controlling the same

Country Status (1)

Country Link
JP (1) JP2011004284A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014523703A (en) * 2011-07-05 2014-09-11 クゥアルコム・インコーポレイテッド Selective lossless-lossy compression of image data based on bit allocation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014523703A (en) * 2011-07-05 2014-09-11 クゥアルコム・インコーポレイテッド Selective lossless-lossy compression of image data based on bit allocation

Similar Documents

Publication Publication Date Title
JP4533043B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US8224101B2 (en) Image processing apparatus and control method thereof with color data and monochrome data selection
US7925098B2 (en) Image encoding apparatus and method with both lossy and lossless means
JP5132517B2 (en) Image processing apparatus and image processing method
JP5595151B2 (en) Image processing apparatus, compression method in image processing apparatus, and program
JP4393319B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2006166420A (en) Image encoding apparatus, control method therefor, computer program, and computer-readable storage medium
JP4440051B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2006050096A (en) Image encoder and encoding method, computer program and computer readable storage medium, and image forming apparatus
JP2005323326A (en) Image encoding apparatus, image decoding apparatus, control method thereof, computer program and computer-readable storage medium
JP4801778B2 (en) Video compression / encoding device, video restoration device, video compression program, and video restoration program
JP4697966B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
US6879725B2 (en) Method, system, and program for decoding a section from compressed data
JP2011004284A (en) Image coding apparatus and method of controlling the same
JP4697965B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
JP2009239852A (en) Image processing apparatus and image processing method
US20030081244A1 (en) Method and apparatus for processing data in an imaging device
JP4651109B2 (en) Image encoding apparatus and method, computer program, and computer-readable storage medium
CN110913223B (en) Image decompression apparatus, control method thereof, and computer-readable storage medium
JP3104422B2 (en) Image forming device
JP4133678B2 (en) Image encoding device
JP2010081548A (en) Image forming apparatus
JP3705771B2 (en) JBIG decoding method
JP5595142B2 (en) Image processing apparatus and image processing method
JP2006231854A (en) Image formation device and its controlling method

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