JP4964084B2 - Image coding apparatus and image decoding apparatus - Google Patents

Image coding apparatus and image decoding apparatus Download PDF

Info

Publication number
JP4964084B2
JP4964084B2 JP2007267917A JP2007267917A JP4964084B2 JP 4964084 B2 JP4964084 B2 JP 4964084B2 JP 2007267917 A JP2007267917 A JP 2007267917A JP 2007267917 A JP2007267917 A JP 2007267917A JP 4964084 B2 JP4964084 B2 JP 4964084B2
Authority
JP
Japan
Prior art keywords
pixel
block
gradation level
data
image
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
JP2007267917A
Other languages
Japanese (ja)
Other versions
JP2009100096A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2007267917A priority Critical patent/JP4964084B2/en
Publication of JP2009100096A publication Critical patent/JP2009100096A/en
Application granted granted Critical
Publication of JP4964084B2 publication Critical patent/JP4964084B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、画像処理装置、特に重ね合わせ用画像を透過して下地画像を表示する画像合成装置に用いられる画像符号化および画像復号化技術に関する。   The present invention relates to an image encoding and image decoding technique used in an image processing apparatus, and in particular, an image composition apparatus that displays a base image through a superimposition image.

近年、画像と画像を重ね合わせることによって、写真や映像の上に字幕情報や他の画像データを表示させる方法が一般に行われている。重ね合わせ処理を行うためには、複数の画像を用意し、一方を下地用画像、他方を重ね合わせ用画像とした上で、重ね合わせ用画像に関しては、画素毎に該画素を透過して下地を表示するか否かのフラグを用意し、フラグが非透過を示す場合には重ね合わせ用画像のデータを、フラグが透過を示す場合には下地画像のデータを出力する、という切り替え処理を行う必要がある。   In recent years, a method of displaying subtitle information or other image data on a photograph or video by superimposing the images on each other is generally performed. In order to perform the superimposition processing, a plurality of images are prepared, and one is used as a background image and the other is used as a superimposition image. Is displayed, and when the flag indicates non-transparent, the overlay image data is output, and when the flag indicates transparent, the background image data is output. There is a need.

この重ね合わせ処理を前提とする画像の符号化方式の一つとして、特開2005−45452号公報(特許文献1)に開示されている方法は下記のようなものである。すなわち画像データを複数のブロックに分割し、各ブロックにおける画素値の基準レベルが所定の値であった場合は、データの透過処理に対応する箇所と見なして該当ブロックのデータについて下地データを選択する。ブロックの画素値基準レベルがそれ以外の値であった場合には、該当ブロックのデータをそのまま復号化し出力データとする。   As one of the image encoding methods based on this superposition processing, a method disclosed in Japanese Patent Laid-Open No. 2005-45452 (Patent Document 1) is as follows. That is, when the image data is divided into a plurality of blocks and the reference level of the pixel value in each block is a predetermined value, the background data is selected for the data of the corresponding block as a portion corresponding to the data transmission process. . If the pixel value reference level of the block is any other value, the data of the corresponding block is decoded as it is to be output data.

特開2005−45452号公報JP-A-2005-45452

しかしながら、特許文献1に挙げた画像処理装置では、画像の重ね合わせを行うかどうかの判定をブロック単位で行うため、重ね合わせ用画像を透過させ、下地画像を表示する箇所についてブロック単位での指定しか行うことができない。そのため、細かい文字やパターンを重ね合わせ画像に重ねて表示しようとする場合には、本来透過処理を行いたい画素について透過処理を行うことができず、画像が不自然になってしまう問題がある。
この発明はブロック単位での符号化の際に、透過処理を行う画素を考慮して符号を構成することにより、画素単位での透過処理を可能とするためのものである。
However, in the image processing apparatus described in Patent Document 1, since it is determined in block units whether or not to superimpose images, the overlay image is transmitted, and the place where the background image is displayed is specified in block units. Can only be done. For this reason, when a fine character or pattern is to be displayed superimposed on the superimposed image, there is a problem that the transmission process cannot be performed on the pixel that is originally subjected to the transmission process, and the image becomes unnatural.
In the present invention, when encoding is performed in units of blocks, a code is formed in consideration of pixels to be subjected to transmission processing, thereby enabling transmission processing in units of pixels.

この発明に係る画像符号化装置は、
入力された重ね合わせ用画像の画像データをM×N(M、Nは自然数)のブロックに分割するブロック分割手段と、当該ブロックにおける画素値の最大値と最小値を算出する信号レベル範囲算出手段と、得られた画素値の最大値および最小値からブロックの画素の基準レベルおよびブロック内の画素値変動幅を算出する符号化準備手段と、同じく得られた画素値の最大値および最小値から変換する符号の種類数に対応して階調レベルを分割するための画素値の量子化閾値を計算する量子化閾値計算手段と、上記ブロック内の各画素の階調レベルが上記量子化閾値にて決定される複数の範囲のいずれの範囲に含まれるかにより、それぞれの範囲に対応する固有の符号に各画素の階調レベルを置き換え、複数画像を重ねて合成する場合には、透過して下地画像のデータを出力する画素については上記の符号と異なる種類の固有の符号を割り当てる量子化手段と、ブロック内画素の基準レベル、画素値変動幅、個々の画素に割り当てられた符号をまとめて符号化データとする符号化データ作成手段とを備えた装置であって、
上記符号化準備手段は、ブロックの画素の基準レベルおよびブロック内の画素値変動幅を算出して出力するとともにブロック内にデータを透過する画素が含まれるか否かの信号をブロック内の画素値変動幅の信号に含めて出力し、
上記量子化閾値計算手段は、ブロック内にデータを透過する画素が含まれる場合は、諧調レベルをn段階に分割するための閾値を、ブロック内にデータを透過する画素が含まれない場合は、階調レベルを(n+1)段階に分割する閾値をそれぞれ求め、
上記量子化手段は、ブロック内にデータを透過する画素が含まれる場合は、透過する画素を示す符号またはn段階の階調レベルのいずれかを示す符号を画素毎に割り当て、ブロック内にデータを透過する画素が含まれない場合は、(n+1)段階の階調レベルを示す符号を画素毎に割り当てる。
An image encoding device according to the present invention is as follows.
Block dividing means for dividing the input image data of the overlay image into M × N (M and N are natural numbers) blocks, and signal level range calculating means for calculating the maximum and minimum pixel values in the block Encoding preparation means for calculating the reference level of the pixel of the block and the pixel value fluctuation range in the block from the maximum value and the minimum value of the obtained pixel value, and the maximum value and the minimum value of the pixel value obtained in the same manner Quantization threshold value calculation means for calculating a quantization threshold value of a pixel value for dividing the gradation level corresponding to the number of types of codes to be converted, and the gradation level of each pixel in the block as the quantization threshold value Depending on which of the plurality of ranges determined in accordance with each range, the gradation level of each pixel is replaced with a unique code corresponding to each range, and when a plurality of images are overlaid, transmission is performed. For the pixels that output the background image data, the quantization means for assigning a unique code of a different type from the above codes, the reference level of the pixels in the block, the pixel value fluctuation range, and the codes assigned to the individual pixels are summarized. An encoded data creating means for producing encoded data ,
The encoding preparation means calculates and outputs the reference level of the pixel of the block and the pixel value fluctuation range in the block, and outputs a signal indicating whether or not the block includes a pixel that transmits data in the block. Output included in the fluctuation range signal,
The quantization threshold value calculation means, when a pixel that transmits data is included in the block, a threshold value for dividing the gradation level into n stages, and when a pixel that transmits data is not included in the block, Each of the threshold values for dividing the gradation level into (n + 1) stages is obtained,
When the block includes pixels that transmit data, the quantization unit assigns a code indicating either a transparent pixel or a code indicating n gradation levels for each pixel, and assigns the data to the block. In the case where a transparent pixel is not included, a code indicating a gradation level of (n + 1) stages is assigned to each pixel.

この発明に係る画像符号化装置は、
重ね合わせ用画像の画像データがM×N(M、Nは自然数)のブロック毎に分割されて符号化され、ブロック内画素の基準レベル、画素値変動幅、複数画像を重ねて合成する場合の下地画像データが透過して出力された画素と複数画像を重ねない場合の画素に割り当てられた異なる種類の符号がまとめられた符号化データを入力して画像データを復号化する画像復号化装置であって、
各ブロックの画素基準レベル、画素値変動幅から、各画素の符号に対応する階調レベルを算出する階調レベル算出手段と、各画素の符号を階調レベルに置き換える階調レベル割り当て手段とを有し、
上記階調レベル算出手段は、各ブロックの画素基準レベル、画素値変動幅から、各画素の符号に対応する階調レベルを算出するとともに、ブロック符号化データ中の画素値変動値幅のデータに含まれるフラグにより該当ブロックがデータを透過する画素を含むかどうかを判定し、該当ブロックがデータを透過する画素を含む場合には、n種類の符号に対応する階調レベルの算出を行い、該当ブロックがデータを透過する画素を含まない場合には、(n+1)種類の符号に対応する階調レベルの算出を行い、
上記階調レベル割り当て手段は、該当ブロックがデータを透過する画素を含む場合には画素の符号が透過出力を示すものであった場合に、該当画素の階調レベルを下地となる別画像の該当画素階調レベルによって置き換えるとともに、それ以外の場合には階調レベル算出手段によって算出されたn種類の符号と階調レベルの対応に従って、各画素の符号を階調レベルに置き換え、該当ブロックがデータを透過する画素を含まない場合には階調レベル算出手段によって算出された(n+1)種類の符号と階調レベルの対応に従って、各画素の符号を階調レベルに置き換える
An image encoding device according to the present invention is as follows.
The image data of the image for superimposition is divided and encoded for each M × N (M and N are natural numbers) blocks, and the reference level of the pixels in the block, the pixel value fluctuation range, and a plurality of images are superimposed and combined. An image decoding apparatus that inputs encoded data in which different types of codes assigned to pixels when a plurality of images are not overlapped with a pixel that is transmitted through and output the background image data and decodes the image data. There,
Gradation level calculation means for calculating the gradation level corresponding to the code of each pixel from the pixel reference level and pixel value fluctuation range of each block, and gradation level assignment means for replacing the code of each pixel with the gradation level Have
The gradation level calculation means calculates the gradation level corresponding to the code of each pixel from the pixel reference level and pixel value variation width of each block, and is included in the pixel value variation value width data in the block encoded data. It is determined whether the corresponding block includes a pixel that transmits data according to the flag, and if the corresponding block includes a pixel that transmits data, the gradation level corresponding to n types of codes is calculated and the corresponding block is calculated. Does not include pixels that transmit data, the gradation level corresponding to (n + 1) types of codes is calculated,
In the case where the block includes pixels that transmit data, if the code of the pixel indicates a transmission output, the gradation level assigning unit sets the gradation level of the pixel to the background of another image. In addition to replacing with the corresponding pixel gradation level , in other cases, the code of each pixel is replaced with the gradation level according to the correspondence between the n types of codes calculated by the gradation level calculating means and the gradation level, When the pixel that does not transmit data is not included, the code of each pixel is replaced with the gradation level according to the correspondence between the (n + 1) types of codes calculated by the gradation level calculation means and the gradation level .

