JP5652101B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP5652101B2
JP5652101B2 JP2010226078A JP2010226078A JP5652101B2 JP 5652101 B2 JP5652101 B2 JP 5652101B2 JP 2010226078 A JP2010226078 A JP 2010226078A JP 2010226078 A JP2010226078 A JP 2010226078A JP 5652101 B2 JP5652101 B2 JP 5652101B2
Authority
JP
Japan
Prior art keywords
value
code table
pixel
variance
code
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.)
Expired - Fee Related
Application number
JP2010226078A
Other languages
Japanese (ja)
Other versions
JP2012080470A (en
Inventor
武史 城
武史 城
寛史 長岡
寛史 長岡
渡部 康弘
康弘 渡部
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010226078A priority Critical patent/JP5652101B2/en
Publication of JP2012080470A publication Critical patent/JP2012080470A/en
Application granted granted Critical
Publication of JP5652101B2 publication Critical patent/JP5652101B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本願開示は、一般に画像処理装置及び方法に関し、詳しくは符号化又は復号化を行なう画像処理装置及び方法に関する。   The present disclosure relates generally to an image processing apparatus and method, and more particularly to an image processing apparatus and method that performs encoding or decoding.

PNG(Portable Network Graphics)やJPEG(Joint Photographic Experts Group)−LSに代表される画像の可逆符号化方式は、圧縮時に画質が劣化しないため、主に高精細であることが要求される画像の圧縮に採用されている。これらの静止画像可逆圧縮においては、周辺画素から圧縮対象画素の画素値を予測し、その予測値と実画素値との差分を取ることで画像の冗長性を有効に活用している。予測によって生成された残差を高い圧縮率で圧縮するためには、発生する予測残差の確率分布に基づいて構築された可変長符号表を使用するハフマン符号化が有効である。ハフマン符号による静止画像圧縮では圧縮前に予測値を生成し、圧縮対象画素との残差を計算し、残差の分布を計算する。その分布に基づいて各差分値の出現確率を示すハフマン木を構築することでハフマン符号表を生成する。その後、生成したハフマン符号表によって圧縮データを生成する。この方法においては、圧縮データを展開する際には圧縮に使用した符号表が既知でなければならないため、圧縮データには圧縮された残差データだけでなく、符号表そのものを付加することで展開を可能にしている。符号表そのものを圧縮データに付加するため、圧縮データのサイズが増大してしまうが、ある程度以上の画像サイズである場合は、実際には圧縮データに占める符号表のサイズは問題にならない。例えば、1920x1088画素の画像の輝度を圧縮する場合、一画素を8bitとし、圧縮率を50%とすると、圧縮データのサイズは約1Mbyteである。一方、可変長符号の最大長を16bitとした場合でも、全差分に対する符号を持つのに必要なサイズは高々1Kbyte程度であり、圧縮データのサイズの0.1%程度のサイズであるため、圧縮率を損なうことは実質的に無いといえる。   Image lossless encoding methods represented by PNG (Portable Network Graphics) and JPEG (Joint Photographic Experts Group) -LS do not deteriorate the image quality during compression, and mainly compress images that require high definition. Has been adopted. In these still image reversible compressions, the pixel value of the compression target pixel is predicted from the surrounding pixels, and the redundancy of the image is effectively utilized by taking the difference between the predicted value and the actual pixel value. In order to compress the residual generated by prediction at a high compression rate, Huffman coding using a variable length code table constructed based on the probability distribution of the generated prediction residual is effective. In still image compression using the Huffman code, a prediction value is generated before compression, a residual with a compression target pixel is calculated, and a distribution of the residual is calculated. A Huffman code table is generated by constructing a Huffman tree indicating the appearance probability of each difference value based on the distribution. Thereafter, compressed data is generated by the generated Huffman code table. In this method, when the compressed data is expanded, the code table used for compression must be known. Therefore, the compressed data is expanded by adding not only the compressed residual data but also the code table itself. Is possible. Since the code table itself is added to the compressed data, the size of the compressed data increases, but in the case of an image size of a certain level or more, the size of the code table in the compressed data does not actually matter. For example, when compressing the brightness of an image of 1920 × 1088 pixels, if one pixel is 8 bits and the compression rate is 50%, the size of the compressed data is about 1 Mbyte. On the other hand, even when the maximum length of the variable length code is 16 bits, the size required to have a code for all the differences is at most about 1 Kbyte, which is about 0.1% of the size of the compressed data. It can be said that there is virtually no loss.

このように符号表のサイズは圧縮データに対して十分に小さいが、ハフマン符号表を構築するためには一度画像全体を走査しなければならない。このため、入力画像格納メモリとして、一画面全体が収まるだけのメモリが必要となってしまう。また、一度画像全体を走査しなければ符号化を開始できないため、逐次符号化が困難であり、符号化速度の面でも高速化が困難である。逐次符号化を実現するためには、一画面全体を走査することをせずに、予め用意された符号表を使用する方式が考えられる。しかしこの場合の符号表は、情報源の確率分布に応じたハフマン符号ではないので、最適な効率を実現するハフマン符号化に対して圧縮率が劣ってしまう。そのため、画像を所定のブロックに分割し、ブロック単位で複数の符号表の中から圧縮率が最も高いものを選択することが一般的に行われている。この場合、各ブロックは独立に圧縮されるため、符号表選択と符号化のために必要なメモリは所定単位のブロックが収まるだけのサイズでよく、ブロック単位で逐次符号化することが可能である。この構成において予め用意される符号表はラプラス分布や正規分布などの特定の汎用的な確率密度関数に基づいたものである。これは予測残差の分布は一般的に0が最も多く、残差が大きくなるにつれて出現頻度が低下する左右対称の分布となることに基づいている。このように符号表が汎用的な確率密度関数に基づくものである場合、各ブロックで使用する符号表は、各ブロックで発生する予測残差のばらつき具合、すなわち分散から決定することができる。   Thus, although the code table size is sufficiently small with respect to the compressed data, the entire image must be scanned once in order to construct the Huffman code table. For this reason, a memory that can fit the entire screen is required as the input image storage memory. Also, since encoding cannot be started unless the entire image is scanned once, sequential encoding is difficult, and it is difficult to increase the speed in terms of encoding speed. In order to realize the sequential encoding, a method of using a code table prepared in advance without scanning one entire screen can be considered. However, since the code table in this case is not a Huffman code corresponding to the probability distribution of the information source, the compression rate is inferior to Huffman coding that achieves optimum efficiency. For this reason, it is a common practice to divide an image into predetermined blocks and select a block with the highest compression rate from a plurality of code tables. In this case, since each block is compressed independently, the memory required for code table selection and encoding may be a size that can accommodate a predetermined unit of block, and can be sequentially encoded in units of blocks. . In this configuration, a code table prepared in advance is based on a specific general-purpose probability density function such as a Laplace distribution or a normal distribution. This is based on the fact that the distribution of predicted residuals is generally 0, and the distribution is symmetrical with the appearance frequency decreasing as the residual increases. As described above, when the code table is based on a general-purpose probability density function, the code table used in each block can be determined from the variation degree of the prediction residual generated in each block, that is, the variance.

この構成においてハフマン符号化に近い圧縮率を達成するためには、より細かなブロック単位で符号表選択をすればよい。しかしながら、ブロックのサイズが小さくなるほど、使用した符号表を示すフラグビットのサイズが圧縮データに対して相対的に大きくなるので、圧縮率が低下してしまう。また、高精細な画像ブロックでは周辺画素との相関性が低く、生成した予測値が実際の画素値と大きく異なる場合が多くなるため、特定の確率密度関数に基づいた符号表では高い圧縮率を達成できない。特に、ブロックサイズが小さいほど、残差の分布は、中心0で左右対称である期待される分布とは異なってしまい、圧縮率が低下するという問題が発生してしまう。   In this configuration, in order to achieve a compression rate close to that of Huffman coding, code table selection may be performed in finer block units. However, as the block size decreases, the size of the flag bit indicating the used code table increases relative to the compressed data, so the compression rate decreases. In addition, high-definition image blocks have low correlation with surrounding pixels, and the generated prediction value is often significantly different from the actual pixel value. Therefore, a code table based on a specific probability density function has a high compression ratio. Cannot be achieved. In particular, as the block size is smaller, the residual distribution is different from an expected distribution that is bilaterally symmetric at the center 0, which causes a problem that the compression ratio decreases.

特開平7−107492号公報JP-A-7-107492 特開2000−115782号公報JP 2000-115782 A

以上を鑑みると、局所的な画像領域に対して符号表を選択する静止画像可逆圧縮方式において、画像領域が小さい場合でも高い圧縮率を達成できる画像処理装置及び方法を提供することが望まれる。   In view of the above, it is desired to provide an image processing apparatus and method that can achieve a high compression rate even when the image area is small in the still image lossless compression method that selects a code table for a local image area.

画像処理装置は、着目画素周辺の周辺画素値に応じて第1の分散値を算出するとともに、前記周辺画素値に基づいて算出された前記着目画素の予測値に応じて第2の分散値を算出し、横軸が前記着目画素の値と前記予測値との差分である予測誤差であり、縦軸が前記予測誤差の出現確率である確率分布を考えた場合に、左右の一方で前記第1の分散値を有し他方で前記第2の分散値を有する左右非対称な確率分布に対応する符号表を、前記第1の分散値と前記第2の分散値とに応じて選択する符号表選択部と、前記着目画素値から前記予測値を引いた残差を前記選択された符号表により符号化又は復号化する符号化又は復号化部とを含むことを特徴とする。 The image processing apparatus calculates a first variance value according to the peripheral pixel value around the target pixel, and calculates a second variance value according to the predicted value of the target pixel calculated based on the peripheral pixel value. When a probability distribution in which the horizontal axis is a prediction error that is a difference between the value of the target pixel and the predicted value and a vertical axis is the appearance probability of the prediction error is considered, code table is selected according to a code table corresponding to the asymmetric probability distribution having a second variance value on the other hand have a first variance value, the first dispersion value and the second dispersion value a selecting unit, characterized in that it comprises a said encoding to encode or decode the code table said it selected residual obtained by subtracting the prediction value from the value of the target pixel or decoding unit.

画像処理方法は、画像処理装置が、着目画素周辺の周辺画素値に応じて第1の分散値を算出するとともに、前記周辺画素値に基づいて算出された前記着目画素の予測値に応じて第2の分散値を算出し、画像処理装置が、横軸が前記着目画素の値と前記予測値との差分である予測誤差であり、縦軸が前記予測誤差の出現確率である確率分布を考えた場合に、左右の一方で前記第1の分散値を有し他方で前記第2の分散値を有する左右非対称な確率分布に対応する符号表を、前記第1の分散値と前記第2の分散値とに応じて選択し、画像処理装置が、前記着目画素値から前記予測値を引いた残差を前記選択された符号表により符号化又は復号化する各段階を含むことを特徴とする。 In the image processing method, the image processing apparatus calculates the first variance value according to the peripheral pixel value around the target pixel , and the first processing unit according to the predicted value of the target pixel calculated based on the peripheral pixel value . calculating a second dispersion value, consider an image processing apparatus, a prediction error horizontal axis is the difference between the predicted value and the value of the target pixel, and the vertical axis represents the probability distribution is a probability of occurrence of the prediction error If the the code table corresponding to the asymmetric probability distribution having a second variance value on the other hand has a first distribution value, while the left and right, the first dispersion value and the second selected according to the dispersion value, the image processing apparatus, and characterized in that a residual obtained by subtracting the prediction value from the value of the target pixel includes the stages of encoding or decoding by the selected code table To do.

本願開示の少なくとも1つの実施例によれば、左右で異なる分散値を有する左右非対称な確率分布に対応する符号表用いることにより、効率的な符号化を実現し、高い圧縮率を達成できる。   According to at least one embodiment of the present disclosure, efficient coding can be realized and a high compression rate can be achieved by using a code table corresponding to a left-right asymmetric probability distribution having different left and right variance values.

2つのピークを有する予測誤差の確率分布の一例を示す図である。It is a figure which shows an example of the probability distribution of the prediction error which has two peaks. 符号表の選択について説明するための図である。It is a figure for demonstrating selection of a code table. 左右非対称な確率分布の一例を示す図である。It is a figure which shows an example of a left-right asymmetric probability distribution. 2つの符号表を組み合わせることにより構成した左右非対称な確率分布に対応する符号表の一例である。It is an example of the code table corresponding to the left-right asymmetric probability distribution comprised by combining two code tables. 符号化装置の構成の一例を示す図である。It is a figure which shows an example of a structure of an encoding apparatus. 図5に示す符号化装置の動作の流れを示したフローチャートである。6 is a flowchart showing a flow of operations of the encoding device shown in FIG. 5. 固有分散値表を生成する処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process which produces | generates an intrinsic dispersion value table. 複数の符号表のデータ構成の一例を示す図である。It is a figure which shows an example of the data structure of a some code table. 複数の符号表を生成する処理を示すフローチャートである。It is a flowchart which shows the process which produces | generates a some code table. ラスタスキャン順を示す図である。It is a figure which shows a raster scan order. ラスタスキャン順で先に走査された画素により予測値及び隣接画素値を求める処理の一例を説明するための図である。It is a figure for demonstrating an example of the process which calculates | requires a predicted value and an adjacent pixel value with the pixel scanned previously in the raster scan order. 図5に示す符号化装置による符号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the encoding process by the encoding apparatus shown in FIG. 復号化装置の構成の一例を示す図である。It is a figure which shows an example of a structure of a decoding apparatus. 図13に示す復号化装置による符号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the encoding process by the decoding apparatus shown in FIG. 符号化及び復号化を行なう画像処理システムの構成の一例を示す図である。It is a figure which shows an example of a structure of the image processing system which performs encoding and decoding.

画像の可逆圧縮には、周辺画素の画素分布や過去に圧縮した際の情報を基に予測値を計算し、着目画素値(符号化対象画素値)と予測値との差分を符号化する第1の方式と、単純に着目画素値と隣接点との差分を符号化する第2の方式とが存在する。自然画像の可逆圧縮に対しては第1の方式の方が第2の方式よりも差分値が小さくなると言われている。しかしながら第1の方式により複雑な計算式で予測値を生成するまでもなく、周辺状態に関係なく第2の方式で単純に隣接画素値を予測値として用いても、十分に差分値が小さくなる場合がある。   In reversible compression of an image, a prediction value is calculated based on pixel distribution of surrounding pixels and information when compressed in the past, and a difference between the pixel value of interest (encoding target pixel value) and the prediction value is encoded. There is a first method and a second method that simply encodes a difference between a pixel value of interest and an adjacent point. For lossless compression of natural images, the first method is said to have a smaller difference value than the second method. However, it is not necessary to generate a predicted value with a complicated calculation formula by the first method, and the difference value is sufficiently small even if the adjacent pixel value is simply used as the predicted value by the second method regardless of the surrounding state. There is a case.

ここで、第1の方式の予測値をeとし、隣接代表点の画素値(隣接画素値)をcとする。着目画素値は、予測値eと一致する確率が最も高い。しかしながら、着目画素の周辺の局所的な画像領域(画像ブロック)の画素分布を考えた場合、複雑な画素分布を持つ画像ブロックでは、着目画素値が予測値eに一致する確率は、それほど高くはならない。一方で、過去の画素値系列に関わらず、隣接画素値cと着目画素値とが一致する確率が無視できない。その結果、着目画素値と予測値eとの差分(予測誤差)の確率分布は、0の位置(着目画素値が予測値eと一致する位置)とc−eの位置(着目画素値が隣接画素値cと一致する場合)との2点をピークとした形状となる。   Here, the predicted value of the first method is e, and the pixel value (adjacent pixel value) of the adjacent representative point is c. The target pixel value has the highest probability of matching with the predicted value e. However, when considering the pixel distribution of a local image region (image block) around the pixel of interest, the probability that the pixel value of interest matches the predicted value e is so high in an image block having a complicated pixel distribution. Don't be. On the other hand, regardless of the past pixel value series, the probability that the adjacent pixel value c matches the target pixel value cannot be ignored. As a result, the probability distribution of the difference (prediction error) between the target pixel value and the predicted value e is 0 (position where the target pixel value matches the predicted value e) and c-e (the target pixel value is adjacent). The shape has a peak at two points (when it matches the pixel value c).

図1は、2つのピークを有する予測誤差の確率分布の一例を示す図である。図1(a)及び(b)において、横軸は予測誤差、即ち着目画素値から予測値eを差し引いた値を示し、縦軸は各予測誤差の出現確率を示す。図1(a)に示すように、予測誤差ゼロの位置(着目画素値が予測値eに等しい位置)を中心とする左右対称な確率分布10が存在する一方で、予測誤差c−eの位置(着目画素値が隣接画素値cに等しい位置)を中心とする確率分布11が存在する。この結果、図1(b)に示すように、予測誤差の確率分布は、確率分布10と確率分布11とを重ね合わせて得られる左右非対称な確率分布12となる。確率分布12は、0の位置とc−eの位置との2点をピークとした形状である。   FIG. 1 is a diagram illustrating an example of a probability distribution of prediction errors having two peaks. 1A and 1B, the horizontal axis indicates a prediction error, that is, a value obtained by subtracting the prediction value e from the pixel value of interest, and the vertical axis indicates the appearance probability of each prediction error. As shown in FIG. 1A, while there is a symmetrical probability distribution 10 centered on the position where the prediction error is zero (the position where the pixel value of interest is equal to the prediction value e), the position of the prediction error ce There is a probability distribution 11 centered on (position where the target pixel value is equal to the adjacent pixel value c). As a result, as shown in FIG. 1B, the probability distribution of the prediction error is a left-right asymmetric probability distribution 12 obtained by superimposing the probability distribution 10 and the probability distribution 11. The probability distribution 12 has a shape with peaks at two points, a 0 position and a c-e position.

単純な画素分布を持つ画像ブロックにおいては、予測値と隣接画素値とが異なる場合、予測値が的中する確率に比較して、この隣接画素値と着目画素値とが一致する確率が十分に小さく、予測誤差分布は左右対称の分布となる。しかしながら、上述のように、複雑な画素分布を持つ画像ブロックでは、予測値と隣接画素値とが異なる場合、予測値が的中する確率に比較して、着目画素値が隣接画素値に一致する確率が無視できない。その結果、予測誤差分布は、予測誤差が正の領域と負の領域とで異なる分散値を有する左右非対称な分布となる。具体的には、予測値よりも隣接画素値が大きい場合には正の領域での分散値が負の領域での分散値よりも大きく、予測値よりも隣接画素値が小さい場合には負の領域での分散値が正の領域での分散値よりも大きい確率分布となる。   In an image block having a simple pixel distribution, if the predicted value and the adjacent pixel value are different, the probability that the adjacent pixel value matches the target pixel value is sufficiently higher than the probability that the predicted value is correct. The prediction error distribution is small and symmetrical. However, as described above, in an image block having a complicated pixel distribution, when the predicted value and the adjacent pixel value are different, the pixel value of interest matches the adjacent pixel value compared to the probability that the predicted value is correct. Probability cannot be ignored. As a result, the prediction error distribution is a bilaterally asymmetric distribution having different variance values in the positive region and the negative region. Specifically, when the neighboring pixel value is larger than the predicted value, the variance value in the positive region is larger than the variance value in the negative region, and when the neighboring pixel value is smaller than the predicted value, the negative value is negative. A probability distribution in which the variance value in the region is larger than the variance value in the positive region is obtained.

図2は、符号表の選択について説明するための図である。図2において、画素配列21は、画面全体のうち、着目画素xの周辺画素a、b、cを含む画像領域を抜き出して示したものである。この周辺画素のうち、例えば画素cが隣接画素として用いられる。符号表セット22は、それぞれ異なる分散値の確率分布に対応する複数の符号表A乃至Eを含む。前述のように、複雑な画素分布を持つ画像ブロックでは、予測誤差分布は、予測誤差が正の領域と負の領域とで異なる分散値を有する左右非対称な分布となる。このような複雑な分布に対応するため、周辺画素値a乃至cから第1の分散値と第2の分散値とを算出し、符号表セット22から、左右で異なる分散値を有する左右非対称な確率分布に対応する符号表を、第1の分散値と第2の分散値とに応じて選択する。第1の分散値と第2の分散値とを算出する方法については、後程詳細に説明する。   FIG. 2 is a diagram for explaining selection of a code table. In FIG. 2, the pixel array 21 is an extracted image region including peripheral pixels a, b, and c of the pixel of interest x in the entire screen. Among these peripheral pixels, for example, the pixel c is used as an adjacent pixel. The code table set 22 includes a plurality of code tables A to E corresponding to probability distributions of different variance values. As described above, in an image block having a complicated pixel distribution, the prediction error distribution is a bilaterally asymmetric distribution having different variance values in a positive region and a negative region. In order to deal with such a complex distribution, the first variance value and the second variance value are calculated from the peripheral pixel values a to c, and the left and right asymmetrical values having different variance values on the left and right are calculated from the code table set 22. A code table corresponding to the probability distribution is selected according to the first variance value and the second variance value. A method for calculating the first variance value and the second variance value will be described in detail later.

符号表セット22の符号表A乃至Eは、その一つ一つが左右非対称な確率分布に対応する符号表であってよい。この場合、例えば分布の左側が第1の分散値であり分布の右側が第2の分散値であるような確率分布に対応する符号表を選択すればよい。或いは、符号表セット22の符号表A乃至Eは、その一つ一つが確率分布の左右何れかの片側の分布に対応する符号表(例えば右側の片側分布に対応する非負整数の予測誤差に対する符号表)であってよい。これら符号表A乃至Eは、異なる複数の分散値を有する複数の確率分布に対応する複数の符号表である。この場合、符号表セット22から、第1の分散値に対応する例えば符号表Bを選択し、第2の分散値に対応する例えば符号表Eを選択し、符号表Bと符号表Eとを組み合わせることにより、左右非対称な確率分布に対応する符号表を構成してもよい。図2の例において、選択された符号表Bの内容がテーブル23に示され、選択された符号表Eの内容がテーブル24に示されている。各テーブルには、互いに一対一に対応付けられた複数の差分値と複数の符号とが含まれている。即ち、各々の差分値が1つの符号に対応付けられている。   Each of the code tables A to E of the code table set 22 may be a code table corresponding to a probability distribution that is asymmetrical. In this case, for example, a code table corresponding to a probability distribution in which the left side of the distribution is the first variance value and the right side of the distribution is the second variance value may be selected. Alternatively, each of the code tables A to E of the code table set 22 is a code table corresponding to one of the left and right distributions of the probability distribution (for example, a code for a non-negative integer prediction error corresponding to the right one distribution). Table). These code tables A to E are a plurality of code tables corresponding to a plurality of probability distributions having a plurality of different variance values. In this case, for example, the code table B corresponding to the first variance value is selected from the code table set 22, the code table E corresponding to the second variance value is selected, and the code table B and the code table E are selected. By combining them, a code table corresponding to a left-right asymmetric probability distribution may be configured. In the example of FIG. 2, the contents of the selected code table B are shown in the table 23, and the contents of the selected code table E are shown in the table 24. Each table includes a plurality of difference values and a plurality of codes that are associated with each other on a one-to-one basis. That is, each difference value is associated with one code.

図3は、選択された符号表、或いは、選択された符号表を組み合わせて得られた符号表に対応する左右非対称な確率分布の一例を示す図である。着目画素値xと予測値e(周辺画素値a乃至cから算出してよい)との差分(予測誤差)が横軸に示され、縦軸にその出現確率が示される。予測誤差値c−eが正の領域にある(即ち隣接画素値cが予測値eよりも大きい)ので、正の領域の分布の分散値(右側の分布の分散値)が負の領域の分布の分散値(左側の分布の分散値)よりも大きくなる。   FIG. 3 is a diagram illustrating an example of a left-right asymmetric probability distribution corresponding to a selected code table or a code table obtained by combining selected code tables. The difference (prediction error) between the target pixel value x and the predicted value e (which may be calculated from the peripheral pixel values a to c) is shown on the horizontal axis, and the appearance probability is shown on the vertical axis. Since the prediction error value c−e is in the positive region (that is, the adjacent pixel value c is larger than the prediction value e), the distribution value of the positive region distribution (the distribution value of the right distribution) is the negative region distribution. Is greater than the variance value (the variance value of the distribution on the left side).

図4は、2つの符号表を組み合わせることにより構成した左右非対称な確率分布に対応する符号表の一例である。図4に示す左右非対称な確率分布に対応する符号表26は、片側分布に対応するテーブル23(図2に示すテーブル23と同一)と、片側分布に対応するテーブル24(図2に示すテーブル24と同一)とを組み合わせたものである。但しテーブル23の符号とテーブル24の符号とが一致しないように、図2に示すテーブル23の符号の先頭に“1”を追加した符号と、図2に示すテーブル24の符号の先頭に“0”を追加した符号とを用いている。この例では、テーブル23が負の差分値の領域に対応付けられ、テーブル24が正の差分値の領域に対応付けられている。差分値0の符号としては、テーブル23の差分値0の符号の先頭に“1”を追加した符号が用いられている。この結果、テーブル24の差分値0の符号“00”が使用されることなく余ってしまう。そこで、値がc−eに等しい差分値には、図2に示すテーブル24の差分値0の符号の先頭に“0”を付加した“000”を割り当てている。このようにして、着目画素値xが隣接画素値cに等しい場合(即ち着目画素値xと予測値eとの差分がc−eに等しい場合)には、符号表B(テーブル23)又は符号表E(テーブル24)における差分値がゼロに対応する符号を割り当てている。これにより、図1(b)に示したように分布が非対称となる原因となっている無視できないピークの位置において、符号長が短い符号を割り当てることが可能となり、高い符号化効率を実現することができる。   FIG. 4 is an example of a code table corresponding to a left-right asymmetric probability distribution configured by combining two code tables. The code table 26 corresponding to the left-right asymmetric probability distribution shown in FIG. 4 includes a table 23 corresponding to the one-sided distribution (same as the table 23 shown in FIG. 2) and a table 24 corresponding to the one-sided distribution (table 24 shown in FIG. 2). The same). However, so that the code of the table 23 and the code of the table 24 do not match, a code obtained by adding “1” to the head of the code of the table 23 shown in FIG. 2 and “0” at the head of the code of the table 24 shown in FIG. "Is used. In this example, the table 23 is associated with a negative difference value area, and the table 24 is associated with a positive difference value area. As the code of the difference value 0, a code in which “1” is added to the head of the code of the difference value 0 in the table 23 is used. As a result, the code “00” of the difference value 0 in the table 24 remains without being used. Therefore, “000” with “0” added to the head of the sign of the difference value 0 in the table 24 shown in FIG. 2 is assigned to the difference value equal to c−e. In this way, when the target pixel value x is equal to the adjacent pixel value c (that is, when the difference between the target pixel value x and the predicted value e is equal to c−e), the code table B (table 23) or the code A code corresponding to a difference value of zero in Table E (Table 24) is assigned. As a result, as shown in FIG. 1B, it is possible to assign a code having a short code length at the position of the peak that cannot be ignored, which is the cause of the distribution being asymmetrical, thereby realizing high coding efficiency. Can do.

図2の着目画素値xを符号化する際には、着目画素値xから予測値eを引いた差分値x−eを算出し、図4の符号表26においてこの算出した差分値に対応する符号を出力すればよい。これにより、差分値(予測誤差或いは残差とも言う)の確率分布が左右非対称な場合を考慮した効率的な符号化を実現することができる。   When the target pixel value x in FIG. 2 is encoded, a difference value x-e obtained by subtracting the predicted value e from the target pixel value x is calculated, and the difference value xe in the code table 26 in FIG. 4 corresponds to the calculated difference value. What is necessary is just to output a code | symbol. As a result, it is possible to realize efficient encoding in consideration of a case where the probability distribution of difference values (also referred to as prediction errors or residuals) is asymmetrical.

以下に、本発明の実施例を添付の図面を用いて詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

図5は、符号化装置の構成の一例を示す図である。図5に示す符号化装置30は、符号表選択部31、残差生成部32、及び符号化部33を含む。ブロック画像データ格納メモリ35には、画像全体のうちで、符号化対象である着目画素周辺の局所的な画像ブロックのデータが格納されている。符号化装置30は、ブロック画像データ格納メモリ35から画像ブロックの画素データを受け取り、着目画素を符号化し、符号化により得られた符号化データを符号化データ格納メモリ36に格納する。   FIG. 5 is a diagram illustrating an example of the configuration of the encoding device. The encoding device 30 illustrated in FIG. 5 includes a code table selection unit 31, a residual generation unit 32, and an encoding unit 33. The block image data storage memory 35 stores local image block data around the target pixel to be encoded in the entire image. The encoding device 30 receives the pixel data of the image block from the block image data storage memory 35, encodes the pixel of interest, and stores the encoded data obtained by the encoding in the encoded data storage memory 36.

なお図5及び以降の類似の図において、各ボックスで示される各機能ブロックと他の機能ブロックとの境界は、基本的には機能的な境界を示すものであり、物理的な位置の分離、電気的な信号の分離、制御論理的な分離等に対応するとは限らない。ハードウェアの場合、各機能ブロックは、他のブロックと物理的にある程度分離された1つのハードウェアモジュールであってもよいし、或いは他のブロックと物理的に一体となったハードウェアモジュール中の1つの機能を示したものであってもよい。ソフトウェアの場合、各機能ブロックは、他のブロックと論理的にある程度分離された1つのソフトウェアモジュールであってもよいし、或いは他のブロックと論理的に一体となったソフトモジュール中の1つの機能を示したものであってもよい。   Note that in FIG. 5 and the subsequent similar figures, the boundary between each functional block shown in each box and other functional blocks basically indicates a functional boundary, and separation of physical positions, It does not necessarily correspond to separation of electrical signals, separation of control logic, and the like. In the case of hardware, each functional block may be one hardware module physically separated from other blocks to some extent, or in a hardware module physically integrated with other blocks. One function may be shown. In the case of software, each functional block may be one software module logically separated from other blocks to some extent, or one function in a software module logically integrated with another block. May be shown.

符号表選択部31は、着目画素周辺の周辺画素値から第1の分散値と第2の分散値とを算出し、左右で異なる分散値を有する左右非対称な確率分布に対応する符号表を、第1の分散値と第2の分散値とに応じて選択する。残差生成部32は、着目画素値から予測値を減算して残差を算出する。符号化部33は、残差生成部32により算出された残差を、符号表選択部31により選択された符号表により符号化する。符号化処理の大略については、図1乃至図4を用いて説明したとおりである。符号表選択部31は、コンテキストC1導出部41、予測値生成部42、隣接点選択部43、コンテキストC2導出部44、第1テーブル選択部45、第2テーブル選択部46、及び符号表構築部47を含む。   The code table selection unit 31 calculates the first variance value and the second variance value from the peripheral pixel values around the pixel of interest, and calculates the code table corresponding to the left-right asymmetric probability distribution having different variance values on the left and right. Selection is made according to the first variance value and the second variance value. The residual generation unit 32 calculates a residual by subtracting the predicted value from the target pixel value. The encoding unit 33 encodes the residual calculated by the residual generation unit 32 with the code table selected by the code table selection unit 31. The outline of the encoding process is as described with reference to FIGS. The code table selection unit 31 includes a context C1 derivation unit 41, a predicted value generation unit 42, an adjacent point selection unit 43, a context C2 derivation unit 44, a first table selection unit 45, a second table selection unit 46, and a code table construction unit. 47.

コンテキストC1導出部41は、周辺画素の勾配に基づいて、コンテキストC1を決定する。予測値生成部42は、コンテキストC1や周辺画素値に基づいて着目画素の予測値を生成する。第1テーブル選択部45は、コンテキストC1から第1の分散値を求め、この第1の分散値に対応する符号表を選択する。隣接点選択部43は、周辺画素の中から1つの画素を隣接画素として選択する。コンテキストC2導出部44は、隣接点選択部43が選択した隣接画素値と予測値生成部42が生成した予測値とに基づいてコンテキストC2を決定する。第2テーブル選択部46は、コンテキストC2と第1テーブル選択部45から供給される第1の分散値とに基づいて第2の分散値を求め、この第2の分散値に対応する符号表を選択する。符号表構築部47は、第1テーブル選択部45が選択した符号表と第2テーブル選択部46が選択した符号表とを組み合わせて、左右非対称な確率分布に対応する符号表を構築する。   The context C1 deriving unit 41 determines the context C1 based on the gradient of surrounding pixels. The predicted value generation unit 42 generates a predicted value of the pixel of interest based on the context C1 and surrounding pixel values. The first table selection unit 45 obtains a first variance value from the context C1, and selects a code table corresponding to the first variance value. The adjacent point selection unit 43 selects one pixel from the surrounding pixels as an adjacent pixel. The context C2 deriving unit 44 determines the context C2 based on the adjacent pixel value selected by the adjacent point selecting unit 43 and the predicted value generated by the predicted value generating unit 42. The second table selection unit 46 obtains a second variance value based on the context C2 and the first variance value supplied from the first table selection unit 45, and obtains a code table corresponding to the second variance value. select. The code table construction unit 47 combines the code table selected by the first table selection unit 45 and the code table selected by the second table selection unit 46 to construct a code table corresponding to a left-right asymmetric probability distribution.

図6は、図5に示す符号化装置30の動作の流れを示したフローチャートである。まずステップS1において、コンテキストC1導出部41がコンテキストC1を算出する。この例では、コンテキストC1として、着目画素xの近傍にある3つの周辺画素値a乃至cから横方向勾配Ghor=a−b、縦方向勾配Gver=a−c、及び斜め後方勾配Gnan=c+b−aを算出する。更にコンテキストC1導出部41は、Ghor、Gver、及びGnanを右に6ビットシフトして下位6ビットを破棄することにより、各勾配値を量子化する。この量子化後のGhor、Gver、及びGnanを一組に纏めたものがコンテキストC1とされる。量子化は、コンテキストC1の総数を削減するために実行される。   FIG. 6 is a flowchart showing a flow of operations of the encoding device 30 shown in FIG. First, in step S1, the context C1 deriving unit 41 calculates the context C1. In this example, as the context C1, the horizontal gradient Ghor = ab, the vertical gradient Gver = ac, and the oblique backward gradient Gnan = c + b- a is calculated. Further, the context C1 deriving unit 41 quantizes each gradient value by shifting Ghor, Gver, and Gnan to the right by 6 bits and discarding the lower 6 bits. A set of Ghor, Gver, and Gnan after the quantization is set as a context C1. Quantization is performed to reduce the total number of contexts C1.

ステップS2において、第1テーブル選択部45が、予め用意された固有分散値表50においてコンテキストC1を参照することにより、コンテキストC1の固有分散値を導出する。なおこの導出処理は、第1テーブル選択部45でなくコンテキストC1導出部41により実行されてもよい。ここで導出された固有分散値は、基本的には、周辺画素のばらつきの度合いを示すものである。大きな固有分散値であれば、着目画素値の予測値が的中し難い、即ち、予測残差が大きくなる確率が高いことを示している。但し、単純な画素値の分散を求めているのではなく、横、縦、斜め方向の勾配の大きさに基づいて固有分散値を求めている。従って、例えば横方向に勾配が大きいが縦方向に勾配がゼロである場合には、縦エッジ等の縦方向パターンである確率が高く、そのような場合には固有分散値がそれ程大きくならないように、固有分散値表50の各値が決定されていてよい。   In step S <b> 2, the first table selection unit 45 refers to the context C <b> 1 in the inherent variance value table 50 prepared in advance to derive the intrinsic variance value of the context C <b> 1. This derivation process may be executed by the context C1 derivation unit 41 instead of the first table selection unit 45. The intrinsic dispersion value derived here basically indicates the degree of variation of surrounding pixels. A large intrinsic variance value indicates that the predicted value of the pixel value of interest is difficult to hit, that is, there is a high probability that the prediction residual will be large. However, instead of simply calculating the variance of the pixel values, the intrinsic variance value is obtained based on the gradient magnitudes in the horizontal, vertical, and diagonal directions. Therefore, for example, when the gradient in the horizontal direction is large but the gradient in the vertical direction is zero, the probability of a vertical pattern such as a vertical edge is high, and in such a case, the intrinsic dispersion value is not so large. Each value of the intrinsic dispersion value table 50 may be determined.

図7は、固有分散値表を生成する処理の一例を示すフローチャートである。種々の評価対象の画像に対して図7の処理を実行することにより、図6の処理に用いる固有分散値表50を予め生成して用意しておくことになる。   FIG. 7 is a flowchart illustrating an example of processing for generating an inherent variance table. By executing the processing of FIG. 7 for various images to be evaluated, the inherent dispersion value table 50 used for the processing of FIG. 6 is generated and prepared in advance.

ステップS1において、評価対象の画像の評価画素を選択する。ステップS2において、評価画素に対する予測残差(評価画素値と予測値との差)を導出する。ステップS3において、評価画素に対するコンテキストC1を導出する。ステップS4で、求められたコンテキストC1と予測残差との対応関係を、対応関係データ51に格納する。即ち、コンテキストC1と予測残差とを互いに対応付けして対応関係データ51に格納する。ステップS5で、全ての画像の全ての画素に対しての走査を終了したか否かを判定する。終了していない場合には、ステップS1に戻り以降の処理を繰り返す。   In step S1, an evaluation pixel of an image to be evaluated is selected. In step S2, a prediction residual (a difference between the evaluation pixel value and the prediction value) for the evaluation pixel is derived. In step S3, a context C1 for the evaluation pixel is derived. In step S 4, the correspondence relationship between the obtained context C 1 and the prediction residual is stored in the correspondence relationship data 51. That is, the context C1 and the prediction residual are associated with each other and stored in the correspondence data 51. In step S5, it is determined whether scanning for all pixels of all images has been completed. If not completed, the process returns to step S1 and the subsequent processing is repeated.

全画素の走査を終了した場合、ステップS6で、コンテキストC1を1つ選択する。ステップS7で、選択されたコンテキストC1の残差集合を読み出す。即ち、選択されたコンテキストC1に対応付けられた全ての予測残差を読み出す。ステップS8で、読み出された予測残差の分散を計算する。ステップS9で、全てのコンテキストC1に対して分散値を生成したか否かを判定する。分散値を生成していないコンテキストC1が残っている場合には、ステップS6に戻り、以降の処理を繰り返す。   When scanning of all pixels is completed, one context C1 is selected in step S6. In step S7, the residual set of the selected context C1 is read out. That is, all prediction residuals associated with the selected context C1 are read out. In step S8, the variance of the read prediction residual is calculated. In step S9, it is determined whether or not a variance value has been generated for all contexts C1. If the context C1 for which no distributed value is generated remains, the process returns to step S6, and the subsequent processing is repeated.

以上の処理により、数多くの種々の評価対象の画像に基づいて、各コンテキストC1に対する予測残差の分散が求まる。こうして求めた予測残差の分散を、各コンテキストC1に対応付けられる固有分散値として用いることにより、固有分散値表50を生成することができる。このようにして、図6のステップS2において用いる固有分散値表50が用意される。   With the above processing, the variance of the prediction residual for each context C1 is obtained based on a number of various evaluation target images. The inherent variance value table 50 can be generated by using the variance of the prediction residual thus obtained as the inherent variance value associated with each context C1. In this way, the intrinsic dispersion value table 50 used in step S2 of FIG. 6 is prepared.

図6を再び参照し、ステップS3において、第1テーブル選択部45が、コンテキストC1の固有分散値に一致する符号表を選択する。具体的には、複数の分散値に対応する複数の符号表が設けられており、第1テーブル選択部45が、コンテキストC1の固有分散値に等しい又は最も近い分散値の符号表を選択すればよい。   Referring to FIG. 6 again, in step S3, the first table selection unit 45 selects a code table that matches the inherent variance value of the context C1. Specifically, a plurality of code tables corresponding to a plurality of variance values are provided, and if the first table selection unit 45 selects a code table having a variance value that is equal to or closest to the inherent variance value of the context C1. Good.

図8は、複数の符号表のデータ構成の一例を示す図である。複数の符号表がセット61として不揮発性メモリ等のメモリに格納されている。ワード幅は例えば16ビットである。符号表セット61に含まれる1つの符号表は、テーブル62に示すデータ構造を有する。テーブル62は、16ビット整数である固有分散値、12ビットの符号データ、及び4ビットの符号長データを含む。12ビットの符号データは、12ビット以下の長さの符号と、その右側の残りのビット位置を埋める“0”とを含む。例えば、上から3番目のエントリの場合、符号長が2進数で“0011”即ち3ビットであるので、実際の符号は符号データの上位3ビットをとって“110”となる。上述のステップS3においては、第1テーブル選択部45が、コンテキストC1の固有分散値に等しい又は最も近い固有分散値を有する符号表を、符号表セット61から選択する。   FIG. 8 is a diagram illustrating an example of a data configuration of a plurality of code tables. A plurality of code tables are stored as a set 61 in a memory such as a nonvolatile memory. The word width is 16 bits, for example. One code table included in the code table set 61 has a data structure shown in the table 62. The table 62 includes an inherent dispersion value that is a 16-bit integer, 12-bit code data, and 4-bit code length data. The 12-bit code data includes a code having a length of 12 bits or less and “0” that fills the remaining bit positions on the right side thereof. For example, in the case of the third entry from the top, the code length is “0011”, that is, 3 bits in binary, so the actual code is “110” taking the upper 3 bits of the code data. In step S3 described above, the first table selection unit 45 selects, from the code table set 61, a code table having an eigen variance value that is equal to or closest to the eigen variance value of the context C1.

図9は、複数の符号表を生成する処理を示すフローチャートである。この図9の処理を実行することにより、図6の処理に用いる複数の符号表(即ち図8の符号表セット61)を予め生成して用意しておくことになる。   FIG. 9 is a flowchart showing a process for generating a plurality of code tables. By executing the processing of FIG. 9, a plurality of code tables used for the processing of FIG. 6 (that is, the code table set 61 of FIG. 8) are generated and prepared in advance.

ステップS1で、1つの固有分散値を選択する。ステップS2で、選択した固有分散値を分散として有する正規分布の確率密度関数を導出する。ステップS3で、生成された確率密度関数を基にハフマン符号表を生成する。ステップS4で、全ての固有分散値について符号表(上記のハフマン符号表)を生成したか否かを判定する。符号表を生成していない固有分散値がまだある場合には、ステップS1に戻り以降の処理を繰り返す。   In step S1, one intrinsic dispersion value is selected. In step S2, a probability density function having a normal distribution having the selected intrinsic variance as a variance is derived. In step S3, a Huffman code table is generated based on the generated probability density function. In step S4, it is determined whether or not a code table (the Huffman code table described above) has been generated for all eigenvariance values. If there is still an inherent variance value for which no code table has been generated, the process returns to step S1 and the subsequent processing is repeated.

図6を再び参照し、ステップS4で、予測値生成部42が予測値を計算するとともに、隣接点選択部43が隣接画素を選択し、更に、コンテキストC2導出部44が予測値及び隣接画素値に基づいてコンテキストC2を算出する。予測値生成部42は、コンテキストC1に応じて複数の予測値生成手法から1つを選択してもよい。即ち例えば、横方向に勾配が大きいが縦方向に勾配がゼロである場合には、縦エッジ等の縦方向パターンである確率が高く、周辺画素a乃至cのうちで画素bの値を画素xの予測値とすること等が考えられる。図6に示す例では、コンテキストC1の内容に関わらず、周辺画素値a乃至cから着目画素xの予測値を関数f(a,b,c)として生成している。関数f(a,b,c)の一例としては、画素値a、画素値b、及び画素値cの3つの周辺画素値の平均値を求める関数としてよい。使用する予測式はこの例に限定されるものではなく、任意の予測式を用いてよい。隣接点選択部43は、着目画素xの横に隣接する画素cを隣接代表点として選択する。隣接画素選択方法は、単純に特定の位置(例えば横隣りの画素c)を選択する方法に限定されるものではなく、PNGのPAETH予測のようにエッジ強度を元に隣接点を選択する方法等を適宜用いてよい。コンテキストC2導出部44は、予測値f(x,y,z)及び隣接画素値cに基づいて、コンテキストC2を求める。このコンテキストC2は、予測値f(x,y,z)と隣接画素値cとの差分の絶対値Diff(=|f(x,y,z)−c|)として定義される。   Referring to FIG. 6 again, in step S4, the predicted value generation unit 42 calculates a predicted value, the adjacent point selecting unit 43 selects an adjacent pixel, and the context C2 deriving unit 44 further calculates the predicted value and the adjacent pixel value. Based on the above, the context C2 is calculated. The predicted value generation unit 42 may select one from a plurality of predicted value generation methods according to the context C1. That is, for example, when the gradient in the horizontal direction is large but the gradient in the vertical direction is zero, the probability of a vertical pattern such as a vertical edge is high, and the value of the pixel b among the peripheral pixels a to c is set to the pixel x. It is conceivable to use a predicted value of. In the example illustrated in FIG. 6, the predicted value of the pixel of interest x is generated as a function f (a, b, c) from the peripheral pixel values a to c regardless of the content of the context C1. As an example of the function f (a, b, c), a function for obtaining an average value of three peripheral pixel values of the pixel value a, the pixel value b, and the pixel value c may be used. The prediction formula to be used is not limited to this example, and an arbitrary prediction formula may be used. The adjacent point selection unit 43 selects a pixel c adjacent to the pixel x of interest as an adjacent representative point. The adjacent pixel selection method is not limited to a method of simply selecting a specific position (for example, the horizontally adjacent pixel c), but a method of selecting an adjacent point based on edge strength as in PNG PAETH prediction, etc. May be used as appropriate. The context C2 deriving unit 44 obtains the context C2 based on the predicted value f (x, y, z) and the adjacent pixel value c. The context C2 is defined as an absolute value Diff (= | f (x, y, z) −c |) of a difference between the predicted value f (x, y, z) and the adjacent pixel value c.

なお本実施例では上隣り、左隣り、左上隣りの3つの画素値に基づいて予測値及び隣接画素値を求めコンテキストC2を計算しているが、コンテキストC2を求める基となる画素はこれら3つの画素でなくてもよい。ラスタスキャン順で着目画素(圧縮対象画素)よりも先に符号化又は復号化される画素であれば、任意の位置の任意の数の画素を用いて、コンテキストC2を算出してよい。これはコンテキストC1の算出についても同様である。   In this embodiment, the predicted value and the adjacent pixel value are obtained based on the three pixel values of the upper neighbor, the left neighbor, and the upper left neighbor, and the context C2 is calculated. It does not have to be a pixel. As long as the pixel is encoded or decoded before the target pixel (compression target pixel) in the raster scan order, the context C2 may be calculated using an arbitrary number of pixels at an arbitrary position. The same applies to the calculation of the context C1.

図10は、ラスタスキャン順を示す図である。図10において、画像70はマトリクス状に縦横に配列された画素(図示の正方形)を含む。横一列に並ぶ画素が各画素行71を構成する。矢印72でしめすラスタスキャン順では、1つの画素行71の全画素を左から右に順に走査し、画像70の右端に到達すると次の画素行71の左端に移動し、当該画素行71の全画素を左から右に順に走査する。   FIG. 10 shows the raster scan order. In FIG. 10, an image 70 includes pixels (squares in the figure) arranged in a matrix form in the vertical and horizontal directions. Pixels arranged in a horizontal column form each pixel row 71. In the raster scan order indicated by the arrow 72, all the pixels in one pixel row 71 are scanned in order from left to right. When the right end of the image 70 is reached, the pixel 70 moves to the left end of the next pixel row 71. The pixels are scanned sequentially from left to right.

図11は、ラスタスキャン順で先に走査された画素により予測値及び隣接画素値を求める処理の一例を説明するための図である。図11において、着目画素(符号化対象画素)75を含む4×4画素の局所的な画像領域(画像ブロック)76を考える。着目画素75以外の画像ブロック76に含まれる全ての画素は、着目画素75よりも先にラスタスキャン順で符号化される。従って、画像ブロック76内の画素値を用いてコンテキストC1及びC2を求めて着目画素75を符号化すれば、復号化する場合にも、着目画素75を復号化するためのコンテキストC1及びC2を求めることができる。即ち、着目画素75を復号化する時には既に、着目画素75以外の画像ブロック76内の全画素の画素値が復号処理により先にラスタスキャン順に求められているので、画像ブロック76内の画素値を用いてコンテキストC1及びC2を求めることができる。なお符号表選択のためのコンテキストC1及びC2の計算は、符号化処理側と同様に復号化処理側で実行することができるので、符号化時に使用した符号表を特定する情報を符号化後の圧縮データに付加する必要がない。従って、符号表を順次選択する画像領域単位を小さくしても圧縮率が劣化することはなく、一画素毎に符号表を選択して切り換えてよい。   FIG. 11 is a diagram for explaining an example of a process for obtaining a predicted value and an adjacent pixel value using pixels scanned first in the raster scan order. In FIG. 11, a 4 × 4 pixel local image region (image block) 76 including a target pixel (encoding target pixel) 75 is considered. All pixels included in the image block 76 other than the target pixel 75 are encoded in raster scan order before the target pixel 75. Therefore, if contexts C1 and C2 are obtained using the pixel values in the image block 76 and the pixel of interest 75 is encoded, the contexts C1 and C2 for decoding the pixel of interest 75 are obtained even when decoding. be able to. That is, when decoding the pixel of interest 75, the pixel values of all the pixels in the image block 76 other than the pixel of interest 75 have already been obtained in the raster scan order by the decoding process. Contexts C1 and C2 can be determined using Since the calculation of the contexts C1 and C2 for selecting the code table can be executed on the decoding process side as well as the encoding process side, the information for specifying the code table used at the time of encoding is encoded. There is no need to add to compressed data. Therefore, even if the image area unit for sequentially selecting the code table is reduced, the compression rate does not deteriorate, and the code table may be selected and switched for each pixel.

