WO2019142821A1 - 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム - Google Patents

符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム Download PDF

Info

Publication number
WO2019142821A1
WO2019142821A1 PCT/JP2019/001083 JP2019001083W WO2019142821A1 WO 2019142821 A1 WO2019142821 A1 WO 2019142821A1 JP 2019001083 W JP2019001083 W JP 2019001083W WO 2019142821 A1 WO2019142821 A1 WO 2019142821A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
pixel
color component
encoding
unit
Prior art date
Application number
PCT/JP2019/001083
Other languages
English (en)
French (fr)
Inventor
安藤 一郎
Original Assignee
株式会社ニコン
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社ニコン filed Critical 株式会社ニコン
Priority to EP19741876.7A priority Critical patent/EP3742732A4/en
Priority to JP2019566483A priority patent/JPWO2019142821A1/ja
Priority to US16/962,571 priority patent/US20210014530A1/en
Priority to CN201980019808.5A priority patent/CN111869213A/zh
Publication of WO2019142821A1 publication Critical patent/WO2019142821A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present invention relates to an encoding apparatus, a decoding apparatus, an encoding method, a decoding method, an encoding program, and a decoding program.
  • the encoding apparatus is configured by a pixel group of the first color component from RAW image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • a generation unit configured to generate a first image data to be generated and a second image data configured by a pixel group of the second color component; and the generation based on the first image data generated by the generation unit.
  • an encoding unit that encodes the second image data generated by the unit.
  • a photoelectric conversion unit that photoelectrically converts light of a first color component and a photoelectric conversion unit that photoelectrically converts a second color component different from the first color component are repeatedly arranged.
  • a decoding device is a first encoded image data obtained by encoding first image data composed of a pixel group of a first color component, and a second color component different from the first color component.
  • a second encoded image data obtained by encoding, based on the first image data, second image data composed of the first group of pixels, and a first encoded image acquired by the acquisition unit
  • a decoding unit that decodes data into the first image data and decodes the second encoded image data acquired by the acquisition unit into the second image data based on the first image data;
  • a generation unit configured to generate RAW image data in which the first color component and the second color component are repeatedly arranged based on the first image data and the second image data decoded by the.
  • the encoding method is configured by a pixel group of the first color component from RAW image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • encoding processing for encoding the second image data generated by the processing is configured by a pixel group of the first color component from RAW image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • encoding processing for encoding the second image data generated by the processing.
  • first encoded image data obtained by encoding first image data configured by a pixel group of a first color component, and a second color component different from the first color component An acquisition process for acquiring second encoded image data obtained by encoding second image data composed of the group of pixels based on the first image data, and a first encoded image acquired by the acquisition process
  • FIG. 1 is an explanatory diagram of an example of encoding and decoding according to the first embodiment.
  • FIG. 2 is an explanatory view showing an example of the color arrangement shown in FIG.
  • FIG. 3 is a block diagram showing an example of the hardware configuration of the information processing apparatus.
  • FIG. 4 is a block diagram of a functional configuration example of the encoding apparatus according to the first embodiment.
  • FIG. 5 is an explanatory view showing an example of generation of a component frame by the first generation unit.
  • FIG. 6 is a block diagram showing a configuration example of the encoding unit.
  • FIG. 7 is an explanatory view showing an example of the reference direction of the component frame.
  • FIG. 8 is an explanatory view showing an example of detection of a motion vector.
  • FIG. 1 is an explanatory diagram of an example of encoding and decoding according to the first embodiment.
  • FIG. 2 is an explanatory view showing an example of the color arrangement shown in FIG.
  • FIG. 3 is a block diagram showing an example
  • FIG. 9 is an explanatory diagram of a pixel position compensation prediction example 1 between component frames.
  • FIG. 10 is an explanatory diagram of pixel position compensation prediction example 2 between component frames.
  • FIG. 11 is an explanatory view of a pixel position compensation prediction example 3 between component frames.
  • FIG. 12 is an explanatory diagram of a pixel position compensation prediction example 4 between component frames.
  • FIG. 13 is an explanatory diagram of a pixel position compensation prediction example 5 between component frames.
  • FIG. 14 is an explanatory diagram of pixel position compensation prediction example 6 between component frames.
  • FIG. 15 is an explanatory diagram of a pixel position compensation prediction example 7 between component frames.
  • FIG. 16 is an explanatory diagram of a pixel position compensation prediction example 4 between component frames.
  • FIG. 17 is an explanatory drawing showing an example of the data structure of the encoding component frame.
  • FIG. 18 is a flowchart of an example of an encoding process procedure by the encoding apparatus.
  • FIG. 19 is a block diagram showing an example of a functional configuration of the decoding apparatus.
  • FIG. 20 is a block diagram showing a configuration example of a decoding unit.
  • FIG. 21 is a flow chart showing an example of the decoding processing procedure by the decoding device.
  • FIG. 22 is an explanatory diagram of an example of encoding and decoding according to the second embodiment.
  • FIG. 23 is a block diagram of a functional configuration of the encoding apparatus according to the second embodiment.
  • FIG. 24 is a flowchart of an example of an encoding process performed by the encoding apparatus according to the second embodiment.
  • FIG. 25 is a block diagram of a functional configuration example of the decoding apparatus according to the second embodiment.
  • FIG. 26 is a flowchart of an exemplary decoding process performed by the decoding apparatus according to the second embodiment.
  • FIG. 27 is an explanatory diagram of a coding and decoding example according to the third embodiment.
  • FIG. 28 is an explanatory view showing an example of the reference direction of the component frame.
  • FIG. 29 is an explanatory diagram of an example of coding in units of slices.
  • FIG. 30 is an explanatory diagram of a coding and decoding example according to the fourth embodiment.
  • the image data to be encoded in each embodiment is RAW image data.
  • RAW image data is, for example, image data before processing which is output as a result of photoelectric conversion in an imaging device in which a Bayer array color filter is mounted, and color interpolation processing or compression processing (for example, in the case of a still image)
  • JPEG Joint Photographic Experts Group
  • MPEG Motion Picture Experts Group
  • white balance adjustment may be made to RAW image data.
  • FIG. 1 is an explanatory diagram of an example of encoding and decoding according to the first embodiment.
  • (A) Separation and (B) coding are performed by the coding device, and (C) decoding and (D) combining are performed by the decoding device.
  • the RAW image data 100 is image data in which a color array 101 having a plurality of color components is periodically arranged.
  • the color array 101 is a 2 ⁇ 2 pixel array in which the upper left is green (G1), the upper right is blue (B), the lower left is red (R), and the lower right is green (G2). It becomes an ingredient.
  • Another example of the color arrangement 101 will be described later with reference to FIG.
  • the encoding apparatus generates a component frame for each color component from the RAW image data 100.
  • the encoding device may use G1 image data 111 that is a green (G1) color component frame, G2 image data 112 that is a green (G2) color component frame, and a blue (B) color component frame.
  • B image data 113 which is the R image data 114 which is a color component frame of red (R).
  • the G1 image data 111 is image data configured by G1 pixel groups from each of the color arrays 101 in the RAW image data 100.
  • the G2 image data 112 is image data configured by G2 pixel groups from each of the color arrays 101 in the RAW image data 100.
  • the B image data 113 is image data composed of B pixel groups from each of the color arrays 101 in the RAW image data 100.
  • the R image data 114 is image data composed of R pixel groups from each of the color arrays 101 in the RAW image data 100.
  • the encoding apparatus encodes each color component frame between component frames. Specifically, for example, the encoding apparatus encodes one of the component frame groups by intra-frame predictive coding to generate an I picture, and encodes the remaining component frame group by inter-frame predictive coding to perform P Generate a picture or B picture.
  • G1 image data 111 becomes G1 encoded image data 121
  • G2 image data 112 becomes G2 encoded image data 122
  • B image data 113 becomes B encoded image data 123 by encoding.
  • the image data 114 is R encoded image data 124.
  • the decoding apparatus decodes the encoded component frame group. Specifically, for example, the decoding apparatus decodes an I picture and then sequentially decodes a subsequent P picture or B picture to generate another component frame. That is, the decoding apparatus decodes the G1 encoded image data 121, the G2 encoded image data 122, the B encoded image data 123, and the R encoded image data 124 to obtain the G1 image data 111, the G2 image data 112, and B. Image data 113 and R image data 114 are generated.
  • the decoding apparatus combines the decoded component frame groups to generate RAW image data 100. Specifically, for example, by arranging pixels G1, G2, B, R at the same position of G1 image data 111, G2 image data 112, B image data 113, and R image data 114 according to color array 101, a RAW image is obtained. Restore the data 100.
  • the encoding efficiency of the RAW image data 100 can be increased by predicting the RAW image data 100 between the component frames by utilizing the property that the correlation between the component frames becomes high due to the hue and the saturation. it can.
  • the original RAW image data 100 can be restored.
  • FIG. 2 is an explanatory view showing an example of the color arrangement shown in FIG. (A) shows the same color arrangement as the color arrangement 101 shown in FIG. (B) shows a color array 201 in which the positions of the B pixel and the R pixel are switched in (a).
  • C) shows a color array 202 in which the left half pixel row (G1, R) and the right half pixel row (B, G2) are replaced in (a).
  • D) shows a color array 203 in which the left half pixel row (G1, B) and the right half pixel row (R, G2) are replaced in (b).
  • E) shows an example of a color array 204 of 6 ⁇ 6 pixels.
  • green pixels are included in pixel columns from any of the vertical (6 pixels), horizontal (6 pixels), and diagonal (3 pixels or more) directions.
  • the color array 101 of (a) will be described as an example of the color array.
  • FIG. 3 is a block diagram showing an example of the hardware configuration of the information processing apparatus.
  • the information processing device 300 is a device including one or both of an encoding device and a decoding device.
  • the information processing device 300 may be, for example, an imaging device such as a digital camera or a digital video camera, and may be a personal computer, a tablet, a smartphone, or a game machine.
  • the information processing apparatus 300 includes a processor 301, a storage device 302, an operation device 303, an LSI (Large Scale Integration) 304, an imaging unit 305, and a communication IF (Interface) 306. These are connected by a bus 308.
  • the processor 301 controls the information processing device 300.
  • the storage device 302 is a work area of the processor 301.
  • the storage device 302 is a non-temporary or temporary storage medium that stores various programs and data.
  • the storage device 302 is, for example, a read only memory (ROM), a random access memory (RAM), a hard disk drive (HDD), or a flash memory.
  • the operation device 303 operates data. Examples of the operation device 303 include a button, a switch, and a touch panel.
  • the LSI 304 is an integrated circuit that performs specific processing such as image processing such as color interpolation, white balance adjustment, contour emphasis, gamma correction, gradation conversion, coding processing, decoding processing, compression / decompression processing, and the like.
  • the imaging unit 305 captures an object and generates RAW image data.
  • the imaging unit 305 includes an imaging optical system 351, an imaging device 353 having a color filter 352, and a signal processing circuit 354.
  • the imaging optical system 351 is composed of, for example, a plurality of lenses including a zoom lens and a focus lens. Note that the imaging optical system 351 is illustrated with a single lens in FIG. 3 for simplicity.
  • the imaging element 353 is a device for imaging (shooting) an image of an object formed by the light flux that has passed through the imaging optical system 351.
  • the imaging device 353 may be a solid-state imaging device of a progressive scanning system (for example, a CCD (Charge Coupled Device) image sensor), or a solid-state imaging device of an XY address system (for example, a Complementary Metal Oxide Semiconductor (CMOS) image sensor) It may be
  • each pixel of the imaging element 353 On the light receiving surface of the imaging element 353, pixels having photoelectric conversion units are arranged in a matrix. Then, in each pixel of the imaging element 353, a plurality of types of color filters 352 that transmit light of different color components are arranged according to a predetermined color array 101. Therefore, each pixel of the imaging element 353 outputs an electrical signal corresponding to each color component by color separation in the color filter 352.
  • the red (R), green (G) and blue (B) color filters 352 are periodically arranged on the light receiving surface according to the Bayer arrangement of 2 rows and 2 columns.
  • G and B pixels are alternately arranged in the odd rows of the color array 101 of the imaging device 353, and R and G pixels are alternately arranged in the even rows of the color array 101.
  • green pixels are arranged in a checkered pattern.
  • the imaging device 353 can acquire a color image at the time of shooting.
  • the signal processing circuit 354 performs analog signal processing (correlated double sampling, black level correction, etc.), A / D conversion processing, digital signal processing (defective pixel correction, etc.) on the image signal input from the imaging device 353. And) sequentially.
  • Raw image data 100 output from the signal processing circuit 354 is input to the LSI 304 or the storage device 302.
  • the communication IF 306 is connected to an external device via a network to transmit and receive data.
  • FIG. 4 is a block diagram of a functional configuration example of the encoding apparatus according to the first embodiment.
  • the encoding apparatus 400 includes a first generation unit 401, an encoding unit 402, and a recording unit 403.
  • the first generation unit 401 generates a component frame for each color component from the RAW image data 100
  • the encoding unit 402 encodes the component frame
  • the recording unit 403 records the encoded component frame in the storage device 302. .
  • the first generation unit 401, the encoding unit 402, and the recording unit 403 are, for example, functions executed by causing the processor 301 to execute a program stored in the storage device 302, or a function realized by the LSI 304. is there.
  • the first generation unit 401 is configured of RAW image data in which the first color component and the second color component different from the first color component are repeatedly arranged, and the first image data including the pixel group of the first color component , And second image data configured by a pixel group of a second color component.
  • the first generation unit 401 includes a pixel having a photoelectric conversion unit that photoelectrically converts light of the first color component, and a pixel having a photoelectric conversion unit that photoelectrically converts a second color component different from the first color component.
  • First image data composed of the first color component and second image data composed of the second color component from the RAW image data 100 based on the output from the image pickup device 353 in which the .
  • the RAW image data 100 may be image data directly output from the imaging device 353, or may be duplicated RAW image data 100.
  • the color array 101 has three types of four color components, green (G1), green (G2), blue (B), and red (R).
  • the first color component is any one of green (G1), green (G2), blue (B), and red (R) that constitute the color array 101.
  • the second color component is blue (B) or red (R) if the first color component is green (G1) or green (G2), and green (G1) if the first color component is blue (B) And any one of green (G2) and red (R), and if the first color component is red (R), green (G1), green (G2), and blue (B) It is any one of them.
  • the first image data is G1 image data 111 if the first color component is green (G1), and G2 image data 112 if the first color component is green (G2), and the first color component is blue.
  • (B) it is the B image data 113
  • R red
  • the first image data is G1 image data 111 or G2 image data 112
  • the second image data is B image data 113 or R image data 114
  • the first image data is B image data 113. If it exists, it is any one of G1 image data 111, G2 image data 112, and R image data 114, and if the first image data is R image data 114, G1 image data 111, G2 image data 112, and It is any one of the B image data 113.
  • the RAW image data 100 has a third color component that is the same as either one of the first color component and the second color component, or different from the first color component and the second color component. Specifically, for example, if the first color component is green (G1) and the second color component is blue (B), for example, the third color component is the same color component as green (G1) of the first color component. A certain green (G2) or red (R) which is a color component different from the first color component and the second color component is obtained.
  • the third color component if the first color component is green (G2) and the second color component is blue (B), green (G1) which is the same color component as green (G2) of the first color component Or, it becomes red (R) which is a color component different from the first color component and the second color component.
  • the third color component if the first color component is green (G1) and the second color component is red (R), the third color component is green (the same color component as green (G1) of the first color component G2) or blue (B) which is a color component different from the first color component and the second color component.
  • the first color component is green (G2) and the second color component is red (R)
  • green (G1) which is the same color component as green (G2) of the first color component
  • blue (B) which is a color component different from the first color component and the second color component.
  • the third image data is G2 image data 112 or R image data 114 if the first image data is G1 image data 111 and the second image data is B image data 113. Further, if the first image data is G2 image data 112 and the second image data is B image data 113, the third image data is G1 image data 111 or R image data 114.
  • the third image data is G2 image data 112 or B image data 113 if the first image data is G1 image data 111 and the second image data is R image data 114. In addition, if the first image data is G2 image data 112 and the second image data is R image data 114, the third image data is G1 image data 111 or B image data 113.
  • the fourth color component is the remaining color component
  • the first generation unit 401 generates fourth image data of the remaining color component from the pixel group of the remaining color component in the RAW image data 100.
  • FIG. 5 is an explanatory view showing an example of generation of a component frame by the first generation unit 401.
  • RAW image data 100 As shown in FIG. (A) is RAW image data 100 to be encoded.
  • the component frame of (b) is G1 image data 111
  • the component frame of (c) is G2 image data 112
  • the component frame of (d) is B image data 113
  • the component frame of (e) is R It is image data 114.
  • the first generation unit 401 rearranges the G1 pixel, the B pixel, the R pixel, and the G2 pixel separated from the RAW image data 100 according to the position of the color array 101 by executing the separation illustrated in FIG. .
  • the first generation unit 401 generates four component frames of G1 image data 111, G2 image data 112, B image data 113, and R image data 114 from one RAW image data 100.
  • Each of the G1 image data 111, the G2 image data 112, the B image data 113, and the R image data 114 has an image size (V / 2 ⁇ H / 2) that is 1 ⁇ 4 of that of the RAW image data 100.
  • the encoding unit 402 encodes the second image data generated by the first generation unit 401 based on the first image data generated by the first generation unit 401. Specifically, for example, the encoding unit 402 encodes the second image data by compensating the pixel position between the first image data and the second image data.
  • “compensation of the pixel position” is to compensate the target pixel of the second image data with a specific reference pixel in the first image data at a position different from the target pixel.
  • G1 pixel, G2 pixel, B pixel and R pixel extracted from the same color array 101 of the RAW image data 100 are each component frame (G1 image data 111, G2 image data 112, B image data 113, R image data 114 Are arranged at the same pixel position.
  • the encoding unit 402 performs pixel position compensation between component frames generated from the same RAW image data 100 as in the case of motion compensation between frames in the time axis direction in the normal encoding process. Become.
  • the encoding unit 402 performs intra-frame predictive coding on a specific component frame (for example, G1 image data 111) to generate an I picture, and the remaining component frames (for example, G2 image data 112, B image data) 113, interframe predictive coding is performed on R image data 114) to generate a P picture or a B picture.
  • a specific component frame for example, G1 image data 111
  • the remaining component frames for example, G2 image data 112, B image data
  • interframe predictive coding is performed on R image data 114 to generate a P picture or a B picture.
  • An I picture is coded image data obtained by coding that is completed only within a component frame.
  • the P picture is coded image data obtained by component interframe predictive coding using one reference component frame at maximum.
  • the B picture is coded image data obtained by component interframe prediction coding using a maximum of two reference component frames.
  • FIG. 6 is a block diagram showing a configuration example of the encoding unit 402.
  • the encoding unit 402 includes a first accumulation unit 601, a subtraction unit 602, an orthogonal transformation unit 603, a quantization unit 604, a variable length encoding unit 605, an inverse quantization unit 606, and an inverse orthogonal transformation unit 607. , An addition unit 608, a second storage unit 609, a positional deviation detection unit 610, and a first pixel position compensation unit 611.
  • the first accumulation unit 601 accumulates each component frame (G1 image data 111, G2 image data 112, B image data 113, R image data 114) output from the first generation unit 401.
  • the component frames accumulated in the first accumulation unit 601 are output to the subtraction unit 602 in the order of input as image data to be encoded. Note that the image data that has been encoded is sequentially deleted from the first storage unit 601.
  • the subtractor 602 calculates a difference signal (prediction error value) between the component frame of the input original image and a later-described predicted value generated by the first pixel position compensating unit 611. Output.
  • the subtraction unit 602 outputs the component frame of the input original image as it is.
  • the orthogonal transformation unit 603 When generating an I picture, the orthogonal transformation unit 603 performs orthogonal transformation on a component frame of an original image input through the subtraction unit 602. Also, when generating a P picture or a B picture, the orthogonal transform unit 603 performs an orthogonal transform on the above-described difference signal.
  • the quantization unit 604 converts the block-based frequency coefficient (orthogonal transformation coefficient) input from the orthogonal transformation unit 603 into a quantization coefficient.
  • the output of the quantization unit 604 is input to the variable-length coding unit 605 and the dequantization unit 606, respectively.
  • variable-length coding unit 605 performs variable-length coding on a quantization coefficient and a motion vector related to positional displacement from the positional displacement detection unit 610 (hereinafter simply referred to as “motion vector”) to encode component frames (I picture, P picture) , B picture).
  • motion vector a motion vector related to positional displacement from the positional displacement detection unit 610
  • the inverse quantization unit 606 inversely quantizes the quantization coefficient in block units, which are units of encoding, to decode frequency coefficients.
  • the inverse orthogonal transformation unit 607 performs inverse orthogonal transformation on the frequency coefficient decoded by the inverse quantization unit 606 to decode a prediction error value (or a component frame of the original image).
  • the addition unit 608 adds the decoded prediction error value and a later-described prediction value generated by the first pixel position compensation unit 611.
  • the decoded value (reference component frame) of the picture output from the adding unit 608 is stored in the second storage unit 609. Note that component frames not referred to in the pixel position compensation prediction thereafter are sequentially erased from the second accumulation unit 609.
  • the positional deviation detection unit 610 detects, using the reference image of the second accumulation unit 609, a motion vector indicating a positional deviation of pixels for predicting a component frame to be encoded.
  • the motion vector is output to the first pixel position compensation unit 611 and the variable length coding unit 605.
  • the first pixel position compensation unit 611 outputs a prediction value obtained by predicting a component frame to be encoded in block units based on the motion vector and the reference component frame.
  • the predicted value is output to the subtraction unit 602 and the addition unit 608.
  • FIG. 7 is an explanatory view showing an example of the reference direction of the component frame.
  • (A) shows the reference direction when the input order of component frames from the same RAW image data 100 is G1 image data 111, G2 image data 112, B image data 113, and R image data 114.
  • the top G1 image data 111 is encoded into an I picture.
  • the G2 image data 112 to be input next is encoded into a P picture by inter-frame prediction coding with the preceding G1 image data 111 as a reference component frame.
  • the B image data 113 to be input next is a P picture or B picture encoded by inter-frame predictive coding with the component frame of at least one of the G1 image data 111 and G2 image data 112 preceding for each block as a reference component frame.
  • Be The R image data 114 input last is P inter-frame predictive coding using at least one component frame of the G1 image data 111, G2 image data 112, and B image data 113 preceding each block as a reference component frame. It is encoded into a picture or a B picture.
  • (B) shows the reference direction when the input order of component frames from the same RAW image data 100 is B image data 113, R image data 114, G1 image data 111, and G2 image data 112.
  • the leading B image data 113 is encoded into an I picture.
  • the R image data 114 to be input next is encoded into a P picture by inter-frame predictive coding with the preceding B image data 113 as a reference component frame.
  • the G1 image data 111 to be input next is encoded into a P picture or a B picture by inter-frame predictive coding, using at least one component frame of the preceding B image data 113 and R image data 114 as a reference component frame.
  • the G2 image data 112 to be input last is P picture or B by inter-frame predictive coding using at least one component frame of the preceding B image data 113, R image data 114, and G1 image data 111 as a reference component frame. Encoded into a picture.
  • the reference direction in FIG. 7 is an example, and encoding can be performed in the input order of component frames other than (A) and (B). That is, the first component frame is encoded into an I picture, and the subsequent component frames are encoded into a P picture or a B picture. Further, since the encoding unit 402 uses the luminance value from the pixel of the imaging device 353 which does not depend on the color component, it is possible to encode different color components as a reference frame.
  • FIG. 8 is an explanatory view showing an example of detection of a motion vector.
  • (A) shows RAW image data 100 and component frames
  • (B) to (M) show examples of motion vector detection.
  • a to d, x are added to the end of the sign of the color components.
  • the positional deviation of the reference pixel of the reference component frame with respect to the position of the target pixel of the component frame of the prediction target is taken as a motion vector V (x, y).
  • x increases with the rightward shift
  • x decreases with the leftward shift
  • y increases with the downward shift
  • y decreases with the upward shift.
  • the motion vector V (x, y) is indicated by a black arrow.
  • the positional deviation detection unit 610 detects a motion vector for predicting a target pixel with one reference pixel. Thereby, R image data 114 can be encoded into a P picture.
  • a reference pixel of the B image data 113 is set as a pixel Bb.
  • the reference pixel of the B image data 113 is a pixel Ba.
  • a reference pixel of the B image data 113 is set as a pixel Bd.
  • a reference pixel of the B image data 113 is set as a pixel Bc.
  • a motion vector V (B in the case where a reference component frame is B image data 113, a component frame to be predicted is R image data 114, and a target pixel is a pixel Rx of R image data 114
  • the positional deviation detection unit 610 detects a motion vector for predicting a pixel of interest with a plurality of reference pixels of the same color component. Thereby, R image data 114 can be encoded into a P picture.
  • reference pixels of the B image data 113 are set as pixels Ba to Bd.
  • the target pixel Rx is at the same pixel position as the reference pixel Bb.
  • the average reference pixel position is at the center of the reference pixels Ba to Bd, and there is a positional deviation from the target pixel Rx.
  • reference pixels of the B image data 113 are set as pixels Bb and Bd.
  • the target pixel Rx is at the same pixel position as the reference pixel Bb.
  • the average reference pixel position is at the center of the reference pixels Bb and Bd, and a positional deviation from the target pixel Rx occurs.
  • reference pixels of the B image data 113 are set as pixels Ba and Bc.
  • the target pixel Rx is at the same pixel position as the reference pixel Bb.
  • the average reference pixel position is located at the center of the reference pixels Ba and Bc, and a positional deviation occurs with the target pixel Rx.
  • reference pixels of the B image data 113 are set as pixels Ba and Bb.
  • the target pixel Rx is at the same pixel position as the reference pixel Bb.
  • the average reference pixel position is at the center of the reference pixels Ba and Bb, and there is a positional deviation from the target pixel Rx.
  • reference pixels of the B image data 113 are set as pixels Bc and Bd.
  • the target pixel Rx is at the same pixel position as the reference pixel Bb.
  • the average reference pixel position is located at the center of the reference pixels Bc and Bd, and there is a positional deviation from the target pixel Rx.
  • reference component frames are G1 image data 111 and / or G2 image data 112
  • component frames to be predicted are R image data 114
  • a target pixel is a pixel Rx of R image data 114.
  • An example of detection of the motion vector V in the case is shown.
  • the positional deviation detection unit 610 detects a motion vector for predicting a pixel of interest with a plurality of reference pixels of the same color component or different color components. Thereby, R image data 114 can be encoded into a P picture or a B picture.
  • reference pixels of the G1 image data 111 are set as pixels G1 b and G1 d.
  • the target pixel Rx is at the same pixel position as the reference pixel G1b.
  • the average reference pixel position is at the center of the reference pixels G1b and G1d, and a positional deviation occurs with respect to the target pixel Rx.
  • reference pixels of the G2 image data 112 are set as pixels G2a and G2b.
  • the target pixel Rx is at the same pixel position as the reference pixel G2b.
  • the average reference pixel position is at the center of the reference pixels G2a and G2b, and a positional deviation from the target pixel Rx occurs.
  • the prediction destination is R image data 114
  • the prediction destination may be G1 image data 111, G2 image data 112, and B image data 113.
  • the R image data 114 may be used as a reference component frame.
  • the bidirectional reference component frame of (M) may not be the same color component but different color components.
  • the G1 pixel, the G2 pixel, the B pixel, and the R pixel extracted from the same color array 101 of the RAW image data 100 are arranged at the same pixel position in each component frame.
  • a shift in design occurs due to the difference in pixel position in the color array 101. Therefore, pixel position compensation prediction between component frames is performed in consideration of differences in pixel positions in the color array 101.
  • Example of pixel position compensation prediction between component frames ⁇ Example of pixel position compensation prediction between component frames>
  • the arrangement of pixels in the RAW image data 100 is indicated by circles.
  • the range of one color arrangement is indicated by a frame.
  • FIG. 9 is an explanatory diagram of a pixel position compensation prediction example 1 between component frames.
  • the component frame to be predicted is G2 image data 112
  • the value of the target pixel G2x is four pixels G1a to G1d around G1 image data 111 which is a reference component frame adjacent to the target pixel G2x.
  • the G2 image data 112 is encoded into a P picture by predicting the pixel value of the target pixel G2x by the average of the four adjacent pixels G1a to G1d. Therefore, it is possible to predict by G1 image data in accordance with the pixel position of the target pixel G2x.
  • coding distortion included in the decoded value of the G1 image data 111, which is a reference component frame, can be suppressed.
  • the component frame of the prediction target is the G2 image data 112
  • the value of the target pixel G2x is two adjacent pixels G1a of the G1 image data 111 which is the reference component frame adjacent to the target pixel G2x
  • An example of prediction using the average value of G1c is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Since the pixel value of the pixel of interest G2x is predicted by the average of the two adjacent pixels G1a and G1c, it is possible to suppress the coding distortion included in the decoded value of the G1 image data 111 which is the reference component frame.
  • the component frame of the prediction target is the G2 image data 112
  • the value of the target pixel G2x is two adjacent pixels G1b of the G1 image data 111 which is the reference component frame adjacent to the target pixel G2x
  • An example of prediction using the average value of G1d is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Since the pixel value of the target pixel G2x is predicted by the average of the two adjacent pixels G1b and G1d, coding distortion included in the decoded value of the G1 image data 111 which is the reference component frame can be suppressed.
  • the component frame of the prediction target is G2 image data 112
  • the value of the focused pixel G2x is the adjacent two pixels G1a of the G1 image data 111 which is the reference component frame adjacent to the focused pixel G2x
  • An example of prediction using the average value of G1b is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Since the pixel value of the pixel of interest G2x is predicted by the average of the two adjacent pixels G1a and G1b, it is possible to suppress the encoding distortion included in the decoded value of the G1 image data 111 which is the reference component frame.
  • the component frame of the prediction target is G2 image data 112
  • the value of the focused pixel G2x is two adjacent pixels G1c of G1 image data 111 which is the reference component frame adjacent to the focused pixel G2x
  • An example of prediction using the average value of G1d is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Since the pixel value of the target pixel G2x is predicted by the average of two adjacent pixels G1c and G1d, coding distortion included in the decoded value of the G1 image data 111, which is a reference component frame, can be suppressed.
  • the G2 image data 112 is encoded into a P picture by predicting the pixel value of the target pixel G2x by the average of two adjacent pixels. Therefore, coding distortion included in the decoded value of the G1 image data 111, which is a reference component frame, can be suppressed.
  • FIG. 10 is an explanatory diagram of pixel position compensation prediction example 2 between component frames.
  • the value of the target pixel of the component frame to be predicted is predicted from the value of the pixel at a different position of the reference component frame which is the same color component as the component frame to be predicted.
  • the component frame to be predicted is G2 image data 112
  • the target pixel is a pixel G2x
  • the reference component frame is G1 image data 111.
  • the value of the target pixel G2x of the G2 image data 112 which is the component frame of the prediction target is predicted from the value of the pixel G1a located at the upper left in RAW image data.
  • Such motion-compensated prediction has a high probability of being selected in a block of a pattern including diagonal edges from the lower right to the upper left.
  • the value of the target pixel G2x of the G2 image data 112 which is the component frame of the prediction target is predicted from the value of the pixel G1b located at the upper right in RAW image data.
  • Such motion compensation prediction has a high probability of being selected in a block of a pattern including an oblique edge from lower left to upper right.
  • the value of the target pixel G2x of the G2 image data 112 which is the component frame of the prediction target is predicted from the value of the pixel G1c located at the lower left in RAW image data.
  • the reference pixel (sample point to which G1c belongs) of G1 image data 111 that is the reference component frame is relative to the position of the target pixel (sample point to which G2x belongs) in G2 image data 112 that is the component frame to be predicted.
  • Such motion-compensated prediction has a high probability of being selected in a block of a pattern including diagonal edges from the lower right to the upper left.
  • the value of the target pixel G2x of the G2 image data 112 which is the component frame of the prediction target is predicted from the value of the pixel G1d located at the lower right in the RAW image data 100.
  • Such motion compensation prediction has a high probability of being selected in a block of a pattern including an oblique edge from lower left to upper right.
  • the G2 image data 112 is encoded into a P picture by predicting the pixel value of the pixel of interest G2x with one pixel G1. Therefore, coding distortion included in the decoded value of the G1 image data 111, which is a reference component frame, can be suppressed.
  • FIG. 11 is an explanatory view of a pixel position compensation prediction example 3 between component frames.
  • the value of the target pixel of the component frame to be predicted is predicted from the value of the pixel at a different position of the reference component frame, which is a color component different from that of the component frame to be predicted.
  • the component frame to be predicted is B image data 113
  • the target pixel is a pixel Bx
  • the reference component frame is G1 image data 111 or G2 image data 112.
  • the value of the target pixel Bx of the B image data 113 which is the component frame of the prediction target is set to two adjacent pixels G1a and G1b of the G1 image data 111 which is the reference component frame adjacent to the target pixel Bx.
  • An example of prediction with the average value of The B image data 113 is encoded into a P picture by predicting the pixel value of the pixel of interest Bx by the average of the two adjacent pixels G1a and G1b.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge.
  • coding distortion included in the decoded value of the G1 image data 111, which is a reference component frame can be suppressed.
  • the value of the pixel of interest Bx of the B image data 113 which is the component frame of the prediction target is set to two adjacent pixels G2a and G2b of the G2 image data 112 which is the reference component frame adjacent to the pixel of interest Bx.
  • An example of prediction with the average value of The B image data 113 is encoded into a P picture by predicting the pixel value of the pixel of interest Bx based on the average of two adjacent pixels G2a and G2b.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges.
  • coding distortion included in the decoded value of the G2 image data 112, which is a reference component frame can be suppressed.
  • the reference pattern of (C) is a combination of the pixel position compensation prediction of (A) and the pixel position compensation prediction of (B). That is, (C) sets the value of the pixel of interest Bx of the B image data 113 which is the component frame of the prediction target to the adjacent two pixels G1a and G1b of the G1 image data 111 which is the reference component frame adjacent to the pixel of interest Bx. In this example, prediction is performed using the average value of adjacent two pixels G2a and G2b of the G2 image data 112.
  • the B image data 113 is encoded into a B picture by predicting the pixel value of the pixel of interest Bx by the average of four adjacent pixels G1a, G1b, G2a, and G2b. Therefore, coding distortion included in the decoded values of the G1 image data 111 and the G2 image data 112, which are reference component frames, can be further suppressed.
  • FIG. 12 is an explanatory diagram of a pixel position compensation prediction example 4 between component frames.
  • the value of the target pixel of the component frame to be predicted is predicted from the value of the pixel at a different position of the reference component frame which is a color component different from that of the component frame to be predicted.
  • the component frame to be predicted is R image data 114
  • the target pixel is a pixel Rx
  • the reference component frame is G1 image data 111 or G2 image data 112.
  • the value of the target pixel Rx of the R image data 114 which is the component frame of the prediction target is set to two adjacent pixels G1a and G1b of the G1 image data 111 which is the reference component frame adjacent to the target pixel Rx.
  • An example of prediction with the average value of The R image data 114 is encoded into a P picture by predicting the pixel value of the target pixel Rx by the average of two adjacent pixels G1a and G1b.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges.
  • coding distortion included in the decoded value of the G1 image data 111, which is a reference component frame can be suppressed.
  • the value of the target pixel Rx of the R image data 114 which is the component frame of the prediction target is set to two adjacent pixels G2a and G2b of the G2 image data 112 which is the reference component frame adjacent to the target pixel Rx.
  • An example of prediction with the average value of The R image data 114 is encoded into a P picture by predicting the pixel value of the target pixel Rx by the average of two adjacent pixels G2a and G2b.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge.
  • coding distortion included in the decoded value of the G2 image data 112, which is a reference component frame can be suppressed.
  • the reference pattern of (C) is a combination of the pixel position compensation prediction of (A) and the pixel position compensation prediction of (B). That is, in (C), the value of the target pixel Rx of the R image data 114 which is the component frame of the prediction target is set to two adjacent pixels G1a and G1b of the G1 image data 111 which is the reference component frame adjacent to the target pixel Rx. In this example, prediction is performed using the average value of adjacent two pixels G2a and G2b of the G2 image data 112.
  • the R image data 114 is encoded into a B picture by predicting the pixel value of the pixel of interest Bx by the average of four adjacent pixels G1a, G1b, G2a, and G2b. Therefore, it is possible to suppress coding distortion included in the decoded values of the G1 image data 111 and the G2 image data 112 which are reference component frames.
  • FIG. 13 is an explanatory diagram of a pixel position compensation prediction example 5 between component frames.
  • the component frame of the prediction target is R image data 114
  • the value of the target pixel Rx is four pixels Ba to Bd around B image data 113 which is a reference component frame adjacent to the target pixel Rx.
  • the R image data 114 is encoded into a P picture by predicting the pixel value of the target pixel Rx by the average of the four adjacent pixels Ba to Bd. Therefore, the B image can be predicted in accordance with the pixel position of the target pixel Rx. In addition, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the component frame of the prediction target is R image data 114
  • the value of the target pixel Rx is two adjacent pixels Ba of B image data 113 which is a reference component frame adjacent to the target pixel Rx
  • An example of prediction using the average value of Bc is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Since the pixel value of the target pixel Rx is predicted by the average of the two adjacent pixels Ba and Bc, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the component frame of the prediction target is R image data 114
  • the value of the focused pixel Rx is two adjacent pixels Bb of the B image data 113 which is a reference component frame adjacent to the focused pixel Rx.
  • An example of prediction using the average value of Bd is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Since the pixel value of the target pixel Rx is predicted by the average of the two adjacent pixels Bb and Bd, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the component frame of the prediction target is R image data 114
  • the value of the target pixel Rx is two adjacent pixels Ba of B image data 113 which is a reference component frame adjacent to the target pixel Rx
  • An example of prediction using the average value of Bb is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Since the pixel value of the target pixel Rx is predicted by the average of two adjacent pixels Ba and Bb, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the component frame of the prediction target is R image data 114
  • the value of the focused pixel Rx is two adjacent pixels Bc of the B image data 113 which is a reference component frame adjacent to the focused pixel Rx.
  • An example of prediction using the average value of Bd is shown.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Since the pixel value of the target pixel Rx is predicted by the average of the two adjacent pixels Bc and Bd, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the R image data 114 is encoded into a P picture by predicting the pixel value of the target pixel Rx by the average of two adjacent pixels. Therefore, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • FIG. 14 is an explanatory diagram of pixel position compensation prediction example 6 between component frames.
  • the value of the target pixel of the component frame to be predicted is predicted from the value of the pixel at a different position of the reference component frame that is the same color component as the component frame to be predicted.
  • the component frame to be predicted is R image data 114
  • the target pixel is a pixel Rx
  • the reference component frame is B image data 113.
  • the value of the target pixel Rx of the R image data 114 which is the component frame of the prediction target is predicted from the value of the pixel Ba located at the upper left in the RAW image data 100.
  • Such motion-compensated prediction has a high probability of being selected in a block of a pattern including diagonal edges from the lower right to the upper left.
  • the value of the target pixel Rx of the R image data 114 which is the component frame of the prediction target is predicted from the value of the pixel Bb located at the upper right in the RAW image data 100.
  • Such motion compensation prediction has a high probability of being selected in a block of a pattern including an oblique edge from lower left to upper right.
  • the value of the target pixel Rx of the R image data 114, which is the component frame of the prediction target is predicted from the value of the pixel Bd located at the lower right in the RAW image data 100.
  • the reference pixel (sample point to which Bd belongs) of the B image data 113 which is the reference component frame corresponds to the position of the target pixel (sample point to which Rx belongs) in the R image data 114 which is the component frame to be predicted.
  • Such motion compensation prediction has a high probability of being selected in a block of a pattern including an oblique edge from upper left to lower right.
  • the value of the target pixel Rx of the R image data 114, which is the component frame to be predicted is predicted from the value of the pixel Bc located at the lower right in the RAW image data 100.
  • Such motion-compensated prediction has a high probability of being selected in a block of a pattern including diagonal edges from upper right to lower left.
  • the R image data 114 is encoded into a P picture. Therefore, coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • FIG. 15 is an explanatory diagram of a pixel position compensation prediction example 7 between component frames.
  • the value of the target pixel of the component frame to be predicted is predicted from the value of the pixel at a different position of the reference component frame, which is a color component different from that of the component frame to be predicted.
  • the component frame to be predicted is G1 image data 111
  • the target pixel is a pixel G1x
  • the reference component frame is B image data 113 or R image data 114.
  • the value of the target pixel G1x of the G1 image data 111 which is the component frame of the prediction target is set to two adjacent pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the target pixel G1x.
  • An example of prediction with the average value of The G1 image data 111 is encoded into a P picture by predicting the pixel value of the target pixel G1x with the average of two adjacent pixels Ba and Bb.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge.
  • coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the value of the target pixel G1x of the G1 image data 111 which is the component frame of the prediction target is set to two adjacent pixels Ra and Rb of the R image data 114 which is the reference component frame adjacent to the target pixel G1x.
  • An example of prediction with the average value of The G1 image data 111 is encoded into a P picture by predicting the pixel value of the target pixel G1x by the average of two adjacent pixels Ra and Rb.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges.
  • coding distortion included in the decoded value of R image data 114 which is a reference component frame can be suppressed.
  • the reference pattern of (C) is a combination of the pixel position compensation prediction of (A) and the pixel position compensation prediction of (B). That is, in (C), the value of the target pixel G1x of the G1 image data 111 which is the component frame of the prediction target is set to two adjacent pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the target pixel G1x. In this example, prediction is made using the average value of adjacent two pixels Ra and Rb of R image data 114.
  • the G1 image data 111 is encoded into a B picture by predicting the pixel value of the target pixel G1x by the average of the four adjacent pixels Ba, Bb, Ra, and Rb. Therefore, coding distortion included in the decoded values of the G1 image data 111 and the R image data 114, which are reference component frames, can be suppressed.
  • FIG. 16 is an explanatory diagram of a pixel position compensation prediction example 4 between component frames.
  • the value of the target pixel of the component frame to be predicted is predicted from the value of the pixel at a different position of the reference component frame, which is a color component different from that of the component frame to be predicted.
  • the component frame to be predicted is G2 image data 112
  • the target pixel is a pixel G2x
  • the reference component frame is B image data 113 or R image data 114.
  • the value of the pixel of interest G2x of the G2 image data 112 which is the component frame of the prediction target is set to two adjacent pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the pixel of interest G2x.
  • An example of prediction with the average value of The G2 image data 112 is encoded into a P picture by predicting the pixel value of the target pixel G2x with the average of two adjacent pixels Ba and Bb.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges.
  • coding distortion included in the decoded value of the B image data 113 which is the reference component frame can be suppressed.
  • the value of the target pixel G2x of the G2 image data 112 which is the component frame of the prediction target is set to the adjacent two pixels Ra and Rb of the R image data 114 which is the reference component frame adjacent to the target pixel G2x.
  • An example of prediction with the average value of The G2 image data 112 is encoded into a P picture by predicting the pixel value of the target pixel G2x by the average of two adjacent pixels Ra and Rb.
  • Such pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge.
  • coding distortion included in the decoded value of R image data 114 which is a reference component frame can be suppressed.
  • the reference pattern of (C) is a combination of the pixel position compensation prediction of (A) and the pixel position compensation prediction of (B). That is, in (C), the value of the target pixel G2x of the G2 image data 112 which is the component frame of the prediction target is set to two adjacent pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the target pixel G2x. In this example, prediction is made using the average value of adjacent two pixels Ra and Rb of R image data 114.
  • the G2 image data 112 is encoded into a B picture by predicting the pixel value of the pixel of interest Bx by the average of four adjacent pixels Ba, Bb, Ra, and Rb. Therefore, coding distortion included in the decoded values of the B image data 113 and the R image data 114, which are reference component frames, can be further suppressed.
  • the coding unit 402 when coding into a P picture or a B picture, the coding unit 402 tries the pixel position compensation prediction shown in FIGS. 9 to 16 and selects the pixel position compensation prediction with the smallest difference. For example, in the case of predicting the R image data 114 with reference to the B image data 113, the encoding unit 402 determines each reference pattern of (A) to (E) of FIG. 13 and (A) to (D) of FIG. The pixel position compensation prediction is tried by and the reference pattern with the smallest difference is selected. Thereby, pixel position compensation prediction can be performed adaptively and efficiently.
  • the reference pattern straddles the edge of the image, the difference between the values of the pixels in the reference component frame sandwiching the edge and the target pixel in the component frame to be predicted becomes large. Therefore, by appropriately selecting the reference pattern, it is possible to specify a reference pattern which does not extend across the edge, and to improve the coding efficiency.
  • FIG. 17 is an explanatory drawing showing an example of the data structure of the encoding component frame.
  • the encoded component frame 1700 includes header information 1701 and an encoded data sequence 1702.
  • the header information 1701 is information provided by the encoding unit 402.
  • the header information 1701 includes image format information 1711 and control information 1712.
  • the image format information 1711 includes the size of the component frame before encoding, the size of the encoding component frame 1700, identification information for specifying the pattern of the color array 101, and the number of pixels of the component frame.
  • the control information 1712 includes the type (I picture, P picture, or B picture) of the encoding component frame 1700, identification information of the reference component frame, and the reference pattern used for the pixel position compensation prediction shown in FIGS. including.
  • the encoded data sequence 1702 is a data sequence obtained by encoding a component frame.
  • FIG. 18 is a flowchart of an example of a coding process procedure by the coding apparatus 400.
  • the encoding apparatus 400 receives the input of the RAW image data 100 (step S1801), separates the pixel group of the RAW image data 100 for each color component by the first generation unit 401, and generates a component frame for each color component (Step S1802).
  • the coding apparatus 400 executes intra-component prediction encoding using the coding unit 402 to generate an I picture (step S1803).
  • the encoding apparatus 400 causes the encoding unit 402 to perform component inter-frame prediction encoding on the remaining component frames to generate a P picture or a B picture (step S1804). Finally, the encoding apparatus 400 causes the recording unit 403 to store the encoded image data group encoded in steps S1803 and S1804 in the storage device 302 (step S1805).
  • FIG. 19 is a block diagram showing an example of a functional configuration of the decoding apparatus.
  • the decoding device 1900 includes an acquisition unit 1901, a decoding unit 1902, and a second generation unit 1903.
  • the acquisition unit 1901 acquires the encoded component frame 1700 encoded by the encoding device 400
  • the decoding unit 1902 decodes the encoded component frame 1700 into a component frame using the control information 1712
  • the second generation unit 1903 generates raw image data 100 from each of the decoded component frames using the image format information 1711.
  • the acquiring unit 1901, the decoding unit 1902, and the second generating unit 1903 are functions realized by causing the processor 301 to execute a program stored in the storage device 302 or realized by the LSI 304. .
  • An acquisition unit 1901 acquires first encoded image data and second encoded image data.
  • the first encoded image data is data obtained by intra-frame prediction encoding of first image data configured by a pixel group of the first color component.
  • the second encoded image data includes second encoded image data obtained by encoding, based on the first image data, second image data including a pixel group of a second color component different from the first color component. get.
  • the acquisition unit 1901 acquires third encoded image data.
  • the third encoded image data is data obtained by encoding, based on the first image data, third image data configured by a pixel group of the third color component.
  • the acquisition unit 1901 acquires fourth encoded image data.
  • the fourth encoded image data is data obtained by encoding the fourth image data constituted by the pixel group of the fourth color component based on the first image data.
  • the decoding unit 1902 decodes the first encoded image data acquired by the acquisition unit 1901 into first image data using the control information 1712 and is acquired by the acquisition unit 1901 based on the first image data.
  • the second encoded image data is decoded into second image data.
  • the decoding unit 1902 decodes the first encoded image data, which is an I picture, into first image data, and a reference pattern in which the second image data, which is a P picture, is applied to pixel position compensation prediction. According to the above, the first image data is decoded into second image data.
  • the decoding unit 1902 decodes the third coded image data acquired by the acquiring unit 1901 into third image data based on the first image data using the control information 1712. Specifically, for example, when the third encoded image data is a P picture, the decoding unit 1902 performs the first image data according to a reference pattern in which the third encoded image data is applied to pixel position compensation prediction. The third image data is decoded using the third image data, and when the third encoded image data is a B picture, the first image data and the second image data are encoded according to the reference pattern applied to the pixel position compensation prediction. The image data is decoded into third image data.
  • the decoding unit 1902 decodes the fourth encoded image data acquired by the acquiring unit 1901 into fourth image data based on the first image data using the control information 1712. Specifically, for example, when the fourth encoded image data is a P picture, the decoding unit 1902 sets the first encoded data to the first image data according to the reference pattern applied to the pixel position compensation prediction. Decode into fourth image data using any one of the third image data, and if the third coded image data is a B picture, apply the fourth coded image data to pixel position compensation prediction According to the reference pattern, two image data out of the first to third image data are decoded into fourth image data.
  • the second generation unit 1903 specifies a color array pattern from the image format information 1711, and based on the pixel group of the first image data to the fourth image data decoded by the decoding unit 1902 so as to become the specified color array 101.
  • the RAW image data 100 in which the first to fourth color components are repeatedly arranged is generated.
  • FIG. 20 is a block diagram showing a configuration example of the decoding unit 1902.
  • the decoding unit 1902 includes a variable-length code decoding unit 2001, an inverse quantization unit 2002, an inverse orthogonal transformation unit 2003, an addition unit 2004, a third accumulation unit 2005, and a second pixel position compensation unit 2006. .
  • the variable-length code decoding unit 2001 decodes the input coding component frame, and outputs a quantization coefficient and a motion vector.
  • the decoded quantization coefficient is input to the inverse quantization unit 2002, and the decoded motion vector is input to the second pixel position compensation unit 2006.
  • the inverse quantization unit 2002 inversely quantizes the quantization coefficient in units of blocks to decode the frequency coefficient.
  • the inverse orthogonal transformation unit 2003 performs inverse orthogonal transformation on the frequency coefficient decoded by the inverse quantization unit 2002 to decode a prediction error value (or a signal of an original image).
  • the addition unit 2004 adds the decoded prediction error value and the prediction value generated by the second pixel position compensation unit 2006 to output the decoded image data in block units. Then, the image data output from the adding unit 2004 is output as a component frame and also input to the third storage unit 2005.
  • the third storage unit 2005 stores the decoded value of the image as a reference component frame. Note that image data that is not referred to in the subsequent pixel position compensation prediction is sequentially erased from the third accumulation unit 2005.
  • the second pixel position compensating unit 2006 outputs, to the adding unit 2004, a predicted value obtained by predicting an image to be decoded in block units based on the motion vector and the reference component frame.
  • FIG. 21 is a flowchart illustrating an example of a decoding process procedure by the decoding device 1900.
  • the acquisition unit 1901 acquires the encoded image data group as the encoded component frame group (step S2101), and the decoding unit 1902 decodes the head encoded image data (I picture) into a component frame. (Step S2102).
  • the decoding device 1900 causes the decoding unit 1902 to decode the subsequent encoded image data (P picture or B picture) into a component frame (step S2103). Then, the decoding device 1900 combines the decoded generated frame group by the second generation unit 1903 to restore the RAW image data 100 (step S2104).
  • the correlation between the component frames is performed by predicting the RAW image data 100 between the component frames using the property that the correlation between the component frames is increased due to the hue and the saturation.
  • the coding efficiency of the RAW image data 100 having high quality can be enhanced.
  • the original RAW image data 100 can be restored.
  • encoding is performed after performing white balance adjustment on RAW image data 100, and decoding is performed on component frames to generate RAW image data after white balance adjustment, and then white balance reverse is performed.
  • the adjustment is performed to generate RAW image data.
  • differences from the first embodiment will be mainly described, and the same configuration as the first embodiment is denoted by the same reference numeral, and the description thereof will be omitted.
  • FIG. 22 is an explanatory diagram of an example of encoding and decoding according to the second embodiment.
  • E WB (white balance) adjustment,
  • B) encoding are performed by the encoding device 400,
  • F) WB de-adjustment are decoding It is executed by the device 1900.
  • the encoding device 400 performs white balance adjustment on the RAW image data 100.
  • White balance adjustment is performed according to the white balance setting items (in the encoding device 400) (auto, manual, light bulb, cloudy sky, fluorescent light, sunny day, sunny day, etc.) set when generating RAW image data by shooting. Be done.
  • the RAW image data 100 subjected to the white balance adjustment is set as the WB adjusted RAW image data 2200.
  • the encoding apparatus 400 generates a component frame for each color component from the WB adjusted RAW image data 2200.
  • the encoding device 400 includes G1 image data 2211 which is a green (G1) color component frame, G2 image data 2212 which is a green (G2) color component frame, and blue (B) color components.
  • G1 image data 2211 which is a green (G1) color component frame
  • G2 image data 2212 which is a green (G2) color component frame
  • B blue
  • B image data 2213 which is a frame
  • R image data 2214 which is a color component frame of red (R) are generated.
  • the G1 image data 2211 is image data configured by G1 pixel groups from each of the color arrays 101 in the WB adjusted RAW image data 2200.
  • the G2 image data 2212 is image data configured by G2 pixel groups from each of the color arrays 101 in the WB adjusted RAW image data 2200.
  • the B image data 2213 is image data configured by B pixel groups from each of the color arrays 101 in the WB adjusted RAW image data 2200.
  • the R image data 2214 is image data configured by R pixel groups from each of the color arrays 101 in the WB adjusted RAW image data 2200.
  • the encoding apparatus 400 encodes each component frame between component frames. Specifically, for example, encoding apparatus 400 encodes one of the component frame groups by intra-frame predictive coding to generate an I picture, and the remaining component frame group is an inter-frame predictive code using I picture. Encoding to generate a P picture or a B picture.
  • G1 image data 2211 becomes G1 encoded image data 2221
  • G2 image data 2212 becomes G2 encoded image data 2222
  • B image data 2213 becomes B encoded image data 2223 by encoding.
  • the image data 2214 becomes R encoded image data 2224.
  • the decoding device 1900 decodes the encoded component frame group. Specifically, for example, the decoding device 1900 decodes an I picture, and decodes a P picture or a B picture using component frames decoded from the I picture to generate another component frame. That is, the decoding apparatus 1900 decodes the G1 encoded image data 2221, the G2 encoded image data 2222, the B encoded image data 2223, and the R encoded image data 2224 to obtain the G1 image data 2211 and the G2 image data 2212, B image data 2213 and R image data 2214 are generated.
  • the decoding device 1900 combines the decoded component frame groups to generate WB adjusted RAW image data 2200.
  • G1 image data 2211, G2 image data 2212, B image data 2213, and R image data 2214 are arranged in the same position with pixels G1, G2, B, R in accordance with color array 101 to obtain G1 image.
  • the WB adjusted RAW image data 2200 is restored from the data 2211, G2 image data 2212, B image data 2213, and R image data 2214.
  • the decoding device 1900 converts the WB adjusted RAW image data 2200 into the original RAW image data 100 by the WB reverse adjustment.
  • the code of the WB adjusted RAW image data 2200 is obtained by inter-predicting the WB adjusted RAW image data 2200 using the property that the correlation between the component frames is increased due to the hue and the saturation. Efficiency can be improved. In addition, even in the case where the encoding is performed by the component inter-frame predictive encoding as described above, the original WB adjusted RAW image data 2200 can be restored.
  • white balance adjustment is performed on RAW image data 100 before encoding, white balance adjustment of RAW image data 100 at the decoding destination becomes unnecessary.
  • reverse white balance adjustment may be performed in order to restore the WB adjusted RAW image data 2200 at the decoding destination.
  • FIG. 23 is a block diagram of a functional configuration example of the encoding apparatus 400 according to the second embodiment.
  • the encoding apparatus 400 has a white balance adjustment unit 2301 and a white balance detection unit 2302 in addition to the configuration described in the first embodiment.
  • the white balance adjustment unit 2301 and the white balance detection unit 2302 are functions realized by causing the processor 301 to execute a program stored in the storage device 302 or realized by the LSI 304.
  • the white balance adjustment unit 2301 performs white balance adjustment on the RAW image data 100 by setting items of white balance (auto, manual, light bulb, cloudy sky, fluorescent light, fine weather shade, fine weather, etc.), and performs WB adjusted RAW image data 2200 Are output to the first generation unit 401. Therefore, the first generation unit 401 executes separation of component frames as shown in (A) of FIG. 22 for the WB adjusted RAW image data 2200.
  • White balance adjustment is performed, for example, by multiplying the pixel value of the RAW image data 100 by the white balance adjustment gain coefficient based on the black level of the RAW image data 100.
  • the pixel value YB of the B component after the adjustment of the white balance is as follows calculate.
  • the white balance detection unit 2302 detects a white balance suitable for the RAW image data 100 from the RAW image data 100 and notifies the white balance adjustment unit 2301 of the white balance.
  • the white balance adjustment unit 2301 performs white balance adjustment on the RAW image data 100 based on the notified white balance (auto, manual, light bulb, cloudy sky, fluorescent light, sunny day, sunny day, etc.).
  • the white balance detection unit 2302 notifies the coding unit 402 of information (white balance control information) for specifying the detected white balance. Specifically, for example, as shown in FIG. 6, the white balance control information is output to the variable-length coding unit 605. As a result, the encoding unit 402 can add white balance control information to the control information 1712 in the header information 1701 of the encoded component frame 1700 encoded by the encoding unit 402.
  • the white balance control information is, for example, information indicating that the RAW image data 2200 has been adjusted for white balance (hereinafter referred to as “adjusted information”) and the white balance for the B component of the RAW image data 2200.
  • adjusted information information indicating that the RAW image data 2200 has been adjusted for white balance
  • the adjustment gain and the white balance adjustment gain coefficient of the R component of the RAW image data 2200 are configured.
  • the decoding apparatus 1900 described later can recognize that the RAW image data 2200 has been subjected to the white balance adjustment based on the adjusted information added to the control information 1712.
  • the decoding apparatus 1900 can perform reverse white balance adjustment in the decoding process by the white balance adjustment gain coefficients of the B component and the R component added to the control information 1712.
  • the control information 1712 is provided with at least one of the adjusted information described above, the white balance adjustment gain coefficient of the B component, and the white balance adjustment gain coefficient of the R component.
  • the white balance adjustment is performed on the RAW image data 100 .
  • the difference between the value of the color component data of R and the value of the color component data of G, the difference between the value of the color component data of G and the value of the color component data of B, B The difference between at least one of the color component data value and the R color component data value may be reduced.
  • FIG. 24 is a flowchart of an example of a coding process procedure by the coding apparatus 400 according to the second embodiment.
  • the encoding apparatus 400 receives the input of the RAW image data 100 (step S2401), performs white balance adjustment of the RAW image data 100 by the white balance adjustment unit 2301, and outputs the WB adjusted RAW image data 2200 (step S2402). .
  • the encoding apparatus 400 separates the pixel group of the WB adjusted RAW image data 2200 for each color component by the first generation unit 401, and generates a component frame for each color component (step S2403).
  • the encoding apparatus 400 performs intra-component prediction encoding using the encoding unit 402 to generate an I picture (step S2404). Then, the encoding apparatus 400 causes the encoding unit 402 to perform inter-component prediction encoding on the remaining component frames to generate a P picture or a B picture (step S2405). Finally, the encoding apparatus 400 causes the recording unit 403 to store the encoded image data group encoded in steps S2404 and S2405 in the storage device 302 (step S2406).
  • FIG. 25 is a block diagram illustrating a functional configuration example of the decoding device 1900 according to the second embodiment.
  • the decoding apparatus 1900 has a white balance reverse adjustment unit 2504 in addition to the configuration shown in the first embodiment.
  • the white balance reverse adjustment unit 2504 is a function realized by causing the processor 301 to execute a program stored in the storage device 302 or realized by the LSI 304.
  • the second generation unit 1903 generates the adjusted RAW image data 2200.
  • the white balance reverse adjustment unit 2504 refers to the white balance control information in the header information 1701 attached to the WB adjusted RAW image data 2200 obtained from the second generation unit 1903, and performs WB adjusted RAW image data 2200. The white balance reverse adjustment is performed, and the original RAW image data 100 is restored.
  • FIG. 26 is a flowchart of an exemplary decoding process performed by the decoding device 1900 according to the second embodiment. After steps S2101 to S2104, the decoding apparatus 1900 performs white balance reverse adjustment on the WB adjusted RAW image data 2200 by the white balance reverse adjustment unit 2504, and restores the original RAW image data 100 (step S2605).
  • inter-frame prediction of WB adjusted RAW image data 2200 is performed using the property that the correlation between component frames is increased due to hue and saturation. By doing this, the coding efficiency of the WB adjusted RAW image data 2200 can be enhanced. In addition, even in the case where encoding is performed by component inter-frame predictive encoding as described above, the original RAW image data 100 can be restored.
  • blue (B) and red (R) have lower luminance values of pixels that become signal levels than green (G), and therefore have low correlation. Therefore, by performing white balance adjustment on the RAW image data 100 before encoding, the signal levels of blue (B) and red (R) are brought close to the signal level of green (G). As a result, the coding efficiency of the WB adjusted RAW image data 2200 can be improved. In addition, since white balance adjustment is performed on RAW image data 100 before encoding, white balance adjustment of RAW image data 100 at the decoding destination may be unnecessary by omitting the white balance reverse adjustment unit 2504. it can.
  • the third embodiment is an example of encoding and decoding RAW moving image data in which the RAW image data 100 is arranged in the time axis direction.
  • differences from the first embodiment will be mainly described, and the same configuration as the first embodiment is denoted by the same reference numeral, and the description thereof will be omitted.
  • FIG. 27 is an explanatory diagram of a coding and decoding example according to the third embodiment.
  • the (A) separation and (B) encoding are performed by the encoding device 400, and (C) decoding and (D) combining are performed by the decoding device 1900.
  • the encoding apparatus 400 acquires RAW moving image data 2700 in which the RAW image data 100 is arranged in the time axis direction, and generates a component frame for each color component for each RAW image data 100. As a result, G1 image data string 2711, G2 image data string 2712, B image data string 2713 and R image data string 2714 are obtained.
  • the encoding apparatus 400 encodes each color component frame between component frames. Specifically, for example, encoding apparatus 400 encodes one of the component frame groups by intra-frame predictive coding to generate an I picture, and the remaining component frame group is an inter-frame predictive code using I picture. Encoding to generate a P picture or a B picture.
  • the G1 image data string 2711 becomes the G1 coded image data string 2721
  • the G2 image data string 2712 becomes the G2 coded image data string 2722
  • the B image data string 2713 is the B coded image. It becomes a data string 2723
  • the R image data string 2714 becomes an R encoded image data string 2724.
  • the decoding device 1900 decodes the encoded component frame group. Specifically, for example, the decoding device 1900 decodes an I picture, and decodes a P picture or a B picture using component frames decoded from the I picture to generate another component frame. That is, the decoding device 1900 decodes the G1 encoded image data string 2721, the G2 encoded image data string 2722, the B encoded image data string 2723, and the R encoded image data string 2724 to obtain the G1 image data string 2711, A G2 image data string 2712, a B image data string 2713, and an R image data string 2714 are generated.
  • the decoding apparatus 1900 combines the decoded component frame groups to generate the RAW image data 100. Specifically, for example, by arranging pixels G1, G2, B, R at the same position of G1 image data 111, G2 image data 112, B image data 113, and R image data 114 according to color array 101, a RAW image is obtained. The data 100 is sequentially restored, and RAW moving image data 2700 is restored.
  • RAW image data 100 having high correlation between component frames can be obtained by predicting RAW image data 100 between the component frames using the property that the correlation between component frames is increased due to hue and saturation.
  • the coding efficiency of the RAW moving image data 2700 can be enhanced. Also, even when encoding is performed by component inter-frame predictive encoding in this way, the original RAW image data 100 can be restored to the RAW moving image data 2700.
  • FIG. 28 is an explanatory view showing an example of the reference direction of the component frame.
  • (A) shows an example of RAW moving image data 2700.
  • (B) and (C) show examples of reference directions of component frames in RAW moving image data 2700.
  • examples of reference directions of component frames in RAW image data 1 and RAW image data 2 among time-series RAW image data 1 to n are shown. .
  • FIG. (B) shows the reference direction when the input order of component frames from the same RAW image data 1 and 2 is G1 image data 111, G2 image data 112, B image data 113, and R image data 114. Show.
  • the first G1 image data 111 is encoded into an I picture.
  • the G2 image data 112 to be input next is encoded into a P picture by inter-frame prediction coding with the preceding G1 image data 111 as a reference frame.
  • the B image data 113 to be input is encoded into a P picture or a B picture by inter-frame predictive coding, using at least one component frame of the preceding G1 image data 111 and G2 image data 112 as a reference frame.
  • the R image data 114 input last is P picture or B picture by inter-frame predictive coding using at least one component frame of the preceding G1 image data 111, G2 image data 112, and B image data 113 as a reference frame.
  • the reference direction in the first RAW image data 1 is the same as the RAW image data 1 in (B).
  • the leading G1 image data 111 is encoded into a P picture or a B picture by interframe prediction coding with the G1 image data 111 of the preceding RAW image data 1 as a reference frame.
  • the G2 image data 112 to be input next is P-frame coded by inter-frame predictive coding using at least one component frame of the G1 image data 111 of the preceding RAW image data 1 and the G1 image data 111 of the RAW image data 2 as a reference frame. It is encoded into a picture or a B picture.
  • the B image data 113 to be input next is at least one of the B image data 113 of the preceding RAW image data 1, the G1 image data 111 of the RAW image data 2, and the G2 image data 112 of the RAW image data 2.
  • One component frame is encoded as a reference frame into P picture or B picture by inter-frame predictive coding.
  • R image data 114 input last is R image data 114 of preceding RAW image data 1, G1 image data 111 of RAW image data 2, G2 image data 112 of RAW image data 2, RAW image data 2
  • the B picture data 113 and the at least one component frame of the B picture data 113 are coded as P pictures or B pictures by inter-frame predictive coding using the reference frame.
  • the reference direction in FIG. 28 is an example, and encoding can be performed in the input order of component frames other than (B) and (C). Further, since the encoding unit 402 uses the luminance value from the pixel of the imaging device 353 which does not depend on the color component, it is possible to encode different color components as a reference component frame.
  • FIG. 29 is an explanatory diagram of an example of coding in units of slices.
  • (A) shows a slice unit of each component frame generated from time-sequential RAW image data 1 to 4.
  • a slice is data obtained by dividing a component frame and is one unit of encoding.
  • each component frame (G1 image data 111, G2 image data 112, B image data 113, R image data 114) has n slices (n is an integer of 2 or more) of the same size.
  • frame takes (B) of FIG. 28 as an example, it may be other input orders.
  • FIG. (B) shows an example of encoding processing in slice units.
  • Arrows indicate the order of encoding. That is, the G1 component slice 1 having the slice number “1”, the G2 component slice 1, the B component slice 1 and the R component slice 1 are encoded in order, and then the G1 component slice 2 having the slice number “2”. , G2 component slice 2, B component slice 2, and R component slice 2 in this order.
  • coding is performed in descending order of slice numbers, and finally, coding is performed in the order of G1 component slice n, G2 component slice n, B component slice n, and R component slice n having a slice number “n”. .
  • the G1 component slice may be encoded into an I picture as shown in (B) of FIG. 28, and as shown in (C), the G1 component slice is converted to a P picture. It may be encoded.
  • decoding may also be performed in units of slices as in the case of encoding in units of slices. This can improve the decoding latency.
  • the correlation between the component frames is achieved by predicting the RAW image data 100 between the component frames using the property that the correlation between the component frames is increased due to the hue and the saturation.
  • the encoding efficiency of the high RAW image data 100 and, in turn, the encoding efficiency of the RAW moving image data 2700 can be enhanced. Also, even when encoding is performed by component inter-frame predictive encoding in this way, the original RAW image data 100 can be restored to the RAW moving image data 2700.
  • the fourth embodiment is an example in which the RAW moving image data 2700 in which the RAW image data 100 is arranged in the time axis direction is subjected to white balance adjustment and then encoding and decoding to reverse white balance adjustment.
  • differences from the first and third embodiments will be mainly described, and the same components as those of the first and third embodiments are denoted by the same reference numerals, and the description thereof will be omitted.
  • FIG. 30 is an explanatory diagram of a coding and decoding example according to the fourth embodiment.
  • E WB adjustment, (A) separation and (B) encoding are performed by the encoding device 400, (C) decoding, (D) combining and (F) WB de-adjustment are performed by the decoding device 1900 Ru.
  • the encoding apparatus 400 performs white balance adjustment on each RAW image data 100 of the RAW moving image data 2700.
  • White balance adjustment is performed by white balance (auto, manual, light bulb, cloudy weather, fluorescent light, sunny weather, sunny weather, etc.) in the encoding device 400.
  • the RAW image data 100 subjected to the white balance adjustment is set as the WB adjusted RAW image data 2200, and the time-series WB adjusted RAW image data 2200 is set as the WB adjusted RAW moving image data 3000.
  • the encoding apparatus 400 acquires WB adjusted RAW moving image data 3000 in which the WB adjusted RAW image data 2200 is arranged in the time axis direction, and the components of each WB adjusted RAW image data 2200 for each color component Generate a frame. As a result, a WB adjusted G1 image data string 3011, a WB adjusted G2 image data string 3012, a WB adjusted B image data string 3013, and a WB adjusted R image data string 3014 are obtained.
  • the encoding apparatus 400 encodes each color component frame between component frames. Specifically, for example, encoding apparatus 400 encodes one of the component frame groups by intra-frame predictive coding to generate an I picture, and the remaining component frame group is an inter-frame predictive code using I picture. Encoding to generate a P picture or a B picture.
  • the WB adjusted G1 image data string 3011 becomes the WB adjusted G1 encoded image data string 3021 and the WB adjusted G2 image data string 3012 becomes the WB adjusted G2 encoded image data string 3022 by encoding.
  • the WB adjusted B image data string 3013 becomes the WB adjusted B encoded image data string 3023
  • the WB adjusted R image data string 3014 becomes the WB adjusted R encoded image data string 3024.
  • the decoding device 1900 decodes the encoded component frame group. Specifically, for example, the decoding device 1900 decodes an I picture, and decodes a P picture or a B picture using component frames decoded from the I picture to generate another component frame. That is, the decoding device 1900 includes the WB adjusted G1 encoded image data string 3021, the WB adjusted G2 encoded image data string 3022, the WB adjusted B encoded image data string 3023, and the WB adjusted R encoded image data string 3024 is decoded to generate a WB adjusted G1 image data string 3011, a WB adjusted G2 image data string 3012, a WB adjusted B image data string 3013, and a WB adjusted R image data string 3014.
  • the decoding device 1900 combines the decoded component frame groups to generate WB adjusted RAW image data 2200. Specifically, for example, pixels G 1, G 2, B, and G at the same position of WB adjusted G1 image data 2211, WB adjusted G2 image data 2212, WB adjusted B image data 2213, and WB adjusted R image data 2214. By arranging R according to the color array 101, the WB adjusted RAW image data is sequentially restored, and the WB adjusted RAW moving image data 2700 is restored.
  • the decoding device 1900 converts the WB adjusted RAW image data 2200 into the original RAW image data 100 by WB reverse adjustment, and restores the RAW moving image data 2700.
  • the WB adjusted RAW having high correlation between component frames is used.
  • the coding efficiency of the image data 2200 and, consequently, the coding efficiency of the WB adjusted RAW moving image data 3000 can be enhanced.
  • the original WB adjusted RAW image data 2200 can be restored to the WB adjusted RAW moving image data 3000.
  • the third embodiment by encoding the component frames of the WB adjusted RAW moving image data 3000 in slice units, it is possible to improve the latency of component interframe coding.
  • the WB adjusted G1 encoded image data string 3021, the WB adjusted G2 encoded image data string 3022, the WB adjusted B encoded image data string 3023, and the WB adjusted R encoded image data string 3024 By decoding the component frame in units, the latency of component frame decoding can be improved.
  • inter-frame prediction is performed by predicting the RAW image data 100 between the component frames by utilizing the property that the correlation between the component frames is increased due to the hue and the saturation.
  • the coding efficiency of the RAW image data 100 having high correlation can be enhanced.
  • the original RAW image data 100 can be restored.
  • RAW image data 101 color array, 111 G1 image data, 112 G2 image data, 113 B image data, 114 R image data, 121 G1 encoded image data, 122 G2 encoded image data, 123 B encoded image data, 124 R encoded image data, 300 information processing device, 301 processor, 302 storage device, 353 imaging device, 400 encoding device, 401 first generation unit, 402 encoding unit, 403 recording unit, 610 positional deviation detection unit, 611 First pixel position compensation unit, 1700 encoded component frame, 1701 header information, 1711 image format information, 1712 control information, 1900 decoding device, 1901 acquisition unit, 1902 decoding unit, 1903 second generation unit, 2006 second pixel position compensation Department, 22 0 WB adjusted RAW image data, 2301 white balance adjustment unit, 2504 a white balance inverse adjuster, 2700 RAW moving image data, 3000 WB adjusted RAW video data

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