この発明の画像符号化装置によれば、ブロックに分割された各画素に符号を割り当てる際、透過処理を行う画素には、透過処理の画素示す個別の符号を使用するため、画素単位での細かい透過処理に対応した符号化データを作成することが可能である。
また、透過処理を考慮しない場合に使用される符号の種類のうちの一つを透過処理対応画素を示す符号として使用するため、透過処理を考慮する場合でも符号化データのデータ長を、透過処理を考慮しない場合と同様の一定値に保つことが可能である。
According to the image encoding apparatus of the present invention, when assigning a code to each pixel which is divided into blocks, the pixel to be permeabilized to use a separate code indicating the pixels of the transmission process, in units of pixels It is possible to create encoded data corresponding to fine transparency processing.
In addition, since one of the types of codes used when the transparency processing is not considered is used as a code indicating the pixel corresponding to the transparency processing, the data length of the encoded data is changed even when the transparency processing is considered. It is possible to keep the same constant value as in the case of not considering.

また、この発明の画像復号化装置によれば、復号化を行う際に、透過処理を行う画素を示す個別の符号に対応し下地データを参照するため、画素単位での細かい透過処理をおこなった復号化画像データを作成することが可能である。   In addition, according to the image decoding apparatus of the present invention, when performing decoding, in order to refer to the background data corresponding to the individual code indicating the pixel on which the transparent processing is performed, the fine transparent processing is performed in units of pixels. It is possible to create decoded image data.

実施の形態1.
図1はこの発明の実施の形態1である画像符号化装置を示す構成図である。図1において、1は画像データをM×N(M、Nは自然数)のブロックに分割するためのブロック分割手段、2は分割されたブロック内の画素について階調レベルの最大値および最小値を算出するための信号レベル範囲算出手段、3は階調レベルの最大値および最小値からブロック内の画素の基準レベルと画素値変動幅を算出するための符号化準備手段、4は画素の基準レベルと画素値変動幅から量子化の際の閾値を算出する量子化閾値計算手段、5は各画素の階調レベルに対応して量子化された符号を割り当てるための量子化手段、6は算出されたブロック内画素の基準レベル、画素値変動幅、個々の画素に割り当てられた符号をまとめて符号化データとするための符号化データ作成手段である。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing an image encoding apparatus according to Embodiment 1 of the present invention. In FIG. 1, 1 is a block dividing means for dividing image data into M × N (M and N are natural numbers) blocks, and 2 is a maximum value and a minimum value of gradation levels for pixels in the divided blocks. Signal level range calculating means for calculating, 3 an encoding preparation means for calculating a reference level and a pixel value fluctuation range of a pixel in the block from the maximum value and the minimum value of the gradation level, and 4 a reference level of the pixel Quantization threshold value calculation means for calculating a threshold value for quantization from the pixel value fluctuation range, 5 is a quantization means for assigning a quantized code corresponding to the gradation level of each pixel, and 6 is calculated. This is encoded data generating means for collectively combining the reference level of the pixels in the block, the pixel value fluctuation range, and the code assigned to each pixel into encoded data.

次に動作について説明する。図2はこの実施の形態1である画像符号化装置における画像の処理方法を示すフローチャートである。まずブロック分割手段1によって入力された画像データをM×N(M、Nは自然数)のブロックに分割する(ステップST1)。ここでは各ブロックが水平4画素、垂直4画素の16画素から成る場合について説明する。
分割されたブロックのうち、符号化処理を行っていないブロックを一つ選択する(ステップST2)。
Next, the operation will be described. FIG. 2 is a flowchart showing an image processing method in the image coding apparatus according to the first embodiment. First, the image data input by the block dividing means 1 is divided into M × N (M and N are natural numbers) blocks (step ST1). Here, a case where each block is composed of 16 pixels of 4 horizontal pixels and 4 vertical pixels will be described.
Among the divided blocks, one block not subjected to the encoding process is selected (step ST2).

信号レベル範囲算出手段2において、選択されたブロックの各画素の階調レベルから階調レベルの最大値Lmaxおよび最小値Lminを求める(ステップST3)。
符号化準備手段3では、ブロック内の画素階調レベルの最大値Lmaxおよび最小値Lmin、そしてブロック内の画素階調レベルの分布からブロックの画素基準レベルLAおよび画素値変動幅LDを求める(ステップST4)。
画素基準レベルLAおよび画素値変動幅LDの算出方法を下記に示す。
まず画素基準レベルLA、画素値変動幅LD算出のための参照画素を決める閾値P1、P2を(式1)、(式2)で求める。
P1=(Lmax+3Lmin)/4 ・・・ (式1)
P2=(3Lmax+Lmin)/4 ・・・ (式2)
In the signal level range calculation means 2, the maximum value Lmax and the minimum value Lmin of the gradation level are obtained from the gradation level of each pixel of the selected block (step ST3).
The encoding preparation means 3 obtains the pixel reference level LA and the pixel value variation width LD of the block from the maximum value Lmax and minimum value Lmin of the pixel gradation level in the block and the distribution of the pixel gradation level in the block (step ST4).
A method for calculating the pixel reference level LA and the pixel value variation width LD will be described below.
First, threshold values P1 and P2 for determining reference pixels for calculating the pixel reference level LA and the pixel value fluctuation range LD are obtained by (Expression 1) and (Expression 2).
P1 = (Lmax + 3Lmin) / 4 (Formula 1)
P2 = (3Lmax + Lmin) / 4 (Formula 2)

ここで閾値P1およびP2はLmax、Lminを加重平均した値として求めるが、この時、加重平均に適用する係数は、画像の階調レベル分布状態や各画素の階調レベル変換の際割り当てられるビット数、本技術を適用するシステムの画像の特性に応じて量子化誤差がなるべく小さくなる値を選択することが可能である。ただし、その際符号化時と復号化時で同一の係数を前提とした処理が行われるよう、同一システム内では単一の係数に統一するか、あるいは符号化データにフラグを設け、使用した係数を区別するための仕組みが必要となる。   Here, the threshold values P1 and P2 are obtained as a value obtained by weighted average of Lmax and Lmin. At this time, the coefficient applied to the weighted average is a bit assigned in the gradation level distribution state of the image and the gradation level conversion of each pixel. It is possible to select a value that minimizes the quantization error according to the characteristics of the image of the system to which the present technology is applied. However, in order to perform processing assuming the same coefficient at the time of encoding and decoding at that time, in the same system, it is unified to a single coefficient, or a flag is provided in the encoded data and used It is necessary to have a mechanism to distinguish

ブロック内に含まれる画素の階調レベルXij(0≦i,j<4)について、
Xij ≦P1 を満たす画素の階調レベル平均値をQmin
Xij >P2 を満たす画素の階調レベル平均値をQmax
とする。
Regarding the gradation level Xij (0 ≦ i, j <4) of the pixels included in the block,
Qmin is the average gradation level value of pixels satisfying Xij ≦ P1.
Qmax is an average value of gradation levels of pixels satisfying Xij> P2.
And

QminおよびQmaxの値を用い、下記の(式3)、(式4)にて画素基準レベルLAおよび画素値変動幅LDの値を求める。
LA=(Qmin+Qmax)/2 ・・・ (式3)
LD=(Qmax―Qmin) ・・・ (式4)
Using the values of Qmin and Qmax, the values of the pixel reference level LA and the pixel value variation width LD are obtained by the following (Expression 3) and (Expression 4).
LA = (Qmin + Qmax) / 2 (Formula 3)
LD = (Qmax−Qmin) (Formula 4)

量子化閾値計算手段4において、各画素の階調レベルを符号に変換するための閾値を算出する(ステップST5)。閾値の数は階調レベルを変換する符号に割り当てられるビット数に対応させる必要がある。ここでは一つの画素に割り当てる符号を2ビットとする場合について述べる。画素に割り当てる符号を2ビットとする場合、各画素に対して4種類の状態を割り当てることが可能となる。このうち1種類を透過処理を行う画素を示す状態に割り当てるため、階調レベルに対応する符号は残る3種類となる。よって階調レベルを3種類の符号に対応する3つの範囲に分割するための閾値としてL1、L2の2つの値が必要となる。   The quantization threshold calculation means 4 calculates a threshold for converting the gradation level of each pixel into a code (step ST5). The number of threshold values needs to correspond to the number of bits assigned to the code for converting the gradation level. Here, a case where the code assigned to one pixel is 2 bits will be described. When the code assigned to the pixel is 2 bits, four types of states can be assigned to each pixel. Of these, since one type is assigned to the state indicating the pixel to be subjected to the transmission processing, the remaining three types of codes corresponding to the gradation levels remain. Therefore, two values L1 and L2 are required as threshold values for dividing the gradation level into three ranges corresponding to the three types of codes.

閾値L1、L2の値はステップST4にて求めた画素基準レベルLA、画素値変動幅LDの値に基づき、下記(式5)、(式6)のようにLAからLDの一定比率の値を加算または減算することによって求める。
L1=LA−LD/4 ・・・ (式5)
L2=LA+LD/4 ・・・ (式6)
The values of the thresholds L1 and L2 are based on the pixel reference level LA and the pixel value fluctuation width LD obtained in step ST4, and values of constant ratios of LA to LD are obtained as shown in (Expression 5) and (Expression 6) below. Find by adding or subtracting.
L1 = LA-LD / 4 (Formula 5)
L2 = LA + LD / 4 (Formula 6)

この時、画素値変動幅LDの値に適用する比率は、ここでは1/4としているが、画像の階調レベル分布状態や本技術を適用するシステムの画像の特性に応じて量子化誤差がなるべく小さくなる値を選択することが可能である。ただし、その際符号化時と復号化時で同一の係数を前提とした処理が行われるよう、同一システム内では単一の係数に統一するか、あるいは符号化データにフラグを設け、使用した係数を区別するための仕組みが必要となる。
ここで図4に(式5)および(式6)を適用した場合の符号化閾値分布および復号化時の信号レベル分布を示す。図3は透過画素を考慮せず、各画素の階調レベルを4種類の符号に対応させる従来の符号化方式における信号レベル分布を示している。図4では図3に示す従来の符号化方式に対して割り当てられる階調レベルが減少する(4つから3つ)ため、復号化された画像の階調再現性は低下する。
At this time, the ratio applied to the value of the pixel value fluctuation width LD is 1/4 here, but the quantization error depends on the gradation level distribution state of the image and the characteristics of the image of the system to which the present technology is applied. It is possible to select a value as small as possible. However, in order to perform processing assuming the same coefficient at the time of encoding and decoding at that time, in the same system, it is unified to a single coefficient, or a flag is provided in the encoded data and used It is necessary to have a mechanism to distinguish
FIG. 4 shows the encoding threshold distribution and the signal level distribution at the time of decoding when (Equation 5) and (Equation 6) are applied. FIG. 3 shows a signal level distribution in the conventional encoding method in which the gradation level of each pixel corresponds to four types of codes without considering the transparent pixels. In FIG. 4, the gradation level assigned to the conventional encoding method shown in FIG. 3 is reduced (four to three), so that the gradation reproducibility of the decoded image is lowered.

また、画素に割り当てる符号を3ビットとした場合には、各画素に対して8種類の状態を割り当てることが可能となり、うち1種類を透過処理を行う画素を示す状態に割り当てるため、階調レベルに対応する符号は残る7種類となる。よって階調レベルを7種類の符号に対応する7つの範囲に分割するための閾値としてL1からL6の6つの値が必要となる。下記(式7)から(式12)に演算式の一例を示す。   If the code assigned to a pixel is 3 bits, eight types of states can be assigned to each pixel, and one of them is assigned to a state indicating a pixel to be subjected to a transmission process. There are seven remaining codes corresponding to. Therefore, six values L1 to L6 are required as threshold values for dividing the gradation level into seven ranges corresponding to the seven types of codes. An example of an arithmetic expression is shown in (Expression 7) to (Expression 12) below.

L1=LA−LD×3/8 ・・・ (式7)
L2=LA−LD/4 ・・・ (式8)
L3=LA−LD/8 ・・・ (式9)
L4=LA+LD/8 ・・・ (式10)
L5=LA+LD/4 ・・・ (式11)
L6=LA+LD×3/8 ・・・ (式12)
L1 = LA-LD × 3/8 (Expression 7)
L2 = LA-LD / 4 (Formula 8)
L3 = LA-LD / 8 (formula 9)
L4 = LA + LD / 8 (Formula 10)
L5 = LA + LD / 4 (Formula 11)
L6 = LA + LD × 3/8 (Formula 12)

選択されたブロック内で未処理となっている画素の一つを選択する(ステップST6)。
量子化手段5では、選択した画素が透過処理を行う画素かどうかを確認する(ステップST7)。入力画像において透過処理を行う画素のデータについては、入力画像と共にあらかじめ決定されているものとする。
ステップST7において選択画素が透過処理を行う画素ではなかった場合、選択画素の階調レベルに対応してステップST5で求めた閾値L1、L2から構成される領域のうちどの領域に含まれるかを判定し、符号を割り当てる(ステップST8)。符号に割り当てるビット数を2ビットとする場合の割り当て方法の一例を下記に示す。選択画素の階調レベルXij、対応する符号をφijとして、
Xij≦L1 のとき φij=00(2進数) ・・・ (式13)
L1<Xij≦L2 のとき φij=01(2進数) ・・・ (式14)
L2<Xij のとき φij=10(2進数) ・・・ (式15)
One of the unprocessed pixels in the selected block is selected (step ST6).
The quantization means 5 confirms whether or not the selected pixel is a pixel to be subjected to transmission processing (step ST7). It is assumed that pixel data to be subjected to transparency processing in the input image is determined in advance together with the input image.
If the selected pixel is not a pixel to be subjected to the transmission process in step ST7, it is determined which of the areas formed by the threshold values L1 and L2 obtained in step ST5 corresponds to the gradation level of the selected pixel. Then, a code is assigned (step ST8). An example of an allocation method when the number of bits allocated to the code is 2 bits is shown below. The gradation level Xij of the selected pixel and the corresponding code as φij,
When Xij ≦ L1, φij = 00 (binary number) (Expression 13)
When L1 <Xij ≦ L2, φij = 01 (binary number) (Expression 14)
When L2 <Xij φij = 10 (binary number) (Equation 15)

ステップST7において選択画素が透過処理を行う画素であった場合は、選択画素の階調レベルにかかわらず、透過処理を行う画素であることを示す符号を割り当てる(ステップST9)。ステップST8で挙げた符号の割り当て例の場合、ステップST9で割り当てる符号はステップST8の例で使用されていない‘11’(2進数)とする。
φij=11(2進数) ・・・ (式16)
In step ST7, if the selected pixel is a pixel to be subjected to transmission processing, a code indicating that the pixel is to be subjected to transmission processing is assigned regardless of the gradation level of the selected pixel (step ST9). In the case of the code assignment example given in step ST8, the code assigned in step ST9 is “11” (binary number) that is not used in the example of step ST8.
φij = 11 (binary number) (Expression 16)

次に、選択されたブロックに未処理画素があるかどうか確認する(ステップST10)。未処理画素がある場合はステップST6からの動作を繰り返す。未処理画素がない場合はステップST11の処理に移る。
ステップST11では、入力画像データに未処理ブロックがあるかどうか確認する。未処理ブロックがある場合はステップST2からの動作を繰り返す。未処理画素がない場合はステップST12の処理に移る。
Next, it is confirmed whether or not there is an unprocessed pixel in the selected block (step ST10). If there are unprocessed pixels, the operation from step ST6 is repeated. If there is no unprocessed pixel, the process proceeds to step ST11.
In step ST11, it is confirmed whether there is an unprocessed block in the input image data. If there is an unprocessed block, the operation from step ST2 is repeated. If there is no unprocessed pixel, the process proceeds to step ST12.

全てのブロックおよび全ての画素に関する処理が完了した状態で、符号化データ作成手段6においてブロック毎の画素基準レベルLAおよび画素値変動幅LD、画素毎の符号φijを組み合わせ、符号化データを作成する(ステップST12)。図5は本実施の形態におけるブロック毎の符号化データの構成を示す。   In a state where the processing for all the blocks and all the pixels is completed, the encoded data generating means 6 combines the pixel reference level LA and the pixel value fluctuation width LD for each block and the code φij for each pixel to generate encoded data. (Step ST12). FIG. 5 shows a configuration of encoded data for each block in the present embodiment.

上記のように本実施の形態では、ブロックに分割された各画素に符号を割り当てる際、透過処理を行う画素には、透過処理の画素示す個別の符号を使用するため、画素単位での細かい透過処理に対応した符号化データを作成することが可能である。
また、透過処理を考慮しない場合に使用される符号の種類のうちの一つを透過処理対応画素を示す符号として使用するため、透過処理を考慮する場合でも符号化データのデータ長を、透過処理を考慮しない場合と同様の一定値に保つことが可能である。入力画像のデータ幅を8ビットとした場合、各ブロックの画素基準レベルLAおよび画素値変動幅LDにはそれぞれ入力データのデータ幅と同じ8ビットを割り当て、画素毎の符号化データとしては2ビットを割り当てる。ブロック当たりのデータ量は圧縮前で8ビット×16画素=16バイトであり、圧縮後は8ビット+8ビット+2ビット×16画素=6バイトとなるため圧縮率は3/8となる。
As described above, in this embodiment, when a code is assigned to each pixel divided into blocks, the individual code indicating the pixel of the transmission process is used for the pixel for which the transmission process is performed. It is possible to create encoded data corresponding to the processing.
In addition, since one of the types of codes used when the transparency processing is not considered is used as a code indicating the pixel corresponding to the transparency processing, the data length of the encoded data is changed even when the transparency processing is considered. It is possible to keep the same constant value as in the case of not considering. When the data width of the input image is 8 bits, the same 8 bits as the data width of the input data are assigned to the pixel reference level LA and the pixel value fluctuation width LD of each block, and the encoded data for each pixel is 2 bits. Assign. The data amount per block is 8 bits × 16 pixels = 16 bytes before compression, and after compression is 8 bits + 8 bits + 2 bits × 16 pixels = 6 bytes, so the compression rate is 3/8.

実施の形態2.
透過処理を行う画素を示すフラグとして、量子化された符号の内の1階調ではなく1ビットを割り当てる場合の実施の形態について説明する。この場合の画像符号化装置を示す構成図は図1と同様であり、量子化閾値計算手段4および量子化手段5で行う処理の内容が実施の形態1とは異なる。
図6はこの発明の実施の形態2である画像符号化装置における画像の処理方法を示すフローチャートである。
Embodiment 2. FIG.
An embodiment will be described in which 1 bit is assigned instead of 1 gradation in a quantized code as a flag indicating a pixel to be subjected to transparency processing. The configuration diagram showing the image coding apparatus in this case is the same as that in FIG. 1, and the contents of the processing performed by the quantization threshold value calculation means 4 and the quantization means 5 are different from those of the first embodiment.
FIG. 6 is a flowchart showing an image processing method in the image coding apparatus according to the second embodiment of the present invention.

以下、本実施の形態の処理方法について、実施の形態1と異なる処理を主体に説明する。
量子化閾値計算手段4では、各画素の階調レベルを符号に変換するための閾値L1を算出する(ステップST5)。閾値の数は階調レベルを変換する符号に割り当てられるビット数に対応させる必要がある。本実施の形態では、各画素に割り当てる符号のうち1ビットを透過処理を行うかどうかのフラグに使用するため、ここでは一つの画素について階調レベルの変換に割り当てる符号を1ビットとし、各画素に割り当てる符号量を実施の形態1と同じく2ビットとする場合について説明する。
Hereinafter, the processing method of the present embodiment will be described mainly with respect to processing different from that of the first embodiment.
The quantization threshold value calculation means 4 calculates a threshold value L1 for converting the gradation level of each pixel into a code (step ST5). The number of threshold values needs to correspond to the number of bits assigned to the code for converting the gradation level. In the present embodiment, since one bit of the code assigned to each pixel is used as a flag for determining whether or not to perform the transparency process, the code assigned to gradation level conversion for one pixel is set to 1 bit. A case will be described in which the code amount to be assigned is 2 bits as in the first embodiment.

画素に割り当てる符号を1ビットとする場合、各画素に対して2種類の状態を割り当てることができる。階調レベルを2種類の符号に対応する2つの範囲に分割するための閾値として一つの閾値L1が必要となる。閾値が一つとなる場合には画素値分布の中心となる画素基準レベルLAの値をL1として使用する。
L1=LA ・・・ (式17)
なお、ここでは各画素に割り当てる符号量を2ビットとし、階調レベルの変換に割り当てる符号を1ビットとしたが、各画素に割り当てる符号量を3ビットとし、階調レベルの変換に割り当てる符号を2ビットとするような符号化方式をとることも可能である。この場合には各画素に対して4種類の状態を割り当てることができるので、閾値として3つの値を算出する必要がある。
When the code assigned to a pixel is 1 bit, two types of states can be assigned to each pixel. One threshold L1 is required as a threshold for dividing the gradation level into two ranges corresponding to two types of codes. When the threshold value is one, the value of the pixel reference level LA that is the center of the pixel value distribution is used as L1.
L1 = LA (Expression 17)
Here, the code amount assigned to each pixel is 2 bits and the code assigned to gradation level conversion is 1 bit. However, the code amount assigned to each pixel is 3 bits, and the code assigned to gradation level conversion is It is also possible to adopt an encoding method of 2 bits. In this case, since four types of states can be assigned to each pixel, it is necessary to calculate three values as threshold values.

量子化手段5では、ステップST6で選択した画素が透過処理を行う画素かどうかを確認する(ステップST7)。入力画像において透過処理を行う画素のデータについては、入力画像と共にあらかじめ決定されているものとする。
ステップST7において選択画素が透過処理を行う画素ではなかった場合、選択画素に対応する1ビットの透過処理対応フラグを0に設定する(ステップST13a)。
ステップST7において選択画素が透過処理を行う画素であった場合は、選択画素に対応する1ビットの透過処理対応フラグを1に設定する(ステップST13b)
In the quantization means 5, it is confirmed whether or not the pixel selected in step ST6 is a pixel to be subjected to transmission processing (step ST7). It is assumed that pixel data to be subjected to transparency processing in the input image is determined in advance together with the input image.
If the selected pixel is not a pixel to be subjected to the transparent process in step ST7, a 1-bit transparent process corresponding flag corresponding to the selected pixel is set to 0 (step ST13a).
In step ST7, if the selected pixel is a pixel to be subjected to the transparent process, a 1-bit transparent process corresponding flag corresponding to the selected pixel is set to 1 (step ST13b).

選択画素が透過処理を行う画素かどうかに関わらず、選択画素の階調レベルに対応してステップST5で求めた閾値から構成される領域のうちどの領域に含まれるかを判定し、符号を割り当てる(ステップST8)。符号に割り当てるビット数を1ビットとする場合の割り当て方法の一例を下記に示す。選択画素の階調レベルXij、対応する符号をφijとして、
Xij≦L1 のとき φij=0(2進数) ・・・ (式18)
L1<Xij のとき φij=1(2進数) ・・・ (式19)
他の部分の動作については実施の形態1における図2と同様である。
図7は式17を適用した場合の符号化閾値分布および復号化時の信号レベル分布を示す。また、図8は本実施の形態におけるブロック毎の符号化データの構成を示したものである。
Regardless of whether or not the selected pixel is a pixel to be transparently processed, it is determined which region is included in the region constituted by the threshold values obtained in step ST5 corresponding to the gradation level of the selected pixel, and a code is assigned (Step ST8). An example of an allocation method when the number of bits allocated to the code is 1 bit is shown below. The gradation level Xij of the selected pixel and the corresponding code as φij,
When Xij ≦ L1, φij = 0 (binary number) (Equation 18)
When L1 <Xij φij = 1 (binary number) (Equation 19)
The operation of other parts is the same as that in FIG. 2 in the first embodiment.
FIG. 7 shows an encoding threshold distribution and a signal level distribution at the time of decoding when Expression 17 is applied. FIG. 8 shows the configuration of the encoded data for each block in the present embodiment.

上記のように本実施の形態では、ブロックに分割された各画素に符号を割り当てる際、透過処理対応フラグと階調レベルの変換に割り当てる符号を独立して保持する構成としているため、透過処理に対応する画素に関しても画素値を参照できる。よって、例えば透過画素における透過率を100%とせず、下地画像に対して透過率50%で半透明重ね合わせ処理を行うような処理に対応することが可能である。   As described above, in the present embodiment, when assigning a code to each pixel divided into blocks, the transparency processing support flag and the code assigned to the conversion of the gradation level are independently held. The pixel value can also be referred to for the corresponding pixel. Therefore, for example, it is possible to cope with a process in which the transmissivity of the transmissive pixel is not set to 100% and the translucent overlay process is performed on the base image with the transmittance of 50%.

実施の形態3.
ブロック毎にデータを透過する画素が含まれるかどうかを判定し、符号化処理方法の切り替えを行う場合の実施の形態について説明する。この場合の画像符号化装置を示す構成図は図1と同様であり、符号化準備手段3、量子化閾値計算手段4、量子化手段5および符号化データ作成手段6で行う処理の内容が実施の形態1とは異なる。
Embodiment 3 FIG.
An embodiment in the case where it is determined whether or not each block includes a pixel that transmits data and the coding processing method is switched will be described. The block diagram showing the image encoding apparatus in this case is the same as that shown in FIG. 1, and the contents of the processing performed by the encoding preparation means 3, the quantization threshold calculation means 4, the quantization means 5 and the encoded data creation means 6 are implemented. This is different from the first form.

図9はこの発明の実施の形態3である画像符号化装置における画像の処理方法を示すフローチャートである。図9における画像符号化装置の動作について実施の形態1と異なる処理を主に説明する。
符号化準備手段3では、ブロック内の画素階調レベルの最大値Lmaxおよび最小値Lminを算出(ステップST3)、そしてブロック内の画素階調レベルの分布からブロックの画素基準レベルLAおよび画素値変動幅LDを求める(ステップST4)。画素基準レベルLAおよび画素値変動幅LDの算出方法については実施の形態1と同様である。
またこの際、符号化準備手段3で該当ブロック内に透過処理を行う画素が含まれるかどうかの確認を行う(ステップST14)。
ステップST14にてブロック内に透過処理を行う画素が含まれる場合は、量子化閾値計算手段4において、実施の形態1と同様に階調レベルに対して3種類の符号を割り当てるため、閾値としてL1、L2の2つの値を算出する(ステップST5)。算出方法は実施の形態1における(式5)および(式6)と同様である。
FIG. 9 is a flowchart showing an image processing method in the image coding apparatus according to Embodiment 3 of the present invention. The operation of the image coding apparatus in FIG. 9 will be mainly described in processing different from that in the first embodiment.
The encoding preparation means 3 calculates the maximum value Lmax and the minimum value Lmin of the pixel gradation level in the block (step ST3), and the pixel reference level LA and the pixel value variation of the block from the distribution of the pixel gradation level in the block. The width LD is obtained (step ST4). The calculation method of the pixel reference level LA and the pixel value variation width LD is the same as that in the first embodiment.
At this time, the encoding preparation means 3 checks whether or not the pixel to be subjected to the transmission process is included in the corresponding block (step ST14).
When a pixel to be subjected to transmission processing is included in the block in step ST14, the quantization threshold value calculation means 4 assigns three types of codes to the gradation levels as in the first embodiment, so that the threshold value L1 , L2 are calculated (step ST5). The calculation method is the same as (Equation 5) and (Equation 6) in the first embodiment.

ステップST14にてブロック内に透過処理を行う画素が含まれない場合、量子化閾値計算手段4において、透過処理を行うための符号を考慮せず、階調レベルに対して4種類の符号を割り当てる。このため閾値としてL1、L2、L3の3つの値を算出する(ステップST15)。下記(式20)から(式22)に演算式の一例を示す。
L1=LA−LD/4 ・・・ (式20)
L2=LA ・・・ (式21)
L3=LA+LD/4 ・・・ (式22)
In step ST14, when the pixel to be subjected to the transparency process is not included in the block, the quantization threshold calculation unit 4 assigns four types of codes to the gradation level without considering the codes for the transparency process. . Therefore, three values L1, L2, and L3 are calculated as threshold values (step ST15). An example of an arithmetic expression is shown below from (Expression 20) to (Expression 22).
L1 = LA-LD / 4 (Formula 20)
L2 = LA (Formula 21)
L3 = LA + LD / 4 (Formula 22)

また、ステップST14にてブロック内に透過処理を行う画素が含まれる場合、量子化手段5における処理は実施の形態1と同様となる。図9のフローチャートのステップST6からステップST10は図2のフローチャートのステップST6からステップST10に相当する。   In addition, when a pixel to be subjected to the transmission process is included in the block in step ST14, the process in the quantization unit 5 is the same as that in the first embodiment. Steps ST6 to ST10 in the flowchart in FIG. 9 correspond to steps ST6 to ST10 in the flowchart in FIG.

ステップST14にてブロック内に透過処理を行う画素が含まれない場合、量子化手段5における処理は、透過処理について考慮しない従来の符号化方式と同様となる。ステップST17では、ステップST15で求めた閾値L1、L2、L3から構成される4種類の領域のうち該当画素の階調レベルがどの領域に含まれるかを判定し、符号を割り当てる。符号に割り当てるビット数を2ビットとする場合の割り当て方法の一例を下記(式23)から(式26)に示す。選択画素の階調レベルXij、対応する符号をφijとして、   When the pixel to be subjected to the transparency process is not included in the block in step ST14, the process in the quantization unit 5 is the same as the conventional encoding method that does not consider the transparency process. In step ST17, it is determined in which region the gradation level of the corresponding pixel is included among the four types of regions composed of the threshold values L1, L2, and L3 obtained in step ST15, and a code is assigned. An example of the assignment method when the number of bits assigned to the code is 2 bits is shown in (Expression 23) to (Expression 26) below. The gradation level Xij of the selected pixel and the corresponding code as φij,

Xij≦L1 のとき φij=00(2進数) ・・・ (式23)
L1<Xij≦L2 のとき φij=01(2進数) ・・・ (式24)
L2<Xij≦L3 のとき φij=10(2進数) ・・・ (式25)
L3<Xij のとき φij=11(2進数) ・・・ (式26)
When Xij ≦ L1, φij = 00 (binary number) (Equation 23)
When L1 <Xij ≦ L2, φij = 01 (binary number) (Equation 24)
When L2 <Xij ≦ L3 φij = 10 (binary number) (Equation 25)
When L3 <Xij φij = 11 (binary number) (Equation 26)

符号化データ作成手段6では全てのブロックおよび全ての画素に関する処理が完了した状態で、ブロック毎の画素基準レベルLAおよび画素値変動幅LD、画素毎の符号φijを組み合わせ、符号化データを作成する(ステップST12)。   The encoded data creation means 6 creates the encoded data by combining the pixel reference level LA and the pixel value variation width LD for each block and the code φij for each pixel in a state where the processing for all the blocks and all the pixels is completed. (Step ST12).

この時、画素変動幅を示す値LDに関しては、8ビット値から値の最下位1ビットを削除した7ビット値として格納し、残る1ビットに該当ブロックにて透過処理に対応するかどうかのフラグを割り当てる。図10は本実施の形態におけるブロック毎の符号化データの構成を示したものである。   At this time, the value LD indicating the pixel fluctuation range is stored as a 7-bit value obtained by deleting the least significant 1 bit from the 8-bit value, and a flag indicating whether or not the remaining block corresponds to the transparent processing in the corresponding block. Assign. FIG. 10 shows the structure of the encoded data for each block in the present embodiment.

上記のように本実施の形態では、ブロック毎に透過処理に対応するかどうかの判定を行い、透過処理が必要となるブロックのみ透過処理を行う画素に対応する符号を割り当てるため、透過処理を行わないブロックについては割り当てられる符号の種別数の減少による画質の低下を防ぎつつ、必要な箇所のみ透過処理に対応することが可能となる。   As described above, according to the present embodiment, it is determined whether or not the transmission processing is supported for each block, and the transmission processing is performed in order to assign a code corresponding to the pixel that performs the transmission processing only to the block that needs the transmission processing. For blocks that do not exist, it is possible to cope with the transparent processing only at necessary portions while preventing deterioration in image quality due to a decrease in the number of types of assigned codes.

実施の形態4.
図11はこの発明の実施の形態4である画像復号化装置を示す構成図である。図11において、11は符号化されたデータをM×N(M、Nは自然数)のブロックに分割された画像データに対応するブロックに分割する符号化データ分割手段、12は符号化データに含まれるブロック毎の画素基準レベルLAおよび画素値変動幅LDから、量子化された符号に対応する階調レベルを算出するための階調レベル算出手段、13はブロック内の各画素について、量子化された符号に対応する階調レベルを割り当てる階調レベル割り当て手段、14は割り当てられた各画素の階調レベルをまとめて復号化された画像データとしてまとめるための画像データ作成手段である。
Embodiment 4 FIG.
FIG. 11 is a block diagram showing an image decoding apparatus according to Embodiment 4 of the present invention. In FIG. 11, reference numeral 11 denotes encoded data dividing means for dividing the encoded data into blocks corresponding to image data divided into M × N blocks (M and N are natural numbers), and 12 is included in the encoded data. Gradation level calculation means for calculating a gradation level corresponding to the quantized code from the pixel reference level LA and the pixel value fluctuation width LD for each block, and 13 is quantized for each pixel in the block The gradation level assigning means 14 assigns the gradation levels corresponding to the codes, and image data creating means 14 collects the assigned gradation levels of the respective pixels as decoded image data.

次に動作について説明する。図12はこの発明の実施の形態4である画像復号化装置における画像の処理方法を示すフローチャートである。
まず符号化データ分割手段11によって、符号化データを元の画像データにおいてM×N(M、Nは自然数)分割された各ブロックの対応部分に分割する(ステップST41)。ここでは各ブロックが水平4画素、垂直4画素の16画素から成る場合について説明する。
分割されたブロック単位の符号化データから復号化処理を行っていないブロックを一つ選択する(ステップST42)。
Next, the operation will be described. FIG. 12 is a flowchart showing an image processing method in the image decoding apparatus according to the fourth embodiment of the present invention.
First, the encoded data dividing means 11 divides the encoded data into corresponding portions of each block obtained by dividing the original image data by M × N (M and N are natural numbers) (step ST41). Here, a case where each block is composed of 16 pixels of 4 horizontal pixels and 4 vertical pixels will be described.
One block that has not been decoded is selected from the divided block-unit encoded data (step ST42).

階調レベル算出手段12では、選択されたブロック単位の符号化データからブロック毎の画素基準レベルLAおよび画素値変動幅LDを参照し、この画素基準レベルLA、画素値変動幅LDの値に基づき量子化された符号に対応する画素の階調レベルQ1、Q2、Q3を算出する(ステップST43)。具体的な算出方法の一例を下記(式27)から(式29)に示す。
Q1=LA−LD/2 ・・・ (式27)
Q2=LA ・・・ (式28)
Q3=LA+LD/2 ・・・ (式29)
The gradation level calculation means 12 refers to the pixel reference level LA and the pixel value variation width LD for each block from the selected block-unit encoded data, and based on the values of the pixel reference level LA and the pixel value variation width LD. The gradation levels Q1, Q2, and Q3 of the pixel corresponding to the quantized code are calculated (step ST43). An example of a specific calculation method is shown in (Expression 27) to (Expression 29) below.
Q1 = LA-LD / 2 (Formula 27)
Q2 = LA (Formula 28)
Q3 = LA + LD / 2 (Formula 29)

上記算出方法は、量子化閾値を実施の形態1の(式5)および(式6)で算出した場合に対応したものである。この場合の符号化閾値分布および復号化時の信号レベル分布は図4に示した通りとなる。
選択されたブロック内で未処理となっている画素に対応する符号の一つを選択する(ステップST44)。
The calculation method corresponds to the case where the quantization threshold is calculated by (Equation 5) and (Equation 6) of the first embodiment. The encoding threshold distribution and the signal level distribution at the time of decoding in this case are as shown in FIG.
One of the codes corresponding to the unprocessed pixels in the selected block is selected (step ST44).

階調レベル割り当て手段13では、選択した画素が透過処理を行う画素かどうかを確認する(ステップST45)。参照する符号φijが透過処理を行う画素を示す特定の符号となっているかどうかで、透過処理を行うかどうかを選択する。ここでは実施の形態1における(式13)から(式16)の記載に合わせ、符号が00、01、10(2進数)の場合は透過処理を行わず、符号が11(2進数)の場合は透過処理を行うものとする。
ステップST45にて選択画素が透過処理を行う画素ではなかった場合、符号に対応した階調レベルを選択画素の階調レベルとして割り当てる(ステップST46)。選択画素の階調レベルをXijとし、実施の形態1の(式13)から(式15)に対応して階調割り当てを行う場合の割り当て方法の一例を下記(式30)から(式32)に示す。
The gradation level assigning means 13 confirms whether or not the selected pixel is a pixel to be subjected to transmission processing (step ST45). Whether or not to perform the transmission process is selected depending on whether or not the reference code φij to be referred to is a specific code indicating a pixel to be subjected to the transmission process. Here, in accordance with the description of (Equation 13) to (Equation 16) in the first embodiment, when the code is 00, 01, 10 (binary number), the transparent process is not performed, and the code is 11 (binary number). Shall be transparent.
If the selected pixel is not a pixel to be subjected to the transmission process in step ST45, the gradation level corresponding to the code is assigned as the gradation level of the selected pixel (step ST46). An example of an assignment method when assigning gradation levels corresponding to (Equation 13) to (Equation 15) of the first embodiment, where the gradation level of the selected pixel is Xij, is shown below (Equation 30) to (Equation 32). Shown in

φij=00(2進数)のとき Xij=Q1 ・・・ (式30)
φij=01(2進数)のとき Xij=Q2 ・・・ (式31)
φij=10(2進数)のとき Xij=Q3 ・・・ (式32)
When φij = 00 (binary number) Xij = Q1 (Equation 30)
When φij = 01 (binary number) Xij = Q2 (Equation 31)
When φij = 10 (binary number) Xij = Q3 (Expression 32)

ステップST45にて選択画素が透過処理を行う画素であった場合は、下地画像の対応する座標位置の階調レベルを選択画素の階調レベルとして割り当てる(ステップST47)。下地画像の階調レベルをYijとすると階調割り当て方法を示す式は下記(式33)の通りとなる。
φij=11(2進数)のとき Xij=Yij ・・・ (式33)
If the selected pixel is a pixel to be transmitted in step ST45, the gradation level at the corresponding coordinate position of the background image is assigned as the gradation level of the selected pixel (step ST47). Assuming that the gradation level of the background image is Yij, the expression indicating the gradation assignment method is as follows (Expression 33).
When φij = 11 (binary number) Xij = Yij (Expression 33)

選択されたブロックに未処理となっている画素対応の符号があるかどうか確認する(ステップST48)。未処理画素がある場合はステップST44からの動作を繰り返す。未処理画素がない場合はステップST49の処理に移る。
入力画像データに未処理となっているブロック単位の符号化データがあるかどうか確認する(ステップST49)。未処理ブロックがある場合はステップST42からの動作を繰り返す。未処理画素がない場合はステップST50の処理に移る。
画像データ作成手段14では、全てのブロックおよび全ての画素に関する復号化処理が完了した状態で、割り当てられた各画素の階調レベルをまとめ、復号化された画像データを生成する(ステップST50)。
It is confirmed whether or not there is a code corresponding to an unprocessed pixel in the selected block (step ST48). If there are unprocessed pixels, the operation from step ST44 is repeated. If there is no unprocessed pixel, the process proceeds to step ST49.
It is confirmed whether there is any unprocessed block-unit encoded data in the input image data (step ST49). If there is an unprocessed block, the operation from step ST42 is repeated. If there is no unprocessed pixel, the process proceeds to step ST50.
The image data creation unit 14 collects the gradation levels of the assigned pixels in a state where the decoding process for all the blocks and all the pixels is completed, and generates decoded image data (step ST50).

上記のように本実施の形態では、復号化を行う際に、透過処理を行う画素を示す個別の符号に対応し下地画像のデータを参照するため、画素単位での細かい透過処理をおこなった復号化画像データを作成することが可能である。   As described above, in the present embodiment, when performing decoding, decoding is performed by performing fine transparency processing in units of pixels in order to refer to background image data corresponding to individual codes indicating pixels to be subjected to transparency processing. It is possible to create converted image data.

実施の形態5.
透過処理を行う画素を示すフラグとして、量子化された符号の内の1階調ではなく1ビットを割り当てる符号化データに対応する場合の画像復号化処理装置の実施の形態について説明する。この場合の画像復号化装置を示す構成図は図11と同様であり、階調レベル算出手段12および階調レベル割り当て手段13で行う処理の内容が実施の形態4とは異なる。
Embodiment 5 FIG.
A description will be given of an embodiment of an image decoding processing apparatus in the case of corresponding to encoded data to which one bit is assigned instead of one gradation in a quantized code as a flag indicating a pixel to be subjected to transparent processing. The block diagram showing the image decoding apparatus in this case is the same as that in FIG. 11, and the contents of the processing performed by the gradation level calculation means 12 and the gradation level assignment means 13 are different from those in the fourth embodiment.

図13はこの発明の実施の形態5である画像復号化装置における画像の処理方法を示すフローチャートである。以下、本実施の形態の処理方法について、実施の形態4と異なる処理を主体に説明する。
階調レベル算出手段12では、選択されたブロック単位の符号化データからブロック毎の画素基準レベルLAおよび画素値変動幅LDを参照し、画素基準レベルLA、画素値変動幅LDの値に基づき量子化された符号に対応する画素の階調レベルQ1、Q2を算出する(ステップST43)。本実施の形態では実施の形態2の(式17)に対応するため、各画素に対して2種類の状態を示す符号が割り当てる場合について説明する。具体的な算出方法の一例を下記(式34)、(式35)に示す。
FIG. 13 is a flowchart showing an image processing method in the image decoding apparatus according to the fifth embodiment of the present invention. Hereinafter, the processing method of the present embodiment will be described mainly with respect to processing different from that of the fourth embodiment.
The gradation level calculation means 12 refers to the pixel reference level LA and the pixel value variation width LD for each block from the selected block-unit encoded data, and determines the quantum based on the values of the pixel reference level LA and the pixel value variation width LD. The gradation levels Q1 and Q2 of the pixel corresponding to the converted code are calculated (step ST43). In this embodiment, in order to correspond to (Equation 17) of Embodiment 2, a case where a code indicating two types of states is assigned to each pixel will be described. An example of a specific calculation method is shown in (Expression 34) and (Expression 35) below.

Q1=LA−LD/2 ・・・ (式34)
Q2=LA+LD/2 ・・・ (式35)
Q1 = LA-LD / 2 (Formula 34)
Q2 = LA + LD / 2 (Formula 35)

階調レベル割り当て手段13では、選択した画素が透過処理を行う画素かどうかを確認する(ステップST45)。参照する符号φijは2ビットのデータからなり、このうち下位1ビットが透過処理を行う画素を示すフラグとする。すなわち、符号が00、10(2進数)の場合は透過処理を行わず、符号が01、11(2進数)の場合は透過処理を行うものとする。   The gradation level assigning means 13 confirms whether or not the selected pixel is a pixel to be subjected to transmission processing (step ST45). The reference code φij is composed of 2-bit data, and the lower 1 bit among them is a flag indicating a pixel to be subjected to the transparent process. That is, when the code is 00 or 10 (binary number), the transparent process is not performed, and when the code is 01 or 11 (binary number), the transparent process is performed.

ステップST45にて選択画素が透過処理を行う画素ではなかった場合、符号に対応した階調レベルを選択画素の階調レベルとして割り当てる(ステップST46)。ここで階調レベルの割り当てに対応する符号はφijの上位1ビットとする。選択画素の階調レベルをXijとし、実施の形態2の(式18)および(式19)に対応して階調割り当てを行う場合の割り当て方法の一例を下記(式36)および(式37)に示す。   If the selected pixel is not a pixel to be subjected to the transmission process in step ST45, the gradation level corresponding to the code is assigned as the gradation level of the selected pixel (step ST46). Here, the code corresponding to the gradation level assignment is the upper 1 bit of φij. An example of an allocation method when the gradation level of the selected pixel is Xij and gradation allocation is performed in accordance with (Equation 18) and (Equation 19) of the second embodiment is shown below (Equation 36) and (Equation 37). Shown in

φij=00(2進数)のとき Xij=Q1 ・・・ (式36)
φij=10(2進数)のとき Xij=Q2 ・・・ (式37)
When φij = 00 (binary number) Xij = Q1 (Expression 36)
When φij = 10 (binary number) Xij = Q2 (Expression 37)

ステップST45にて選択画素が透過処理を行う画素であった場合、選択画素に割り当てられた階調レベルと下地画像の対応する座標位置の階調レベルとを加重平均して選択画素の階調レベルを算出する(ステップST47)。
まず選択画素に割り当てられた階調レベルQ1、Q2をステップST46と同様に下記(式38)、(式39)にて算出する。
φij=01(2進数)のとき X'ij=Q1 ・・・ (式38)
φij=11(2進数)のとき X'ij=Q2 ・・・ (式39)
また、下地画像の対応する座標位置の階調レベルを参照し、階調レベル値として記録する。
下地画像の階調レベルをYijとすると階調割り当て方法を示す式は下記(式40)の通りとなる。
X''ij=Yij ・・・ (式40)
If the selected pixel is a pixel to be subjected to transmission processing in step ST45, the gradation level of the selected pixel is obtained by weighted averaging the gradation level assigned to the selected pixel and the gradation level at the corresponding coordinate position of the background image. Is calculated (step ST47).
First, the gradation levels Q1 and Q2 assigned to the selected pixel are calculated by the following (Equation 38) and (Equation 39) as in Step ST46.
When φij = 01 (binary number) X′ij = Q1 (Equation 38)
When φij = 11 (binary number) X′ij = Q2 (Equation 39)
Further, the gradation level at the corresponding coordinate position of the background image is referred to and recorded as a gradation level value.
Assuming that the gradation level of the background image is Yij, the expression indicating the gradation assignment method is as follows (Expression 40).
X ″ ij = Yij (Formula 40)

二つの階調レベル値を加重平均し、選択画素の最終的な階調レベルを決定する。演算式は下記(式41)の通りとなる。
Xij=αX'ij+(1−α)X''ij ・・・ (式41)
ここでαは0≦α≦1を満たす係数であり、透過処理を行う部分に適用したい透過率に応じて、外部よりあらかじめ値を決定しておくものとする。
The two tone level values are weighted and averaged to determine the final tone level of the selected pixel. The calculation formula is as follows (Formula 41).
Xij = αX′ij + (1−α) X ″ ij (Formula 41)
Here, α is a coefficient satisfying 0 ≦ α ≦ 1, and it is assumed that the value is determined in advance from the outside in accordance with the transmittance to be applied to the portion to be subjected to the transmission processing.

上記のように本実施の形態では、復号化を行う際に、透過処理を行う画素に関して画素に割り当てられた符号に基づく階調レベルと、下地画像の参照に基づく階調レベルを求め、それらを加重平均して最終的な画素の階調レベルを算出する。このため、透過処理を指定された画素に対して、下地画像のデータのみが有効となる完全な透過処理だけではなく、透過処理された画像も薄く確認できるような半透過処理を実現することが可能である。   As described above, in the present embodiment, when performing decoding, the gradation level based on the code assigned to the pixel and the gradation level based on the reference of the background image are obtained for the pixel to be subjected to the transparency process, and these are calculated. The final pixel gradation level is calculated by weighted averaging. For this reason, it is possible to realize not only a complete transmission process in which only the background image data is valid, but also a translucent process in which the image subjected to the transmission process can be checked lightly for the pixels for which the transmission process is designated. Is possible.

実施の形態6.
ブロック毎にデータを透過する画素が含まれるかどうかを判定し、復号化処理方法の切り替えを行う場合の実施の形態について説明する。この場合の画像復号化装置を示す構成図は図11と同様であり、階調レベル算出手段12および階調レベル割り当て手段13で行う処理の内容が実施の形態4とは異なる。
図14はこの発明の実施の形態6による画像復号化装置における画像の処理方法を示すフローチャートである。以下、本実施の形態の処理方法について、実施の形態4と異なる処理を主体に説明する。
Embodiment 6 FIG.
An embodiment in the case where it is determined whether or not each block includes a pixel that transmits data and the decoding processing method is switched will be described. The block diagram showing the image decoding apparatus in this case is the same as that in FIG. 11, and the contents of the processing performed by the gradation level calculation means 12 and the gradation level assignment means 13 are different from those in the fourth embodiment.
FIG. 14 is a flowchart showing an image processing method in the image decoding apparatus according to Embodiment 6 of the present invention. Hereinafter, the processing method of the present embodiment will be described mainly with respect to processing different from that of the fourth embodiment.

階調レベル算出手段12では、まず選択されたブロック単位の符号化データから1ビットの透過対応ブロックフラグを参照し、ブロック内に透過処理を行う画素が含まれるかどうか確認する(ステップST51)。
ステップST51にて選択されたブロックに透過処理を行う画素が含まれる場合は、実施の形態4と同様に3種類の符号に対して階調レベルQ1、Q2、Q3を割り当てる。算出方法は実施の形態4における(式27)から(式29)と同様である(ステップST43)。ただし本実施の形態では実施の形態3における符号化データの復号化に対応するため、画素値変動幅LDの値についてはステップST51にてブロック内に透過処理を行う画素が含まれない場合、透過処理を行うための符号を考慮する必要がないため、階調レベルに対して割り当てられる符号は4種類となる。このため4つの符号に対応する階調レベルQ1、Q2、Q3、Q4の4つの値を算出する(ステップST52)。
The gradation level calculation means 12 first refers to a 1-bit transmission-compatible block flag from the selected block-unit encoded data, and checks whether or not a pixel to be subjected to transmission processing is included in the block (step ST51).
If the block selected in step ST51 includes a pixel to be transparently processed, gradation levels Q1, Q2, and Q3 are assigned to the three types of codes as in the fourth embodiment. The calculation method is the same as (Equation 27) to (Equation 29) in the fourth embodiment (step ST43). However, since the present embodiment corresponds to the decoding of the encoded data in the third embodiment, the pixel value variation width LD value is transmitted when the pixel to be subjected to the transmission processing is not included in the block in step ST51. Since there is no need to consider codes for processing, there are four types of codes assigned to gradation levels. For this reason, four values of gradation levels Q1, Q2, Q3, and Q4 corresponding to the four codes are calculated (step ST52).

下記に実施の形態3の(式20)から(式22)の符号化に対応する場合の演算式(式42)から(式45)の一例を示す。
Q1=LA−LD/2 ・・・ (式42)
Q2=LA−LD/8 ・・・ (式43)
Q2=LA+LD/8 ・・・ (式44)
Q3=LA+LD/2 ・・・ (式45)
また、ステップST51にてブロック内に透過処理を行う画素が含まれる場合、階調レベル割り当て手段4における処理は実施の形態4と同様となる。図14のフローチャートのステップST44からステップST48が図12のフローチャートのステップST44からステップST48に相当する。
An example of arithmetic expressions (Expression 42) to (Expression 45) in the case of corresponding to the encoding of (Expression 20) to (Expression 22) in the third embodiment is shown below.
Q1 = LA-LD / 2 (Formula 42)
Q2 = LA-LD / 8 (Formula 43)
Q2 = LA + LD / 8 (Formula 44)
Q3 = LA + LD / 2 (Formula 45)
In addition, when the pixel to be subjected to the transmission process is included in the block in step ST51, the process in the gradation level assigning unit 4 is the same as that in the fourth embodiment. Steps ST44 to ST48 in the flowchart of FIG. 14 correspond to steps ST44 to ST48 in the flowchart of FIG.

ステップST51にてブロック内に透過処理を行う画素が含まれない場合、階調レベル割り当て手段13における処理は、透過処理について考慮しない従来の復号化方式と同様となる。ステップST54では、ステップST52で求めた4つの符号に対応する階調レベルQ1、Q2、Q3、Q4から、符号に対応した階調レベルを選択画素の階調レベルとして割り当てる。選択画素の階調レベルをXijとし、実施の形態3の(式13)から(式15)に対応して階調割り当てを行う場合の割り当て方法の一例を下記(式46)から(式49)に示す。   When the pixel to be subjected to the transparent process is not included in the block in step ST51, the process in the gradation level assigning unit 13 is the same as the conventional decoding method that does not consider the transparent process. In step ST54, the gradation level corresponding to the code is assigned as the gradation level of the selected pixel from the gradation levels Q1, Q2, Q3, and Q4 corresponding to the four codes obtained in step ST52. An example of an assignment method when assigning gradations corresponding to (Equation 13) to (Equation 15) of the third embodiment, where the gradation level of the selected pixel is Xij, from (Equation 46) to (Equation 49) below. Shown in

φij=00(2進数)のとき Xij=Q1 ・・・ (式46)
φij=01(2進数)のとき Xij=Q2 ・・・ (式47)
φij=10(2進数)のとき Xij=Q3 ・・・ (式48)
φij=11(2進数)のとき Xij=Q4 ・・・ (式49)
入力画像データに未処理となっているブロック単位の符号化データがあるかどうか確認する(ステップST49)。未処理ブロックがある場合はステップST42からの動作を繰り返す。未処理画素がない場合はステップST50の処理に移る。
画像データ作成手段14では、全てのブロックおよび全ての画素に関する復号化処理が完了した状態で、割り当てられた各画素の階調レベルをまとめて復号化された画像データを生成する(ステップST50)。
When φij = 00 (binary number) Xij = Q1 (Equation 46)
When φij = 01 (binary number) Xij = Q2 (Formula 47)
When φij = 10 (binary number) Xij = Q3 (Formula 48)
When φij = 11 (binary number) Xij = Q4 (formula 49)
It is confirmed whether there is any unprocessed block-unit encoded data in the input image data (step ST49). If there is an unprocessed block, the operation from step ST42 is repeated. If there is no unprocessed pixel, the process proceeds to step ST50.
The image data creation means 14 generates image data that is decoded together with the gradation levels of the assigned pixels in a state where the decoding process for all blocks and all pixels is completed (step ST50).

上記のように本実施の形態では、ブロック毎に割り当てられているフラグにより、透過処理に対応するかどうかの判定を行い、透過処理が必要となるブロックのみ透過処理を行う画素に対応する復号化処理を実施するため、透過処理を行わないブロックについては割り当てられる符号の種別数の減少による画質の低下を防ぎつつ、必要な箇所のみ透過処理に対応することが可能となる。   As described above, in the present embodiment, it is determined whether or not to support transparency processing based on a flag assigned to each block, and decoding corresponding to pixels that perform transparency processing only for blocks that require transparency processing. Since the processing is performed, it is possible to cope with the transparent processing only in necessary portions while preventing the image quality from being deteriorated due to the decrease in the number of assigned code types for the blocks that are not subjected to the transparent processing.

