JP2007088565A - Apparatus and method for processing image - Google Patents
Apparatus and method for processing image Download PDFInfo
- Publication number
- JP2007088565A JP2007088565A JP2005271787A JP2005271787A JP2007088565A JP 2007088565 A JP2007088565 A JP 2007088565A JP 2005271787 A JP2005271787 A JP 2005271787A JP 2005271787 A JP2005271787 A JP 2005271787A JP 2007088565 A JP2007088565 A JP 2007088565A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- unit
- prediction
- image data
- embedded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、画像を符号化又は復号化する画像処理装置及び画像処理方法に関するものである。 The present invention relates to an image processing apparatus and an image processing method for encoding or decoding an image.
画像データの伝送又は蓄積を効率的に行う画像処理装置として、画質の劣化を低減するために、可逆符号器と非可逆符号器とを画像データに応じて切り替えて、画像データを符号化するものが知られている。この種の画像処理装置において、可逆モードと非可逆モードとを画素単位で切り替えて符号化することは公知である(特許文献1参照)。 As an image processing device that efficiently transmits or stores image data, the image data is encoded by switching between a lossless encoder and an irreversible encoder according to the image data in order to reduce image quality degradation. It has been known. In this type of image processing apparatus, it is known to perform encoding by switching between the reversible mode and the irreversible mode in units of pixels (see Patent Document 1).
しかしながら、上記従来例においては、処理速度を向上させるために、非可逆符号化にはDPCM符号化を採用し、可逆符号化には1画素のRGBを1つの色としてとらえた画素値の辞書を用いているので、圧縮率を上げることができないという問題があった。 However, in the above conventional example, in order to improve the processing speed, DPCM encoding is adopted for lossy encoding, and a pixel value dictionary that captures RGB of one pixel as one color for lossless encoding. Since it is used, there is a problem that the compression rate cannot be increased.
そこで、本発明は、画質の劣化を低減しつつ、高圧縮率で画像データを処理することができる画像処理装置及び画像処理方法を提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides an image processing apparatus and an image processing method capable of processing image data at a high compression rate while reducing deterioration in image quality.
上記目的を達成するため、本発明の第1の特徴とするところは、注目画素と周囲の画素との相関に基づいて、画像データを画素ごとに2値化する2値化手段と、画像データを可逆にエンベデッド符号化するエンベデッド符号化手段と、前記2値化手段が画像データを2値化した結果に基づいて、前記エンベデッド符号化手段がエンベデッド符号化する画像データの一部を切捨てるよう制御する制御手段とを有する画像処理装置にある。したがって、注目画素と周囲の画素との相関に基づいて、可逆又は非可逆に画像データをエンベデッド符号化することができるので、注目画素と周囲の画素との相関に基づく圧縮率で画質の劣化を低減しつつ画像データを圧縮することができる。 In order to achieve the above object, the first feature of the present invention is that binarization means for binarizing image data for each pixel based on the correlation between the pixel of interest and surrounding pixels, and image data Embedded coding means for reversibly embedding the image and a part of the image data to be embedded by the embedded coding means based on the result of the binarization means binarizing the image data. And an image processing apparatus having control means for controlling. Therefore, the image data can be reversibly or irreversibly embedded based on the correlation between the target pixel and the surrounding pixels, so that the image quality can be reduced with the compression rate based on the correlation between the target pixel and the surrounding pixels. The image data can be compressed while being reduced.
好適には、前記2値化手段は、画素値が同じ画素が注目画素の周囲にあるか否かに基づいて、画像データを2値化する。また、好適には、前記2値化手段は、注目画素に対して画素値を予測する1つ以上の予測手段と、該予測手段が予測した画素値の予測誤差を算出する予測誤差算出手段とを有し、前記予測誤差算出手段が算出する予測誤差の少なくとも1つが0であるか否かに基づいて、画像データを2値化する。例えば、CG(Computer Graphic)画像は、隣接画素が同一の画素値である場合が多いので、注目画素と周囲の画素との相関に基づく予測誤差が0になる場合が多い。したがって、2値化手段は、例えば自然画像及びスキャン画像などを構成する画素と、CG画像を構成する画素とを分類するデータを画素ごとに作成することができるので、画像データの種類に応じて、画質の劣化を低減しつつ、高圧縮率で画像データを処理することができる。また、CG画像は、非可逆符号化した場合よりも、可逆符号化した場合のほうが高圧縮率になる場合が多くある。 Preferably, the binarization unit binarizes the image data based on whether or not a pixel having the same pixel value exists around the pixel of interest. Preferably, the binarization means includes at least one prediction means for predicting a pixel value with respect to the target pixel, and a prediction error calculation means for calculating a prediction error of the pixel value predicted by the prediction means. The image data is binarized based on whether at least one of the prediction errors calculated by the prediction error calculation means is zero. For example, since CG (Computer Graphic) images often have the same pixel value in adjacent pixels, the prediction error based on the correlation between the pixel of interest and surrounding pixels is often zero. Therefore, the binarization unit can create, for each pixel, data that classifies pixels constituting a natural image, a scanned image, and the like, and pixels constituting a CG image, depending on the type of image data. The image data can be processed at a high compression rate while reducing the deterioration of the image quality. In addition, a CG image often has a higher compression rate when it is losslessly encoded than when it is lossyly encoded.
また、本発明の第2の特徴とするところは、注目画素に対して画素値をそれぞれ異なる予測方法で予測する複数の予測手段と、該予測手段が予測した画素値の予測誤差をそれぞれ算出する予測誤差算出手段と、この予測誤差算出手段が算出する予測誤差それぞれに基づいて、画像データを画素ごとに2値化する2値化手段と、前記予測誤差算出手段が算出する予測誤差が0になる画素値を予測した前記予測手段を特定する情報、又は注目画素の画素値のいずれかを画素ごとに可逆かつ分離可能にエンベデッド符号化するエンベデッド符号化手段と、前記2値化手段が画像データを2値化した結果に基づいて、前記エンベデッド符号化手段がエンベデッド符号化するデータの一部を切捨てるよう制御する制御手段とを有する画像処理装置にある。即ち、エンベデッド符号化手段は、予測誤差が0になる画素値を予測した予測手段を特定する情報を符号化する場合、注目画素の画素値を符号化する場合よりも情報量を少なくすることができるので、さらに圧縮率を向上させることができる。 The second feature of the present invention is that a plurality of prediction means for predicting pixel values with respect to the target pixel by different prediction methods, and prediction errors of pixel values predicted by the prediction means are calculated. Based on the prediction error calculation means, the prediction error calculated by the prediction error calculation means, the binarization means for binarizing the image data for each pixel, and the prediction error calculated by the prediction error calculation means is zero. Embedded image encoding means for reversibly and separably embedding any one of the information for specifying the prediction means that predicted the pixel value or the pixel value of the target pixel for each pixel, and the binarization means And an image processing apparatus having control means for controlling the embedded encoding means to discard a part of the data to be embedded based on the binarized result.In other words, the embedded encoding means may reduce the amount of information when encoding the information specifying the prediction means that predicted the pixel value for which the prediction error is 0, compared to when encoding the pixel value of the target pixel. Therefore, the compression rate can be further improved.
好適には、前記エンベデッド符号化手段は、前記予測手段それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位を、前記予測手段を特定する情報とする。 Preferably, the embedded coding means uses the unique number assigned to each of the prediction means or the rank based on the frequency of predicting the pixel value with a prediction error of 0 as information for specifying the prediction means. .
また、好適には、前記エンベデッド符号化手段は、JPEG2000に準拠した符号ストリームを生成することによってデータをエンベデッド符号化し、前記2値化手段は、注目画素と周囲の画素との相関に基づいてROIマスクを作成することによって画像データを2値化する。即ち、エンベデッド符号化手段がJPEG2000に準拠した符号ストリームを生成する場合、JPEG2000に準拠したROIを用いて画像データを画素ごとに2値化することができ、固有の2値化手段を設ける必要がない。 Preferably, the embedded encoding means embeds data by generating a code stream compliant with JPEG2000, and the binarizing means determines whether the ROI is based on the correlation between the pixel of interest and surrounding pixels. Image data is binarized by creating a mask. That is, when the embedded encoding means generates a code stream compliant with JPEG2000, image data can be binarized for each pixel using an ROI compliant with JPEG2000, and it is necessary to provide a unique binarization means. Absent.
また、好適には、前記エンベデッド符号化手段は、前記予測手段を特定する情報を注目画素の画素値のMSBよりも上位のビットにシフトさせて、JPEG2000に準拠した符号ストリームを生成する。したがって、注目画素の画素値と、予測手段を特定する情報とを容易に分離することが可能である。 Preferably, the embedded encoding unit shifts information for specifying the prediction unit to bits higher than the MSB of the pixel value of the pixel of interest to generate a code stream compliant with JPEG2000. Therefore, it is possible to easily separate the pixel value of the target pixel from the information for specifying the prediction means.
また、好適には、前記エンベデッド符号化手段は、前記予測手段を特定する情報を画素値とみなして、JPEG2000に準拠した符号ストリームを生成する。 Preferably, the embedded encoding unit generates information on the JPEG2000 in accordance with information specifying the prediction unit as a pixel value.
また、好適には、周囲の画素の画素値の平均値を取得する平均値取得手段をさらに有し、前記エンベデッド符号化手段は、前記予測手段それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位と、前記平均値取得手段が取得した平均値とを加算した値を画素値とみなして、JPEG2000に準拠した符号ストリームを生成する。 Preferably, the image processing apparatus further includes an average value acquisition unit that acquires an average value of pixel values of surrounding pixels, and the embedded encoding unit has a unique number assigned to each of the prediction units or a prediction error. A code stream compliant with JPEG2000 is generated by regarding the value obtained by adding the rank based on the frequency of predicting the pixel value to be 0 and the average value acquired by the average value acquisition unit as the pixel value.
また、好適には、前記平均値取得手段が取得した平均値を丸める平均値丸め手段をさらに有し、前記エンベデッド符号化手段は、前記予測手段それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位と、前記平均値丸め手段が丸めた平均値とを加算した値を画素値とみなして、JPEG2000に準拠した符号ストリームを生成する。 In addition, preferably, it further includes an average value rounding means for rounding the average value obtained by the average value obtaining means, and the embedded encoding means has a unique number assigned to each of the prediction means or a prediction error. A code stream compliant with JPEG2000 is generated by regarding a value obtained by adding the ranking based on the frequency of predicting a pixel value of 0 and the average value rounded by the average value rounding means as a pixel value.
また、好適には、前記制御手段は、前記2値化手段が2値化した結果が孤立している場合、孤立している画素に対する2値化した結果を反転させるよう制御する。 Preferably, when the binarized result of the binarizing means is isolated, the control means controls to invert the binarized result for the isolated pixel.
また、好適には、前記制御手段は、前記2値化手段が2値化した結果が2×2の画素ブロックを単位に孤立している場合、孤立している画素ブロックに対する2値化した結果を修正するよう制御する。即ち、さらに圧縮率を向上させることができる。 Preferably, when the binarization result obtained by the binarization unit is isolated in units of 2 × 2 pixel blocks, the control unit binarizes the isolated pixel block. Control to correct. That is, the compression rate can be further improved.
また、好適には、前記制御手段は、前記2値化手段が2値化した結果が同じである画素の周囲の画素に対し、2値化した結果を反転させるよう制御する。したがって、可逆に符号化されるべき画素の周囲の画素も可逆に符号化することができるので、可逆に符号化されるべき画素の周囲の画素の画質が劣化することを防止することができる。 Preferably, the control unit performs control so that the binarized result is inverted with respect to pixels around pixels having the same binarized result by the binarizing unit. Therefore, since the pixels around the pixel to be encoded reversibly can also be encoded reversibly, the image quality of the pixels around the pixel to be encoded reversibly can be prevented.
また、好適には、前記制御手段は、予測誤差が0になることを予測された画素値が可逆に符号化されるように、前記エンベデッド符号化手段を制御する。即ち、予測誤差に基づいて、可逆に符号化されるべき画素を確定することができる。 Preferably, the control unit controls the embedded encoding unit so that a pixel value predicted to have a prediction error of 0 is encoded reversibly. That is, it is possible to determine the pixel to be encoded reversibly based on the prediction error.
また、本発明の第3の特徴とするところは、予測誤差に基づく情報又は画素値を画素ごとにエンベデッド符号化された符号ストリームを復号化するエンベデッド復号化手段と、このエンベデッド復号化手段が復号化した復号化データを予測誤差に基づく情報と画素値とに分類する分類手段と、この分類手段の分類結果に基づいて、前記エンベデッド復号化手段が復号化した復号化データから画像データを再生する画像データ再生手段とを有する画像処理装置にある。したがって、エンベデッド符号化された符号ストリームに予測誤差に基づく情報又は画素値が画素ごとに混在していても、画像データを再生することができ、画質の劣化を低減しつつ、高圧縮率で画像データを処理することができる。 The third feature of the present invention is that an embedded decoding means for decoding a code stream in which information or pixel values based on a prediction error is embedded for each pixel, and the embedded decoding means Classification means for classifying the decoded data into information and pixel values based on prediction errors, and based on the classification result of the classification means, image data is reproduced from the decoded data decoded by the embedded decoding means An image processing apparatus having image data reproducing means. Therefore, even if information or pixel values based on prediction errors are mixed for each pixel in a code stream that has been encoded, image data can be reproduced, and image quality can be reduced at a high compression rate while reducing image quality degradation. Data can be processed.
好適には、前記エンベデッド復号化手段は、JPEG2000に準拠しており、前記分類手段は、符号ストリームに含まれるROIの符号化情報に応じて、復号化データを予測誤差に基づく情報と画素値とに分類する。即ち、JPEG2000に準拠してROI復号化部を有する復号器によって、復号化データを予測誤差に基づく情報と画素値とに分類することができる。 Preferably, the embedded decoding means conforms to JPEG2000, and the classification means converts the decoded data into information based on a prediction error and a pixel value in accordance with ROI encoded information included in the code stream. Classify into: That is, the decoded data can be classified into information based on the prediction error and the pixel value by a decoder having an ROI decoding unit based on JPEG2000.
また、本発明の第4の特徴とするところは、注目画素と周囲の画素との相関に基づいて、画像データを画素ごとに2値化し、画像データを可逆にエンベデッド符号化しつつ、画像データを2値化した結果に基づいて画像データの一部を切捨てる画像処理方法にある。 The fourth feature of the present invention is that the image data is binarized for each pixel based on the correlation between the pixel of interest and surrounding pixels, and the image data is reversibly embedded and encoded. There is an image processing method in which a part of image data is discarded based on a binarized result.
本発明によれば、画質の劣化を低減しつつ、高圧縮率で画像データを処理することができる。 According to the present invention, it is possible to process image data at a high compression rate while reducing deterioration in image quality.
次に本発明の実施形態を図面に基づいて説明する。
図1において、本発明の実施形態に係る画像処理装置1の概要が示されている。画像処理装置1は、表示装置及びキーボードなどを含むユーザインタフェース装置(UI装置)10、HDD・CD装置などの記憶装置12、印刷装置14、通信装置16及び制御装置2などから構成される。制御装置2は、CPU20及びメモリ22などを含み、画像処理装置1を構成する各部を制御する。
つまり、画像処理装置1は、コンピュータとしての機能を含み、例えばUI装置10を介して入力された画像の符号化条件に応じて、記憶媒体120又は通信装置16を介して受け入れた画像データを処理し、UI装置10の表示装置、又は印刷装置14に画像を出力することができるようにされている。
Next, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 shows an outline of an image processing apparatus 1 according to an embodiment of the present invention. The image processing apparatus 1 includes a user interface device (UI device) 10 including a display device and a keyboard, a
In other words, the image processing apparatus 1 includes a function as a computer, and processes image data received via the
図2は、制御装置2内に含まれ、画像データを符号化(圧縮)及び復号化(伸張)する符号処理部24の構成を示すブロック図である。
図2に示すように、符号処理部24は、符号器26及び復号器28を有する。符号器26は、例えば画像データを受け入れて符号化し、符号ストリームとして復号器28に対して出力する。復号器28は、例えばJPEG2000に準拠しており、符号器26が出力した符号ストリームを取得して復号化し、再生画像データを出力する。また、符号器26は符号ストリームをメモリ22(又は記憶装置12)などに対して出力し、復号器28は符号ストリームをメモリ22(又は記憶装置12)などから取得するようにしてもよい。
また、符号処理部24は、例えば符号器26及び復号器28がCPU20により実行されるソフトウェア(プログラム)からなる構成であってもよい。
FIG. 2 is a block diagram illustrating a configuration of the code processing unit 24 included in the
As shown in FIG. 2, the code processing unit 24 includes an
The code processing unit 24 may be configured by software (program) executed by the
次に、符号器26の詳細について説明する。
図3は、符号器26の構成を示すブロック図である。図3に示すように、符号器26は、可逆画素選択部260、ROI(Region of interest)情報作成部262、制御部264及びJPEG2000符号化部266から構成される。
Next, details of the
FIG. 3 is a block diagram showing a configuration of the
可逆画素選択部260は、第1予測部270−1、第2予測部270−2、予測誤差算出部272及び判定部274から構成される。第1予測部270−1及び第2予測部270−2は、画像データを受け入れて互いに異なる予測方法で画素ごとに画素値を予測し、それぞれ予測した画素値を予測誤差算出部272に対して出力する。第1予測部270−1及び第2予測部270−2が画素値を予測する方法は、例えば前値予測、行列予測、平均予測及び平面予測などのいずれかである。
The reversible
予測誤差算出部272は、第1予測部270−1が予測した画素値、第2予測部270−2が予測した画素値及び画像データを画素ごとに受け入れ、第1予測部270−1が予測した画素値と実際の画素値との差分(予測誤差)と、第2予測部270−2が予測した画素値と実際の画素値との差分(予測誤差)とを算出し、判定部274に対してそれぞれ出力する。
The prediction
判定部274は、予測誤差算出部272から第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、例えば予測誤差それぞれが0であるか否かに応じて、画素値を予測された画素が例えばCG画像を構成する画素であるか否かを判定し、判定結果をROI情報作成部262に対して出力する。
例えば、判定部274は、第1予測部270−1及び第2予測部270−2の少なくともいずれかの予測誤差が0である場合、画素値を予測された画素がCG画像を構成する画素であると判定し、1を出力する。また、判定部274は、第1予測部270−1及び第2予測部270−2いずれの予測誤差も0でない場合、画素値を予測された画素がCG画像を構成する画素でないと判定し、0を出力する。
The
For example, in the case where the prediction error of at least one of the first prediction unit 270-1 and the second prediction unit 270-2 is 0, the
ROI情報作成部262は、判定部274から入力される判定結果に応じて、CG画像を構成する画素がROIに属するようにJPEG2000符号化部266がROIマスクを作成できるようにROI情報を作成し、制御部264及びJPEG2000符号化部266に対して出力する。なお、ROI情報作成部262は、ROIマスクを作成して制御部264及びJPEG2000符号化部266に対して出力するものであってもよい。
The ROI
制御部264は、ROI情報作成部262から入力されるROI情報に応じて、JPEG2000符号化部266を制御する。
The
JPEG2000符号化部266は、整数型の5/3可逆フィルタを有し、ROI情報を取得した制御部264の制御に応じて、ROI情報作成部262から入力されるROI情報を反映させたROIマスクを作成し、JPEG2000に準拠した復号器で復号できるように、入力された画像データからROIを有する符号ストリームを生成して出力する。
例えば、JPEG2000符号化部266は、制御部264の制御に応じて、ROIに属する画素を5/3可逆フィルタなどにより可逆に符号化し、ROIに属しない画素を5/3可逆フィルタなどにより可逆に符号化する途中で符号化を打ち切って符号ストリームを生成する。つまり、JPEG2000符号化部266は、ROIに属する画素(CG画像を構成する画素)を可逆に符号化し、ROIに属しない画素(CG画像を構成しない画素)を非可逆に符号化するように、画像データの一部を切り捨てる。
また、JPEG2000符号化部266は、ROI情報に応じて、可逆符号化と非可逆符号化とを画素ごとに切り替えて符号化するものであってもよい。
The
For example, under the control of the
Also, the
次に、符号器26が画像データを符号化する処理について説明する。
図4は、符号器26が画像データを符号化する処理(S10)を例示するフローチャートである。
図4に示すように、ステップ100(S100)において、第1予測部270−1及び第2予測部270−2は、画像データを受け入れて互いに異なる予測方法で画素ごとに画素値を予測する。
Next, a process in which the
FIG. 4 is a flowchart illustrating a process (S10) in which the
As shown in FIG. 4, in step 100 (S100), the first prediction unit 270-1 and the second prediction unit 270-2 accept image data and predict pixel values for each pixel using different prediction methods.
ステップ102(S102)において、予測誤差算出部272は、第1予測部270−1及び第2予測部270−2それぞれの予測誤差を算出する。
In step 102 (S102), the prediction
ステップ104(S104)において、判定部274は、第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、予測誤差それぞれが0であるか否かに応じて、画素値を予測された画素がCG画像を構成する画素であるか否かを判定する。
In step 104 (S104), the
ステップ106(S106)において、ROI情報作成部262は、判定部274から入力される判定結果に応じて、CG画像を構成する画素がROIに属するようにJPEG2000符号化部266がROIマスクを作成できるようにROI情報を作成する。
In step 106 (S106), the ROI
ステップ108(S108)において、JPEG2000符号化部266は、ROI情報作成部262から入力されるROI情報を反映させたROIマスクを作成し、JPEG2000に準拠した復号器で復号できるように、入力された画像データからROIを有する符号ストリームを生成して出力する。
In step 108 (S108), the
このように、符号器26がROIに属する画素を可逆に符号化し、ROIに属しない画素を非可逆に符号化した符号ストリームを生成するので、JPEG2000に準拠した復号器28(図2)は、劣化なく符号化されているROIに属する画素と、高圧縮率で符号化されているROIに属しない画素とを復号化することができる。
Thus, since the
次に、符号器26の変形例(符号器26a)について説明する。
図5は、符号器26aの構成を示すブロック図である。図5に示すように、符号器26aは、可逆画素選択部260a、ROI情報作成部262、制御部264a、特定情報生成部276、特定情報符号化部277、データ加工部278及びJPEG2000符号化部266から構成される。
なお、符号器26aにおいて、図3に示した符号器26を構成する部分と実質的に同一のものには、同一の符号が付してある。
Next, a modification of the encoder 26 (encoder 26a) will be described.
FIG. 5 is a block diagram showing a configuration of the encoder 26a. As shown in FIG. 5, the encoder 26a includes a reversible
In the encoder 26a, components that are substantially the same as the parts constituting the
可逆画素選択部260aは、第1予測部270−1、第2予測部270−2、予測誤差算出部272a及び判定部274から構成される。予測誤差算出部272aは、第1予測部270−1が予測した画素値、第2予測部270−2が予測した画素値及び画像データを画素ごとに受け入れ、第1予測部270−1が予測した画素値と実際の画素値との差分(予測誤差)と、第2予測部270−2が予測した画素値と実際の画素値との差分(予測誤差)とを算出し、特定情報生成部276及び判定部274に対してそれぞれ出力する。
The reversible
制御部264aは、ROI情報作成部262から入力されるROI情報に応じて、特定情報生成部276、特定情報符号化部277、データ加工部278及びJPEG2000符号化部266を制御する。
The
特定情報生成部276は、予測誤差算出部272aから第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、例えば予測誤差が0である第1予測部270−1及び第2予測部270−2又はこれらのいずれかを特定する情報(特定情報)を生成し、特定情報符号化部277に対して出力する。
例えば、特定情報生成部276は、第1予測部270−1及び第2予測部270−2又はこれらのいずれかを特定するための情報を、例えば第1予測部270−1及び第2予測部270−2それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位とし、特定情報符号化部277に対して出力する。
The specific
For example, the specific
特定情報符号化部277は、特定情報生成部276から入力される特定情報を符号化し、データ加工部278に対して符号を出力する。
The specific
データ加工部278は、ROI情報を取得した制御部264aの制御に応じて、入力される画像データ、又は特定情報符号化部277から入力される符号を画素ごとに配置したデータを生成し、JPEG2000符号化部266に対して出力する。例えば、データ加工部278は、画像データ及び特定情報符号化部277が出力する符号を受け入れ、CG画像を構成すると判定される画素(可逆符号化すべき画素)に対する画素値とみなした符号と、CG画像を構成しないと判定される画素(非可逆符号化する画素)に対する画素値とがROI情報に応じて混在するように、制御部264aの制御に応じてデータ(符号化対象データ)を加工する。
The
また、データ加工部278は、例えば画素値を示すビット幅がMビットの画像データを受け入れて、CG画像を構成しないと判定される画素に対しては画素値を出力し、CG画像を構成すると判定される画素に対しては画素値とみなした符号をMSB側にM+Gビットシフトさせて出力するものであってもよい。ここで、Gは、画素値のオーバーフローを防止するためのガードビット数であり、例えば1又は2などの値をとる。
このように、画素値とみなした符号をM+Gビットシフトさせることにより、復号化する場合に、画素値とみなした符号と画素値とを容易に分類することが可能になる。
For example, the
Thus, by shifting the code regarded as the pixel value by M + G bits, it is possible to easily classify the code and the pixel value regarded as the pixel value when decoding.
また、データ加工部278は、画素値とみなした符号に対し、画素値の中心値(M=8であれば128)を加算するようにされてもよい。ただし、画素値とみなした符号のビット幅は、M−1未満であるとする。また、画素値とみなした符号は、0を中心とする正負の値をとるようにする。
In addition, the
また、データ加工部278は、画素値とみなした符号に対して、画像データの平均値、又は注目画素の周囲画素の画素値の平均値を丸めた値を加算し、非可逆符号化が行われても値が変化しないようにされてもよい。ただし、丸めた値を加算する場合、画像データのビット幅よりも加算結果のビット幅が大きくならないようにする。例えば、画素値とみなした符号のビット幅よりも大きな値で画素値の平均値を丸めるようにする。また、画素値とみなした符号は、0を中心とする正負の値をとるようにする。
Further, the
次に、符号器26aが画像データを符号化する処理について説明する。
図6は、符号器26aが画像データを符号化する処理(S20)を例示するフローチャートである。
図6に示すように、ステップ200(S200)において、第1予測部270−1及び第2予測部270−2は、画像データを受け入れて互いに異なる予測方法で画素ごとに画素値を予測する。
Next, a process in which the encoder 26a encodes image data will be described.
FIG. 6 is a flowchart illustrating a process (S20) in which the encoder 26a encodes image data.
As shown in FIG. 6, in step 200 (S200), the first prediction unit 270-1 and the second prediction unit 270-2 accept image data and predict pixel values for each pixel using different prediction methods.
ステップ202(S202)において、予測誤差算出部272aは、第1予測部270−1及び第2予測部270−2それぞれの予測誤差を算出する。
In step 202 (S202), the prediction
ステップ204(S204)において、判定部274は、第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、予測誤差それぞれが0であるか否かに応じて、画素値を予測された画素がCG画像を構成する画素であるか否かを判定する。
In step 204 (S204), the
ステップ206(S206)において、ROI情報作成部262は、判定部274から入力される判定結果に応じて、CG画像を構成する画素がROIに属するようにJPEG2000符号化部266がROIマスクを作成できるようにROI情報を作成する。
In step 206 (S206), the ROI
ステップ208(S208)において、特定情報生成部276は、予測誤差算出部272aから第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、予測誤差が0である第1予測部270−1及び第2予測部270−2又はこれらのいずれかを特定する情報(特定情報)を生成する。
In step 208 (S208), the specific
ステップ210(S210)において、特定情報符号化部277は、特定情報生成部276から入力される特定情報を符号化する。
In step 210 (S210), the specific
ステップ212(S212)において、データ加工部278は、画像データ及び特定情報符号化部277が出力する符号を受け入れ、画素値とみなした符号と画像データに含まれる画素値とが混在するように、制御部264aの制御に応じてデータ(符号化対象データ)を加工する。
In step 212 (S212), the
ステップ214(S214)において、JPEG2000符号化部266は、ROI情報作成部262から入力されるROI情報を反映させたROIマスクを作成し、JPEG2000に準拠した復号器で復号できるように、データ加工部278から入力されたデータからROIを有する符号ストリームを生成して出力する。
In step 214 (S214), the
次に、符号器26aが生成した符号ストリームを復号化して再生画像データを生成することができる復号器28aについて説明する。
復号器28aは、復号器28の変形例であり、例えば符号処理部24に符号器26aと共に含まれる。
Next, a decoder 28a capable of decoding the code stream generated by the encoder 26a and generating reproduced image data will be described.
The decoder 28a is a modification of the
図7は、復号器28aの構成を示すブロック図である。図7に示すように、復号器28aは、JPEG2000復号化部280、データ分類部282、特定情報復号化部284、選択部286、第1予測部270−1、第2予測部270−2及び画像データ組立部288から構成される。
なお、復号器28aにおいて、図5に示した符号器26aを構成する部分と実質的に同一のものには、同一の符号が付してある。
FIG. 7 is a block diagram showing the configuration of the decoder 28a. As shown in FIG. 7, the decoder 28a includes a
It should be noted that in the decoder 28a, the same reference numerals are given to substantially the same parts as those constituting the encoder 26a shown in FIG.
JPEG2000復号化部280は、符号器26aが生成した符号ストリームをJPEG2000に準拠して復号化することができるようにされており、符合ストリームを受け入れると、符号ストリームを復号化した復号データとROI情報(又はROIマスク)とをデータ分類部282に対して出力する。
なお、上述した画素値とみなした符号をM+Gビットシフトしたものを符号ストリームが含む場合には、JPEG2000復号化部280は、ROI情報(又はROIマスク)を出力しないようにされている。
The JPEG 2000
Note that when the code stream includes an M + G-bit shifted code that is regarded as the pixel value described above, the
データ分類部282は、JPEG2000復号化部280から符号ストリームを復号化した復号データとROI情報(又はROIマスク)とを受け入れ、復号データを画素ごとに画素値とみなした符号又は画素値(画素値とみなした符号を含まない)のいずれかに分類し、画素値とみなした符号を特定情報復号化部284に対して出力し、画素値を第1予測部270−1、第2予測部270−2及び画像データ組立部288に対して出力する。つまり、データ分類部282は、画素値とみなした符号と画素値とを分類して出力する。
The
なお、上述した画素値とみなした符号をM+Gビットシフトしたものを復号データが含む場合には、データ分類部282は、0からM+Gまでのビットプレーン番号を設定し、復号データを画素ごとに分類して出力する。データ分類部282は、画素値とみなした符号又は画素値の最上位ビット番号がM+G以上である場合、M+GビットLSB側にシフトさせることにより、画素値とみなした符号を確定し、特定情報復号化部284に対して出力する。また、データ分類部282は、画素値とみなした符号又は画素値の最上位ビット番号がM以上M+G未満である場合は値を最大値(M=8であれば255)に変更し、その他の場合は値を変更することなく画素値として第1予測部270−1、第2予測部270−2及び画像データ組立部288に対して出力する。
If the decoded data includes a code obtained by shifting the code regarded as the pixel value described above by M + G bits, the
特定情報復号化部284は、データ分類部282から入力される符号を復号化して上述した特定情報を再生し、選択部286に対して出力する。
The specific
選択部286は、第1予測部270−1及び第2予測部270−2が予測した画素値を画素ごとにそれぞれ受け入れ、特定情報復号化部284から入力される特定情報に応じて、第1予測部270−1及び第2予測部270−2又はこれらのいずれかが予測した画素値を画素ごとに選択し、画像データ組立部288に対して出力する。
The
画像データ組立部288は、データ分類部282から入力される画素値と、選択部286から入力される画素値とを画素ごとに復号データ順に組立てることにより再生画像データを生成して出力する。
The image
次に、復号器28aが再生画像データを生成する処理について説明する。
図8は、復号器28aが再生画像データを生成する処理(S30)を例示するフローチャートである。
図8に示すように、ステップ300(S300)において、JPEG2000復号化部280は、符合ストリームを受け入れると、符号ストリームを復号化した復号データとROI情報(又はROIマスク)とをデータ分類部282に対して出力する。
Next, a process in which the decoder 28a generates reproduced image data will be described.
FIG. 8 is a flowchart illustrating a process (S30) in which the decoder 28a generates reproduced image data.
As shown in FIG. 8, in step 300 (S300), when the
ステップ302(S302)において、データ分類部282は、復号データを画素ごとに画素値とみなした符号又は画素値(画素値とみなした符号を含まない)のいずれかに分類し、画素値とみなした符号を特定情報復号化部284に対して出力し、画素値を第1予測部270−1、第2予測部270−2及び画像データ組立部288に対して出力する。
In step 302 (S302), the
ステップ304(S304)において、特定情報復号化部284は、データ分類部282から入力される符号を復号化して上述した特定情報を再生し、選択部286に対して出力する。
In step 304 (S304), the specific
ステップ306(S306)において、第1予測部270−1及び第2予測部270−2は、それぞれ画素値を画素ごとに予測し、選択部286に対して出力する。
In step 306 (S306), the first prediction unit 270-1 and the second prediction unit 270-2 each predict a pixel value for each pixel and output the pixel value to the
ステップ308(S308)において、選択部286は、特定情報復号化部284から入力される特定情報に応じて、第1予測部270−1及び第2予測部270−2又はこれらのいずれかが予測した画素値を画素ごとに選択し、画像データ組立部288に対して出力する。
In step 308 (S308), the
ステップ310(S310)において、画像データ組立部288は、データ分類部282から入力される画素値と、選択部286から入力される画素値とを画素ごとに復号データ順に組立てることにより再生画像データを生成して出力する。
In step 310 (S310), the image
なお、上記実施形態においては、第1予測部270−1及び第2予測部270−2それぞれの予測誤差が0であるか否かに応じて、画素値の可逆符号化又は非可逆符号化を判定する場合を例に説明したが、これに限定されることなく、注目画素の周囲(4連結又は8連結など)の画素の画素値に応じて画素値の可逆符号化又は非可逆符号化を判定するようにしてもよい。 In the above embodiment, lossless encoding or lossy encoding of pixel values is performed depending on whether the prediction errors of the first prediction unit 270-1 and the second prediction unit 270-2 are 0 or not. The case of determination has been described as an example, but the present invention is not limited to this, and lossless encoding or lossy encoding of pixel values is performed according to the pixel values of pixels around the pixel of interest (such as 4-connected or 8-connected). You may make it determine.
また、注目画素が画素値の異なる画素で囲まれて孤立している場合、注目画素に対する判定を判定させることにより、孤立した画素を消去(画素値の変更)するようにしてもよい。
また、画素値をシフトさせることによって可逆符号化すべき画素の周囲の非可逆符号化される画素の画質が劣化することを防止するために、可逆符号化すべき画素を特定するためのROIマスクを生成する場合に、可逆符号化すべき画素の周囲の画素もROIに属するようにしてもよい。
In addition, when the target pixel is isolated by being surrounded by pixels having different pixel values, the isolated pixel may be erased (change of the pixel value) by determining the target pixel.
In addition, in order to prevent deterioration in image quality of pixels that are irreversibly encoded around the pixel that is to be losslessly encoded by shifting the pixel value, an ROI mask for specifying the pixel that is to be losslessly encoded is generated. In this case, pixels around the pixel to be losslessly encoded may belong to the ROI.
また、図9(A)〜(C)に示した画素値の相関関係に応じて、注目画素が孤立していると判定するようにしてもよい。例えば4つ(2×2)の画素からなる画素ブロック30が非可逆符号化する画素3aに囲まれている場合、画素ブロック30内に配置される可逆符号化すべき画素3又は非可逆符号化する画素3aの配置パターンに応じて、注目画素が孤立しているか否かを画素ブロック30ごとに判定するようにしてもよい。例えば画素ブロック30内に可逆符号化すべき画素3がどのように配置されても、画素ブロック30内の可逆符号化すべき画素3が孤立していると判定するようにしてもよい。
また、3つ以下の可逆符号化すべき画素3が画素ブロック30内に含まれる場合に、画素ブロック30内の可逆符号化すべき画素3が孤立していると判定するようにしてもよい。また、画素ブロック30内に可逆符号化すべき画素3が1つ含まれる場合に、可逆符号化すべき画素3が孤立していると判定するようにしてもよい。
また、図9(B)又は図9(C)に示したように、画素ブロック30内で対角に可逆符号化すべき画素3が2つ配置された場合に、可逆符号化すべき画素3が孤立していると判定するようにしてもよい。
Further, it may be determined that the target pixel is isolated according to the correlation between the pixel values shown in FIGS. For example, when a
Further, when the
Further, as shown in FIG. 9B or 9C, when two
1・・・画像処理装置
2・・・制御装置
20・・・CPU
22・・・メモリ
24・・・符号処理部
26,26a・・・符号器
260,260a・・・可逆画素選択部
262・・・ROI情報作成部
264,264a・・・制御部
266・・・JPEG2000符号化部
270−1・・・第1予測部
270−2・・・第2予測部
272,272a・・・予測誤差算出部
274・・・判定部
276・・・特定情報生成部
277・・・特定情報符号化部
278・・・データ加工部
28,28a・・・復号器
280・・・JPEG2000復号化部
282・・・データ分類部
284・・・特定情報復号化部
286・・・選択部
288・・・画像データ組立部
3・・・可逆符号化すべき画素
3a・・・非可逆符号化する画素
30・・・画素ブロック
DESCRIPTION OF SYMBOLS 1 ...
DESCRIPTION OF
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005271787A JP2007088565A (en) | 2005-09-20 | 2005-09-20 | Apparatus and method for processing image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005271787A JP2007088565A (en) | 2005-09-20 | 2005-09-20 | Apparatus and method for processing image |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007088565A true JP2007088565A (en) | 2007-04-05 |
Family
ID=37975143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005271787A Pending JP2007088565A (en) | 2005-09-20 | 2005-09-20 | Apparatus and method for processing image |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007088565A (en) |
-
2005
- 2005-09-20 JP JP2005271787A patent/JP2007088565A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8977066B2 (en) | Image compression using sub-resolution images | |
JP4418762B2 (en) | Image encoding apparatus, image decoding apparatus, control method thereof, computer program, and computer-readable storage medium | |
JP5214742B2 (en) | Predictive image processing | |
JP3196608B2 (en) | Encoding / decoding device and encoding / decoding method | |
Motta et al. | Lossless image coding via adaptive linear prediction and classification | |
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 | |
JP2007228582A (en) | Method and apparatus for cabac-based encoding having high compression ratio using improved context model selection and method and apparatus for cabac-based decoding | |
CN103918261A (en) | Signal processing and inheritance in a tiered signal quality hierarchy | |
JP2008306394A (en) | Image processing apparatus and its method | |
JP4893957B2 (en) | Encoding device, decoding device, encoding method and program | |
JP6212890B2 (en) | Moving picture coding apparatus, moving picture coding method, and moving picture coding program | |
JP2006270325A (en) | Image compression apparatus, image decompression apparatus, image data, image processing method and program | |
JP2009077176A (en) | Image coder, image decoder, and their control methods | |
JPH11168632A (en) | Binary expression processing method for dither image, method for uncompressing dither image expressed in compression binary representation and compression and uncompression system for dither image | |
JP2006311055A (en) | Coding apparatus, decoding apparatus, coding method, decoding method, and program | |
JP2007088565A (en) | Apparatus and method for processing image | |
WO2000018133A1 (en) | Encoding device and method, and decoding device and method | |
JP5086777B2 (en) | Image encoding apparatus, control method therefor, computer program, and computer-readable storage medium | |
JP4748805B2 (en) | Image coding apparatus and control method thereof | |
JP3985465B2 (en) | Image encoding apparatus, image decoding apparatus, image encoding / decoding apparatus, and methods thereof | |
JP2000134622A (en) | Data processor | |
JPH1155528A (en) | Image coder | |
JPH10150575A (en) | System and method for processing image | |
JP7040629B2 (en) | Encoding device, coding method, coding program, decoding device, decoding method and decoding program | |
JP4971881B2 (en) | Image encoding apparatus, image decoding apparatus, and control method thereof |