JP2012239033A - Image processing device, decoding device, and image processing method - Google Patents

Image processing device, decoding device, and image processing method Download PDF

Info

Publication number
JP2012239033A
JP2012239033A JP2011106627A JP2011106627A JP2012239033A JP 2012239033 A JP2012239033 A JP 2012239033A JP 2011106627 A JP2011106627 A JP 2011106627A JP 2011106627 A JP2011106627 A JP 2011106627A JP 2012239033 A JP2012239033 A JP 2012239033A
Authority
JP
Japan
Prior art keywords
pixel
pixel block
image
block
encoded 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
JP2011106627A
Other languages
Japanese (ja)
Inventor
Kenta Takarazaki
健太 寳▲崎▼
Takashi Ishikawa
尚 石川
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 JP2011106627A priority Critical patent/JP2012239033A/en
Publication of JP2012239033A publication Critical patent/JP2012239033A/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 provide a technique for preventing a problem such as deterioration due to a defect of an image or the like due to truncation with a simple circuit even when encoding processing incapable of truncation is used for compression processing of gradation data.SOLUTION: When the code amount of encoded data obtained through packing for a pixel block of interest exceeds a threshold, an irreversible encoding result of a difference image is truncated from the encoded data of the pixel block of interest so that the code amount falls below the threshold. Then, encoded data obtained through the truncation is output as the encoded data of the pixel block of interest.

Description

本発明は、符号化技術に関するものである。   The present invention relates to an encoding technique.

画像を圧縮する手法の1つとして、ブロック符号化が知られている。JPEGなどのブロック符号化では、ブロック毎の符号量が可変長であるので、あるブロックのみを編集のために復号したい、という要望に応えることはできず、先頭から順番に復号しなければならない。   As one of methods for compressing an image, block coding is known. In block coding such as JPEG, since the code amount for each block is variable length, it is not possible to meet the desire to decode only a certain block for editing, and decoding must be performed in order from the top.

これに対して、特許文献1には、ブロック単位に符号量を固定長にする符号化技術が開示されている。固定長であるため、目的とするブロックの位置が判明すれば、その符号化データの格納位置が演算で特定でき、目的とするブロックのみを復号することが可能である。この特許文献1に記載された符号化技術は、ブロック内の画像を文字や線画等のエッジの鮮明さが重要な部分と、自然画などの階調性が重要な部分に分離し、それぞれ別の符号化方式で圧縮している。例えば、文字や線画の符号化においては、2値のブロックデータ(以下、識別情報という)の符号化として、ランレングス符号化とハフマン符号化を組み合わせて適用している。また、自然画の符号化においては、多値のブロックデータ(以下、階調データという)の符号化として、JPEG符号化を適用している。そして、これら得られた符号化データを定められたフォーマットに従って、1ブロック分の固定長符号化データを生成している。   On the other hand, Patent Document 1 discloses an encoding technique in which the code amount is fixed length in units of blocks. Since it has a fixed length, if the position of the target block is known, the storage position of the encoded data can be specified by calculation, and only the target block can be decoded. The encoding technique described in Patent Document 1 separates an image in a block into a portion where sharpness of edges such as characters and line drawings is important and a portion where importance of gradation such as natural images is important. It is compressed with the encoding method. For example, in encoding of characters and line drawings, run length encoding and Huffman encoding are applied in combination as encoding of binary block data (hereinafter referred to as identification information). In natural image encoding, JPEG encoding is applied as encoding multi-value block data (hereinafter referred to as gradation data). Then, fixed-length encoded data for one block is generated according to a predetermined format for the obtained encoded data.

画像圧縮のための他の手法としてJPEG2000という方式がある。JPEG2000の符号化手順としては、まず符号化の単位ごとに離散ウェーブレット変換処理を行い、変換係数を出力する。次に、変換係数を所定の量子化ステップで量子化し、量子化インデックスを得る。次に、量子化インデックスに対して可変長符号化を行う。まず量子化インデックスはビットプレーンごとに分解され、ビットプレーン単位に2値算術符号化される。最初に最上位ビットプレーンの各ビットを算術符号化し、ビットストリームとして出力する。次に、ビットプレーンを1レベル下げて算術符号化を行う。以下、同様に最下位ビットプレーンに至るまで符号化を行い、ビットストリームを出力する。また、この可変長符号化の過程で符号量に応じて符号化を適宜打ち切ることで符号量制御をすることができるため、実質的に固定長符号化が可能であると言える。   Another method for image compression is JPEG2000. As a JPEG2000 encoding procedure, first, discrete wavelet transform processing is performed for each encoding unit, and transform coefficients are output. Next, the transform coefficient is quantized by a predetermined quantization step to obtain a quantization index. Next, variable length coding is performed on the quantization index. First, the quantization index is decomposed for each bit plane, and binary arithmetic coding is performed for each bit plane. First, each bit of the most significant bit plane is arithmetically encoded and output as a bit stream. Next, arithmetic coding is performed with the bit plane lowered by one level. Thereafter, similarly, encoding is performed up to the least significant bit plane, and a bit stream is output. In addition, since the code amount can be controlled by appropriately terminating the encoding according to the code amount in the process of variable length encoding, it can be said that fixed-length encoding can be substantially performed.

特開2008−278042号公報JP 2008-278042 A

従来例のように固定長符号の中にJPEGのような可変長符号を格納する場合、目標符号量内に収まる事を保証できず、目標符号量を超えてしまう可能性がある。その場合の対策の一つに、目標符号量を超えた分の符号は打ち切るという方法がある。符号を打ち切って固定長にする場合、符号の最後に格納されている階調データから打ち切る。固定長符号の最後に格納されている階調データを打ち切る場合、通常のJPEGデータでは、固定長符号化の単位ブロックの中で、最も右下のMCU(Minimum Coded Unit:符号化処理単位)のさらに高周波成分から順に打ち切られていく。最も右下のMCUのDC成分まで打ち切られると、その左に位置するMCUが次に打ち切りの対象となる。この時、右下のMCUの符号はなくなるので、復号化器において復号処理ができず画像に一部欠損が見えてしまう。   When a variable-length code such as JPEG is stored in a fixed-length code as in the conventional example, it cannot be guaranteed that it falls within the target code amount, and the target code amount may be exceeded. One of the countermeasures in that case is a method of cutting off codes that exceed the target code amount. When the code is cut off to have a fixed length, the grayscale data stored at the end of the code is cut off. When the gradation data stored at the end of the fixed-length code is cut off, in normal JPEG data, the rightmost MCU (Minimum Coded Unit) in the fixed-length coding unit block Furthermore, it is cut off in order from the high frequency component. When the DC component of the rightmost MCU is censored, the MCU located to the left becomes the next censoring target. At this time, since the code of the lower right MCU is lost, the decoding process cannot be performed in the decoder, and a partial loss appears in the image.

また、別の対策として、JPEG2000のような打ち切りが可能な符号化を用いるという方法もあるが、JPEG2000は空間周波数で分割しており、符号化アルゴリズムが複雑で演算量が多く、実装後の回路規模も大きくなってしまう。   As another countermeasure, there is a method of using an encoding that can be aborted, such as JPEG2000. However, JPEG2000 is divided by a spatial frequency, the encoding algorithm is complicated, the calculation amount is large, and the circuit after mounting The scale will also increase.

本発明はこのような問題に鑑みてなされたものであり、階調データの圧縮処理に、打ち切りのできない符号化処理を用いた場合であっても、簡単な回路にて、打ち切りによる画像の欠損等による劣化などの問題を防止する為の技術を提供することを目的とする。   The present invention has been made in view of such a problem, and even when a non-censored encoding process is used for the gradation data compression process, an image loss due to censoring can be achieved with a simple circuit. It aims at providing the technique for preventing problems, such as degradation by such as.

本発明の目的を達成するために、例えば、本発明の画像処理装置は以下の構成を備える。即ち、入力画像を複数の画素から成る画素ブロックごとに分割する分割手段と、前記分割手段が分割した画素ブロックごとに、該画素ブロックを構成する各画素が、閾値以上の画素値を有する高周波画素、該閾値よりも小さい画素値を有する低周波画素、の何れであるのかを示す画像情報を生成する第1の生成手段と、前記第1の生成手段が画素ブロックごとに生成した画像情報に対して可逆符号化を行う可逆符号化手段と、前記分割手段が分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値の平均画素値を求める計算手段と、前記分割手段が分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値を該画素ブロック中の前記低周波画素を用いて計算される画素値に置き換えることで得られる階調画素ブロックを生成する第2の生成手段と、前記第2の生成手段が画素ブロックごとに生成した階調画素ブロックに対して非可逆符号化を行う非可逆符号化手段と、前記分割手段が分割した画素ブロックごとに、前記計算手段が計算した平均画素値、前記可逆符号化手段による可逆符号化結果、前記非可逆符号化手段による非可逆符号化結果、をパックし、該画素ブロックの符号化データとして出力する出力手段とを備え、前記非可逆符号化手段は、前記階調画素ブロックから、該階調画素ブロックの縮小画像を代表画像として生成する手段と、前記階調画素ブロックから前記代表画像とは異なる方法で得られる複数枚の縮小画像から前記代表画像を差し引いた差分画像を生成する第3の生成手段と、前記代表画像、前記第3の生成手段が生成したそれぞれの差分画像、に対して非可逆符号化を行うことで、前記階調画素ブロックに対する非可逆符号化結果を生成する手段とを備え、前記出力手段は、着目画素ブロックについて前記パックを行うことで得られる符号化データの符号量が閾値を超えている場合、該符号量が該閾値を下回るように前記着目画素ブロックの符号化データから前記差分画像の非可逆符号化結果を打ち切り、該打ち切りにより得られる符号化データを、前記着目画素ブロックの符号化データとして出力することを特徴とする。   In order to achieve the object of the present invention, for example, an image processing apparatus of the present invention comprises the following arrangement. That is, a dividing unit that divides an input image into pixel blocks each composed of a plurality of pixels, and a high-frequency pixel in which each pixel constituting the pixel block has a pixel value equal to or greater than a threshold value for each pixel block divided by the dividing unit. , A first generation unit that generates image information indicating which of the low-frequency pixels has a pixel value smaller than the threshold, and the image information generated by the first generation unit for each pixel block A lossless encoding means for performing lossless encoding, a calculation means for obtaining an average pixel value of pixel values of the high-frequency pixels in the pixel block for each pixel block divided by the dividing means, and the dividing means For each pixel block, a gradation obtained by replacing the pixel value of the high-frequency pixel in the pixel block with a pixel value calculated using the low-frequency pixel in the pixel block A second generating unit that generates an elementary block; an irreversible encoding unit that performs irreversible encoding on a gradation pixel block generated for each pixel block by the second generating unit; and the dividing unit For each pixel block, the average pixel value calculated by the calculating unit, the lossless encoding result by the lossless encoding unit, and the lossy encoding result by the lossy encoding unit are packed, and the pixel block is encoded. Output means for outputting as data, wherein the lossy encoding means generates a reduced image of the gradation pixel block as a representative image from the gradation pixel block, and the representative from the gradation pixel block. A third generation unit configured to generate a difference image obtained by subtracting the representative image from a plurality of reduced images obtained by a method different from the image; and the representative image and the third generation unit Means for generating lossy encoding results for the gradation pixel block by performing lossy encoding on each of the difference images, and the output means performs the pack on the pixel block of interest. If the code amount of the encoded data obtained in this way exceeds a threshold value, the lossy encoding result of the difference image is truncated from the encoded data of the pixel block of interest so that the code amount is below the threshold value, The encoded data obtained by the truncation is output as the encoded data of the pixel block of interest.

本発明の構成によれば、階調データの圧縮処理に、打ち切りのできない符号化処理を用いた場合であっても、簡単な回路にて、打ち切りによる画像の欠損等による劣化などの問題を防止することができる。   According to the configuration of the present invention, even when encoding processing that cannot be censored is used for compression processing of gradation data, problems such as degradation due to image loss due to censoring can be prevented with a simple circuit. can do.

第1の実施形態に係る画像処理装置の機能構成例を示すブロック図。1 is a block diagram illustrating an example of a functional configuration of an image processing apparatus according to a first embodiment. 第二の符号化部104の機能構成例を示すブロック図。FIG. 5 is a block diagram showing an example of a functional configuration of a second encoding unit 104. サブブロック符号化部の構成例を示すブロック図。The block diagram which shows the structural example of a subblock encoding part. 第1の実施形態に係る復号装置の機能構成例を示すブロック図。The block diagram which shows the function structural example of the decoding apparatus which concerns on 1st Embodiment. 第二の復号化部403の機能構成例を示すブロック図。The block diagram which shows the function structural example of the 2nd decoding part 403. FIG. 第2の実施形態に係る画像処理装置の機能構成例を示すブロック図。FIG. 5 is a block diagram illustrating an example of a functional configuration of an image processing apparatus according to a second embodiment. 第二の符号化部604の機能構成例を示すブロック図。The block diagram which shows the function structural example of the 2nd encoding part 604. FIG. 第2の実施形態に係る復号装置の機能構成例を示すブロック図。The block diagram which shows the function structural example of the decoding apparatus which concerns on 2nd Embodiment. 第二の復号化部803の機能構成例を示すブロック図。The block diagram which shows the function structural example of the 2nd decoding part 803. FIG. 画像情報の一例を示す図。The figure which shows an example of image information.

以下、添付図面を参照し、本発明の好適な実施形態について説明する。なお、以下説明する実施形態は、本発明を具体的に実施した場合の一例を示すもので、特許請求の範囲に記載した構成の具体的な実施例の一つである。   Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. The embodiment described below shows an example when the present invention is specifically implemented, and is one of the specific examples of the configurations described in the claims.

[第1の実施形態]
本実施形態では、説明を簡単なものとするため、符号化対象の画像は濃度成分のみを有し、各画素の画素値(濃度値)は8ビット(0〜255)で表されるものとする。即ち、本実施形態では、符号化対象の画像はモノクログレースケールの画像である。なお、各画素の画素値が示すのは濃度値であるので、値が大きいほど黒く、逆に値が小さいほど白くなることに注意されたい。なお、本実施形態をカラー画像に適用する場合には、色成分毎に以下の処理を行えばいいのは明らかである。本実施形態に係る画像処理装置の機能構成例について、図1のブロック図を用いて説明する。
[First Embodiment]
In this embodiment, in order to simplify the description, the image to be encoded has only a density component, and the pixel value (density value) of each pixel is represented by 8 bits (0 to 255). To do. That is, in this embodiment, the image to be encoded is a monochrome grayscale image. Note that since the pixel value of each pixel indicates a density value, the larger the value is, the blacker the color is, and vice versa. In addition, when this embodiment is applied to a color image, it is obvious that the following processing is performed for each color component. A functional configuration example of the image processing apparatus according to the present embodiment will be described with reference to the block diagram of FIG.

ブロック化部101には、符号化対象の画像が入力画像として入力される。そしてブロック化部101は、この入力画像を水平方向m画素×垂直方向n画素のサイズ(即ち複数の画素から成る)の画素ブロックごとに分割する。そしてブロック化部101は、分割したそれぞれの画素ブロックを順次、抽出部102に送出する。   An image to be encoded is input to the blocking unit 101 as an input image. The blocking unit 101 divides the input image into pixel blocks each having a size of horizontal m pixels × vertical n pixels (that is, a plurality of pixels). Then, the blocking unit 101 sequentially sends the divided pixel blocks to the extraction unit 102.

抽出部102は、ブロック化部101から受けた画素ブロックごとに、該画素ブロックを構成する各画素が、閾値以上の画素値を有する高周波画素、該閾値より小さい画素値を有する低周波画素、の何れであるのかを示す画像情報を生成する(第1の生成)。高周波画素は、画素ブロックの中で高周波の原因となっている画素であり、例えば、文字や線画等を構成している画素が挙げられる。抽出部102は、着目画素ブロックについて画像情報を生成する場合、着目画素ブロックを構成する各画素の画素値を参照し、該画素の画素値が閾値以上であれば、該画素に対するビット値として「1」を出力する。一方、該画素の画素値が閾値よりも小さい場合は、該画素に対するビット値として「0」を出力する。このように、着目画素ブロックを構成する各画素について出力したビット値の集合が、着目画素ブロックの画像情報となる。各画素に対するビット値は、各画素が高周波画素であるのか低周波画素であるのかを示すことができればよい為、そのビット数は1となる。この場合、画像情報はmビット×nビットのサイズとなる。もちろん、ビット値はこのような値に限るものではない。そして抽出部102は、画素ブロックごとに生成した画像情報を第一の符号化部103に対して送出する。   For each pixel block received from the blocking unit 101, the extraction unit 102 includes, for each pixel constituting the pixel block, a high-frequency pixel having a pixel value greater than or equal to a threshold value and a low-frequency pixel having a pixel value smaller than the threshold value. Image information indicating which one is generated is generated (first generation). The high frequency pixel is a pixel that causes high frequency in the pixel block, and examples thereof include pixels constituting characters, line drawings, and the like. When generating image information for the pixel block of interest, the extraction unit 102 refers to the pixel value of each pixel constituting the pixel block of interest, and if the pixel value of the pixel is greater than or equal to the threshold value, 1 "is output. On the other hand, when the pixel value of the pixel is smaller than the threshold value, “0” is output as the bit value for the pixel. In this way, a set of bit values output for each pixel constituting the target pixel block is image information of the target pixel block. Since the bit value for each pixel only needs to be able to indicate whether each pixel is a high frequency pixel or a low frequency pixel, the number of bits is one. In this case, the image information has a size of m bits × n bits. Of course, the bit value is not limited to such a value. Then, the extraction unit 102 sends the image information generated for each pixel block to the first encoding unit 103.

また抽出部102は、ブロック化部101から受けた画素ブロックごとに、該画素ブロック中の高周波画素の画素値の平均値(平均画素値)を求める(計算)。そして抽出部102は、画素ブロックごとに求めた平均画素値をブロックヘッダデータとしてパック部105に対して送出する。なお、画素ブロック中に1つも高周波画素が存在しなかった場合、抽出部102は、予め定められた適当な値を平均画素値としてパック部105に対して送出する。予め定められた適当な値である理由は、画素ブロック中に高周波画素が存在しない場合、その平均画素値が使われることがないからである。   For each pixel block received from the blocking unit 101, the extraction unit 102 obtains an average value (average pixel value) of high-frequency pixels in the pixel block (calculation). Then, the extraction unit 102 sends the average pixel value obtained for each pixel block to the pack unit 105 as block header data. If no high-frequency pixel exists in the pixel block, the extraction unit 102 sends an appropriate predetermined value to the pack unit 105 as an average pixel value. The reason why it is an appropriate value determined in advance is that the average pixel value is not used when there is no high-frequency pixel in the pixel block.

また抽出部102は、ブロック化部101から受けた画素ブロックごとに、該画素ブロック中の高周波画素の画素値を該画素ブロック中の低周波画素を用いて計算される画素値に置き換えた画素ブロックを階調画素ブロックとして生成する(第2の生成)。例えば、該画素ブロック中の高周波画素の画素値を、該画素ブロック中の低周波画素の平均画素値に置き換えた画素ブロックを階調画素ブロックとして生成する。このようにして生成される階調画素ブロックは、実質的に高周波部分のないm画素×n画素のサイズの画素ブロックとなる。そして抽出部102は、画素ブロックごとに生成した階調画素ブロックを第二の符号化部104に対して送出する。   In addition, for each pixel block received from the blocking unit 101, the extraction unit 102 replaces the pixel value of the high-frequency pixel in the pixel block with a pixel value calculated using the low-frequency pixel in the pixel block. Are generated as gradation pixel blocks (second generation). For example, a pixel block in which the pixel value of the high frequency pixel in the pixel block is replaced with the average pixel value of the low frequency pixel in the pixel block is generated as a gradation pixel block. The gradation pixel block generated in this way is a pixel block having a size of m pixels × n pixels substantially having no high frequency portion. Then, the extraction unit 102 sends the gradation pixel block generated for each pixel block to the second encoding unit 104.

第一の符号化部103は、抽出部102から画素ブロックごとに送出される画像情報を受けると、この画像情報に対して可逆符号化を行って符号化データを生成し、生成した符号化データ及びその符号量(ビット数)をパック部105に対して送出する。第一の符号化部103が行う可逆符号化の種類については特に限定するものではないが、本実施形態では一例としてランレングス符号化を用いる。   When receiving the image information sent for each pixel block from the extraction unit 102, the first encoding unit 103 performs lossless encoding on the image information to generate encoded data, and the generated encoded data The code amount (number of bits) is sent to the pack unit 105. The type of lossless encoding performed by the first encoding unit 103 is not particularly limited, but in this embodiment, run-length encoding is used as an example.

第二の符号化部104は、抽出部102から画素ブロックごとに送出される階調画素ブロックを受けると、この階調画素ブロックに対して非可逆符号化を行って符号化データを生成し、生成した符号化データをパック部105に対して送出する。   When the second encoding unit 104 receives the gradation pixel block transmitted from the extraction unit 102 for each pixel block, the second encoding unit 104 performs lossy encoding on the gradation pixel block to generate encoded data, The generated encoded data is sent to the pack unit 105.

パック部105は、抽出部102から送出されるブロックヘッダデータ、第一の符号化部103及び第二の符号化部104から送出される符号化データ、を後述するアルゴリズムに従ってパックし、固定長符号化データとして出力する。   The pack unit 105 packs the block header data transmitted from the extraction unit 102 and the encoded data transmitted from the first encoding unit 103 and the second encoding unit 104 in accordance with an algorithm described later. Output as digitized data.

以上が、本実施形態に係る画像処理装置を構成する各部が行う大まかな処理である。以下では、ブロック化部101、抽出部102、第二の符号化部104、パック部105について、より詳細に説明する。   The above is a rough process performed by each unit constituting the image processing apparatus according to the present embodiment. Hereinafter, the blocking unit 101, the extraction unit 102, the second encoding unit 104, and the pack unit 105 will be described in more detail.

ブロック化部101は、内部にnライン分のバッファメモリを有している。入力画像はラスタースキャン順にブロック化部101に入力され、このバッファメモリに格納される。そしてブロック化部101は、バッファメモリに入力画像がnライン分が格納されると、水平方向m画素、垂直方向n画素の画像(画素ブロック)を順に切り出し、それぞれを抽出部102に出力することを繰り返す。本実施形態では、m=n=16、即ち、画素ブロックのサイズが水平方向16画素、垂直方向16画素、であるものとして説明する。しかし、以下の説明は、m、nが如何なる整数値であってもよく(もちろん入力画像のサイズ以下)、mとnがそれぞれ異なる値であってもよい。また、m、nは、ユーザが適宜設定しても良い。   The blocking unit 101 has a buffer memory for n lines inside. The input images are input to the block forming unit 101 in the raster scan order and stored in this buffer memory. Then, when n lines of input images are stored in the buffer memory, the blocking unit 101 sequentially cuts out images (pixel blocks) of m pixels in the horizontal direction and n pixels in the vertical direction and outputs them to the extraction unit 102. repeat. In the present embodiment, it is assumed that m = n = 16, that is, the pixel block size is 16 pixels in the horizontal direction and 16 pixels in the vertical direction. However, in the following description, m and n may be any integer values (of course, the input image size or less), and m and n may be different values. Further, m and n may be set as appropriate by the user.

抽出部102は、ブロック化部101から16画素×16画素のサイズの画素ブロックを受けると、該画素ブロックを構成する各画素の画素値を参照する。そして閾値TH以上の画素値を有する画素を高周波画素、閾値THより小さい画素値を有する画素を低周波画素、というように、画素ブロックを構成する各画素を高周波画素、低周波画素の何れかに分類する。閾値THは、高周波画素を特定することができるのであれば、如何なる方法で得てもよい。即ち、ユーザが予め設定しておいてもよいし、入力画像から抽出部102が求めるようにしてもよい。また、濃度値の低い画素が高周波画素であると判断した場合は、閾値TH以下の画素値を高周波画素、閾値THより大きい画素を低周波画素としても良い。入力画像から閾値THを求める方法の一例としては、入力画像を構成する各画素の画素値の平均値を閾値THとする方法がある。そして抽出部102は、高周波画素の画素値の平均値(平均画素値)AVE1をパック部105に対して送出する。上記の通り、画素ブロック中に1つも高周波画素が存在しなかった場合、抽出部102は、予め定められた適当な値をパック部105に対して送出する。   When the extraction unit 102 receives a pixel block having a size of 16 pixels × 16 pixels from the blocking unit 101, the extraction unit 102 refers to the pixel value of each pixel constituting the pixel block. Each pixel constituting the pixel block is either a high frequency pixel or a low frequency pixel, such that a pixel having a pixel value equal to or higher than the threshold TH is a high frequency pixel, a pixel having a pixel value smaller than the threshold TH is a low frequency pixel, and so on. Classify. The threshold value TH may be obtained by any method as long as a high-frequency pixel can be specified. That is, the user may set in advance, or the extraction unit 102 may obtain from the input image. When it is determined that a pixel having a low density value is a high frequency pixel, a pixel value equal to or lower than the threshold value TH may be set as a high frequency pixel, and a pixel value higher than the threshold value TH may be set as a low frequency pixel. As an example of a method for obtaining the threshold value TH from the input image, there is a method in which an average value of pixel values of each pixel constituting the input image is set as the threshold value TH. Then, the extraction unit 102 sends the average value (average pixel value) AVE1 of the pixel values of the high frequency pixels to the pack unit 105. As described above, when no high-frequency pixel exists in the pixel block, the extraction unit 102 sends a predetermined appropriate value to the pack unit 105.

また、抽出部102は、ブロック化部101から16画素×16画素のサイズの画素ブロックを受けると、該画素ブロック内をスキャンして各画素の画素値を参照する。そして抽出部102は、参照した画素値が閾値TH以上であればビット値「1」を出力し、閾値THよりも小さい場合はビット値「0」を出力する。このように、画素ブロックを構成する各画素について出力したビット値は画素数分(m×n)あり、抽出部102は、この画素数分のビット値の集合を画像情報として第一の符号化部103に対して送出する。   Further, when the extraction unit 102 receives a pixel block having a size of 16 pixels × 16 pixels from the blocking unit 101, the extraction unit 102 scans the pixel block and refers to the pixel value of each pixel. The extraction unit 102 outputs a bit value “1” if the referenced pixel value is equal to or greater than the threshold value TH, and outputs a bit value “0” if the pixel value is smaller than the threshold value TH. In this manner, the bit values output for each pixel constituting the pixel block are the number of pixels (m × n), and the extraction unit 102 performs first encoding using a set of bit values for the number of pixels as image information. The data is sent to the unit 103.

また、抽出部102は、ブロック化部101から16画素×16画素のサイズの画素ブロックを受けると、該画素ブロック中の低周波画素の画素値の平均値(平均画素値)AVE2を算出する。そして抽出部102は、該画素ブロック中の高周波画素の画素値を平均画素値AVE2に置き換えた画素ブロックを、階調画素ブロックとして生成する。   In addition, when the extraction unit 102 receives a pixel block having a size of 16 pixels × 16 pixels from the blocking unit 101, the extraction unit 102 calculates an average value (average pixel value) AVE2 of low-frequency pixels in the pixel block. Then, the extraction unit 102 generates a pixel block in which the pixel value of the high frequency pixel in the pixel block is replaced with the average pixel value AVE2 as a gradation pixel block.

抽出部102が受けた画素ブロック中の座標(i,j)における画素の画素値をAin(i,j)、この画素について抽出部102が出力したビット値をP(i,j)、階調画素ブロック中の座標(i,j)における画素の画素値をAout(i,j)とする。このとき、Aout(i,j)は以下の式に従って決定される。   The pixel value of the pixel at the coordinates (i, j) in the pixel block received by the extraction unit 102 is Ain (i, j), the bit value output by the extraction unit 102 for this pixel is P (i, j), the gradation Let Aout (i, j) be the pixel value of the pixel at coordinates (i, j) in the pixel block. At this time, Aout (i, j) is determined according to the following equation.

P(i,j)=1(画素ブロック中の座標(i,j)における画素が高周波画素の場合) Aout(i,j)=AVE2
P(i,j)=0(画素ブロック中の座標(i,j)における画素が低周波画素の場合) Aout(i,j)=Ain(i,j)
そして抽出部102は、このようにして生成した階調画素ブロックを第二の符号化部104に対して送出する。これにより、第二の符号化部104には、高周波成分が除外された階調画素ブロックが供給されることなり、高い圧縮率が期待できる。なお、階調画素ブロックの生成は第二の符号化部104で行うようにしてもよい。
P (i, j) = 1 (when the pixel at coordinates (i, j) in the pixel block is a high-frequency pixel) Aout (i, j) = AVE2
P (i, j) = 0 (when the pixel at coordinates (i, j) in the pixel block is a low frequency pixel) Aout (i, j) = Ain (i, j)
Then, the extraction unit 102 sends the gradation pixel block generated in this way to the second encoding unit 104. As a result, the second encoding unit 104 is supplied with the gradation pixel block from which the high-frequency component is excluded, and a high compression rate can be expected. Note that the gradation pixel block may be generated by the second encoding unit 104.

第二の符号化部104の機能構成例について、図2のブロック図を用いて説明する。分割部201には、抽出部102から階調画素ブロックが順次入力される。分割部201は、入力された階調画素ブロックから、該階調画素ブロックの縮小画像を代表画像として生成すると共に、該階調画素ブロックから代表画像とは異なる方法で得られる複数枚の縮小画像から代表画像を差し引いた差分画像を生成する(第3の生成)。図2の場合、1枚の階調画素ブロックから、1枚の代表画像と3枚の差分画像の合計4枚のサブブロックを生成する。当然ながら、代表画像、差分画像のそれぞれの縦横サイズは同じである。そして分割部201は、生成した代表画像についてはサブブロック符号化部202aに入力し、生成した3枚の差分画像についてはそれぞれサブブロック符号化部202b〜202dに入力する。   A functional configuration example of the second encoding unit 104 will be described with reference to the block diagram of FIG. Gradation pixel blocks are sequentially input from the extraction unit 102 to the division unit 201. The dividing unit 201 generates a reduced image of the gradation pixel block from the input gradation pixel block as a representative image, and a plurality of reduced images obtained from the gradation pixel block by a method different from the representative image. A difference image is generated by subtracting the representative image from (a third generation). In the case of FIG. 2, a total of four sub-blocks, one representative image and three difference images, are generated from one gradation pixel block. Of course, the vertical and horizontal sizes of the representative image and the difference image are the same. The dividing unit 201 inputs the generated representative image to the sub-block encoding unit 202a, and inputs the generated three difference images to the sub-block encoding units 202b to 202d, respectively.

ここで、代表画像及び差分画像の生成方法について説明する。なお、以下では、4枚のサブブロックを生成する場合について説明するが、4枚に限定するものではなく、1枚の代表画像と1枚以上の差分画像を生成することができるのであれば、サブブロックの枚数は如何なる枚数であってもよい。この場合、サブブロックの個数分だけサブブロック符号化部を用意する必要がある。しかし、サブブロック符号化部を1つのみとし、この1つのサブブロック符号化部がそれぞれのサブブロックを時分割で順番に処理するという構成にしても良い。   Here, a method for generating the representative image and the difference image will be described. In the following, a case where four sub-blocks are generated will be described. However, the number of sub-blocks is not limited to four. If one representative image and one or more difference images can be generated, The number of subblocks may be any number. In this case, it is necessary to prepare as many subblock encoders as the number of subblocks. However, the configuration may be such that only one sub-block encoding unit is provided, and this one sub-block encoding unit sequentially processes each sub-block in time division.

階調画素ブロックから生成するそれぞれのサブブロックのサイズとしては、後段のサブブロック符号化部で行う直交変換処理用のサイズと同じにするのが適当である。ここでは直交変換符号化として8×8のDCTを含む処理を行うことにするため、16画素×16画素のサイズの階調画素ブロックから、8画素×8画素のサイズのサブブロックを生成する。   The size of each sub-block generated from the gradation pixel block is suitably the same as the size for orthogonal transform processing performed in the subsequent sub-block encoding unit. Here, in order to perform processing including 8 × 8 DCT as orthogonal transform coding, a sub-block having a size of 8 pixels × 8 pixels is generated from a gradation pixel block having a size of 16 pixels × 16 pixels.

先ず、階調画素ブロックの縮小画像である代表画像を生成するのであるが、代表画像の生成方法は以下に説明する方法に限るものではない。ただし、中央値などのように逆算が一般的に不可能なものは使用できない。   First, a representative image that is a reduced image of a gradation pixel block is generated, but the method of generating a representative image is not limited to the method described below. However, it is not possible to use anything that cannot be calculated in reverse, such as the median.

階調画素ブロック中の座標(i,j)における画素値をA(i,j)、代表画像中の座標(i,j)における画素値をB0(i,j)とすると、B0(i,j)は以下の式に従って求める。なお、i、jは、0≦i≦7、0≦j≦7を満たす整数である。   If the pixel value at coordinates (i, j) in the gradation pixel block is A (i, j) and the pixel value at coordinates (i, j) in the representative image is B0 (i, j), then B0 (i, j) j) is obtained according to the following equation. Note that i and j are integers satisfying 0 ≦ i ≦ 7 and 0 ≦ j ≦ 7.

B0(i,j)=(A(2i,2j)+A(2i+1,2j)+A(2i,2j+1)+A(2i+1,2j+1))/4
次に、差分画像B1中の座標(i,j)における画素値をB1(i,j)、差分画像B2中の座標(i,j)における画素値をB2(i,j)、差分画像B3中の座標(i,j)における画素値をB3(i,j)、とすると、それぞれは以下の式に従って求める。
B0 (i, j) = (A (2i, 2j) + A (2i + 1,2j) + A (2i, 2j + 1) + A (2i + 1,2j + 1)) / 4
Next, the pixel value at the coordinate (i, j) in the difference image B1 is B1 (i, j), the pixel value at the coordinate (i, j) in the difference image B2 is B2 (i, j), and the difference image B3. If the pixel value at the middle coordinate (i, j) is B3 (i, j), each is obtained according to the following equation.

B1(i,j)=A(2i+1,2j )−B0(i,j)
B2(i,j)=A(2i ,2j+1)−B0(i,j)
B3(i,j)=A(2i+1,2j+1)−B0(i,j)
即ち、差分画像B1は、0≦i≦7、0≦j≦7を満たすi,jによるA(2i+1,2j)からなる縮小画像から、代表画像B0を差し引いた差分画像である。また、差分画像B2は、0≦i≦7、0≦j≦7を満たすi,jによるA(2i,2j+1)からなる縮小画像から、代表画像B0を差し引いた差分画像である。また、差分画像B3は、0≦i≦7、0≦j≦7を満たすi,jによるA(2i+1,2j+1)からなる縮小画像から、代表画像B0を差し引いた差分画像である。このようにして得られた画素値の範囲は、以下の不等式を満たす。
B1 (i, j) = A (2i + 1,2j) -B0 (i, j)
B2 (i, j) = A (2i, 2j + 1) -B0 (i, j)
B3 (i, j) = A (2i + 1,2j + 1) -B0 (i, j)
That is, the difference image B1 is a difference image obtained by subtracting the representative image B0 from the reduced image composed of A (2i + 1, 2j) with i and j satisfying 0 ≦ i ≦ 7 and 0 ≦ j ≦ 7. The difference image B2 is a difference image obtained by subtracting the representative image B0 from the reduced image composed of A (2i, 2j + 1) with i and j satisfying 0 ≦ i ≦ 7 and 0 ≦ j ≦ 7. The difference image B3 is a difference image obtained by subtracting the representative image B0 from the reduced image composed of A (2i + 1, 2j + 1) with i and j satisfying 0 ≦ i ≦ 7 and 0 ≦ j ≦ 7. The range of pixel values obtained in this way satisfies the following inequality.

0≦B0(i,j)≦255
−255≦B1(i,j)≦255
−255≦B2(i,j)≦255
−255≦B3(i,j)≦255
サブブロック符号化部202a〜202dは何れも、入力されたサブブロックに対して非可逆符号化を行う。符号化方法としては打ち切りを考慮すると、JPEGなどのような直交変換を利用した符号化が適している。サブブロック符号化部202a〜202dに適用可能な構成を図3に示す。図3では、サブブロック符号化部202a〜202dをサブブロック符号化部202としている。
0 ≦ B0 (i, j) ≦ 255
−255 ≦ B1 (i, j) ≦ 255
−255 ≦ B2 (i, j) ≦ 255
−255 ≦ B3 (i, j) ≦ 255
Each of the sub-block encoding units 202a to 202d performs lossy encoding on the input sub-block. Considering truncation as an encoding method, encoding using orthogonal transformation such as JPEG is suitable. A configuration applicable to the sub-block encoding units 202a to 202d is shown in FIG. In FIG. 3, the sub-block coding units 202 a to 202 d are used as the sub-block coding unit 202.

DCT演算部301は、入力されたサブブロックに対してDCT変換処理を行う。量子化部302は、DCT変換により得られた係数に対して量子化処理を行う。ジグザクスキャン部303は、量子化処理により得られた各量子化値に対してジグザクスキャンを行い、エントロピー符号化部304は、スキャンした量子化値に対してエントロピー符号化を行うことで、符号化サブブロックデータを生成し、出力する。このサブブロック符号化部202が行う一連の符号化処理は、一般的なJPEG符号化と同じ処理ではあるが、以下の点で異なる。DCT演算部301の入力としては通常は画像の画素値が入力されるので、マイナスの値が入力されることはない。しかし、本実施形態では前述したように代表画像B0、差分画像B1〜B3を入力するために、マイナスの値が入力される可能性がある。従って、DCT演算部301はマイナスの値の入力に対応したものである必要がある。   The DCT calculation unit 301 performs DCT conversion processing on the input sub-block. The quantization unit 302 performs a quantization process on the coefficient obtained by the DCT transform. The zigzag scanning unit 303 performs zigzag scanning on each quantized value obtained by the quantization process, and the entropy encoding unit 304 performs entropy encoding on the scanned quantized value to perform encoding. Generate and output sub-block data. A series of encoding processing performed by the sub-block encoding unit 202 is the same as general JPEG encoding, but differs in the following points. Since the pixel value of the image is normally input as the input of the DCT calculation unit 301, a negative value is never input. However, in the present embodiment, as described above, a negative value may be input to input the representative image B0 and the difference images B1 to B3. Therefore, the DCT calculation unit 301 needs to support input of a negative value.

パック部105は、抽出部102から送出されたブロックヘッダデータ、第一の符号化部103から送出された符号化データ、第二の符号化部104から送出された符号化データ(代表画像B0、差分画像B1〜B3の符号化データ)、をこの順でパックする。ここで、パック部105は、このパックした結果である符号化データの符号量を、画素ブロックごとに監視している。そして、着目画素ブロックについてパックを行うことで得られる符号化データの符号量が閾値を超えている場合、パック部105は、該符号量が該閾値を下回るように、着目画素ブロックの符号化データから差分画像の非可逆符号化結果を打ち切る(切り捨てる)。例えば、着目画素ブロックの符号化データの先頭から順に符号量を計数した場合に、差分画像B2の非可逆符号化結果の途中でその符号量が閾値を超えてしまったとする。この場合、差分画像B3(これに差分画像B2の残りの非可逆符号化結果も加えてよい)を着目画素ブロックの符号化データから打ち切る。これにより、符号量が閾値を超えない固定長の符号化データを画素ブロックごとに出力することができる。   The pack unit 105 includes block header data sent from the extraction unit 102, coded data sent from the first coding unit 103, coded data sent from the second coding unit 104 (representative images B0, The encoded data of the difference images B1 to B3) are packed in this order. Here, the pack unit 105 monitors the code amount of the encoded data, which is the result of packing, for each pixel block. When the code amount of the encoded data obtained by packing the pixel block of interest exceeds the threshold value, the pack unit 105 encodes the encoded data of the pixel block of interest so that the code amount falls below the threshold value. The lossy encoding result of the difference image is cut off (cut off). For example, when the code amount is counted sequentially from the beginning of the encoded data of the pixel block of interest, it is assumed that the code amount exceeds the threshold in the middle of the lossy encoding result of the difference image B2. In this case, the difference image B3 (the remaining lossy encoding result of the difference image B2 may be added thereto) from the encoded data of the pixel block of interest. As a result, fixed-length encoded data whose code amount does not exceed the threshold value can be output for each pixel block.

次に、上記のようにして得られた、画素ブロックごとの符号化データを復号する場合について説明する。この復号を行う画像処理装置(復号装置)の機能構成例について、図4のブロック図を用いて説明する。なお、図4の画像処理装置は、図1の画像処理装置と同じ装置であってもよいし、異なる装置であってもよい。   Next, a case where the encoded data for each pixel block obtained as described above is decoded will be described. A functional configuration example of an image processing apparatus (decoding apparatus) that performs this decoding will be described with reference to the block diagram of FIG. Note that the image processing apparatus in FIG. 4 may be the same apparatus as the image processing apparatus in FIG. 1 or a different apparatus.

ヘッダ解析部401は、着目画素ブロックの固定長符号化データを受ける(取得する)と、この固定長符号化データから、ブロックヘッダデータを抽出する。第一の復号化部402は、着目画素ブロックの符号化データを受けると、第一の符号化部103により符号化された画像情報を復号する。第二の復号化部403は、着目画素ブロックの符号化データを受けると、第二の符号化部104により符号化された階調画素ブロックを復号する。復元部404は、ヘッダ解析部401から得られるブロックヘッダデータと、第一の復号化部402が復号した画像情報と、第二の復号化部403が復号した階調画素ブロックと、から着目画素ブロックを復号し、出力する。   When header analysis unit 401 receives (acquires) the fixed-length encoded data of the pixel block of interest, it extracts block header data from the fixed-length encoded data. When receiving the encoded data of the pixel block of interest, the first decoding unit 402 decodes the image information encoded by the first encoding unit 103. When receiving the encoded data of the pixel block of interest, the second decoding unit 403 decodes the gradation pixel block encoded by the second encoding unit 104. The restoration unit 404 uses the block header data obtained from the header analysis unit 401, the image information decoded by the first decoding unit 402, and the gradation pixel block decoded by the second decoding unit 403, as a target pixel. Decode and output the block.

以下では、図4に示した各部についてより詳細に説明する。ヘッダ解析部401は、着目画素ブロックの固定長符号化データを受けると、この固定長符号化データからブロックヘッダデータを抽出するのであるが、このブロックヘッダデータは、高周波画素の平均画素値若しくは適当な値を示すものである。何れを示しているのかは、第一の復号化部402により復号される画像情報が「全ての画素に対するビット値が0である」ことを示しているか否かで判別可能である。即ち、全ての画素に対するビット値が0の場合、高周波画素が存在しないことを示しているのであるから、ブロックヘッダデータは、適当な値を示すことになる。そしてヘッダ解析部401は、抽出したブロックヘッダデータを復元部404に対して送出する。また、ヘッダ解析部401は、固定長符号化データから画像情報の符号化データの先頭ビットを頭出しして第一の復号化部402へ出力する。勿論、頭出し処理をするのではなく、先頭ビットの位置を示すポインタを固定長符号化データと一緒に出力するという構成にしても良い。   Below, each part shown in FIG. 4 is demonstrated in detail. When the header analysis unit 401 receives the fixed-length encoded data of the pixel block of interest, the header analysis unit 401 extracts block header data from the fixed-length encoded data. This indicates a correct value. Which is indicated can be determined by whether or not the image information decoded by the first decoding unit 402 indicates that “the bit values for all the pixels are 0”. That is, when the bit values for all the pixels are 0, it indicates that there is no high frequency pixel, so the block header data indicates an appropriate value. Then, the header analysis unit 401 sends the extracted block header data to the restoration unit 404. Further, the header analysis unit 401 cues the first bit of the encoded data of the image information from the fixed length encoded data and outputs it to the first decoding unit 402. Of course, instead of performing cue processing, a pointer indicating the position of the first bit may be output together with the fixed-length encoded data.

第一の復号化部402は、画像情報の符号化データが頭出しされた固定長符号化データ、若しくは画像情報の符号化データの先頭位置を示したポインタと固定長符号化データを受け取る。そして第一の復号化部402は、画像情報の符号化データに対して第一の符号化部103に対応する復号処理(第1の復号)を行うことで、この画像情報を復元し、復元した画像情報を復元部404に対して送出する。また、第一の復号化部402は、階調画素ブロックの符号化データの先頭ビットを頭出しして第二の復号化部403へ出力する。ここでも、頭出しの代わりに階調画素ブロックの符号化データの先頭ビット位置を示すポインタと固定長符号化データを一緒に出力するという構成にしても良い。   The first decoding unit 402 receives fixed-length encoded data in which encoded data of image information is cued, or a pointer indicating the head position of encoded data of image information and fixed-length encoded data. The first decoding unit 402 restores the image information by performing a decoding process (first decoding) corresponding to the first encoding unit 103 on the encoded data of the image information. The image information is sent to the restoration unit 404. In addition, the first decoding unit 402 cues the first bit of the encoded data of the gradation pixel block and outputs it to the second decoding unit 403. Here, instead of the cue, a pointer indicating the head bit position of the encoded data of the gradation pixel block and the fixed-length encoded data may be output together.

第二の復号化部403は、階調画素ブロックの符号化データが頭出しされた固定長符号化データ、若しくは階調画素ブロックの符号化データの先頭位置を示したポインタと固定長符号化データを受け取る。そして第二の復号化部403は、階調画素ブロックの符号化データに対して、第二の符号化部104に対応する復号処理(第2の復号)を行うことで、この階調画素ブロックを復元し、復元した階調画素ブロックを復元部404に対して送出する。   The second decoding unit 403 includes fixed-length encoded data in which the encoded data of the gradation pixel block is cued, or a pointer indicating the start position of the encoded data of the gradation pixel block and the fixed-length encoded data Receive. Then, the second decoding unit 403 performs a decoding process (second decoding) corresponding to the second encoding unit 104 on the encoded data of the gradation pixel block, thereby the gradation pixel block. And the restored gradation pixel block is sent to the restoration unit 404.

第二の復号化部403の機能構成例を図5に示す。図5では、図2の構成にあわせて、サブブロック復号化部を4つ設けている。何れのサブブロック復号化部501a〜501dも、同様の復号化処理を行い、復号したサブブロックを合成部502へ、次のサブブロックを頭出ししたデータを次段のサブブロック復号化部501へ出力する。もちろん、符号化側と同様、1つのサブブロック復号化部が各サブブロックを時分割に復号するようにしてもよい。   A functional configuration example of the second decoding unit 403 is shown in FIG. In FIG. 5, four sub-block decoding units are provided in accordance with the configuration of FIG. Any of the sub-block decoding units 501a to 501d performs the same decoding process, the decoded sub-block to the synthesizing unit 502, and the data that cues the next sub-block to the next-stage sub-block decoding unit 501. Output. Of course, like the encoding side, one subblock decoding unit may decode each subblock in a time division manner.

合成部502はそれぞれのサブブロック復号化部501a〜501dから出力されたサブブロックから階調画素ブロックを復号し、復号した階調画素ブロックを復元部404に対して送出する。   The synthesizing unit 502 decodes the gradation pixel block from the sub-blocks output from the respective sub-block decoding units 501a to 501d, and sends the decoded gradation pixel block to the restoration unit 404.

次に、サブブロック復号化部501a〜501d、合成部502のそれぞれについてより詳細に説明する。サブブロック復号化部501aは、代表画像B0の符号化データを復号することで代表画像C0を得る。サブブロック復号化部501bは、差分画像B1の符号化データを復号することで差分画像C1を得る。サブブロック復号化部501cは、差分画像B2の符号化データを復号することで差分画像C2を得る。サブブロック復号化部501dは、差分画像B3の符号化データを復号することで差分画像C3を得る。何れの復号も、サブブロック符号化部に対応した復号化処理である。   Next, each of the sub-block decoding units 501a to 501d and the combining unit 502 will be described in more detail. The sub-block decoding unit 501a obtains the representative image C0 by decoding the encoded data of the representative image B0. The sub-block decoding unit 501b obtains the difference image C1 by decoding the encoded data of the difference image B1. The sub-block decoding unit 501c obtains the difference image C2 by decoding the encoded data of the difference image B2. The sub-block decoding unit 501d obtains the difference image C3 by decoding the encoded data of the difference image B3. Any decoding is a decoding process corresponding to the sub-block encoding unit.

合成部502は、代表画像C0及び差分画像C1〜C3から、以下の式に従って階調画素ブロックDを生成する。iとjは、0≦i≦7、0≦j≦7を満たす整数である。   The synthesizing unit 502 generates a gradation pixel block D from the representative image C0 and the difference images C1 to C3 according to the following formula. i and j are integers satisfying 0 ≦ i ≦ 7 and 0 ≦ j ≦ 7.

D(2i ,2j )=C0(i,j)−C1(i,j)−C2(i,j)−C3(i,j)
D(2i+1,2j )=C0(i,j)+C1(i,j)
D(2i ,2j+1)=C0(i,j)+C2(i,j)
D(2i+1,2j+1)=C0(i,j)+C3(i,j)
なお、C(i,j)は、サブブロック中の座標(i,j)における画素値を示している。このような式を計算することで、階調画素ブロック中の各画素位置における画素値を求めることができる。なお、上記の打ち切りにより、例えば差分画像C3が打ち切られている場合、C3(i,j)=0とみなし、以下のように計算する。
D (2i, 2j) = C0 (i, j) -C1 (i, j) -C2 (i, j) -C3 (i, j)
D (2i + 1, 2j) = C0 (i, j) + C1 (i, j)
D (2i, 2j + 1) = C0 (i, j) + C2 (i, j)
D (2i + 1,2j + 1) = C0 (i, j) + C3 (i, j)
C (i, j) indicates a pixel value at coordinates (i, j) in the sub-block. By calculating such an expression, the pixel value at each pixel position in the gradation pixel block can be obtained. Note that, for example, when the difference image C3 is censored by the censoring, C3 (i, j) = 0 is assumed, and calculation is performed as follows.

D(2i ,2j )=C0(i,j)−C1(i,j)−C2(i,j)
D(2i+1,2j )=C0(i,j)+C1(i,j)
D(2i ,2j+1)=C0(i,j)+C2(i,j)
D(2i+1,2j+1)=C0(i,j)
もちろん、差分画像C1,C2が打ち切られている場合も同様に、C1(i,j)=C2(i,j)=0とする。差分画像C1〜C3が打ち切られた場合、D(2i,2j)からD(2i+1,2j+1)までは全てC0となり、これは単純な4画素平均の画像を直交変換符号化したものと同等の画質となる。また、これらは差分画像が打ち切られても、画質の劣化はあるが画像の形成自体は可能であり、画像の欠損を防止できる事を示している。
D (2i, 2j) = C0 (i, j) -C1 (i, j) -C2 (i, j)
D (2i + 1, 2j) = C0 (i, j) + C1 (i, j)
D (2i, 2j + 1) = C0 (i, j) + C2 (i, j)
D (2i + 1,2j + 1) = C0 (i, j)
Of course, when the difference images C1 and C2 are cut off, C1 (i, j) = C2 (i, j) = 0 is similarly set. When the difference images C1 to C3 are censored, D (2i, 2j) to D (2i + 1, 2j + 1) are all C0, which is equivalent to a simple four-pixel average image obtained by orthogonal transform coding. It becomes. Also, these indicate that even if the difference image is cut off, the image can be formed even though the image quality is deteriorated, and the loss of the image can be prevented.

復元部404は、第一の復号化部402から得られる画像情報を参照し、第二の復号化部403から得られる階調画素ブロック中の各画素のうち、ビット値が「1」に対応する画素、即ち高周波画素を特定する。そして復元部404は、特定した高周波画素の画素値を、ヘッダ解析部401から得たブロックヘッダデータが示す平均画素値に置き換えた階調画素ブロックを出力する。   The restoration unit 404 refers to the image information obtained from the first decoding unit 402, and the bit value corresponds to “1” among the pixels in the gradation pixel block obtained from the second decoding unit 403. A pixel to be operated, that is, a high frequency pixel is specified. Then, the restoration unit 404 outputs a gradation pixel block in which the pixel value of the identified high-frequency pixel is replaced with the average pixel value indicated by the block header data obtained from the header analysis unit 401.

このように、代表画像と差分画像を分割して符号化してから格納することにより、データ量が目標符号量を超えてデータの一部が打ち打ち切られた場合でも、画像の欠損の防止が可能となる。   In this way, by dividing and encoding the representative image and the difference image and storing them, even if the data amount exceeds the target code amount and part of the data is truncated, it is possible to prevent image loss It becomes.

[第2の実施形態]
本実施形態では、第1の実施形態よりも画質劣化の少ない符号化を行う画像処理装置について説明する。本実施形態に係る画像処理装置の機能構成例について、図6のブロック図を用いて説明する。
[Second Embodiment]
In the present embodiment, an image processing apparatus that performs encoding with less image quality degradation than the first embodiment will be described. A functional configuration example of the image processing apparatus according to the present embodiment will be described with reference to the block diagram of FIG.

図6において図1に示した構成要素と同じ構成要素については同じ参照番号をつけている。図6に示した構成が図1に示した構成と異なる点は、第二の符号化部104を第二の符号化部604に置き換えた点と、抽出部102が生成した画像情報を第二の符号化部604にも供給する点にある。   In FIG. 6, the same reference numerals are assigned to the same components as those shown in FIG. The configuration shown in FIG. 6 is different from the configuration shown in FIG. 1 in that the second encoding unit 104 is replaced with the second encoding unit 604 and the image information generated by the extraction unit 102 is the second. This is also supplied to the encoding unit 604.

第二の符号化部604の機能構成例について、図7のブロック図を用いて説明する。なお、以下では、第二の符号化部104と異なる点のみについて説明し、同様の点については触れないこととする。   A functional configuration example of the second encoding unit 604 will be described with reference to the block diagram of FIG. Hereinafter, only points different from the second encoding unit 104 will be described, and the same points will not be touched.

分割部701には、抽出部102から階調画素ブロック及び該階調画素ブロックに対応する画像情報が入力される。階調画素ブロックでは、元々高周波画素であった画素の画素値は、低周波画素の平均画素値で置き換えられている。しかし、この平均画素値は、代表画像B0を求めるために参照する2画素×2画素の領域内の平均画素値と必ずしも一致しない。然るに、この2画素×2画素の領域内に、低周波画素の平均画素値が含まれていると、他の2画素×2画素の領域との間に差が生じてしまい、後段のサブブロック符号化部で圧縮効率が低下する可能性がある。そのため、本実施形態では、代表画像B0を求めるために参照する2画素×2画素の領域内に低周波画素の平均画素値が含まれている場合は、この平均画素値は用いないようにする。   The dividing unit 701 receives the gradation pixel block and the image information corresponding to the gradation pixel block from the extraction unit 102. In the gradation pixel block, the pixel value of the pixel that was originally a high frequency pixel is replaced with the average pixel value of the low frequency pixel. However, this average pixel value does not necessarily match the average pixel value in the region of 2 pixels × 2 pixels referred to obtain the representative image B0. However, if the average pixel value of the low-frequency pixels is included in this 2 pixel × 2 pixel region, a difference occurs between the other 2 pixel × 2 pixel regions, and the sub-block in the subsequent stage There is a possibility that the compression efficiency is lowered in the encoding unit. For this reason, in this embodiment, when the average pixel value of the low-frequency pixel is included in the 2 pixel × 2 pixel region referred to obtain the representative image B0, the average pixel value is not used. .

具体的には、分割部701は、以下の式に従ってB0(i,j)を求める。但し、P(2i,2j)=P(2i+1,2j)=P(2i,2j+1)=P(2i+1,2j+1)=1の場合、この式は計算せず、B0(i,j)=AVE2とする。   Specifically, the dividing unit 701 calculates B0 (i, j) according to the following formula. However, when P (2i, 2j) = P (2i + 1, 2j) = P (2i, 2j + 1) = P (2i + 1, 2j + 1) = 1, this equation is not calculated and B0 (i, j) = AVE2 To do.

B0(i,j)=((1−P(2i,2j))×A(2i,2j)
+(1−P(2i+1,2j))×A(2i+1,2j)
+(1−P(2i,2j+1))×A(2i,2j+1)
+(1−P(2i+1,2j+1))×A(2i+1,2j+1))/(4−P(2i,2j)−P(2i+1,2j)−P(2i,2j+1)−P(2i+1,2j+1))
即ち、ビット値が0の画素の画素値だけを代表画像B0の画素値を求めるための計算に用いる。ここでその一例を図10に示す。図10には、16画素×16画素のサイズの画像情報が示されている。この画像情報の場合に、B0(0,0)(左上隅がi=j=0)は以下の式に従って求められる。
B0 (i, j) = ((1-P (2i, 2j)) × A (2i, 2j)
+ (1−P (2i + 1,2j)) × A (2i + 1,2j)
+ (1-P (2i, 2j + 1)) × A (2i, 2j + 1)
+ (1-P (2i + 1,2j + 1)) * A (2i + 1,2j + 1)) / (4-P (2i, 2j) -P (2i + 1,2j) -P (2i, 2j + 1) -P (2i + 1,2j + 1) )
That is, only the pixel value of the pixel whose bit value is 0 is used for the calculation for obtaining the pixel value of the representative image B0. An example is shown in FIG. FIG. 10 shows image information having a size of 16 pixels × 16 pixels. In the case of this image information, B0 (0, 0) (the upper left corner is i = j = 0) is obtained according to the following equation.

B0(0,0)=(A(1,0)+A(1,1))/2
また、B0(1,0)は以下の式に従って求められる。
B0 (0,0) = (A (1,0) + A (1,1)) / 2
Further, B0 (1,0) is obtained according to the following formula.

B0(1,0)=(A(2,0)+A(2,1)+A(3,1))/3
また、B0(2,0)については、P(4,0)=P(4,1)=P(5,0)=P(5,1)=1であるので、B0(2,0)=AVE2となる。
B0 (1,0) = (A (2,0) + A (2,1) + A (3,1)) / 3
For B0 (2,0), P (4,0) = P (4,1) = P (5,0) = P (5,1) = 1, so B0 (2,0) = AVE2.

差分画像B1〜B3については第1の実施形態と同様、以下の式に従って求める。   Similar to the first embodiment, the difference images B1 to B3 are obtained according to the following equations.

B1(i,j)=A(2i+1,2j )−B0(i,j)
B2(i,j)=A(2i ,2j+1)−B0(i,j)
B3(i,j)=A(2i+1,2j+1)−B0(i,j)
次に、上記のようにして得られた、画素ブロックごとの符号化データを復号する場合について説明する。この復号を行う画像処理装置の機能構成例について、図8のブロック図を用いて説明する。なお、図8の画像処理装置は、図6の画像処理装置と同じ装置であってもよいし、異なる装置であってもよい。図8に示した構成において、図4に示した構成要素と同じ構成要素については同じ参照番号をつけている。図8に示した構成が図4に示した構成と異なる点は、第二の復号化部403を第二の復号化部803に置き換えると共に、第一の復号化部402による復号結果(画像情報)がこの第二の復号化部803に供給されている点にある。
B1 (i, j) = A (2i + 1,2j) -B0 (i, j)
B2 (i, j) = A (2i, 2j + 1) -B0 (i, j)
B3 (i, j) = A (2i + 1,2j + 1) -B0 (i, j)
Next, a case where the encoded data for each pixel block obtained as described above is decoded will be described. A functional configuration example of the image processing apparatus that performs this decoding will be described with reference to the block diagram of FIG. Note that the image processing apparatus in FIG. 8 may be the same apparatus as the image processing apparatus in FIG. 6 or a different apparatus. In the configuration shown in FIG. 8, the same reference numerals are given to the same components as those shown in FIG. The configuration shown in FIG. 8 is different from the configuration shown in FIG. 4 in that the second decoding unit 403 is replaced with the second decoding unit 803 and the decoding result (image information) by the first decoding unit 402 is changed. ) Is supplied to the second decryption unit 803.

第二の復号化部803の機能構成例について、図9のブロック図を用いて説明する。図9に示した構成において、図5に示した構成要素と同じ構成要素については同じ参照番号をつけている。図9に示した構成が図5に示した構成と異なる点は、合成部502が合成部902に置き換えられていると共に、この合成部902に復号された画像情報が供給されている点にある。以下では、この合成部902について説明する。   A functional configuration example of the second decoding unit 803 will be described with reference to the block diagram of FIG. In the configuration shown in FIG. 9, the same reference numerals are assigned to the same components as those shown in FIG. The configuration shown in FIG. 9 is different from the configuration shown in FIG. 5 in that the synthesis unit 502 is replaced with a synthesis unit 902 and decoded image information is supplied to the synthesis unit 902. . Hereinafter, the combining unit 902 will be described.

合成部902は、それぞれのサブブロック復号化部501a〜501dから出力されたサブブロックから階調画素ブロックを復号し、復号した階調画素ブロックを復元部404に対して送出する。   The synthesizing unit 902 decodes the gradation pixel block from the sub-blocks output from the respective sub-block decoding units 501a to 501d, and sends the decoded gradation pixel block to the restoration unit 404.

合成部902は、代表画像C0、差分画像C1〜C3、画像情報から、以下の式に従って階調画素ブロックDを生成する。iとjは、0≦i≦7、0≦j≦7を満たす整数である。   The synthesizing unit 902 generates a gradation pixel block D from the representative image C0, the difference images C1 to C3, and the image information according to the following formula. i and j are integers satisfying 0 ≦ i ≦ 7 and 0 ≦ j ≦ 7.

D(2i ,2j )=(1−P(2i,2j))×C0(i,j)
−(1−P(2i+1,2j))×C1(i,j)
−(1−P(2i,2j+1))×C2(i,j)
−(1−P(2i+1,2j+1))×C3(i,j)
D(2i+1,2j )=C0(i,j)+C1(i,j)
D(2i ,2j+1)=C0(i,j)+C2(i,j)
D(2i+1,2j+1)=C0(i,j)+C3(i,j)
画像情報が図10に示したものである場合、例えばD(0,0)、D(2,0)のそれぞれは以下のように計算される。
D (2i, 2j) = (1-P (2i, 2j)) * C0 (i, j)
− (1−P (2i + 1,2j)) × C1 (i, j)
− (1−P (2i, 2j + 1)) × C2 (i, j)
− (1−P (2i + 1,2j + 1)) × C3 (i, j)
D (2i + 1, 2j) = C0 (i, j) + C1 (i, j)
D (2i, 2j + 1) = C0 (i, j) + C2 (i, j)
D (2i + 1,2j + 1) = C0 (i, j) + C3 (i, j)
When the image information is as shown in FIG. 10, for example, each of D (0,0) and D (2,0) is calculated as follows.

D(0,0)=0−C1(0,0)−0−C3(0,0)
D(2,0)=C0(1,0)−0−C2(1,0)−C3(1,0)
なお、打ち切られた差分画像については第1の実施形態と同様、計算式から外すことで対処する。例えば差分画像C3が打ち切られている場合、上記の計算式からC3の項を外す。
D (0,0) = 0-C1 (0,0) -0-C3 (0,0)
D (2,0) = C0 (1,0) -0-C2 (1,0) -C3 (1,0)
Note that the difference image that has been censored is dealt with by removing it from the calculation formula, as in the first embodiment. For example, when the difference image C3 is truncated, the term C3 is removed from the above calculation formula.

以上の説明により、本実施形態によれば、平均画像を低周波画素のみから算出することで、階調情報への高周波画素の影響が少なくなるので、より原画像からの劣化の少ない画像符号化が可能となる。   As described above, according to the present embodiment, since the average image is calculated from only the low-frequency pixels, the influence of the high-frequency pixels on the gradation information is reduced, so that image coding with less deterioration from the original image is performed. Is possible.

[第3の実施形態]
図1〜図9に示した各部は、ハードウェアで構成してもよいが、コンピュータプログラムで実装してもよい。後者の場合、CPU、メモリなどを有するコンピュータのこのメモリにこのコンピュータプログラムをインストールし、このCPUがこのコンピュータプログラムを実行することで、このコンピュータは、図1〜図9に示した各部の機能を実現することができる。もちろん、符号化側、復号側のそれぞれのコンピュータプログラムを別個のコンピュータにインストールして実行させてもよい。
[Third Embodiment]
Each part shown in FIGS. 1 to 9 may be configured by hardware, but may be implemented by a computer program. In the latter case, this computer program is installed in this memory of a computer having a CPU, a memory, etc., and this computer executes this computer program, so that this computer has the functions of the components shown in FIGS. Can be realized. Of course, the computer programs on the encoding side and the decoding side may be installed and executed on separate computers.

(その他の実施例)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other examples)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (7)

入力画像を複数の画素から成る画素ブロックごとに分割する分割手段と、
前記分割手段が分割した画素ブロックごとに、該画素ブロックを構成する各画素が、閾値以上の画素値を有する高周波画素、該閾値よりも小さい画素値を有する低周波画素、の何れであるのかを示す画像情報を生成する第1の生成手段と、
前記第1の生成手段が画素ブロックごとに生成した画像情報に対して可逆符号化を行う可逆符号化手段と、
前記分割手段が分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値の平均画素値を求める計算手段と、
前記分割手段が分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値を該画素ブロック中の前記低周波画素を用いて計算される画素値に置き換えることで得られる階調画素ブロックを生成する第2の生成手段と、
前記第2の生成手段が画素ブロックごとに生成した階調画素ブロックに対して非可逆符号化を行う非可逆符号化手段と、
前記分割手段が分割した画素ブロックごとに、前記計算手段が計算した平均画素値、前記可逆符号化手段による可逆符号化結果、前記非可逆符号化手段による非可逆符号化結果、をパックし、該画素ブロックの符号化データとして出力する出力手段と
を備え、
前記非可逆符号化手段は、
前記階調画素ブロックから、該階調画素ブロックの縮小画像を代表画像として生成する手段と、
前記階調画素ブロックから前記代表画像とは異なる方法で得られる複数枚の縮小画像から前記代表画像を差し引いた差分画像を生成する第3の生成手段と、
前記代表画像、前記第3の生成手段が生成したそれぞれの差分画像、に対して非可逆符号化を行うことで、前記階調画素ブロックに対する非可逆符号化結果を生成する手段とを備え、
前記出力手段は、
着目画素ブロックについて前記パックを行うことで得られる符号化データの符号量が閾値を超えている場合、該符号量が該閾値を下回るように前記着目画素ブロックの符号化データから前記差分画像の非可逆符号化結果を打ち切り、該打ち切りにより得られる符号化データを、前記着目画素ブロックの符号化データとして出力する
ことを特徴とする画像処理装置。
A dividing unit that divides the input image into pixel blocks each including a plurality of pixels;
For each pixel block divided by the dividing means, whether each pixel constituting the pixel block is a high-frequency pixel having a pixel value equal to or higher than a threshold value or a low-frequency pixel having a pixel value smaller than the threshold value. First generating means for generating image information to be shown;
Lossless encoding means for performing lossless encoding on image information generated by the first generation means for each pixel block;
For each pixel block divided by the dividing means, calculating means for obtaining an average pixel value of pixel values of the high-frequency pixels in the pixel block;
A gradation pixel block obtained by replacing the pixel value of the high-frequency pixel in the pixel block with a pixel value calculated using the low-frequency pixel in the pixel block for each pixel block divided by the dividing means Second generating means for generating
Irreversible encoding means for performing irreversible encoding on the gradation pixel block generated by the second generation means for each pixel block;
For each pixel block divided by the dividing means, the average pixel value calculated by the calculating means, the lossless encoding result by the lossless encoding means, and the lossy encoding result by the lossy encoding means are packed, Output means for outputting as pixel block encoded data,
The lossy encoding means includes
Means for generating a reduced image of the gradation pixel block as a representative image from the gradation pixel block;
Third generation means for generating a differential image obtained by subtracting the representative image from a plurality of reduced images obtained by a method different from the representative image from the gradation pixel block;
Means for generating an irreversible encoding result for the gradation pixel block by performing irreversible encoding on the representative image and each difference image generated by the third generation unit;
The output means includes
When the code amount of the encoded data obtained by performing the pack on the pixel block of interest exceeds a threshold value, the difference image is not detected from the encoded data of the pixel block of interest so that the code amount falls below the threshold value. An image processing apparatus, wherein the lossless encoding result is aborted, and the encoded data obtained by the abort is output as the encoded data of the pixel block of interest.
前記第2の生成手段は、前記分割手段が分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値を、該画素ブロック中の前記低周波画素の平均画素値に置き換えることで得られる階調画素ブロックを生成することを特徴とする請求項1に記載の画像処理装置。   The second generation unit is obtained by replacing the pixel value of the high frequency pixel in the pixel block with the average pixel value of the low frequency pixel in the pixel block for each pixel block divided by the dividing unit. The image processing apparatus according to claim 1, wherein a gradation pixel block to be generated is generated. 請求項1又は2に記載の画像処理装置によって符号化された各画素ブロックの符号化データを取得する手段と、
着目画素ブロックの符号化データから、該着目画素ブロックについて前記計算手段が計算した高周波画素の平均画素値を抽出する手段と、
前記着目画素ブロックの符号化データから、該着目画素ブロックについて前記第1の生成手段が生成した画像情報を復号する第1の復号手段と、
前記着目画素ブロックの符号化データから、前記代表画像と前記差分画像とを復号し、該復号した代表画像と差分画像とから、前記着目画素ブロックの階調画素ブロックを生成する第2の復号手段と、
前記第1の復号手段が復号した画像情報から、前記第2の復号手段が復号した階調画素ブロック中の高周波画素を特定し、該特定した高周波画素の画素値を前記第1の復号手段が復号した平均画素値に置き換えた該階調画素ブロックを出力する手段と
を備えることを特徴とする復号装置。
Means for obtaining encoded data of each pixel block encoded by the image processing apparatus according to claim 1;
Means for extracting an average pixel value of high-frequency pixels calculated by the calculation means for the target pixel block from the encoded data of the target pixel block;
First decoding means for decoding image information generated by the first generation means for the target pixel block from the encoded data of the target pixel block;
Second decoding means for decoding the representative image and the difference image from the encoded data of the pixel block of interest and generating a gradation pixel block of the pixel block of interest from the decoded representative image and difference image When,
The high-frequency pixel in the gradation pixel block decoded by the second decoding unit is specified from the image information decoded by the first decoding unit, and the pixel value of the specified high-frequency pixel is determined by the first decoding unit. And a means for outputting the gradation pixel block replaced with the decoded average pixel value.
画像処理装置が行う画像処理方法であって、
前記画像処理装置の分割手段が、入力画像を複数の画素から成る画素ブロックごとに分割する分割工程と、
前記画像処理装置の第1の生成手段が、前記分割工程で分割した画素ブロックごとに、該画素ブロックを構成する各画素が、閾値以上の画素値を有する高周波画素、該閾値よりも小さい画素値を有する低周波画素、の何れであるのかを示す画像情報を生成する第1の生成工程と、
前記画像処理装置の可逆符号化手段が、前記第1の生成工程で画素ブロックごとに生成した画像情報に対して可逆符号化を行う可逆符号化工程と、
前記画像処理装置の計算手段が、前記分割工程で分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値の平均画素値を求める計算工程と、
前記画像処理装置の第2の生成手段が、前記分割工程で分割した画素ブロックごとに、該画素ブロック中の前記高周波画素の画素値を該画素ブロック中の前記低周波画素を用いて計算される画素値に置き換えることで得られる階調画素ブロックを生成する第2の生成工程と、
前記画像処理装置の非可逆符号化手段が、前記第2の生成工程で画素ブロックごとに生成した階調画素ブロックに対して非可逆符号化を行う非可逆符号化工程と、
前記画像処理装置の出力手段が、前記分割工程で分割した画素ブロックごとに、前記計算工程で計算した平均画素値、前記可逆符号化工程での可逆符号化結果、前記非可逆符号化工程での非可逆符号化結果、をパックし、該画素ブロックの符号化データとして出力する出力工程と
を備え、
前記非可逆符号化工程は、
前記階調画素ブロックから、該階調画素ブロックの縮小画像を代表画像として生成する工程と、
前記階調画素ブロックから前記代表画像とは異なる方法で得られる複数枚の縮小画像から前記代表画像を差し引いた差分画像を生成する第3の生成工程と、
前記代表画像、前記第3の生成工程で生成したそれぞれの差分画像、に対して非可逆符号化を行うことで、前記階調画素ブロックに対する非可逆符号化結果を生成する工程とを備え、
前記出力工程では、
着目画素ブロックについて前記パックを行うことで得られる符号化データの符号量が閾値を超えている場合、該符号量が該閾値を下回るように前記着目画素ブロックの符号化データから前記差分画像の非可逆符号化結果を打ち切り、該打ち切りにより得られる符号化データを、前記着目画素ブロックの符号化データとして出力する
ことを特徴とする画像処理方法。
An image processing method performed by an image processing apparatus,
A dividing step in which the dividing unit of the image processing apparatus divides the input image into pixel blocks each including a plurality of pixels;
For each pixel block divided by the dividing step by the first generation unit of the image processing device, each pixel constituting the pixel block has a high-frequency pixel having a pixel value equal to or higher than a threshold value, and a pixel value smaller than the threshold value A first generation step of generating image information indicating which is a low-frequency pixel having:
A lossless encoding step in which the lossless encoding means of the image processing device performs lossless encoding on the image information generated for each pixel block in the first generation step;
A calculating step of calculating an average pixel value of pixel values of the high-frequency pixels in the pixel block for each pixel block divided in the dividing step by the calculation means of the image processing device;
The second generation means of the image processing device calculates the pixel value of the high frequency pixel in the pixel block for each pixel block divided in the division step using the low frequency pixel in the pixel block. A second generation step of generating a gradation pixel block obtained by replacing with a pixel value;
An irreversible encoding step in which the irreversible encoding means of the image processing device performs irreversible encoding on the gradation pixel block generated for each pixel block in the second generation step;
The output means of the image processing device, for each pixel block divided in the division step, the average pixel value calculated in the calculation step, the lossless encoding result in the lossless encoding step, the lossy encoding step An irreversible encoding result is packed and output as encoded data of the pixel block, and
The lossy encoding step includes:
Generating a reduced image of the gradation pixel block from the gradation pixel block as a representative image;
A third generation step of generating a differential image obtained by subtracting the representative image from a plurality of reduced images obtained by a method different from the representative image from the gradation pixel block;
Generating lossy encoding results for the gradation pixel block by performing lossy encoding on the representative image and each difference image generated in the third generation step,
In the output step,
When the code amount of the encoded data obtained by performing the pack on the pixel block of interest exceeds a threshold value, the difference image is not detected from the encoded data of the pixel block of interest so that the code amount falls below the threshold value. An image processing method comprising: truncating a lossless encoding result and outputting encoded data obtained by the truncation as encoded data of the pixel block of interest.
復号装置が行う画像処理方法であって、
前記復号装置の取得手段が、請求項1又は2に記載の画像処理装置によって符号化された各画素ブロックの符号化データを取得する工程と、
前記復号装置の抽出手段が、着目画素ブロックの符号化データから、該着目画素ブロックについて前記計算手段が計算した高周波画素の平均画素値を抽出する手段と、
前記復号装置の第1の復号手段が、前記着目画素ブロックの符号化データから、該着目画素ブロックについて前記第1の生成工程で生成した画像情報を復号する第1の復号工程と、
前記復号装置の第2の復号手段が、前記着目画素ブロックの符号化データから、前記代表画像と前記差分画像とを復号し、該復号した代表画像と差分画像とから、前記着目画素ブロックの階調画素ブロックを生成する第2の復号工程と、
前記復号装置の出力手段が、前記第1の復号工程で復号した画像情報から、前記第2の復号工程で復号した階調画素ブロック中の高周波画素を特定し、該特定した高周波画素の画素値を前記第1の復号工程で復号した平均画素値に置き換えた該階調画素ブロックを出力する工程と
を備えることを特徴とする画像処理方法。
An image processing method performed by a decoding device,
The acquisition unit of the decoding apparatus acquires encoded data of each pixel block encoded by the image processing apparatus according to claim 1;
Means for extracting, from the encoded data of the target pixel block, an average pixel value of the high-frequency pixels calculated by the calculation means for the target pixel block;
A first decoding step in which a first decoding unit of the decoding device decodes image information generated in the first generation step for the target pixel block from encoded data of the target pixel block;
Second decoding means of the decoding device decodes the representative image and the difference image from the encoded data of the pixel block of interest, and calculates the floor of the pixel block of interest from the decoded representative image and difference image. A second decoding step for generating a tonal pixel block;
The output unit of the decoding device specifies the high frequency pixel in the gradation pixel block decoded in the second decoding step from the image information decoded in the first decoding step, and the pixel value of the specified high frequency pixel And a step of outputting the gradation pixel block in which the average pixel value decoded in the first decoding step is replaced.
コンピュータを、請求項1又は2に記載の画像処理装置の各手段として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as each unit of the image processing apparatus according to claim 1. コンピュータを、請求項3に記載の復号装置の各手段として機能させるためのコンピュータプログラム。   The computer program for functioning a computer as each means of the decoding apparatus of Claim 3.
JP2011106627A 2011-05-11 2011-05-11 Image processing device, decoding device, and image processing method Withdrawn JP2012239033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011106627A JP2012239033A (en) 2011-05-11 2011-05-11 Image processing device, decoding device, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011106627A JP2012239033A (en) 2011-05-11 2011-05-11 Image processing device, decoding device, and image processing method

Publications (1)

Publication Number Publication Date
JP2012239033A true JP2012239033A (en) 2012-12-06

Family

ID=47461548

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011106627A Withdrawn JP2012239033A (en) 2011-05-11 2011-05-11 Image processing device, decoding device, and image processing method

Country Status (1)

Country Link
JP (1) JP2012239033A (en)

Similar Documents

Publication Publication Date Title
JP4365957B2 (en) Image processing method and apparatus and storage medium
US8270716B2 (en) Selectively compressing picture and text areas of an image to maintain highest quality and effective compaction
US6909810B2 (en) Image processing apparatus and method, and its computer program and storage medium
KR101266577B1 (en) The method and apparatus of processing an image
US8213727B2 (en) Image encoding apparatus and image decoding apparatus, and control method thereof
JP4956304B2 (en) Image encoding apparatus, control method therefor, computer program, and computer-readable storage medium
RU2567988C2 (en) Encoder, method of encoding data, decoder, method of decoding data, system for transmitting data, method of transmitting data and programme product
US8041135B2 (en) Image encoding apparatus and control method thereof
KR100944928B1 (en) Apparatus and method for encoding and computing a discrete cosine transform using a butterfly processor
JP5101962B2 (en) Image coding apparatus, control method therefor, and computer program
JP2006093958A (en) Progressive jpeg decoding system
US9369734B2 (en) Method and apparatus for encoding and decoding by wavelet transform
US8023756B2 (en) Image encoding apparatus and method of controlling same
Hussin et al. A comparative study on improvement of image compression method using hybrid DCT-DWT techniques with huffman encoding for wireless sensor network application
JP5086777B2 (en) Image encoding apparatus, control method therefor, computer program, and computer-readable storage medium
JP2012239033A (en) Image processing device, decoding device, and image processing method
JP4743884B2 (en) Image coding apparatus and control method thereof
JP4743883B2 (en) Image coding apparatus and control method thereof
JP4971881B2 (en) Image encoding apparatus, image decoding apparatus, and control method thereof
JP2008109195A (en) Image processor
JP4944833B2 (en) Image coding apparatus and control method thereof
JP2013255075A (en) Image coding device and image decoding device and control method thereof
JP2012074898A (en) Image encoding device, image decoding device, and control method for them
Wang et al. Reversible Data-Hiding Techniques for Digital Images
Argyriou DNA based image coding

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