符号化装置は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置されたRAW画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成部と、前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、を有する。

Description

符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム 参照による取り込み
 本出願は、平成30年(2018年)1月16日に出願された日本出願である特願2018-005211の優先権を主張し、その内容を参照することにより、本出願に取り込む。
 本発明は、符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラムに関する。
 画像を色成分毎に圧縮する技術がある(たとえば、下記特許文献1を参照。)。しかしながら、上述した従来技術では、成分フレーム間の相関性が活用されていない。
特開2002-125241号公報
 本発明の一側面となる符号化装置は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置されたRAW画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成部と、前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、を有する。
 本発明の他の側面となる符号化装置は、第1色成分の光を光電変換する光電変換部と前記第1色成分とは異なる第2色成分を光電変換する光電変換部とが繰り返し配置された撮像素子からの出力に基づくRAW画像データから、前記第1色成分により構成される第1画像データと、前記第2色成分により構成される第2画像データと、を生成する生成部と、前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、を有する。
 本発明の一側面となる復号装置は、第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第1色成分とは異なる第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、を取得する取得部と、前記取得部によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得部によって取得された第2符号化画像データを前記第2画像データに復号する復号部と、前記復号部によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置されたRAW画像データを生成する生成部と、を有する。
 本発明の一側面となる符号化方法は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置されたRAW画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成処理と、前記生成処理によって生成された第1画像データに基づいて、前記生成処理によって生成された第2画像データを符号化する符号化処理と、を有する。
 本発明の一側面となる復号方法は、第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第1色成分とは異なる第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、を取得する取得処理と、前記取得処理によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得処理によって取得された第2符号化画像データを前記第2画像データに復号する復号処理と、前記復号処理によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置されたRAW画像データを生成する生成処理と、を有する。
図1は、実施例1にかかる符号化および復号例を示す説明図である。 図2は、図1に示した色配列の例を示す説明図である。 図3は、情報処理装置のハードウェア構成例を示すブロック図である。 図4は、実施例1にかかる符号化装置の機能的構成例を示すブロック図である。 図5は、第1生成部による成分フレームの生成例を示す説明図である。 図6は、符号化部の構成例を示すブロック図である。 図7は、成分フレームの参照方向例を示す説明図である。 図8は、動きベクトルの検出例を示す説明図である。 図9は、成分フレーム間での画素位置補償予測例1を示す説明図である。 図10は、成分フレーム間での画素位置補償予測例2を示す説明図である。 図11は、成分フレーム間での画素位置補償予測例3を示す説明図である。 図12は、成分フレーム間での画素位置補償予測例4を示す説明図である。 図13は、成分フレーム間での画素位置補償予測例5を示す説明図である。 図14は、成分フレーム間での画素位置補償予測例6を示す説明図である。 図15は、成分フレーム間での画素位置補償予測例7を示す説明図である。 図16は、成分フレーム間での画素位置補償予測例4を示す説明図である。 図17は、符号化成分フレームのデータ構造例を示す説明図である。 図18は、符号化装置による符号化処理手順例を示すフローチャートである。 図19は、復号装置の機能的構成例を示すブロック図である。 図20は、復号部の構成例を示すブロック図である。 図21は、復号装置による復号処理手順例を示すフローチャートである。 図22は、実施例2にかかる符号化および復号例を示す説明図である。 図23は、実施例2にかかる符号化装置の機能的構成例を示すブロック図である。 図24は、実施例2にかかる符号化装置による符号化処理手順例を示すフローチャートである。 図25は、実施例2にかかる復号装置の機能的構成例を示すブロック図である。 図26は、実施例2にかかる復号装置による復号処理手順例を示すフローチャートである。 図27は、実施例3にかかる符号化および復号例を示す説明図である。 図28は、成分フレームの参照方向例を示す説明図である。 図29は、スライス単位の符号化例を示す説明図である。 図30は、実施例4にかかる符号化および復号例を示す説明図である。
 以下、添付図面を用いて、各実施例について説明する。なお、各実施例で符号化の対象となる画像データは、RAW画像データである。RAW画像データは、たとえば、ベイヤ配列のカラーフィルタが実装された撮像素子において光電変換された結果出力される加工前の画像データであり、色補間処理や圧縮処理(たとえば、静止画であれば、JPEG(Joint Photographic Experts Group)形式、動画であれば、MPEG(Moving Picture Experts Group)形式)がされていない画像データである。ただし、ホワイトバランス調整はRAW画像データにされていてもよい。
 <符号化および復号例>
 図1は、実施例1にかかる符号化および復号例を示す説明図である。(A)分離および(B)符号化は符号化装置によって実行され、(C)復号および(D)合成は復号装置によって実行される。RAW画像データ100は、複数の色成分を有する色配列101が周期的に配置された画像データである。たとえば、ベイヤ配列の場合、色配列101は、2×2画素の配列において、左上が緑(G1)、右上が青(B)、左下が赤(R)、右下が緑(G2)の色成分となる。色配列101の他の例は、図2で後述する。
 (A)符号化装置は、RAW画像データ100から色成分ごとに成分フレームを生成する。具体的には、たとえば、符号化装置は、緑(G1)の色成分フレームであるG1画像データ111、緑(G2)の色成分フレームであるG2画像データ112、青(B)の色成分フレームであるB画像データ113、赤(R)の色成分フレームであるR画像データ114を生成する。
 G1画像データ111は、RAW画像データ100における色配列101の各々からのG1画素群により構成される画像データである。G2画像データ112は、RAW画像データ100における色配列101の各々からのG2画素群により構成される画像データである。B画像データ113は、RAW画像データ100における色配列101の各々からのB画素群により構成される画像データである。R画像データ114は、RAW画像データ100における色配列101の各々からのR画素群により構成される画像データである。
 (B)符号化装置は、各色成分フレームを成分フレーム間で符号化する。具体的には、たとえば、符号化装置は、成分フレーム群の1つをフレーム内予測符号化で符号化してIピクチャを生成し、残余の成分フレーム群をフレーム間予測符号化で符号化してPピクチャまたはBピクチャを生成する。ここでは、符号化により、G1画像データ111は、G1符号化画像データ121となり、G2画像データ112は、G2符号化画像データ122となり、B画像データ113は、B符号化画像データ123となり、R画像データ114は、R符号化画像データ124となる。
 (C)復号装置は、符号化された成分フレーム群を復号する。具体的には、たとえば、復号装置は、Iピクチャを復号し、その後、後続のPピクチャまたはBピクチャを順次復号して、他の成分フレームを生成する。すなわち、復号装置は、G1符号化画像データ121、G2符号化画像データ122、B符号化画像データ123、およびR符号化画像データ124を復号して、G1画像データ111、G2画像データ112、B画像データ113、およびR画像データ114を生成する。
 (D)復号装置は、復号された成分フレーム群を合成して、RAW画像データ100を生成する。具体的には、たとえば、G1画像データ111、G2画像データ112、B画像データ113、およびR画像データ114の同一位置の画素G1、G2、B、Rを色配列101に従って並べることで、RAW画像データ100を復元する。
 このように、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、RAW画像データ100の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100に復元することができる。
 図2は、図1に示した色配列の例を示す説明図である。(a)は図1に示した色配列101と同一の色配列を示す。(b)は、(a)においてB画素とR画素の位置が入れ替わった色配列201を示す。(c)は、(a)において左半分の画素列(G1、R)と右半分の画素列(B、G2)とが入れ替わった色配列202を示す。(d)は、(b)において左半分の画素列(G1、B)と右半分の画素列(R、G2)とが入れ替わった色配列203を示す。(e)は、6×6画素の色配列204の一例を示す。(e)の色配列204は、縦(6画素)、横(6画素)、斜め(3画素以上)のどの方向からの画素列にも緑の画素が含まれる。なお、以降、色配列の一例として(a)の色配列101を用いて説明する。
 <情報処理装置のハードウェア構成例>
 図3は、情報処理装置のハードウェア構成例を示すブロック図である。情報処理装置300は、符号化装置および復号装置のいずれか一方、または両方を含む装置である。情報処理装置300は、たとえば、デジタルカメラやデジタルビデオカメラなどの撮像装置であってもよく、パーソナルコンピュータやタブレット、スマートフォン、ゲーム機でもよい。
 情報処理装置300は、プロセッサ301と、記憶デバイス302と、操作デバイス303と、LSI(Large Scale Integration)304と、撮像ユニット305と、通信IF(Interface)306と、を有する。これらは、バス308により接続されている。プロセッサ301は、情報処理装置300を制御する。記憶デバイス302は、プロセッサ301の作業エリアとなる。
 記憶デバイス302は、各種プログラムやデータを記憶する非一時的なまたは一時的な記録媒体である。記憶デバイス302としては、たとえば、ROM(Read Only Memory)、RAM(Random Access Memory)、HDD(Hard Disk Drive)、フラッシュメモリがある。操作デバイス303は、データを操作する。操作デバイス303としては、たとえば、ボタン、スイッチ、タッチパネルがある。
 LSI304は、色補間、ホワイトバランス調整、輪郭強調、ガンマ補正、階調変換などの画像処理や符号化処理、復号処理、圧縮伸張処理など、特定の処理を実行する集積回路である。
 撮像ユニット305は、被写体を撮像してRAW画像データを生成する。撮像ユニット305は、撮像光学系351と、カラーフィルタ352を有する撮像素子353と、信号処理回路354と、を有する。
 撮像光学系351は、たとえば、ズームレンズやフォーカスレンズを含む複数のレンズで構成されている。なお、簡単のため、図3では撮像光学系351を1枚のレンズで図示する。
 撮像素子353は、撮像光学系351を通過した光束による被写体の結像を撮像(撮影)するデバイスである。撮像素子353は、順次走査方式の固体撮像素子(たとえば、CCD(Charge Coupled Device)イメージセンサ)であってもよく、XYアドレス方式の固体撮像素子(たとえば、CMOS(Complementary Metal Oxide Semiconductor)イメージセンサ)であってもよい。
 撮像素子353の受光面には、光電変換部を有する画素がマトリクス状に配列されている。そして、撮像素子353の各画素には、それぞれが異なる色成分の光を透過させる複数種類のカラーフィルタ352が所定の色配列101に従って配置される。そのため、撮像素子353の各画素は、カラーフィルタ352での色分解によって各色成分に対応する電気信号を出力する。
 実施例1では、赤色(R)、緑色(G)、青色(B)のカラーフィルタ352が2行2列のベイヤ配列にしたがって受光面に周期的に配置されている。一例として、撮像素子353の色配列101の奇数行にはG,Bの画素が交互に並ぶとともに、色配列101の偶数行にはR,Gの画素が交互に並んでいる。そして、色配列101の全体では緑色画素が市松模様をなすように配置されている。これにより、撮像素子353は、撮影時にカラーの画像を取得することができる。
 信号処理回路354は、撮像素子353から入力される画像信号に対して、アナログ信号処理(相関二重サンプリング、黒レベル補正など)と、A/D変換処理と、デジタル信号処理(欠陥画素補正など)とを順次実行する。信号処理回路354から出力されるRAW画像データ100は、LSI304または記憶デバイス302に入力される。通信IF306は、ネットワークを介して外部装置と接続し、データを送受信する。
 <符号化装置の機能的構成例>
 図4は、実施例1にかかる符号化装置の機能的構成例を示すブロック図である。符号化装置400は、第1生成部401と、符号化部402と、記録部403と、を有する。第1生成部401は、RAW画像データ100から色成分ごとの成分フレームを生成し、符号化部402は、成分フレームを符号化し、記録部403は、符号化成分フレームを記憶デバイス302に記録する。
 第1生成部401、符号化部402、および記録部403は、具体的には、たとえば、記憶デバイス302に記憶されたプログラムをプロセッサ301に実行させることにより、または、LSI304により実現される機能である。
 第1生成部401は、第1色成分と第1色成分とは異なる第2色成分とが繰り返し配置されたRAW画像データから、第1色成分の画素群により構成される第1画像データと、第2色成分の画素群により構成される第2画像データと、を生成する。換言すれば、第1生成部401は、第1色成分の光を光電変換する光電変換部を有する画素と第1色成分とは異なる第2色成分を光電変換する光電変換部を有する画素とが繰り返し配置された撮像素子353からの出力に基づくRAW画像データ100から、第1色成分により構成される第1画像データと、第2色成分により構成される第2画像データと、を生成する。たとえば、RAW画像データ100は、撮像素子353から直接出力された画像データでもよく、複製されたRAW画像データ100でもよい。
 上述したように、色配列101は、3種類4つの色成分である緑(G1)、緑(G2)、青(B)、および赤(R)を有する。
 ここで、第1色成分とは、色配列101を構成する緑(G1)、緑(G2)、青(B)、および赤(R)の中のいずれか1つである。第2色成分は、第1色成分が緑(G1)または緑(G2)であれば青(B)または赤(R)であり、第1色成分が青(B)であれば緑(G1)、緑(G2)、および赤(R)の中のいずれか1つであり、第1色成分が赤(R)であれば緑(G1)、緑(G2)、および青(B)の中のいずれか1つである。
 第1画像データは、第1色成分が緑(G1)であればG1画像データ111であり、第1色成分が緑(G2)であればG2画像データ112であり、第1色成分が青(B)であればB画像データ113であり、第1色成分が赤(R)であればR画像データ114である。
 これに対し、第2画像データは、第1画像データがG1画像データ111またはG2画像データ112であれば、B画像データ113またはR画像データ114であり、第1画像データがB画像データ113であれば、G1画像データ111、G2画像データ112、およびR画像データ114のいずれか1つであり、第1画像データがR画像データ114であれば、G1画像データ111、G2画像データ112、およびB画像データ113のいずれか1つである。
 また、RAW画像データ100は、第1色成分および第2色成分のうちいずれか一方の色成分と同一、または、第1色成分および第2色成分とは異なる、第3色成分を有する。具体的には、たとえば、第3色成分は、第1色成分が緑(G1)、第2色成分が青(B)であれば、第1色成分の緑(G1)と同一色成分である緑(G2)、または、第1色成分および第2色成分とは異なる色成分である赤(R)となる。また、第3色成分は、第1色成分が緑(G2)、第2色成分が青(B)であれば、第1色成分の緑(G2)と同一色成分である緑(G1)、または、第1色成分および第2色成分とは異なる色成分である赤(R)となる。
 また同様に、第3色成分は、第1色成分が緑(G1)、第2色成分が赤(R)であれば、第1色成分の緑(G1)と同一色成分である緑(G2)、または、第1色成分および第2色成分とは異なる色成分である青(B)となる。また、第3色成分は、第1色成分が緑(G2)、第2色成分が赤(R)であれば、第1色成分の緑(G2)と同一色成分である緑(G1)、または、第1色成分および第2色成分とは異なる色成分である青(B)となる。
 第3画像データは、第1画像データがG1画像データ111であり、かつ、第2画像データがB画像データ113であれば、G2画像データ112またはR画像データ114である。また、第3画像データは、第1画像データがG2画像データ112であり、かつ、第2画像データがB画像データ113であれば、G1画像データ111またはR画像データ114である。
 第3画像データは、第1画像データがG1画像データ111であり、かつ、第2画像データがR画像データ114であれば、G2画像データ112またはB画像データ113である。また、第3画像データは、第1画像データがG2画像データ112であり、かつ、第2画像データがR画像データ114であれば、G1画像データ111またはB画像データ113である。
 なお、第4色成分は、残余の色成分となり、第1生成部401は、RAW画像データ100のうち残余の色成分の画素群から、残余の色成分の第4画像データを生成する。
 図5は、第1生成部401による成分フレームの生成例を示す説明図である。(a)は、符号化対象であるRAW画像データ100である。なお、RAW画像データ100の水平方向画素数をH(図5では、H=8)とし、垂直方向画素数をV(図5では、V=8)とする。
 (b)~(e)は、RAW画像データ100の色成分の並べ替えで生成される成分フレームを示す。(b)の成分フレームはG1画像データ111であり、(c)の成分フレームはG2画像データ112であり、(d)の成分フレームはB画像データ113であり、(e)の成分フレームはR画像データ114である。
 第1生成部401は、図1の(A)分離を実行することにより、RAW画像データ100から分離したG1画素,B画素,R画素,G2画素を、色配列101の位置に応じて並べ替える。これにより、第1生成部401は、1つのRAW画像データ100から、G1画像データ111,G2画像データ112,B画像データ113,R画像データ114の4つの成分フレームを生成する。なお、G1画像データ111,G2画像データ112,B画像データ113,R画像データ114は、それぞれRAW画像データ100の1/4の画像サイズ(V/2×H/2)となる。
 図4に戻り、符号化部402は、第1生成部401によって生成された第1画像データに基づいて、第1生成部401によって生成された第2画像データを符号化する。具体的には、たとえば、符号化部402は、第1画像データと第2画像データとの間で画素位置を補償することにより、第2画像データを符号化する。ここで、「画素位置の補償」とは、第2画像データの注目画素を、注目画素とは異なる位置における第1画像データ内の特定の参照画素で補償することである。
 RAW画像データ100の同じ色配列101から抽出されたG1画素、G2画素、B画素、およびR画素は、各成分フレーム(G1画像データ111,G2画像データ112,B画像データ113,R画像データ114)で同じ画素位置にそれぞれ配置される。しかし、成分フレーム間では色配列101での画素位置の違いによる絵柄のズレが生じる。そのため、符号化部402は、通常の符号化処理における時間軸方向でのフレーム間の動き補償と同様、同一のRAW画像データ100から生成された成分フレーム間での画素位置補償を実行することになる。
 ここで、画素位置補償予測を行う符号化方式としては、たとえば、ISO/IEC14496-10に規定されるAVC(Advanced Video Coding)などが知られている。符号化部402は、特定の成分フレーム(たとえば、G1画像データ111)についてフレーム内予測符号化を実行してIピクチャを生成するとともに、残余の成分フレーム(たとえば、G2画像データ112、B画像データ113、R画像データ114)についてフレーム間予測符号化を実行してPピクチャまたはBピクチャを生成する。
 Iピクチャは、成分フレーム内のみで完結する符号化により得られる符号化画像データである。Pピクチャは、参照成分フレーム最大1枚を用いる成分フレーム間予測符号化により得られる符号化画像データである。Bピクチャは、参照成分フレーム最大2枚を用いる成分フレーム間予測符号化により得られる符号化画像データである。以下、符号化部402の詳細な構成例について説明する。
 <符号化部402の構成例>
 図6は、符号化部402の構成例を示すブロック図である。符号化部402は、第1蓄積部601と、減算部602と、直交変換部603と、量子化部604と、可変長符号化部605と、逆量子化部606と、逆直交変換部607と、加算部608と、第2蓄積部609と、位置ずれ検出部610と、第1画素位置補償部611と、を有する。
 第1蓄積部601は、第1生成部401から出力される各成分フレーム(G1画像データ111、G2画像データ112、B画像データ113、R画像データ114)を蓄積する。第1蓄積部601に蓄積された成分フレームは、符号化対象の画像データとして入力順に減算部602へ出力される。なお、符号化の完了した画像データは第1蓄積部601から順次消去される。
 減算部602は、PピクチャまたはBピクチャを生成するときには、入力された原画像の成分フレームと、第1画素位置補償部611で生成された後述の予測値との差分信号(予測誤差値)を出力する。また、減算部602は、Iピクチャを生成するときには、入力された原画像の成分フレームをそのまま出力する。
 直交変換部603は、Iピクチャを生成するときには、減算部602をスルーして入力された原画像の成分フレームに対して直交変換を行う。また、直交変換部603は、PピクチャまたはBピクチャを生成するときには、上述した差分信号に対して直交変換をおこなう。
 量子化部604は、直交変換部603から入力されたブロック単位の周波数係数(直交変換係数)を量子化係数に変換する。量子化部604の出力は、可変長符号化部605および逆量子化部606にそれぞれ入力される。
 可変長符号化部605は、量子化係数や、位置ずれ検出部610からの位置ずれに関する動きベクトル(以下、単に「動きベクトル」)を可変長符号化し、符号化成分フレーム(Iピクチャ、Pピクチャ、Bピクチャ)を出力する。
 逆量子化部606は、符号化の単位であるブロック単位で量子化係数を逆量子化して周波数係数を復号する。逆直交変換部607は、逆量子化部606で復号された周波数係数を逆直交変換して予測誤差値(または原画像の成分フレーム)を復号する。
 加算部608は、復号された予測誤差値と、第1画素位置補償部611で生成された後述の予測値とを加算する。そして、加算部608から出力されたピクチャの復号値(参照成分フレーム)は第2蓄積部609に蓄積される。なお、以後の画素位置補償予測で参照されない成分フレームは第2蓄積部609から順次消去される。
 位置ずれ検出部610は、第2蓄積部609の参照画像を用いて、符号化対象の成分フレームを予測するための画素位置のずれを示す動きベクトルを検出する。動きベクトルは、第1画素位置補償部611および可変長符号化部605に出力される。
 第1画素位置補償部611は、動きベクトルおよび参照成分フレームに基づいて、符号化対象の成分フレームをブロック単位で予測した予測値を出力する。この予測値は、減算部602および加算部608に出力される。
 なお、或るブロックについて画素位置補償予測を行う場合、符号化対象の成分フレームが予測値と完全に一致すると動きベクトルのみが符号化される。また、符号化対象の成分フレームが予測値と部分的に一致する場合、動きベクトルと差分画像が符号化される。また、符号化対象の成分フレームが予測値からすべて外れる場合には、ブロック全体分の画像がすべて符号化される。
 <成分フレームの参照方向例>
 図7は、成分フレームの参照方向例を示す説明図である。(A)は、同一RAW画像データ100からの成分フレームの入力順が、G1画像データ111、G2画像データ112、B画像データ113、およびR画像データ114である場合の参照方向を示す。先頭のG1画像データ111はIピクチャに符号化される。次に入力されるG2画像データ112は、先行するG1画像データ111を参照成分フレームとしてフレーム間予測符号化によりPピクチャに符号化される。
 次に入力されるB画像データ113は、ブロック毎に先行するG1画像データ111およびG2画像データ112のうち少なくとも一方の成分フレームを参照成分フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。最後に入力されるR画像データ114は、ブロック毎に先行するG1画像データ111、G2画像データ112、およびB画像データ113のうち少なくとも一つの成分フレームを参照成分フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 (B)は、同一RAW画像データ100からの成分フレームの入力順が、B画像データ113、R画像データ114、G1画像データ111、およびG2画像データ112である場合の参照方向を示す。先頭のB画像データ113はIピクチャに符号化される。次に入力されるR画像データ114は、先行するB画像データ113を参照成分フレームとしてフレーム間予測符号化によりPピクチャに符号化される。
 次に入力されるG1画像データ111は、先行するB画像データ113およびR画像データ114のうち少なくとも一方の成分フレームを参照成分フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。最後に入力されるG2画像データ112は、先行するB画像データ113、R画像データ114、およびG1画像データ111のうち少なくとも一つの成分フレームを参照成分フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 なお、図7の参照方向は一例であり、(A),(B)以外の成分フレームの入力順でも符号化が可能である。すなわち、先頭の成分フレームがIピクチャに符号化され、後続の成分フレームがPピクチャまたはBピクチャに符号化される。また、この符号化部402は、色成分に依存しない撮像素子353の画素からの輝度値を用いているため、異なる色成分を参照フレームとしても符号化することができる。
 <動きベクトルの検出例>
 図8は、動きベクトルの検出例を示す説明図である。(A)は、RAW画像データ100および成分フレームを示し、(B)~(M)は、動きベクトルの検出例を示す。図8では、説明を単純化するため、(A)に示すように、RAW画像データ100を、H=4画素、V=4画素のフレームとする。また、他の同一色成分と区別するため、色成分の符号の末尾にa~d、xを付す。
 また、予測先の成分フレームの注目画素の位置に対する参照成分フレームの参照画素の位置ずれを、動きベクトルV(x,y)とする。動きベクトルV(x,y)は、右方向のずれによりxが増加し、左方向のずれによりxが減少し、下方向のずれによりyが増加し、上方向のずれによりyが減少する。図8中、動きベクトルV(x,y)を黒矢印で示す。
 (B)~(E)は、参照成分フレームをB画像データ113とし、予測先の成分フレームをR画像データ114とし、注目画素をR画像データ114の画素Rxとした場合の動きベクトルV(Rx)の検出例を示す。(B)~(E)では、位置ずれ検出部610は、1つの参照画素で注目画素を予測するための動きベクトルを検出する。これにより、R画像データ114をPピクチャに符号化することができる。
 (B)において、B画像データ113の参照画素を画素Bbとする。注目画素Rxは、参照画素Bbと同じ画素位置である。すなわち、参照画素Bbと注目画素Rxには位置ずれが生じていない。したがって、画素Bbで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(0,0)となる。すなわち、動きベクトルV(B)は検出されない。
 (C)において、B画像データ113の参照画素を画素Baとする。注目画素Rxは、参照画素Baから右方向に1画素分ずれた画素位置である。すなわち、参照画素Baと注目画素Rxには位置ずれが生じている。したがって、参照画素Baで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(-1,0)として検出される。
 (D)において、B画像データ113の参照画素を画素Bdとする。注目画素Rxは、参照画素Bdから上方向に1画素分ずれた画素位置である。すなわち、参照画素Bdと注目画素Rxには位置ずれが生じている。したがって、参照画素Bdで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(0,1)として検出される。
 (E)において、B画像データ113の参照画素を画素Bcとする。注目画素Rxは、参照画素Bcから右方向に1画素、上方向に1画素分ずれた画素位置である。すなわち、参照画素Bcと注目画素Rxには位置ずれが生じている。したがって、参照画素Bcで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(-1,1)として検出される。
 (F)~(J)は、参照成分フレームをB画像データ113とし、予測先の成分フレームをR画像データ114とし、注目画素をR画像データ114の画素Rxとした場合の動きベクトルV(B)の検出例を示す。(F)~(J)では、位置ずれ検出部610は、同一色成分の複数の参照画素で注目画素を予測するための動きベクトルを検出する。これにより、R画像データ114をPピクチャに符号化することができる。
 (F)において、B画像データ113の参照画素を画素Ba~Bdとする。注目画素Rxは、参照画素Bbと同じ画素位置である。参照画素Ba~Bdで予測する場合、平均的な参照画素位置は、参照画素Ba~Bdの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素Ba~Bdの中心から右方向に0.5画素、上方向に0.5画素分ずれた画素位置である。したがって、参照画素Ba~Bdで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(-0.5,0.5)として検出される。
 (G)において、B画像データ113の参照画素を画素Bb,Bdとする。注目画素Rxは、参照画素Bbと同じ画素位置である。参照画素Bb,Bdで予測する場合、平均的な参照画素位置は、参照画素Bb,Bdの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素Bb,Bdの中心から上方向に0.5画素分ずれた画素位置である。したがって、参照画素Bb,Bdで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(0,0.5)として検出される。
 (H)において、B画像データ113の参照画素を画素Ba,Bcとする。注目画素Rxは、参照画素Bbと同じ画素位置である。参照画素Ba,Bcで予測する場合、平均的な参照画素位置は、参照画素Ba,Bcの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素Ba,Bcの中心から右方向に1画素、上方向に0.5画素分ずれた画素位置である。したがって、参照画素Ba,Bcで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(-1,0.5)として検出される。
 (I)において、B画像データ113の参照画素を画素Ba,Bbとする。注目画素Rxは、参照画素Bbと同じ画素位置である。参照画素Ba,Bbで予測する場合、平均的な参照画素位置は、参照画素Ba,Bbの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素Ba,Bbの中心から右方向に0.5画素分ずれた画素位置である。したがって、参照画素Ba,Bbで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(-0.5,0)として検出される。
 (J)において、B画像データ113の参照画素を画素Bc,Bdとする。注目画素Rxは、参照画素Bbと同じ画素位置である。参照画素Bc,Bdで予測する場合、平均的な参照画素位置は、参照画素Bc,Bdの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素Bc,Bdの中心から右方向に0.5画素、上方向に1画素分ずれた画素位置である。したがって、参照画素Bc,Bdで注目画素Rxを予測する場合、動きベクトルV(B)は、V(B)=(-0.5,1)として検出される。
 (K)~(M)は、参照成分フレームをG1画像データ111または/およびG2画像データ112とし、予測先の成分フレームをR画像データ114とし、注目画素をR画像データ114の画素Rxとした場合の動きベクトルVの検出例を示す。(K)~(M)では、位置ずれ検出部610は、同一色成分または異なる色成分の複数の参照画素で注目画素を予測するための動きベクトルを検出する。これにより、R画像データ114をPピクチャまたはBピクチャに符号化することができる。
 (K)において、G1画像データ111の参照画素を画素G1b,G1dとする。注目画素Rxは、参照画素G1bと同じ画素位置である。参照画素G1b,G1dで予測する場合、平均的な参照画素位置は、参照画素G1b,G1dの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素G1b,G1dの中心から上方向に0.5画素分ずれた画素位置である。したがって、参照画素G1b,G1dで注目画素Rxを予測する場合、動きベクトルV(G1)は、V(G1)=(0,0.5)として検出される。
 (L)において、G2画像データ112の参照画素を画素G2a,G2bとする。注目画素Rxは、参照画素G2bと同じ画素位置である。参照画素G2a,G2bで予測する場合、平均的な参照画素位置は、参照画素G2a,G2bの中心となり、注目画素Rxと位置ずれが生じている。
 すなわち、注目画素Rxは、参照画素G2a,G2bの中心から右方向に0.5画素分ずれた画素位置である。したがって、参照画素G2a,G2bで注目画素Rxを予測する場合、動きベクトルV(G2)は、V(G2)=(-0.5,0)として検出される。
 (M)は、G1画像データ111およびG2画像データ112を参照成分フレームとする。このため、(M)の動きベクトルは、(K)の動きベクトルV(G1)と(L)の動きベクトルV(G2)との合成動きベクトルV(G)となる。したがって、参照画素G1b,G1dおよび参照画素G2a,G2bで注目画素Rxを予測する場合、合成動きベクトルV(G)は、V(G)=(-0.5,0.5)として検出される。
 なお、図8では、予測先をR画像データ114としたが、予測先はG1画像データ111、G2画像データ112、B画像データ113でもよい。また、R画像データ114を参照成分フレームとしてもよい。また、(M)の双方向の参照成分フレームは同一色成分ではなく異なる色成分でもよい。
 このように、RAW画像データ100の同じ色配列101から抽出されたG1画素、G2画素、B画素およびR画素は、各成分フレームで同じ画素位置にそれぞれ配置される。しかし、成分フレーム間では色配列101での画素位置の違いによる絵柄のズレが生じる。そのため、色配列101での画素位置の違いを考慮して、成分フレーム間での画素位置補償予測が実行される。
 <成分フレーム間での画素位置補償予測例>
 以下、成分フレーム間での画素位置補償予測例を、図9~図16を用いて説明する。なお、図9~図16において、RAW画像データ100での画素の配列を丸印で示す。また、1つの色配列の範囲(成分フレームの標本点)を枠線で示す。
 図9は、成分フレーム間での画素位置補償予測例1を示す説明図である。(A)の参照パターンは、予測先の成分フレームをG2画像データ112とし、その注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるG1画像データ111の周囲4画素G1a~G1dの平均値で予測する例を示す。
 (A)では、画素G1aと画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素G1b~G1dの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素G2xの位置に対して右に0.5画素、下に0.5画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(0.5,0.5)である。
 このように、(A)では、注目画素G2xの画素値を4つの隣接画素G1a~G1dの平均で予測することにより、G2画像データ112はPピクチャに符号化される。したがって、G1画像データにより注目画素G2xの画素位置に合わせた予測ができる。また、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (B)の参照パターンは、予測先の成分フレームをG2画像データ112とし、その注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1a、G1cの平均値で予測する例を示す。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。注目画素G2xの画素値を2つの隣接画素G1a、G1cの平均で予測するため、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (B)では、画素G1aと画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素G1a、G1cの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素G2xの位置に対して下に0.5画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(0,0.5)である。
 (C)の参照パターンは、予測先の成分フレームをG2画像データ112とし、その注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1b、G1dの平均値で予測する例を示す。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。注目画素G2xの画素値を2つの隣接画素G1b、G1dの平均で予測するため、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (C)では、画素G1aと画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素G1b、G1dの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素G2xの位置に対して右に1画素、下に0.5画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(1,0.5)である。
 (D)の参照パターンは、予測先の成分フレームをG2画像データ112とし、その注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1a、G1bの平均値で予測する例を示す。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。注目画素G2xの画素値を2つの隣接画素G1a、G1bの平均で予測するため、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (D)では、画素G1aと画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素G1a、G1bの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素G2xの位置に対して右に0.5画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(0.5,0)である。
 (E)の参照パターンは、予測先の成分フレームをG2画像データ112とし、その注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1c、G1dの平均値で予測する例を示す。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。注目画素G2xの画素値を2つの隣接画素G1c、G1dの平均で予測するため、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (E)では、画素G1aと画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素G1c、G1dの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素G2xの位置に対して右に0.5画素、下に1画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(0.5,1)である。
 このように、(B)~(E)では、縦エッジ、または、横エッジを含む絵柄のブロックで選択される確率が高い。注目画素G2xの画素値を2つの隣接画素の平均で予測することにより、G2画像データ112はPピクチャに符号化される。したがって、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 図10は、成分フレーム間での画素位置補償予測例2を示す説明図である。図10では、予測先の成分フレームの注目画素の値が、予測先の成分フレームと同一色成分である参照成分フレームの異なる位置の画素の値から予測される。図10では、予測先の成分フレームをG2画像データ112、その注目画素を画素G2xとし、参照成分フレームをG1画像データ111とする。
 (A)の参照パターンの場合、予測先の成分フレームであるG2画像データ112の注目画素G2xの値が、RAW画像データでは左上に位置する画素G1aの値から予測される。この場合、参照成分フレームであるG1画像データ111の参照画素(G1aの属する標本点)は、予測先の成分フレームであるG2画像データ112での注目画素(G2xの属する標本点)と同じ位置である。したがって、動きベクトルVは、V(G1)=(0,0)となる。このような動き補償予測は、右下から左上への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 (B)の参照パターンの場合、予測先の成分フレームであるG2画像データ112の注目画素G2xの値が、RAW画像データでは右上に位置する画素G1bの値から予測される。この場合、参照成分フレームであるG1画像データ111の参照画素(G1bの属する標本点)は、予測先の成分フレームであるG2画像データ112での注目画素(G2xの属する標本点)の位置に対して右に1画素ずれる。したがって、動きベクトルVは、V(G1)=(1,0)となる。このような動き補償予測は、左下から右上への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 (C)の参照パターンの場合、予測先の成分フレームであるG2画像データ112の注目画素G2xの値が、RAW画像データでは左下に位置する画素G1cの値から予測される。この場合、参照成分フレームであるG1画像データ111の参照画素(G1cの属する標本点)は、予測先の成分フレームであるG2画像データ112での注目画素(G2xの属する標本点)の位置に対して下に1画素ずれる。したがって、動きベクトルVは、V(G1)=(0,1)となる。このような動き補償予測は、右下から左上への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 (D)の参照パターンの場合、予測先の成分フレームであるG2画像データ112の注目画素G2xの値が、RAW画像データ100では右下に位置する画素G1dの値から予測される。この場合、参照成分フレームであるG1画像データ111の参照画素(G1dの属する標本点)は、予測先の成分フレームであるG2画像データ112での注目画素(G2xの属する標本点)の位置に対して右に1画素、下に1画素ずれる。したがって、動きベクトルVは、V(G1)=(1,1)となる。このような動き補償予測は、左下から右上への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 このように、注目画素G2xの画素値を1つの画素G1で予測することにより、G2画像データ112はPピクチャに符号化される。したがって、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 図11は、成分フレーム間での画素位置補償予測例3を示す説明図である。図11では、予測先の成分フレームの注目画素の値が、予測先の成分フレームとは異なる色成分である参照成分フレームの異なる位置の画素の値から予測される。図11では、予測先の成分フレームをB画像データ113、その注目画素を画素Bxとし、参照成分フレームをG1画像データ111またはG2画像データ112とする。
 (A)の参照パターンは、予測先の成分フレームであるB画像データ113の注目画素Bxの値を、注目画素Bxに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1a、G1bの平均値で予測する例を示す。注目画素Bxの画素値を2つの隣接画素G1a、G1bの平均で予測することにより、B画像データ113はPピクチャに符号化される。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (A)では、画素G1aと注目画素Bxとが同じ標本点に属するが、注目画素Bxは補間により画素G1a、G1bの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素Bxの位置に対して右に0.5画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(0.5,0)である。
 (B)の参照パターンは、予測先の成分フレームであるB画像データ113の注目画素Bxの値を、注目画素Bxに隣接する参照成分フレームであるG2画像データ112の隣接する2画素G2a、G2bの平均値で予測する例を示す。注目画素Bxの画素値を2つの隣接画素G2a、G2bの平均で予測することにより、B画像データ113はPピクチャに符号化される。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるG2画像データ112の復号値に含まれる符号化歪みを抑制することができる。
 (B)では、参照画素G2bと注目画素Bxとが同じ標本点に属するが、注目画素Bxは補間により画素G2a、G2bの影響を受ける。そのため、参照成分フレームであるG2画像データ112での参照画素の範囲は、注目画素Bxの位置に対して上に0.5画素ずれる。したがって、この場合の動きベクトルV(G2)は、V(G2)=(0,-0.5)である。
 (C)の参照パターンは、(A)の画素位置補償予測と(B)の画素位置補償予測との組み合わせである。すなわち、(C)は、予測先の成分フレームであるB画像データ113の注目画素Bxの値を、注目画素Bxに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1a、G1bおよびG2画像データ112の隣接する2画素G2a、G2bの平均値で予測する例である。
 注目画素Bxの画素値を4つの隣接画素G1a、G1b、G2a、G2bの平均で予測することにより、B画像データ113はBピクチャに符号化される。したがって、参照成分フレームであるG1画像データ111およびG2画像データ112の復号値に含まれる符号化歪みをより抑制することができる。
 (C)では、画素G1a、G2bと注目画素Bxとが同じ標本点に属するが、注目画素Bxは補間により画素G1a、G1b、G2a、G2bの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素Bxの位置に対して右に0.5画素ずれ、G2画像データ112での参照画素の範囲は、注目画素Bxの位置に対して上に0.5画素ずれる。したがって、この場合の動きベクトルV(G)は、V(G1)+V(G2)=(0.5,-0.5)である。
 図12は、成分フレーム間での画素位置補償予測例4を示す説明図である。図12では、予測先の成分フレームの注目画素の値が、予測先の成分フレームとは異なる色成分である参照成分フレームの異なる位置の画素の値から予測される。図12では、予測先の成分フレームをR画像データ114、その注目画素を画素Rxとし、参照成分フレームをG1画像データ111またはG2画像データ112とする。
 (A)の参照パターンは、予測先の成分フレームであるR画像データ114の注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1a、G1bの平均値で予測する例を示す。注目画素Rxの画素値を2つの隣接画素G1a、G1bの平均で予測することにより、R画像データ114はPピクチャに符号化される。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるG1画像データ111の復号値に含まれる符号化歪みを抑制することができる。
 (A)では、画素G1aと注目画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素G1a、G1bの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素Rxの位置に対して下に0.5画素ずれる。したがって、この場合の動きベクトルV(G1)は、V(G1)=(0,0.5)である。
 (B)の参照パターンは、予測先の成分フレームであるR画像データ114の注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるG2画像データ112の隣接する2画素G2a、G2bの平均値で予測する例を示す。注目画素Rxの画素値を2つの隣接画素G2a、G2bの平均で予測することにより、R画像データ114はPピクチャに符号化される。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるG2画像データ112の復号値に含まれる符号化歪みを抑制することができる。
 (B)では、参照画素G2bと注目画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素G2a、G2bの影響を受ける。そのため、参照成分フレームであるG2画像データ112での参照画素の範囲は、注目画素Rxの位置に対して左に0.5画素ずれる。したがって、この場合の動きベクトルV(G2)は、V(G2)=(-0.5,0)である。
 (C)の参照パターンは、(A)の画素位置補償予測と(B)の画素位置補償予測との組み合わせである。すなわち、(C)は、予測先の成分フレームであるR画像データ114の注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるG1画像データ111の隣接する2画素G1a、G1bおよびG2画像データ112の隣接する2画素G2a、G2bの平均値で予測する例である。
 注目画素Bxの画素値を4つの隣接画素G1a、G1b、G2a、G2bの平均で予測することにより、R画像データ114はBピクチャに符号化される。したがって、参照成分フレームであるG1画像データ111およびG2画像データ112の復号値に含まれる符号化歪みを抑制することができる。
 (C)では、画素G1a、G2bと注目画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素G1a、G1b、G2a、G2bの影響を受ける。そのため、参照成分フレームであるG1画像データ111での参照画素の範囲は、注目画素Rxの位置に対して下に0.5画素ずれ、G2画像データ112での参照画素の範囲は、注目画素Rxの位置に対して左に0.5画素ずれる。したがって、この場合の動きベクトルV(G)は、V(G1)+V(G2)=(-0.5,0.5)である。
 図13は、成分フレーム間での画素位置補償予測例5を示す説明図である。(A)の参照パターンは、予測先の成分フレームをR画像データ114とし、その注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるB画像データ113の周囲4画素Ba~Bdの平均値で予測する例を示す。
 (A)では、画素Bbと画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素Bb~Bdの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素Rxの位置に対して左に0.5画素、下に0.5画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(-0.5,0.5)である。
 このように、注目画素Rxの画素値を4つの隣接画素Ba~Bdの平均で予測することにより、R画像データ114はPピクチャに符号化される。したがって、B画像により注目画素Rxの画素位置に合わせた予測ができる。また、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (B)の参照パターンは、予測先の成分フレームをR画像データ114とし、その注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるB画像データ113の隣接する2画素Ba、Bcの平均値で予測する例を示す。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。注目画素Rxの画素値を2つの隣接画素Ba、Bcの平均で予測するため、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (B)では、画素Bbと画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素Ba、Bcの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素Rxの位置に対して左に1画素、下に0.5画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(-1,0.5)である。
 (C)の参照パターンは、予測先の成分フレームをR画像データ114とし、その注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるB画像データ113の隣接する2画素Bb、Bdの平均値で予測する例を示す。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。注目画素Rxの画素値を2つの隣接画素Bb、Bdの平均で予測するため、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (C)では、画素Bbと画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素Bb、Bdの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素Rxの位置に対して下に0.5画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(0,0.5)である。
 (D)の参照パターンは、予測先の成分フレームをR画像データ114とし、その注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるB画像データ113の隣接する2画素Ba、Bbの平均値で予測する例を示す。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。注目画素Rxの画素値を2つの隣接画素Ba、Bbの平均で予測するため、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (D)では、画素Bbと画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素Ba、Bbの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素Rxの位置に対して左に0.5画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(-0.5,0)である。
 (E)の参照パターンは、予測先の成分フレームをR画像データ114とし、その注目画素Rxの値を、注目画素Rxに隣接する参照成分フレームであるB画像データ113の隣接する2画素Bc、Bdの平均値で予測する例を示す。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。注目画素Rxの画素値を2つの隣接画素Bc、Bdの平均で予測するため、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (E)では、画素Bbと画素Rxとが同じ標本点に属するが、注目画素Rxは補間により画素Bc、Bdの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素Rxの位置に対して左に0.5画素、下に1画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(-0.5,1)である。
 このように、(B)~(E)では、注目画素Rxの画素値を2つの隣接画素の平均で予測することにより、R画像データ114はPピクチャに符号化される。したがって、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 図14は、成分フレーム間での画素位置補償予測例6を示す説明図である。図14では、予測先の成分フレームの注目画素の値が、予測先の成分フレームと同一色成分である参照成分フレームの異なる位置の画素の値から予測される。図14では、予測先の成分フレームをR画像データ114、その注目画素を画素Rxとし、参照成分フレームをB画像データ113とする。
 (A)の参照パターンの場合、予測先の成分フレームであるR画像データ114の注目画素Rxの値が、RAW画像データ100では左上に位置する画素Baの値から予測される。この場合、参照成分フレームであるB画像データ113の参照画素(Baの属する標本点)は、予測先の成分フレームであるR画像データ114での注目画素(Rxの属する標本点)の位置に対して左に1画素ずれる。したがって、動きベクトルVは、V(B)=(-1,0)となる。このような動き補償予測は、右下から左上への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 (B)の参照パターンの場合、予測先の成分フレームであるR画像データ114の注目画素Rxの値が、RAW画像データ100では右上に位置する画素Bbの値から予測される。この場合、参照成分フレームであるB画像データ113の参照画素(Bbの属する標本点)は、予測先の成分フレームであるR画像データ114での注目画素(Rxの属する標本点)と同じ位置である。したがって、動きベクトルVは、V(B)=(0,0)となる。このような動き補償予測は、左下から右上への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 (C)の参照パターンの場合、予測先の成分フレームであるR画像データ114の注目画素Rxの値が、RAW画像データ100では右下に位置する画素Bdの値から予測される。この場合、参照成分フレームであるB画像データ113の参照画素(Bdの属する標本点)は、予測先の成分フレームであるR画像データ114での注目画素(Rxの属する標本点)の位置に対して下に1画素ずれる。したがって、動きベクトルVは、V(B)=(0,1)となる。このような動き補償予測は、左上から右下への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 (D)の参照パターンの場合、予測先の成分フレームであるR画像データ114の注目画素Rxの値が、RAW画像データ100では右下に位置する画素Bcの値から予測される。この場合、参照成分フレームであるB画像データ113の参照画素(Bcの属する標本点)は、予測先の成分フレームであるR画像データ114での注目画素(Rxの属する標本点)の位置に対して右に1画素、下に1画素ずれる。したがって、動きベクトルVは、V(B)=(-1,1)となる。このような動き補償予測は、右上から左下への斜めエッジを含む絵柄のブロックで選択される確率が高い。
 このように、注目画素Rxの画素値を1つの画素Bで予測することにより、R画像データ114はPピクチャに符号化される。したがって、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 図15は、成分フレーム間での画素位置補償予測例7を示す説明図である。図15では、予測先の成分フレームの注目画素の値が、予測先の成分フレームとは異なる色成分である参照成分フレームの異なる位置の画素の値から予測される。図15では、予測先の成分フレームをG1画像データ111、その注目画素を画素G1xとし、参照成分フレームをB画像データ113またはR画像データ114とする。
 (A)の参照パターンは、予測先の成分フレームであるG1画像データ111の注目画素G1xの値を、注目画素G1xに隣接する参照成分フレームであるB画像データ113の隣接する2画素Ba、Bbの平均値で予測する例を示す。注目画素G1xの画素値を2つの隣接画素Ba、Bbの平均で予測することにより、G1画像データ111はPピクチャに符号化される。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (A)では、画素Bbと注目画素G1xとが同じ標本点に属するが、注目画素G1xは補間により画素Ba、Bbの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素G1xの位置に対して左に0.5画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(-0.5,0)である。
 (B)の参照パターンは、予測先の成分フレームであるG1画像データ111の注目画素G1xの値を、注目画素G1xに隣接する参照成分フレームであるR画像データ114の隣接する2画素Ra、Rbの平均値で予測する例を示す。注目画素G1xの画素値を2つの隣接画素Ra、Rbの平均で予測することにより、G1画像データ111はPピクチャに符号化される。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるR画像データ114の復号値に含まれる符号化歪みを抑制することができる。
 (B)では、参照画素Rbと注目画素G1xとが同じ標本点に属するが、注目画素G1xは補間により画素Ra、Rbの影響を受ける。そのため、参照成分フレームであるR画像データ114での参照画素の範囲は、注目画素G1xの位置に対して上に0.5画素ずれる。したがって、この場合の動きベクトルV(R)は、V(R)=(0,-0.5)である。
 (C)の参照パターンは、(A)の画素位置補償予測と(B)の画素位置補償予測との組み合わせである。すなわち、(C)は、予測先の成分フレームであるG1画像データ111の注目画素G1xの値を、注目画素G1xに隣接する参照成分フレームであるB画像データ113の隣接する2画素Ba、BbおよびR画像データ114の隣接する2画素Ra、Rbの平均値で予測する例である。
 注目画素G1xの画素値を4つの隣接画素Ba、Bb、Ra、Rbの平均で予測することにより、G1画像データ111はBピクチャに符号化される。したがって、参照成分フレームであるG1画像データ111およびR画像データ114の復号値に含まれる符号化歪みを抑制することができる。
 (C)では、画素Bb、Rbと注目画素G1xとが同じ標本点に属するが、注目画素G1xは補間により画素Ba、Bb、Ra、Rbの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素G1xの位置に対して左に0.5画素ずれ、R画像データ114での参照画素の範囲は、注目画素G1xの位置に対して上に0.5画素ずれる。したがって、この場合の動きベクトルV(G)は、V(G1)+V(R)=(-0.5,-0.5)である。
 図16は、成分フレーム間での画素位置補償予測例4を示す説明図である。図16では、予測先の成分フレームの注目画素の値が、予測先の成分フレームとは異なる色成分である参照成分フレームの異なる位置の画素の値から予測される。図16では、予測先の成分フレームをG2画像データ112、その注目画素を画素G2xとし、参照成分フレームをB画像データ113またはR画像データ114とする。
 (A)の参照パターンは、予測先の成分フレームであるG2画像データ112の注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるB画像データ113の隣接する2画素Ba、Bbの平均値で予測する例を示す。注目画素G2xの画素値を2つの隣接画素Ba、Bbの平均で予測することにより、G2画像データ112はPピクチャに符号化される。このような画素位置補償予測は、縦エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるB画像データ113の復号値に含まれる符号化歪みを抑制することができる。
 (A)では、画素Baと注目画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素Ba、Bbの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素G2xの位置に対して下に0.5画素ずれる。したがって、この場合の動きベクトルV(B)は、V(B)=(0,0.5)である。
 (B)の参照パターンは、予測先の成分フレームであるG2画像データ112の注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるR画像データ114の隣接する2画素Ra、Rbの平均値で予測する例を示す。注目画素G2xの画素値を2つの隣接画素Ra、Rbの平均で予測することにより、G2画像データ112はPピクチャに符号化される。このような画素位置補償予測は、横エッジを含む絵柄のブロックで選択される確率が高い。また、参照成分フレームであるR画像データ114の復号値に含まれる符号化歪みを抑制することができる。
 (B)では、参照画素Rbと注目画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素Ra、Rbの影響を受ける。そのため、参照成分フレームであるR画像データ114での参照画素の範囲は、注目画素G2xの位置に対して右に0.5画素ずれる。したがって、この場合の動きベクトルV(R)は、V(R)=(0.5,0)である。
 (C)の参照パターンは、(A)の画素位置補償予測と(B)の画素位置補償予測との組み合わせである。すなわち、(C)は、予測先の成分フレームであるG2画像データ112の注目画素G2xの値を、注目画素G2xに隣接する参照成分フレームであるB画像データ113の隣接する2画素Ba、BbおよびR画像データ114の隣接する2画素Ra、Rbの平均値で予測する例である。
 注目画素Bxの画素値を4つの隣接画素Ba、Bb、Ra、Rbの平均で予測することにより、G2画像データ112はBピクチャに符号化される。したがって、参照成分フレームであるB画像データ113およびR画像データ114の復号値に含まれる符号化歪みをより抑制することができる。
 (C)では、画素Ba、Rbと注目画素G2xとが同じ標本点に属するが、注目画素G2xは補間により画素Ba、Bb、Ra、Rbの影響を受ける。そのため、参照成分フレームであるB画像データ113での参照画素の範囲は、注目画素G2xの位置に対して下に0.5画素ずれ、R画像データ114での参照画素の範囲は、注目画素G2xの位置に対して右に0.5画素ずれる。したがって、この場合の動きベクトルV(G)は、V(B)+V(R)=(0.5,0.5)である。
 なお、符号化部402は、PピクチャまたはBピクチャに符号化する場合、図9~図16に示した画素位置補償予測を試行し、差分が最も小さい画素位置補償予測を選択する。たとえば、B画像データ113を参照してR画像データ114を予測する場合、符号化部402は、図13の(A)~(E)および図14の(A)~(D)の各参照パターンで画素位置補償予測を試行し、最も差分が小さくなる参照パターンを選択する。これにより、適応的かつ効率的に画素位置補償予測を実行することができる。
 特に、参照パターンが画像のエッジをまたぐ場合、エッジを挟む参照成分フレームにおける画素と予測先の成分フレームの注目画素の値の差が大きくなる。したがって、参照パターンを適用的に選択することで、エッジをまたがないような参照パターンを特定することができ、符号化効率の向上を図ることができる。
 <符号化成分フレームのデータ構造例>
 図17は、符号化成分フレームのデータ構造例を示す説明図である。符号化成分フレーム1700は、ヘッダ情報1701と符号化データ列1702とを有する。ヘッダ情報1701は、符号化部402により付与される情報である。ヘッダ情報1701は、画像形式情報1711と制御情報1712とを含む。
 画像形式情報1711は、符号化前の成分フレームのサイズ、符号化成分フレーム1700のサイズ、色配列101のパターンを特定する識別情報、成分フレームの画素数を含む。制御情報1712は、符号化成分フレーム1700の種類(Iピクチャ、Pピクチャ、Bピクチャのいずれか)、参照成分フレームの識別情報、図9~図16に示した画素位置補償予測に用いた参照パターンを含む。符号化データ列1702は、成分フレームを符号化したデータ列である。
 <符号化処理手順例>
 図18は、符号化装置400による符号化処理手順例を示すフローチャートである。符号化装置400は、RAW画像データ100の入力を受け付け(ステップS1801)、第1生成部401により色成分ごとにRAW画像データ100の画素群を分離して、色成分ごとの成分フレームを生成する(ステップS1802)。つぎに、符号化装置400は、符号化部402により成分フレーム内予測符号化を実行してIピクチャを生成する(ステップS1803)。
 そして、符号化装置400は、符号化部402により、残余の成分フレームについて成分フレーム間予測符号化を実行してPピクチャまたはBピクチャを生成する(ステップS1804)。最後に、符号化装置400は、記録部403により、ステップS1803およびS1804で符号化された符号化画像データ群を記憶デバイス302に格納する(ステップS1805)。
 <復号装置の機能的構成例>
 図19は、復号装置の機能的構成例を示すブロック図である。復号装置1900は、取得部1901と、復号部1902と、第2生成部1903と、を有する。取得部1901は、符号化装置400によって符号化された符号化成分フレーム1700を取得し、復号部1902は、制御情報1712を用いて符号化成分フレーム1700を成分フレームに復号し、第2生成部1903は、画像形式情報1711を用いて、復号された各成分フレームからRAW画像データ100を生成する。
 取得部1901、復号部1902、および第2生成部1903は、具体的には、たとえば、記憶デバイス302に記憶されたプログラムをプロセッサ301に実行させることにより、または、LSI304により実現される機能である。
 取得部1901は、第1符号化画像データと第2符号化画像データとを取得する。第1符号化画像データは、第1色成分の画素群により構成される第1画像データをフレーム内予測符号化したデータである。第2符号化画像データは、第1色成分とは異なる第2色成分の画素群により構成される第2画像データを第1画像データに基づいて符号化した第2符号化画像データと、を取得する。
 また、取得部1901は、第3符号化画像データを取得する。第3符号化画像データは、第3色成分の画素群により構成される第3画像データを第1画像データに基づいて符号化したデータである。また、取得部1901は、第4符号化画像データを取得する。第4符号化画像データは、第4色成分の画素群により構成される第4画像データを第1画像データに基づいて符号化したデータである。
 復号部1902は、制御情報1712を用いて、取得部1901によって取得された第1符号化画像データを第1画像データに復号するとともに、第1画像データに基づいて、取得部1901によって取得された第2符号化画像データを第2画像データに復号する。具体的には、たとえば、復号部1902は、Iピクチャである第1符号化画像データを第1画像データに復号し、Pピクチャである第2画像データを、画素位置補償予測に適用した参照パターンにしたがって、第1画像データを用いて第2画像データに復号する。
 また、復号部1902は、制御情報1712を用いて、第1画像データに基づいて、取得部1901によって取得された第3符号化画像データを第3画像データに復号する。具体的には、たとえば、復号部1902は、第3符号化画像データがPピクチャである場合、第3符号化画像データを、画素位置補償予測に適用した参照パターンにしたがって、第1画像データを用いて第3画像データに復号し、第3符号化画像データがBピクチャである場合、第3符号化画像データを、画素位置補償予測に適用した参照パターンにしたがって、第1画像データおよび第2画像データを用いて第3画像データに復号する。
 また、復号部1902は、制御情報1712を用いて、第1画像データに基づいて、取得部1901によって取得された第4符号化画像データを第4画像データに復号する。具体的には、たとえば、復号部1902は、第4符号化画像データがPピクチャである場合、第4符号化画像データを、画素位置補償予測に適用した参照パターンにしたがって、第1画像データ~第3画像データのうちいずれか1つの画像データを用いて第4画像データに復号し、第3符号化画像データがBピクチャである場合、第4符号化画像データを、画素位置補償予測に適用した参照パターンにしたがって、第1画像データ~第3画像データのうち2つの画像データを用いて第4画像データに復号する。
 第2生成部1903は、画像形式情報1711から色配列のパターンを特定し、特定した色配列101となるように、復号部1902によって復号された第1画像データ~第4画像データの画素群から、第1色成分~第4色成分とが繰り返し配置されたRAW画像データ100を生成する。
 <復号部1902の構成例>
 図20は、復号部1902の構成例を示すブロック図である。復号部1902は、可変長符号復号部2001と、逆量子化部2002と、逆直交変換部2003と、加算部2004と、第3蓄積部2005、第2画素位置補償部2006を有している。
 可変長符号復号部2001は、入力される符号化成分フレームを復号し、量子化係数や、動きベクトルを出力する。なお、復号された量子化係数は逆量子化部2002に入力され、復号された動きベクトルは第2画素位置補償部2006に入力される。
 逆量子化部2002は、ブロック単位で量子化係数を逆量子化して周波数係数を復号する。逆直交変換部2003は、逆量子化部2002で復号された周波数係数を逆直交変換して予測誤差値(または原画像の信号)を復号する。
 加算部2004は、復号された予測誤差値と第2画素位置補償部2006で生成された予測値とを加算することで、復号された画像データをブロック単位で出力する。そして、加算部2004から出力された画像データは成分フレームとして出力されるとともに、第3蓄積部2005に入力される。
 第3蓄積部2005は、画像の復号値を参照成分フレームとして蓄積する。なお、以後の画素位置補償予測で参照されない画像データは第3蓄積部2005から順次消去される。第2画素位置補償部2006は、動きベクトルおよび参照成分フレームに基づいて、復号対象の画像をブロック単位で予測した予測値を加算部2004に出力する。
 <復号処理手順例>
 図21は、復号装置1900による復号処理手順例を示すフローチャートである。復号装置1900は、符号化成分フレーム群として、取得部1901により符号化画像データ群を取得し(ステップS2101)、復号部1902により、先頭の符号化画像データ(Iピクチャ)を成分フレームに復号する(ステップS2102)。
 つぎに、復号装置1900は、復号部1902により、後続の符号化画像データ(PピクチャまたはBピクチャ)を成分フレームに復号する(ステップS2103)。そして、復号装置1900は、第2生成部1903により、復号された生成フレーム群を合成して、RAW画像データ100を復元する(ステップS2104)。
 このように、実施例1によれば、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、成分フレーム間の相関性が高いRAW画像データ100の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100に復元することができる。
 実施例2は、RAW画像データ100にホワイトバランス調整を実行してから符号化を実行する符号化と、成分フレームに復号してホワイトバランス調整済みのRAW画像データを生成してから、ホワイトバランス逆調整によりRAW画像データを生成する復号とを実行する。なお、実施例2では、実施例1との相違点を中心に説明し、実施例1と同一構成には同一符号を付し、その説明を省略する。
 <符号化および復号例>
 図22は、実施例2にかかる符号化および復号例を示す説明図である。(E)WB(ホワイトバランス)調整、(A)分離および(B)符号化は、符号化装置400によって実行され、(C)復号、(D)合成、および(F)WB逆調整は、復号装置1900によって実行される。
 (E)符号化装置400は、RAW画像データ100をホワイトバランス調整する。ホワイトバランス調整は、撮影によりRAW画像データを生成した際に設定された(符号化装置400における)ホワイトバランスの設定項目(オート、マニュアル、電球、曇天、蛍光灯、晴天日陰、晴天など)により実行される。ホワイトバランス調整されたRAW画像データ100を、WB調整済みRAW画像データ2200とする。
 (A)符号化装置400は、WB調整済みRAW画像データ2200から色成分ごとに成分フレームを生成する。具体的には、たとえば、符号化装置400は、緑(G1)の色成分フレームであるG1画像データ2211、緑(G2)の色成分フレームであるG2画像データ2212、青(B)の色成分フレームであるB画像データ2213、赤(R)の色成分フレームであるR画像データ2214を生成する。
 G1画像データ2211は、WB調整済みRAW画像データ2200における色配列101の各々からのG1画素群により構成される画像データである。G2画像データ2212は、WB調整済みRAW画像データ2200における色配列101の各々からのG2画素群により構成される画像データである。
 B画像データ2213は、WB調整済みRAW画像データ2200における色配列101の各々からのB画素群により構成される画像データである。R画像データ2214は、WB調整済みRAW画像データ2200における色配列101の各々からのR画素群により構成される画像データである。
 (B)符号化装置400は、各成分フレームを成分フレーム間で符号化する。具体的には、たとえば、符号化装置400は、成分フレーム群の1つをフレーム内予測符号化で符号化してIピクチャを生成し、残余の成分フレーム群をIピクチャを用いてフレーム間予測符号化で符号化してPピクチャまたはBピクチャを生成する。ここでは、符号化により、G1画像データ2211は、G1符号化画像データ2221となり、G2画像データ2212は、G2符号化画像データ2222となり、B画像データ2213は、B符号化画像データ2223となり、R画像データ2214は、R符号化画像データ2224となる。
 (C)復号装置1900は、符号化された成分フレーム群を復号する。具体的には、たとえば、復号装置1900は、Iピクチャを復号し、Iピクチャから復号された成分フレームを用いて、PピクチャまたはBピクチャを復号して、他の成分フレームを生成する。すなわち、復号装置1900は、G1符号化画像データ2221、G2符号化画像データ2222、B符号化画像データ2223、およびR符号化画像データ2224を復号して、G1画像データ2211、G2画像データ2212、B画像データ2213、およびR画像データ2214を生成する。
 (D)復号装置1900は、復号された成分フレーム群を合成して、WB調整済みRAW画像データ2200を生成する。具体的には、たとえば、G1画像データ2211、G2画像データ2212、B画像データ2213、およびR画像データ2214の同一位置の画素G1、G2、B、Rを色配列101に従って並べることで、G1画像データ2211、G2画像データ2212、B画像データ2213、およびR画像データ2214からWB調整済みRAW画像データ2200を復元する。
 (F)復号装置1900は、WB逆調整により、WB調整済みRAW画像データ2200を元のRAW画像データ100に変換する。
 このように、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、WB調整済みRAW画像データ2200を成分フレーム間予測することにより、WB調整済みRAW画像データ2200の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のWB調整済みRAW画像データ2200に復元することができる。
 また、青(B)および赤(R)は、緑(G)に比べると、信号レベルとなる画素の値が低く、そのため相関性が低い。したがって、符号化前にRAW画像データ100についてホワイトバランス調整を実行することで、青(B)および赤(R)の信号レベルを緑(G)の信号レベルに近づける。これにより、WB調整済みRAW画像データ2200の符号化効率の向上を図ることができる。
 また、符号化前にRAW画像データ100についてホワイトバランス調整を実行しているため、復号先でのRAW画像データ100のホワイトバランス調整が不要となる。ただし、復号先でWB調整済みRAW画像データ2200に復元するために、ホワイトバランス逆調整をしてもよい。
 <符号化装置400の機能的構成例>
 図23は、実施例2にかかる符号化装置400の機能的構成例を示すブロック図である。符号化装置400は、実施例1で示した構成のほか、ホワイトバランス調整部2301と、ホワイトバランス検出部2302と、を有する。ホワイトバランス調整部2301およびホワイトバランス検出部2302は、具体的には、たとえば、記憶デバイス302に記憶されたプログラムをプロセッサ301に実行させることにより、または、LSI304により実現される機能である。
 ホワイトバランス調整部2301は、ホワイトバランスの設定項目(オート、マニュアル、電球、曇天、蛍光灯、晴天日陰、晴天など)により、RAW画像データ100についてホワイトバランス調整をし、WB調整済みRAW画像データ2200を第1生成部401に出力する。したがって、第1生成部401は、WB調整済みRAW画像データ2200について、図22の(A)に示したような成分フレームの分離を実行することになる。ホワイトバランス調整は、たとえば、RAW画像データ100の黒レベルを基準に、RAW画像データ100の画素値にホワイバランス調整ゲイン係数を乗じることで処理する。例えば、RAW画像データ100の黒レベルをOB、B成分の画素値をXB、B成分のホワイトバランス調整ゲイン係数をABとするとき、ホワイバランス調整後のB成分の画素値YBは以下のように算出する。
OB≦XBのとき、YB=(XB-OB)×AB+OB
 XB<OBのとき、YB=(OB-XB)×AB+OB
 ホワイトバランス検出部2302は、RAW画像データ100から当該RAW画像データ100に適したホワイトバランスを検出し、ホワイトバランス調整部2301に通知する。これにより、ホワイトバランス調整部2301は、通知を受けたホワイトバランス(オート、マニュアル、電球、曇天、蛍光灯、晴天日陰、晴天など)により、RAW画像データ100についてホワイトバランス調整を実行する。
 また、ホワイトバランス検出部2302は、検出したホワイトバランスを特定する情報(ホワイトバランス制御情報)を符号化部402に通知する。具体的には、たとえば、図6に示したように、ホワイトバランス制御情報は、可変長符号化部605に出力される。これにより、符号化部402は、符号化部402が符号化した符号化成分フレーム1700のヘッダ情報1701内の制御情報1712にホワイトバランス制御情報を付与することができる。
 ここで、ホワイトバランス制御情報とは、たとえば、RAW画像データ2200がホワイトバランスを調整済みであることを示す情報(以下、「調整済み情報」という)と、RAW画像データ2200のB成分のホワイトバランス調整ゲインと、RAW画像データ2200のR成分のホワイトバランス調整ゲイン係数と、で構成される。
 後述する復号装置1900は、制御情報1712に付与された調整済み情報によりRAW画像データ2200がホワイトバランス調整済みであることを認識できる。また、復号装置1900は、制御情報1712に付与されたB成分とR成分の各ホワイトバランス調整ゲイン係数により、復号処理でホワイトバランス逆調整が可能となる。
 なお、制御情報1712には、上述した調整済み情報と、B成分のホワイトバランス調整ゲイン係数と、R成分のホワイトバランス調整ゲイン係数と、のうち少なくとも1つが付与される。
 実施例2では、RAW画像データ100にホワイトバランス調整する例を示した。しかし、たとえば、ホワイトバランス調整する代わりに、Rの色成分データの値とGの色成分データの値との差、Gの色成分データの値とBの色成分データの値との差、Bの色成分データの値とRの色成分データの値との差のうち、少なくとも1つの差が小さくなる処理でもよい。
 <符号化処理手順例>
 図24は、実施例2にかかる符号化装置400による符号化処理手順例を示すフローチャートである。符号化装置400は、RAW画像データ100の入力を受け付け(ステップS2401)、ホワイトバランス調整部2301により、RAW画像データ100をホワイトバランス調整し、WB調整済みRAW画像データ2200を出力する(ステップS2402)。符号化装置400は、第1生成部401により色成分ごとにWB調整済みRAW画像データ2200の画素群を分離して、色成分ごとの成分フレームを生成する(ステップS2403)。
 つぎに、符号化装置400は、符号化部402により成分フレーム内予測符号化を実行してIピクチャを生成する(ステップS2404)。そして、符号化装置400は、符号化部402により、残余の成分フレームについて成分フレーム間予測符号化を実行してPピクチャまたはBピクチャを生成する(ステップS2405)。最後に、符号化装置400は、記録部403により、ステップS2404およびS2405で符号化された符号化画像データ群を記憶デバイス302に格納する(ステップS2406)。
 <復号装置1900の機能的構成例>
 図25は、実施例2にかかる復号装置1900の機能的構成例を示すブロック図である。復号装置1900は、実施例1で示した構成のほか、ホワイトバランス逆調整部2504を有する。ホワイトバランス逆調整部2504は、具体的には、たとえば、記憶デバイス302に記憶されたプログラムをプロセッサ301に実行させることにより、または、LSI304により実現される機能である。なお、実施例2では、第2生成部1903は、調整済みRAW画像データ2200を生成することになる。
 ホワイトバランス逆調整部2504は、第2生成部1903から得られたWB調整済みRAW画像データ2200に付与されているヘッダ情報1701内のホワイトバランス制御情報を参照して、WB調整済みRAW画像データ2200についてホワイトバランス逆調整をし、元のRAW画像データ100に復元する。
 <復号処理手順例>
 図26は、実施例2にかかる復号装置1900による復号処理手順例を示すフローチャートである。復号装置1900は、ステップS2101~S2104のあと、ホワイトバランス逆調整部2504により、WB調整済みRAW画像データ2200についてホワイトバランス逆調整をし、元のRAW画像データ100に復元する(ステップS2605)。
 このように、実施例2によれば、実施例1と同様、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、WB調整済みRAW画像データ2200を成分フレーム間予測することにより、WB調整済みRAW画像データ2200の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100に復元することができる。
 また、青(B)および赤(R)は、緑(G)に比べると、信号レベルとなる画素の輝度値が低く、そのため相関性が低い。したがって、符号化前にRAW画像データ100についてホワイトバランス調整を実行することで、青(B)および赤(R)の信号レベルを緑(G)の信号レベルに近づける。これにより、WB調整済みRAW画像データ2200の符号化効率の向上を図ることができる。また、符号化前にRAW画像データ100についてホワイトバランス調整を実行しているため、ホワイトバランス逆調整部2504を省くことで、復号先でのRAW画像データ100のホワイトバランス調整を不要とすることもできる。
 実施例3は、RAW画像データ100を時間軸方向に並べたRAW動画像データを符号化および復号する例である。なお、実施例3では、実施例1との相違点を中心に説明し、実施例1と同一構成には同一符号を付し、その説明を省略する。
 <符号化および復号例>
 図27は、実施例3にかかる符号化および復号例を示す説明図である。(A)分離および(B)符号化は符号化装置400によって実行され、(C)復号および(D)合成は復号装置1900によって実行される。
 (A)符号化装置400は、RAW画像データ100を時間軸方向に並べたRAW動画像データ2700を取得し、各RAW画像データ100について、色成分ごとに成分フレームを生成する。これにより、G1画像データ列2711、G2画像データ列2712、B画像データ列2713およびR画像データ列2714が得られる。
 (B)符号化装置400は、各色成分フレームを成分フレーム間で符号化する。具体的には、たとえば、符号化装置400は、成分フレーム群の1つをフレーム内予測符号化で符号化してIピクチャを生成し、残余の成分フレーム群をIピクチャを用いてフレーム間予測符号化で符号化してPピクチャまたはBピクチャを生成する。ここでは、符号化により、G1画像データ列2711は、G1符号化画像データ列2721となり、G2画像データ列2712は、G2符号化画像データ列2722となり、B画像データ列2713は、B符号化画像データ列2723となり、R画像データ列2714は、R符号化画像データ列2724となる。
 (C)復号装置1900は、符号化された成分フレーム群を復号する。具体的には、たとえば、復号装置1900は、Iピクチャを復号し、Iピクチャから復号された成分フレームを用いて、PピクチャまたはBピクチャを復号して、他の成分フレームを生成する。すなわち、復号装置1900は、G1符号化画像データ列2721、G2符号化画像データ列2722、B符号化画像データ列2723、およびR符号化画像データ列2724を復号して、G1画像データ列2711、G2画像データ列2712、B画像データ列2713、およびR画像データ列2714を生成する。
 (D)復号装置1900は、復号された成分フレーム群を合成して、RAW画像データ100を生成する。具体的には、たとえば、G1画像データ111、G2画像データ112、B画像データ113、およびR画像データ114の同一位置の画素G1、G2、B、Rを色配列101に従って並べることで、RAW画像データ100を順次復元し、RAW動画像データ2700を復元する。
 このように、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、成分フレーム間の相関性が高いRAW画像データ100の符号化効率、ひいては、RAW動画像データ2700の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100ひいては、RAW動画像データ2700に復元することができる。
 <成分フレームの参照方向例>
 図28は、成分フレームの参照方向例を示す説明図である。(A)は、RAW動画像データ2700の一例を示す。(B)および(C)は、RAW動画像データ2700における成分フレームの参照方向例を示す。(B)および(C)では、説明上、時系列なRAW画像データ1~n(nは2以上の整数)のうち、RAW画像データ1およびRAW画像データ2における成分フレームの参照方向例を示す。
 (B)は、同一RAW画像データ1,2の各々からの成分フレームの入力順が、G1画像データ111、G2画像データ112、B画像データ113、およびR画像データ114である場合の参照方向を示す。RAW画像データ1およびRAW画像データ2の各々において、先頭のG1画像データ111はIピクチャに符号化される。次に入力されるG2画像データ112は、先行するG1画像データ111を参照フレームとしてフレーム間予測符号化によりPピクチャに符号化される。
 次に入力されるB画像データ113は、先行するG1画像データ111およびG2画像データ112のうち少なくとも一方の成分フレームを参照フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。最後に入力されるR画像データ114は、先行するG1画像データ111、G2画像データ112、およびB画像データ113のうち少なくとも一つの成分フレームを参照フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 (C)では、先頭のRAW画像データ1における参照方向は、(B)のRAW画像データ1と同じである。RAW画像データ2については、先頭のG1画像データ111は、先行するRAW画像データ1のG1画像データ111を参照フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 次に入力されるG2画像データ112は、先行するRAW画像データ1のG1画像データ111およびRAW画像データ2のG1画像データ111のうち少なくとも一方の成分フレームを参照フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 次に入力されるB画像データ113は、先行するRAW画像データ1のB画像データ113と、RAW画像データ2のG1画像データ111と、RAW画像データ2のG2画像データ112と、のうち少なくとも一つの成分フレームを参照フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 最後に入力されるR画像データ114は、先行するRAW画像データ1のR画像データ114と、RAW画像データ2のG1画像データ111と、RAW画像データ2のG2画像データ112と、RAW画像データ2のB画像データ113と、のうち少なくとも一つの成分フレームを参照フレームとしてフレーム間予測符号化によりPピクチャまたはBピクチャに符号化される。
 なお、図28の参照方向は一例であり、(B),(C)以外の成分フレームの入力順でも符号化が可能である。また、この符号化部402は、色成分に依存しない撮像素子353の画素からの輝度値を用いているため、異なる色成分を参照成分フレームとしても符号化することができる。
 <スライス単位の符号化例>
 図29は、スライス単位の符号化例を示す説明図である。(A)は、時系列なRAW画像データ1~4から生成された各成分フレームのスライス単位を示す。スライスとは、成分フレームを分割したデータであり、符号化の1単位となる。ここでは、各成分フレーム(G1画像データ111、G2画像データ112、B画像データ113、R画像データ114)は、同一サイズのスライスをn個(nは2以上の整数)有するものとする。なお、成分フレームの入力順は、図28の(B)を例に挙げるが、他の入力順でもよい。
 (B)は、スライス単位の符号化処理例を示す。矢印が符号化の順序を示す。すなわち、スライス番号が「1」であるG1成分スライス1、G2成分スライス1、B成分スライス1、R成分スライス1の順に符号化され、つぎに、スライス番号が「2」であるG1成分スライス2、G2成分スライス2、B成分スライス2、R成分スライス2の順に符号化される。このように、スライス番号の降順に符号化され、最終的に、スライス番号が「n」であるG1成分スライスn、G2成分スライスn、B成分スライスn、R成分スライスnの順に符号化される。
 このように、スライス単位で成分フレーム間の符号化をおこなうことにより、符号化のレイテンシの向上を図ることができる。なお、同一スライス番号の成分スライス間の参照方向は、図28の(B)のように、G1成分スライスをIピクチャに符号化してもよく、(C)のようにG1成分スライスをPピクチャに符号化してもよい。図29では、スライス単位の符号化例について説明したが、復号する場合もスライス単位の符号化と同様、スライス単位で復号してもよい。これにより、復号のレイテンシの向上を図ることができる。
 このように、実施例3では、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、成分フレーム間の相関性が高いRAW画像データ100の符号化効率、ひいては、RAW動画像データ2700の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100ひいては、RAW動画像データ2700に復元することができる。
 また、スライス単位で成分フレームを符号化することにより、成分フレーム間符号化のレイテンシの向上を図ることができる。同様に、スライス単位で成分フレームを復号することにより、成分フレーム復号のレイテンシの向上を図ることができる。
 実施例4は、RAW画像データ100を時間軸方向に並べたRAW動画像データ2700をホワイトバランス調整してから符号化および復号し、ホワイトバランス逆調整をする例である。なお、実施例4では、実施例1および実施例3との相違点を中心に説明し、実施例1および実施例3と同一構成には同一符号を付し、その説明を省略する。
 <符号化および復号例>
 図30は、実施例4にかかる符号化および復号例を示す説明図である。(E)WB調整、(A)分離および(B)符号化は、符号化装置400によって実行され、(C)復号、(D)合成および(F)WB逆調整は、復号装置1900によって実行される。
 (E)符号化装置400は、RAW動画像データ2700の各RAW画像データ100をホワイトバランス調整する。ホワイトバランス調整は、符号化装置400におけるホワイトバランス(オート、マニュアル、電球、曇天、蛍光灯、晴天日陰、晴天など)により実行される。ホワイトバランス調整されたRAW画像データ100を、WB調整済みRAW画像データ2200とし、時系列なWB調整済みRAW画像データ2200をWB調整済みRAW動画像データ3000とする。
 (A)符号化装置400は、WB調整済みRAW画像データ2200を時間軸方向に並べたWB調整済みRAW動画像データ3000を取得し、各WB調整済みRAW画像データ2200について、色成分ごとに成分フレームを生成する。これにより、WB調整済みG1画像データ列3011、WB調整済みG2画像データ列3012、WB調整済みB画像データ列3013およびWB調整済みR画像データ列3014が得られる。
 (B)符号化装置400は、各色成分フレームを成分フレーム間で符号化する。具体的には、たとえば、符号化装置400は、成分フレーム群の1つをフレーム内予測符号化で符号化してIピクチャを生成し、残余の成分フレーム群をIピクチャを用いてフレーム間予測符号化で符号化してPピクチャまたはBピクチャを生成する。
 ここでは、符号化により、WB調整済みG1画像データ列3011は、WB調整済みG1符号化画像データ列3021となり、WB調整済みG2画像データ列3012は、WB調整済みG2符号化画像データ列3022となり、WB調整済みB画像データ列3013は、WB調整済みB符号化画像データ列3023となり、WB調整済みR画像データ列3014は、WB調整済みR符号化画像データ列3024となる。
 (C)復号装置1900は、符号化された成分フレーム群を復号する。具体的には、たとえば、復号装置1900は、Iピクチャを復号し、Iピクチャから復号された成分フレームを用いて、PピクチャまたはBピクチャを復号して、他の成分フレームを生成する。すなわち、復号装置1900は、WB調整済みG1符号化画像データ列3021、WB調整済みG2符号化画像データ列3022、WB調整済みB符号化画像データ列3023、およびWB調整済みR符号化画像データ列3024を復号して、WB調整済みG1画像データ列3011、WB調整済みG2画像データ列3012、WB調整済みB画像データ列3013、およびWB調整済みR画像データ列3014を生成する。
 (D)復号装置1900は、復号された成分フレーム群を合成して、WB調整済みRAW画像データ2200を生成する。具体的には、たとえば、WB調整済みG1画像データ2211、WB調整済みG2画像データ2212、WB調整済みB画像データ2213、およびWB調整済みR画像データ2214の同一位置の画素G1、G2、B、Rを色配列101に従って並べることで、WB調整済みRAW画像データを順次復元し、WB調整済みRAW動画像データ2700を復元する。
 (F)復号装置1900は、WB逆調整により、WB調整済みRAW画像データ2200ごとに元のRAW画像データ100に変換し、RAW動画像データ2700に復元する。
 このように、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、成分フレーム間の相関性が高いWB調整済みRAW画像データ2200の符号化効率、ひいては、WB調整済みRAW動画像データ3000の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のWB調整済みRAW画像データ2200ひいては、WB調整済みRAW動画像データ3000に復元することができる。
 また、実施例3と同様、WB調整済みRAW動画像データ3000についてスライス単位で成分フレームを符号化することにより、成分フレーム間符号化のレイテンシの向上を図ることができる。同様に、WB調整済みG1符号化画像データ列3021、WB調整済みG2符号化画像データ列3022、WB調整済みB符号化画像データ列3023、およびWB調整済みR符号化画像データ列3024について、スライス単位で成分フレームを復号することにより、成分フレーム復号のレイテンシの向上を図ることができる。
 以上説明したように、本実施例によれば、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、成分フレーム間の相関性が高いRAW画像データ100の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100に復元することができる。
100 RAW画像データ、101 色配列、111 G1画像データ、112 G2画像データ、113 B画像データ、114 R画像データ、121 G1符号化画像データ、122 G2符号化画像データ、123 B符号化画像データ、124 R符号化画像データ、300 情報処理装置、301 プロセッサ、302 記憶デバイス、353 撮像素子、400 符号化装置、401 第1生成部、402 符号化部、403 記録部、610 位置ずれ検出部、611 第1画素位置補償部、1700 符号化成分フレーム、1701 ヘッダ情報、1711 画像形式情報、1712 制御情報、1900 復号装置、1901 取得部、1902 復号部、1903 第2生成部、2006 第2画素位置補償部、2200 WB調整済みRAW画像データ、2301 ホワイトバランス調整部、2504 ホワイトバランス逆調整部、2700 RAW動画像データ、3000 WB調整済みRAW動画像データ

Claims (24)

  1.  第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置されたRAW画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成部と、
     前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、
     を有する符号化装置。
  2.  請求項1に記載の符号化装置であって、
     前記符号化部は、前記第1画像データと前記第2画像データとの間で画素位置を補償することにより、前記第2画像データを符号化する、符号化装置。
  3.  請求項2に記載の符号化装置であって、
     前記符号化部は、前記第2画像データの注目画素を、前記注目画素とは異なる位置における前記第1画像データ内の特定の参照画素で補償することにより、前記第2画像データを符号化する、符号化装置。
  4.  請求項3に記載の符号化装置であって、
     前記符号化部は、前記特定の参照画素による複数通りの参照パターンのうち、前記注目画素との差分が最小となる参照パターンに基づいて、前記注目画素を符号化する、符号化装置。
  5.  請求項1に記載の符号化装置であって、
     前記RAW画像データは、前記第1色成分および前記第2色成分のうちいずれか一方の色成分と同一、または、前記第1色成分および前記第2色成分とは異なる、第3色成分を有し、
     前記生成部は、前記第3色成分が配置された前記RAW画像データから、前記第1画像データと、前記第2画像データと、前記第3色成分の画素群により構成される第3画像データと、を生成し、
     前記符号化部は、前記第1画像データに基づいて、前記生成部によって生成された第3画像データを符号化する、符号化装置。
  6.  請求項5に記載の符号化装置であって、
     前記符号化部は、前記第1画像データおよび前記第2画像データに基づいて、前記第3画像データを符号化する、符号化装置。
  7.  請求項1に記載の符号化装置であって、
     前記RAW画像データのホワイトバランスを調整する調整部を有し、
     前記生成部は、前記調整部によってホワイトバランスが調整されたRAW画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する、符号化装置。
  8.  請求項1に記載の符号化装置であって、
     前記生成部は、前記RAW画像データを複数取得し、前記RAW画像データの各々について、前記第1画像データと、前記第2画像データと、を生成し、
     前記符号化部は、前記第1画像データに基づいて、前記第2画像データを符号化する、符号化装置。
  9.  請求項8に記載の符号化装置であって、
     前記符号化部は、前記第1画像データに基づいて、前記第1画像データと同一のRAW画像データから分離された第2画像データを符号化する、符号化装置。
  10.  請求項8に記載の符号化装置であって、
     前記符号化部は、前記第1画像データに基づいて、前記第1画像データと異なる他のRAW画像データから分離された第2画像データを符号化する、符号化装置。
  11.  請求項10に記載の符号化装置であって、
     前記符号化部は、前記第1画像データの所定領域に基づいて、前記第1画像データと異なるRAW画像データから生成された第2画像データのうち前記所定領域に対応する領域を符号化する、符号化装置。
  12.  第1色成分の光を光電変換する光電変換部と前記第1色成分とは異なる第2色成分を光電変換する光電変換部とが繰り返し配置された撮像素子からの出力に基づくRAW画像データから、前記第1色成分により構成される第1画像データと、前記第2色成分により構成される第2画像データと、を生成する生成部と、
     前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、
     を有する符号化装置。
  13.  第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第1色成分とは異なる第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、を取得する取得部と、
     前記取得部によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得部によって取得された第2符号化画像データを前記第2画像データに復号する復号部と、
     前記復号部によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置されたRAW画像データを生成する生成部と、
     を有する復号装置。
  14.  請求項13に記載の復号装置であって、
     前記復号部は、前記第2画像データの注目画素の符号化の際に参照した画素位置を示す参照パターンに基づいて、前記第1画像データの参照画素を特定し、前記参照画素に基づいて、前記第2符号化画像データから前記第2画像データの注目画素を復号する、復号装置。
  15.  請求項13に記載の復号装置であって、
     前記取得部は、第3色成分の画素群により構成される第3画像データを、前記第1画像データに基づいて符号化した第3符号化画像データを取得し、
     前記第3色成分は、前記第1色成分および前記第2色成分のうちいずれか一方の色成分と同一、または、前記第1色成分および前記第2色成分とは異なる色成分であり、
     前記復号部は、前記第1画像データに基づいて、前記第3符号化画像データを前記第3画像データに復号し、
     前記生成部は、前記復号部によって復号された第1画像データ、第2画像データ、および第3画像データに基づいて、前記第1色成分、前記第2色成分、および前記第3色成分が繰り返し配置されたRAW画像データを生成する、復号装置。
  16.  請求項13に記載の復号装置であって、
     前記取得部は、前記第1画像データおよび前記第2画像データに施されたホワイトバランスに関する情報を取得し、
     前記ホワイトバランスに関する情報に基づいて、前記第1画像データおよび前記第2画像データの色をホワイトバランスによる調整前の色に変換する逆調整部を有し、
     前記生成部は、前記逆調整部による変換後の第1画像データおよび変換後の第2画像データに基づいて、前記RAW画像データを生成する、復号装置。
  17.  請求項13に記載の復号装置であって、
     前記取得部は、前記第1符号化画像データおよび前記第2符号化画像データを含む符号化フレームを複数取得し、
     前記復号部は、前記符号化フレームごとに、前記第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記第2符号化画像データを前記第2画像データに復号して、前記第1画像データおよび前記第2画像データを含むフレームを複数出力し、
     前記生成部は、前記フレームごとに、前記復号部によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置されたRAW画像データを生成する、復号装置。
  18.  請求項17に記載の復号装置であって、
     前記復号部は、前記第1画像データに基づいて、前記第1符号化画像データと同一の符号化フレーム内の第2符号化画像データを復号する、復号装置。
  19.  請求項17に記載の復号装置であって、
     前記復号部は、前記第1画像データに基づいて、前記第1符号化画像データと異なる符号化フレーム内の第2符号化画像データを復号する、復号装置。
  20.  請求項19に記載の復号装置であって、
     前記復号部は、前記第1画像データの所定領域に基づいて、前記第1画像データと異なる符号化フレーム内の第2符号化画像データのうち前記所定領域に対応する領域を復号する、復号装置。
  21.  第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置されたRAW画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成処理と、
     前記生成処理によって生成された第1画像データに基づいて、前記生成処理によって生成された第2画像データを符号化する符号化処理と、
     を有する符号化方法。
  22.  第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第1色成分とは異なる第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、を取得する取得処理と、
     前記取得処理によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得処理によって取得された第2符号化画像データを前記第2画像データに復号する復号処理と、
     前記復号処理によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置されたRAW画像データを生成する生成処理と、
     を有する復号方法。
  23.  請求項21に記載の符号化方法をプロセッサに実行させる符号化プログラム。
  24.  請求項22に記載の復号方法をプロセッサに実行させる復号プログラム。
     
PCT/JP2019/001083 2018-01-16 2019-01-16 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム WO2019142821A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP19741876.7A EP3742732A4 (en) 2018-01-16 2019-01-16 ENCODER, DECODER, ENCODING PROCESS, DECODING PROCESS, ENCODING PROGRAM AND DECODING PROGRAM
JP2019566483A JPWO2019142821A1 (ja) 2018-01-16 2019-01-16 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
US16/962,571 US20210014530A1 (en) 2018-01-16 2019-01-16 Encoder, decoder, encoding method, decoding method, and recording medium
CN201980019808.5A CN111869213A (zh) 2018-01-16 2019-01-16 编码装置、解码装置、编码方法、解码方法、编码程序及解码程序

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-005211 2018-01-16
JP2018005211 2018-01-16

Publications (1)

Publication Number Publication Date
WO2019142821A1 true WO2019142821A1 (ja) 2019-07-25

Family

ID=67301043

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/001083 WO2019142821A1 (ja) 2018-01-16 2019-01-16 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム

Country Status (5)

Country Link
US (1) US20210014530A1 (ja)
EP (1) EP3742732A4 (ja)
JP (1) JPWO2019142821A1 (ja)
CN (1) CN111869213A (ja)
WO (1) WO2019142821A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112135150A (zh) * 2020-09-24 2020-12-25 安谋科技(中国)有限公司 图像压缩和解压缩方法、可读介质及其电子设备
WO2022044839A1 (ja) * 2020-08-25 2022-03-03 ソニーセミコンダクタソリューションズ株式会社 撮像装置、および画像処理システム

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210104462A (ko) * 2020-02-17 2021-08-25 삼성전자주식회사 이미지 센서, 이미지 센서의 교정 방법, 그리고 이미지 센서를 교정하는 전자 장치
KR20210147694A (ko) * 2020-05-29 2021-12-07 삼성전자주식회사 이미지 신호 프로세서, 이미지 프로세싱 방법 및 그 전자 장치
CN113347437B (zh) * 2021-04-15 2022-09-06 浙江大华技术股份有限公司 一种基于串预测的编码方法、编码器、解码器和存储介质
DE112022003392T5 (de) * 2021-07-05 2024-04-18 Sony Semiconductor Solutions Corporation Bildverarbeitungsvorrichtung und -verfahren
JPWO2023286317A1 (ja) * 2021-07-12 2023-01-19
CN114189689B (zh) * 2021-11-25 2024-02-02 广州思德医疗科技有限公司 图像压缩处理方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002125241A (ja) 2001-08-02 2002-04-26 Konica Corp スチルビデオカメラ
JP2014143488A (ja) * 2013-01-22 2014-08-07 Nikon Corp 画像圧縮装置、画像復号装置およびプログラム
JP2017085556A (ja) * 2015-10-30 2017-05-18 キヤノン株式会社 画像処理装置、撮像装置、画像処理方法及びプログラム
JP2017200199A (ja) * 2017-06-01 2017-11-02 株式会社ニコン 動画像圧縮装置、動画像復号装置およびプログラム
JP2018005211A (ja) 2015-12-01 2018-01-11 孝郎 林 腕装着型撮影機能付装置、姿勢変換装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6744929B1 (en) * 1999-11-18 2004-06-01 Nikon Corporation Image data compression method image data compression apparatus and recording medium and data signal for providing image data compression program
JP4451181B2 (ja) * 2004-03-26 2010-04-14 オリンパス株式会社 画像圧縮方法及び画像圧縮装置
JP2010147508A (ja) * 2007-04-13 2010-07-01 Panasonic Corp 撮影装置及び再生装置
JPWO2009051010A1 (ja) * 2007-10-15 2011-03-03 三菱電機株式会社 画像符号化装置、画像復号装置、画像符号化方法、および画像復号方法
CN108650515A (zh) * 2012-07-09 2018-10-12 株式会社尼康 解码装置及图像压缩装置
US10863158B2 (en) * 2016-05-17 2020-12-08 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002125241A (ja) 2001-08-02 2002-04-26 Konica Corp スチルビデオカメラ
JP2014143488A (ja) * 2013-01-22 2014-08-07 Nikon Corp 画像圧縮装置、画像復号装置およびプログラム
JP2017085556A (ja) * 2015-10-30 2017-05-18 キヤノン株式会社 画像処理装置、撮像装置、画像処理方法及びプログラム
JP2018005211A (ja) 2015-12-01 2018-01-11 孝郎 林 腕装着型撮影機能付装置、姿勢変換装置
JP2017200199A (ja) * 2017-06-01 2017-11-02 株式会社ニコン 動画像圧縮装置、動画像復号装置およびプログラム

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KING-HONG CHUNG ET AL.: "A LOSSLESS COMPRESSION SCHEME FO] BAYER CFA IMAGES", 2007 15TH EUROPEAN SIGNAL PROCESSING CONFERENCE, 7 September 2007 (2007-09-07), pages 649 - 652, XP032773084, ISBN: 978-839-2134-04-6 *
KING-HONG CHUNG ET AL.: "A Lossless Compression Scheme for Bayer Color Filter Array Images", IEEE TRANSACTIONS ON IMAGE PROCESSING, vol. 17, no. 2, 14 January 2008 (2008-01-14), pages 134 - 144, XP011224429, doi:10.1109/TIP.2007.914153 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022044839A1 (ja) * 2020-08-25 2022-03-03 ソニーセミコンダクタソリューションズ株式会社 撮像装置、および画像処理システム
CN112135150A (zh) * 2020-09-24 2020-12-25 安谋科技(中国)有限公司 图像压缩和解压缩方法、可读介质及其电子设备

Also Published As

Publication number Publication date
CN111869213A (zh) 2020-10-30
EP3742732A4 (en) 2021-12-15
EP3742732A1 (en) 2020-11-25
US20210014530A1 (en) 2021-01-14
JPWO2019142821A1 (ja) 2021-01-28

Similar Documents

Publication Publication Date Title
WO2019142821A1 (ja) 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
KR101963097B1 (ko) 화상 처리 장치 및 화상 처리 방법
TWI514892B (zh) Image processing apparatus and image processing method
WO2014010224A1 (ja) 動画像圧縮装置、動画像復号装置、画像圧縮装置、画像復号装置、撮像装置およびプログラム
WO2009139123A1 (ja) 画像処理装置およびそれを搭載した撮像装置
KR101046012B1 (ko) 동화상 처리 장치 및 동화상 처리 방법, 동화상 처리 프로그램을 기록한 컴퓨터로 판독가능한 기록매체
US8224105B2 (en) Method for coding image, image coding device and image pickup system
WO2016171006A1 (ja) 符号化装置および符号化方法、並びに、復号装置および復号方法
WO2011010431A1 (ja) 画像処理装置、画像処理方法および撮像装置
JP5974691B2 (ja) 動画像圧縮装置、撮像装置およびプログラム
WO2020188875A1 (ja) 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
JP6152642B2 (ja) 動画像圧縮装置、動画像復号装置およびプログラム
JP2018032909A (ja) 画像符号化装置及びその制御方法及び撮像装置及びプログラム
JP2019022225A (ja) 画像圧縮装置およびプログラム
JP6890993B2 (ja) 画像符号化装置、画像復号化装置、その制御方法、および制御プログラム
JPWO2019142836A1 (ja) 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
JP2017200199A (ja) 動画像圧縮装置、動画像復号装置およびプログラム
JP2018191136A (ja) 符号化装置、符号化方法およびプログラム
JP5974692B2 (ja) 動画像復号装置およびプログラム
JP5924262B2 (ja) 画像処理装置および画像処理プログラム
JP2014143488A (ja) 画像圧縮装置、画像復号装置およびプログラム
WO2016047250A1 (ja) 信号処理装置、撮像装置および信号処理方法
JP2019036992A (ja) 圧縮装置、復号装置およびプログラム
JP2020088467A (ja) 符号化装置、復号化装置、符号化方法、復号化方法、符号化プログラム及び復号化プログラム
JP2023070055A (ja) 画像符号化装置及びその制御方法及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19741876

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019566483

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019741876

Country of ref document: EP

Effective date: 20200817