Method and apparatus for extracting pixel values
AssigneeBritish Telecommunications plc
InventorsJianmin Jiang, Li-Qun Xu
Life of this patent
Estimating the term…
Abstract
The luminance and chrominance values of pixels encoded according to MPEG or JPEG encoding are extracted using a forward discrete cosine transform (DCT). The forward DCT used in MPEG encoding is analyzed to derive a set of equations which directly relate a pixel value in an encoded image to one or more of the DCT coefficients obtained via the forward DCT transform in the usual image encoding process. These predetermined equations are used to allow for extremely fast and computationally efficient extraction of pixel values directly from the DCT coefficients of an encoded pixel block, without having to undergo an inverse DCT transform. Original images from MPEG and JPEG encoded versions may be extracted in a fast and efficient manner.
Claims17
A method of extracting pixel values from a signal comprising a plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the method comprising:
- storing a plurality of pre-calculated weighting factors;
- and
- for any particular pixel value to be extracted, calculating the pixel value as a weighted sum of selected ones of the coefficients, except in the case of a weighting factor that is close to a power of two, the power of two itself is used, and the weighting is implemented by binary shifting.
A method of extracting pixel values from a signal comprising plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the method comprising:
- storing a plurality of pre-calculated parameters, each of which is associated with a particular pixel whose value is to be extracted;
- and
- for any particular pixel value to be extracted, calculating the pixel value using the pre-calculated parameters associated therewith together with one or more of the DCT coefficients;
- wherein for a block of 8 by 8 DCT coefficients, a block of 2 by 2 pixels are extracted, the pixel values being calculated in accordance with the following equations:
- x
- _
-
- (
- 0
- ,
- 0
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- +
- C
-
- (
- 1
- ,
- 0
- )
- +
- C
-
- (
- 0
- ,
- 1
- )
- +
- C
-
- (
- 1
- ,
- 1
- )
-
-
- x
- _
-
- (
- 0
- ,
- 1
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- +
- C
-
- (
- 1
- ,
- 0
- )
- -
- C
-
- (
- 1
- ,
- 1
- )
- -
- C
-
- (
- 0
- ,
- 1
- )
- }
-
-
- x
- _
-
- (
- 1
- ,
- 0
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- -
- C
-
- (
- 1
- ,
- 0
- )
- +
- C
-
- (
- 0
- ,
- 1
- )
- -
- C
-
- (
- 1
- ,
- 1
- )
- }
-
-
- x
- _
-
- (
- 1
- ,
- 1
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- -
- C
-
- (
- 1
- ,
- 0
- )
- -
- C
-
- (
- 0
- ,
- 1
- )
- +
- C
-
- (
- 1
- ,
- 1
- )
- }
- wherein x(i,j) is the extracted value of pixel (i,j), and C(u,v) is the DCT coefficient (u,v) with respect to the block of DCT coefficients.
A method of extracting pixel values from a signal comprising plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the method comprising:
- storing a plurality of pre-calculated parameters, each of which is associated with a particular pixel whose value is to be extracted;
- and
- for any particular pixel value to be extracted, calculating the pixel value using the pre-calculated parameters associated therewith together with one or more of the DCT coefficients;
- wherein for a block of 8 by 8 DCT coefficients, a block of 4 by 4 pixels are extracted, the pixel values being calculated in accordance with the following equations, wherein x(i,j) is the extracted value of pixel (i,j), C(u,v) is the DCT coefficient (u,v) with respect to the block of DCT coefficients, and >>x represents an effective divide by 2x:
- x00=C00>>3+0.176C10+C20>>3+0.176C01
- x10=C00>>3+(C10>>4)−(C20>>3)+0.176C01
- x20=C00>>3−(C10>>3)−(C20>>3)+0.176C01
- x30=C00>>3−0.176C10+(C20>>3)+0.176C01
- x01=C00>>3+0.176C10+(C20>>3)+(C01>>4)
- x11=C00>>3+(C10>>4)−(C20>>3)+(C01>>4)
- x21=C00>>3−(C10>>4)+(C20>>3)+(C01>>4)
- x31=C00>>3−0.176C10+(C20>>3)+(C01>>4)
- x02=C00>>3+0.176C10−(C20>>3)−(C01>>4)
- x12=C00>>3+(C1>>4)−(C20>>3)−(C01>>4)
- x22=C00>>3−(C10>>4)−(C20>>3)−(C01>>4)
- x32=C00>>3−0.176C10+(C20>>3)−(C01>>4)
- x03=C00>>3+0.176C10+(C20>>3)−0.176C01
- x13=C00>>3+C10>>4−(C20>>3)−0.176C01
- x23=C00>>3−(C10>>4)−(C20>>3)−0.176C01
- x33=C00>>3−0.176C10−(C20>>3)−0.176C01
A method of extracting pixel values from a signal comprising plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the method comprising:
- storing a plurality of pre-calculated parameters, each of which is associated with a particular pixel whose value is to be extracted;
- and
- for any particular pixel value to be extracted, calculating the pixel value using the pre-calculated parameters associated therewith together with one or more of the DCT coefficients;
- wherein for a block of 8 by 8 DCT coefficients, a block of 4 by 4 pixels are extracted, the pixel values being calculated in accordance with the following equations, wherein x(i,j) is the extracted value of pixel (i,j), C(u,v) is the DCT coefficient (u,v) with respect to the DCT coefficient block, and >>x represents an effective divide by 2x:
- x00=A1+3>>3+0.176(B3+B1+C11)
- x10=A2+4>>3+0.176B2+(B3>>4)+(C11>>4)
- x20=A2+4>>3+0.176B2−(B3>>4)−(C11>>4)
- x30=A1+3>>3−(B3−B1)>>4−(C11>>4)
- x01=A1−3>>3+0.176B3+(B1>>4)+(C11>>4)
- x11=A2−4>>3+(B4+B2)>>4
- x21=A2−4>>3−(B4−B2)>>4
- x31=A1−3>>3−0.176B4+(B1>>4)+(C11>>4)
- x02=A1−3>>3+0.176B4−(B1>>4)−(C11>>4)
- x12=A2−4>>3+(B4>>4)−(B2>>4)
- x22=A2−4>>3−(B4+B2)>>4
- x32=A1−3>>3−0.176B4−(B1>>4)+(C11>>4)
- x03=A1+3>>3+0.176(B4−B1−C11)
- x13=A2+4>>3−0.176B2+B3>>4−(C11>>4)
- x23=A2+4>>3−0.176B2−(B3>>4)+(C11>>4)
- x33=A1+3>>3−0.176(B4+B1−C11)
- and where:
- A1+3=A1+A3;
- A1−3=A1−A3;
- A2+4=A2+A4;
- A2−4=A2−A4;
- A1=C(0,0)+C(2,0);
- A2=C(0,0)−C(2,0);
- A3=C(0,2)+C(2,2);
- A4=C(0,2)−C(2,2)
- B1=C(0,1)+C(2,1);
- B2=C(0,1)−C(2,1);
- B3=C(1,0)+C(1,2);
- B4=C(1,0)−C(1,2);
An apparatus for extracting pixel values from a signal containing a plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the apparatus comprising:
- storage means for storing a plurality of pre-calculated weighting factors;
- and
- calculating means for, for any particular pixel value to be extracted, calculating the pixel value as a weighted sum of selected ones of the coefficients, except, in the case of a weighting factor that is close to a power of two, the power of two itself being used, and the weighting being implemented by binary shifting.
An apparatus for extracting pixel values from a signal containing a plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the apparatus comprising:
- a storage means for storing a plurality of pre-calculated parameters, each of which is associated with a particular pixel whose value is to be extracted;
- and
- calculating means for, for any particular pixel value to be extracted, calculating the pixel value using the pre-calculated parameters associated therewith together with one or more of the DCT coefficients;
- and
- further arranged such that for a block of 8 by 8 DCT coefficients, a block of 2 by 2 pixels are extracted, the pixel values being calculated by the calculating means in accordance with the following equations:
- x
- _
-
- (
- 0
- ,
- 0
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- +
- C
-
- (
- 1
- ,
- 0
- )
- +
- C
-
- (
- 0
- ,
- 1
- )
- +
- C
-
- (
- 1
- ,
- 1
- )
-
-
- x
- _
-
- (
- 0
- ,
- 1
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- +
- C
-
- (
- 1
- ,
- 0
- )
- -
- C
-
- (
- 1
- ,
- 1
- )
- -
- C
-
- (
- 0
- ,
- 1
- )
- }
-
-
- x
- _
-
- (
- 1
- ,
- 0
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- -
- C
-
- (
- 1
- ,
- 0
- )
- +
- C
-
- (
- 0
- ,
- 1
- )
- -
- C
-
- (
- 1
- ,
- 1
- )
- }
-
-
- x
- _
-
- (
- 1
- ,
- 1
- )
- =
- 1
- 8
-
- {
- C
-
- (
- 0
- ,
- 0
- )
- -
- C
-
- (
- 1
- ,
- 0
- )
- -
- C
-
- (
- 0
- ,
- 1
- )
- +
- C
-
- (
- 1
- ,
- 1
- )
- }
- wherein x(i,j) is the extracted value of pixel (i,j), and C(u,v) is the DCT coefficient (u,v) with respect to the DCT coefficient block.
An apparatus for extracting pixel values from a signal containing a plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the apparatus comprising:
- a storage means for storing a plurality of pre-calculated parameters, each of which is associated with a particular pixel whose value is to be extracted;
- and
- calculating means for, for any particular pixel value to be extracted, calculating the pixel value using the pre-calculated parameters associated therewith together with one or more of the DCT coefficients;
- and
- further arranged such that for a block of 8 by 8 DCT coefficients, a block of 4 by 4 pixels are extracted, the pixel values being calculated by the calculating means in accordance with the following equations, wherein x(i,j) is the extracted value of pixel (i,j), C(u,v) is the DCT coefficient (u,v) with respect to the DCT coefficient block, and >>x represents an effective divide by 2x:
- x00=C00>>3+0.176C10+C20>>3+0.176C01
- x10=C00>>3+(C10>>4)−(C20>>3)+0.176C01
- x20=C00>>3−(C10>>3)−(C20>>3)+0.176C01
- x30=C00>>3−0.176C10+(C20>>3)+0.176C01
- x01=C00>>3+0.176C10+(C20>>3)+(C01>>4)
- x11=C00>>3+(C10>>4)−(C20>>3)+(C01>>4)
- x21=C00>>3−(C10>>4)+(C20>>3)+(C01>>4)
- x31=C00>>3−0.176C10+(C20>>3)+(C01>>4)
- x02=C00>>3+0.176C10−(C20>>3)−(C01>>4)
- x12=C00>>3+(C1>>4)−(C20>>3)−(C01>>4)
- x22=C00>>3−(C10>>4)−(C20>>3)−(C01>>4)
- x32=C00>>3−0.176C10+(C20>>3)−(C01>>4)
- x03=C00>>3+0.176C10+(C20>>3)−0.176C01
- x13=C00>>3+C10>>4−(C20>>3)−0.176C01
- x23=C00>>3−(C10>>4)−(C20>>3)−0.176C01
- x33=C00>>3−0.176C10−(C20>>3)−0.176C01
An apparatus for extracting pixel values from a signal containing a plurality of discrete cosine transform (DCT) coefficients derived from values of pixels in a source image, the apparatus comprising:
- a storage means for storing a plurality of pre-calculated parameters, each of which is associated with a particular pixel whose value is to be extracted;
- and
- calculating means for, for any particular pixel value to be extracted, calculating the pixel value using the pre-calculated parameters associated therewith together with one or more of the DCT coefficients;
- and
- further arranged such that for a block of 8 by 8 DCT coefficients, a block of 4 by 4 pixels are extracted, the pixel values being calculated by the calculating means in accordance with the following equations, wherein x(i,j) is the extracted value of pixel (i,j), C(u,v) is the DCT coefficient (u,v) with respect to the DCT coefficient block, and >>x represents an effective divide by 2x:
- x00=A1+3>>3+0.176(B3+B1+C11)
- x10=A2+4>>3+0.176B2+(B3>>4)+(C11>>4)
- x20=A2+4>>3+0.176B2−(B3>>4)−(C11>>4)
- x30=A1+3>>3−(B3−B1)>>4−(C11>>4)
- x01=A1−3>>3+0.176B3+(B1>>4)+(C11>>4)
- x11=A2−4>>3+(B4+B2)>>4
- x21=A2−4>>3−(B4−B2)>>4
- x31=A1−3>>3−0.176B4+(B1>>4)+(C11>>4)
- x02=A1−3>>3+0.176B4−(B1>>4)−(C11>>4)
- x12=A2−4>>3+(B4>>4)−(B2>>4)
- x22=A2−4>>3−(B4+B2)>>4
- x32=A1−3>>3−0.176B4−(B1>>4)+(C11>>4)
- x03=A1+3>>3+0.176(B4−B1−C11)
- x13=A2+4>>3−0.176B2+B3>>4−(C11>>4)
- x23=A2+4>>3−0.176B2−(B3>>4)+(C11>>4)
- x33=A1+3>>3−0.176(B4+B1−C11)
- and where:
- A1+3=A1+A3;
- A1−3=A1−A3;
- A2+4=A2+A4;
- A2−4=A2−A4;
- A1=C(0,0)+C(2,0);
- A2=C(0,0)−C(2,0);
- A3=C(0,2)+C(2,2);
- A4=C(0,2)−C(2,2)
- B1=C(0,1)+C(2,1);
- B2=C(0,1)−C(2,1);
- B3=C(1,0)+C(1,2);
- B4=C(1,0)−C(1,2).
Dependencies are inferred from the claim text.