また図6に示す例では、上隣り、左隣り、左上隣りの3つの画素値に基づいて予測値及び隣接画素値を求めているが、予測値及び隣接画素値は、それぞれ大局的な予測値及び局種的な予測値として考えることができる。即ち、図11に示されるように、比較的広い範囲の複数の画素77及び78(画像ブロック76に含まれる着目画素75以外の15個の画素)に基づいて予測値を求め、これを大局的な予測値として考えてよい。また比較的狭い範囲の複数の画素77(画像ブロック76内で着目画素75に接する3個の画素)に基づいて隣接画素値を求め、これを局所的な予測値として考えてよい。この場合の隣接画素値は、3つの画素77の画素値から1つの画素値を選択して求めたり、或いは3つの画素77の画素値から計算により求めたりした値であってよい。このようにして求めた大局的な予測値が図1に示すような確率分布の中心にあり、局所的な予測値(隣接画素値)が確率分布の中心からずれている場合に、この局所的な予測値の存在する側において分散が大きい左右非対称な確率分布が得られる。   In the example illustrated in FIG. 6, the predicted value and the adjacent pixel value are obtained based on the three pixel values of the upper neighbor, the left neighbor, and the upper left neighbor. The predicted value and the neighboring pixel value are respectively global predicted values. And can be considered as a local prediction value. That is, as shown in FIG. 11, a predicted value is obtained based on a plurality of pixels 77 and 78 (15 pixels other than the pixel of interest 75 included in the image block 76) in a relatively wide range, May be considered as a predictive value. Further, an adjacent pixel value may be obtained based on a plurality of pixels 77 in a relatively narrow range (three pixels in contact with the target pixel 75 in the image block 76), and this may be considered as a local predicted value. The adjacent pixel value in this case may be a value obtained by selecting one pixel value from the pixel values of the three pixels 77 or by calculating from the pixel values of the three pixels 77. When the global prediction value obtained in this way is at the center of the probability distribution as shown in FIG. 1 and the local prediction value (adjacent pixel value) is deviated from the center of the probability distribution, As a result, a left-right asymmetric probability distribution with a large variance on the side where the predicted value exists is obtained.

図6に戻り、ステップS5で、第2テーブル選択部46が、コンテキストC1の固有分散値+Diffとして第2の分散値を求め、この第2の分散値に一致する符号表を選択する。具体的には、複数の分散値に対応する複数の符号表が設けられており、第2テーブル選択部46が、上記の第2の分散値に等しい又は最も近い分散値の符号表を選択すればよい。 Returning to FIG. 6, in step S < b > 5, the second table selection unit 46 obtains the second variance value as the inherent variance value + Diff 2 of the context C < b > 1 and selects a code table that matches the second variance value. Specifically, a plurality of code tables corresponding to a plurality of variance values are provided, and the second table selection unit 46 selects a code table having a variance value that is equal to or closest to the second variance value. That's fine.

ステップS6で、ステップS3で選択された符号表とステップS5で選択された符号表とを組み合わせ、符号表構築部47が符号表を構築する。符号表を組み合わせる方法は、図4で説明したのと同様である。図6のステップS6において、ステップS3で選択された符号表をテーブルTable1とし、ステップS5で選択された符号表をテーブルTable2としている。また更に、予測値e(=f(a,b,c))と着目画素値xとの差分x−eの値が正の領域に対応する符号表をテーブルTableRとし、差分x−eの値が負の領域に対応する符号表をテーブルTableLとしている。予測値<隣接画素値の場合には、差分x−eの値が正の領域において分散が大きくなるので(図3参照)、テーブルTableRとして分散の大きなテーブルTable2が割り当てられる。逆に予測値>隣接画素値の場合には、差分x−eの値が負の領域において分散が大きくなるので、テーブルTableLとして分散の大きなテーブルTable2が割り当てられる。予測値=隣接画素値の場合には、分散が大きくなることはなく、テーブルTable1のみが用いられる(この場合、ステップS5で求めたテーブルTable2がテーブルTable1と等しくなる)。また図4を用いて説明したのと同様に、テーブルTable1の符号とテーブルTable2の符号とが一致しないように、各符号の先頭に“1”又は“0”を追加した符号を出力している。   In step S6, the code table selected in step S3 and the code table selected in step S5 are combined, and the code table construction unit 47 constructs a code table. The method of combining the code tables is the same as described in FIG. In step S6 of FIG. 6, the code table selected in step S3 is a table Table1, and the code table selected in step S5 is a table Table2. Furthermore, a code table corresponding to a region where the difference x-e between the predicted value e (= f (a, b, c)) and the target pixel value x is positive is set as a table TableR, and the value of the difference x-e. The table corresponding to the negative region is the table TableL. When the predicted value is smaller than the adjacent pixel value, the variance becomes large in the region where the value of the difference x−e is positive (see FIG. 3), so the table Table2 having a large variance is assigned as the table TableR. On the contrary, when the predicted value> the adjacent pixel value, since the variance is large in the region where the value of the difference x−e is negative, the table Table2 having a large variance is assigned as the table TableL. When the predicted value = adjacent pixel value, the variance does not increase, and only the table Table1 is used (in this case, the table Table2 obtained in step S5 is equal to the table Table1). As described with reference to FIG. 4, a code in which “1” or “0” is added to the head of each code is output so that the code of the table Table1 does not match the code of the table Table2. .

図12は、図5に示す符号化装置30による符号化処理の流れを示すフローチャートである。図12に示す処理は、図6に示す処理をより整理した形で示したものである。   FIG. 12 is a flowchart showing the flow of the encoding process by the encoding device 30 shown in FIG. The process shown in FIG. 12 shows the process shown in FIG. 6 in a more organized form.

ステップS1で、コンテキストC1を導出する。ステップS2で、コンテキストC1に基づいて符号表Table1を決定する。ステップS3で、コンテキストC1に基づいて予測値計算方法f(a,b,c)を選択する。ステップS4で、予測値及び隣接画素値に基づいてコンテキストC2を算出し、更にコンテキストC2に基づいて符号表Table2を決定する。ステップS5で、符号表Table1及び符号表Table2を組み合わせて左右非対称な確率分布に対応する符号表を構築する。ステップS6で、構築された符号表を用いて予測誤差x−f(a,b,c)を符号化する。ステップS7で、符号化対象の全画素が符号化済みであるか否かを判定する。全画素が符号化済みでない場合には、ステップS1に戻り、以降の処理を繰り返す。全画素が符号化済みである場合には、符号化処理を終了する。   In step S1, a context C1 is derived. In step S2, the code table Table1 is determined based on the context C1. In step S3, the predicted value calculation method f (a, b, c) is selected based on the context C1. In step S4, the context C2 is calculated based on the predicted value and the adjacent pixel value, and the code table Table2 is determined based on the context C2. In step S5, a code table corresponding to a left-right asymmetric probability distribution is constructed by combining the code table Table1 and the code table Table2. In step S6, the prediction error xf (a, b, c) is encoded using the constructed code table. In step S7, it is determined whether or not all pixels to be encoded have been encoded. If all the pixels have not been encoded, the process returns to step S1 and the subsequent processing is repeated. If all the pixels have been encoded, the encoding process ends.

図13は、復号化装置の構成の一例を示す図である。図13に示す復号化装置80は、符号表選択部81、画素値生成部82、及び残差復号部83を含む。符号化データ格納メモリ86には、図5の符号化装置30により符号化されたデータが格納されている。復号化装置80は、符号化データ格納メモリ86から符号化データを受け取り、復号化処理を実行することにより着目画素値を求め、求められた画素値のデータを復号済みデータ格納メモリ85に格納する。復号済みデータ格納メモリ85のデータは、ラスタスキャン順において後続する画素の復号化処理におけるコンテキスト計算に用いるために、符号表選択部81に供給される。   FIG. 13 is a diagram illustrating an example of the configuration of the decoding device. A decoding device 80 illustrated in FIG. 13 includes a code table selection unit 81, a pixel value generation unit 82, and a residual decoding unit 83. The encoded data storage memory 86 stores data encoded by the encoding device 30 of FIG. The decoding device 80 receives the encoded data from the encoded data storage memory 86, obtains the pixel value of interest by executing the decoding process, and stores the data of the obtained pixel value in the decoded data storage memory 85. . The data in the decoded data storage memory 85 is supplied to the code table selection unit 81 to be used for context calculation in the decoding process of subsequent pixels in the raster scan order.

符号表選択部81は、着目画素周辺の周辺画素値から第1の分散値と第2の分散値とを算出し、左右で異なる分散値を有する左右非対称な確率分布に対応する符号表を、第1の分散値と第2の分散値とに応じて選択する。残差復号部83は、着目画素値から予測値を引いた残差を、符号表選択部81により選択された符号表により復号化する。即ち、残差復号部83は、符号化データ中の符号に対応する残差を符号表から取り出すことで、復号対象の符号から残差を復号する。画素値生成部82は、復号された残差に予測値を加算することにより着目画素値を算出する。符号表選択部81は、コンテキストC1導出部91、予測値生成部92、隣接点選択部93、コンテキストC2導出部94、第1テーブル選択部95、第2テーブル選択部96、及び符号表構築部97を含む。符号表選択部81の構成及び動作は、符号表選択部31の構成及び動作と同様である。前述のように、着目画素を復号化により求める時、即ち復号対象符号に復号化処理を適用する時には既に、コンテキストC1及びC2を求めるために使用する画素値が復号処理によりラスタスキャン順に求められている。従って、符号化処理時と同様にしてコンテキストC1及びC2を求め、符号表を適宜選択することができる。   The code table selection unit 81 calculates the first variance value and the second variance value from the peripheral pixel values around the pixel of interest, and selects the code table corresponding to the left-right asymmetric probability distribution having different variance values on the left and right. Selection is made according to the first variance value and the second variance value. The residual decoding unit 83 decodes the residual obtained by subtracting the predicted value from the pixel value of interest using the code table selected by the code table selecting unit 81. That is, the residual decoding unit 83 decodes the residual from the decoding target code by taking out the residual corresponding to the code in the encoded data from the code table. The pixel value generation unit 82 calculates a target pixel value by adding a predicted value to the decoded residual. The code table selection unit 81 includes a context C1 derivation unit 91, a predicted value generation unit 92, an adjacent point selection unit 93, a context C2 derivation unit 94, a first table selection unit 95, a second table selection unit 96, and a code table construction unit. 97. The configuration and operation of the code table selection unit 81 are the same as the configuration and operation of the code table selection unit 31. As described above, when the target pixel is obtained by decoding, that is, when the decoding process is applied to the decoding target code, the pixel values used for obtaining the contexts C1 and C2 are already obtained by the decoding process in the raster scan order. Yes. Accordingly, contexts C1 and C2 can be obtained in the same manner as in the encoding process, and a code table can be selected as appropriate.

図14は、図13に示す復号化装置80による符号化処理の流れを示すフローチャートである。   FIG. 14 is a flowchart showing the flow of the encoding process performed by the decoding apparatus 80 shown in FIG.

ステップS1で、コンテキストC1を導出する。ステップS2で、コンテキストC1に基づいて符号表Table1を決定する。ステップS3で、コンテキストC1に基づいて予測値計算方法f(a,b,c)を選択する。ステップS4で、予測値及び隣接画素値に基づいてコンテキストC2を算出し、更にコンテキストC2に基づいて符号表Table2を決定する。ステップS5で、符号表Table1及び符号表Table2を組み合わせて左右非対称な確率分布に対応する符号表を構築する。ステップS6で、構築された符号表を用いて復号対象符号に復号化処理を適用して残差を算出する。即ち、復号対象符号に対応する残差を符号表から取り出す。ステップS7で、残差(予測誤差)と予測値f(a,b,c)とに基づいて着目画素値を算出する。ステップS8で、復号化対象の全画素が復号済みであるか否かを判定する。全画素が復号済みでない場合には、ステップS1に戻り、以降の処理を繰り返す。全画素が復号済みである場合には、復号化処理を終了する。   In step S1, a context C1 is derived. In step S2, the code table Table1 is determined based on the context C1. In step S3, the predicted value calculation method f (a, b, c) is selected based on the context C1. In step S4, the context C2 is calculated based on the predicted value and the adjacent pixel value, and the code table Table2 is determined based on the context C2. In step S5, a code table corresponding to a left-right asymmetric probability distribution is constructed by combining the code table Table1 and the code table Table2. In step S6, a residual is calculated by applying a decoding process to the decoding target code using the constructed code table. That is, the residual corresponding to the decoding target code is extracted from the code table. In step S7, the pixel value of interest is calculated based on the residual (prediction error) and the predicted value f (a, b, c). In step S8, it is determined whether or not all pixels to be decoded have been decoded. If all the pixels have not been decoded, the process returns to step S1 and the subsequent processing is repeated. If all the pixels have been decoded, the decoding process ends.

図15は、符号化及び復号化を行なう画像処理システムの構成の一例を示す図である。図15の画像処理システムは、デジタルカメラ100、パーソナルコンピュータ(PC)101、及びCRTや液晶表示装置などの表示部102を含む。デジタルカメラ100は、イメージセンサ111、揮発性メモリ112、符号化部113、フラッシュメモリ等の不揮発性メモリ114、復号部115、及び液晶表示装置等の表示部116を含む。イメージセンサ111から取りこまれた被写体103の画像は、SRAM(Static Random Access Memory)やDRAM(Dynamic Random Access Memory)等の高速な揮発性メモリ112に一旦格納される。符号化部113は、図5に示す符号化装置30と同様の構成であってよく、揮発性メモリ112から読み出した画像データを符号化して圧縮し、符号化後の画像データをメモリカード等の不揮発性メモリ114に格納する。撮影した画像をデジタルカメラ100の表示部116に表示する場合は、カメラに内蔵された復号部115により不揮発性メモリ114の画像データを復号し、復号後の画像データを表示部116に供給する。復号部115は、図13に示す復号化装置80と同様の構成であってよい。デジタルカメラ100で撮影した画像をパーソナルコンピュータ101に表示する場合は、不揮発性メモリ114に格納された画像データをパーソナルコンピュータ101に取り込み、パーソナルコンピュータ101内の復号ソフトウェア117により復号する。この際、復号ソフトウェア117は、図14に示す復号処理を実行してよい。復号された画像データは表示部102に供給されて表示される。   FIG. 15 is a diagram illustrating an example of the configuration of an image processing system that performs encoding and decoding. The image processing system of FIG. 15 includes a digital camera 100, a personal computer (PC) 101, and a display unit 102 such as a CRT or a liquid crystal display device. The digital camera 100 includes an image sensor 111, a volatile memory 112, an encoding unit 113, a nonvolatile memory 114 such as a flash memory, a decoding unit 115, and a display unit 116 such as a liquid crystal display device. The image of the subject 103 captured from the image sensor 111 is temporarily stored in a high-speed volatile memory 112 such as an SRAM (Static Random Access Memory) or a DRAM (Dynamic Random Access Memory). The encoding unit 113 may have the same configuration as the encoding device 30 shown in FIG. 5, encodes and compresses image data read from the volatile memory 112, and converts the encoded image data to a memory card or the like. Store in the nonvolatile memory 114. When displaying the captured image on the display unit 116 of the digital camera 100, the decoding unit 115 built in the camera decodes the image data in the nonvolatile memory 114 and supplies the decoded image data to the display unit 116. The decoding unit 115 may have the same configuration as that of the decoding device 80 shown in FIG. When displaying an image captured by the digital camera 100 on the personal computer 101, the image data stored in the non-volatile memory 114 is taken into the personal computer 101 and decoded by the decoding software 117 in the personal computer 101. At this time, the decoding software 117 may execute the decoding process shown in FIG. The decoded image data is supplied to the display unit 102 and displayed.

以上のシステム構成においては、左右非対称な確率分布に対応した符号表を用いた高効率の圧縮方式によって、より多くの画像データをカメラの不揮発性メモリに格納することができる。また連写速度向上のボトルネックとなりやすい低速な不揮発性メモリへの格納時のデータ量を削減することができるため、書込み時間の短縮が可能である。   In the above system configuration, more image data can be stored in the nonvolatile memory of the camera by a highly efficient compression method using a code table corresponding to a left-right asymmetric probability distribution. In addition, since the amount of data when stored in a low-speed nonvolatile memory that tends to be a bottleneck for improving the continuous shooting speed can be reduced, the writing time can be shortened.

以上、本発明を実施例に基づいて説明したが、本発明は上記実施例に限定されるものではなく、特許請求の範囲に記載の範囲内で様々な変形が可能である。   As mentioned above, although this invention was demonstrated based on the Example, this invention is not limited to the said Example, A various deformation | transformation is possible within the range as described in a claim.

なお本願発明は以下の内容を含むものである。
(付記1)
着目画素周辺の周辺画素値から第1の分散値と第2の分散値とを算出し、左右で異なる分散値を有する左右非対称な確率分布に対応する符号表を、前記第1の分散値と第2の分散値とに応じて選択する符号表選択部と、
着目画素値から予測値を引いた残差を前記選択された符号表により符号化又は復号化する符号化又は復号化部と
を含むことを特徴とする画像処理装置。
(付記2)
前記符号表選択部は、異なる複数の分散値を有する複数の確率分布に対応する複数の符号表を備え、前記複数の符号表から前記第1の分散値に応じて第1の符号表を選択し、前記複数の符号表から前記第2の分散値に応じて第2の符号表を選択し、前記第1の符号表と前記第2の符号表とを組み合わせることを特徴とする付記1記載の画像処理装置。
(付記3)
前記符号表選択部は、前記周辺画素値に応じて前記第1の分散値を算出するとともに、前記周辺画素値と、隣接画素値と、前記予測値とに応じて前記第2の分散値を算出することを特徴とする付記1又は2記載の画像処理装置。
(付記4)
前記符号化又は復号化部は、符号化する際に前記着目画素値が前記隣接画素値に等しい場合には、前記第1の符号表又は前記第2の符号表における残差がゼロに対応する符号を前記残差に割り当てることを特徴とする付記3記載の画像処理装置。
(付記5)
前記選択された符号表に対応する確率分布は、前記予測値よりも前記隣接画素値が大きい場合には正の領域での分散値が負の領域での分散値よりも大きく、前記予測値よりも前記隣接画素値が小さい場合には負の領域での分散値が正の領域での分散値よりも大きいことを特徴とする付記3又は4記載の画像処理装置。
(付記6)
着目画素周辺の周辺画素値から第1の分散値と第2の分散値とを算出し、
左右で異なる分散値を有する左右非対称な確率分布に対応する符号表を、前記第1の分散値と第2の分散値とに応じて選択し、
着目画素値から予測値を引いた残差を前記選択された符号表により符号化又は復号化する
各段階を含むことを特徴とする画像処理方法。
(付記7)
前記選択する段階は、異なる複数の分散値を有する複数の確率分布に対応する複数の符号表から前記第1の分散値に応じて第1の符号表を選択し、前記複数の符号表から前記第2の分散値に応じて第2の符号表を選択し、前記第1の符号表と前記第2の符号表とを組み合わせる各段階を含むことを特徴とする付記6記載の画像処理方法。
(付記8)
前記算出する段階は、前記周辺画素値に応じて前記第1の分散値を算出するとともに、前記周辺画素値と、隣接画素値と、前記予測値とに応じて前記第2の分散値を算出することを特徴とする付記6又は7記載の画像処理方法。
(付記9)
前記符号化又は復号化する段階は、符号化する際に前記着目画素値が前記隣接画素値に等しい場合には、前記第1の符号表又は前記第2の符号表における残差がゼロに対応する符号を前記残差に割り当てることを特徴とする付記8記載の画像処理方法。
The present invention includes the following contents.
(Appendix 1)
A first variance value and a second variance value are calculated from the neighboring pixel values around the pixel of interest, and a code table corresponding to a left-right asymmetric probability distribution having different variance values on the left and right is expressed as the first variance value. A code table selection unit that selects according to the second variance value;
An image processing apparatus comprising: an encoding or decoding unit that encodes or decodes a residual obtained by subtracting a predicted value from a pixel value of interest using the selected code table.
(Appendix 2)
The code table selection unit includes a plurality of code tables corresponding to a plurality of probability distributions having a plurality of different variance values, and selects a first code table from the plurality of code tables according to the first variance value The second code table is selected from the plurality of code tables according to the second variance value, and the first code table and the second code table are combined. Image processing apparatus.
(Appendix 3)
The code table selection unit calculates the first variance value according to the surrounding pixel value, and calculates the second variance value according to the surrounding pixel value, an adjacent pixel value, and the predicted value. The image processing apparatus according to appendix 1 or 2, characterized by calculating.
(Appendix 4)
The encoding or decoding unit, when encoding, if the target pixel value is equal to the adjacent pixel value, the residual in the first code table or the second code table corresponds to zero The image processing apparatus according to claim 3, wherein a code is assigned to the residual.
(Appendix 5)
The probability distribution corresponding to the selected code table is such that when the adjacent pixel value is larger than the predicted value, the variance value in the positive region is larger than the variance value in the negative region. Further, when the adjacent pixel value is small, the variance value in the negative region is larger than the variance value in the positive region.
(Appendix 6)
Calculating a first variance value and a second variance value from neighboring pixel values around the pixel of interest;
A code table corresponding to a left-right asymmetric probability distribution having different variance values on the left and right is selected according to the first variance value and the second variance value;
An image processing method comprising the steps of encoding or decoding a residual obtained by subtracting a predicted value from a pixel value of interest using the selected code table.
(Appendix 7)
The selecting step selects a first code table according to the first variance value from a plurality of code tables corresponding to a plurality of probability distributions having a plurality of different variance values, and selects the first code table from the plurality of code tables. The image processing method according to appendix 6, further comprising the steps of selecting a second code table according to a second variance value and combining the first code table and the second code table.
(Appendix 8)
In the calculating step, the first variance value is calculated according to the surrounding pixel value, and the second variance value is calculated according to the surrounding pixel value, the adjacent pixel value, and the predicted value. The image processing method according to appendix 6 or 7, wherein:
(Appendix 9)
In the encoding or decoding step, when the pixel value of interest is equal to the adjacent pixel value at the time of encoding, the residual in the first code table or the second code table corresponds to zero 9. The image processing method according to appendix 8, wherein a code to be assigned is assigned to the residual.

30 符号化装置
31 符号表選択部
32 残差生成部
33 符号化部
41 コンテキストC1導出部
42 予測値生成部
43 隣接点選択部
44 コンテキストC2導出部
45 第1テーブル選択部
46 第2テーブル選択部
47 符号表構築部
30 Coding Device 31 Code Table Selecting Unit 32 Residual Generating Unit 33 Encoding Unit 41 Context C1 Deriving Unit 42 Predicted Value Generating Unit 43 Adjacent Point Selecting Unit 44 Context C2 Deriving Unit 45 First Table Selecting Unit 46 Second Table Selecting Unit 47 Code table construction part

Claims (4)

着目画素周辺の周辺画素値に応じて第1の分散値を算出するとともに、前記周辺画素値に基づいて算出された前記着目画素の予測値に応じて第2の分散値を算出し、横軸が前記着目画素の値と前記予測値との差分である予測誤差であり、縦軸が前記予測誤差の出現確率である確率分布を考えた場合に、左右の一方で前記第1の分散値を有し他方で前記第2の分散値を有する左右非対称な確率分布に対応する符号表を、前記第1の分散値と前記第2の分散値とに応じて選択する符号表選択部と、
前記着目画素値から前記予測値を引いた残差を前記選択された符号表により符号化又は復号化する符号化又は復号化部と
を含むことを特徴とする画像処理装置。
Calculates a first dispersion value in accordance with the surrounding pixel value near the target pixel, the second variance value is calculated in accordance with the predicted value of the pixel of interest is calculated on the basis of the neighboring pixel value, the horizontal axis Is a prediction error that is the difference between the value of the pixel of interest and the prediction value, and the vertical axis represents the probability distribution of the occurrence of the prediction error, the first variance value is determined on the left and right sides. a code table selecting unit a code table corresponding to the asymmetric probability distribution having a second variance value on the other hand, is selected according to the first variance and the second variance value has,
The image processing apparatus characterized by comprising an encoding or decoding unit for coding or decoding by the selected code table residual obtained by subtracting the prediction value from the value of the target pixel.
前記符号表選択部は、異なる複数の分散値を有する複数の確率分布に対応する複数の符号表を備え、前記複数の符号表から前記第1の分散値に応じて第1の符号表を選択し、前記複数の符号表から前記第2の分散値に応じて第2の符号表を選択し、前記第1の符号表と前記第2の符号表とを組み合わせることを特徴とする請求項1記載の画像処理装置。   The code table selection unit includes a plurality of code tables corresponding to a plurality of probability distributions having a plurality of different variance values, and selects a first code table from the plurality of code tables according to the first variance value The second code table is selected from the plurality of code tables according to the second variance value, and the first code table and the second code table are combined. The image processing apparatus described. 前記選択された符号表に対応する確率分布は、前記予測値よりも隣接画素値が大きい場合には正の領域での分散値が負の領域での分散値よりも大きく、前記予測値よりも前記隣接画素値が小さい場合には負の領域での分散値が正の領域での分散値よりも大きいことを特徴とする請求項1又は2記載の画像処理装置。 The selected probability corresponding to the code table distribution, wherein when than the predicted value is larger neighbor pixel value is greater than the dispersion value in the region dispersion value is negative at the positive region, than the predicted value 3. The image processing apparatus according to claim 1, wherein when the adjacent pixel value is small, a variance value in a negative region is larger than a variance value in a positive region. 画像処理装置が、着目画素周辺の周辺画素値に応じて第1の分散値を算出するとともに、前記周辺画素値に基づいて算出された前記着目画素の予測値に応じて第2の分散値を算出し、
画像処理装置が、横軸が前記着目画素の値と前記予測値との差分である予測誤差であり、縦軸が前記予測誤差の出現確率である確率分布を考えた場合に、左右の一方で前記第1の分散値を有し他方で前記第2の分散値を有する左右非対称な確率分布に対応する符号表を、前記第1の分散値と前記第2の分散値とに応じて選択し、
画像処理装置が、前記着目画素値から前記予測値を引いた残差を前記選択された符号表により符号化又は復号化する
各段階を含むことを特徴とする画像処理方法。
The image processing apparatus calculates a first variance value according to the peripheral pixel value around the target pixel, and calculates a second variance value according to the predicted value of the target pixel calculated based on the peripheral pixel value. Calculate
When the image processing apparatus considers a probability distribution in which the horizontal axis is a difference between the value of the target pixel and the predicted value, and the vertical axis is the appearance probability of the prediction error, a code table corresponding to the asymmetric probability distribution having a second variance value on the other hand have the first dispersion value, selected in accordance with the first dispersion value and the second dispersion value ,
Image processing method characterized in that the image processing apparatus, including the step of encoding or decoding by the selected code table residual obtained by subtracting the prediction value from the value of the target pixel.
JP2010226078A 2010-10-05 2010-10-05 Image processing apparatus and image processing method Expired - Fee Related JP5652101B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010226078A JP5652101B2 (en) 2010-10-05 2010-10-05 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010226078A JP5652101B2 (en) 2010-10-05 2010-10-05 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2012080470A JP2012080470A (en) 2012-04-19
JP5652101B2 true JP5652101B2 (en) 2015-01-14

Family

ID=46240161

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010226078A Expired - Fee Related JP5652101B2 (en) 2010-10-05 2010-10-05 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5652101B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9628108B2 (en) 2013-02-01 2017-04-18 Symbolic Io Corporation Method and apparatus for dense hyper IO digital retention
US10133636B2 (en) 2013-03-12 2018-11-20 Formulus Black Corporation Data storage and retrieval mediation system and methods for using same
US9304703B1 (en) 2015-04-15 2016-04-05 Symbolic Io Corporation Method and apparatus for dense hyper IO digital retention
US9817728B2 (en) 2013-02-01 2017-11-14 Symbolic Io Corporation Fast system state cloning
US10061514B2 (en) 2015-04-15 2018-08-28 Formulus Black Corporation Method and apparatus for dense hyper IO digital retention
US10572186B2 (en) 2017-12-18 2020-02-25 Formulus Black Corporation Random access memory (RAM)-based computer systems, devices, and methods
US10725853B2 (en) 2019-01-02 2020-07-28 Formulus Black Corporation Systems and methods for memory failure prevention, management, and mitigation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3020A (en) * 1843-03-30 Improvement in disengaging horses from carriages
JP4130780B2 (en) * 2002-04-15 2008-08-06 松下電器産業株式会社 Image encoding method and image decoding method

Also Published As

Publication number Publication date
JP2012080470A (en) 2012-04-19

Similar Documents

Publication Publication Date Title
JP5652101B2 (en) Image processing apparatus and image processing method
JP4732203B2 (en) Image encoding apparatus, decoding apparatus, control method therefor, computer program, and computer-readable storage medium
KR20160114570A (en) Method and device for image compression, having enhanced matching of fixed-width, variable-length pixel sample strings
US6614939B1 (en) Image compression apparatus and decoding apparatus suited to lossless image compression
WO2009087783A1 (en) Data generator for coding, method of generating data for coding, decoder and decoding method
US8284843B2 (en) Information encoding apparatus and method, information searching apparatus and method, information searching system and method, and program therefor
US20210076066A1 (en) Electronic apparatus and controlling method thereof
Babu et al. Efficient lossless image compression using modified hierarchical Forecast and context adaptive System
JP2005191956A (en) Display data compression/expansion method
JPH07177502A (en) Method for compressing picture information, compressed picture information recording medium, and compressed picture information reproducing device
JP2007527126A (en) Image part compression method and apparatus
JP4995969B2 (en) Method, compressor, decompressor and signal representation for lossless compression of pixel block values using row tilt codewords and column tilt codewords
JP2009077183A (en) Data compressor, data compression/extension system, and data compression method
CN114842108A (en) Probability grid map processing method and device and storage device
JP4109151B2 (en) Image processing device
JP2016195370A (en) Image processing apparatus, image processing method, and program
WO2012128209A1 (en) Image encoding device, image decoding device, program, and encoded data
TWI643160B (en) Method of hiding data in block truncation coding image utilizes weight parameter and remainder definition, image compression device and computer readable recording medium
JP4331992B2 (en) Image encoding method, image decoding method, image encoding device, image decoding device, program thereof, and program recording medium thereof
JPH1098620A (en) Picture processor
TWI643159B (en) Method of hiding data in block truncation coding image base on odd and even characteristics, image compression device and computer readable recording medium
JP2010276686A (en) Image control apparatus
JP4957572B2 (en) Image processing apparatus, image processing system, image processing method, and image processing program
JP2005039723A (en) Image encoder and image encoding method
JP4093867B2 (en) Image encoding apparatus, image encoding method, image encoding program, and computer-readable recording medium recording the image encoding program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130805

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140708

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140908

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20141021

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141103

R150 Certificate of patent or registration of utility model

Ref document number: 5652101

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees