JP2007088565A - Apparatus and method for processing image - Google Patents

Apparatus and method for processing image Download PDF

Info

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
Application number
JP2005271787A
Other languages
Japanese (ja)
Inventor
Shunichi Kimura
俊一 木村
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2005271787A priority Critical patent/JP2007088565A/en
Publication of JP2007088565A publication Critical patent/JP2007088565A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce deterioration in image quality, and to process image data with a high compression ratio. <P>SOLUTION: First and second estimation sections 270-1, 270-2 estimate a pixel value for each pixel by using mutually different estimation methods. An estimation error calculation section 272 calculates respective estimation errors at the first and second estimation sections 270-1, 270-2. A determination section 274 determines whether the pixel of which the pixel value is estimated is the pixel for composing a CG image according to whether respective estimation errors at the first and second estimation sections 270-1, 270-2 are 0. An ROI information creation section 262 creates ROI information so that the pixel for composing the CG image belongs to ROI according to the determined results input from the determination section 274. A JPEG 2000 coding section 266 creates an ROI mask for reflecting the ROI information, and generates a code stream having ROI from the image data so that decoding can be made by a decoder conforming to JPEG2000. <P>COPYRIGHT: (C)2007,JPO&INPIT

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).

特開2001−257888号公報JP 2001-257888 A

しかしながら、上記従来例においては、処理速度を向上させるために、非可逆符号化には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 storage device 12 such as an HDD / CD device, a printing device 14, a communication device 16, and a control device 2. The control device 2 includes a CPU 20 and a memory 22 and controls each unit constituting the image processing device 1.
In other words, the image processing apparatus 1 includes a function as a computer, and processes image data received via the storage medium 120 or the communication device 16 in accordance with, for example, an image encoding condition input via the UI apparatus 10. In addition, an image can be output to the display device of the UI device 10 or the printing device 14.

図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 control device 2 and configured to encode (compress) and decode (decompress) image data.
As shown in FIG. 2, the code processing unit 24 includes an encoder 26 and a decoder 28. The encoder 26 receives, encodes, for example, image data, and outputs it as a code stream to the decoder 28. The decoder 28 complies with, for example, JPEG2000, acquires the code stream output from the encoder 26, decodes it, and outputs reproduced image data. The encoder 26 may output the code stream to the memory 22 (or the storage device 12) or the like, and the decoder 28 may acquire the code stream from the memory 22 (or the storage device 12) or the like.
The code processing unit 24 may be configured by software (program) executed by the CPU 20 with the encoder 26 and the decoder 28, for example.

次に、符号器26の詳細について説明する。
図3は、符号器26の構成を示すブロック図である。図3に示すように、符号器26は、可逆画素選択部260、ROI(Region of interest)情報作成部262、制御部264及びJPEG2000符号化部266から構成される。
Next, details of the encoder 26 will be described.
FIG. 3 is a block diagram showing a configuration of the encoder 26. As shown in FIG. 3, the encoder 26 includes a reversible pixel selection unit 260, a ROI (Region of interest) information creation unit 262, a control unit 264, and a JPEG2000 encoding unit 266.

可逆画素選択部260は、第1予測部270−1、第2予測部270−2、予測誤差算出部272及び判定部274から構成される。第1予測部270−1及び第2予測部270−2は、画像データを受け入れて互いに異なる予測方法で画素ごとに画素値を予測し、それぞれ予測した画素値を予測誤差算出部272に対して出力する。第1予測部270−1及び第2予測部270−2が画素値を予測する方法は、例えば前値予測、行列予測、平均予測及び平面予測などのいずれかである。   The reversible pixel selection unit 260 includes a first prediction unit 270-1, a second prediction unit 270-2, a prediction error calculation unit 272, and a determination unit 274. The first prediction unit 270-1 and the second prediction unit 270-2 accept image data, predict pixel values for each pixel using different prediction methods, and calculate the predicted pixel values for the prediction error calculation unit 272. Output. The method by which the first prediction unit 270-1 and the second prediction unit 270-2 predict pixel values is any one of, for example, previous value prediction, matrix prediction, average prediction, and planar prediction.

予測誤差算出部272は、第1予測部270−1が予測した画素値、第2予測部270−2が予測した画素値及び画像データを画素ごとに受け入れ、第1予測部270−1が予測した画素値と実際の画素値との差分(予測誤差)と、第2予測部270−2が予測した画素値と実際の画素値との差分(予測誤差)とを算出し、判定部274に対してそれぞれ出力する。   The prediction error calculation unit 272 receives the pixel value predicted by the first prediction unit 270-1, the pixel value predicted by the second prediction unit 270-2, and the image data for each pixel, and the first prediction unit 270-1 predicts the pixel value. The difference (prediction error) between the calculated pixel value and the actual pixel value and the difference (prediction error) between the pixel value predicted by the second prediction unit 270-2 and the actual pixel value are calculated, and the determination unit 274 Respectively.

判定部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 determination unit 274 accepts the prediction errors of the first prediction unit 270-1 and the second prediction unit 270-2 from the prediction error calculation unit 272, for example, depending on whether each prediction error is 0, the pixel value For example, it is determined whether the predicted pixel is a pixel constituting a CG image, and the determination result is output to the ROI information creating unit 262.
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 determination unit 274 is a pixel in which a pixel value is predicted is a CG image. It is determined that there is, and 1 is output. The determination unit 274 determines that the pixel whose pixel value is predicted is not a pixel constituting the CG image when the prediction errors of the first prediction unit 270-1 and the second prediction unit 270-2 are not 0, 0 is output.

ROI情報作成部262は、判定部274から入力される判定結果に応じて、CG画像を構成する画素がROIに属するようにJPEG2000符号化部266がROIマスクを作成できるようにROI情報を作成し、制御部264及びJPEG2000符号化部266に対して出力する。なお、ROI情報作成部262は、ROIマスクを作成して制御部264及びJPEG2000符号化部266に対して出力するものであってもよい。   The ROI information creation unit 262 creates ROI information so that the JPEG2000 encoding unit 266 can create the ROI mask so that the pixels constituting the CG image belong to the ROI according to the determination result input from the determination unit 274. And output to the control unit 264 and the JPEG2000 encoding unit 266. Note that the ROI information creation unit 262 may create an ROI mask and output it to the control unit 264 and the JPEG2000 encoding unit 266.

制御部264は、ROI情報作成部262から入力されるROI情報に応じて、JPEG2000符号化部266を制御する。   The control unit 264 controls the JPEG2000 encoding unit 266 according to the ROI information input from the ROI information creation unit 262.

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 JPEG2000 encoding unit 266 has an integer type 5/3 lossless filter, and reflects the ROI information input from the ROI information creation unit 262 in accordance with the control of the control unit 264 that acquired the ROI information. Is generated, and a code stream having ROI is generated and output from the input image data so that it can be decoded by a decoder compliant with JPEG2000.
For example, under the control of the control unit 264, the JPEG2000 encoding unit 266 reversibly encodes pixels belonging to the ROI using a 5/3 reversible filter or the like, and reversibly encodes pixels not belonging to the ROI using a 5/3 reversible filter or the like. During the encoding, the encoding is stopped and a code stream is generated. That is, the JPEG2000 encoding unit 266 reversibly encodes pixels belonging to ROI (pixels constituting a CG image) and irreversibly encodes pixels not belonging to ROI (pixels not constituting a CG image). Truncate part of image data.
Also, the JPEG2000 encoding unit 266 may perform encoding by switching between lossless encoding and lossy encoding for each pixel according to the ROI information.

次に、符号器26が画像データを符号化する処理について説明する。
図4は、符号器26が画像データを符号化する処理(S10)を例示するフローチャートである。
図4に示すように、ステップ100(S100)において、第1予測部270−1及び第2予測部270−2は、画像データを受け入れて互いに異なる予測方法で画素ごとに画素値を予測する。
Next, a process in which the encoder 26 encodes image data will be described.
FIG. 4 is a flowchart illustrating a process (S10) in which the encoder 26 encodes image data.
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 error calculation unit 272 calculates the prediction error of each of the first prediction unit 270-1 and the second prediction unit 270-2.

ステップ104(S104)において、判定部274は、第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、予測誤差それぞれが0であるか否かに応じて、画素値を予測された画素がCG画像を構成する画素であるか否かを判定する。   In step 104 (S104), the determination unit 274 accepts each prediction error of the first prediction unit 270-1 and the second prediction unit 270-2, and determines the pixel value depending on whether each prediction error is 0 or not. It is determined whether or not the predicted pixel is a pixel constituting the CG image.

ステップ106(S106)において、ROI情報作成部262は、判定部274から入力される判定結果に応じて、CG画像を構成する画素がROIに属するようにJPEG2000符号化部266がROIマスクを作成できるようにROI情報を作成する。   In step 106 (S106), the ROI information creation unit 262 can create the ROI mask according to the determination result input from the determination unit 274 so that the pixels constituting the CG image belong to the ROI. The ROI information is created as follows.

ステップ108(S108)において、JPEG2000符号化部266は、ROI情報作成部262から入力されるROI情報を反映させたROIマスクを作成し、JPEG2000に準拠した復号器で復号できるように、入力された画像データからROIを有する符号ストリームを生成して出力する。   In step 108 (S108), the JPEG2000 encoding unit 266 generates an ROI mask reflecting the ROI information input from the ROI information generation unit 262, and inputs the ROI mask so that it can be decoded by a decoder compliant with JPEG2000. A code stream having ROI is generated from the image data and output.

このように、符号器26がROIに属する画素を可逆に符号化し、ROIに属しない画素を非可逆に符号化した符号ストリームを生成するので、JPEG2000に準拠した復号器28(図2)は、劣化なく符号化されているROIに属する画素と、高圧縮率で符号化されているROIに属しない画素とを復号化することができる。   Thus, since the encoder 26 reversibly encodes the pixels belonging to the ROI and generates the code stream in which the pixels not belonging to the ROI are irreversibly encoded, the decoder 28 (FIG. 2) compliant with JPEG2000 It is possible to decode a pixel belonging to the ROI encoded without deterioration and a pixel not belonging to the ROI encoded at a high compression rate.

次に、符号器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 pixel selection unit 260a, an ROI information creation unit 262, a control unit 264a, a specific information generation unit 276, a specific information encoding unit 277, a data processing unit 278, and a JPEG2000 encoding unit. 266.
In the encoder 26a, components that are substantially the same as the parts constituting the encoder 26 shown in FIG.

可逆画素選択部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 pixel selection unit 260a includes a first prediction unit 270-1, a second prediction unit 270-2, a prediction error calculation unit 272a, and a determination unit 274. The prediction error calculation unit 272a accepts the pixel value predicted by the first prediction unit 270-1, the pixel value predicted by the second prediction unit 270-2, and the image data for each pixel, and the first prediction unit 270-1 performs prediction. The difference (prediction error) between the calculated pixel value and the actual pixel value and the difference (prediction error) between the pixel value predicted by the second prediction unit 270-2 and the actual pixel value are calculated, and the specific information generation unit H.276 and the determination unit 274, respectively.

制御部264aは、ROI情報作成部262から入力されるROI情報に応じて、特定情報生成部276、特定情報符号化部277、データ加工部278及びJPEG2000符号化部266を制御する。   The control unit 264a controls the specific information generation unit 276, the specific information encoding unit 277, the data processing unit 278, and the JPEG2000 encoding unit 266 according to the ROI information input from the ROI information creation unit 262.

特定情報生成部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 information generation unit 276 receives the prediction errors of the first prediction unit 270-1 and the second prediction unit 270-2 from the prediction error calculation unit 272a, for example, the first prediction unit 270-1 having a prediction error of 0 and Information (specific information) specifying the second prediction unit 270-2 or any one of these is generated and output to the specific information encoding unit 277.
For example, the specific information generation unit 276 includes information for specifying the first prediction unit 270-1 and the second prediction unit 270-2 or any one of them, for example, the first prediction unit 270-1 and the second prediction unit. A specific number assigned to each of the 270-2 or a pixel value with a prediction error of 0 is set as a rank based on the predicted frequency, and is output to the specific information encoding unit 277.

特定情報符号化部277は、特定情報生成部276から入力される特定情報を符号化し、データ加工部278に対して符号を出力する。   The specific information encoding unit 277 encodes the specific information input from the specific information generation unit 276 and outputs the code to the data processing unit 278.

データ加工部278は、ROI情報を取得した制御部264aの制御に応じて、入力される画像データ、又は特定情報符号化部277から入力される符号を画素ごとに配置したデータを生成し、JPEG2000符号化部266に対して出力する。例えば、データ加工部278は、画像データ及び特定情報符号化部277が出力する符号を受け入れ、CG画像を構成すると判定される画素(可逆符号化すべき画素)に対する画素値とみなした符号と、CG画像を構成しないと判定される画素(非可逆符号化する画素)に対する画素値とがROI情報に応じて混在するように、制御部264aの制御に応じてデータ(符号化対象データ)を加工する。   The data processing unit 278 generates input image data or data in which the code input from the specific information encoding unit 277 is arranged for each pixel in accordance with the control of the control unit 264a that acquired the ROI information. The data is output to the encoding unit 266. For example, the data processing unit 278 accepts the image data and the code output from the specific information encoding unit 277, the code regarded as the pixel value for the pixel determined to constitute the CG image (the pixel to be losslessly encoded), the CG Data (encoding target data) is processed in accordance with control of the control unit 264a so that pixel values for pixels determined not to constitute an image (pixels to be irreversibly encoded) are mixed according to ROI information. .

また、データ加工部278は、例えば画素値を示すビット幅がMビットの画像データを受け入れて、CG画像を構成しないと判定される画素に対しては画素値を出力し、CG画像を構成すると判定される画素に対しては画素値とみなした符号をMSB側にM+Gビットシフトさせて出力するものであってもよい。ここで、Gは、画素値のオーバーフローを防止するためのガードビット数であり、例えば1又は2などの値をとる。
このように、画素値とみなした符号をM+Gビットシフトさせることにより、復号化する場合に、画素値とみなした符号と画素値とを容易に分類することが可能になる。
For example, the data processing unit 278 accepts image data with a bit width indicating a pixel value of M bits, outputs a pixel value to a pixel determined not to form a CG image, and forms a CG image. For the pixel to be determined, a code regarded as a pixel value may be output by shifting the MSB side by M + G bits. Here, G is the number of guard bits for preventing an overflow of the pixel value, and takes a value such as 1 or 2, for example.
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 data processing unit 278 may add the center value of the pixel value (128 if M = 8) to the code regarded as the pixel value. However, it is assumed that the bit width of the code regarded as the pixel value is less than M-1. Further, the sign regarded as the pixel value takes a positive or negative value centered on 0.

また、データ加工部278は、画素値とみなした符号に対して、画像データの平均値、又は注目画素の周囲画素の画素値の平均値を丸めた値を加算し、非可逆符号化が行われても値が変化しないようにされてもよい。ただし、丸めた値を加算する場合、画像データのビット幅よりも加算結果のビット幅が大きくならないようにする。例えば、画素値とみなした符号のビット幅よりも大きな値で画素値の平均値を丸めるようにする。また、画素値とみなした符号は、0を中心とする正負の値をとるようにする。   Further, the data processing unit 278 adds an average value of the image data or a value obtained by rounding the average value of the pixel values of the surrounding pixels of the target pixel to the code regarded as the pixel value, and performs irreversible encoding. However, the value may not be changed. However, when adding rounded values, the bit width of the addition result should not be larger than the bit width of the image data. For example, the average value of the pixel values is rounded by a value larger than the bit width of the code regarded as the pixel value. Further, the sign regarded as the pixel value takes a positive or negative value centered on 0.

次に、符号器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 error calculation unit 272a calculates the prediction error of each of the first prediction unit 270-1 and the second prediction unit 270-2.

ステップ204(S204)において、判定部274は、第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、予測誤差それぞれが0であるか否かに応じて、画素値を予測された画素がCG画像を構成する画素であるか否かを判定する。   In step 204 (S204), the determination unit 274 accepts the prediction errors of the first prediction unit 270-1 and the second prediction unit 270-2, and determines the pixel value according to whether each of the prediction errors is 0 or not. It is determined whether or not the predicted pixel is a pixel constituting the CG image.

ステップ206(S206)において、ROI情報作成部262は、判定部274から入力される判定結果に応じて、CG画像を構成する画素がROIに属するようにJPEG2000符号化部266がROIマスクを作成できるようにROI情報を作成する。   In step 206 (S206), the ROI information creation unit 262 can create the ROI mask according to the determination result input from the determination unit 274 such that the pixels constituting the CG image belong to the ROI. The ROI information is created as follows.

ステップ208(S208)において、特定情報生成部276は、予測誤差算出部272aから第1予測部270−1及び第2予測部270−2それぞれの予測誤差を受け入れ、予測誤差が0である第1予測部270−1及び第2予測部270−2又はこれらのいずれかを特定する情報(特定情報)を生成する。   In step 208 (S208), the specific information generation unit 276 receives the prediction errors of the first prediction unit 270-1 and the second prediction unit 270-2 from the prediction error calculation unit 272a, and the first prediction error is 0. Information (specific information) for specifying the prediction unit 270-1 and the second prediction unit 270-2 or any one of them is generated.

ステップ210(S210)において、特定情報符号化部277は、特定情報生成部276から入力される特定情報を符号化する。   In step 210 (S210), the specific information encoding unit 277 encodes the specific information input from the specific information generation unit 276.

ステップ212(S212)において、データ加工部278は、画像データ及び特定情報符号化部277が出力する符号を受け入れ、画素値とみなした符号と画像データに含まれる画素値とが混在するように、制御部264aの制御に応じてデータ(符号化対象データ)を加工する。   In step 212 (S212), the data processing unit 278 accepts the image data and the code output from the specific information encoding unit 277, so that the code regarded as the pixel value and the pixel value included in the image data are mixed. Data (encoding target data) is processed under the control of the control unit 264a.

ステップ214(S214)において、JPEG2000符号化部266は、ROI情報作成部262から入力されるROI情報を反映させたROIマスクを作成し、JPEG2000に準拠した復号器で復号できるように、データ加工部278から入力されたデータからROIを有する符号ストリームを生成して出力する。   In step 214 (S214), the JPEG2000 encoding unit 266 creates a ROI mask that reflects the ROI information input from the ROI information creation unit 262, and allows the data processing unit to decode it with a decoder compliant with JPEG2000. A code stream having an ROI is generated from the data input from 278 and output.

次に、符号器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 decoder 28 and is included in the code processing unit 24 together with the encoder 26a, for example.

図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 JPEG2000 decoding unit 280, a data classification unit 282, a specific information decoding unit 284, a selection unit 286, a first prediction unit 270-1, a second prediction unit 270-2, and The image data assembly unit 288 is configured.
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 decoding unit 280 is configured to be able to decode the code stream generated by the encoder 26a in accordance with JPEG 2000. When the JPEG 2000 decoding unit 280 accepts the code stream, the decoded data and ROI information obtained by decoding the code stream are received. (Or ROI mask) is output to the data classification unit 282.
Note that when the code stream includes an M + G-bit shifted code that is regarded as the pixel value described above, the JPEG2000 decoding unit 280 is configured not to output the ROI information (or the ROI mask).

データ分類部282は、JPEG2000復号化部280から符号ストリームを復号化した復号データとROI情報(又はROIマスク)とを受け入れ、復号データを画素ごとに画素値とみなした符号又は画素値(画素値とみなした符号を含まない)のいずれかに分類し、画素値とみなした符号を特定情報復号化部284に対して出力し、画素値を第1予測部270−1、第2予測部270−2及び画像データ組立部288に対して出力する。つまり、データ分類部282は、画素値とみなした符号と画素値とを分類して出力する。   The data classification unit 282 receives the decoded data obtained by decoding the code stream from the JPEG2000 decoding unit 280 and the ROI information (or ROI mask), and the code or pixel value (pixel value) regarding the decoded data as a pixel value for each pixel. The code regarded as the pixel value is output to the specific information decoding unit 284, and the pixel value is output to the first prediction unit 270-1 and the second prediction unit 270. -2 and the image data assembly unit 288. That is, the data classification unit 282 classifies and outputs the codes and pixel values regarded as pixel values.

なお、上述した画素値とみなした符号を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 data classification unit 282 sets a bit plane number from 0 to M + G and classifies the decoded data for each pixel. And output. When the code regarded as a pixel value or the most significant bit number of the pixel value is equal to or greater than M + G, the data classification unit 282 determines the code regarded as the pixel value by shifting to the M + G bit LSB side, and decodes the specific information To the conversion unit 284. In addition, the data classification unit 282 changes the value to the maximum value (255 if M = 8) when the most significant bit number of the code or pixel value regarded as the pixel value is greater than or equal to M and less than M + G, In this case, the pixel value is output to the first prediction unit 270-1, the second prediction unit 270-2, and the image data assembly unit 288 without changing the value.

特定情報復号化部284は、データ分類部282から入力される符号を復号化して上述した特定情報を再生し、選択部286に対して出力する。   The specific information decoding unit 284 decodes the code input from the data classification unit 282, reproduces the specific information described above, and outputs it to the selection unit 286.

選択部286は、第1予測部270−1及び第2予測部270−2が予測した画素値を画素ごとにそれぞれ受け入れ、特定情報復号化部284から入力される特定情報に応じて、第1予測部270−1及び第2予測部270−2又はこれらのいずれかが予測した画素値を画素ごとに選択し、画像データ組立部288に対して出力する。   The selection unit 286 receives the pixel values predicted by the first prediction unit 270-1 and the second prediction unit 270-2 for each pixel, and determines the first value according to the specific information input from the specific information decoding unit 284. The pixel values predicted by the prediction unit 270-1 and the second prediction unit 270-2 or any one of these are selected for each pixel and output to the image data assembly unit 288.

画像データ組立部288は、データ分類部282から入力される画素値と、選択部286から入力される画素値とを画素ごとに復号データ順に組立てることにより再生画像データを生成して出力する。   The image data assembling unit 288 generates and outputs reproduced image data by assembling the pixel values input from the data classifying unit 282 and the pixel values input from the selecting unit 286 in order of decoded data for each pixel.

次に、復号器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 JPEG2000 decoding unit 280 accepts the code stream, the decoded data obtained by decoding the code stream and the ROI information (or ROI mask) are sent to the data classification unit 282. Output.

ステップ302(S302)において、データ分類部282は、復号データを画素ごとに画素値とみなした符号又は画素値(画素値とみなした符号を含まない)のいずれかに分類し、画素値とみなした符号を特定情報復号化部284に対して出力し、画素値を第1予測部270−1、第2予測部270−2及び画像データ組立部288に対して出力する。   In step 302 (S302), the data classification unit 282 classifies the decoded data into either a code regarded as a pixel value or a pixel value (not including a code regarded as a pixel value) for each pixel, and regards it as a pixel value. The code is output to the specific information decoding unit 284, and the pixel value is output to the first prediction unit 270-1, the second prediction unit 270-2, and the image data assembly unit 288.

ステップ304(S304)において、特定情報復号化部284は、データ分類部282から入力される符号を復号化して上述した特定情報を再生し、選択部286に対して出力する。   In step 304 (S304), the specific information decoding unit 284 decodes the code input from the data classification unit 282, reproduces the specific information described above, and outputs it to the selection unit 286.

ステップ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 selection unit 286.

ステップ308(S308)において、選択部286は、特定情報復号化部284から入力される特定情報に応じて、第1予測部270−1及び第2予測部270−2又はこれらのいずれかが予測した画素値を画素ごとに選択し、画像データ組立部288に対して出力する。   In step 308 (S308), the selection unit 286 predicts the first prediction unit 270-1 and / or the second prediction unit 270-2 according to the specific information input from the specific information decoding unit 284. The selected pixel value is selected for each pixel and output to the image data assembling unit 288.

ステップ310(S310)において、画像データ組立部288は、データ分類部282から入力される画素値と、選択部286から入力される画素値とを画素ごとに復号データ順に組立てることにより再生画像データを生成して出力する。   In step 310 (S310), the image data assembling unit 288 assembles the reproduced image data by assembling the pixel values input from the data classifying unit 282 and the pixel values input from the selecting unit 286 in the order of decoded data. Generate and output.

なお、上記実施形態においては、第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 pixel block 30 composed of four (2 × 2) pixels is surrounded by a pixel 3a to be irreversibly encoded, the pixel 3 to be losslessly encoded disposed in the pixel block 30 or irreversibly encoded. Depending on the arrangement pattern of the pixels 3 a, it may be determined for each pixel block 30 whether or not the target pixel is isolated. For example, no matter how the pixels 3 to be losslessly encoded are arranged in the pixel block 30, it may be determined that the pixels 3 to be losslessly encoded in the pixel block 30 are isolated.
Further, when the pixel block 30 includes three or less pixels 3 to be losslessly encoded, it may be determined that the pixel 3 to be losslessly encoded in the pixel block 30 is isolated. Further, when one pixel 3 to be losslessly encoded is included in the pixel block 30, it may be determined that the pixel 3 to be losslessly encoded is isolated.
Further, as shown in FIG. 9B or 9C, when two pixels 3 to be losslessly encoded are arranged diagonally in the pixel block 30, the pixel 3 to be losslessly encoded is isolated. You may make it determine with having carried out.

本発明の実施形態に係る画像処理装置の概要を示す構成図である。1 is a configuration diagram illustrating an overview of an image processing apparatus according to an embodiment of the present invention. 制御装置内に含まれ、画像データを符号化及び復号化する符号処理部の構成を示すブロック図である。It is a block diagram which shows the structure of the code process part which is included in a control apparatus and encodes and decodes image data. 符号器の構成を示すブロック図である。It is a block diagram which shows the structure of an encoder. 符号器が画像データを符号化する処理(S10)を例示するフローチャートである。It is a flowchart which illustrates the process (S10) in which an encoder encodes image data. 符号器の変形例の構成を示すブロック図である。It is a block diagram which shows the structure of the modification of an encoder. 符号器の変形例が画像データを符号化する処理(S20)を例示するフローチャートである。It is a flowchart which illustrates the process (S20) in which the modification of an encoder encodes image data. 復号器の変形例の構成を示すブロック図である。It is a block diagram which shows the structure of the modification of a decoder. 復号器の変形例が再生画像データを生成する処理(S30)を例示するフローチャートである。It is a flowchart which illustrates the process (S30) which the modified example of a decoder produces | generates reproduction | regeneration image data. 注目画素が孤立していると判定するための条件とする画素値の相関関係を例示する画素の配置図であって、(A)は非可逆符号化する画素に囲まれている画素ブロックを示し、(B)は画素ブロック内で対角に可逆符号化すべき画素が2つ配置された状態の第1例を示し、(C)は画素ブロック内で対角に可逆符号化すべき画素が2つ配置された状態の第2例を示す配置図である。It is a pixel arrangement diagram illustrating the correlation of pixel values as a condition for determining that the pixel of interest is isolated, and (A) shows a pixel block surrounded by pixels to be irreversibly encoded. (B) shows a first example in which two pixels to be losslessly encoded diagonally in the pixel block, and (C) shows two pixels to be losslessly encoded diagonally in the pixel block. It is an arrangement figure showing the 2nd example of an arranged state.

符号の説明Explanation of symbols

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 ... Image processing apparatus 2 ... Control apparatus 20 ... CPU
DESCRIPTION OF SYMBOLS 22 ... Memory 24 ... Code processing part 26, 26a ... Encoder 260, 260a ... Reversible pixel selection part 262 ... ROI information creation part 264, 264a ... Control part 266 ... JPEG2000 encoding unit 270-1 ... first prediction unit 270-2 ... second prediction unit 272,272a ... prediction error calculation unit 274 ... determination unit 276 ... specific information generation unit 277 ..Specific information encoding unit 278 ... Data processing unit 28, 28a ... Decoder 280 ... JPEG2000 decoding unit 282 ... Data classification unit 284 ... Specific information decoding unit 286 ... Selection unit 288 ... image data assembly unit 3 ... pixel to be losslessly encoded 3a ... pixel to be irreversibly encoded 30 ... pixel block

Claims (17)

注目画素と周囲の画素との相関に基づいて、画像データを画素ごとに2値化する2値化手段と、画像データを可逆にエンベデッド符号化するエンベデッド符号化手段と、前記2値化手段が画像データを2値化した結果に基づいて、前記エンベデッド符号化手段がエンベデッド符号化する画像データの一部を切捨てるよう制御する制御手段とを有する画像処理装置。   Based on the correlation between the pixel of interest and surrounding pixels, binarization means for binarizing the image data for each pixel, embedded coding means for reversibly embedding the image data, and the binarization means An image processing apparatus comprising: control means for controlling the embedded coding means to discard a part of the image data to be embedded based on a result obtained by binarizing the image data. 前記2値化手段は、画素値が同じ画素が注目画素の周囲にあるか否かに基づいて、画像データを2値化する請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the binarization unit binarizes the image data based on whether or not pixels having the same pixel value are around the target pixel. 前記2値化手段は、注目画素に対して画素値を予測する1つ以上の予測手段と、該予測手段が予測した画素値の予測誤差を算出する予測誤差算出手段とを有し、前記予測誤差算出手段が算出する予測誤差の少なくとも1つが0であるか否かに基づいて、画像データを2値化する請求項1記載の画像処理装置。   The binarization means includes one or more prediction means for predicting a pixel value with respect to a pixel of interest, and a prediction error calculation means for calculating a prediction error of a pixel value predicted by the prediction means. The image processing apparatus according to claim 1, wherein the image data is binarized based on whether at least one of the prediction errors calculated by the error calculation means is zero. 注目画素に対して画素値をそれぞれ異なる予測方法で予測する複数の予測手段と、該予測手段が予測した画素値の予測誤差をそれぞれ算出する予測誤差算出手段と、この予測誤差算出手段が算出する予測誤差それぞれに基づいて、画像データを画素ごとに2値化する2値化手段と、前記予測誤差算出手段が算出する予測誤差が0になる画素値を予測した前記予測手段を特定する情報、又は注目画素の画素値のいずれかを画素ごとに可逆かつ分離可能にエンベデッド符号化するエンベデッド符号化手段と、前記2値化手段が画像データを2値化した結果に基づいて、前記エンベデッド符号化手段がエンベデッド符号化するデータの一部を切捨てるよう制御する制御手段とを有する画像処理装置。   A plurality of prediction means for predicting the pixel value of the pixel of interest by different prediction methods, a prediction error calculation means for calculating the prediction error of the pixel value predicted by the prediction means, and the prediction error calculation means Information for identifying the binarization means for binarizing image data for each pixel based on each prediction error, and the prediction means for predicting the pixel value for which the prediction error calculated by the prediction error calculation means is zero; Or embedded coding means for reversibly and separably embedding each pixel value of the target pixel, and the embedded coding based on the result of the binarization means binarizing the image data And an image processing apparatus having control means for controlling the means to discard a part of the data to be embedded. 前記エンベデッド符号化手段は、前記予測手段それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位を、前記予測手段を特定する情報とする請求項4記載の画像処理装置。   5. The information for identifying the prediction unit is defined by the embedded encoding unit using a unique number assigned to each of the prediction units or a rank based on a frequency at which a pixel value with a prediction error of 0 is predicted. Image processing apparatus. 前記エンベデッド符号化手段は、JPEG2000に準拠した符号ストリームを生成することによってデータをエンベデッド符号化し、前記2値化手段は、注目画素と周囲の画素との相関に基づいてROIマスクを作成することによって画像データを2値化する請求項1乃至5いずれか記載の画像処理装置。   The embedded encoding means embeds data by generating a code stream compliant with JPEG2000, and the binarization means creates a ROI mask based on the correlation between the pixel of interest and surrounding pixels. The image processing apparatus according to claim 1, wherein the image data is binarized. 前記エンベデッド符号化手段は、前記予測手段を特定する情報を注目画素の画素値のMSBよりも上位のビットにシフトさせて、JPEG2000に準拠した符号ストリームを生成する請求項3乃至5いずれか記載の画像処理装置。   The said embedded encoding means shifts the information which specifies the said prediction means to a bit higher than MSB of the pixel value of a focused pixel, and produces | generates the code stream based on JPEG2000. Image processing device. 前記エンベデッド符号化手段は、前記予測手段を特定する情報を画素値とみなして、JPEG2000に準拠した符号ストリームを生成する請求項3乃至5いずれか記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the embedded encoding unit generates a code stream compliant with JPEG2000 by regarding information specifying the prediction unit as a pixel value. 周囲の画素の画素値の平均値を取得する平均値取得手段をさらに有し、前記エンベデッド符号化手段は、前記予測手段それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位と、前記平均値取得手段が取得した平均値とを加算した値を画素値とみなして、JPEG2000に準拠した符号ストリームを生成する請求項3乃至5いずれか記載の画像処理装置。   It further has an average value acquisition means for acquiring an average value of pixel values of surrounding pixels, and the embedded encoding means obtains a unique number assigned to each of the prediction means, or a pixel value for which the prediction error is zero. The image processing according to any one of claims 3 to 5, wherein a code stream compliant with JPEG2000 is generated by regarding a value obtained by adding a rank based on a predicted frequency and an average value acquired by the average value acquisition unit as a pixel value. apparatus. 前記平均値取得手段が取得した平均値を丸める平均値丸め手段をさらに有し、前記エンベデッド符号化手段は、前記予測手段それぞれに割り当てられた固有の番号、又は予測誤差が0になる画素値を予測した頻度に基づく順位と、前記平均値丸め手段が丸めた平均値とを加算した値を画素値とみなして、JPEG2000に準拠した符号ストリームを生成する請求項9記載の画像処理装置。   The average value acquisition unit further includes an average value rounding unit that rounds the average value acquired by the average value acquisition unit, and the embedded encoding unit assigns a unique number assigned to each of the prediction units, or a pixel value with a prediction error of 0. The image processing apparatus according to claim 9, wherein a value obtained by adding a ranking based on a predicted frequency and an average value rounded by the average value rounding unit is regarded as a pixel value, and a code stream compliant with JPEG2000 is generated. 前記制御手段は、前記2値化手段が2値化した結果が孤立している場合、孤立している画素に対する2値化した結果を反転させるよう制御する請求項1乃至10いずれか記載の画像処理装置。   11. The image according to claim 1, wherein when the binarized result of the binarizing unit is isolated, the control unit performs control so as to invert the binarized result for the isolated pixel. Processing equipment. 前記制御手段は、前記2値化手段が2値化した結果が2×2の画素ブロックを単位に孤立している場合、孤立している画素ブロックに対する2値化した結果を修正するよう制御する請求項1乃至10いずれか記載の画像処理装置。   The control unit performs control so as to correct the binarized result for the isolated pixel block when the binarized result of the binarizing unit is isolated in units of 2 × 2 pixel blocks. The image processing apparatus according to claim 1. 前記制御手段は、前記2値化手段が2値化した結果が同じである画素の周囲の画素に対し、2値化した結果を反転させるよう制御する請求項1乃至12いずれか記載の画像処理装置。   The image processing according to claim 1, wherein the control unit performs control so as to invert a binarized result with respect to pixels around pixels having the same binarized result by the binarizing unit. apparatus. 前記制御手段は、予測誤差が0になることを予測された画素値が可逆に符号化されるように、前記エンベデッド符号化手段を制御する請求項3乃至5いずれか記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the control unit controls the embedded encoding unit so that a pixel value predicted to have a prediction error of 0 is reversibly encoded. 予測誤差に基づく情報又は画素値を画素ごとにエンベデッド符号化された符号ストリームを復号化するエンベデッド復号化手段と、このエンベデッド復号化手段が復号化した復号化データを予測誤差に基づく情報と画素値とに分類する分類手段と、この分類手段の分類結果に基づいて、前記エンベデッド復号化手段が復号化した復号化データから画像データを再生する画像データ再生手段とを有する画像処理装置。   Embedded decoding means for decoding a code stream in which information or pixel values based on prediction errors are embedded for each pixel, and information and pixel values based on prediction errors for decoded data decoded by the embedded decoding means An image processing apparatus comprising: classifying means for classifying the image data; and image data reproducing means for reproducing image data from the decoded data decoded by the embedded decoding means based on the classification result of the classification means. 前記エンベデッド復号化手段は、JPEG2000に準拠しており、前記分類手段は、符号ストリームに含まれるROIの符号化情報に応じて、復号化データを予測誤差に基づく情報と画素値とに分類する請求項15記載の画像処理装置。   The embedded decoding means conforms to JPEG2000, and the classification means classifies the decoded data into information based on a prediction error and pixel values according to ROI encoded information included in a code stream. Item 15. The image processing apparatus according to Item 15. 注目画素と周囲の画素との相関に基づいて、画像データを画素ごとに2値化し、画像データを可逆にエンベデッド符号化しつつ、画像データを2値化した結果に基づいて画像データの一部を切捨てる画像処理方法。   Based on the correlation between the target pixel and the surrounding pixels, the image data is binarized for each pixel, and the image data is reversibly embedded and the image data is partially binned based on the binarized result. Image processing method to be cut off.
JP2005271787A 2005-09-20 2005-09-20 Apparatus and method for processing image Pending JP2007088565A (en)

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)

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