実施の形態7.
上記実施の形態1から実施の形態6においては、透過処理を行う際の下地画像はあらかじめ準備されていることを前提としている。本実施の形態7では、下地画像についても透過処理を行う重ね合わせ用画像と同様に符号化および復号化を行う場合について説明する。この場合には符号化時に画素基準レベルを示す値LAに関して、8ビット値から値の最下位1ビットを削除した7ビット値として格納し、残る1ビットに該当画像が下地画像であるかどうかのフラグを割り当てる。
Embodiment 7 FIG.
In the first to sixth embodiments, it is assumed that the base image for performing the transparency process is prepared in advance. In the seventh embodiment, a case will be described in which the background image is encoded and decoded in the same manner as the overlay image for which the transparent process is performed. In this case, the value LA indicating the pixel reference level at the time of encoding is stored as a 7-bit value obtained by deleting the least significant 1 bit from the 8-bit value, and whether or not the corresponding image is a background image is stored in the remaining 1 bit. Assign a flag.

符号化処理は、下地画像のデータを図1に示す構成図のブロック分割手段と、信号レベル範囲算出手段と、符号化準備手段と、量子化閾値計算手段と、量子化手段と、符号化データ作成手段とを用いて実施の形態1における透過処理を行わない画素の場合と同様な処理で符号化データを作成する。
なお、重ね合わせ用画像と下地画像夫々の符号化データは、上述の如くその画素値基準レベル信号の1ビットを重ね合わせ用画像のデータか下地画像のデータかを判別するフラグに用いる。
図15は本実施の形態におけるブロック毎の符号化データの構成を示したものである。
The encoding process includes block division means, signal level range calculation means, encoding preparation means, quantization threshold value calculation means, quantization means, and encoded data in the block diagram shown in FIG. Using the creation means, the encoded data is created by the same processing as in the case of the pixels that are not subjected to the transparency processing in the first embodiment.
In addition, as described above, 1 bit of the pixel value reference level signal is used as a flag for determining whether the data for the superimposition image or the background image is the bit data of the pixel value reference level signal.
FIG. 15 shows a configuration of encoded data for each block in the present embodiment.

画像復号化装置の構成は図11に示すものと同様であり、復号化処理は、下地画像データがM×N(M、Nは自然数)のブロック毎に分割されて符号化され、ブロック内画素の基準レベル、画素値変動幅、各画素の符号が纏められた符号化データが、重ね合わせ用画像の符号化データに加えてに入力され、かつ、下地画像の符号化データと、上記重ね合わせ用画像の符号化データは、夫々の画素値基準レベル信号の1ビットは重ね合わせ用画像のデータか下地画像のデータかを判別するフラグに用いられている。
入力された符号化データは、上記のフラグ(画素基準レベルLAの最下位1ビットを該当画像が下地画像であるかどうかのフラグ)を参照し、符号化データが下地画像にあたるのか、透過処理を行う画像にあたるのかの判定を行う。入力された符号化データが下地画像であった場合には備えられたバッファ領域にデータを一旦格納し、透過処理を行う重ね合わせ用画像が入力された際バッファ領域に格納された下地画像のデータとの組み合わせにより復号化し、復号化された画像データの生成を行う。

The configuration of the image decoding apparatus is the same as that shown in FIG. 11, and in the decoding process, the background image data is divided and encoded for each M × N (M and N are natural numbers) blocks, and the pixels in the block are encoded. Encoded data in which the reference level, the pixel value fluctuation range, and the code of each pixel are collected is input in addition to the encoded data of the overlay image, and the encoded data of the background image and the above-described overlay In the encoded image data, one bit of each pixel value reference level signal is used as a flag for discriminating whether the data is an overlay image data or a background image data.
The input encoded data refers to the above-mentioned flag (the flag indicating whether the corresponding image is the background image using the least significant 1 bit of the pixel reference level LA), and whether the encoded data corresponds to the background image is subjected to a transparent process. It is determined whether it corresponds to the image to be performed. If the input encoded data is a background image, the data is temporarily stored in the buffer area provided, and the background image data stored in the buffer area when the overlay image for transparency processing is input And the decoded image data is generated.

上記のように本実施の形態では、符号化データのフラグにより画像データが下地画像か透過処理を行う重ね合わせ用画像かを判別することができるため、復号化を実施する際に別途下地画像のデータを読み込み、保持する方法を準備することなく、いずれの画像データも同一のデータ入力方法を用いて処理することが可能である。   As described above, according to the present embodiment, it is possible to determine whether the image data is a background image or a superimposition image to be subjected to transparency processing based on the encoded data flag. Any image data can be processed using the same data input method without preparing a method for reading and holding data.

この発明は画像の重ね合わせを行う画像処理の符号化・復号化に関する技術であり、車載機器、監視カメラ機器などの画像処理製品に搭載可能である。   The present invention is a technique related to encoding / decoding of image processing for superimposing images, and can be mounted on image processing products such as in-vehicle devices and surveillance camera devices.

この発明の実施の形態1である画像符号化装置を示す構成図である。It is a block diagram which shows the image coding apparatus which is Embodiment 1 of this invention. この発明の実施の形態1による画像符号化装置における画像の処理方法を示すフローチャートである。It is a flowchart which shows the image processing method in the image coding apparatus by Embodiment 1 of this invention. 各画素の階調レベルを4種類の符号に対応させる従来の符号化方式における信号レベル分布を示す図である。It is a figure which shows the signal level distribution in the conventional encoding system which matches the gradation level of each pixel with four types of codes. 階調レベルを3つの範囲に分割した場合の符号化閾値分布および復号化時の信号レベル分布を示す図である。It is a figure which shows the encoding threshold value distribution at the time of dividing | segmenting a gradation level into three ranges, and the signal level distribution at the time of decoding. 実施の形態1におけるブロック毎の符号化データ構成図である。FIG. 3 is an encoded data configuration diagram for each block in the first embodiment. この発明の実施の形態2による画像符号化装置における画像の処理方法を示すフローチャートである。It is a flowchart which shows the image processing method in the image coding apparatus by Embodiment 2 of this invention. 実施の形態2による階調レベルを2つの範囲に分割した場合の符号化閾値分布および復号化時の信号レベル分布を示す図である。It is a figure which shows the encoding threshold value distribution at the time of dividing | segmenting the gradation level by Embodiment 2 into two ranges, and the signal level distribution at the time of decoding. 実施の形態2におけるブロック毎の符号化データ構成図である。FIG. 10 is a block diagram of encoded data for each block in the second embodiment. 実施の形態3による画像符号化装置における画像の処理方法を示すフローチャートである。10 is a flowchart illustrating an image processing method in the image encoding device according to the third embodiment. 実施の形態3におけるブロック毎の符号化データの構成を示す図である。It is a figure which shows the structure of the encoding data for every block in Embodiment 3. FIG. 実施の形態4である画像復号化装置を示す構成図である。[Fig. 10] Fig. 10 is a configuration diagram illustrating an image decoding device according to a fourth embodiment. 実施の形態4による画像復号化装置における画像の処理方法を示すフローチャートである14 is a flowchart illustrating an image processing method in the image decoding apparatus according to the fourth embodiment. 実施の形態5である画像復号化装置における画像の処理方法を示すフローチャートである。16 is a flowchart illustrating an image processing method in the image decoding apparatus according to the fifth embodiment. 実施の形態6による画像復号化装置における画像の処理方法を示すフローチャートである。20 is a flowchart illustrating an image processing method in the image decoding apparatus according to the sixth embodiment. 実施の形態7におけるブロック毎の符号化データの構成を示す図である。FIG. 25 is a diagram showing a configuration of encoded data for each block in the seventh embodiment.

符号の説明Explanation of symbols

1;ブロック分割手段、2;信号レベル範囲算出手段、3;符号化準備手段、4;量子化閾値計算手段、5;量子化手段、6は;符号化データ作成手段、11;符号化データ分割手段、12;階調レベル算出手段、13;階調レベル割り当て手段、14;画像データ作成手段。   DESCRIPTION OF SYMBOLS 1; Block division means, 2; Signal level range calculation means, 3; Encoding preparation means, 4; Quantization threshold value calculation means, 5; Quantization means, 6: Encoded data preparation means, 11; Encoded data division Means 12; gradation level calculation means 13; gradation level assignment means 14; image data creation means.

Claims (4)

入力された重ね合わせ用画像の画像データをM×N(M、Nは自然数)のブロックに分割するブロック分割手段と、当該ブロックにおける画素値の最大値と最小値を算出する信号レベル範囲算出手段と、得られた画素値の最大値および最小値からブロックの画素の基準レベルおよびブロック内の画素値変動幅を算出する符号化準備手段と、同じく得られた画素値の最大値および最小値から変換する符号の種類数に対応して階調レベルを分割するための画素値の量子化閾値を計算する量子化閾値計算手段と、上記ブロック内の各画素の階調レベルが上記量子化閾値にて決定される複数の範囲のいずれの範囲に含まれるかにより、それぞれの範囲に対応する固有の符号に各画素の階調レベルを置き換え、複数画像を重ねて合成する場合には、透過して下地画像のデータを出力する画素については上記の符号と異なる種類の固有の符号を割り当てる量子化手段と、ブロック内画素の基準レベル、画素値変動幅、個々の画素に割り当てられた符号をまとめて符号化データとする符号化データ作成手段とを備えた装置であって、
上記符号化準備手段は、ブロックの画素の基準レベルおよびブロック内の画素値変動幅を算出して出力するとともにブロック内にデータを透過する画素が含まれるか否かの信号をブロック内の画素値変動幅の信号に含めて出力し、
上記量子化閾値計算手段は、ブロック内にデータを透過する画素が含まれる場合は、諧調レベルをn段階に分割するための閾値を、ブロック内にデータを透過する画素が含まれない場合は、階調レベルを(n+1)段階に分割する閾値をそれぞれ求め、
上記量子化手段は、ブロック内にデータを透過する画素が含まれる場合は、透過する画素を示す符号またはn段階の階調レベルのいずれかを示す符号を画素毎に割り当て、ブロック内にデータを透過する画素が含まれない場合は、(n+1)段階の階調レベルを示す符号を画素毎に割り当てことを特徴とする画像符号化装置。
Block dividing means for dividing the input image data of the overlay image into M × N (M and N are natural numbers) blocks, and signal level range calculating means for calculating the maximum and minimum pixel values in the block Encoding preparation means for calculating the reference level of the pixel of the block and the pixel value fluctuation range in the block from the maximum value and the minimum value of the obtained pixel value, and the maximum value and the minimum value of the pixel value obtained in the same manner Quantization threshold value calculation means for calculating a quantization threshold value of a pixel value for dividing the gradation level corresponding to the number of types of codes to be converted, and the gradation level of each pixel in the block as the quantization threshold value Depending on which of the plurality of ranges determined in accordance with each range, the gradation level of each pixel is replaced with a unique code corresponding to each range, and when a plurality of images are overlaid, transmission is performed. For the pixels that output the background image data, the quantization means for assigning a unique code of a different type from the above codes, the reference level of the pixels in the block, the pixel value fluctuation range, and the codes assigned to the individual pixels are summarized. An encoded data creating means for producing encoded data ,
The encoding preparation means calculates and outputs the reference level of the pixel of the block and the pixel value fluctuation range in the block, and outputs a signal indicating whether or not the block includes a pixel that transmits data in the block. Output included in the fluctuation range signal,
The quantization threshold value calculation means, when a pixel that transmits data is included in the block, a threshold value for dividing the gradation level into n stages, and when a pixel that transmits data is not included in the block, Each of the threshold values for dividing the gradation level into (n + 1) stages is obtained,
When the block includes pixels that transmit data, the quantization unit assigns a code indicating either a transparent pixel or a code indicating n gradation levels for each pixel, and assigns the data to the block. An image coding apparatus characterized by assigning a code indicating a gradation level of (n + 1) stages for each pixel when a transparent pixel is not included.
入力された下地画像のデータをM×N(M、Nは自然数)のブロックに分割するブロック分割手段と、当該ブロックにおける画素値の最大値と最小値を算出する信号レベル範囲算出手段と、得られた画素値の最大値および最小値からブロックの画素の基準レベルおよびブロック内の画素値変動幅を算出する符号化準備手段と、同じく得られた画素値の最大値および最小値から変換する符号の種類数に対応して階調レベルを分割するための画素値の量子化閾値を計算する量子化閾値計算手段と、上記ブロック内の各画素の階調レベルが上記量子化閾値にて決定される複数の範囲のいずれの範囲に含まれるかにより、それぞれの範囲に対応する固有の符号に各画素の階調レベルを置き換える量子化手段と、ブロック内画素の基準レベル、画素値変動幅、個々の画素に割り当てられた符号をまとめて符号化データとする符号化データ作成手段とを備えた装置であって、
上記画素値基準レベル信号の1ビットを下地画像のデータであることを示すフラグに用いられ、請求項1記載の画像符号化装置により符号化された重ね合わせ用画像に用いられる下地画像用の画像符号化装置。
Data M × N of the input background image (M, N is a natural number) blocks dividing means for dividing a block of a signal level range calculating means for calculating the maximum value and the minimum value of pixel values in the block, obtained Encoding preparation means for calculating the reference level of the pixel of the block and the fluctuation range of the pixel value in the block from the maximum value and the minimum value of the obtained pixel value, and a code for converting from the maximum value and the minimum value of the obtained pixel value Quantization threshold value calculation means for calculating a quantization threshold value of a pixel value for dividing the gradation level corresponding to the number of types, and the gradation level of each pixel in the block is determined by the quantization threshold value. by either included in any of the range of the plurality of ranges that, quantizing means for replacing the gray level of each pixel in the specific codes corresponding to the respective ranges, the reference level of the interblock-pixel pixel value variance Width, an apparatus and a coded data generating means to collectively code assigned to each pixel coded data,
Use Irare the flag indicating that the data of the lower ground image one bit of the pixel value reference level signal, a base image used in the encoded superimposed image by the image encoding apparatus according to claim 1, wherein picture picture encoding system.
重ね合わせ用画像の画像データがM×N(M、Nは自然数)のブロック毎に分割されて符号化され、ブロック内画素の基準レベル、画素値変動幅、複数画像を重ねて合成する場合の下地画像データが透過して出力された画素と複数画像を重ねない場合の画素に割り当てられた異なる種類の符号がまとめられた符号化データを入力して画像データを復号化する画像復号化装置であって、
各ブロックの画素基準レベル、画素値変動幅から、各画素の符号に対応する階調レベルを算出する階調レベル算出手段と、各画素の符号を階調レベルに置き換える階調レベル割り当て手段とを有し、
上記階調レベル算出手段は、各ブロックの画素基準レベル、画素値変動幅から、各画素の符号に対応する階調レベルを算出するとともに、ブロック符号化データ中の画素値変動値幅のデータに含まれるフラグにより該当ブロックがデータを透過する画素を含むかどうかを判定し、該当ブロックがデータを透過する画素を含む場合には、n種類の符号に対応する階調レベルの算出を行い、該当ブロックがデータを透過する画素を含まない場合には、(n+1)種類の符号に対応する階調レベルの算出を行い、
上記階調レベル割り当て手段は、該当ブロックがデータを透過する画素を含む場合には画素の符号が透過出力を示すものであった場合に、該当画素の階調レベルを下地となる別画像の該当画素階調レベルによって置き換えるとともに、それ以外の場合には階調レベル算出手段によって算出されたn種類の符号と階調レベルの対応に従って、各画素の符号を階調レベルに置き換え、該当ブロックがデータを透過する画素を含まない場合には階調レベル算出手段によって算出された(n+1)種類の符号と階調レベルの対応に従って、各画素の符号を階調レベルに置き換えることを特徴とする画像復号化装置。
The image data of the image for superimposition is divided and encoded for each M × N (M and N are natural numbers) blocks, and the reference level of the pixels in the block, the pixel value fluctuation range, and a plurality of images are superimposed and combined. An image decoding apparatus that inputs encoded data in which different types of codes assigned to pixels when a plurality of images are not overlapped with a pixel that is transmitted through and output the background image data and decodes the image data. There,
Gradation level calculation means for calculating the gradation level corresponding to the code of each pixel from the pixel reference level and pixel value fluctuation range of each block, and gradation level assignment means for replacing the code of each pixel with the gradation level Have
The gradation level calculation means calculates the gradation level corresponding to the code of each pixel from the pixel reference level and pixel value variation width of each block, and is included in the pixel value variation value width data in the block encoded data. It is determined whether the corresponding block includes a pixel that transmits data according to the flag, and if the corresponding block includes a pixel that transmits data, the gradation level corresponding to n types of codes is calculated and the corresponding block is calculated. Does not include pixels that transmit data, the gradation level corresponding to (n + 1) types of codes is calculated,
In the case where the block includes pixels that transmit data, if the code of the pixel indicates a transmission output, the gradation level assigning unit sets the gradation level of the pixel to the background of another image. In addition to replacing with the corresponding pixel gradation level , in other cases, the code of each pixel is replaced with the gradation level according to the correspondence between the n types of codes calculated by the gradation level calculating means and the gradation level, An image characterized by replacing the code of each pixel with a gradation level according to the correspondence between the (n + 1) types of codes calculated by the gradation level calculation means and the gradation level when the pixel that does not transmit data is included Decryption device.
重ね合わせ用画像の符号化データに加えて、下地画像データがM×N(M、Nは自然数)のブロック毎に分割されて符号化され、ブロック内画素の基準レベル、画素値変動幅、各画素の符号が纏められた符号化データがさらに入力され、この下地画像の符号化データの、画素値基準レベル信号の1ビットは下地画像のデータを判別するフラグに用いられ、
入力された符号化データが下地画像であった場合にはデータを備えられたバッファ領域に一旦格納し、透過処理を行う重ね合わせ用画像が入力された際バッファ領域に格納された下地画像のデータとの組み合わせにより復号化する請求項に記載の画像復号化装置。
In addition to the encoded data of the overlay image, the background image data is divided and encoded for each block of M × N (M and N are natural numbers), and the reference level of the pixels in the block, the pixel value variation width, coded data code pixels are together is further inputted, the encoded data of the background image, 1-bit pixel value reference level signal is used to flag to determine the data of the lower fabric image,
If the input encoded data is a background image, the data is temporarily stored in the buffer area provided with the data, and the background image data stored in the buffer area when the overlay image for transparent processing is input The image decoding apparatus according to claim 3 , wherein the decoding is performed by a combination with.
JP2007267917A 2007-10-15 2007-10-15 Image coding apparatus and image decoding apparatus Expired - Fee Related JP4964084B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007267917A JP4964084B2 (en) 2007-10-15 2007-10-15 Image coding apparatus and image decoding apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007267917A JP4964084B2 (en) 2007-10-15 2007-10-15 Image coding apparatus and image decoding apparatus

Publications (2)

Publication Number Publication Date
JP2009100096A JP2009100096A (en) 2009-05-07
JP4964084B2 true JP4964084B2 (en) 2012-06-27

Family

ID=40702711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007267917A Expired - Fee Related JP4964084B2 (en) 2007-10-15 2007-10-15 Image coding apparatus and image decoding apparatus

Country Status (1)

Country Link
JP (1) JP4964084B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1098721A (en) * 1994-12-28 1998-04-14 Toshiba Corp Encoding and decoding system for image information
JP2002320225A (en) * 2001-04-19 2002-10-31 Mitsubishi Electric Corp Image signal encoding apparatus and image signal transmission system
GB2417384B (en) * 2001-12-03 2006-05-03 Imagination Tech Ltd Method and apparatus for compressing data and decompressing compressed data
JP2005045452A (en) * 2003-07-25 2005-02-17 Konica Minolta Business Technologies Inc Apparatus and program for image processing, and image composing method
JP3786108B2 (en) * 2003-09-25 2006-06-14 コニカミノルタビジネステクノロジーズ株式会社 Image processing apparatus, image processing program, image processing method, and data structure for data conversion

Also Published As

Publication number Publication date
JP2009100096A (en) 2009-05-07

Similar Documents

Publication Publication Date Title
US8385639B2 (en) Compressive coding device and visual display control device
US7555647B2 (en) Encoding device, decoding device, encoding method, decoding method, and program therefor
ES2588154T3 (en) Automatic generation method of pixel prediction value generation procedures, image coding method, image decoding method, devices using these methods, programs for these methods and recording medium in which these programs are recorded
CN105580369A (en) Distribution of multi-format high dynamic range video using layered coding
US20060220984A1 (en) Image processing, compressing, decompressing, transmitting, sending and receiving devices and methods, programs thereof and displaying device
JPH1013829A (en) Picture encoder and picture decoder
CN112333451A (en) Intra-frame prediction method based on generation countermeasure network
JP5157796B2 (en) Lossless compression encoding apparatus and decoding apparatus for image data
US20110002553A1 (en) Compressive coding device and decoding device
JP4964084B2 (en) Image coding apparatus and image decoding apparatus
KR100537123B1 (en) Picture signal coding device, picture signal coding method, picture signal decoding device, picture signal decoding method, and recording medium
JPH04270564A (en) Serial picture data compression system having color information
JP2002190956A (en) Image encoding equipment and image decoding equipment
JPH04248771A (en) Information hiding method
JP3844030B2 (en) Image signal encoding apparatus, image signal encoding method, image signal decoding apparatus, and image signal decoding method
US6463179B1 (en) Image compression and decompression based on a flat pixel group level, group pixel coorindinate positions, and the number of pixels for the group
WO2000018133A1 (en) Encoding device and method, and decoding device and method
JP2008109478A (en) Image encoding device, method, program and storage medium
JP4590986B2 (en) Encoding device, decoding device, encoding method, decoding method, and program thereof
JPH04142879A (en) Picture coding and decoding system
JPH01112882A (en) Block dividing sequential reproducing coding system
JP5036626B2 (en) Image encoding apparatus and image decoding apparatus
JP4971880B2 (en) Image encoding apparatus, image decoding apparatus, and control method thereof
JP2006140968A (en) Image encoding apparatus and method, and computer program and computer readable storage medium
JPH04270563A (en) Data compression system in picture processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100827

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110927

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111124

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120327

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150406

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees