JP5217972B2 - Image expansion device - Google Patents
Image expansion device Download PDFInfo
- Publication number
- JP5217972B2 JP5217972B2 JP2008306446A JP2008306446A JP5217972B2 JP 5217972 B2 JP5217972 B2 JP 5217972B2 JP 2008306446 A JP2008306446 A JP 2008306446A JP 2008306446 A JP2008306446 A JP 2008306446A JP 5217972 B2 JP5217972 B2 JP 5217972B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- target
- value
- target pixel
- group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Description
本発明は、画像伸張装置に関する。 The present invention relates to an image expansion apparatus.
従来より、画像を複数に分割して、並列に圧縮、伸張する方法が知られている。また、画像データを構成する水平方向に連続する画素を、配置順序に応じて奇数位置の画素群、及び、偶数位置の画素群に分割し、分割された各画素群を、略同等の圧縮率を有する異なる経路で並列的に符号化する符号化装置が知られている(特許文献1)。
画像の圧縮率を低下させずに、並列に画像を伸張することができる画像伸張装置を提供することを目的とする。 An object of the present invention is to provide an image decompression apparatus capable of decompressing images in parallel without reducing the image compression rate.
上記の目的を達成するために、請求項1記載の発明に係る画像伸張装置は、入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)の先頭画素X1の画素値に対して予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(1)式に示す誤差値Err1を表わす符号、及び前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の画素値に基づく以下の(2)式に示す誤差値Errnを表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の各対象画素について並列に前記誤差値(Err1,・・・, Errn)を復号する並列復号手段と、前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、前記対象画素群の各対象画素について並列に画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値に並列に伸張する伸張手段と、を含み、前記伸張手段は、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって復号された前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(3)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張し、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって復号された該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(4)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する。
Err1=X1−F1(R1、・・・、Rm) ・・・(1)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(2)
X1=Err1+F1’(R1、・・・、Rm) ・・・(3)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(4)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
In order to achieve the above object, the image decompressing apparatus according to the first aspect of the present invention is the first pixel X1 of the input target pixel group (X1,..., Xn) consisting of a predetermined number of consecutive pixels. Of the reference pixel groups (R1,..., Rm) existing around the target pixel group (X1,..., Xn) obtained by performing predictive coding on the pixel values of A code representing an error value Err1 shown in the following equation (1) based on pixel values of the reference pixels around the head pixel X1 including the reference pixels adjacent to the head pixel X1 , and the target pixel group (X1,. .., Xn) of the reference pixel group (R1,..., Rm) obtained by performing predictive coding on the pixel value of each target pixel Xn other than the first pixel X1. The pixel value of the reference pixel around the target pixel Xn and the target pixel group (X1,..., X A code representing the error value Errn shown in the target pixel Xn-1 to include said target pixel Xn neighborhood of said target pixel below based on the pixel value (2) adjacent to the target pixel Xn of -1) In parallel, the error values (Err1,..., Errn) are decoded in parallel for each target pixel of the target pixel group (X1,..., Xn) based on the code strings of the predetermined number of columns included. An error value of each target pixel of the target pixel group decoded in parallel by the decoding means, and the parallel decoding means, and each reference of the reference pixel group that exists around the target pixel group and has been previously expanded by using the pixel values of the pixels, as well as inverse predictive pixel values in parallel for each pixel of the target pixel group, anda decompressing means for decompressing in parallel to the pixel value of each pixel of the target pixel group , The expansion means includes the target pixel group For the first pixel X1 of (X1,..., Xn), the error value Err1 of the first pixel X1 decoded by the parallel decoding means and the reference pixel group (R1,. ) And the pixel value of the reference pixel around the head pixel X1 including the reference pixel adjacent to the head pixel X1 is used to reverse the pixel value of the head pixel X1 by the following equation (3): And predicting, expanding to the pixel value of the first pixel X1, and for each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn) The error value Errn of the target pixel Xn and the periphery of the target pixel Xn including the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1). The error value of the target pixel and Using the pixel values of the reference pixels around the target pixel Xn in the reference pixel group (R1,..., Rm), the pixel value is inverted for the target pixel Xn by the following equation (4). The prediction is performed and the pixel value of the target pixel Xn is expanded.
Err1 = X1-F1 (R1,..., Rm) (1)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (2)
X1 = Err1 + F1 ′ (R1,..., Rm) (3)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn−1) (4)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
請求項2記載の発明では、上記請求項1に係る画像伸張装置において、前記入力された前記所定個の列の符号列の各々は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して並列に予測符号化を行って得られた誤差値を表わす符号を各々含む。 According to a second aspect of the present invention, in the image expansion device according to the first aspect, each of the input code strings of the predetermined number of columns is a target pixel of a target pixel group including a predetermined number of consecutive pixels. Each code includes a code representing an error value obtained by performing predictive coding in parallel on each pixel value.
請求項3記載の発明に係る画像伸張装置は、入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)の先頭画素X1の画素値に対して、予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(5)式に示す誤差値Err1を表わす符号、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素nの周辺の前記対象画素の画素値に基づく以下の(6)式に示す誤差値Errnを表わす符号、又は連長圧縮符号化を行って得られた連続数及び画素値を表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の各対象画素について並列に前記誤差値(Err1,・・・, Errn)又は前記連続数及び画素値を復号する並列復号手段と、前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値又は前記連続数及び画素値に基づいて、前記対象画素群の各対象画素について、該対象画素の誤差値が復号された場合、該対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、該対象画素の画素値を逆予測すると共に、該対象画素の画素値に伸張する逆予測処理、及び、該対象画素の連続数及び画素値が復号された場合、該画素値を連続数分展開して、該対象画素の画素値に伸張する展開処理の何れか一方の処理を並列に行う展開手段と、を含み、前記展開手段は、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって前記先頭画素X1に対して誤差値Err1が復号された場合に、前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記参照画素の画素値とを用いて、以下の(7)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する逆予測処理、及び、前記先頭画素X1に対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、前記先頭画素X1以降の画素の画素値に伸張する展開処理の何れか一方を行い、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって該対象画素Xnに対して誤差値Errnが復号された場合に、該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値又は前記対象画素Xnに隣接する前記対象画素Xn−1に対して復号された画素値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(8)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する逆予測処理、及び、該対象画素Xnに対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、該対象画素Xn以降の画素の画素値に伸張する展開処理の何れか一方を行う。
Err1=X1−F1(R1、・・・、Rm) ・・・(5)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(6)
X1=Err1+F1’(R1、・・・、Rm) ・・・(7)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(8)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
The image expansion device according to the third aspect of the present invention provides a prediction code for the input pixel value of the first pixel X1 of the target pixel group (X1,..., Xn) consisting of a predetermined number of consecutive pixels. The reference adjacent to the first pixel X1 in the reference pixel group (R1,..., Rm) existing around the target pixel group (X1,. A sign representing an error value Err1 shown in the following equation (5) based on the pixel value of the reference pixel around the head pixel X1 including the pixel, the head pixel of the target pixel group (X1,..., Xn) The reference pixels around the target pixel Xn in the reference pixel group (R1,..., Rm) obtained by performing predictive encoding on the pixel values of the target pixels Xn other than X1. And the target pixel group Xn of the target pixel group (X1,..., Xn-1). Obtained by performing code representing the error value Errn shown to the subject pixel of the pixel values based on the following equation (6) near the target pixel n including the target pixel Xn-1 adjacent, or run-length compression coding The error value (Err1 ) in parallel with respect to each target pixel of the target pixel group (X1,..., Xn) based on the predetermined number of code strings each including the number of consecutive numbers and the code representing the pixel value. ,..., Errn) or parallel decoding means for decoding the continuous number and pixel value, and the error value or the continuous number and pixel value of each target pixel of the target pixel group decoded in parallel by the parallel decoding means For each target pixel of the target pixel group, when the error value of the target pixel is decoded, the error value of the target pixel exists around the target pixel group and is expanded first. Image of each reference pixel in the selected reference pixel group When the pixel value of the target pixel is inversely predicted using the prime value, and the reverse prediction process for expanding the pixel value of the target pixel, and the continuous number and the pixel value of the target pixel are decoded, Expansion means for expanding in parallel the number of pixel values and expanding one of the expansion processes for expanding the pixel value to the pixel value of the target pixel , wherein the expansion means includes the target pixel group (X1, .., Xn), when the error value Err1 is decoded for the first pixel X1 by the parallel decoding means, the error value Err1 of the first pixel X1 and the previously expanded error value Err1 Using the pixel value of the reference pixel including the reference pixel adjacent to the head pixel X1 in the reference pixel group (R1,..., Rm), the head pixel X1 is expressed by the following equation (7). The pixel value is inversely predicted and the first pixel X When the reverse prediction process for expanding the pixel value to 1 and the continuous number and pixel value for the first pixel X1 are decoded, the pixel value is expanded by the continuous number, and the subsequent pixels after the first pixel X1 One of the expansion processes for expanding the pixel value of the pixel is performed, and for each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn), the target pixel is processed by the parallel decoding unit. When the error value Errn is decoded for Xn, the error value Errn of the target pixel Xn and the target pixel Xn in the target pixel group (X1,..., Xn−1) are adjacent to the target pixel Xn. An error value of the target pixel around the target pixel Xn including the target pixel Xn-1, or a pixel value decoded for the target pixel Xn-1 adjacent to the target pixel Xn, and the reference pixel group (R1 ,..., Rm) Using the pixel values of the reference pixels around Xn and inversely predicting the pixel value of the target pixel Xn according to the following equation (8), and expanding the pixel value of the target pixel Xn; and Any one of the expansion processes in which when the continuous number and the pixel value are decoded for the target pixel Xn, the pixel value is expanded by the continuous number and expanded to the pixel values of the pixels after the target pixel Xn. Do one .
Err1 = X1-F1 (R1,..., Rm) (5)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (6)
X1 = Err1 + F1 ′ (R1,..., Rm) (7)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Err-1) (8)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
請求項4記載の発明では、上記請求項3に係る画像伸張装置において、前記入力された前記所定個の列の符号列は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して、予測符号化又は連長圧縮符号化を並列に行って得られた誤差値又は連続数及び画素値を表わす符号を各々含む。 According to a fourth aspect of the present invention, in the image expansion device according to the third aspect , the input code string of the predetermined number of columns is a pixel of each target pixel of a target pixel group including a predetermined number of consecutive pixels. Each value includes a code representing an error value or a continuous number and a pixel value obtained by performing predictive coding or run length compression coding in parallel.
請求項5記載の発明に係る画像伸張装置は、入力された、連続する所定個の画素からなる対象画素群(X1,・・・,Xn)の先頭画素X1の画素値に対して、先頭画素X1の周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた、前記対象画素群(X1,・・・,Xn)の周辺に存在する参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値に基づく以下の(9)式に示す誤差値Err1を表わす符号、及び前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnの画素値に対して、前記対象画素Xnの周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた、前記参照画素群(R1,・・・,Rm)のうちの前記対象画素Xnの周辺の前記参照画素の画素値及び前記対象画素群(X1,・・・,Xn−1)のうち前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素nの周辺の前記対象画素の画素値に基づく以下の(10)式に示す誤差値Errnを表わす符号を各々含む前記所定個の列の符号列に基づいて、前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記先頭画素X1の周辺に存在し、かつ、先に伸張された画素群の画素値に対応する符号表を用いて前記先頭画素X1の誤差値Err1に復号する処理、及び前記対象画素群(X1,・・・,Xn)の先頭画素X1以外の各対象画素について、全ての符号表の各々を用いて該対象画素の誤差値の候補を各々復号する処理を並列に行う並列復号手段と、前記並列復号手段によって復号された前記対象画素群(X1,・・・,Xn)の先頭画素X1の誤差値Err1と、前記先頭画素X1の周辺に存在し、かつ、先に伸張された参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(11)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する処理、及び、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって各符号表を用いて復号された前記対象画素Xnの誤差値の候補と、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、各符号表を用いた場合に対して、以下の(12)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素Xnの周辺の画素値に対応する符号表を用いた場合に対して伸張された画素値を選択する処理を、並列に行う伸長手段とを含む。
Err1=X1−F1(R1、・・・、Rm) ・・・(9)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(10)
X1=Err1+F1’(R1、・・・、Rm) ・・・(11)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(12)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。
According to the fifth aspect of the present invention, there is provided an image decompression device that performs a leading pixel relative to a pixel value of a leading pixel X1 of a target pixel group (X1,. Reference pixel group (R1) existing around the target pixel group (X1,..., Xn) obtained by performing predictive coding using a code table corresponding to the pixel values of the pixel groups around X1 ,..., Rm) represents an error value Err1 represented by the following expression (9) based on the pixel values of the reference pixels around the head pixel X1 including the reference pixel adjacent to the head pixel X1. A code and a code corresponding to a pixel value of a pixel group around the target pixel Xn with respect to a pixel value of each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn). The reference pixel group (R1,...) Obtained by performing predictive coding using a table. , Rm), the pixel value of the reference pixel around the target pixel Xn and the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1). The target pixel group based on the code string of the predetermined number of columns each including a code representing an error value Errn shown in the following equation (10) based on the pixel value of the target pixel around the target pixel n including (X1, · · ·, Xn) for the head pixel X1 of the first present around the pixel X1, and, by using a code table corresponding to the pixel value of the pixel group that is stretched above the head pixel X1 Processing for decoding into error value Err1 , and for each target pixel other than the first pixel X1 of the target pixel group (X1,..., Xn) , error value candidates for the target pixel using each of all code tables Parallel decoding means for performing parallel decoding processing See the decoded said pixel group by a parallel decoding means (X1, · · ·, Xn) and the error value Err1 the first pixel X1 of, be present in the periphery of the head pixel X1, and which is stretched above Using the pixel values of the reference pixels around the head pixel X1 including the reference pixels adjacent to the head pixel X1 in the pixel group (R1,..., Rm) , the following expression (11) for the first pixel X1 while inverse predictive pixel value, the process of decompressing the pixel value of the first pixel X1, and, the target pixel group (X1, · · ·, Xn) each object other than the head pixel X1 of For the pixel Xn, the error value candidates of the target pixel Xn decoded by the parallel decoding means using each code table, and the target pixel in the target pixel group (X1,..., Xn−1) The target pixel Xn− adjacent to Xn Error value of the target pixel around the target pixel Xn including 1 and the pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm). Then, for each code table, the pixel value for the target pixel Xn is inversely predicted by the following equation (12) , and is expanded to the candidate pixel value of the target pixel Xn . among the candidate pixel values, and a decompression means for the process of selecting the decompressed pixel values for the case of using the code table corresponding to the pixel values of the periphery of the target pixel Xn, performed in parallel.
Err1 = X1-F1 (R1,..., Rm) (9)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (10)
X1 = Err1 + F1 ′ (R1,..., Rm) (11)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn-1) (12)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
請求項6記載の発明では、上記請求項5に係る画像伸張装置において、前記伸張手段は、各符号表を用いた場合に対して、前記対象画素群の各対象画素について画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素の周辺の画素値と該対象画素に隣接する前記対象画素の誤差値とに対応する符号表を用いた場合に対して伸張された画素値を選択する処理を行う。 According to a sixth aspect of the present invention, in the image decompression apparatus according to the fifth aspect , the decompression unit performs reverse prediction on a pixel value for each target pixel in the target pixel group, when each code table is used. In addition, the pixel value of each target pixel of the target pixel group is expanded to a candidate pixel value, and among the expanded pixel value candidates, an error between a pixel value around the target pixel and the target pixel adjacent to the target pixel A process of selecting a decompressed pixel value is performed in the case where a code table corresponding to the value is used.
請求項7記載の発明では、上記請求項5又は6に係る画像伸張装置において、前記入力された前記所定個の列の符号列の各々は、連続する所定個の画素からなる対象画素群の各対象画素の画素値に対して並列に、前記対象画素の周辺の画素群の画素値に対応する符号表を用いた予測符号化を行って得られた誤差値を表わす符号を各々含む。 According to a seventh aspect of the present invention, in the image decompressing apparatus according to the fifth or sixth aspect , each of the input code strings of the predetermined number of columns is each of a target pixel group including a predetermined number of consecutive pixels. In parallel with the pixel value of the target pixel, a code representing an error value obtained by performing predictive coding using a code table corresponding to the pixel value of the pixel group around the target pixel is included.
以上説明したように、請求項1記載の画像伸張装置によれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、並列に画像を伸張することができる、という効果が得られる。 As described above, according to the image decompressing apparatus of the first aspect, it is possible to decompress the image in parallel without reducing the compression rate, compared to the case where the image is not decompressed in parallel. Is obtained.
請求項2記載の画像伸張装置によれば、並列に画像を符号化することができる、という効果が得られる。 According to the image expansion device of the second aspect, it is possible to obtain an effect that images can be encoded in parallel.
請求項3記載の画像伸張装置によれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、並列に画像を伸張することができる、という効果が得られる。 According to the image expansion device of the third aspect, it is possible to expand the images in parallel without lowering the compression rate as compared with the case where the images are not expanded in parallel.
請求項4記載の画像伸張装置によれば、並列に画像を符号化することができる、という効果が得られる。 According to the image decompressing apparatus of the fourth aspect, it is possible to obtain an effect that images can be encoded in parallel.
請求項5記載の画像伸張装置によれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、並列に画像を伸張することができる、という効果が得られる。 According to the image expansion device of the fifth aspect, it is possible to expand the images in parallel without reducing the compression rate as compared with the case where the images are not expanded in parallel.
請求項6記載の画像伸張装置によれば、隣接する画素の画素値が伸張されなくても、対象画像の画素値を伸張することができる、という効果が得られる。 According to the image expansion device of the sixth aspect , there is an effect that the pixel value of the target image can be expanded even if the pixel value of the adjacent pixel is not expanded.
請求項7記載の画像伸張装置によれば、並列に画像を符号化することができる、という効果が得られる。 According to the image expansion device of the seventh aspect, it is possible to obtain an effect that images can be encoded in parallel.
以下、本発明の実施の形態について図面を参照して説明する。なお、本発明の実施の形態では、画像圧縮伸張システムに本発明を適用した場合を例に説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the embodiment of the present invention, a case where the present invention is applied to an image compression / decompression system will be described as an example.
図1に示すように、第1の実施の形態に係る画像圧縮伸張システム10は、画像データを圧縮する画像圧縮装置12と、圧縮された画像データを伸張する画像伸張装置14とを備えている。
As shown in FIG. 1, an image compression /
画像圧縮装置12は、圧縮対象となる画像データが入力される画像入力部16と、画像入力部16から入力された画像データを圧縮して、偶数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部18Aと、画像入力部16から入力された画像データを圧縮して、奇数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部18Bとを備えている。
The
以下では、圧縮部18Aによって、2つの隣接する画素X,Yからなる対象画素群のうち、偶数箇所となる方の先頭画素Xの画素値を符号化し、圧縮部18Bによって、奇数箇所となる方の画素Y(先頭画素Xの次の画素)の画素値を符号化する場合を例に説明する。 In the following description, the compression unit 18A encodes the pixel value of the first pixel X that is the even-numbered portion of the target pixel group that is composed of two adjacent pixels X and Y, and the compression unit 18B is the odd-numbered portion. A case where the pixel value of the pixel Y (the pixel next to the first pixel X) is encoded will be described as an example.
圧縮部18Aは、偶数箇所の画素Xを対象画素として、対象画素Xの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Aを算出する予測部20Aと、予測部20Aで算出された誤差Aに対して、可変長符号化(例えば、ハフマン符号化)を行って、誤差シンボル毎に、異なるビット数の符号に変換する符号化部22Aとを備えている。
The compression unit 18A predicts the pixel value of the target pixel X using the even number of pixels X as the target pixel, and calculates the error A between the predicted pixel value and the actual pixel value, and the prediction unit An
また、圧縮部18Bは、奇数箇所の画素Yを対象画素として、対象画素Yの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Bを算出する予測部20Bと、予測部20Bで算出された誤差Bに対して、ハフマン符号化を行って、誤差シンボル毎に、異なるビット数の符号に変換する符号化部22Bとを備えている。
In addition, the compression unit 18B predicts the pixel value of the target pixel Y using the odd-numbered pixels Y as the target pixel, and calculates an error B between the predicted pixel value and the actual pixel value; An encoding unit 22B that performs Huffman coding on the error B calculated by the
予測部20Aは、図2に示すように、偶数箇所の対象画素Xに対して、周辺の画素群(画素A、B、C)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err1を算出する。
Err1=X−(A+B−C)
また、予測部20Bは、図2に示すように、奇数箇所の対象画素Yに対して、周辺の画素群(画素X、B、D)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err2を算出する。
Err2=Y−(X+D−B)
画像圧縮装置12では、圧縮部18A、18Bによって、対象画素群X、Yに対して、並列に画像データの符号化が行われ、各々によって生成される符号によって、図3に示すように、画素の偶数箇所及び奇数箇所に対応して分割された符号ストリームが各々生成される。
As illustrated in FIG. 2, the
Err1 = X− (A + B−C)
Further, as illustrated in FIG. 2, the prediction unit 20 </ b> B uses the pixel values of the surrounding pixel groups (pixels X, B, and D) for the target pixel Y at an odd number of locations, according to the following formula, And an error Err2 from the predicted pixel value is calculated.
Err2 = Y− (X + D−B)
In the
画像伸張装置14は、画像圧縮装置12から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素の画素値に伸張する伸張部24Aと、画像圧縮装置12から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素の画素値に伸張する伸張部24Bと、伸張された偶数箇所の画素の画素値と奇数箇所の画素の画素値とを並べるように結合して、画像データを生成するマージ部26と、マージ部26によって生成された画像データを出力する画像出力部28とを備えている。
The
以下では、伸張部24Aによって、2つの隣接する画素X,Yからなる対象画素群のうち、偶数箇所となる方の先頭画素Xの画素値を伸張し、伸張部24Bによって、奇数箇所となる方の画素Y(先頭画素Xの次の画素)の画素値を伸張する場合を例に説明する。
In the following description, the
伸張部24Aは、画像圧縮装置12から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素Xの誤差Aを復号する復号部30Aと、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Xの画素値を逆予測すると共に、復号された対象画素Xの誤差Aと逆予測された対象画素Xの画素値とから、対象画素Xの画素値に伸張する逆予測部32Aとを備えている。
The
伸張部24Bは、画像圧縮装置12から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素Yの誤差Bを復号する復号部30Bと、対象画素群のうちの対象画素に隣接する画素の復号された誤差A、及び既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、復号された対象画素Yの誤差Bと逆予測された対象画素Yの画素値とから、対象画素Yの画素値に伸張する逆予測部32Bとを備えている。
The decompression unit 24B is adjacent to the target pixel in the target pixel group, and a
なお、復号部30A、30Bが、本発明の並列復号手段に対応し、逆予測部32A、32Bが、本発明の伸張手段に対応している。
The
逆予測部32Aは、図2に示すように、偶数箇所の対象画素(先頭画素)Xに対して、対象画素群X,Yの周辺の、先頭画素Xの隣接する参照画素を含む参照画素群(画素A、B、C)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err1とに基づいて、対象画素Xの画素値を算出する。
X=Err1+(A+B−C)
また、逆予測部32Bは、図2に示すように、奇数箇所の対象画素Yに対して、対象画素群のうちの隣接する画素Xについて復号された誤差Err1と、対象画素群の周辺の参照画素群であって、対象画素Yの周辺の画素(画素A、C、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と対象画素Yの誤差Err2とに基づいて、対象画素Yの画素値を算出する。
Y=Err2+(D−C+A+Err1)
なお、上記の式は、一般的な逆予測の式(Y=Err2+X+D−B)と上記の誤差A(Err1)を算出するための式とから、Xを消去するように導出された式である。
As illustrated in FIG. 2, the inverse prediction unit 32 </ b> A includes a reference pixel group including reference pixels adjacent to the top pixel X around the target pixel groups X and Y with respect to the even number of target pixels (head pixels) X. Using the pixel values of (pixels A, B, and C), the pixel value is inversely predicted according to the following formula, and the pixel value of the target pixel X is determined based on the inversely predicted pixel value and the decoded error Err1. Pixel value is calculated.
X = Err1 + (A + B-C)
In addition, as illustrated in FIG. 2, the inverse prediction unit 32 </ b> B performs error Err <b> 1 decoded for the adjacent pixel X in the target pixel group with respect to the odd-numbered target pixel Y, and references around the target pixel group. In the pixel group, pixel values of pixels around the target pixel Y (pixels A, C, and D) are used to reverse predict the pixel value according to the following formula, and the reverse predicted pixel value and the target pixel Based on the Y error Err2, the pixel value of the target pixel Y is calculated.
Y = Err2 + (D-C + A + Err1)
Note that the above expression is an expression derived so as to eliminate X from a general inverse prediction expression (Y = Err2 + X + D−B) and an expression for calculating the above error A (Err1). .
画像伸張装置14では、伸張部24A、24Bによって、対象画素群X、Yに対して、並列に誤差値の復号が行われると共に、並列に画素値の逆予測及び伸張が行われて、対象画素群X、Yの画素値が出力される。
In the
ここで、予測及び逆予測について、一般的な式を説明する。 Here, general formulas for prediction and inverse prediction will be described.
まず、画素値の予測では、図4に示すように、対象画素群の先頭画素X1に対して、周辺の画素群(画素R1、R2、・・・、Rm)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err1を算出する。
Err1=X1−F1(R1、・・・、Rm)
First, in the prediction of pixel values, as shown in FIG. 4, the pixel values of the surrounding pixel groups (pixels R1, R2,..., Rm) are used for the first pixel X1 of the target pixel group, and In addition to predicting the pixel value, an error Err1 from the predicted pixel value is calculated.
Err1 = X1-F1 (R1,..., Rm)
なお、F1( )は、先頭画素X1の画素値を予測するための関数である。 F1 () is a function for predicting the pixel value of the first pixel X1.
また、対象画素群の先頭画素X1に隣接する次の対象画素X2に対して、周辺の画素群(画素R1、・・・、Rm、X1)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Err2を算出する。
Err2=X2−F2(R1、・・・、Rm、X1)
In addition, for the next target pixel X2 adjacent to the first pixel X1 of the target pixel group, the pixel values of the peripheral pixel group (pixels R1,..., Rm, X1) are used according to the following formula. A value is predicted, and an error Err2 from the predicted pixel value is calculated.
Err2 = X2-F2 (R1,..., Rm, X1)
なお、F2( )は、対象画素X2の画素値を予測するための関数である。 F2 () is a function for predicting the pixel value of the target pixel X2.
また、対象画素群のn番目の対象画素Xnに対して、周辺の画素群(画素R1、・・・、Rm、X1、・・・、Xn−1)の画素値を用いて、以下の式に従って、画素値を予測すると共に、予測された画素値との誤差Errnを算出する。
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1)
Further, for the nth target pixel Xn of the target pixel group, using the pixel values of the surrounding pixel groups (pixels R1,..., Rm, X1,..., Xn−1), And predicting the pixel value and calculating an error Errn with the predicted pixel value.
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1)
なお、Fn( )は、対象画素Xnの画素値を予測するための関数である。 Fn () is a function for predicting the pixel value of the target pixel Xn.
画素値の逆予測では、図4に示すように、対象画素群の先頭画素X1に対して、対象画素群X1、・・・、Xnの周辺の参照画素群(画素R1、・・・、Rm)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err1とに基づいて、対象画素X1の画素値を算出する。
X1=Err1+F1’(R1、・・・、Rm)
なお、F1’( )は、先頭画素X1の画素値を逆予測するための関数である。
In the inverse prediction of the pixel value, as shown in FIG. 4, with respect to the first pixel X1 of the target pixel group, reference pixel groups (pixels R1,..., Rm) around the target pixel group X1,. ) Is used to inversely predict the pixel value according to the following formula, and the pixel value of the target pixel X1 is calculated based on the inversely predicted pixel value and the decoded error Err1.
X1 = Err1 + F1 ′ (R1,..., Rm)
Note that F1 ′ () is a function for inversely predicting the pixel value of the first pixel X1.
また、対象画素群の先頭画素X1に隣接する次の対象画素X2に対して、対象画素群X1、・・・、Xnの周辺の参照画素群(画素R1、・・・、Rm)の画素値と、復号された先頭画素X1の誤差Err1とを用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err2とに基づいて、対象画素X2の画素値を算出する。
X2=Err2+F2’(R1、・・・、Rm、Err1)
Further, for the next target pixel X2 adjacent to the first pixel X1 of the target pixel group, the pixel values of the reference pixel group (pixels R1,..., Rm) around the target pixel group X1,. And the error Err1 of the decoded first pixel X1 are subjected to reverse prediction of the pixel value according to the following expression, and the target pixel X2 is based on the reversely predicted pixel value and the decoded error Err2. The pixel value of is calculated.
X2 = Err2 + F2 ′ (R1,..., Rm, Err1)
なお、F2’( )は、対象画素X2の画素値を逆予測するための関数である。 Note that F2 ′ () is a function for inversely predicting the pixel value of the target pixel X2.
また、対象画素群のn番目の対象画素Xnに対して、対象画素群X1、・・・、Xnの周辺の参照画素群(画素R1、・・・、Rm)の画素値と、復号された対象画素群X1、・・・、Xn−1の誤差Err1、・・・、Errn−1を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Errnとに基づいて、対象画素Xnの画素値を算出する。
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1)
In addition, with respect to the nth target pixel Xn of the target pixel group, the pixel values of the reference pixel group (pixels R1,..., Rm) around the target pixel group X1,. Using the errors Err1,..., Err-1 of the target pixel group X1,..., Xn-1, the pixel value is inversely predicted according to the following formula, and the inversely predicted pixel value is decoded. Based on the error Errn, the pixel value of the target pixel Xn is calculated.
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Err-1)
なお、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。 Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
上記図4で、R1、・・・、Rmは参照画素群を表しており、対象画素群の先頭画素X1より前に出現したすべての画素の集合である。対象画素について、直前までの画素の誤差集合と参照画素集合とを用いて画素値が伸張される。すなわち、上記の逆予測のための式では、前に出現した画素Xの画素値を用いずに、計算が行なわれる。なお、予測のための式及び逆予測のための式は和減算であることが一般的なので、関数F、F’も簡単な計算式となる。 In FIG. 4, R1,..., Rm represent a reference pixel group, which is a set of all pixels that appear before the first pixel X1 of the target pixel group. For the target pixel, the pixel value is expanded using the error set and reference pixel set of the previous pixels. That is, in the above formula for inverse prediction, the calculation is performed without using the pixel value of the pixel X that appears before. Since the formula for prediction and the formula for inverse prediction are generally sum subtraction, the functions F and F ′ are also simple calculation formulas.
画像入力部16、圧縮部18A、圧縮部18B、伸張部24A、伸張部24B、マージ部26、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。
The
次に、第1の実施の形態に係る画像圧縮伸張システム10の作用を説明する。
Next, the operation of the image compression /
まず、画像圧縮装置12において、画像入力部16から画像データが入力されると、圧縮部18A、18Bによって、画像データの対象画素群の偶数箇所の対象画素及び奇数箇所の対象画素の各々について、並列に予測符号化を行い、別々の符号ストリームとして符号を各々出力する。
First, in the
このとき、圧縮部18Aでは、対象画素群の偶数箇所の画素Xを対象画素として、予測部20Bによって、画像データにおける対象画素Xの周辺の画素の画素値を用いて、対象画素Xの画素値を予測すると共に、対象画素Xの実際の画素値との誤差Aを算出して、出力する。また、符号化部22Aによって、予測部20Aから出力された誤差Aをハフマン符号化によって符号化して、符号を出力する。
At this time, in the compression unit 18A, the pixel value of the target pixel X is determined by using the pixel values of the pixels around the target pixel X in the image data by the
また、同様に、圧縮部18Bでは、対象画素群の奇数箇所の画素Yを対象画素として、予測部20Bによって、対象画素Yの誤差Bを算出して出力し、符号化部22Aによって、符号化して符号を出力する。
Similarly, the compression unit 18B calculates and outputs an error B of the target pixel Y by the
次に、画像伸張装置14において、画像圧縮装置12から出力された、偶数箇所の画素に対応する符号ストリームと奇数箇所の画素に対応する符号ストリームとが入力されると、伸張部24A、24Bによって、画像データの対象画素群X,Yの偶数箇所の対象画素X及び奇数箇所の対象画素Yの各々について、並列に誤差を復号すると共に、並列に逆予測及び伸張を行って、画素値を各々出力する。
Next, when the code stream corresponding to the even-numbered pixels and the code stream corresponding to the odd-numbered pixels output from the
このとき、伸張部24Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、復号部30Aによって、符号ストリームから対象画素Xの符号を取り出し、取り出した符号を対象画素Xの誤差Aに復号する。また、逆予測部32Aによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Xの画素値を予測すると共に、復号された誤差Aを用いて、対象画素Xの画素値に伸張して出力する。
At this time, in the
また、伸張部24Bでは、対象画素群の奇数箇所の画素(先頭画素の次の画素)Yを対象画素として、復号部30Bによって、符号ストリームから対象画素Yの符号を取り出し、取り出した符号を対象画素Yの誤差Bに復号する。また、逆予測部32Bによって、復号部30Aから、対象画素群の先頭画素Xの誤差Aを取得すると、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、対象画素群の先頭画素Xの誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。
Further, in the decompression unit 24B, the code of the target pixel Y is extracted from the code stream by the
そして、マージ部26によって、伸張部24A、24Bの各々から、伸張された画素値を取得すると、取得した対象画素群の各画素X,Yの画素値を結合して、画像データとして画像出力部28及び伸張部24A、24Bに出力する。
When the expanded pixel value is acquired from each of the
次に、画像伸張装置14の伸張部24A、24Bにおいて同期を取る場合のタイミングについて説明する。
Next, the timing when synchronization is performed in the
図5に示すように、画素マージ待ちを除けば伸張部24Aに待ち時間は発生しない。ここでの”待ち”とは、他の伸張部の出力結果を待たなければ処理を先に進められない状態を指す。伸張部24Bでは、誤差Aの復号待ちと画素マージ待ちとが発生する。
As shown in FIG. 5, no waiting time occurs in the
従って、伸張部24A、24Bにおける誤差の復号時間を揃え、逆予測処理の時間を揃えることが好ましい。上記図5の例では、伸張部24Aの画素マージ待ちと伸張部24Bの誤差Aの復号待ちとが発生する場合を表している。
Therefore, it is preferable to align the decoding time of errors in the decompressing
以上説明したように、第1の実施の形態に係る画像圧縮伸張システムによれば、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。 As described above, according to the image compression / decompression system according to the first embodiment, an image is decompressed in parallel by the image decompression apparatus without reducing the compression rate as compared with the case where the image is not decompressed in parallel. Can be stretched.
また、隣接する画素の画素値を用いて誤差演算して逆予測処理を行う場合に比べて、隣接する画素の画素値が確定するのを待たなくても、隣接する画素の誤差値が復号されれば逆予測処理を行うことができるため、並列に画像を伸張することができる。 Compared to the case where the inverse prediction process is performed by calculating the error using the pixel value of the adjacent pixel, the error value of the adjacent pixel is decoded without waiting for the pixel value of the adjacent pixel to be determined. Therefore, since the inverse prediction process can be performed, the images can be expanded in parallel.
また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行っているので、圧縮率を低下させずに、画像データの圧縮及び伸張を行うことができる。 Further, since error calculation is performed using pixel values or error values of adjacent pixels, image data can be compressed and expanded without reducing the compression rate.
なお、上記の実施の形態では、2つの連続する画素を対象画素群とし、対象画素群の2つの対象画素に対して、並列に復号処理及び逆予測処理を行う場合を例に説明したが、これに限定されるものではなく、3つ以上のN個の連続する画素を対象画素群とし、対象画素群のN個の対象画素に対して、並列に復号処理及び逆予測処理を行うようにしてもよい。この場合には、符号ストリームとして、N個の列の符号ストリームを生成して、画像伸張装置に入力するようにすればよい。 In the above embodiment, a case has been described in which two consecutive pixels are set as a target pixel group, and decoding processing and inverse prediction processing are performed in parallel on two target pixels in the target pixel group. The present invention is not limited to this, and three or more N consecutive pixels are set as a target pixel group, and decoding processing and inverse prediction processing are performed in parallel on N target pixels in the target pixel group. May be. In this case, a code stream of N columns may be generated as a code stream and input to the image expansion apparatus.
次に、第2の実施の形態について説明する。なお、第1の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。 Next, a second embodiment will be described. In addition, about the part which becomes the structure similar to 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.
第2の実施の形態では、予測符号化とランレングス符号化とを組み合わせて、画像データの圧縮、伸張を行っている点が、第1の実施の形態と主に異なっている。 The second embodiment is mainly different from the first embodiment in that image data is compressed and expanded by combining predictive coding and run-length coding.
図6に示すように、第2の実施の形態に係る画像圧縮伸張システム210は、画像データを圧縮する画像圧縮装置212と、圧縮された画像データを伸張する画像伸張装置214とを備えている。
As shown in FIG. 6, an image compression /
画像圧縮装置212は、画像入力部16と、画像入力部16から入力された画像データを圧縮して、偶数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部218Aと、画像入力部16から入力された画像データを圧縮して、奇数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部218Bとを備えている。
The
圧縮部218Aは、偶数箇所の画素を対象画素Xとして、直前の奇数箇所の画素Aの画素値と一致すれば、ランレングス符号化(連長圧縮符号化)を行って、直前の画素と順々に比較して偶数箇所の画素分だけ連続数を計数すると共に、連続する画素値を出力し、一致しない場合には、連続数0を出力するラン計数部219Aと、直前の奇数箇所の画素Aの画素値と一致しない場合に、上記第1の実施の形態と同様に、対象画素Xの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Aを算出する予測部220Aと、連続数0が出力された場合、誤差IDを表わす符号を出力し、連続数が1以上である場合には、ランIDを表わす符号を出力するID符号化部221Aと、ラン計数部219Aから出力されたランA(連続数及び画素値)、又は予測部220Aで算出された誤差Aに対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部222Aと、ID符号化部221Aからの符号と符号化部222Aからの符号とを結合して1シンボルとして出力する符号出力部223Aとを備えている。
The compression unit 218A sets the even-numbered pixel as the target pixel X and performs run-length coding (continuous length compression coding) if the pixel value matches the pixel value of the immediately preceding odd-numbered pixel A, in order with the previous pixel. Compared to each other, the continuous number is counted for even-numbered pixels, and continuous pixel values are output. If they do not match, the run-counting unit 219A that outputs the continuous number 0 and the immediately preceding odd-numbered pixel Prediction for predicting the pixel value of the target pixel X and calculating the error A between the predicted pixel value and the actual pixel value, as in the first embodiment, when the pixel value does not match the pixel value of A
圧縮部218Bは、奇数箇所の画素Yを対象画素として、直前の偶数箇所の画素Xの画素値と一致すれば、ランレングス符号化を行って、直前の画素と順々に比較して奇数箇所の画素分だけ連続数を計数すると共に、連続する画素値を出力し、一致しない場合には、連続数0を出力するラン計数部219Bと、直前の偶数箇所の画素Xの画素値と一致しない場合に、上記第1の実施の形態と同様に、対象画素Yの画素値を予測すると共に、予測された画素値と実際の画素値との誤差Bを算出する予測部220Bと、連続数0が出力された場合、誤差IDを表わす符号を出力し、連続数が1以上である場合には、ランIDを表わす符号を出力するID符号化部221Bと、ラン計数部219Bから出力されたランB(連続数及び画素値)、又は予測部220Bで算出された誤差Bに対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部222Bと、ID符号化部221Bからの符号と符号化部222Bからの符号とを結合して1シンボルとして出力する符号出力部223Bとを備えている。
The compression unit 218B sets the odd-numbered pixel Y as the target pixel and performs run-length encoding if the pixel value of the previous even-numbered pixel X matches the odd-numbered pixel. The continuous number is counted for the number of pixels, and continuous pixel values are output. If they do not match, the run counting unit 219B that outputs the continuous number 0 does not match the pixel values of the immediately preceding even-numbered pixels X. In this case, as in the first embodiment, the
画像圧縮装置212では、圧縮部218A、218Bによって、偶数箇所の画素及び奇数箇所の画素に対して、並列に画像データの予測符号化又はランレングス符号化が行われ、各々によって生成される符号によって、偶数箇所及び奇数箇所の各々に対応する符号ストリームが生成されて出力される。なお、本実施の形態では、偶数箇所の画素に対して符号化された符号に対する少なくとも1つの画素と、奇数箇所の画素に対して符号化された符号に対する少なくとも1つの画素とを、対象画素群とする。
In the
画像伸張装置214は、画像圧縮装置212から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素の画素値に伸張する伸張部224Aと、画像圧縮装置212から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素の画素値に伸張する伸張部224Bと、マージ部26と、画像出力部28とを備えている。
The
伸張部224Aは、画像圧縮装置212から出力された偶数箇所の画素に対する符号ストリームが入力される符号入力部229Aと、符号入力部229Aから入力された符号ストリームから、偶数箇所の対象画素XのID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部230Aと、ID復号部230AによるIDの解釈結果に応じて、符号ストリームから、偶数箇所の対象画素Xの誤差A、又はランA(連続数及び画素値)を復号する復号部231Aと、復号部231Aから誤差Aが復号された場合、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Xの画素値を逆予測すると共に、復号された対象画素Xの誤差Aと逆予測された対象画素Xの画素値とから、対象画素Xの画素値に伸張する逆予測部232Aと、復号部231AからランA(連続数及び画素値)が復号された場合、画素値と連続数とを保持するラン保持部233Aと、ラン保持部233Aに保持されている画素値を、連続数に応じて展開するラン展開部234Aとを備えている。
The
伸張部224Bは、画像圧縮装置212から出力された奇数箇所の画素に対する符号ストリームが入力される符号入力部229Bと、符号入力部229Bから入力された符号ストリームから、奇数箇所の対象画素YのID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部230Bと、ID復号部230BによるIDの解釈結果に応じて、符号ストリームから、奇数箇所の対象画素Yの誤差B、又はランB(連続数及び画素値)を復号する復号部231Bと、ID復号部230AによるIDの解釈結果、及びID復号部230BによるIDの解釈結果に基づいて、ラン展開又は逆予測処理を切り替える制御部232Bを備えている。
The
また、伸張部224Bは、ID復号部230BでランIDであると解釈された場合に、復号部231Bにより復号された連続数及び画素値を保持するラン保持部233Bと、ラン保持部233Bに保持されている画素値を、連続数に応じて展開するラン展開部234Bと、ID復号部230AでランIDであると解釈され、ID復号部230Bで誤差IDであると解釈された場合に、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、復号された対象画素Yの誤差Bと逆予測された対象画素Yの画素値とから、対象画素Yの画素値に伸張する逆予測部236Bと、ID復号部230A及びID復号部230Bの双方で誤差IDであると解釈された場合に、既に伸張された対象画素群の周辺の参照画素群の画素値と、復号された対象画素Xの誤差Aとから対象画素Yの画素値を逆予測すると共に、復号された対象画素Yの誤差Bと逆予測された対象画素Yの画素値とから、対象画素Yの画素値に伸張する逆予測部237Bとを備えている。
In addition, when the
なお、復号部231A、231Bが、本発明の並列復号手段に対応し、ラン保持部233A、233B、ラン展開部234A、234B、逆予測部232A、236B、237Bが、本発明の展開手段に対応している。
The
ラン保持部233Aは、図7に示すように、ID復号部230AでランIDであると解釈された場合、連続数及び画素値を保持し、ラン展開部234Aに1画素ずつ画素値を出力すると共に、保持している連続数を1ずつデクリメントする。
As shown in FIG. 7, the
また、ラン保持部233Aは、ID復号部230Aに制御データを出力する。この制御データとして、保持している連続数が0のときには復号可を表わす信号が出力され、0以外の場合には復号不可を表す信号が出力される。
The
ID復号部230Aは、制御データとして復号可を表わす信号が入力された場合に、符号ストリームからID符号を取り出して解釈し、制御データとして復号不可を表わす信号が入力された場合に、ID符号の取り出しを停止する。 The ID decoding unit 230A extracts and interprets the ID code from the code stream when a signal indicating that decoding is possible is input as control data, and when the signal indicating that decoding is impossible is input as control data, Stop ejecting.
逆予測部232Aは、図7に示すように、ID復号部230Aで誤差IDであると解釈された場合、偶数箇所の対象画素Xに対して、対象画素群X,Yの周辺の、先頭画素Xの隣接する参照画素を含む参照画素群(画素A、B、C)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err1とに基づいて、対象画素Xの画素値を算出する。
X=Err1+(A+B−C)
As illustrated in FIG. 7, when the ID decoding unit 230 </ b> A interprets the inverse prediction unit 232 </ b> A as the error ID, the reverse prediction unit 232 </ b> A is the first pixel around the target pixel groups X and Y with respect to the target pixel X at even locations. Using the pixel values of the reference pixel group (pixels A, B, and C) including reference pixels adjacent to X, the pixel value is inversely predicted according to the following formula, and the inversely predicted pixel value is decoded. Based on the error Err1, the pixel value of the target pixel X is calculated.
X = Err1 + (A + B-C)
また、同様に、ラン保持部233Bは、連続数及び画素値を保持し、ラン展開部234Bに1画素分ずつ画素値を出力すると共に、保持している連続数を1ずつデクリメントする。また、ラン保持部233Bは、ID復号部230Bに制御データを出力する。ID復号部230Bは、制御データとして復号可を表わす信号が入力された場合に、符号ストリームからID符号を取り出して解釈し、制御データとして復号不可を表わす信号が入力された場合に、符号ストリームからのID符号の取り出しを停止する。
Similarly, the
制御部232Bは、図8に示すような、ID復号部230AによるIDの解釈結果、及びID復号部230BによるIDの解釈結果のパターンに応じて、復号された誤差A、誤差B、並びに、ランA(連続数及び画素値)の少なくとも1つを、ラン保持部233B、逆予測部236B、及び逆予測部237Bの何れか1つに受け渡す。
The
逆予測部236Bは、奇数箇所の対象画素Yに対して、対象画素群X,Yの周辺の参照画素群であって、先頭画素Xに隣接する参照画素Aを含む対象画素Yの周辺の画素(画素A、B、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err2とに基づいて、対象画素Yの画素値を算出する。
Y=Err2+(A+D−B)
The
Y = Err2 + (A + D−B)
なお、上記の式は、一般的な逆予測の式(Y=Err2+X+D−B)におけるXを、Xと等しいAに置き換えた式である。 The above formula is a formula in which X in the general inverse prediction formula (Y = Err2 + X + D−B) is replaced with A equal to X.
また、逆予測部237Bは、奇数箇所の対象画素Yに対して、対象画素群のうちの隣接する画素Xについて復号された誤差Err1と、対象画素群の周辺の参照画素群(画素A、C、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と対象画素Yの誤差Err2とに基づいて、対象画素Yの画素値を算出する。
Y=Err2+(D−C+A+Err1)
In addition, the
Y = Err2 + (D-C + A + Err1)
画像伸張装置214では、伸張部224A、224Bによって、偶数箇所の画素X、及び奇数箇所の画素Yに対して、誤差値、又は連続数及び画素値の復号が並列に行われると共に、画素値の逆予測及び伸張、又は展開が並列に行われて、偶数箇所の画素X、及び奇数箇所の画素Yの画素値が出力される。
In the
画像入力部16、圧縮部218A、圧縮部218B、伸張部224A、伸張部224B、マージ部26、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。
The
次に、第2の実施の形態に係る画像圧縮伸張システム210の作用を説明する。
Next, the operation of the image compression /
まず、画像圧縮装置212において、画像入力部16から画像データが入力されると、圧縮部218A、218Bによって、画像データの対象画素群の偶数箇所の対象画素及び奇数箇所の対象画素の各々について、並列に予測符号化又はランレングス符号化を行い、別々の符号ストリームとして符号を各々出力する。
First, in the
このとき、圧縮部218Aでは、対象画素群の偶数箇所の画素Xを対象画素として、対象画素Xの直前の奇数箇所の画素Aの画素値と比較して、画素値が一致する場合には、ラン計数部219Aによって、直前の画素の画素値と順々に比較して、偶数箇所の画素分の連続数を計数し、連続数及び連続する画素値をランAとして出力する。 At this time, in the compression unit 218A, when the pixel values match when compared with the pixel values of the odd-numbered pixels A immediately before the target pixel X using the even-numbered pixels X of the target pixel group as the target pixel, The run counting unit 219A sequentially compares the pixel value of the immediately preceding pixel, counts the continuous number of pixels at even locations, and outputs the continuous number and the continuous pixel value as run A.
一方、対象画素Xの直前の奇数箇所の画素Aの画素値と比較して、画素値が一致しない場合には、ラン計数部219Aによって、連続数0を出力すると共に、予測部220Bによって、画像データにおける対象画素Xの周辺の画素の画素値を用いて、対象画素Xの画素値を予測すると共に、対象画素Xの実際の画素値との誤差Aを算出して、出力する。
On the other hand, when the pixel values do not match with the pixel values of the odd-numbered pixels A immediately before the target pixel X, the run number unit 219A outputs the continuous number 0, and the
ラン計数部219Aより連続数0が出力された場合、ID符号化部221Aによって、誤差IDを表わすID符号を出力し、また、符号化部222Aによって、予測部220Aから出力された誤差Aをハフマン符号化によって符号化して、誤差符号を出力する。
When the run count unit 219A outputs the continuation number 0, the ID encoding unit 221A outputs an ID code representing the error ID, and the
また、ラン計数部219Aより1以上の連続数が出力された場合、ID符号化部221Aによって、ランIDを表わすID符号を出力し、また、符号化部222Aによって、ラン計数部219Aから出力された連続数及び画素値をハフマン符号化によって符号化して、ラン符号を出力する。
When a run number of 1 or more is output from the run counter 219A, an ID code representing the run ID is output from the ID encoder 221A, and output from the run counter 219A by the
そして、符号出力部223Aによって、ID符号化部221Aより出力されたID符号と符号化部222Aより出力された符号とを結合して、偶数箇所に対応する符号ストリームとして出力する。
Then, the
また、圧縮部218Bでは、対象画素群の奇数箇所の画素Yを対象画素として、圧縮部218Aの各部と同様に動作する。 Further, the compression unit 218B operates in the same manner as each unit of the compression unit 218A with the pixel Y at an odd number in the target pixel group as the target pixel.
次に、画像伸張装置214において、画像圧縮装置212から出力された、偶数箇所の画素に対応する符号ストリームと奇数箇所の画素に対応する符号ストリームとが入力されると、伸張部224A、224Bによって、画像データの偶数箇所の画素及び奇数箇所の画素の各々について、誤差、又は連続数及び画素値を並列に復号すると共に、逆予測及び伸張、又はラン展開を並列に行って、画素値を各々出力する。
Next, when the code stream corresponding to the even-numbered pixels and the code stream corresponding to the odd-numbered pixels output from the
このとき、伸張部224Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、ID復号部230Aによって、復号の可否を表わす制御データに応じて、符号ストリームから対象画素XのID符号を取り出し、ID符号を解釈する。そして、復号部231Aによって、符号ストリームから対象画素Xの符号を取り出し、ID符号の解釈結果に応じて、取り出した符号を、対象画素Xの誤差、又は連続数及び画素値に復号する。このとき、ID復号部230AによるID符号の解釈結果は、制御部232Bに出力される。
At this time, in the
連続数及び画素値が復号された場合には、ラン保持部233Aによって連続数及び画素値が保持され、ラン展開部234Aによって、ラン保持部233Aに保持されている画素値が対象画素の画素値として展開されると共に、ラン保持部233Aの連続数が1ずつデクリメントされる。ラン保持部233Aの連続数が0になるまで、ラン展開部234Aによって、保持されている画素値が対象画素の画素値として展開されると共に、復号不可を表わす制御データをID復号部230Aへ出力し、ID復号部230AによるID符号の取り出しを停止させる。
When the continuous number and the pixel value are decoded, the continuous number and the pixel value are held by the
ラン保持部233Aの連続数が0になると、ラン展開部234Aによる画素値の展開が停止し、ラン保持部233Aによって、復号可を表わす制御データをID復号部230Aへ出力し、ID復号部230AによるID符号の取り出し及びIDの復号を再開させる。
When the number of consecutive
また、誤差が復号された場合には、逆予測部232Aによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Xの画素値を予測すると共に、復号された誤差Aを用いて、対象画素Xの画素値に伸張して出力する。
If the error is decoded, the
また、伸張部224Bでは、対象画素群の奇数箇所の画素(先頭画素Xの次の画素)Yを対象画素として、ID復号部230Bによって、復号の可否を表わす制御データに応じて、符号ストリームから対象画素YのID符号を取り出し、ID符号を解釈する。そして、復号部231Bによって、符号ストリームから対象画素Yの符号を取り出し、ID符号の解釈結果に応じて、取り出した符号を、対象画素Yの誤差、又は連続数及び画素値に復号する。このとき、ID復号部230BによるID符号の解釈結果は、制御部232Bに出力される。
Further, in the
ID復号部230BでランIDであると解釈された場合には、制御部232Bによって、復号された連続数及び画素値をラン保持部233Bに受け渡す。
When the
そして、ラン保持部233Bによって連続数及び画素値が保持され、ラン展開部234Bによって、ラン保持部233Bに保持されている画素値が、偶数箇所の画素の画素値として展開されると共に、ラン保持部233Bの連続数が1ずつデクリメントされる。ラン保持部233Bの連続数が0になるまで、ラン展開部234Bによって、保持されている画素値が、偶数箇所の画素の画素値として展開されると共に、復号不可を表わす制御データがID復号部230Bへ出力され、ID復号部230BによるID符号の取り出しが停止される。
The
ラン保持部233Bの連続数が0になると、ラン展開部234Bによる画素値の展開が停止し、ラン保持部233Bによって、復号可を表わす制御データをID復号部230Bへ出力し、ID復号部230BによるID符号の取り出し及びIDの復号を再開させる。
When the number of consecutive
また、ID復号部230AによってランIDであると解釈され、かつ、ID復号部230Bによって誤差IDであると解釈された場合には、制御部232Bによって、復号された誤差Bを逆予測部236Bに受け渡す。
When the ID decoding unit 230A interprets the run ID and the
そして、逆予測部236Bによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。
The
また、ID復号部230A及びID復号部230Bの双方によって誤差IDであると解釈された場合には、制御部232Bによって、復号部231Aより復号された誤差A、及び復号された誤差Bを逆予測部237Bに受け渡す。
In addition, when the error ID is interpreted by both the ID decoding unit 230A and the
そして、逆予測部237Bによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号部231Aにより復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。
Then, the pixel value of the reference pixel group around the target pixel group and the error A decoded by the
そして、マージ部26によって、伸張部224A、224Bの各々から、伸張された対象画素群の偶数箇所の画素及び奇数箇所の画素の画素値を取得すると、取得した対象画素群の偶数箇所の画素及び奇数箇所の画素の画素値を結合して、画像データとして画像出力部28及び伸張部224A、224Bに出力する。
When the
次に、画像伸張装置214の伸張部224A、224Bにおいて同期を取る場合のタイミングについて説明する。
Next, timing when synchronization is performed in the
図9に示すように、伸張部224A、224Bの双方で誤差IDであると解釈され、伸張部224Bにおいて、逆予測部237Bによる逆予測を行う場合には、誤差Aの復号待ちが発生する可能性がある。
As shown in FIG. 9, when both the
逆に、図10に示すように、伸張部224AでランIDであると解釈されると共に、伸張部224Bで誤差IDであると解釈され、逆予測部236Bによる逆予測を行う場合には、誤差A(Err1)を参照しないため、誤差Aの復号待ちは発生しない。
On the contrary, as shown in FIG. 10, when the
また、上記のいずれの場合にも、画素マージ待ちとID復号部230Aによる復号待ちは発生する。本実施の形態では、マージ部26は、伸張部224A、224Bから伸張された画素値が出力されるのを待つ。具体的には、対象画素群の画素X、Yの2画素の伸張が終了するまで待ち状態になる。
In any of the above cases, waiting for pixel merging and waiting for decoding by the ID decoding unit 230A occur. In the present embodiment, the
一般的に、ID復号や、誤差又はランの復号で、伸張部間の性能差はないため、待ち時間は小さいが、伸張部224A、224Bの復号部231A、231Bによる復号時間を揃え、ID復号部230A、230Bによる復号時間を揃えることが好ましい。また、伸張部224A、224Bのラン展開部234A、234B、逆予測部232A、236B、237Bの処理時間を揃えることが好ましい。
In general, there is no performance difference between decompression units in ID decoding or error or run decoding, so the waiting time is small, but the decoding times by the
以上説明したように、第2の実施の形態に係る画像圧縮伸張システムによれば、予測符号化とランレングス符号化とを組み合わせた符号化を行う場合であっても、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。 As described above, according to the image compression / decompression system according to the second embodiment, images are not decompressed in parallel even when encoding that combines predictive encoding and run-length encoding is performed. Compared to the case, images can be decompressed in parallel by the image decompression device without reducing the compression rate.
また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行うと共に、隣接する画素の画素値を参照して、画素値の連続数の計数を行っているので、圧縮率を低下させずに、画像データの圧縮、伸張を行うことができる。 Also, error calculation is performed using the pixel value or error value of the adjacent pixel, and the number of consecutive pixel values is counted by referring to the pixel value of the adjacent pixel. In addition, image data can be compressed and expanded.
次に、第3の実施の形態について説明する。なお、第1の実施の形態及び第2の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。 Next, a third embodiment will be described. In addition, about the part which becomes the same structure as 1st Embodiment and 2nd Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.
第3の実施の形態では、画素値の連続数の計数を、画素の偶数箇所及び奇数箇所で分けずに、スキャンライン順に行っている点が、第2の実施の形態と主に異なっている。 The third embodiment is mainly different from the second embodiment in that the counting of the continuous number of pixel values is performed in the order of scan lines without dividing the even number and odd number of pixels. .
図11に示すように、第3の実施の形態に係る画像圧縮伸張システム310は、画像データを圧縮する画像圧縮装置312と、圧縮された画像データを伸張する画像伸張装置314とを備えている。
As shown in FIG. 11, an image compression /
画像圧縮装置312は、画像入力部16と、画像入力部16から入力された画像データを圧縮して、符号の1シンボル毎に分けて出力する圧縮部318と、偶数番目に出力された符号からなる符号ストリームを出力する符号出力部318Aと、奇数番目に出力された符号からなる符号ストリームを出力する符号出力部318Bとを備えている。
The
圧縮部318は、スキャンライン順に、対象画素を設定し、直前の画素の画素値と一致すれば、ランレングス符号化(連長圧縮符号化)を行って、直前の画素と順々に比較して連続数を計数すると共に、連続する画素値を出力し、一致しない場合には、連続数0を出力するラン計数部319と、直前の画素の画素値と一致しない場合に、上記第1の実施の形態と同様に、対象画素の画素値を予測すると共に、予測された画素値と実際の画素値との誤差を算出する予測部320と、連続数0が出力された場合、誤差IDを表わすID符号を出力し、連続数が1以上である場合には、ランIDを表わすID符号を出力するID符号化部321と、ラン計数部319から出力されたラン(連続数及び画素値)、又は予測部320で算出された誤差に対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部322と、ID符号化部321からのID符号と符号化部322からの符号とを結合すると共に、結合された符号シンボル毎に分割して出力する分割部323とを備えている。
The compression unit 318 sets the target pixel in the scan line order, and if it matches the pixel value of the previous pixel, performs the run length encoding (continuous length compression encoding) and sequentially compares with the previous pixel. And the continuous pixel value is output, and if the pixel values do not coincide with each other, the
分割部323は、0から開始するカウンタ(図示省略)を保持している。カウンタは、符号の1シンボルが入力されるタイミングでインクリメントされる。つまり、”ID符号+ラン符号”、もしくは”ID符号+誤差符号”が入力されるタイミングでインクリメントされる。分割部323は、カウンタが偶数の場合には、1シンボルの符号を符号出力部318Aへ出力し、カウンタが奇数の時には、1シンボルの符号を符号出力部318Bへ出力する。
The dividing
画像圧縮装置312では、圧縮部318によって、各対象画素Xに対して、画像データの予測符号化又はランレングス符号化が行われて、生成される符号が1シンボル毎に分割され、偶数番目及び奇数番目の各々に対応する符号ストリームが生成されて出力される。
In the
画像伸張装置314は、画像圧縮装置312から出力された偶数番目の符号に対する符号ストリームから、対象画素の画素値に伸張する伸張部324Aと、画像圧縮装置312から出力された奇数番目の符号に対する符号ストリームから、対象画素の画素値に伸張する伸張部324Bと、偶数番目の符号から伸張された画素の画素値と奇数番目の符号から伸張された画素の画素値とを並べるように結合して、画像データを生成するマージ部326と、画像出力部28とを備えている。なお、本実施の形態では、偶数番目の符号に対応する少なくとも1つの画素と、奇数番目の符号に対する少なくとも1つの画素とを、対象画素群とする。
The
伸張部324Aは、画像圧縮装置312から出力された偶数番目の符号に対する符号ストリームが入力される符号入力部329Aと、符号入力部329Aから入力された符号ストリームから、偶数番目の符号のID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部330Aと、ID復号部330AによるIDの解釈結果に応じて、符号ストリームから、偶数番目の符号の誤差A、又はランA(連続数及び画素値)を復号する復号部331Aと、逆予測部232Aと、復号部331Aから連続数及び画素値が復号された場合、画素値を、連続数に応じて展開するラン展開部334Aとを備えている。
The
伸張部324Bは、画像圧縮装置312から出力された奇数番目の符号に対する符号ストリームが入力される符号入力部329Bと、符号入力部329Bから入力された符号ストリームから、奇数番目の符号のID符号を解釈し、ランIDであるか又は誤差IDであるかを解釈するID復号部330Bと、ID復号部230BによるIDの解釈結果に応じて、符号ストリームから、奇数番目の符号の誤差B、又はランB(連続数及び画素値)を復号する復号部331Bと、ID復号部330AによるIDの解釈結果、及びID復号部330BによるIDの解釈結果に基づいて、ラン展開又は逆予測処理を切り替える制御部332Bを備えている。
The decompression unit 324B receives the ID code of the odd number code from the
また、伸張部324Bは、ID復号部330AでランIDであると解釈され、かつ、ID復号部330BでランIDであると解釈された場合に、復号部331Bにより復号された連続数及び画素値に基づいて、奇数番目の符号に対応する対象画素(直前の偶数番目の符号に対応する先頭画素からランAの連続数分離れた画素以降の複数の画素)Yrの画素値として、復号された画素値を連続数に応じて展開するラン展開部334Bと、ID復号部330Aで誤差IDであると解釈され、かつ、ID復号部330BでランIDであると解釈された場合に、復号部331Bにより復号された連続数及び画素値に基づいて、奇数番目の符号に対応する対象画素(直前の偶数番目の符号に対応する画素に続く複数の画素)Yの画素値として、復号された画素値を連続数に応じて展開するラン展開部335Bと、ID復号部330AでランIDであると解釈され、かつ、ID復号部330Bで誤差IDであると解釈された場合に、既に伸張された対象画素群の周辺の参照画素群の画素値から奇数番目の符号に対応する対象画素(直前の偶数番目の符号に対応する先頭画素からランAの連続数分離れた画素)Yrの画素値を逆予測すると共に、復号された対象画素Yrの誤差Bと逆予測された対象画素Yrの画素値とから、対象画素Yrの画素値に伸張する逆予測部336Bと、逆予測部237Bとを備えている。
The decompression unit 324B interprets the run ID as the run ID in the ID decoding unit 330A and interprets the run ID as the run ID in the
なお、復号部331A、331Bが、本発明の並列復号手段に対応し、ラン展開部334A、334B、335B、逆予測部232A、336B、237Bが、本発明の展開手段に対応している。
Note that the
制御部332Bは、伸張部324Aより復号されたランA(連続数及び画素値)又は誤差Aが入力され、図12に示すような、ID復号部230AによるIDの解釈結果、及びID復号部330BによるIDの解釈結果のパターンに応じて、復号されたランA、誤差A、誤差B、並びに、ランB(連続数及び画素値)の少なくとも1つを、ラン展開部334B、ラン展開部335B、逆予測部336B、及び逆予測部237Bの何れか1つに受け渡す。
The
ラン展開部334Bは、偶数番目の符号に対応する先頭画素XからランAの連続数だけ離れた画素Yrから、ランBの連続数だけ画素値を展開する。
The
ラン展開部335Bは、偶数番目の符号に対応する画素Xの次の対象画素Yから、ランBの連続数だけ画素値を展開する。
The
逆予測部336Bは、偶数番目の符号に対応する先頭画素XからランAの連続数だけ離れた画素Yrを対象画素として、先頭画素Xに対して復号されたランAの画素値(画素Aの画素値)と、対象画素群X〜Yrの周辺の参照画素群(画素B、D)の画素値を用いて、以下の式に従って、画素値を逆予測すると共に、逆予測された画素値と、復号された誤差Err2とに基づいて、対象画素Yrの画素値を算出する。
Yr=Err2+(A+D−B)
The
Yr = Err2 + (A + D−B)
マージ部326は、伸張部324A、324Bから出力される画素値で同期する。つまり、本実施の形態では、伸張部324A、324Bの各々が、符号シンボル”誤差ID+誤差符号”又は”ランID+ラン符号”の伸張タイミングで同期している。
The
画像伸張装置314では、伸張部324A、324Bによって、偶数番目の符号に対する画素及び奇数番目の符号に対する画素に対して、誤差値、又は連続数及び画素値の復号が並列に行われると共に、画素値の逆予測及び伸張、又は展開が並列に行われて、偶数番目の符号に対する画素及び奇数番目の符号に対する画素の画素値が出力される。
In the
画像入力部16、圧縮部318、符号出力部318A、318B、伸張部324A、伸張部324B、マージ部326、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。
The
次に、第3の実施の形態に係る画像圧縮伸張システム310の作用を説明する。
Next, the operation of the image compression /
まず、画像圧縮装置312において、画像入力部16から画像データが入力されると、圧縮部318によって、画像データの対象画素の各々について、予測符号化又はランレングス符号化を行い、偶数番目の符号と奇数番目の符号として分けて符号が出力される。また、符号出力部318Aによって、偶数番目の符号からなる符号ストリームが出力され、符号出力部318Bによって、奇数番目の符号からなる符号ストリームが出力される。
First, in the
このとき、圧縮部318では、対象画素の直前の画素の画素値と比較して、画素値が一致する場合には、ラン計数部319によって、直前の画素の画素値と順々に比較して、連続数を計数し、ラン(連続数及び連続する画素値)を出力する。
At this time, the compression unit 318 compares the pixel value of the pixel immediately before the target pixel with each other and sequentially compares the pixel value of the previous pixel with the
一方、対象画素の直前の画素の画素値と比較して、画素値が一致しない場合には、ラン計数部319によって、連続数0を出力すると共に、予測部320によって、画像データにおける対象画素の周辺の画素の画素値を用いて、対象画素の画素値を予測すると共に、対象画素の実際の画素値との誤差を算出して、出力する。
On the other hand, when the pixel values do not match with the pixel value of the pixel immediately before the target pixel, the
ラン計数部319より連続数0が出力された場合、ID符号化部321によって、誤差IDを表わすID符号を出力し、また、符号化部322によって、予測部320から出力された誤差をハフマン符号化によって符号化して、誤差符号を出力する。
When run number 0 is output from
また、ラン計数部319より1以上の連続数が出力された場合、ID符号化部321によって、ランIDを表わすID符号を出力し、また、符号化部322によって、ラン計数部319から出力されたラン(連続数及び画素値)をハフマン符号化によって符号化して、ラン符号を出力する。
When the
そして、分割部323は、ID符号化部321より出力されたID符号と符号化部322より出力されたラン符号又は誤差符号とを結合して1シンボルとすると共に、シンボル数をカウントし、偶数番目の符号と奇数番目の符号とに分けて符号を出力する。
The dividing
符号出力部318Aでは、偶数番目の符号に対応する符号ストリームを出力し、符号出力部318Bでは、奇数番目の符号に対応する符号ストリームを出力する。
The code output unit 318A outputs a code stream corresponding to the even-numbered code, and the
次に、画像伸張装置314において、画像圧縮装置312から出力された、偶数番目の符号に対応する符号ストリームと奇数番目の符号に対応する符号ストリームとが入力されると、伸張部324A、324Bによって、画像データの偶数番目の符号に対応する対象画素及び奇数番目の符号に対応する対象画素の各々について、誤差、又は連続数及び画素値を並列に復号すると共に、逆予測及び伸張、又はラン展開を並列に行って、画素値を各々出力する。
Next, when the code stream corresponding to the even-numbered code and the code stream corresponding to the odd-numbered code output from the
このとき、伸張部324Aでは、ID復号部330Aによって、符号ストリームから偶数番目の符号のID符号を取り出し、ID符号を解釈する。そして、復号部331Aによって、ID符号の解釈結果に応じて、符号ストリームから誤差符号又はラン符号を取り出し、誤差A、又はランA(連続数及び画素値)に復号する。このとき、ID復号部330AによるID符号の解釈結果及び復号部331Aにより復号された誤差A又はランAは、制御部332Bに出力される。
At this time, in the
連続数及び画素値が復号された場合には、ラン展開部334Aによって、復号された画素値が、連続数分だけ展開される。これによって、偶数番目の符号に対応する画素の各々の画素値が伸張される。
When the continuous number and the pixel value are decoded, the
また、誤差が復号された場合には、逆予測部232Aによって、既に伸張されてマージ部326から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素の画素値を予測すると共に、復号された誤差Aを用いて、対象画素の画素値に伸張して出力する。
Further, when the error is decoded, the image data already decompressed by the
また、伸張部324Bでは、ID復号部330Bによって、符号ストリームから奇数番目の符号のID符号を取り出し、ID符号を解釈する。そして、復号部331Bによって、ID符号の解釈結果に応じて、符号ストリームから奇数番目の符号の誤差符号又はラン符号を取り出し、誤差B又はランB(連続数及び画素値)に復号する。このとき、ID復号部330BによるID符号の解釈結果、及び復号部331Bより復号された誤差B又はランBは、制御部332Bに出力される。
In the decompression unit 324B, the
ID復号部330A及びID復号部330Bの双方でランIDであると解釈された場合には、制御部332Bによって、復号されたランAと復号されたランBとを、ラン展開部334Bに受け渡す。そして、ラン展開部334Bによって、対象画素群の先頭画素XからランAの連続数分だけ離れた画素Yr以降の画素の画素値として、ランBの画素値が連続数分だけ展開される。
When both the ID decryption unit 330A and the
また、ID復号部330Aによって誤差IDであると解釈され、かつ、ID復号部330BによってランIDであると解釈された場合には、制御部332Bによって、復号されたランBをラン展開部335Bに受け渡す。そして、ラン展開部335Bによって、対象画素群の先頭画素Xの次の対象画素Y以降の画素の画素値として、ランBの画素値が連続数分だけ展開される。
If the ID decoding unit 330A interprets the error ID and the
また、ID復号部330AによってランIDであると解釈され、かつ、ID復号部330Bによって誤差IDであると解釈された場合には、制御部332Bによって、復号されたランA及び復号された誤差Bを逆予測部336Bに受け渡す。
When the ID decoding unit 330A interprets the run ID and the
そして、逆予測部336Bによって、既に伸張されてマージ部326から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、ランAの画素値とを用いて、対象画素群の先頭画素XからランAの連続数分だけ離れた対象画素Yrの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yrの画素値に伸張して出力する。
Then, among the image data already decompressed by the
また、ID復号部330A及びID復号部330Bの双方によって誤差IDであると解釈された場合には、制御部332Bによって、復号部331Aより復号された誤差A、及び復号された誤差Bを逆予測部237Bに受け渡す。
In addition, when both of the ID decoding unit 330A and the
そして、逆予測部237Bによって、既に伸張されてマージ部326から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号された誤差Bを用いて、対象画素Yの画素値に伸張して出力する。
Then, using the pixel values of the reference pixel group around the target pixel group and the decoded error A in the image data that has already been decompressed by the
そして、マージ部326によって、伸張部324A、324Bの各々から、伸張された、偶数番目の符号及び奇数番目の符号に対応する各画素の画素値を取得すると、取得した各画素の画素値を結合して、画像データとして画像出力部28及び伸張部324A、324Bに出力する。
Then, when the
次に、画像伸張装置314の伸張部324A、324Bにおいて同期を取る場合のタイミングについて説明する。
Next, timing when synchronization is performed in the
図13に示すように、伸張部324Aにおいて復号されるID符号が、ランIDである場合には、伸張部324Bにおいて、ランAの復号待ちが発生する。
As shown in FIG. 13, when the ID code decoded in the
また、図14に示すように、伸張部324A、324Bの双方において復号されるID符号が、誤差IDであり、伸張部324Bにおいて逆予測処理を行う場合には、伸張部324Bにおいて、誤差Aの復号待ちが発生する。
As shown in FIG. 14, when the ID code decoded in both of the
また、上記のいずれの場合にも、画素マージ待ちとID復号部330AによるID復号待ちは発生する。マージ部326は、伸張部324A、324Bの各々から伸張された画素値が出力されるのを待つ。
In any of the above cases, waiting for pixel merge and waiting for ID decoding by the ID decoding unit 330A occur. The
以上説明したように、第3の実施の形態に係る画像圧縮伸張システムによれば、予測符号化及びランレングス符号化を組み合わせた符号化を行う場合であっても、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。 As described above, according to the image compression / decompression system according to the third embodiment, even when encoding is performed in combination with predictive encoding and run-length encoding, images are not expanded in parallel. Compared to the above, images can be decompressed in parallel by the image decompression device without lowering the compression rate.
また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行うと共に、隣接する画素の画素値を参照して、画素値の連続数の計数を行っているので、圧縮率を低下させずに、画像データの圧縮、伸張を行うことができる。 Also, error calculation is performed using the pixel value or error value of the adjacent pixel, and the number of consecutive pixel values is counted by referring to the pixel value of the adjacent pixel. In addition, image data can be compressed and expanded.
次に、第4の実施の形態について説明する。なお、第1の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。 Next, a fourth embodiment will be described. In addition, about the part which becomes the structure similar to 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.
第4の実施の形態では、符号の長さが等長になるように誤差を符号化している点が第1の実施の形態と主に異なっている。 The fourth embodiment is mainly different from the first embodiment in that errors are encoded so that the lengths of the codes are equal.
第4の実施の形態に係る画像圧縮装置では、1つの圧縮部で、スキャンライン順に、対象画素を設定して、画素値の誤差を算出し、符号化部によって、誤差に対して等長符号化を行い、1つの符号ストリームとして出力する。 In the image compression apparatus according to the fourth embodiment, a single compression unit sets target pixels in the order of scan lines, calculates an error in pixel value, and an encoding unit encodes an equal length code for the error. And output as one code stream.
符号化部では、ブロック中での最悪ビット数で各符号をパッキングする。例えば、図15に示すように、4画素分の4つの誤差を表わす符号の中で最も悪いビット長を求めて、各符号をパッキングする。圧縮時のビット数はヘッダに記載しておく。以後、4誤差を表わす4つの符号とヘッダ符号とを含めてブロックと呼ぶことにする.
画像伸張装置の伸張部24Aでは、復号部30Aによって、入力された1つの符号ストリームから、ブロックのヘッダを参照して、対象画素群の先頭画素の符号を切り出す。また、伸張部24Bにおいても同様に、復号部30Bによって、入力された1つの符号ストリームから、ブロックのヘッダを参照して、対象画素群の先頭画素の次の対象画素の符号を切り出す。これによって、対象画素群の各画素の誤差が、並列に復号される。
The encoding unit packs each code with the worst number of bits in the block. For example, as shown in FIG. 15, the worst bit length among codes representing four errors for four pixels is obtained, and each code is packed. The number of bits at the time of compression is described in the header. Hereinafter, a block including four codes representing four errors and a header code is called a block.
In the
また、伸張部24A、24Bでは、ヘッダに基づいて、次ブロックまでの距離が特定されるため、複数のブロックが並列的に伸張される。
In addition, since the
なお、本実施の形態は、上記の第2の実施の形態及び第3の実施の形態のように、予測符号化とランレングス符号化とを組み合わせた符号化を行う場合に適用してもよい。 Note that this embodiment may be applied to a case where encoding is performed by combining predictive encoding and run-length encoding, as in the second and third embodiments. .
次に、第5の実施の形態について説明する。なお、第1の実施の形態及び第2の実施の形態と同様の構成となる部分については、同一符号を付して説明を省略する。 Next, a fifth embodiment will be described. In addition, about the part which becomes the same structure as 1st Embodiment and 2nd Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.
第5の実施の形態では、コンテクストベースの予測符号化を用いて、画像データの圧縮、伸張を行っている点が、第1の実施の形態と主に異なっている。 The fifth embodiment is mainly different from the first embodiment in that image data is compressed and decompressed using context-based predictive coding.
図16に示すように、第5の実施の形態に係る画像圧縮伸張システム510は、画像データを圧縮する画像圧縮装置512と、圧縮された画像データを伸張する画像伸張装置514とを備えている。
As shown in FIG. 16, an image compression /
画像圧縮装置512は、画像入力部16と、画像入力部16から入力された画像データを圧縮して、偶数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部518Aと、画像入力部16から入力された画像データを圧縮して、奇数箇所の画素で出現する符号からなる符号ストリームを出力する圧縮部518Bとを備えている。
The
圧縮部518Aは、予測部20Aと、偶数箇所の画素を対象画素として、対象画素の周辺の画素群の画素値に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部520Aと、選択された符号表を用いて、予測部20Aで算出された誤差Aに対して、可変長符号化(例えば、ハフマン符号化)を行って、シンボル毎に、異なるビット数の符号に変換する符号化部522Aと、符号化部522Aからの符号を、偶数箇所の画素に対する符号ストリームとして出力する符号出力部523Aとを備えている。
The compression unit 518A determines the context based on the
圧縮部518Bは、予測部20Bと、奇数箇所の画素を対象画素として、対象画素の周辺の画素群の画素値に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部520Bと、選択された符号表を用いて、予測部20Bで算出された誤差Bに対して、ハフマン符号化を行って、シンボル毎に、異なるビット数の符号に変換する符号化部522Bと、符号化部522Bからの符号を、奇数箇所の画素に対する符号ストリームとして出力する符号出力部523Bとを備えている。
The compression unit 518B uses the
コンテクストモデル部520Aは、対象画素の周辺の画素群の画素値に基づいて、コンテクスト番号の決定を行い、決定されたコンテクスト番号に応じた符号表の選択を行う。標準可逆圧縮JPEG‐LSを例に挙げると、図17に示すような勾配検出処理が行われることにより、対象画素Xに対して以下に式に従って勾配D1、D2、D3が検出され、検出された勾配状況に応じてコンテクスト番号が決定され、符号表が選択される。なお、本実施の形態では、符号表が2種類用意されている場合を例に説明する。
D1=d−b
D2=b−c
D3=c−a
The
D1 = db
D2 = b−c
D3 = c−a
また、コンテクストモデル部520Bでは、同様に、勾配検出処理が行われることにより、対象画素Yに対して以下に式に従って勾配D1、D2、D3が検出され、検出された勾配状況に応じてコンテクスト番号が決定され、符号表が選択される。
D1=e−d
D2=d−b
D3=b−x
Similarly, in the context model unit 520B, the gradient detection processing is performed, so that gradients D1, D2, and D3 are detected for the target pixel Y according to the following formula, and the context number is determined according to the detected gradient state. Is determined and a code table is selected.
D1 = ed
D2 = db
D3 = b−x
画像圧縮装置512では、圧縮部518A、518Bによって、対象画素群X、Yに対して、並列に画像データの予測符号化が行われ、各々によって生成される符号によって、偶数箇所及び奇数箇所の各々に対応する符号ストリームが生成されて出力される。
In the
画像伸張装置514は、画像圧縮装置512から出力された偶数箇所の画素に対する符号ストリームから、偶数箇所の対象画素の画素値に伸張する伸張部524Aと、画像圧縮装置512から出力された奇数箇所の画素に対する符号ストリームから、奇数箇所の対象画素の画素値に伸張する伸張部524Bと、マージ部26と、画像出力部28とを備えている。
The
伸張部524Aは、符号入力部229Aと、既に伸張された対象画素の周辺の画素群の画素値に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部530Aと、選択された符号表に応じて、符号入力部229Aから入力された符号ストリームから、偶数箇所の対象画素の誤差Aを復号する復号部531Aと、逆予測部32Aとを備えている。
The decompression unit 524A determines a context based on the
伸張部524Bは、符号入力部229Bと、符号入力部229Bから入力された符号ストリームから、一方の種類の符号表に応じて、奇数箇所の対象画素Yの誤差Bの候補を復号する復号部531Bと、符号入力部229Bから入力された符号ストリームから、他方の種類の符号表に応じて、奇数箇所の対象画素Yの誤差Bの候補を復号する復号部531Cと、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、一方の種類の符号表に応じて復号された対象画素Yの誤差Bの候補と逆予測された対象画素Yの画素値とから、対象画素Yの画素値の候補に伸張する逆予測部532Bと、既に伸張された対象画素群の周辺の参照画素群の画素値から対象画素Yの画素値を逆予測すると共に、他方の種類の符号表に応じて復号された対象画素Yの誤差Bの候補と逆予測された対象画素Yの画素値とから、対象画素Yの画素値の候補に伸張する逆予測部532Cと、対象画素群の周辺の参照画素群の画素値と対象画素群の先頭画素Xの誤差Aに基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択するコンテクストモデル部534Bと、選択された符号表に応じて復号された誤差Bの候補を用いて伸張された画素値を選択して出力する選択部536Bとを備えている。
The
なお、復号部531A、531B、531Cが、本発明の並列復号手段に対応し、コンテクストモデル部530A、534B、選択部536B、逆予測部32A、532B、532Cが、本発明の伸張手段に対応している。
The
コンテクストモデル部530Aは、コンテクストモデル部520Aと同様に、対象画素の周辺の画素群の画素値に基づいて、コンテクスト番号の決定を行い、決定されたコンテクスト番号に応じた符号表の選択を行う。
Similarly to the
コンテクストモデル部534Bでは、上記図17に示す勾配検出処理が行われることにより、対象画素Yに対して以下に式に従って勾配D1、D2、D3が検出され、検出された勾配状況に応じてコンテクスト番号が決定され、符号表が選択される。
D1=e−d
D2=d−b
D3=c−a−Err1
In the context model unit 534B, the gradient detection processing shown in FIG. 17 is performed, whereby gradients D1, D2, and D3 are detected for the target pixel Y according to the following equations, and the context number is determined according to the detected gradient state. Is determined and a code table is selected.
D1 = ed
D2 = db
D3 = ca-Err1
上記のD3を算出する式は、対象画素Yのコンテクスト算出に必要であったXを、逆予測で用いられるX=Err1+(A+B−C)を利用して消去した式となっている。 The expression for calculating D3 is an expression obtained by erasing X, which is necessary for calculating the context of the target pixel Y, using X = Err1 + (A + BC) used in reverse prediction.
画像伸張装置514では、伸張部524A、524Bによって、対象画素群X、Yに対して、誤差値の復号が並列に行われると共に、画素値の逆予測及び伸張が並列に行われて、対象画素群X、Yの画素値が出力される。
In the
画像入力部16、圧縮部518A、圧縮部518B、伸張部524A、伸張部524B、マージ部26、及び画像出力部28は、各部の機能を実現する1つまたは複数のコンピュータ、または1つまたは複数の電子回路で構成することができる。
The
次に、第5の実施の形態に係る画像圧縮伸張システム510の作用を説明する。
Next, the operation of the image compression /
まず、画像圧縮装置512において、画像入力部16から画像データが入力されると、圧縮部518A、518Bによって、画像データの対象画素群の偶数箇所の対象画素及び奇数箇所の対象画素の各々について、並列にコンテクストベースの予測符号化を行い、別々の符号ストリームとして符号を出力する。
First, in the
このとき、圧縮部518Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、予測部20Aによって、画像データにおける対象画素Xの周辺の画素の画素値を用いて、対象画素Xの画素値を予測すると共に、対象画素Xの実際の画素値との誤差を算出して、出力する。また、コンテクストモデル部520Aによって、対象画素Xの周辺の画素群の画素値を用いて、コンテクストを決定し、決定されたコンテクストに応じた符号表を選択する。
At this time, the compression unit 518A uses the pixel values of the pixels around the target pixel X in the image data by the
そして、符号化部522Aによって、予測部20Aから出力された誤差を、選択された符号表に応じて符号化して、符号を出力する。また、符号出力部223Aによって、符号化部522Aより出力された符号を、偶数箇所に対応する符号ストリームとして出力する。
Then, the
また、圧縮部518Bでは、対象画素群の奇数箇所の画素Yを対象画素として、圧縮部518Aの各部と同様に動作する。 Further, the compression unit 518B operates in the same manner as each unit of the compression unit 518A with the pixel Y at an odd number in the target pixel group as the target pixel.
次に、画像伸張装置514において、画像圧縮装置512から出力された、偶数箇所の画素に対応する符号ストリームと奇数箇所の画素に対応する符号ストリームとが入力されると、伸張部524A、524Bによって、画像データの対象画素群の偶数箇所の対象画素X及び奇数箇所の対象画素Yの各々について、誤差を並列に復号すると共に、逆予測及び伸張を並列に行って、画素値を各々出力する。
Next, when the code stream corresponding to even-numbered pixels and the code stream corresponding to odd-numbered pixels output from the
このとき、伸張部524Aでは、対象画素群の偶数箇所の画素(先頭画素)Xを対象画素として、コンテクストモデル部530Aによって、既に伸張された対象画素Xの周辺の画素群の画素値に基づいて、コンテクストを決定し、決定されたコンテクストに応じた符号表を選択する。
At this time, the expansion unit 524A sets the even-numbered pixel (first pixel) X of the target pixel group as the target pixel based on the pixel values of the pixel group around the target pixel X that has already been expanded by the
そして、復号部531Aによって、符号ストリームから対象画素Xの符号を取り出し、取り出した符号を、選択された符号表を用いて、対象画素Xの誤差Aに復号する。このとき、復号部531Aにより復号された誤差Aは、逆予測部532B、532Cと、コンテクストモデル部534Bとに出力される。
Then, the
次に、逆予測部32Aによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値を用いて、対象画素Xの画素値を予測すると共に、復号された誤差Aを用いて、対象画素Xの画素値に伸張して出力する。
Next, the pixel value of the target pixel X is predicted using the pixel values of the reference pixel group around the target pixel group in the image data that has already been decompressed and output from the
また、伸張部524Bでは、対象画素群の奇数箇所の画素(先頭画素の次の画素)Yを対象画素として、復号部531Bによって、符号ストリームから対象画素Yの符号を取り出し、一方の種類の符号表を用いて、取り出した符号を、対象画素Yの誤差Bの候補に復号する。また、復号部531Cによって、符号ストリームから対象画素Yの符号を取り出し、他方の種類の符号表を用いて、取り出した符号を、対象画素Yの誤差Bの候補に復号する。
Also, in the
そして、逆予測部532Bによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号部531Bより復号された誤差Bの候補を用いて、対象画素Yの画素値の候補に伸張して出力する。
Then, using the pixel values of the reference pixel group around the target pixel group and the decoded error A in the image data that has already been decompressed by the inverse prediction unit 532B and output from the
また、逆予測部532Cによって、既に伸張されてマージ部26から出力された画像データのうち、対象画素群の周辺の参照画素群の画素値と、復号された誤差Aとを用いて、対象画素Yの画素値を予測すると共に、復号部531Cより復号された誤差Bの候補を用いて、対象画素Yの画素値の候補に伸張して出力する。
In addition, among the image data that has already been decompressed by the inverse prediction unit 532C and output from the
また、復号部531Aによって誤差Aが復号されると、コンテクストモデル部534Bによって、既に伸張された対象画素群の周辺の参照画素群a,b,c,d,eの画素値と対象画素群の先頭画素Xの誤差A(Err1)に基づいて、コンテクストを決定すると共に、コンテクストに応じた符号表を選択する。
When the error A is decoded by the
そして、選択部536Bによって、逆予測部532B、532Cの各々によって出力された画素値の候補のうち、選択された符号表を用いて伸張された対象画素Yの画素値の候補を選択し、マージ部26に出力する。
Then, the selection unit 536B selects pixel value candidates of the target pixel Y expanded using the selected code table from among the pixel value candidates output by each of the inverse prediction units 532B and 532C, and merges them. To the
そして、マージ部26によって、伸張部524A、524Bの各々から、伸張された対象画素群X,Yの各画素の画素値を取得すると、取得した対象画素群の各画素の画素値を結合して、画像データとして画像出力部28、及び伸張部524A、524Bに出力する。
When the pixel value of each pixel of the expanded target pixel group X, Y is acquired from each of the
次に、画像伸張装置514の伸張部524A、524Bにおいて同期を取る場合のタイミングについて説明する。
Next, timing when synchronization is performed in the
図18に示すように、伸張部524Bにおいて、復号部531Aによる誤差Aの復号待ちが発生し、誤差Aの復号を待って、コンテクストに応じた符号表が選択される。また、画素マージ待ちが発生する。
As shown in FIG. 18, in the
以上説明したように、第5の実施の形態に係る画像圧縮伸張装置によれば、コンテクストベースの予測符号化を行う場合であっても、画像を並列に伸張しない場合と比較して、圧縮率を低下させずに、画像伸張装置によって、並列に画像を伸張することができる。 As described above, according to the image compression / decompression apparatus according to the fifth embodiment, even when context-based predictive coding is performed, the compression rate is lower than that in the case where images are not decompressed in parallel. The image can be expanded in parallel by the image expansion device without lowering the image quality.
また、隣接する画素の画素値又は誤差値を用いて、誤差演算を行うと共に、コンテクストを決定しているので、圧縮率を低下させずに、画像データの圧縮、伸張を行うことができる。 Further, since error calculation is performed using the pixel value or error value of adjacent pixels and the context is determined, the image data can be compressed and expanded without reducing the compression rate.
また、隣接する画素の画素値を用いてコンテクストを決定する場合に比べて、隣接する画素の画素値が確定するのを待たなくても、コンテクストを決定することができるため、コンテクストに応じた符号表を用いて、並列に画像を伸張することができる。 Compared to the case where the context value is determined using the pixel value of the adjacent pixel, the context can be determined without waiting for the pixel value of the adjacent pixel to be determined. A table can be used to decompress images in parallel.
なお、上記の実施の形態では、決定されたコンテクスト番号に応じて符号表を選択した場合を例に説明したが、これに限定されるものではなく、コンテクスト毎に誤差値の計数を行い、誤差値の累積値に応じて符号表を選択するようにしてもよい。 In the above embodiment, the case where the code table is selected according to the determined context number has been described as an example. However, the present invention is not limited to this, and the error value is counted for each context. The code table may be selected according to the accumulated value.
また、符号表が2種類である場合を例に説明したが、これに限定されるものではなく、3種類以上のN種類の符号表が用意されていてもよい。この場合には、N種類の符号表の各々を用いた場合に対応して、伸張された対象画素の画素値の候補を求めておき、符号表が確定したとき、N種類の符号表に対応して求められた画素値の候補から、確定した符号表に対応する画素値を選択するようにすればよい。 Moreover, although the case where there are two types of code tables has been described as an example, the present invention is not limited to this, and three or more types of N code tables may be prepared. In this case, corresponding to the case where each of the N types of code tables is used, candidate pixel values of the expanded target pixels are obtained, and when the code table is determined, N types of code tables are supported. The pixel value corresponding to the determined code table may be selected from the pixel value candidates obtained in this way.
また、2つの連続する画素を対象画素群として、対象画素群の2つの対象画素に対して、並列に復号処理及び逆予測処理を行う場合を例に説明したが、これに限定されるものではなく、3つ以上のN個の連続する画素を対象画素群として、対象画素群のN個の対象画素に対して、並列に復号処理及び逆予測処理を行うようにしてもよい。この場合には、符号ストリームとして、N列の符号ストリームを生成して、画像伸張装置に入力するようにすればよい。 Moreover, although the case where the decoding process and the reverse prediction process are performed in parallel with respect to two target pixels of the target pixel group using two consecutive pixels as the target pixel group has been described, the present invention is not limited thereto. Instead, three or more N consecutive pixels may be used as the target pixel group, and the decoding process and the reverse prediction process may be performed in parallel on the N target pixels in the target pixel group. In this case, an N-sequence code stream may be generated as a code stream and input to the image expansion apparatus.
また、画像圧縮伸張システムの各部をコンピュータや電子回路で実現する場合を例に説明したが、画像圧縮装置の各機能を、コンピュータのプログラムで実現するようにしてもよく、また、画像伸張装置の各機能を、コンピュータのプログラムで実現するようにしてもよい。 Further, the case where each part of the image compression / decompression system is realized by a computer or an electronic circuit has been described as an example. However, each function of the image compression apparatus may be realized by a computer program. Each function may be realized by a computer program.
10、210、310、510 画像圧縮伸張システム
12、212、312、512 画像圧縮装置
14、214、314、514 画像伸張装置
18A、18B、218A、218B、318、518A、518B 圧縮部
20A、20B、220A、220B、320 予測部
22A、22B、222A、222B、322、522A、522B 符号化部
24A、24B、224A、224B、324A、324B、524A、524B 伸張部
26、326 マージ部
30A、30B、231A、231B、331A、331B、531A、531B、531C 復号部
32A、32B、232A、236B、237B、336B、532B、532C 逆予測部
219A、219B、319 ラン計数部
221A、221B、321 ID符号化部
230A、230B、330A、330B ID復号部
232B、332B 制御部
233A、233B ラン保持部
234A、234B、334A、334B、335B ラン展開部
323 分割部
520A、520B、530A、534B コンテクストモデル部
536B 選択部
10, 210, 310, 510 Image compression /
Claims (7)
前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、前記対象画素群の各対象画素について並列に画素値を逆予測すると共に、前記対象画素群の各対象画素の画素値に並列に伸張する伸張手段と、
を含み、
前記伸張手段は、
前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって復号された前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(3)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張し、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって復号された該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(4)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する画像伸張装置。
Err1=X1−F1(R1、・・・、Rm) ・・・(1)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(2)
X1=Err1+F1’(R1、・・・、Rm) ・・・(3)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(4)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。 The target pixel group (X1) obtained by performing predictive coding on the pixel value of the first pixel X1 of the input target pixel group (X1,..., Xn) composed of a predetermined number of consecutive pixels. ,..., Xn) in the reference pixel group (R1,..., Rm) existing around the first pixel X1 including the reference pixel adjacent to the first pixel X1. For a sign representing an error value Err1 shown in the following equation (1) based on the pixel value and a pixel value of each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn) , The pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm) obtained by performing predictive coding and the target pixel group (X1,. . Before Xn-1) including the target pixel Xn-1 adjacent to the target pixel Xn Based on said predetermined number of code strings of columns each containing a code representing the error value Errn shown in the following equation (2) based on the pixel values of the target pixels around the target pixel Xn, the target pixel group (X1, , Xn) parallel decoding means for decoding the error values (Err1,..., Errn) in parallel for each target pixel;
The error value of each target pixel of the target pixel group decoded in parallel by the parallel decoding means, and the pixel value of each reference pixel of the reference pixel group that exists around the target pixel group and has been previously expanded DOO using, as well as inverse predictive pixel values in parallel for each pixel of the target pixel group, and expansion means for expanding in parallel to the pixel value of each pixel of the target pixel group,
Including
The extension means includes
For the first pixel X1 of the target pixel group (X1,..., Xn), the error value Err1 of the first pixel X1 decoded by the parallel decoding means and the reference pixel group (R1,. .., Rm), and the pixel value of the reference pixel around the head pixel X1 including the reference pixel adjacent to the head pixel X1 is used to calculate the head pixel X1 by the following equation (3) The pixel value is inversely predicted and expanded to the pixel value of the first pixel X1, and the parallel decoding unit applies each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn). The target pixel Xn including the decoded error value Errn of the target pixel Xn and the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1). Said object around Using the original error value and the pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm), the target pixel is expressed by the following equation (4). An image expansion device that performs reverse prediction of the pixel value of Xn and expands the pixel value of the target pixel Xn .
Err1 = X1-F1 (R1,..., Rm) (1)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (2)
X1 = Err1 + F1 ′ (R1,..., Rm) (3)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn−1) (4)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
前記並列復号手段によって並列に復号された前記対象画素群の各対象画素の誤差値又は前記連続数及び画素値に基づいて、前記対象画素群の各対象画素について、該対象画素の誤差値が復号された場合、該対象画素の誤差値と、前記対象画素群の周辺に存在し、かつ、先に伸張された参照画素群の各参照画素の画素値とを用いて、該対象画素の画素値を逆予測すると共に、該対象画素の画素値に伸張する逆予測処理、及び、該対象画素の連続数及び画素値が復号された場合、該画素値を連続数分展開して、該対象画素の画素値に伸張する展開処理の何れか一方の処理を並列に行う展開手段と、
を含み、
前記展開手段は、
前記対象画素群(X1,・・・,Xn)の先頭画素X1について、前記並列復号手段によって前記先頭画素X1に対して誤差値Err1が復号された場合に、前記先頭画素X1の誤差値Err1と、先に伸張された前記参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記参照画素の画素値とを用いて、以下の(7)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する逆予測処理、及び、前記先頭画素X1に対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、前記先頭画素X1以降の画素の画素値に伸張する展開処理の何れか一方を行い、
前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって該対象画素Xnに対して誤差値Errnが復号された場合に、該対象画素Xnの誤差値Errnと、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値又は前記対象画素Xnに隣接する前記対象画素Xn−1に対して復号された画素値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、以下の(8)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値に伸張する逆予測処理、及び、該対象画素Xnに対して前記連続数及び画素値が復号された場合に、該画素値を連続数分展開して、該対象画素Xn以降の画素の画素値に伸張する展開処理の何れか一方を行う画像伸張装置。
Err1=X1−F1(R1、・・・、Rm) ・・・(5)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(6)
X1=Err1+F1’(R1、・・・、Rm) ・・・(7)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(8)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。 The target pixel group (X) obtained by performing predictive encoding on the pixel value of the first pixel X1 of the input target pixel group (X1,..., Xn) consisting of a predetermined number of consecutive pixels. .., Xn) of the reference pixels (R1,..., Rm) existing around the reference pixel adjacent to the start pixel X1 including the reference pixel adjacent to the start pixel X1. For a pixel value of each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn), a code representing an error value Err1 shown in the following equation (5) based on the pixel value of , The pixel value of the reference pixel around the target pixel Xn in the reference pixel group (R1,..., Rm) obtained by performing predictive coding and the target pixel group (X1,. ., Xn-1) including the target pixel Xn-1 adjacent to the target pixel Xn The code representing the target pixel below based on the pixel value of the (6) code, or a continuous number obtained by performing the run-length encoding encoding and the pixel value represents an error value Errn in the expression of the peripheral elephant pixel n The error values (Err1,..., Errn) or the continuous number in parallel for each target pixel of the target pixel group (X1,..., Xn) based on the code sequence of the predetermined number of columns included. Parallel decoding means for decoding pixel values;
Based on the error value of each target pixel of the target pixel group or the continuous number and the pixel value decoded in parallel by the parallel decoding means, the error value of the target pixel is decoded for each target pixel of the target pixel group. The pixel value of the target pixel using the error value of the target pixel and the pixel value of each reference pixel of the reference pixel group that exists in the periphery of the target pixel group and has been previously expanded. Is reverse-predicted and expanded to the pixel value of the target pixel, and when the continuous number and pixel value of the target pixel are decoded, the pixel value is expanded by the continuous number, and the target pixel Expansion means for performing in parallel one of the expansion processes for expanding the pixel value of
Including
The expansion means is
For the first pixel X1 of the target pixel group (X1,..., Xn), when the error value Err1 is decoded for the first pixel X1 by the parallel decoding means, the error value Err1 of the first pixel X1 Using the pixel value of the reference pixel including the reference pixel adjacent to the head pixel X1 in the reference pixel group (R1,..., Rm) expanded previously, the following (7) In the case where the pixel value is inversely predicted for the first pixel X1 by the equation, the inverse prediction process for expanding the pixel value to the pixel value of the first pixel X1, and the continuous number and the pixel value are decoded for the first pixel X1 , Performing any one of the expansion processes of expanding the pixel values by the continuous number and expanding the pixel values to the pixel values of the pixels after the first pixel X1,
For each target pixel Xn other than the first pixel X1 of the target pixel group (X1,..., Xn), when the error value Errn is decoded for the target pixel Xn by the parallel decoding unit, The target around the target pixel Xn including the target pixel Xn−1 adjacent to the target pixel Xn in the target pixel group (X1,..., Xn−1) and the error value Errn of the pixel Xn. A pixel error value or a decoded pixel value for the target pixel Xn−1 adjacent to the target pixel Xn, and the periphery of the target pixel Xn in the reference pixel group (R1,..., Rm) Using the pixel value of the reference pixel, and inversely predicting the pixel value of the target pixel Xn according to the following equation (8) and expanding the pixel value of the target pixel Xn, and the target The continuous number and image for the pixel Xn If the value is decoded, expand the pixel value number of consecutive image expansion apparatus for performing one of the expansion process of expanding the pixel value of the pixel of the object pixel Xn later.
Err1 = X1-F1 (R1,..., Rm) (5)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (6)
X1 = Err1 + F1 ′ (R1,..., Rm) (7)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Err-1) (8)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
前記並列復号手段によって復号された前記対象画素群(X1,・・・,Xn)の先頭画素X1の誤差値Err1と、前記先頭画素X1の周辺に存在し、かつ、先に伸張された参照画素群(R1,・・・,Rm)のうちの前記先頭画素X1に隣接する前記参照画素を含む前記先頭画素X1の周辺の前記参照画素の画素値とを用いて、以下の(11)式により前記先頭画素X1について画素値を逆予測すると共に、前記先頭画素X1の画素値に伸張する処理、及び、前記対象画素群(X1,・・・,Xn)の前記先頭画素X1以外の各対象画素Xnについて、前記並列復号手段によって各符号表を用いて復号された前記対象画素Xnの誤差値の候補と、前記対象画素群(X1,・・・,Xn−1)のうちの前記対象画素Xnに隣接する前記対象画素Xn−1を含む前記対象画素Xnの周辺の前記対象画素の誤差値と、前記参照画素群(R1,・・・,Rm)のうちの該対象画素Xnの周辺の前記参照画素の画素値とを用いて、各符号表を用いた場合に対して、以下の(12)式により該対象画素Xnについて画素値を逆予測すると共に、該対象画素Xnの画素値の候補に伸張し、前記伸張された画素値の候補のうち、該対象画素Xnの周辺の画素値に対応する符号表を用いた場合に対して伸張された画素値を選択する処理を、並列に行う伸長手段と、
を含む画像伸張装置。
Err1=X1−F1(R1、・・・、Rm) ・・・(9)
Errn=Xn−Fn(R1、・・・、Rm、X1、・・・、Xn−1) ・・・(10)
X1=Err1+F1’(R1、・・・、Rm) ・・・(11)
Xn=Errn+Fn’(R1、・・・、Rm、Err1、・・・、Errn−1) ・・・(12)
ただし、F1( )は、先頭画素X1の画素値を予測するための関数、Fn( )は、対象画素Xnの画素値を予測するための関数、F1’( )は、先頭画素X1の画素値を逆予測するための関数、Fn’( )は、対象画素Xnの画素値を逆予測するための関数である。 Entered, the code that the pixel value of the first pixel X1, corresponding to the pixel values of the peripheral pixel group in the first pixel X1 of the target pixel group composed of a predetermined number of successive pixels (X1, · · ·, Xn) The first pixel in the reference pixel group (R1,..., Rm) existing around the target pixel group (X1,..., Xn) obtained by performing predictive coding using a table. A code representing an error value Err1 shown in the following equation (9) based on the pixel values of the reference pixels around the head pixel X1 including the reference pixels adjacent to X1 , and the target pixel group (X1,... , Xn) obtained by performing predictive coding on the pixel values of the target pixels Xn other than the first pixel X1 using the code table corresponding to the pixel values of the pixel groups around the target pixel Xn. , Around the target pixel Xn in the reference pixel group (R1,..., Rm) Of the pixel values of the reference pixel and the target pixel group (X1,..., Xn-1), the target pixels around the target pixel n including the target pixel Xn-1 adjacent to the target pixel Xn. based on the code sequence of said predetermined number of columns each containing a code representing the error value Errn shown in the following equation (10) based on the pixel value, the top pixel of the target pixel group (X1, · · ·, Xn) X1 And a process of decoding the error value Err1 of the first pixel X1 using a code table corresponding to the pixel value of the pixel group that is present in the vicinity of the first pixel X1 and previously expanded, and the target pixel group Parallel decoding means for performing in parallel a process of decoding each error value candidate of the target pixel using each of all the code tables for each target pixel other than the first pixel X1 of (X1,..., Xn) ,
An error value Err1 of the first pixel X1 of the target pixel group (X1,..., Xn) decoded by the parallel decoding means, and a reference pixel that exists in the vicinity of the first pixel X1 and has been previously expanded. group (R1, · · ·, Rm) by using the pixel values of the reference pixels around the first pixel X1 including the reference pixels adjacent to the first pixel X1 of, the following equation (11) with inverse prediction pixel value for the first pixel X1, the process of decompressing the pixel value of the first pixel X1, and each target pixel other than the head pixel X1 of the target pixel group (X1, · · ·, Xn) For Xn , error value candidates of the target pixel Xn decoded by the parallel decoding means using each code table, and the target pixel Xn of the target pixel group (X1,..., Xn−1). The target pixel Xn−1 adjacent to Above using the error value of the target pixel around the target pixel Xn, the reference pixel group (R1, ···, Rm) and a pixel value of the reference pixels around the target pixel Xn of including, In the case where each code table is used, the pixel value of the target pixel Xn is inversely predicted by the following equation (12) , and the pixel value is expanded to the candidate pixel value of the target pixel Xn , and the expanded pixel value Expansion means for performing parallel processing for selecting the pixel values expanded for the case of using the code table corresponding to the pixel values around the target pixel Xn among the candidates,
An image expansion device including:
Err1 = X1-F1 (R1,..., Rm) (9)
Errn = Xn−Fn (R1,..., Rm, X1,..., Xn−1) (10)
X1 = Err1 + F1 ′ (R1,..., Rm) (11)
Xn = Errn + Fn ′ (R1,..., Rm, Err1,..., Errn-1) (12)
However, F1 () is a function for predicting the pixel value of the first pixel X1, Fn () is a function for predicting the pixel value of the target pixel Xn, and F1 ′ () is a pixel value of the first pixel X1. Fn ′ () is a function for inversely predicting the pixel value of the target pixel Xn.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008306446A JP5217972B2 (en) | 2008-12-01 | 2008-12-01 | Image expansion device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008306446A JP5217972B2 (en) | 2008-12-01 | 2008-12-01 | Image expansion device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010130635A JP2010130635A (en) | 2010-06-10 |
JP5217972B2 true JP5217972B2 (en) | 2013-06-19 |
Family
ID=42330629
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008306446A Expired - Fee Related JP5217972B2 (en) | 2008-12-01 | 2008-12-01 | Image expansion device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5217972B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8885704B2 (en) | 2010-10-01 | 2014-11-11 | Qualcomm Incorporated | Coding prediction modes in video coding |
JP6451221B2 (en) * | 2014-10-31 | 2019-01-16 | 株式会社リコー | Image processing apparatus and image processing method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0678294A (en) * | 1992-08-21 | 1994-03-18 | Sony Corp | Coding method, coder and decoder |
JP2000217003A (en) * | 1999-01-20 | 2000-08-04 | Ricoh Co Ltd | Coding system and decoding system |
JP3871995B2 (en) * | 2002-10-25 | 2007-01-24 | 富士ゼロックス株式会社 | Encoding device and decoding device |
-
2008
- 2008-12-01 JP JP2008306446A patent/JP5217972B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2010130635A (en) | 2010-06-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102039049B1 (en) | Sample array coding for low-delay | |
KR20070084128A (en) | Two step arithmetic decoding with conversion into an intermediate format | |
JP2018107588A (en) | Image processing device and semiconductor device | |
JP2006270958A (en) | Movement-estimating method of improved type diamond search | |
CN104350751A (en) | Extension data handling | |
JP5217972B2 (en) | Image expansion device | |
US8189674B2 (en) | Decoding method, program for decoding method, recording medium with recorded program for decoding method, and decoding device | |
JP2007235443A (en) | Coding equipment and method therefor | |
KR20050079418A (en) | Decoding method and decoding apparatus for preventing of error propagation and parallel processing | |
JP6073506B2 (en) | Entropy changer and method | |
JP6280679B2 (en) | Frame thinning device, frame interpolation device, video encoding device, video decoding device, and programs thereof | |
JP6614935B2 (en) | Video encoding apparatus and program | |
JP2010050697A (en) | Apparatus and method for compressing/decompressing image | |
JP4455199B2 (en) | Adaptive variable length encoding apparatus, adaptive variable length decoding apparatus, adaptive variable length encoding / decoding method, and adaptive variable length encoding / decoding program | |
JP5105191B2 (en) | Image processing device | |
JPH0946237A (en) | Apparatus for coding and partitioning variable-length code | |
JP6368484B2 (en) | Compression device and compression method | |
EP2259432A1 (en) | Variable-length code decoding apparatus and method | |
JP2007336056A (en) | Encoding device, encoding method and program | |
JP4184389B2 (en) | Motion vector decoding apparatus and decoding method | |
JP4537089B2 (en) | Variable length decoding apparatus and method, computer program, and computer readable storage medium | |
JP2004179752A (en) | Huffman decoder | |
JP2005130352A (en) | Decoder | |
JP4825755B2 (en) | Arithmetic decoder and entropy decoder | |
US8594177B2 (en) | Reducing reference frame data store bandwidth requirements in video decoders |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111124 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120822 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120918 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121116 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20130205 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130218 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160315 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5217972 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |