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

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

Info

Publication number
WO2020188875A1
WO2020188875A1 PCT/JP2019/043343 JP2019043343W WO2020188875A1 WO 2020188875 A1 WO2020188875 A1 WO 2020188875A1 JP 2019043343 W JP2019043343 W JP 2019043343W WO 2020188875 A1 WO2020188875 A1 WO 2020188875A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
pixel
color component
coefficient
component
Prior art date
Application number
PCT/JP2019/043343
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 株式会社ニコン
Publication of WO2020188875A1 publication Critical patent/WO2020188875A1/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/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Definitions

  • the present invention relates to a coding device, a decoding device, a coding method, a decoding method, a coding program, and a decoding program.
  • the coding apparatus of the present disclosure technology has a first coefficient that adjusts the pixel value of at least the second color component of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • the adjustment unit that adjusts the pixel value of the second color component by the second coefficient calculated using the above, the image data whose pixel value is adjusted by the adjustment unit, the first coefficient, and the second coefficient. It has a coding unit that encodes and.
  • the other coding apparatus of the present disclosure technique adjusts the pixel value of at least the second color component in the image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • the adjustment unit that adjusts the pixel value of at least the second color component and the image data whose pixel value of at least the second color component is adjusted by the adjustment unit are encoded and the coding is performed. It has a coding unit for imparting the first coefficient to the image data.
  • Another coding device of the present disclosure technology outputs the first output bit width of each pixel of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged. From the adjustment unit that changes to the second output bit width larger than the bit width and adjusts the white balance of the image data after the change, and the image data whose white balance is adjusted by the adjustment unit, the first color component Based on the generation unit that generates the first image data composed of the pixel group and the second image data composed of the pixel group of the second color component, and the first image data generated by the generation unit. It also has a coding unit that encodes the second image data generated by the generation unit.
  • the decoding device of the present disclosure technology sets a first coefficient for adjusting the pixel value of at least the second color component of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged. Adjusted image data in which the pixel values of the second color component are adjusted by the second coefficient calculated using the second coefficient, and encoded data in which the first coefficient and the second coefficient are encoded.
  • the acquisition unit to be acquired, the decoding unit that decodes the coded data acquired by the acquisition unit, and the adjusted image data decoded by the decoding unit are based on the second coefficient decoded by the decoding unit. It has an adjusting unit for adjusting.
  • Another decoding device of the present disclosure technique adjusts the pixel value of at least the second color component of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • the coded adjusted image data in which the adjusted image data in which the pixel value of at least the second color component is adjusted using the coefficient is encoded, and the first coefficient given to the coded adjusted image data.
  • the coded and adjusted image data of the acquisition unit that acquires the coded data including, the decoding unit that decodes the coded data acquired by the acquisition unit, and the adjusted image data decoded by the decoding unit. It has an adjusting unit for adjusting based on the first coefficient given to the data.
  • Another decoding device of the present disclosure technology is a decoding device that restores image data in which a first color component and a second color component different from the first color component are repeatedly arranged, and is a decoding device of the first color component.
  • the first coded image data obtained by encoding the first image data composed of the pixel group and the second image data composed of the pixel group of the second color component were encoded based on the first image data.
  • the acquisition unit to be acquired and the first coded image data acquired by the acquisition unit are decoded into the first image data, and the second coding acquired by the acquisition unit based on the first image data.
  • the first color component and the second color component are repeatedly arranged based on the decoding unit that decodes the image data into the second image data and the first image data and the second image data decoded by the decoding unit.
  • the generation unit that generates the generated image data the information about the white balance, and the specific output bit width, the color of the image data generated by the generation unit is changed to the color before adjustment by the white balance. It has an adjusting unit to be converted.
  • the coding method of the present disclosure technique is a first coefficient that adjusts the pixel value of at least the second color component of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • Another coding method of the present disclosure technique adjusts the pixel value of at least the second color component in the image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • the adjustment process for adjusting the pixel value of at least the second color component using one coefficient, and the image data for which the pixel value of at least the second color component has been adjusted by the adjustment process are encoded and the coding is performed. It has a coding process for imparting the first coefficient to the image data.
  • Another coding method of the present disclosure technique is to output the first output bit width of each pixel of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged. From the adjustment process of changing to the second output bit width larger than the bit width and adjusting the white balance of the image data after the change, and the image data whose white balance is adjusted by the adjustment process, the first color component Based on the generation process for generating the first image data composed of the pixel group and the second image data composed of the pixel group of the second color component, and the first image data generated by the generation process. It also has a coding process for encoding the second image data generated by the generation unit.
  • a first coefficient for adjusting the pixel value of at least the second color component of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged is set. Adjusted image data in which the pixel values of the second color component are adjusted by the second coefficient calculated using the second coefficient, and encoded data in which the first coefficient and the second coefficient are encoded.
  • the acquisition process to be acquired, the decoding process to decode the coded data acquired by the acquisition process, and the adjusted image data decoded by the decoding process are based on the second coefficient decoded by the decoding process. It has an adjustment process for adjusting.
  • Another decoding method of the present disclosure technique is a first method of adjusting the pixel value of at least the second color component of the image data in which the first color component and the second color component different from the first color component are repeatedly arranged.
  • the coded adjusted image data in which the adjusted image data in which the pixel value of at least the second color component is adjusted using the coefficient is encoded, and the first coefficient given to the coded adjusted image data.
  • the acquisition process for acquiring the coded data including, the decoding process for decoding the coded data acquired by the acquisition process, and the adjusted image data decoded by the decoding process are combined with the coded and adjusted image data. It has an adjustment process for adjusting based on the first coefficient given to the data.
  • Another decoding method of the present disclosure technique is a decoding method for restoring image data in which a first color component and a second color component different from the first color component are repeatedly arranged, and is a decoding method of the first color component.
  • the first coded image data obtained by encoding the first image data composed of the pixel group and the second image data composed of the pixel group of the second color component were encoded based on the first image data.
  • the acquisition process to be acquired and the first coded image data acquired by the acquisition process are decoded into the first image data, and the second encoding acquired by the acquisition process based on the first image data.
  • the first color component and the second color component are repeatedly arranged based on the decoding process of decoding the image data into the second image data and the first image data and the second image data decoded by the decoding process.
  • the color of the image data generated by the generation unit is changed to the color before adjustment by the white balance. It has an adjustment process to convert.
  • FIG. 1 is an explanatory diagram showing an example of coding and decoding according to the first embodiment.
  • FIG. 2 is an explanatory diagram showing an example of the color arrangement shown in FIG.
  • FIG. 3 is a block diagram showing a hardware configuration example of the information processing device.
  • FIG. 4 is a block diagram showing a functional configuration example of the coding apparatus according to the first embodiment.
  • FIG. 5 is an explanatory diagram showing an example of generating a component frame by the first generation unit.
  • FIG. 6 is a block diagram showing a configuration example of the coding unit.
  • FIG. 7 is an explanatory diagram showing an example of a reference direction of the component frame.
  • FIG. 8 is an explanatory diagram showing an example of detecting a motion vector.
  • FIG. 1 is an explanatory diagram showing an example of coding and decoding according to the first embodiment.
  • FIG. 2 is an explanatory diagram showing an example of the color arrangement shown in FIG.
  • FIG. 3 is a block diagram showing a hardware configuration example of
  • FIG. 9 is an explanatory diagram showing a pixel position compensation prediction example 1 between component frames.
  • FIG. 10 is an explanatory diagram showing a pixel position compensation prediction example 2 between component frames.
  • FIG. 11 is an explanatory diagram showing a pixel position compensation prediction example 3 between component frames.
  • FIG. 12 is an explanatory diagram showing a pixel position compensation prediction example 4 between component frames.
  • FIG. 13 is an explanatory diagram showing a pixel position compensation prediction example 5 between component frames.
  • FIG. 14 is an explanatory diagram showing a pixel position compensation prediction example 6 between component frames.
  • FIG. 15 is an explanatory diagram showing a pixel position compensation prediction example 7 between component frames.
  • FIG. 16 is an explanatory diagram showing a pixel position compensation prediction example 4 between component frames.
  • FIG. 17 is an explanatory diagram showing an example of a data structure of a coded component frame.
  • FIG. 18 is a flowchart showing an example of a coding processing procedure by a coding device.
  • FIG. 19 is a block diagram showing a functional configuration example of the decoding device.
  • FIG. 20 is a block diagram showing a configuration example of the decoding unit.
  • FIG. 21 is a flowchart showing an example of a decoding processing procedure by the decoding device.
  • FIG. 22 is an explanatory diagram showing a coding and decoding example according to the second embodiment.
  • FIG. 23 is a block diagram showing a functional configuration example of the coding apparatus according to the second embodiment.
  • FIG. 24 is a flowchart showing an example of a coding processing procedure by the coding apparatus according to the second embodiment.
  • FIG. 25 is a block diagram showing a functional configuration example of the decoding device according to the second embodiment.
  • FIG. 26 is a flowchart showing an example of a decoding processing procedure by the decoding apparatus according to the second embodiment.
  • FIG. 27 is an explanatory diagram showing a coding and decoding example according to the third embodiment.
  • FIG. 28 is an explanatory diagram showing an example of a reference direction of the component frame.
  • FIG. 29 is an explanatory diagram showing an example of coding in slice units.
  • FIG. 30 is an explanatory diagram showing a coding and decoding example according to the fourth embodiment.
  • FIG. 31 is an explanatory diagram showing an example of a data structure common to the B-coded image data and the R-coded image data.
  • FIG. 32 is a flowchart showing an example of a procedure for generating white balance control information in the header information by the coding unit.
  • FIG. 33 is a flowchart showing a detailed processing procedure example of the white balance reverse adjustment processing.
  • FIG. 34 is an explanatory diagram showing an example of WB adjustment and WB reverse adjustment according to the sixth embodiment.
  • FIG. 35 is an explanatory diagram showing a process example 1 of white balance adjustment according to the sixth embodiment.
  • FIG. 36 is an explanatory diagram showing a processing example 2 of the white balance adjustment according to the sixth embodiment.
  • FIG. 37 is a block diagram showing a functional configuration example of the coding apparatus according to the sixth embodiment.
  • FIG. 38 is a block diagram showing a functional configuration example of the decoding device according to the sixth embodiment.
  • the image data to be encoded in each embodiment is RAW image data.
  • the RAW image data is, for example, image data before processing that is output as a result of photoelectric conversion in an image pickup device equipped with a color filter of a bayer arrangement, and is color interpolation processing or compression processing (for example, in the case of a still image, if it is a still image).
  • the image data is not in JPEG (Joint Photographic Experts Group) format, or in the case of moving images, MPEG (Moving Picture Experts Group) format).
  • JPEG Joint Photographic Experts Group
  • MPEG Motion Picture Experts Group
  • the white balance adjustment may be made into RAW image data.
  • FIG. 1 is an explanatory diagram showing an example of coding and decoding according to the first embodiment.
  • (A) Separation and (B) coding are performed by the encoder, and (C) decoding and (D) synthesis are performed by the decoding device.
  • the RAW image data 100 is image data in which color arrays 101 having a plurality of color components are 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.
  • Other examples of the color array 101 will be described later in FIG.
  • the encoding device generates a component frame for each color component from the RAW image data 100.
  • the encoding device includes G1 image data 111 which is a green (G1) color component frame, G2 image data 112 which is a green (G2) color component frame, and blue (B) color component frame.
  • G1 image data 111 which is a green (G1) color component frame
  • G2 image data 112 which is a green (G2) color component frame
  • blue (B) color component frame B image data 113 and R image data 114 which is a red (R) color component frame are generated.
  • the G1 image data 111 is image data composed of G1 pixel groups from each of the color arrays 101 in the RAW image data 100.
  • the G2 image data 112 is image data composed of 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 coding device encodes each color component frame between the component frames. Specifically, for example, the coding apparatus encodes one of the component frame groups by in-frame predictive coding to generate an I picture, and encodes the remaining component frame groups by inter-frame predictive coding to P. Generate a picture or B picture.
  • the G1 image data 111 becomes the G1 coded image data 121
  • the G2 image data 112 becomes the G2 coded image data 122
  • the B image data 113 becomes the B coded image data 123
  • R The image data 114 becomes R-encoded image data 124.
  • the decoding device decodes the encoded component frame group. Specifically, for example, the decoding device decodes the I picture, and then sequentially decodes the subsequent P picture or B picture to generate another component frame. That is, the decoding device decodes the G1 coded image data 121, the G2 coded image data 122, the B coded image data 123, and the R coded image data 124, and decodes the G1 coded image data 111, the G2 image data 112, and B. Image data 113 and R image data 114 are generated.
  • the decoding device synthesizes the decoded component frames to generate RAW image data 100.
  • the RAW image is obtained by arranging the pixels G1, G2, B, and R at the same positions of the G1 image data 111, the G2 image data 112, the B image data 113, and the R image data 114 according to the color array 101. Restore data 100.
  • FIG. 2 is an explanatory diagram 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 the color array 201 in which the positions of the B pixel and the R pixel are exchanged in (a).
  • C) shows a color array 202 in which the left half pixel sequence (G1, R) and the right half pixel sequence (B, G2) are interchanged in (a).
  • D) shows a color array 203 in which the left half pixel sequence (G1, B) and the right half pixel sequence (R, G2) are interchanged in (b).
  • E) shows an example of the color array 204 of 6 ⁇ 6 pixels.
  • green pixels are included in the pixel array 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 used as an example of the color array.
  • FIG. 3 is a block diagram showing a hardware configuration example of the information processing device.
  • the information processing device 300 is a device including one or both of a coding 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, or may be a personal computer, a tablet, a smartphone, or a game machine.
  • the information processing device 300 includes a processor 301, a storage device 302, an operation device 303, an LSI (Large Scale Integration) 304, an image pickup unit 305, and a communication IF (Interface) 306. These are connected by bus 308.
  • the processor 301 controls the information processing device 300.
  • the storage device 302 serves as a work area for the processor 301.
  • the storage device 302 is a non-temporary or temporary recording medium that stores various programs and data. Examples of the storage device 302 include a ROM (Read Only Memory), a RAM (Random Access Memory), an HDD (Hard Disk Drive), and a flash memory.
  • the operation device 303 manipulates the data.
  • the operation device 303 includes, for example, a button, a switch, and a touch panel.
  • the LSI 304 is an integrated circuit that executes specific processing such as image processing such as color interpolation, white balance adjustment, contour enhancement, gamma correction, and gradation conversion, coding processing, decoding processing, and compression / decompression processing.
  • the imaging unit 305 captures the subject and generates RAW image data.
  • the image pickup unit 305 includes an image pickup optical system 351, an image pickup element 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.
  • FIG. 3 shows the imaging optical system 351 with a single lens.
  • the image sensor 353 is a device that images (photographs) an image of a subject by a luminous flux that has passed through the image pickup optical system 351.
  • the image sensor 353 may be a sequential scanning type solid-state image sensor (for example, a CCD (Charge Coupled Device) image sensor) or an XY address type solid-state image sensor (for example, a CMOS (Complementary Metal Oxide Semiconductor) image sensor). It may be.
  • Pixels having a photoelectric conversion unit are arranged in a matrix on the light receiving surface of the image sensor 353. Then, in each pixel of the image sensor 353, a plurality of types of color filters 352 that transmit light having different color components are arranged according to a predetermined color arrangement 101. Therefore, each pixel of the image sensor 353 outputs an electric signal corresponding to each color component by color separation by 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.
  • the pixels of G and B are alternately arranged in the odd-numbered rows of the color array 101 of the image sensor 353, and the pixels of R and G are alternately arranged in the even-numbered rows of the color array 101.
  • the green pixels are arranged so as to form a checkered pattern in the entire color array 101.
  • the image sensor 353 can acquire a color image at the time of shooting.
  • the signal processing circuit 354 performs analog signal processing (correlation double sampling, black level correction, etc.), A / D conversion processing, and digital signal processing (defect pixel correction, etc.) for the image signal input from the image sensor 353. ) And are executed in sequence.
  • the 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 connects to an external device via a network and transmits / receives data.
  • FIG. 4 is a block diagram showing a functional configuration example of the coding apparatus according to the first embodiment.
  • the coding device 400 includes a first generation unit 401, a coding 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 coding unit 402 encodes the component frame
  • the recording unit 403 records the coded component frame in the storage device 302. .
  • the coding device 400 may transmit the coding component frame recorded in the storage device 302 to the decoding device 1900 described later.
  • the first generation unit 401, the encoding unit 402, and the recording unit 403 are functions realized by, for example, causing the processor 301 to execute a program stored in the storage device 302, or by the LSI 304. is there.
  • the first generation unit 401 uses the 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 composed of the pixel group of the first color component. , The second image data composed of the pixel group of the second color component is generated.
  • the first generation unit 401 includes a pixel having a photoelectric conversion unit that photoelectrically converts the 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.
  • the RAW image data 100 may be image data directly output from the image sensor 353, or may be duplicated RAW image data 100.
  • the color array 101 has three types and 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) constituting 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). ), Green (G2), and Red (R), and if the first color component is red (R), then green (G1), green (G2), and blue (B) It is one of the inside.
  • the first image data is G1 image data 111 if the first color component is green (G1), G2 image data 112 if the first color component is green (G2), and the first color component is blue. If (B), it is B image data 113, and if the first color component is red (R), it is R image data 114.
  • the second image data is B image data 113 or R image data 114 if the first image data is G1 image data 111 or G2 image data 112, and the first image data is B image data 113. If there is, 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 B image data 113.
  • the RAW image data 100 has a third color component that is the same as one of the first color component and the second color component, or different from the first color component and the second color component.
  • the third color component is the same color component as the first color component green (G1). It becomes a certain green (G2) or red (R) 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 blue (B)
  • the third color component is green (G1) which is the same color component as the first color component green (G2).
  • red (R) which is a color component different from the first color component and the second color component.
  • the third color component is green (G1), which is the same color component as the first color component green (G1). 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)
  • the third color component is green (G1) which is the same color component as the first color component green (G2).
  • Or 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, the third image data is G1 image data 111 or R image data 114 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 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. Further, the third image data is G1 image data 111 or B image data 113 if the first image data is G2 image data 112 and the second image data is R image data 114.
  • the fourth color component becomes a residual color component
  • the first generation unit 401 generates the fourth image data of the residual color component from the pixel group of the residual color component in the RAW image data 100.
  • FIG. 5 is an explanatory diagram showing an example of generating a component frame by the first generation unit 401.
  • (A) is the RAW image data 100 to be encoded.
  • (B) to (e) indicate component frames generated by rearranging the color components of the RAW image data 100.
  • 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. Image data 114.
  • the first generation unit 401 rearranges the G1 pixel, B pixel, R pixel, and G2 pixel separated from the RAW image data 100 according to the position of the color array 101 by executing the separation (A) in FIG. .. As a result, 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.
  • the G1 image data 111, the G2 image data 112, the B image data 113, and the R image data 114 each have an image size (V / 2 ⁇ H / 2) of 1/4 of the RAW image data 100.
  • the coding 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 coding unit 402 encodes the second image data by compensating for the pixel position between the first image data and the second image data.
  • compensation for pixel position means compensating the pixel of interest in the second image data with a specific reference pixel in the first image data at a position different from the pixel of interest.
  • the 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 placed at the same pixel position. However, the pattern shifts between the component frames due to the difference in the pixel positions in the color array 101. Therefore, the coding unit 402 will perform pixel position compensation between the 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 normal coding processing. Become.
  • the coding unit 402 executes intra-frame prediction coding for 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 and B image data). Predictive coding between frames is performed on 113, 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 and B image data.
  • Predictive coding between frames is performed on 113, R image data 114) to generate a P picture or a B picture.
  • the I picture is coded image data obtained by coding that is completed only within the component frame.
  • the P picture is coded image data obtained by predictive coding between component frames using a maximum of one reference component frame.
  • the B picture is coded image data obtained by predictive coding between component frames using a maximum of two reference component frames.
  • FIG. 6 is a block diagram showing a configuration example of the coding unit 402.
  • the coding unit 402 includes a first storage unit 601, a subtraction unit 602, an orthogonal conversion unit 603, a quantization unit 604, a variable length coding unit 605, an inverse quantization unit 606, and an inverse orthogonal conversion unit 607. It also has an addition unit 608, a second storage unit 609, a misalignment detection unit 610, and a first pixel position compensation unit 611.
  • the first storage unit 601 stores 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 stored in the first storage unit 601 are output to the subtraction unit 602 in the order of input as image data to be encoded.
  • the encoded image data is sequentially erased from the first storage unit 601.
  • the subtraction unit 602 When the subtraction unit 602 generates the P picture or the B picture, the subtraction unit 602 sets a difference signal (prediction error value) between the input original image component frame and the later-described predicted value generated by the first pixel position compensation unit 611. Output. Further, when the subtraction unit 602 generates the I picture, the subtraction unit 602 outputs the input component frame of the original image as it is.
  • the orthogonal conversion unit 603 When generating an I picture, the orthogonal conversion unit 603 performs orthogonal conversion on the component frame of the original image input through the subtraction unit 602. Further, when the orthogonal conversion unit 603 generates a P picture or a B picture, the orthogonal conversion unit 603 performs orthogonal conversion on the above-mentioned difference signal.
  • the quantization unit 604 converts the frequency coefficient (orthogonal conversion coefficient) in block units input from the orthogonal conversion unit 603 into a quantization coefficient.
  • the output of the quantization unit 604 is input to the variable length coding unit 605 and the inverse quantization unit 606, respectively.
  • variable-length coding unit 605 encodes the quantization coefficient and the motion vector related to the position shift from the position shift detection unit 610 (hereinafter, simply “motion vector”) in a variable length, and encodes the coding component frame (I picture, P picture). , B picture) is output.
  • the dequantization unit 606 dequantizes the quantization coefficient in block units, which is the unit of coding, and decodes the frequency coefficient.
  • the inverse orthogonal conversion unit 607 decodes the prediction error value (or the component frame of the original image) by inversely orthogonalizing the frequency coefficient decoded by the inverse quantization unit 606.
  • the addition unit 608 adds the decoded prediction error value and the prediction value described later generated by the first pixel position compensation unit 611. Then, the decoded value (reference component frame) of the picture output from the addition unit 608 is stored in the second storage unit 609. The component frames that are not referred to in the subsequent pixel position compensation prediction are sequentially erased from the second storage unit 609.
  • the position shift detection unit 610 detects a motion vector indicating a pixel position shift for predicting a component frame to be encoded by using the reference image of the second storage unit 609.
  • 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 predicted value obtained by predicting the component frame to be encoded in block units based on the motion vector and the reference component frame. This predicted value is output to the subtraction unit 602 and the addition unit 608.
  • FIG. 7 is an explanatory diagram showing an example of a reference direction of the component frame.
  • (A) shows a reference direction when the input order of the 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 head 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 interframe prediction coding using the preceding G1 image data 111 as a reference component frame.
  • the B image data 113 to be input next is coded as a P picture or a B picture by interframe prediction coding using at least one component frame of the G1 image data 111 and the G2 image data 112 preceding for each block as a reference component frame. Be transformed.
  • the R image data 114 finally input is P by interframe prediction coding using at least one component frame of the G1 image data 111, the G2 image data 112, and the B image data 113 preceding for each block as a reference component frame. Encoded into a picture or B picture.
  • (B) indicates a reference direction when the input order of the 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 first 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 interframe prediction 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 interframe prediction coding using at least one component frame of the preceding B image data 113 and the R image data 114 as a reference component frame. ..
  • the G2 image data 112 finally input is a P picture or B by inter-frame predictive coding with 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 coding is possible even in the input order of the 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 coding unit 402 uses the luminance value from the pixel of the image sensor 353 that does not depend on the color component, different color components can be coded as the reference frame.
  • FIG. 8 is an explanatory diagram showing an example of detecting a motion vector.
  • (A) shows the RAW image data 100 and the component frame
  • (B) to (M) show the detection example of the motion vector.
  • a to d and x are added to the end of the code of the color component.
  • the positional deviation of the reference pixel of the reference component frame with respect to the position of the attention pixel of the predicted component frame is defined as the motion vector V (x, y).
  • the motion vector V (x, y) increases due to a shift in the right direction, x decreases due to a shift in the left direction, y increases due to a shift in the downward direction, and y decreases due to a shift in the upward direction.
  • the motion vector V (x, y) is indicated by a black arrow.
  • the misalignment detection unit 610 detects a motion vector for predicting a pixel of interest with one reference pixel. As a result, the R image data 114 can be encoded into a P picture.
  • the reference pixel of the B image data 113 is a pixel Bb.
  • the reference pixel of the B image data 113 is defined as pixel Ba.
  • the reference pixel of the B image data 113 is a pixel Bd.
  • the reference pixel of the B image data 113 is a pixel Bc.
  • the misalignment detection unit 610 detects a motion vector for predicting a pixel of interest with a plurality of reference pixels having the same color component. As a result, the R image data 114 can be encoded into a P picture.
  • the reference pixels of the B image data 113 are pixels Ba to Bd.
  • the pixel of interest Rx has 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 the position is displaced from the attention pixel Rx.
  • the reference pixels of the B image data 113 are pixels Bb and Bd.
  • the pixel of interest Rx has 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 is displaced from the attention pixel Rx.
  • the reference pixels of the B image data 113 are pixels Ba and Bc.
  • the pixel of interest Rx has the same pixel position as the reference pixel Bb.
  • the average reference pixel position is at the center of the reference pixels Ba and Bc, and is displaced from the attention pixel Rx.
  • the reference pixels of the B image data 113 are pixels Ba and Bb.
  • the pixel of interest Rx has 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 the position is displaced from the attention pixel Rx.
  • the reference pixels of the B image data 113 are pixels Bc and Bd.
  • the pixel of interest Rx has the same pixel position as the reference pixel Bb.
  • the average reference pixel position is at the center of the reference pixels Bc and Bd, and is displaced from the attention pixel Rx.
  • the reference component frame is G1 image data 111 and / and G2 image data 112
  • the prediction destination component frame is R image data 114
  • the pixel of interest is pixel Rx of R image data 114.
  • An example of detecting the motion vector V in the case is shown.
  • the misalignment detection unit 610 detects a motion vector for predicting a pixel of interest with a plurality of reference pixels having the same color component or different color components.
  • the R image data 114 can be encoded into a P picture or a B picture.
  • the reference pixels of the G1 image data 111 are the pixels G1b and G1d.
  • the pixel of interest Rx has 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 the position is displaced from the attention pixel Rx.
  • the reference pixels of the G2 image data 112 are the pixels G2a and G2b.
  • the pixel of interest Rx has 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 the position is displaced from the attention pixel Rx.
  • the prediction destination is the R image data 114, but the prediction destination may be the G1 image data 111, the G2 image data 112, or the B image data 113. Further, the R image data 114 may be used as a reference component frame. Further, the bidirectional reference component frame (M) may have different color components instead of the same color component.
  • the G1 pixel, G2 pixel, B pixel, and 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.
  • the pattern shifts between the component frames due to the difference in the pixel positions in the color array 101. Therefore, the pixel position compensation prediction between the component frames is executed in consideration of the difference in the 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>
  • FIGS. 9 to 16 the arrangement of pixels in the RAW image data 100 is indicated by a circle.
  • the range of one color array (sample point of the component frame) is indicated by a frame line.
  • FIG. 9 is an explanatory diagram showing an example 1 of pixel position compensation prediction between component frames.
  • the component frame of the prediction destination is G2 image data 112
  • the value of the attention pixel G2x is set to the surrounding 4 pixels G1a to G1d of the reference component frame G1 image data 111 adjacent to the attention pixel G2x.
  • An example of predicting with the average value of is shown.
  • the G2 image data 112 is encoded into a P picture by predicting the pixel value of the pixel of interest G2x by the average of the four adjacent pixels G1a to G1d. Therefore, it is possible to make a prediction according to the pixel position of the pixel of interest G2x from the G1 image data. Further, 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 destination is G2 image data 112, and the value of the attention pixel G2x is set to the adjacent two pixels G1a of the reference component frame G1 image data 111 adjacent to the attention pixel G2x.
  • An example of predicting with the average value of G1c is shown.
  • Such a 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 destination is G2 image data 112, and the value of the attention pixel G2x is set to the adjacent two pixels G1b of the reference component frame G1 image data 111 adjacent to the attention pixel G2x.
  • An example of predicting with the average value of G1d is shown.
  • Such a 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 G1b and G1d, 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 destination is G2 image data 112, and the value of the attention pixel G2x is set to the adjacent two pixels G1a of the reference component frame G1 image data 111 adjacent to the attention pixel G2x.
  • An example of predicting with the average value of G1b is shown.
  • Such a 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 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 destination is G2 image data 112, and the value of the attention pixel G2x is set to the adjacent two pixels G1c of the reference component frame G1 image data 111 adjacent to the attention pixel G2x.
  • An example of predicting with the average value of G1d is shown.
  • Such a 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 G1c and G1d, 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.
  • FIG. 10 is an explanatory diagram showing a pixel position compensation prediction example 2 between component frames.
  • the value of the pixel of interest of the component frame of the prediction destination 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 of the prediction destination.
  • the component frame of the prediction destination is G2 image data 112
  • the pixel of interest is pixel G2x
  • the reference component frame is G1 image data 111.
  • the value of the pixel G2x of interest in the G2 image data 112, which is the component frame of the prediction destination is predicted from the value of the pixel G1a located in the upper left in the RAW image data.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from the lower right to the upper left.
  • the value of the pixel G2x of interest in the G2 image data 112, which is the component frame of the prediction destination is predicted from the value of the pixel G1b located in the upper right of the RAW image data.
  • the reference pixel (sample point to which G1b belongs) of the G1 image data 111, which is the reference component frame is relative to the position of the pixel of interest (sample point to which G2x belongs) in the G2 image data 112, which is the prediction destination component frame.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from the lower left to the upper right.
  • the value of the pixel G2x of interest in the G2 image data 112, which is the component frame of the prediction destination is predicted from the value of the pixel G1c located at the lower left in the RAW image data.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from the lower right to the upper left.
  • the value of the pixel G2x of interest in the G2 image data 112, which is the component frame of the prediction destination is predicted from the value of the pixel G1d located at the lower right in the RAW image data 100.
  • the reference pixel (sample point to which G1d belongs) of the G1 image data 111, which is the reference component frame is relative to the position of the pixel of interest (sample point to which G2x belongs) in the G2 image data 112, which is the prediction destination component frame.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from the lower left to the upper right.
  • the G2 image data 112 is encoded into a P picture. Therefore, 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.
  • FIG. 11 is an explanatory diagram showing a pixel position compensation prediction example 3 between component frames.
  • the value of the pixel of interest of the component frame of the prediction destination 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 of the prediction destination.
  • the component frame of the prediction destination is B image data 113
  • the pixel of interest is pixel Bx
  • the reference component frame is G1 image data 111 or G2 image data 112.
  • the value of the attention pixel Bx of the B image data 113 which is the component frame of the prediction destination is set to the adjacent two pixels G1a and G1b of the reference component frame G1 image data 111 adjacent to the attention pixel Bx.
  • An example of predicting with the average value of is shown.
  • the B image data 113 is encoded into a P picture by predicting the pixel value of the pixel of interest Bx as the average of the two adjacent pixels G1a and G1b.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Further, 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 value of the attention pixel Bx of the B image data 113 which is the prediction destination component frame is set to the adjacent two pixels G2a and G2b of the reference component frame G2 image data 112 adjacent to the attention pixel Bx.
  • An example of predicting with the average value of is shown.
  • the B image data 113 is encoded into a P picture by predicting the pixel value of the pixel of interest Bx as the average of the two adjacent pixels G2a and G2b.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Further, it is possible to suppress the coding distortion included in the decoded value of the G2 image data 112 which is the reference component frame.
  • 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 attention pixel Bx of the B image data 113 which is the component frame of the prediction destination is set to the adjacent two pixels G1a and G1b of the G1 image data 111 which is the reference component frame adjacent to the attention pixel Bx. This is an example of predicting with the average value of two adjacent 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 the four adjacent pixels G1a, G1b, G2a, and G2b. Therefore, the coding distortion included in the decoded values of the G1 image data 111 and the G2 image data 112, which are the reference component frames, can be further suppressed.
  • FIG. 12 is an explanatory diagram showing a pixel position compensation prediction example 4 between component frames.
  • the value of the pixel of interest of the component frame of the prediction destination 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 of the prediction destination.
  • the component frame of the prediction destination is R image data 114
  • the pixel of interest is pixel Rx
  • the reference component frame is G1 image data 111 or G2 image data 112.
  • the value of the attention pixel Rx of the R image data 114 which is the prediction destination component frame is set to the adjacent two pixels G1a and G1b of the reference component frame G1 image data 111 adjacent to the attention pixel Rx.
  • An example of predicting with the average value of is shown.
  • the R image data 114 is encoded into a P picture by predicting the pixel value of the pixel of interest Rx as the average of the two adjacent pixels G1a and G1b.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Further, 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 value of the attention pixel Rx of the R image data 114 which is the component frame of the prediction destination, is set to the adjacent two pixels G2a, G2b of the G2 image data 112, which is the reference component frame adjacent to the attention pixel Rx.
  • An example of predicting with the average value of is shown.
  • the R image data 114 is encoded into a P picture by predicting the pixel value of the pixel of interest Rx as the average of the two adjacent pixels G2a and G2b.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Further, it is possible to suppress the coding distortion included in the decoded value of the G2 image data 112 which is the reference component frame.
  • 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 attention pixel Rx of the R image data 114 which is the component frame of the prediction destination is set to the adjacent two pixels G1a and G1b of the G1 image data 111 which is the reference component frame adjacent to the attention pixel Rx. This is an example of predicting with the average value of two adjacent 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 with the average of four adjacent pixels G1a, G1b, G2a, and G2b. Therefore, it is possible to suppress the coding distortion included in the decoded values of the G1 image data 111 and the G2 image data 112, which are the reference component frames.
  • FIG. 13 is an explanatory diagram showing a pixel position compensation prediction example 5 between component frames.
  • the component frame of the prediction destination is R image data 114
  • the value of the attention pixel Rx is set to 4 pixels Ba to Bd around the B image data 113 which is the reference component frame adjacent to the attention pixel Rx.
  • An example of predicting with the average value of is shown.
  • the R image data 114 is encoded into a P picture by predicting the pixel value of the pixel of interest Rx with the average of the four adjacent pixels Ba to Bd. Therefore, it is possible to make a prediction according to the pixel position of the pixel of interest Rx from the B image. Further, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the component frame of the prediction destination is R image data 114
  • the value of the attention pixel Rx is set to the adjacent two pixel Ba of the B image data 113 which is the reference component frame adjacent to the attention pixel Rx.
  • An example of predicting with the average value of Bc is shown.
  • Such a 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 Rx is predicted by the average of the two adjacent pixels Ba and Bc, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the component frame of the prediction destination is R image data 114
  • the value of the attention pixel Rx is set to the adjacent two pixels Bb of the B image data 113 which is the reference component frame adjacent to the attention pixel Rx.
  • An example of predicting with the average value of Bd is shown.
  • Such a 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 Rx is predicted by the average of the two adjacent pixels Bb and Bd, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the component frame of the prediction destination is R image data 114
  • the value of the attention pixel Rx is set to the adjacent two pixel Ba of the B image data 113 which is the reference component frame adjacent to the attention pixel Rx.
  • An example of predicting with the average value of Bb is shown.
  • Such a 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 Rx is predicted by the average of the two adjacent pixels Ba and Bb, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the component frame of the prediction destination is R image data 114
  • the value of the attention pixel Rx is set to the adjacent two pixels Bc of the B image data 113 which is the reference component frame adjacent to the attention pixel Rx.
  • An example of predicting with the average value of Bd is shown.
  • Such a 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 Rx is predicted by the average of the two adjacent pixels Bc and Bd, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the R image data 114 is encoded into a P picture by predicting the pixel value of the pixel of interest Rx by the average of the two adjacent pixels. Therefore, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • FIG. 14 is an explanatory diagram showing a pixel position compensation prediction example 6 between component frames.
  • the value of the pixel of interest of the component frame of the prediction destination 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 of the prediction destination.
  • the component frame of the prediction destination is R image data 114
  • the pixel of interest is pixel Rx
  • the reference component frame is B image data 113.
  • the value of the pixel Rx of interest in the R image data 114 which is the component frame of the prediction destination, is predicted from the value of the pixel Ba located at the upper left in the RAW image data 100.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from the lower right to the upper left.
  • the value of the pixel Rx of interest in the R image data 114, which is the component frame of the prediction destination, is predicted from the value of the pixel Bb located in the upper right of the RAW image data 100.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from the lower left to the upper right.
  • the value of the pixel Rx of interest in the R image data 114 which is the component frame of the prediction destination, is predicted from the value of the pixel Bd located at the lower right in the RAW image data 100.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from top left to bottom right.
  • the value of the pixel Rx of interest in the R image data 114 which is the component frame of the prediction destination, is predicted from the value of the pixel Bc located at the lower right in the RAW image data 100.
  • the reference pixel (sample point to which Bc belongs) of the B image data 113 which is the reference component frame, is relative to the position of the pixel of interest (sample point to which Rx belongs) in the R image data 114, which is the prediction destination component frame.
  • Such motion compensation predictions are likely to be selected in blocks of patterns that include diagonal edges from top right to bottom left.
  • the R image data 114 is encoded into a P picture. Therefore, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • FIG. 15 is an explanatory diagram showing a pixel position compensation prediction example 7 between component frames.
  • the value of the pixel of interest of the component frame of the prediction destination 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 of the prediction destination.
  • the component frame of the prediction destination is G1 image data 111
  • the pixel of interest is pixel G1x
  • the reference component frame is B image data 113 or R image data 114.
  • the value of the attention pixel G1x of the G1 image data 111 which is the prediction destination component frame is set to the adjacent two pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the attention pixel G1x.
  • An example of predicting with the average value of is shown.
  • the G1 image data 111 is encoded into a P picture.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Further, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the value of the attention pixel G1x of the G1 image data 111 which is the prediction destination component frame 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 attention pixel G1x.
  • An example of predicting with the average value of is shown.
  • the G1 image data 111 is encoded into a P picture.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Further, it is possible to suppress the coding distortion included in the decoded value of the R image data 114 which is the reference component frame.
  • 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 attention pixel G1x of the G1 image data 111 which is the prediction destination component frame is set to the adjacent two pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the attention pixel G1x. This is an example of predicting with the average value of two adjacent pixels Ra and Rb of the R image data 114.
  • the G1 image data 111 is encoded into a B picture by predicting the pixel value of the pixel of interest G1x by the average of four adjacent pixels Ba, Bb, Ra, and Rb. Therefore, it is possible to suppress the coding distortion included in the decoded values of the G1 image data 111 and the R image data 114, which are the reference component frames.
  • FIG. 16 is an explanatory diagram showing a pixel position compensation prediction example 4 between component frames.
  • the value of the pixel of interest of the component frame of the prediction destination 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 of the prediction destination.
  • the component frame of the prediction destination is G2 image data 112
  • the pixel of interest is pixel G2x
  • the reference component frame is B image data 113 or R image data 114.
  • the value of the attention pixel G2x of the G2 image data 112 which is the prediction destination component frame is set to the adjacent two pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the attention pixel G2x.
  • An example of predicting with the average value of is shown.
  • the G2 image data 112 is encoded into a P picture by predicting the pixel value of the pixel of interest G2x by the average of the two adjacent pixels Ba and Bb.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including vertical edges. Further, it is possible to suppress the coding distortion included in the decoded value of the B image data 113 which is the reference component frame.
  • the value of the attention pixel G2x of the G2 image data 112 which is the prediction destination component frame 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 attention pixel G2x.
  • An example of predicting with the average value of is shown.
  • the G2 image data 112 is encoded into a P picture by predicting the pixel value of the pixel of interest G2x by the average of two adjacent pixels Ra and Rb.
  • Such a pixel position compensation prediction has a high probability of being selected in a block of a pattern including a horizontal edge. Further, it is possible to suppress the coding distortion included in the decoded value of the R image data 114 which is the reference component frame.
  • 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 attention pixel G2x of the G2 image data 112 which is the prediction destination component frame is set to the adjacent two pixels Ba and Bb of the B image data 113 which is the reference component frame adjacent to the attention pixel G2x. This is an example of predicting with the average value of two adjacent pixels Ra and Rb of the 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 with the average of four adjacent pixels Ba, Bb, Ra, and Rb. Therefore, the coding distortion included in the decoded values of the B image data 113 and the R image data 114, which are the reference component frames, can be further suppressed.
  • the coding unit 402 When encoding 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 having the smallest difference. For example, when the R image data 114 is predicted with reference to the B image data 113, the coding unit 402 uses the reference patterns (A) to (E) in FIG. 13 and the reference patterns (A) to (D) in FIG. Try pixel position compensation prediction with and select the reference pattern with the smallest difference. As a result, pixel position compensation prediction can be performed adaptively and efficiently.
  • the reference pattern straddles the edge of the image
  • the difference between the value of the pixel in the reference component frame sandwiching the edge and the value of the pixel of interest in the predicted component frame becomes large. Therefore, by appropriately selecting the reference pattern, it is possible to specify the reference pattern that does not straddle the edges, and it is possible to improve the coding efficiency.
  • FIG. 17 is an explanatory diagram showing an example of a data structure of a coded component frame.
  • the coded component frame 1700 has header information 1701 and coded data string 1702.
  • the header information 1701 is information given by the coding 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 coding, the size of the coded component frame 1700, the 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 a type of coded component frame 1700 (any of I picture, P picture, and B picture), identification information of the reference component frame, and a reference pattern used for pixel position compensation prediction shown in FIGS. 9 to 16. including.
  • the coded data string 1702 is a data string in which the component frames are encoded.
  • FIG. 18 is a flowchart showing an example of a coding processing procedure by the coding device 400.
  • the coding 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 predictive coding in the component frame by the coding unit 402 to generate an I picture (step S1803).
  • the coding device 400 executes predictive coding between component frames for the remaining component frames by the coding unit 402 to generate a P picture or a B picture (step S1804). Finally, the coding device 400 stores the coded image data group encoded in steps S1803 and S1804 in the storage device 302 by the recording unit 403 (step S1805).
  • FIG. 19 is a block diagram showing a functional configuration example of the decoding device.
  • 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 coded component frame 1700 encoded by the coding device 400, and the decoding unit 1902 decodes the coded component frame 1700 into a component frame using the control information 1712, and the second generation unit 1903 uses the image format information 1711 to generate RAW image data 100 from each decoded component frame.
  • the acquisition unit 1901, the decoding unit 1902, and the second generation unit 1903 are, specifically, functions realized by, for example, causing the processor 301 to execute a program stored in the storage device 302, or by the LSI 304. ..
  • the acquisition unit 1901 acquires the first coded image data and the second coded image data.
  • the acquisition unit 1901 acquires the first coded image data and the second coded image data from the storage device 302 of the decoding device 1900 or by communication with the coding device 400.
  • the first coded image data is data obtained by predictively coding the first image data composed of the pixel group of the first color component in a frame.
  • the second coded image data includes a second coded image data obtained by encoding a second image data composed of a pixel group of a second color component different from the first color component based on the first image data. get.
  • the acquisition unit 1901 acquires the third coded image data.
  • the third coded image data is data obtained by encoding the third image data composed of the pixel group of the third color component based on the first image data.
  • the acquisition unit 1901 acquires the fourth coded image data.
  • the fourth coded image data is data obtained by encoding the fourth image data composed of the pixel group of the fourth color component based on the first image data.
  • the decoding unit 1902 decodes the first coded image data acquired by the acquisition unit 1901 into the first image data using the control information 1712, and is acquired by the acquisition unit 1901 based on the first image data.
  • the second coded image data is decoded into the second image data.
  • the decoding unit 1902 decodes the first encoded image data which is an I picture into the first image data, and applies the second image data which is a P picture to the pixel position compensation prediction. Therefore, the first image data is used for decoding into the second image data.
  • the decoding unit 1902 decodes the third coded image data acquired by the acquisition unit 1901 into the third image data based on the first image data using the control information 1712. Specifically, for example, when the third coded image data is a P picture, the decoding unit 1902 applies the third coded image data to the first image data according to the reference pattern applied to the pixel position compensation prediction. When the third image data is decoded into the third image data and the third coded image data is a B picture, the third coded image data is subjected to the first image data and the second image data according to the reference pattern applied to the pixel position compensation prediction. The image data is used for decoding into the third image data.
  • the decoding unit 1902 decodes the fourth coded image data acquired by the acquisition unit 1901 into the fourth image data based on the first image data by using the control information 1712. Specifically, for example, when the fourth coded image data is a P picture, the decoding unit 1902 applies the fourth coded image data to the first image data to the first image data according to the reference pattern applied to the pixel position compensation prediction. When any one of the third image data is used to decode the fourth image data and the third coded image data is a B picture, the fourth coded image data is applied to the pixel position compensation prediction. According to the reference pattern, two image data out of the first image data to the third image data are used for decoding into the fourth image data.
  • the second generation unit 1903 specifies the pattern of the color array from the image format information 1711, and from the pixel group of the first image data to the fourth image data decoded by the decoding unit 1902 so as to obtain the specified color array 101. , The RAW image data 100 in which the first color component to the fourth color component are repeatedly arranged is generated.
  • FIG. 20 is a block diagram showing a configuration example of the decoding unit 1902.
  • the decoding unit 1902 has a variable length code decoding unit 2001, an inverse quantization unit 2002, an inverse orthogonal conversion unit 2003, an addition unit 2004, a third storage unit 2005, and a second pixel position compensation unit 2006. ..
  • variable length code decoding unit 2001 decodes the input coding component frame and outputs the quantization coefficient and the 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 dequantizes the quantization coefficient in block units and decodes the frequency coefficient.
  • the inverse orthogonal conversion unit 2003 decodes the prediction error value (or the signal of the original image) by inversely orthogonally converting the frequency coefficient decoded by the inverse quantization unit 2002.
  • the addition unit 2004 outputs the decoded image data in block units by adding the decoded prediction error value and the predicted value generated by the second pixel position compensation unit 2006. Then, the image data output from the addition unit 2004 is output as a component frame and is input to the third storage unit 2005.
  • the third storage unit 2005 stores the decoded value of the image as a reference component frame.
  • the image data that is not referred to in the subsequent pixel position compensation prediction is sequentially deleted from the third storage unit 2005.
  • the second pixel position compensation unit 2006 outputs a predicted value obtained by predicting the image to be decoded in block units to the addition unit 2004 based on the motion vector and the reference component frame.
  • FIG. 21 is a flowchart showing an example of a decoding processing procedure by the decoding device 1900.
  • the decoding device 1900 acquires the coded image data group as the coded component frame group by the acquisition unit 1901 (step S2101), and decodes the head coded image data (I picture) into the component frame by the decoding unit 1902. (Step S2102).
  • the decoding device 1900 decodes the subsequent coded image data (P picture or B picture) into the component frame by the decoding unit 1902 (step S2103). Then, the decoding device 1900 synthesizes the decoded component frame group by the second generation unit 1903, and restores the RAW image data 100 (step S2104).
  • the correlation between the component frames is predicted by predicting the RAW image data 100 between the component frames by utilizing the property that the correlation between the component frames is increased depending on the hue and the saturation. It is possible to increase the coding efficiency of the highly RAW image data 100. Further, even when the code is encoded by the component frame prediction coding in this way, the original RAW image data 100 can be restored.
  • the RAW image data 100 is white-balanced and then encoded, and the RAW image data is decoded into component frames to generate white-balanced RAW image data, and then the white balance is reversed. Decoding to generate RAW image data by adjustment is executed.
  • the differences from the first embodiment will be mainly described, the same components as those in the first embodiment will be designated by the same reference numerals, and the description thereof will be omitted.
  • FIG. 22 is an explanatory diagram showing a coding and decoding example according to the second embodiment.
  • E WB (white balance) adjustment,
  • A separation and
  • B coding are performed by the coding apparatus 400, and
  • C decoding,
  • D synthesis, and
  • F WB reverse adjustment are decoding. Performed by device 1900.
  • the encoding device 400 adjusts the white balance of the RAW image data 100.
  • the white balance adjustment is executed by the white balance setting items (auto, manual, light bulb, cloudy weather, fluorescent lamp, sunny shade, fine weather, etc.) set when the RAW image data is generated by shooting. Will be done.
  • the white balance-adjusted RAW image data 100 is referred to as WB-adjusted RAW image data 2200.
  • the encoding device 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 component.
  • 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 red (R) color component frame
  • the G1 image data 2211 is image data composed of 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 composed of 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 composed of 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 composed of R pixel groups from each of the color arrays 101 in the WB-adjusted RAW image data 2200.
  • the coding device 400 encodes each component frame between the component frames. Specifically, for example, the coding apparatus 400 encodes one of the component frame groups by in-frame prediction coding to generate an I picture, and uses the I picture to generate an I picture, and uses the I picture to generate an interframe prediction code. It is encoded by the conversion to generate a P picture or a B picture.
  • the G1 image data 2211 becomes the G1 coded image data 2221
  • the G2 image data 2212 becomes the G2 coded image data 2222
  • the B image data 2213 becomes the B coded image data 2223
  • R 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 the I picture, decodes the P picture or the B picture using the component frame decoded from the I picture, and generates another component frame. That is, the decoding device 1900 decodes the G1 coded image data 2221, the G2 coded image data 2222, the B coded image data 2223, and the R coded image data 2224, and obtains the G1 coded image data 2211 and the G2 image data 2212. B image data 2213 and R image data 2214 are generated.
  • the decoding device 1900 synthesizes the decoded component frames to generate WB-adjusted RAW image data 2200.
  • the G1 image is obtained by arranging the pixels G1, G2, B, and R at the same positions of the G1 image data 2211, the G2 image data 2212, the B image data 2213, and the R image data 2214 according to the color arrangement 101.
  • the WB-adjusted RAW image data 2200 is restored from the data 2211, the G2 image data 2212, the B image data 2213, and the R image data 2214.
  • the decoding device 1900 converts the WB-adjusted RAW image data 2200 into the original RAW image data 100 by WB reverse adjustment.
  • the WB-adjusted RAW image data 2200 is predicted between the component frames, and the code of the WB-adjusted RAW image data 2200 is used. It is possible to increase the efficiency of conversion. Further, even when the code is encoded by the component frame prediction coding in this way, the original WB-adjusted RAW image data 2200 can be restored.
  • blue (B) and red (R) have a lower pixel value as a signal level than green (G), and therefore have a low correlation. Therefore, the blue (B) and red (R) signal levels are brought closer to the green (G) signal levels by performing white balance adjustment on the RAW image data 100 before encoding. As a result, the coding efficiency of the WB-adjusted RAW image data 2200 can be improved.
  • the white balance adjustment is performed on the RAW image data 100 before encoding, the white balance adjustment of the RAW image data 100 at the decoding destination becomes unnecessary. However, in order to restore the WB adjusted RAW image data 2200 at the decoding destination, the white balance may be reversely adjusted.
  • FIG. 23 is a block diagram showing a functional configuration example of the coding device 400 according to the second embodiment.
  • the coding apparatus 400 includes a white balance adjusting unit 2301 and a white balance detecting unit 2302.
  • the white balance adjusting unit 2301 and the white balance detecting unit 2302 are functions realized by, for example, causing the processor 301 to execute a program stored in the storage device 302, or by the LSI 304.
  • the white balance adjustment unit 2301 adjusts the white balance of the RAW image data 100 according to the white balance setting items (auto, manual, light bulb, cloudy weather, fluorescent lamp, sunny shade, fine weather, etc.), and WB-adjusted RAW image data 2200. Is output to the first generation unit 401. Therefore, the first generation unit 401 will perform the separation of the component frames as shown in FIG. 22A for the WB-adjusted RAW image data 2200.
  • the white balance adjustment unit 2301 executes the white balance adjustment process by multiplying the pixel value of the RAW image data 100 by the white balance adjustment gain coefficient, for example, based on the black level of the RAW image data 100.
  • the white balance adjustment unit 2301 uses the B component pixel after the white balance adjustment.
  • 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. As a result, the white balance adjustment unit 2301 performs white balance adjustment on the RAW image data 100 by the notified white balance (auto, manual, light bulb, cloudy weather, fluorescent lamp, sunny shade, fine weather, etc.).
  • the white balance detection unit 2302 notifies the coding unit 402 of the information for specifying the detected white balance (white balance control information). 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 coding unit 402 can add white balance control information to the control information 1712 in the header information 1701 of the coding component frame 1700 encoded by the coding unit 402.
  • the white balance control information includes, for example, information indicating that the WB adjusted RAW image data 2200 has adjusted the white balance (hereinafter, referred to as “adjusted information”) and the WB adjusted RAW image data 2200. It is composed of the white balance adjustment gain coefficient AB of the B component and the white balance adjustment gain coefficient (hereinafter, AR) of the R component of the WB adjusted RAW image data 2200.
  • the decoding device 1900 can recognize that the RAW image data 2200 has been white-balanced based on the adjusted information given to the control information 1712. Further, the decoding device 1900 can reverse the white balance in the decoding process by the white balance adjustment gain coefficients of the B component and the R component given to the control information 1712.
  • control information 1712 is given at least one of the above-mentioned adjusted information, the white balance adjustment gain coefficient AB of the B component, and the white balance adjustment gain coefficient AR of the R component.
  • Example 2 an example of adjusting the white balance to the RAW image data 100 was shown. However, for example, instead of adjusting the white balance, 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 Of the difference between the value of the color component data of and the value of the color component data of R, at least one difference may be small.
  • FIG. 24 is a flowchart showing an example of a coding processing procedure by the coding apparatus 400 according to the second embodiment.
  • the coding device 400 receives the input of the RAW image data 100 (step S2401), white balance adjusts the RAW image data 100 by the white balance adjusting unit 2301, and outputs the WB adjusted RAW image data 2200 (step S2402). ..
  • the coding apparatus 400 separates the pixel group of the WB-adjusted RAW image data 2200 for each color component by the first generation unit 401 to generate a component frame for each color component (step S2403).
  • the coding device 400 executes predictive coding in the component frame by the coding unit 402 to generate an I picture (step S2404). Then, the coding apparatus 400 executes inter-component prediction coding for the remaining component frames by the coding unit 402 to generate a P picture or a B picture (step S2405). Finally, the coding device 400 stores the coded image data group encoded in steps S2404 and S2405 in the storage device 302 by the recording unit 403 (step S2406).
  • FIG. 25 is a block diagram showing a functional configuration example of the decoding device 1900 according to the second embodiment.
  • the decoding device 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, for example, causing the processor 301 to execute a program stored in the storage device 302, or by the LSI 304.
  • the second generation unit 1903 will generate the WB-adjusted RAW image data 2200.
  • the white balance reverse adjustment unit 2504 refers to the white balance control information in the header information 1701 given to the WB adjusted RAW image data 2200 obtained from the second generation unit 1903, and refers to the WB adjusted RAW image data 2200. White balance is reversed and restored to the original RAW image data 100.
  • FIG. 26 is a flowchart showing an example of a decoding processing procedure by the decoding device 1900 according to the second embodiment. After steps S2101 to S2104, the decoding device 1900 reverse-adjusts the white balance of 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).
  • the WB-adjusted RAW image data 2200 is predicted between the component frames by utilizing the property that the correlation between the component frames increases depending on the hue and the saturation. By doing so, the coding efficiency of the WB-adjusted RAW image data 2200 can be increased. Further, even when the code is encoded by the component frame prediction coding in this way, the original RAW image data 100 can be restored.
  • blue (B) and red (R) have lower luminance values of pixels that are signal levels than green (G), and therefore have a low correlation. Therefore, the blue (B) and red (R) signal levels are brought closer to the green (G) signal levels by performing white balance adjustment on the RAW image data 100 before encoding. As a result, the coding efficiency of the WB-adjusted RAW image data 2200 can be improved. Further, since the white balance adjustment is performed on the RAW image data 100 before encoding, the white balance adjustment of the RAW image data 100 at the decoding destination can be eliminated by omitting the white balance reverse adjustment unit 2504. it can.
  • Example 3 is an example of encoding and decoding RAW moving image data in which RAW image data 100 are arranged in the time axis direction.
  • the differences from the first embodiment will be mainly described, the same components as those in the first embodiment will be designated by the same reference numerals, and the description thereof will be omitted.
  • FIG. 27 is an explanatory diagram showing a coding and decoding example according to the third embodiment.
  • (A) Separation and (B) coding are performed by the coding device 400, and (C) decoding and (D) synthesis are performed by the decoding device 1900.
  • the encoding device 400 acquires RAW moving image data 2700 in which RAW image data 100 are arranged in the time axis direction, and generates a component frame for each color component for each RAW image data 100. As a result, the G1 image data string 2711, the G2 image data string 2712, the B image data string 2713, and the R image data string 2714 are obtained.
  • the coding device 400 encodes each color component frame between the component frames. Specifically, for example, the coding apparatus 400 encodes one of the component frame groups by in-frame prediction coding to generate an I picture, and uses the I picture to generate an I picture, and uses the I picture to generate an interframe prediction code. It is encoded by the conversion 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 becomes the B coded image.
  • the data string is 2723
  • the R image data string 2714 becomes the R coded image data string 2724.
  • the decoding device 1900 decodes the encoded component frame group. Specifically, for example, the decoding device 1900 decodes the I picture, decodes the P picture or the B picture using the component frame decoded from the I picture, and generates another component frame. That is, the decoding device 1900 decodes the G1 coded image data string 2721, the G2 coded image data string 2722, the B coded image data string 2723, and the R coded image data string 2724 to decode the G1 coded image data string 2711, G2 image data string 2712, B image data string 2713, and R image data string 2714 are generated.
  • the decoding device 1900 synthesizes the decoded component frames to generate the RAW image data 100.
  • the RAW image is obtained by arranging the pixels G1, G2, B, and R at the same positions of the G1 image data 111, the G2 image data 112, the B image data 113, and the R image data 114 according to the color arrangement 101.
  • the data 100 is sequentially restored, and the RAW moving image data 2700 is restored.
  • the RAW image data 100 by predicting the RAW image data 100 between the component frames by utilizing the property that the correlation between the component frames increases depending on the hue and saturation, the RAW image data 100 having a high correlation between the component frames
  • the coding efficiency of the RAW moving image data 2700 can be improved. Further, even when the coding is performed by the component frame prediction coding in this way, the original RAW image data 100 and thus the RAW moving image data 2700 can be restored.
  • FIG. 28 is an explanatory diagram showing an example of a reference direction of the component frame.
  • (A) shows an example of RAW moving image data 2700.
  • (B) and (C) show an example of the reference direction of the component frame in the RAW moving image data 2700.
  • n is an integer of 2 or more
  • an example of the reference direction of the component frame in the RAW image data 1 and the RAW image data 2 is shown. ..
  • (B) refers to the reference direction when the input order of the component frames from each of 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. Shown.
  • the head 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 interframe prediction coding with the preceding G1 image data 111 as a reference frame.
  • the B image data 113 to be input next is encoded into a P picture or a B picture by interframe prediction 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 finally input is a P picture or a B picture by interframe prediction coding with 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. Is encoded in.
  • the reference direction in the head RAW image data 1 is the same as that in the RAW image data 1 in (B).
  • the head G1 image data 111 is encoded into a P picture or a B picture by interframe prediction coding using 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 by interframe prediction 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. Encoded into a picture or 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. It is encoded into a P picture or a B picture by interframe predictive coding using one component frame as a reference frame.
  • the R image data 114 finally input includes the R image data 114 of the preceding RAW image data 1, the G1 image data 111 of the RAW image data 2, the G2 image data 112 of the RAW image data 2, and the RAW image data 2.
  • the B image data 113 and at least one component frame of the above are used as reference frames, and are encoded into P pictures or B pictures by inter-frame predictive coding.
  • the reference direction in FIG. 28 is an example, and coding is possible even in the input order of the component frames other than (B) and (C). Further, since the coding unit 402 uses the luminance value from the pixel of the image sensor 353 that does not depend on the color component, different color components can be coded as the reference component frame.
  • FIG. 29 is an explanatory diagram showing an example of coding in slice units.
  • (A) shows the slice unit of each component frame generated from the time-series RAW image data 1 to 4.
  • a slice is data obtained by dividing a component frame and is one unit of coding.
  • each component frame (G1 image data 111, G2 image data 112, B image data 113, R image data 114) has n slices of the same size (n is an integer of 2 or more).
  • the input order of the component frames is given as an example of (B) in FIG. 28, but other input orders may be used.
  • FIG. (B) shows an example of coding processing for each slice.
  • Arrows indicate the order of coding. That is, it is encoded in the order of G1 component slice 1, G2 component slice 1, B component slice 1, and R component slice 1 having a slice number of "1", and then G1 component slice 2 having a slice number of "2". , G2 component slice 2, B component slice 2, and R component slice 2 are encoded in this order. In this way, the slice numbers are encoded in descending order, and finally, the G1 component slice n, the G2 component slice n, the B component slice n, and the R component slice n whose slice number is “n” are encoded in this order. ..
  • the G1 component slice may be encoded into an I picture as shown in FIG. 28 (B), or the G1 component slice may be converted into a P picture as shown in (C). It may be encoded.
  • decoding may be performed in slice units as in the case of coding in slice units. As a result, the latency of decoding can be improved.
  • the correlation between the component frames is increased by predicting the RAW image data 100 between the component frames by utilizing the property that the correlation between the component frames is increased depending on the hue and saturation.
  • the high coding efficiency of the RAW image data 100 and by extension, the coding efficiency of the RAW moving image data 2700 can be improved. Further, even when the coding is performed by the component frame prediction coding in this way, the original RAW image data 100 and thus the RAW moving image data 2700 can be restored.
  • Example 4 is an example in which the RAW moving image data 2700 in which the RAW image data 100 are arranged in the time axis direction is white-balanced, then encoded and decoded, and the white balance is reversed.
  • the differences from the first to third embodiments will be mainly described, the same configurations as those of the first to third embodiments will be designated by the same reference numerals, and the description thereof will be omitted.
  • FIG. 30 is an explanatory diagram showing a coding and decoding example according to the fourth embodiment.
  • E WB adjustment, (A) separation and (B) coding are performed by the coding device 400, and (C) decoding, (D) synthesis and (F) WB reverse adjustment are performed by the decoding device 1900.
  • the encoding device 400 adjusts the white balance of each RAW image data 100 of the RAW moving image data 2700.
  • the white balance adjustment is performed by the white balance (auto, manual, light bulb, cloudy weather, fluorescent lamp, sunny shade, fine weather, etc.) in the coding apparatus 400.
  • the white balance-adjusted RAW image data 100 is referred to as WB-adjusted RAW image data 2200
  • the time-series WB-adjusted RAW image data 2200 is referred to as WB-adjusted RAW moving image data 3000.
  • the coding apparatus 400 acquires WB-adjusted RAW moving image data 3000 in which WB-adjusted RAW image data 2200 is arranged in the time axis direction, and each WB-adjusted RAW image data 2200 is a component for each color component. Generate a frame. As a result, the WB adjusted G1 image data string 3011, the WB adjusted G2 image data string 3012, the WB adjusted B image data string 3013, and the WB adjusted R image data string 3014 are obtained.
  • the coding device 400 encodes each color component frame between the component frames. Specifically, for example, the coding apparatus 400 encodes one of the component frame groups by in-frame prediction coding to generate an I picture, and uses the I picture to generate an I picture, and uses the I picture to generate an interframe prediction code. It is encoded by the conversion to generate a P picture or a B picture.
  • the WB-adjusted G1 image data string 3011 becomes the WB-adjusted G1 coded image data string 3021
  • the WB-adjusted G2 image data string 3012 becomes the WB-adjusted G2 coded image data string 3022
  • 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 the I picture, decodes the P picture or the B picture using the component frame decoded from the I picture, and generates another component frame. That is, the decoding device 1900 has a WB-adjusted G1 coded image data string 3021, a WB-adjusted G2 coded image data string 3022, a WB-adjusted B-coded image data string 3023, and a WB-adjusted R-coded image data string.
  • the 3024 is decoded to generate the WB-adjusted G1 image data string 3011, the WB-adjusted G2 image data string 3012, the WB-adjusted B image data string 3013, and the WB-adjusted R image data string 3014.
  • the decoding device 1900 synthesizes the decoded component frames to generate WB-adjusted RAW image data 2200.
  • the pixels G1, G2, B at the same positions of the WB-adjusted G1 image data 2211, the WB-adjusted G2 image data 2212, the WB-adjusted B image data 2213, and the WB-adjusted R image data 2214.
  • 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 each 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
  • the coding efficiency of the image data 2200 and by extension, the coding efficiency of the WB-adjusted RAW moving image data 3000 can be improved. Further, even when encoded by the component frame prediction coding in this way, the original WB-adjusted RAW image data 2200 and thus the WB-adjusted RAW moving image data 3000 can be restored.
  • the latency of coding between component frames can be improved by encoding the component frames for each slice of the WB-adjusted RAW moving image data 3000.
  • slices of the WB-adjusted G1 coded image data string 3021, the WB-adjusted G2 coded image data string 3022, the WB-adjusted B-coded image data string 3023, and the WB-adjusted R-coded image data string 3024 By decoding the component frame in units, the latency of decoding the component frame can be improved.
  • Example 5 is a modification 1 of the white balance adjustment and the white balance reverse adjustment of Examples 2 and 4.
  • the second embodiment will be described as an example, but the same applies to the fourth embodiment.
  • Example 5 the differences from Examples 1 to 4 will be mainly described, and the same configurations as those of Examples 1 to 4 will be designated by the same reference numerals, and the description thereof will be omitted.
  • the white balance detection unit 2302 detects the white balance adjustment gain coefficient AB of the B component and the white balance adjustment gain coefficient AR of the R component as the white balance suitable for the RAW image data 100 from the RAW image data 100. Further, the white balance detection unit 2302 detects the maximum luminance value Bmx of the B component and the maximum luminance value Rmx of the R component among all the pixels in the RAW image data 100, and outputs them to the white balance adjustment unit 2301.
  • the white balance adjustment unit 2301 multiplies the white balance adjustment gain coefficient AB of the B component by the maximum luminance value Bmx of the B component to obtain the pixel value YB of the B component after the white balance adjustment. calculate. Similarly, the white balance adjustment unit 2301 multiplies the white balance adjustment gain coefficient AR of the R component and the maximum luminance value Rmx of the R component to calculate the pixel value YR of the R component after the white balance adjustment.
  • the white balance adjustment unit 2301 determines whether or not the pixel value YB of the B component after the white balance adjustment is equal to or greater than the threshold value (for example, the brightness value 255). When it is equal to or more than the threshold value, it can be seen that if the white balance adjustment gain coefficient AB of the B component is applied to the white balance adjustment as it is, the pixels of the B component are saturated.
  • the threshold value for example, the brightness value 255
  • the white balance adjustment unit 2301 corrects the white balance adjustment gain coefficient AB of the B component so that the pixel value YB of the B component after the white balance adjustment is less than the threshold value. For example, the white balance adjustment unit 2301 adjusts the white balance by multiplying the white balance adjustment gain coefficient AB of the B component by the correction coefficient ⁇ (0.0 ⁇ ⁇ 1.0) as shown in the following equation (3). The later pixel value YB of the B component is corrected to a smaller value.
  • the white balance adjustment unit 2301 When the white balance adjustment gain coefficient AB of the B component is larger than 1, the white balance adjustment unit 2301 has a correction coefficient ⁇ (0.0 ⁇ ⁇ 1. The pixel value YB of the B component after white balance adjustment may be corrected to a smaller value by multiplying by 0).
  • the white balance adjusting unit 2301 determines the B component as described above.
  • the white balance adjustment gain coefficient AB may be corrected.
  • the white balance adjustment unit 2301 does not correct the white balance adjustment gain coefficient AB of the B component.
  • the white balance adjustment unit 2301 uses the white balance adjustment gain coefficient AB of the B component to be appropriate for the pixels of the other B component whose pixel value YB of the B component after the white balance adjustment does not exceed the threshold value. White balance adjustment can be performed.
  • the white balance adjusting unit 2301 determines the B component as described above.
  • the white balance adjustment gain coefficient AB may be corrected.
  • the connected pixel region is a group of pixels having two or more pixels and the two pixels adjacent to each other vertically, horizontally (or diagonally).
  • the white balance adjustment unit 2301 corrects the white balance adjustment gain coefficient AB of the B component. Therefore, the white balance adjusting unit 2301 can suppress the saturation of the connected pixel region in which the pixel value YB of the B component after the white balance adjustment is equal to or higher than the threshold value.
  • the correction coefficient ⁇ may be a value common to the white balance adjustment gain coefficient AB of the B component and the white balance adjustment gain coefficient AR of the R component, or different values may be used.
  • the white balance adjustment unit 2301 independently executes the correction of the white balance adjustment gain coefficient AB of the B component and the correction of the white balance adjustment gain coefficient AR of the R component.
  • the white balance adjustment unit 2301 may execute the correction of the white balance adjustment gain coefficient AB of the B component and the correction of the white balance adjustment gain coefficient AR of the R component in combination.
  • the white balance adjustment unit 2301 the number of pixels of the B component in which the pixel value YB of the B component after the white balance adjustment is equal to or greater than the threshold value and the pixel value YR of the R component after the white balance adjustment are equal to or greater than the threshold value.
  • the correction of the white balance adjustment gain coefficient AB of the B component and the white balance adjustment gain coefficient AR of the R component are as described above. You may perform the correction of.
  • the pixel value YB of the B component after the white balance adjustment is equal to or higher than the threshold value
  • the pixel value YR of the R component after the white balance adjustment is equal to or higher than the threshold value.
  • the white balance adjustment unit 2301 writes the white balance control information in the shooting information of the adjusted RAW image data 2200.
  • the white balance control information includes the white balance adjustment gain coefficient AB of the B component that has not been corrected, that is, the white balance adjustment gain coefficient AB for development, regardless of whether or not the white balance adjustment gain coefficient AB is corrected. The same applies to the white balance adjustment gain coefficient AR.
  • the coding unit 402 encodes the component frame.
  • the component frame Here, an example of a data structure common to the B-coded image data 2223 and the R-coded image data 2224 will be described.
  • FIG. 31 is an explanatory diagram showing an example of a data structure common to the B-coded image data 2223 and the R-coded image data 2224.
  • the coded component frame 1700 is a data structure common to the B-coded image data 2223 and the R-coded image data 2224.
  • the coded component frame 1700 includes the coded photographing information 3100 in the coded data string 1702.
  • the coded shooting information 3100 is data obtained by encoding the shooting information in the WB-adjusted RAW image data 2200.
  • the shooting information includes the uncorrected white balance adjustment gain coefficient for development.
  • the white balance adjustment gain coefficient AB of the B component for development is used, and in the case of R-coded image data 2224, the white balance adjustment gain coefficient AR of the R component for development is used. is there.
  • the control information 1712 includes the white balance control information 3101.
  • the white balance control information 3101 includes adjusted information 3111, a white balance adjustment gain coefficient 3112, and a difference flag 3113.
  • the white balance adjustment gain coefficient 3112 is the white balance adjustment gain coefficient AB of the B component for development or correction in the case of B-coded image data 2223, and is for development or correction in the case of R-coded image data 2224. It is a white balance adjustment gain coefficient AR of the R component for later development.
  • the white balance adjustment gain coefficient 3112 has the same value as the white balance adjustment gain coefficient for development written in the shooting information unless it is corrected by the white balance adjustment unit 2301. If the white balance adjustment gain coefficient 3112 is corrected by the white balance adjustment unit 2301, the white balance adjustment gain coefficient is different from the corrected white balance adjustment gain coefficient, that is, the white balance adjustment gain coefficient for development written in the shooting information. ..
  • the difference flag 3113 is a flag indicating the difference between the white balance adjustment gain coefficient for development written in the shooting information and the white balance adjustment gain coefficient 3112. In this example, if the value of the difference flag 3113 is "0", the white balance adjustment gain coefficient for development and the white balance adjustment gain coefficient 3112 written in the shooting information are the same value. Is shown.
  • the white balance adjustment gain coefficient 3112 indicates that it is a corrected value.
  • FIG. 32 is a flowchart showing an example of a procedure for generating white balance control information in the header information by the coding unit 402.
  • the processing of FIG. 32 is, for example, the component frame prediction coding (step S2404) and the component frame prediction coding (step S2405) shown in FIG. 24, in which the B-coded image data 2223 and the R-coded image data 2224 are Executed when each is generated.
  • the coding unit 402 determines whether or not the white balance adjustment gain coefficient 3112 for development has been corrected by the white balance adjustment unit 2301 (step S3201). When the white balance adjustment gain coefficient 3112 for development is not corrected (step S3201: No), the coding unit 402 writes the white balance adjustment gain coefficient 3112 for development in the white balance control information 3101 (step S3202). Then, the coding unit 402 sets the value of the difference flag 3113 to “0” (step S3203), and ends a series of processes.
  • step S3201 When the white balance adjustment gain coefficient 3112 for development is corrected (step S3201: Yes), the coding unit 402 writes the corrected white balance adjustment gain coefficient 3112 in the white balance control information 3101 (step S3204). .. Then, the coding unit 402 sets the value of the difference flag 3113 to “1” (step S3205), and ends a series of processes.
  • the second generation unit 1903 synthesizes the decoded G1 image data 2211, G2 image data 2212, B image data 2213, and R image data 2214, and WB-adjusted image data 2200. Restore to.
  • the second generation unit 1903 combines the white balance control information 3101 of the B-encoded image data 2223 and the white balance control information 3101 of the R-encoded image data 2224.
  • the white balance control information 3101 after the combination includes the adjusted information 3111, the white balance adjustment gain coefficient 3112 of the B component and its difference flag 3113, and the white balance adjustment gain coefficient 3112 of the R component and its difference flag 3113. ..
  • the white balance reverse adjustment unit 2504 refers to the white balance control information 3101 in the header information 1701 attached to the WB adjusted RAW image data 2200 obtained from the second generation unit 1903, and refers to the WB adjusted RAW image.
  • the white balance is reversely adjusted for the data 2200, and the original RAW image data 100 is restored.
  • the white balance reverse adjustment unit 2504 can obtain the original RAW image data 100 regardless of the difference flag 3113.
  • the difference flag 3113 is used, the following processing can be performed.
  • the white balance reverse adjustment unit 2504 outputs the WB adjusted RAW image data 2200 by referring to the difference flag 3113 without executing the white balance reverse adjustment. It is possible to do. Since the accuracy of the value of the difference flag 3113 is guaranteed by the coding device 400, the white balance reverse adjustment unit 2504 performs the optimum white balance adjustment performed by the coding device 400 without decoding the shooting information. Can be diverted as it is. Therefore, the efficiency of processing in the decoding device 1900 can be improved.
  • the white balance reverse adjustment unit 2504 can execute the white balance reverse adjustment with the white balance adjustment gain coefficient 3112 for development by referring to the difference flag 3113. That is, since the accuracy of the value of the difference flag 3113 is guaranteed by the coding device 400, the white balance reverse adjustment unit 2504 can execute the white balance reverse adjustment without decoding the shooting information. Therefore, it is possible to improve the efficiency of the white balance reverse adjustment in the decoding device 1900.
  • the white balance reverse adjustment unit 2504 executes the white balance reverse adjustment by referring to the difference flag 3113, and whites with the corrected white balance adjustment gain coefficient. It is possible to output RAW image data 2200 whose balance is reversely adjusted.
  • the white balance reverse adjustment unit 2504 performs the optimum white without saturation performed by the coding device 400 without decoding the shooting information.
  • the balance adjustment can be used as it is. Therefore, the efficiency of processing in the decoding device 1900 can be improved.
  • the white balance reverse adjustment unit 2504 can execute the white balance reverse adjustment with the corrected white balance adjustment gain coefficient 3112 by referring to the difference flag 3113. That is, since the accuracy of the value of the difference flag 3113 is guaranteed by the coding device 400, the white balance reverse adjustment unit 2504 can execute the white balance reverse adjustment without decoding the shooting information. Therefore, it is possible to improve the efficiency of the white balance reverse adjustment in the decoding device 1900.
  • whether or not to execute the white balance reverse adjustment may be set in advance by the decoding device 1900 by the setting file.
  • the decoding device 1900 displays screen information prompting the execution permission of the white balance reverse adjustment on the display each time, executes the white balance reverse adjustment when the execution permission is selected by the user, and selects the execution non-permission. If this is the case, the white balance reverse adjustment may not be performed.
  • the white balance reverse adjustment unit 2504 adds the white balance control information 3101 to the WB adjusted RAW image data 2200. Output with it attached. This makes it possible to confirm what kind of white balance adjustment has been applied to the WB-adjusted RAW image data 2200.
  • FIG. 33 is a flowchart showing a detailed processing procedure example of the white balance reverse adjustment processing.
  • the white balance reverse adjustment unit 2504 determines whether or not to execute the white balance reverse adjustment based on the contents of the setting file and the selection of execution permission or non-permission from the user (step S3301).
  • step S3301 When the white balance reverse adjustment is not executed (step S3301: No), the white balance reverse adjustment unit 2504 outputs the WB-adjusted RAW image data 2200 with the white balance control information 3101 (step S3302). As a result, the white balance reverse adjustment process is completed.
  • step S3301 when executing the white balance reverse adjustment (step S3301: Yes), the white balance reverse adjustment unit 2504 executes the white balance reverse adjustment using the white balance adjustment gain coefficient 3112 in the white balance control information 3101.
  • the original RAW image data 100 is output (step S3303). As a result, the white balance reverse adjustment process is completed.
  • the white balance adjustment gain coefficient 3112 can be corrected so that the pixel value after the white balance adjustment is not saturated. Further, by including the difference flag 3113 in the header information 1701 of the coding component frame 1700, the white balance reverse adjustment can be executed and restored to the original RAW image data 100 without decoding the shooting information by the decoding device 1900. , WB adjusted RAW image data 2200 can be used as it is.
  • Example 6 is a modification 2 of the white balance adjustment and the white balance reverse adjustment of Examples 2 and 4.
  • the second embodiment will be described as an example, but the same applies to the fourth embodiment.
  • Example 6 is also applicable to Example 5.
  • Example 6 the differences from Examples 1 to 4 will be mainly described, and the same configurations as those of Examples 1 to 4 will be designated by the same reference numerals, and the description thereof will be omitted.
  • FIG. 34 is an explanatory diagram showing an example of WB adjustment and WB reverse adjustment according to the sixth embodiment.
  • (A) shows an example of WB adjustment and WB reverse adjustment when Example 6 is not applied
  • (B) shows an example of WB adjustment and WB reverse adjustment when Example 6 is applied.
  • the image sensor 353 shall output a pixel signal of up to 12 bits.
  • “R” is a value of a pixel signal (pixel value of R component (R pixel value)) output from a pixel (pixel of R component) of the image pickup element 353 corresponding to the red (R) color filter 352.
  • “G” is the value of the pixel signal output from the pixel (pixel of the G component) of the image pickup element 353 corresponding to the color filter 352 of the green (G1 or G2) (pixel value of the G component (G pixel value)).
  • “B” is the value of the pixel signal (pixel value of the B component (B pixel value)) output from the pixel (pixel of the B component) of the image pickup element 353 corresponding to the blue color filter 352. ..
  • (A) is executed in the order of (A1) RAW image data output, (A2) white balance adjustment, and (A3) white balance reverse adjustment. Further, in (A), in the LSI 304, the maximum output bit of the pixel in the white balance adjustment is fixed to, for example, 12 bits. Therefore, the maximum output bit of the pixel value in (A2) and (A3) is 12 bits as in the image sensor.
  • (A1) is a pixel value of three adjacent pixels in the RAW image data output from the image sensor 353.
  • G pixel value is saturated and the value exceeds 12 bits, which is originally the maximum output bit, but the 12-bit G pixel value (Ga) is output due to the performance limit of the image sensor 353.
  • Gb is the G pixel value for the overflow due to saturation.
  • (A2) shows the result of white balance adjustment of the RAW image data including the pixels shown in (A1).
  • the R pixel should be gained to an R pixel value exceeding 12 bits due to the white balance gain, but since the maximum output bit is 12 bits, the R pixel is limited to a 12-bit R pixel value. The same applies to the B pixel.
  • (A3) shows the result of reverse white balance adjustment of the RAW image data including the pixels shown in (A2).
  • the R pixel value of (A3) becomes a pixel value different from the R pixel value of (A1) by reversely adjusting the white balance of the R pixel value of (A2).
  • (B) is executed in the order of (B1) RAW image data output, (B2) white balance adjustment, and (B3) white balance reverse adjustment. Further, in (B), in the LSI 304, the maximum output bit of the pixel in the white balance adjustment is changed (extended) from, for example, 12 bits to 13 bits. Therefore, the maximum output bit of the pixel value in (B2) and (B3) is 13 bits, unlike the image sensor.
  • (B1) is a pixel value of three adjacent pixels in the RAW image data output from the image sensor 353. Since the R pixel value, the G pixel value, and the B pixel value are the same in (A1), the description thereof will be omitted.
  • (B2) shows the result of white balance adjustment of the RAW image data including the pixels shown in (B1).
  • the R pixel is adjusted to an R pixel value exceeding 12 bits by the gain of white balance. The same applies to the B pixel.
  • (B3) shows the result of reverse white balance adjustment of the RAW image data including the pixels shown in (B2).
  • the R pixel of (B3) has the same pixel value as the R pixel value of (B1) by reversely adjusting the white balance of the R pixel value of (B2). The same applies to the B pixel.
  • the R pixel value and the B pixel value can be adjusted to a pixel value exceeding 12 bits. Therefore, when the white balance is reversely adjusted, the original R pixel value and B pixel value shown in (B1) are restored.
  • FIG. 35 is an explanatory diagram showing a process example 1 of white balance adjustment according to the sixth embodiment.
  • XB is the B pixel value in the RAW image data
  • OB is the black level of the RAW image data 100
  • AB is the white balance adjustment gain coefficient of the B component.
  • YB' is the B pixel value after adjusting the white balance of the B pixel value.
  • YB is a B pixel value after white balance adjustment that is finally determined according to the value of YB'.
  • Tmax is the maximum pixel value of the B component when the maximum output bit of the B pixel in the white balance adjustment is changed from N1 to N2 (> N1).
  • N1 is 12 bits and B2 is 13 bits.
  • Tmax is expressed by, for example, the following formula (5).
  • the function F2 is a linear function of the white balance adjustment gain coefficient AB> 1 of the B component.
  • the function F2 causes the LSI 304 to perform white balance adjustment.
  • P is a reference point that outputs OB as YB'when OB is given as XB in the functions F1 and F2.
  • the function F2 is represented by the following equation (6).
  • the saturation value of the B pixel after the white balance adjustment is larger than that in the case of the N1 bit. Therefore, it is possible to suppress distortion during decoding of saturated pixels due to the B pixel value after white balance adjustment being N1 bits.
  • FIG. 36 is an explanatory diagram showing a processing example 2 of the white balance adjustment according to the sixth embodiment.
  • the difference from the processing example 1 of FIG. 35 is the condition for obtaining YB.
  • the condition for obtaining YB is expressed by the following equation (8).
  • the maximum output bit of the B pixel in the white balance adjustment is changed from N1 to N2 (> N1) in the LSI 304 as in the process example 1 of FIG. 35, so that the B pixel after the white balance adjustment is performed.
  • the saturation value of is larger than that in the case of N1 bits, and distortion during decoding of saturated pixels due to the B pixel value after white balance adjustment being N1 bits can be suppressed.
  • XB which is smaller than OB
  • XB is a noise component
  • YB XB (XB ⁇ OB)
  • XB is output as it is without executing white balance adjustment.
  • FIG. 37 is a block diagram showing a functional configuration example of the coding device 400 according to the sixth embodiment.
  • the white balance adjustment unit 2301 and the coding unit 402 receive N1 and N2 (> N1) by external input.
  • N1 is the output bit width of each pixel of the RAW image data 100.
  • the N1 may be the same as the output bit width of the image sensor 353.
  • the bit width may be different from the output bit width of the image sensor 353.
  • the white balance adjustment unit 2301 executes the white balance adjustment with the output bit width N2, and outputs the WB-adjusted RAW image data having the output bit width N2 to the first generation unit 401.
  • the coding unit 402 encodes the component frames (G1 image data 111, G2 image data 112, B image data 113, R image data 114) output from the first generation unit 401.
  • the output bit width of each pixel value of the component frame is N2 bits. Since the output bit width N2 of each pixel of the component frame before coding is used in the decoding process of the decoding unit 1902 of the decoding device 1900, the coding component is added to the image format information 1711 in the header information 1701 of the coding component frame 1700. It is included as an example of the size of the frame 1700.
  • the coding unit 402 adds white balance control information to the control information 1712 in the header information 1701 of the coding component frame 1700 encoded by the coding unit 402.
  • the white balance control information includes information (adjusted information) indicating that the WB-adjusted RAW image data 2200 has adjusted the white balance, and WB-adjusted RAW image data 2200.
  • the white balance adjustment gain coefficient AB of the B component of the above and the white balance adjustment gain coefficient AR of the R component of the WB adjusted RAW image data 2200 are included.
  • the coding unit 402 may further include the output bit width N1 of each pixel of the RAW image data 100 in the white balance control information 1712.
  • the difference value between N1 and N2 may be used instead of N1.
  • the bit width N1 of each pixel of the RAW image encoded by the sixth embodiment and the code indicating that the coding unit 402 encodes the bit width of each pixel as N2 bits are designated by the coding component frame 1700.
  • the control information 1712 in the header information 1701 of the above may be added.
  • FIG. 38 is a block diagram showing a functional configuration example of the decoding device 1900 according to the sixth embodiment.
  • the decoding unit 1902 decodes the coded component frame 1700, outputs the output bit width N1 of each pixel of the RAW image data 100 included in the white balance control information 1712, and the component frame included in the image format information 1711.
  • the output bit width N2 of each pixel of the above is notified to the white balance reverse adjustment unit 2504.
  • the decoding unit 1902 When the white balance control information 1712 includes the difference value between N1 and N2, the decoding unit 1902 notifies the white balance reverse adjustment unit 2504 of the output bit width N2 and the difference value between N1 and N2. .. Further, the bit width N1 of each pixel of the RAW image encoded by the sixth embodiment and the code indicating that the coding unit 402 encodes the bit width of each pixel as N2 bits are the coding component frame 1700. If it is included in the control information 1712 in the header information 1701 of the above, these may be notified to the white balance reverse adjustment unit 2504.
  • the white balance reverse adjustment unit 2504 acquires the output bit width N1 of each pixel of the RAW image data 100 and the output bit width N2 of each pixel of the component frame. When the difference value between N1 and N2 is notified, the white balance reverse adjustment unit 2504 acquires the output bit width N1 by subtracting the absolute value of the difference value from the output bit width N2.
  • the white balance reverse adjustment unit 2504 refers to the white balance control information in the header information 1701 given to the WB adjusted RAW image data 2200 obtained from the second generation unit 1903, and refers to the WB adjusted RAW image data 2200. White balance is reversed and restored to the original RAW image data 100.
  • the white balance reverse adjustment unit 2504 first adjusts the white balance so that the bit width of each pixel is N2 bits. Generate RAW image data. Then, the white balance reverse adjustment unit 2504 limits the maximum value of each pixel to the maximum value that can be expressed by N1 bits, and erases the data for (N2-N1) bits from the most significant bit of each pixel. The bit width of each pixel is corrected to RAW image data 100 having an N1 bit width.
  • the white balance reverse adjustment unit 2504 When the white balance control information 1712 does not include the output bit width N1, the white balance reverse adjustment unit 2504 generates RAW image data 100 in which the bit width of each pixel is N2 bits by the white balance reverse adjustment. It will be.
  • the white balance reverse adjustment unit 2504 may not execute the reverse adjustment.
  • the coding device 400 can use the output bit width N1 as an enable signal to the white balance reverse adjustment unit 2504. Therefore, the decoding device 1900 can restore the RAW image data 100 in which the bit width of the pixel is N1 bit when the restoration permission is given by the output bit width N1 from the coding device 400.
  • the second generation unit 1903 may not execute the generation of the RAW image data in which the output bit width of each pixel is N2. ..
  • the decoding unit 1902 may not execute the decoding of the first coded image data and the second coded image data. ..
  • the encoding device 400 can use the output bit width N1 as an enable signal to the second generation unit 1903 or the decoding unit 1902. By utilizing the output bit width N1 in this way, it is possible to improve the security of the decoding device 1900.
  • the RAW image data 100 is predicted between the component frames by utilizing the property that the correlation between the component frames is increased depending on the hue and saturation. It is possible to increase the coding efficiency of the RAW image data 100, which has a high correlation with the above. Further, even when the code is encoded by the component frame prediction coding in this way, the original RAW image data 100 can be restored.
  • the RAW image data 100 is used as the coding target in Examples 1 to 6 described above, the image data processed from the RAW image data may be used as the coding target.
  • the component frame-to-frame predictive coding and its decoding have been described in Examples 1 to 6 described above, the inter-frame predictive coding in the time axis direction and its decoding may also be used.
  • Example 5 and Example 6 an example of adjusting the white balance to the RAW image data 100 was shown. However, for example, instead of adjusting the white balance, 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 Of the difference between the value of the color component data of and the value of the color component data of R, at least one difference may be small.
  • the coefficient may be adjusted when at least one of the differences between the value of the color component data of R and the value of the color component data of R is multiplied by a coefficient for reducing the difference and becomes equal to or more than a predetermined threshold.
  • the white balance adjusting unit 2301 determines whether the pixel value YB of the B component after the white balance adjustment is equal to or greater than the threshold value (for example, the brightness value 255), and is equal to or greater than the threshold value. In the case of, the white balance adjustment gain coefficient AB of the B component was corrected. However, the white balance adjusting unit 2301 determines whether or not the pixel value YB (YR) of the B component (R component) after the white balance adjustment exceeds the threshold value (for example, the brightness value 255), and determines whether or not the threshold value exceeds the threshold value. If it exceeds, the white balance adjustment gain coefficient AB of the B component (R component) may be corrected. Further, the above threshold value (for example, the brightness value 255) is an example, and may be another value.
  • each component is weighted and quantized according to the gain of the white balance adjustment. May be good.
  • the adjustment gain of the R component is larger than 1.
  • the signal level is increased by adjusting the white balance, so that the amount of generated code increases.
  • the R component when encoding, may be weighted so as to be quantized more coarsely than in the case where the white balance is not adjusted. Further, for example, in the image data in which the gain of the white balance adjustment is adjusted by A and the image data in which the gain of the white balance adjustment is adjusted by B (A ⁇ B), the image in which the gain of the white balance adjustment is adjusted by B is used. The data may be coarsely quantized.
  • RAW image data 101 color array, 111 G1 image data, 112 G2 image data, 113 B image data, 114 R image data, 121 G1 coded image data, 122 G2 coded image data, 123 B coded image data, 124 R coded image data, 300 information processing device, 301 processor, 302 storage device, 353 image pickup element, 400 coding device, 401 first generation unit, 402 coding unit, 403 recording unit, 610 misalignment detection unit, 611 1st pixel position compensation unit, 1700 coding 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 2200 WB adjusted RAW image data, 2301 white balance adjustment unit, 2504 white balance reverse adjustment unit, 2700 RAW moving image data, 3000 WB adjusted RAW moving image data, 3101 white balance control information, 3111 adjusted information, 3112 White balance adjustment gain coefficient, 3113 Difference flag

Landscapes

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

Abstract

符号化装置は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値を調整する調整部と、前記調整部により画素値が調整された画像データと、前記第1係数と、前記第2係数と、を符号化する符号化部と、を有する。

Description

符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム 参照による取り込み
 本出願は、平成31年(2019年)3月15日に出願されたPCT出願であるPCT/JP2019/011015の優先権を主張し、その内容を参照することにより、本出願に取り込む。
 本発明は、符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラムに関する。
 画像を色成分毎に圧縮する技術がある(たとえば、下記特許文献1を参照。)。しかしながら、上述した従来技術では、成分フレーム間の相関性が活用されていない。
特開2002-125241号公報
 本開示技術の符号化装置は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値を調整する調整部と、前記調整部により画素値が調整された画像データと、前記第1係数と、前記第2係数と、を符号化する符号化部と、を有する。
 本開示技術の他の符号化装置は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて、前記少なくとも第2色成分の画素値を調整する調整部と、前記調整部によって前記少なくとも第2色成分の画素値が調整された画像データを符号化するとともに、前記符号化された画像データに前記第1係数を付与する符号化部と、を有する。
 本開示技術の別の符号化装置は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データの各画素の第1出力ビット幅を前記第1出力ビット幅よりも大きい第2出力ビット幅に変更し、当該変更後の画像データのホワイトバランスを調整する調整部と、前記調整部によってホワイトバランスが調整された画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成部と、前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、を有する。
 本開示技術の復号装置は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値が調整された調整済み画像データと、前記第1係数と、前記第2係数と、が符号化された符号化データを、取得する取得部と、前記取得部によって取得された符号化データを復号する復号部と、前記復号部によって復号された調整済み画像データを、前記復号部によって復号された第2係数に基づいて、調整する調整部と、を有する。
 本開示技術の他の復号装置は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて前記少なくとも第2色成分の画素値が調整された調整済み画像データが符号化された符号化調整済み画像データと、前記符号化調整済み画像データに付与された前記第1係数と、を含む符号化データを取得する取得部と、前記取得部によって取得された符号化データを復号する復号部と、前記復号部によって復号された調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する調整部と、を有する。
 本開示技術の別の復号装置は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データを復元する復号装置であって、前記第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、前記第1画像データおよび前記第2画像データに施されたホワイトバランスに関する情報と、前記画像データの各画素の出力ビット幅よりも小さい特定の出力ビット幅と、を取得する取得部と、前記取得部によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得部によって取得された第2符号化画像データを前記第2画像データに復号する復号部と、前記復号部によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置された画像データを生成する生成部と、前記ホワイトバランスに関する情報と、前記特定の出力ビット幅と、に基づいて、前記生成部によって生成された画像データの色をホワイトバランスによる調整前の色に変換する調整部と、を有する。
 本開示技術の符号化方法は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値を調整する調整処理と、前記調整処理により画素値が調整された画像データと、前記第1係数と、前記第2係数と、を符号化する符号化処理と、を有する。
 本開示技術の他の符号化方法は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて、前記少なくとも第2色成分の画素値を調整する調整処理と、前記調整処理によって前記少なくとも第2色成分の画素値が調整された画像データを符号化するとともに、前記符号化された画像データに前記第1係数を付与する符号化処理と、を有する。
 本開示技術の別の符号化方法は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データの各画素の第1出力ビット幅を前記第1出力ビット幅よりも大きい第2出力ビット幅に変更し、当該変更後の画像データのホワイトバランスを調整する調整処理と、前記調整処理によってホワイトバランスが調整された画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成処理と、前記生成処理によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化処理と、を有する。
 本開示技術の復号方法は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値が調整された調整済み画像データと、前記第1係数と、前記第2係数と、が符号化された符号化データを、取得する取得処理と、前記取得処理によって取得された符号化データを復号する復号処理と、前記復号処理によって復号された調整済み画像データを、前記復号処理によって復号された第2係数に基づいて、調整する調整処理と、を有する。
 本開示技術の他の復号方法は、第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて前記少なくとも第2色成分の画素値が調整された調整済み画像データが符号化された符号化調整済み画像データと、前記符号化調整済み画像データに付与された前記第1係数と、を含む符号化データを取得する取得処理と、前記取得処理によって取得された符号化データを復号する復号処理と、前記復号処理によって復号された調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する調整処理と、を有する。
 本開示技術の別の復号方法は、第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データを復元する復号方法であって、前記第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、前記第1画像データおよび前記第2画像データに施されたホワイトバランスに関する情報と、前記画像データの各画素の出力ビット幅よりも小さい特定の出力ビット幅と、を取得する取得処理と、前記取得処理によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得処理によって取得された第2符号化画像データを前記第2画像データに復号する復号処理と、前記復号処理によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置された画像データを生成する生成処理と、前記ホワイトバランスに関する情報と、前記特定の出力ビット幅と、に基づいて、前記生成部によって生成された画像データの色をホワイトバランスによる調整前の色に変換する調整処理と、を有する。
図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にかかる符号化および復号例を示す説明図である。 図31は、B符号化画像データおよびR符号化画像データに共通のデータ構造例を示す説明図である。 図32は、符号化部によるヘッダ情報内のホワイトバランス制御情報の生成処理手順例を示すフローチャートである。 図33は、ホワイトバランス逆調整処理の詳細な処理手順例を示すフローチャートである。 図34は、実施例6にかかるWB調整およびWB逆調整例を示す説明図である。 図35は、実施例6にかかるホワイトバランス調整の処理例1を示す説明図である。 図36は、実施例6にかかるホワイトバランス調整の処理例2を示す説明図である。 図37は、実施例6にかかる符号化装置の機能的構成例を示すブロック図である。 図38は、実施例6にかかる復号装置の機能的構成例を示すブロック図である。
 以下、添付図面を用いて、各実施例について説明する。なお、各実施例で符号化の対象となる画像データは、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に記録する。符号化装置400は、記憶デバイス302に記録された符号化成分フレームを後述する復号装置1900に送信してもよい。
 第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符号化画像データとを取得する。取得部1901は、復号装置1900の記憶デバイス302から、または、符号化装置400との通信により、第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)に示したような成分フレームの分離を実行することになる。ホワイトバランス調整部2301は、たとえば、RAW画像データ100の黒レベルを基準に、RAW画像データ100の画素値にホワイトバランス調整ゲイン係数を乗じることでホワイトバランス調整処理を実行する。
 たとえば、RAW画像データ100の黒レベルをOB、B成分の画素値をXB、B成分のホワイトバランス調整ゲイン係数をABとするとき、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBを以下のように算出する。
 YB=(XB-OB)×AB+OB・・・(1)
 また、上記式(1)に替えて、下記式(2)により、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBを算出してもよい。これにより、計算処理が簡素化される。
 YB=XB×AB・・・(2)
 ホワイトバランス検出部2302は、RAW画像データ100から当該RAW画像データ100に適したホワイトバランスを検出し、ホワイトバランス調整部2301に通知する。これにより、ホワイトバランス調整部2301は、通知を受けたホワイトバランス(オート、マニュアル、電球、曇天、蛍光灯、晴天日陰、晴天など)により、RAW画像データ100についてホワイトバランス調整を実行する。
 また、ホワイトバランス検出部2302は、検出したホワイトバランスを特定する情報(ホワイトバランス制御情報)を符号化部402に通知する。具体的には、たとえば、図6に示したように、ホワイトバランス制御情報は、可変長符号化部605に出力される。これにより、符号化部402は、符号化部402が符号化した符号化成分フレーム1700のヘッダ情報1701内の制御情報1712にホワイトバランス制御情報を付与することができる。
 ここで、ホワイトバランス制御情報とは、たとえば、WB調整済みRAW画像データ2200がホワイトバランスを調整済みであることを示す情報(以下、「調整済み情報」という)と、WB調整済みRAW画像データ2200のB成分のホワイトバランス調整ゲイン係数ABと、WB調整済みRAW画像データ2200のR成分のホワイトバランス調整ゲイン係数(以下、AR)と、で構成される。
 後述する復号装置1900は、制御情報1712に付与された調整済み情報によりRAW画像データ2200がホワイトバランス調整済みであることを認識できる。また、復号装置1900は、制御情報1712に付与されたB成分とR成分の各ホワイトバランス調整ゲイン係数により、復号処理でホワイトバランス逆調整が可能となる。
 なお、制御情報1712には、上述した調整済み情報と、B成分のホワイトバランス調整ゲイン係数ABと、R成分のホワイトバランス調整ゲイン係数ARと、のうち少なくとも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は、WB調整済み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について、スライス単位で成分フレームを復号することにより、成分フレーム復号のレイテンシの向上を図ることができる。
 実施例5は、実施例2および実施例4のホワイトバランス調整およびホワイトバランス逆調整の変形例1である。実施例5では、実施例2を例に挙げて説明するが、実施例4でも同様である。なお、実施例5では、実施例1~実施例4との相違点を中心に説明し、実施例1~実施例4と同一構成には同一符号を付し、その説明を省略する。
 [符号化装置400の処理]
 まず、符号化装置400の処理について説明する。ホワイトバランス検出部2302は、RAW画像データ100から当該RAW画像データ100に適したホワイトバランスとして、B成分のホワイトバランス調整ゲイン係数ABと、R成分のホワイトバランス調整ゲイン係数ARと、を検出する。また、ホワイトバランス検出部2302は、RAW画像データ100内の全画素のうち、B成分の最大輝度値BmxおよびR成分の最大輝度値Rmxを検出して、ホワイトバランス調整部2301に出力する。
 ホワイトバランス調整部2301は、上記式(2)のように、B成分のホワイトバランス調整ゲイン係数ABとB成分の最大輝度値Bmxとを乗じて、ホワイトバランス調整後のB成分の画素値YBを算出する。同様に、ホワイトバランス調整部2301は、R成分のホワイトバランス調整ゲイン係数ARとR成分の最大輝度値Rmxとを乗じて、ホワイトバランス調整後のR成分の画素値YRを算出する。
 ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値(例として輝度値255)以上であるか否かを判断する。しきい値以上である場合、B成分のホワイトバランス調整ゲイン係数ABをそのままホワイトバランス調整に適用すると、当該B成分の画素が飽和してしまうことが分かる。
 したがって、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値未満となるように、B成分のホワイトバランス調整ゲイン係数ABを補正する。たとえば、ホワイトバランス調整部2301は、下記式(3)のように、B成分のホワイトバランス調整ゲイン係数ABに、補正係数α(0.0<α≦1.0)を乗じて、ホワイトバランス調整後のB成分の画素値YBをより小さい値に補正する。
 YB=XB×AB×α・・・(3)
 なお、ホワイトバランス調整部2301は、下記式(4)のように、B成分のホワイトバランス調整ゲイン係数ABが1より大きい場合、1より大きい値に補正係数α(0.0<α≦1.0)を乗じて、ホワイトバランス調整後のB成分の画素値YBをより小さい値に補正してもよい。
 YB=XB×(1.0+ab×α)・・・(4)
 ただし、AB=(1.0+ab)で、
 abは、ABの小数点以下の数値。
 また、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値以上となるB成分の画素数が所定画素数以上である場合に、上記のように、B成分のホワイトバランス調整ゲイン係数ABを補正してもよい。これにより、現像後に飽和の影響を無視できるような程度の画素数の場合には、ホワイトバランス調整部2301は、B成分のホワイトバランス調整ゲイン係数ABの補正を実行しない。
 したがって、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値以上とならない他のB成分の画素について、B成分のホワイトバランス調整ゲイン係数ABを用いて、適切なホワイトバランス調整を実行することができる。
 また、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値以上となるB成分の連結画素領域が所定画素数以上である場合に、上記のように、B成分のホワイトバランス調整ゲイン係数ABを補正してもよい。連結画素領域とは、2以上の画素であり、かつ、2つの画素が上下左右(または斜め)のいずれかに隣接しあう画素群である。
 これにより、現像後に飽和の影響が出るような領域を連結画素領域として特定して、ホワイトバランス調整部2301は、B成分のホワイトバランス調整ゲイン係数ABの補正を実行する。したがって、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値以上となる連結画素領域の飽和を抑制することができる。
 上記では、B成分のホワイトバランス調整ゲイン係数ABの補正について説明したが、R成分のホワイトバランス調整ゲイン係数ARについても同様に補正される。なお、補正係数αは、B成分のホワイトバランス調整ゲイン係数ABおよびR成分のホワイトバランス調整ゲイン係数ARとで共通の値を用いてもよく、異なる値を用いてもよい。
 また、上記の例では、ホワイトバランス調整部2301は、B成分のホワイトバランス調整ゲイン係数ABの補正とR成分のホワイトバランス調整ゲイン係数ARの補正とを、独立して実行することとした。これに対し、ホワイトバランス調整部2301は、B成分のホワイトバランス調整ゲイン係数ABの補正とR成分のホワイトバランス調整ゲイン係数ARの補正とを、組み合わせて実行してもよい。
 たとえば、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値以上となるB成分の画素数と、ホワイトバランス調整後のR成分の画素値YRがしきい値以上となるR成分の画素数と、の合計画素数が、所定画素数以上である場合に、上記のように、B成分のホワイトバランス調整ゲイン係数ABの補正とR成分のホワイトバランス調整ゲイン係数ARの補正とを実行してもよい。
 同様に、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値以上となるB成分の画素と、ホワイトバランス調整後のR成分の画素値YRがしきい値以上となるR成分の画素と、の連結画素領域が、所定画素数以上である場合に、上記のように、B成分のホワイトバランス調整ゲイン係数ABの補正とR成分のホワイトバランス調整ゲイン係数ARの補正とを実行してもよい。
 このように、ホワイトバランス調整後にしきい値となるB成分の画素とR成分の画素が混在する場合にも、B成分のホワイトバランス調整ゲイン係数ABとR成分のホワイトバランス調整ゲイン係数ARとの補正が可能となる。
 なお、ホワイトバランス調整部2301は、ホワイトバランス制御情報を調整済みRAW画像データ2200の撮影情報に書き込む。ホワイトバランス制御情報は、ホワイトバランス調整ゲイン係数ABの補正の有無に関わらず、当該補正がされていないB成分のホワイトバランス調整ゲイン係数AB、すなわち、現像用のホワイトバランス調整ゲイン係数ABを含む。ホワイトバランス調整ゲイン係数ARについても同様である。
 このあと、符号化部402は、成分フレームを符号化する。ここで、B符号化画像データ2223およびR符号化画像データ2224に共通のデータ構造例について説明する。
 図31は、B符号化画像データ2223およびR符号化画像データ2224に共通のデータ構造例を示す説明図である。符号化成分フレーム1700は、B符号化画像データ2223およびR符号化画像データ2224に共通のデータ構造である。符号化成分フレーム1700は、符号化データ列1702に符号化撮影情報3100を含む。符号化撮影情報3100は、WB調整済みRAW画像データ2200内の撮影情報を符号化したデータである。
 撮影情報には、補正されていない現像用のホワイトバランス調整ゲイン係数が含まれる。たとえば、B符号化画像データ2223であれば、現像用のB成分のホワイトバランス調整ゲイン係数ABであり、R符号化画像データ2224であれば、現像用のR成分のホワイトバランス調整ゲイン係数ARである。
 制御情報1712は、ホワイトバランス制御情報3101を含む。ホワイトバランス制御情報3101は、調整済み情報3111と、ホワイトバランス調整ゲイン係数3112と、異同フラグ3113と、を含む。ホワイトバランス調整ゲイン係数3112は、B符号化画像データ2223であれば、現像用または補正後のB成分のホワイトバランス調整ゲイン係数ABであり、R符号化画像データ2224であれば、現像用または補正後の現像用のR成分のホワイトバランス調整ゲイン係数ARである。
 具体的には、たとえば、ホワイトバランス調整ゲイン係数3112は、ホワイトバランス調整部2301で補正されていなければ、撮影情報に書き込まれた現像用のホワイトバランス調整ゲイン係数と同じ値になる。ホワイトバランス調整ゲイン係数3112は、ホワイトバランス調整部2301で補正されていれば、補正後のホワイトバランス調整ゲイン係数、すなわち、撮影情報に書き込まれた現像用のホワイトバランス調整ゲイン係数と異なる値になる。
 異同フラグ3113は、撮影情報に書き込まれている現像用のホワイトバランス調整ゲイン係数と、ホワイトバランス調整ゲイン係数3112と、の異同を示すフラグである。本例では、異同フラグ3113の値が「0」であれば、撮影情報に書き込まれている現像用のホワイトバランス調整ゲイン係数と、ホワイトバランス調整ゲイン係数3112と、は、同一の値であることを示す。
 異同フラグ3113の値が「1」であれば、撮影情報に書き込まれている現像用のホワイトバランス調整ゲイン係数と、ホワイトバランス調整ゲイン係数3112と、は、異なる値であることを示す。すなわち、ホワイトバランス調整ゲイン係数3112は、補正後の値であることを示す。
 図32は、符号化部402によるヘッダ情報内のホワイトバランス制御情報の生成処理手順例を示すフローチャートである。図32の処理は、たとえば、図24に示した成分フレーム内予測符号化(ステップS2404)や成分フレーム間予測符号化(ステップS2405)で、B符号化画像データ2223およびR符号化画像データ2224がそれぞれ生成される場合に実行される。
 符号化部402は、ホワイトバランス調整部2301により現像用のホワイトバランス調整ゲイン係数3112が補正されたか否かを判断する(ステップS3201)。現像用のホワイトバランス調整ゲイン係数3112が補正されていない場合(ステップS3201:No)、符号化部402は、現像用のホワイトバランス調整ゲイン係数3112をホワイトバランス制御情報3101に書き込む(ステップS3202)。そして、符号化部402は、異同フラグ3113の値を「0」に設定して(ステップS3203)、一連の処理を終了する。
 また、現像用のホワイトバランス調整ゲイン係数3112が補正された場合(ステップS3201:Yes)、符号化部402は、補正後のホワイトバランス調整ゲイン係数3112をホワイトバランス制御情報3101に書き込む(ステップS3204)。そして、符号化部402は、異同フラグ3113の値を「1」に設定して(ステップS3205)、一連の処理を終了する。
 [復号装置1900の処理]
 つぎに、復号装置1900の処理について説明する。第2生成部1903は、実施例2で説明したように、復号されたG1画像データ2211、G2画像データ2212、B画像データ2213、およびR画像データ2214を合成して、WB調整済み画像データ2200に復元する。
 このとき、第2生成部1903は、B符号化画像データ2223のホワイトバランス制御情報3101と、R符号化画像データ2224のホワイトバランス制御情報3101と、を組み合わせる。組み合わせ後のホワイトバランス制御情報3101は、調整済み情報3111と、B成分のホワイトバランス調整ゲイン係数3112およびその異同フラグ3113と、R成分のホワイトバランス調整ゲイン係数3112およびその異同フラグ3113と、を含む。
 ホワイトバランス逆調整部2504は、第2生成部1903から得られたWB調整済みRAW画像データ2200に付与されている、ヘッダ情報1701内のホワイトバランス制御情報3101を参照して、WB調整済みRAW画像データ2200についてホワイトバランス逆調整をし、元のRAW画像データ100に復元する。この場合、ホワイトバランス逆調整部2504は、異同フラグ3113にかかわらず、元のRAW画像データ100を得ることができる。異同フラグ3113を利用する場合、以下のような処理が可能である。
 (A)異同フラグ3113の値が「0」の場合
 ホワイトバランス逆調整部2504は、異同フラグ3113を参照することにより、ホワイトバランス逆調整を実行せずに、WB調整済みRAW画像データ2200を出力することが可能である。異同フラグ3113の値の正確性は、符号化装置400で保証されているため、ホワイトバランス逆調整部2504は、撮影情報を解読することなく、符号化装置400で実行された最適なホワイトバランス調整をそのまま流用することができる。したがって、復号装置1900での処理の効率化を図ることができる。
 一方、ホワイトバランス逆調整部2504は、異同フラグ3113を参照することにより、現像用のホワイトバランス調整ゲイン係数3112で、ホワイトバランス逆調整を実行することができる。すなわち、異同フラグ3113の値の正確性は、符号化装置400で保証されているため、ホワイトバランス逆調整部2504は、撮影情報を解読することなく、ホワイトバランス逆調整を実行することができる。したがって、復号装置1900でのホワイトバランス逆調整の効率化を図ることができる。
 (B)異同フラグ3113の値が「1」の場合
 ホワイトバランス逆調整部2504は、異同フラグ3113を参照することにより、ホワイトバランス逆調整を実行して、補正後のホワイトバランス調整ゲイン係数でホワイトバランス逆調整されたRAW画像データ2200を出力することが可能である。
 異同フラグ3113の値の正確性は、符号化装置400で保証されているため、ホワイトバランス逆調整部2504は、撮影情報を解読することなく、符号化装置400で実行された飽和しない最適なホワイトバランス調整をそのまま流用することができる。したがって、復号装置1900での処理の効率化を図ることができる。
 一方、ホワイトバランス逆調整部2504は、異同フラグ3113を参照することにより、補正後のホワイトバランス調整ゲイン係数3112で、ホワイトバランス逆調整を実行することができる。すなわち、異同フラグ3113の値の正確性は、符号化装置400で保証されているため、ホワイトバランス逆調整部2504は、撮影情報を解読することなく、ホワイトバランス逆調整を実行することができる。したがって、復号装置1900でのホワイトバランス逆調整の効率化を図ることができる。
 なお、上記(A)および(B)のいずれの場合であっても、ホワイトバランス逆調整を実行するか否かは、設定ファイルにより、あらかじめ復号装置1900で設定されていてもよい。また、復号装置1900は、その都度、ホワイトバランス逆調整の実行許可を促す画面情報をディスプレイに表示し、ユーザから実行許可が選択された場合にホワイトバランス逆調整を実行し、実行不許可が選択された場合にホワイトバランス逆調整を実行しないこととしてもよい。
 また、上記(A)および(B)のいずれの場合であっても、ホワイトバランス逆調整を実行しない場合、ホワイトバランス逆調整部2504は、WB調整済みRAW画像データ2200にホワイトバランス制御情報3101を付与したまま出力する。これにより、WB調整済みRAW画像データ2200にどのようなホワイトバランス調整が施されているかを確認することができる。
 図33は、ホワイトバランス逆調整処理の詳細な処理手順例を示すフローチャートである。ホワイトバランス逆調整部2504は、設定ファイルの内容や、ユーザからの実行許可または不許可の選択により、ホワイトバランス逆調整を実行するか否かを判断する(ステップS3301)。
 ホワイトバランス逆調整を実行しない場合(ステップS3301:No)、ホワイトバランス逆調整部2504は、ホワイトバランス制御情報3101付きのWB調整済みRAW画像データ2200を出力する(ステップS3302)。これにより、ホワイトバランス逆調整処理が終了する。
 一方、ホワイトバランス逆調整を実行する場合(ステップS3301:Yes)、ホワイトバランス逆調整部2504は、ホワイトバランス制御情報3101内のホワイトバランス調整ゲイン係数3112を用いてホワイトバランス逆調整を実行して、元のRAW画像データ100を出力する(ステップS3303)。これにより、ホワイトバランス逆調整処理が終了する。
 このように、実施例5によれば、ホワイトバランス調整後の画素値が飽和しないように、ホワイトバランス調整ゲイン係数3112を補正することができる。また、異同フラグ3113を符号化成分フレーム1700のヘッダ情報1701に含めることにより、復号装置1900で撮影情報を解読することなく、ホワイトバランス逆調整を実行して元のRAW画像データ100に復元したり、WB調整済みRAW画像データ2200をそのまま流用したりすることができる。
 実施例6は、実施例2および実施例4のホワイトバランス調整およびホワイトバランス逆調整の変形例2である。実施例6では、実施例2を例に挙げて説明するが、実施例4でも同様である。また、実施例6は、実施例5にも適用可能である。なお、実施例6では、実施例1~実施例4との相違点を中心に説明し、実施例1~実施例4と同一構成には同一符号を付し、その説明を省略する。
 <WB調整およびWB逆調整例>
 図34は、実施例6にかかるWB調整およびWB逆調整例を示す説明図である。(A)は、実施例6が適用されない場合のWB調整およびWB逆調整例を示し、(B)は、実施例6が適用された場合のWB調整およびWB逆調整例を示す。
 なお、(A)および(B)において、撮像素子353は、最大12ビットの画素信号を出力するものとする。また、「R」は、赤(R)のカラーフィルタ352に対応する撮像素子353の画素(R成分の画素)から出力された画素信号の値(R成分の画素値(R画素値))であり、「G」は、緑(G1またはG2)のカラーフィルタ352に対応する撮像素子353の画素(G成分の画素)から出力された画素信号の値(G成分の画素値(G画素値))であり、「B」は、青のカラーフィルタ352に対応する撮像素子353の画素(B成分の画素)から出力された画素信号の値(B成分の画素値(B画素値))である。
 まず(A)について説明する。(A)は、(A1)RAW画像データ出力、(A2)ホワイトバランス調整、(A3)ホワイトバランス逆調整の順に実行される。また、(A)では、LSI304では、ホワイトバランス調整における画素の最大出力ビットが、たとえば、12ビットに固定されている。したがって、(A2)および(A3)での画素値の最大出力ビットは、撮像素子と同様12ビットになる。
 (A1)は、撮像素子353から出力されたRAW画像データ内の隣接する3画素の画素値である。ここでは、G画素値のみが飽和して、本来的には最大出力ビットである12ビットを超えた値とするが、撮像素子353の性能限界により12ビットのG画素値(Ga)が出力されている。Gbが飽和によるオーバーフロー分のG画素値である。
 (A2)は、(A1)で示した画素を含むRAW画像データをホワイトバランス調整した結果を示す。R画素は、ホワイトバランスのゲインにより、本来であれば、12ビットを超えるR画素値にゲインされるはずが、最大出力ビットが12ビットであるため、12ビットのR画素値に制限される。B画素も同様である。
 (A3)は、(A2)で示した画素を含むRAW画像データをホワイトバランス逆調整した結果を示す。(A3)のR画素は、(A2)のR画素値をホワイトバランス逆調整することにより、(A1)のR画素値とは異なる画素値となる。B画素も同様である。
 このように、LSI304では、ホワイトバランス調整における画素の最大出力ビットが12ビットに固定されているため、R画素値やB画素値を、12ビットを超えた画素値にゲインできない。したがって、ホワイトバランス逆調整した場合に、(A1)に示した元のR画素値およびB画素値に復元されない。
 つぎに、(B)について説明する。(B)は、(A)と同様、(B1)RAW画像データ出力、(B2)ホワイトバランス調整、(B3)ホワイトバランス逆調整の順に実行される。また、(B)では、LSI304では、ホワイトバランス調整における画素の最大出力ビットが、たとえば、12ビットから13ビットに変更(拡張)されている。したがって、(B2)および(B3)での画素値の最大出力ビットは、撮像素子と異なり、13ビットになる。
 (B1)は、(A1)と同様、撮像素子353から出力されたRAW画像データ内の隣接する3画素の画素値である。R画素値、G画素値およびB画素値については、(A1)で同一であるため、説明を省略する。
 (B2)は、(B1)で示した画素を含むRAW画像データをホワイトバランス調整した結果を示す。R画素は、ホワイトバランスのゲインにより、12ビットを超えるR画素値に調整されている。B画素も同様である。
 (B3)は、(B2)で示した画素を含むRAW画像データをホワイトバランス逆調整した結果を示す。(B3)のR画素は、(B2)のR画素値をホワイトバランス逆調整することにより、(B1)のR画素値と同じ画素値となる。B画素も同様である。
 このように、LSI304では、ホワイトバランス調整における画素の最大出力ビットが12ビットから13ビットに変更されたため、R画素値やB画素値を、12ビットを超えた画素値に調整することができる。したがって、ホワイトバランス逆調整した場合に、(B1)に示した元のR画素値およびB画素値に復元される。
 なお、図34の例では、G画素値が飽和した時にホワイトバランス調整およびホワイトバランス逆調整をした例について説明したが、B画素値またはR画素値が飽和した場合、R画素値、G画素値、およびB画素値のうちいずれか2つの画素値が飽和した場合も同様に、ホワイトバランス調整により12ビットを超えて調整可能であり、ホワイトバランス逆調整により、ホワイトバランス調整前の元の画素値に復元可能である。
 <ホワイトバランス調整の処理例1>
 図35は、実施例6にかかるホワイトバランス調整の処理例1を示す説明図である。グラフ3500において、XBは、RAW画像データにおけるB画素値であり、OBは、RAW画像データ100の黒レベルであり、ABは、B成分のホワイトバランス調整ゲイン係数である。YB´は、B画素値をホワイトバランス調整後のB画素値である。YBは、YB´の値に応じて最終的に決定されるホワイトバランス調整後のB画素値である。
 Tmaxは、ホワイトバランス調整におけるB画素の最大出力ビットをN1からN2(>N1)に変更した場合のB成分の最大画素値である。図34の例では、N1は12ビットであり、B2は13ビットである。Tmaxは、たとえば、下記式(5)であらわされる。
 Tmax=2N2-1・・・(5)
 関数F1は、B成分のホワイトバランス調整ゲイン係数AB=1の線形な関数であり、XB=YB´となる。すなわち、ホワイトバランス調整が実行されないことを示す。関数F2は、B成分のホワイトバランス調整ゲイン係数AB>1の線形な関数である。関数F2により、LSI304は、ホワイトバランス調整を実行する。Pは、関数F1、F2においてXBとしてOBが与えられると、YB´としてOBを出力する基準点である。関数F2は、下記式(6)によりあらわされる。
 YB´=(XB-OB)×AB+OB・・・(6)
 そして、最終的に決定されるホワイトバランス調整後のB画素値YBは、下記式(7)によりあわらされる。
 YB=0     YB´<0
   =YB´   0≦YB´<Tmax
   =Ymax  Tmax≦YB´・・・・・・(7)
 なお、実施例5に適用する場合は、上記式(6)のABを、AB=(1.0+ab×α)とすればよい。
 このように、LSI304において、ホワイトバランス調整におけるB画素の最大出力ビットをN1からN2(>N1)に変更することで、ホワイトバランス調整後のB画素の飽和値がN1ビットの場合に比べて大きくなり、ホワイトバランス調整後のB画素値をN1ビットとすることに起因した飽和画素の復号時の歪を抑制することができる。
 なお、図35では、飽和していないB画素をホワイトバランス調整する場合を例に挙げて説明したが、飽和していないR画素やG画素をホワイトバランス調整する場合も同様である。
 <ホワイトバランス調整の処理例2>
 図36は、実施例6にかかるホワイトバランス調整の処理例2を示す説明図である。図35の処理例1との相違点は、YBを求めるための条件である。処理例2の場合、YBを求めるための条件は、下記式(8)であらわされる。
 YB=XB    XB<OB
   =YB´   0≦YB´<Tmax
   =Ymax  Tmax≦YB´・・・・・・(8)
 上記式(8)により、図35の処理例1と同様、LSI304において、ホワイトバランス調整におけるB画素の最大出力ビットをN1からN2(>N1)に変更することで、ホワイトバランス調整後のB画素の飽和値がN1ビットの場合に比べて大きくなり、ホワイトバランス調整後のB画素値をN1ビットとすることに起因した飽和画素の復号時の歪を抑制することができる。
 また、OBよりも小さいXBはノイズ成分であり、ホワイトバランス調整を実行しても相関性の向上が期待できない。このため、YB=XB(XB<OB)で示したように、OBよりも小さいXBについては、ホワイトバランス調整を実行せずに、そのままXBを出力する。これにより、OBとしての情報を残しつつ、OBよりも小さいXBに含まれるノイズ成分のゲインを抑制することができる。
 <符号化装置400の機能的構成例>
 図37は、実施例6にかかる符号化装置400の機能的構成例を示すブロック図である。以下、図23との相違点について説明する。ホワイトバランス調整部2301および符号化部402は、外部入力によりN1およびN2(>N1)を受け付ける。N1は、RAW画像データ100の各画素の出力ビット幅である。具体的には、たとえば、N1は、撮像素子353からのRAW画像データをそのまま利用する場合には、撮像素子353の出力ビット幅と同一としてもよい。ただし、撮像素子353の出力ビット幅と異なるビット幅でもよい。
 ホワイトバランス調整部2301は、出力ビット幅N2でホワイトバランス調整を実行し、出力ビット幅がN2となるWB調整済みRAW画像データを第1生成部401に出力する。図34の例では、N1=12ビットであり、N2=13ビットであるが、12ビットよりも大きければ14ビット以上でもよい。
 符号化部402は、第1生成部401から出力された成分フレーム(G1画像データ111,G2画像データ112,B画像データ113,R画像データ114)を符号化する。成分フレームの各画素値の出力ビット幅は、N2ビットである。符号化前の成分フレームの各画素の出力ビット幅N2は、復号装置1900の復号部1902の復号処理で用いられるため、符号化成分フレーム1700のヘッダ情報1701内の画像形式情報1711に符号化成分フレーム1700のサイズの一例として含まれている。
 また、実施例1で説明したように、符号化部402は、符号化部402が符号化した符号化成分フレーム1700のヘッダ情報1701内の制御情報1712にホワイトバランス制御情報を付与する。このホワイトバランス制御情報には、実施例1で説明したように、WB調整済みRAW画像データ2200がホワイトバランスを調整済みであることを示す情報(調整済み情報)と、WB調整済みRAW画像データ2200のB成分のホワイトバランス調整ゲイン係数ABと、WB調整済みRAW画像データ2200のR成分のホワイトバランス調整ゲイン係数ARと、が含まれる。実施例6では、さらに、符号化部402は、RAW画像データ100の各画素の出力ビット幅N1と、をホワイトバランス制御情報1712に含めてもよい。また、N1ではなく、N1とN2との差分値でもよい。また、実施例6により符号化するRAW画像の各画素のビット幅N1と、符号化部402が、各画素のビット幅をN2ビットとして符号化したことを示す符号とを、符号化成分フレーム1700のヘッダ情報1701内の制御情報1712に付与してもよい。
 <復号装置1900の機能的構成例>
 図38は、実施例6にかかる復号装置1900の機能的構成例を示すブロック図である。復号部1902は、符号化成分フレーム1700を復号するとともに、ホワイトバランス制御情報1712に含まれているRAW画像データ100の各画素の出力ビット幅N1と、画像形式情報1711に含まれている成分フレームの各画素の出力ビット幅N2と、を、ホワイトバランス逆調整部2504に通知する。
 ホワイトバランス制御情報1712にN1とN2との差分値が含まれている場合、復号部1902は、出力ビット幅N2と、N1とN2との差分値と、をホワイトバランス逆調整部2504に通知する。また、実施例6により符号化するRAW画像の各画素のビット幅N1と、符号化部402が、各画素のビット幅をN2ビットとして符号化したことを示す符号とが、符号化成分フレーム1700のヘッダ情報1701内の制御情報1712に含まれている場合、これらをホワイトバランス逆調整部2504に通知してもよい。
 ホワイトバランス逆調整部2504は、RAW画像データ100の各画素の出力ビット幅N1と、成分フレームの各画素の出力ビット幅N2と、を取得する。N1とN2との差分値が通知された場合には、ホワイトバランス逆調整部2504は、出力ビット幅N2から当該差分値の絶対値を減算することにより、出力ビット幅N1を取得する。ホワイトバランス逆調整部2504は、第2生成部1903から得られたWB調整済みRAW画像データ2200に付与されているヘッダ情報1701内のホワイトバランス制御情報を参照して、WB調整済みRAW画像データ2200についてホワイトバランス逆調整をし、元のRAW画像データ100に復元する。
 具体的には、たとえば、ホワイトバランス制御情報1712に出力ビット幅N1が含まれている場合、ホワイトバランス逆調整部2504は、ホワイトバランス逆調整により、まず、各画素のビット幅がN2ビットであるRAW画像データを生成する。そして、ホワイトバランス逆調整部2504は、各画素の最大値をN1ビットで表現可能な最大値に制限して、各画素の最上位ビットから(N2-N1)ビット分のデータを消去して、各画素のビット幅がN1ビット幅のRAW画像データ100に補正する。
 たとえば、図34の(B3)に示したように、各画素のビット幅がN2=13ビット幅のRAW画像データから、最上位ビットからN2-N1=1ビット分のデータが消去されて、各画素のビット幅がN1=12ビット幅のRAW画像データ100に補正される。
 なお、ホワイトバランス制御情報1712に出力ビット幅N1が含まれていない場合、ホワイトバランス逆調整部2504は、ホワイトバランス逆調整により、各画素のビット幅がN2ビットであるRAW画像データ100を生成することになる。
 また、ホワイトバランス制御情報1712に出力ビット幅N1が含まれていない場合、ホワイトバランス逆調整部2504は、逆調整を実行しないようにしてもよい。これにより、符号化装置400は、出力ビット幅N1を、ホワイトバランス逆調整部2504へのイネーブル信号として用いることができる。したがって、復号装置1900は、符号化装置400から出力ビット幅N1により復元許可が与えられた場合に、画素のビット幅がN1ビットであるRAW画像データ100に復元することができる。
 同様に、ホワイトバランス制御情報1712に出力ビット幅N1が含まれていない場合、第2生成部1903は、各画素の出力ビット幅がN2であるRAW画像データの生成を実行しないようにしてもよい。また、同様に、ホワイトバランス制御情報1712に出力ビット幅N1が含まれていない場合、復号部1902は、第1符号化画像データおよび第2符号化画像データの復号を実行しないようにしてもよい。これにより、符号化装置400は、出力ビット幅N1を、第2生成部1903または復号部1902へのイネーブル信号として用いることができる。出力ビット幅N1をこのように活用することにより、復号装置1900でのセキュリティの向上を図ることができる。
 以上説明したように、本実施例によれば、色相や彩度により成分フレーム間の相関性が高くなるという性質を利用して、RAW画像データ100を成分フレーム間予測することにより、成分フレーム間の相関性が高いRAW画像データ100の符号化効率を高めることができる。また、このように成分フレーム間予測符号化により符号化した場合でも元のRAW画像データ100に復元することができる。
 また、上述した実施例1~実施例6において、符号化対象としてRAW画像データ100を用いたが、RAW画像データから加工された画像データを符号化対象としてもよい。また、上述した実施例1~実施例6において、成分フレーム間予測符号化およびその復号について説明したが、時間軸方向のフレーム間予測符号化およびその復号でもよい。
 実施例5および実施例6では、RAW画像データ100にホワイトバランス調整する例を示した。しかし、たとえば、ホワイトバランス調整する代わりに、Rの色成分データの値とGの色成分データの値との差、Gの色成分データの値とBの色成分データの値との差、Bの色成分データの値とRの色成分データの値との差のうち、少なくとも1つの差が小さくなる処理でもよい。
 この場合、たとえば、Rの色成分データの値とGの色成分データの値との差、Gの色成分データの値とBの色成分データの値との差、Bの色成分データの値とRの色成分データの値との差のうち、少なくとも1つの差が小さくするための係数をかけたときに、所定の閾値以上となる場合に係数を調整すればよい。
 上述の実施例5および実施例6では、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分の画素値YBがしきい値(例として輝度値255)以上かを判断し、しきい値以上の場合、B成分のホワイトバランス調整ゲイン係数ABを補正した。しかしながら、ホワイトバランス調整部2301は、ホワイトバランス調整後のB成分(R成分)の画素値YB(YR)がしきい値(例として輝度値255)を超えるか否かを判断し、しきい値を超える場合、B成分(R成分)のホワイトバランス調整ゲイン係数ABを補正することとしてもよい。また、上記しきい値(例として輝度値255)は一例であり、他の値であってもよい。
 なお、上述の実施例2、実施例4、実施例5および実施例6において、ホワイトバランス調整後に、符号化する際に、ホワイトバランス調整のゲインに応じて成分毎に重みづけして量子化してもよい。たとえば、一般に、太陽光源想定のホワイトバランス調整では、R成分の調整ゲインが1より大きい。たとえば、赤色絵柄部分は、信号レベルが、ホワイトバランス調整で増強されるので、発生符号量が大きくなる。
 このため、ホワイトバランス調整後に、符号化する際に、R成分をホワイトバランス調整しない場合と比べて、より粗く量子化するように重みづけしてもよい。また、たとえば、ホワイトバランス調整のゲインをAで調整した画像データと、ホワイトバランス調整のゲインをB(A<B)で調整した画像データと、では、ホワイトバランス調整のゲインをBで調整した画像データをより粗く量子化することとしてもよい。
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動画像データ、3101 ホワイトバランス制御情報、3111 調整済み情報、3112 ホワイトバランス調整ゲイン係数、3113 異同フラグ

Claims (30)

  1.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値を調整する調整部と、
     前記調整部により画素値が調整された画像データと、前記第1係数と、前記第2係数と、を符号化する符号化部と、
     を有する符号化装置。
  2.  請求項1に記載の符号化装置であって、
     前記調整部は、前記第1係数と前記第2色成分の画素値とに基づいて調整された画素値がしきい値以上である場合、前記第2係数を算出する、符号化装置。
  3.  請求項2に記載の符号化装置であって、
     前記調整部は、前記しきい値以上の画素が所定画素数存在する場合、前記第2係数を算出する、符号化装置。
  4.  請求項3に記載の符号化装置であって、
     前記調整部は、連結画素領域内において前記しきい値以上の画素が所定画素数存在する場合、前記第2係数を算出する、符号化装置。
  5.  請求項2から4のいずれか一つに記載の符号化装置であって、
     前記符号化部は、前記符号化された画素値が調整済みの画像データに、前記第1係数と前記符号化された画素値が調整済みの画像データに付与された前記第2係数との異同を示す識別情報を付与する、符号化装置。
  6.  請求項1に記載の符号化装置であって、
     前記調整部は、前記第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配列されたデータ列と、前記第1色成分と、前記第1色成分および前記第2色成分とは異なる第3色成分とが繰り返し配列されたデータ列と、が繰り返し配列された画像データの第2色成分と第3色成分との画素値を調整する、符号化装置。
  7.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて、前記少なくとも第2色成分の画素値を調整する調整部と、
     前記調整部によって前記少なくとも第2色成分の画素値が調整された画像データを符号化するとともに、前記符号化された画像データに前記第1係数を付与する符号化部と、
     を有する符号化装置。
  8.  請求項7に記載の符号化装置であって、
     前記符号化部は、前記符号化された画素値が調整済みの画像データに、前記第1係数と前記符号化された画素値が調整済みの画像データに付与された前記第1係数との異同を示す識別情報を付与する、符号化装置。
  9.  第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データの各画素の第1出力ビット幅を前記第1出力ビット幅よりも大きい第2出力ビット幅に変更し、当該変更後の画像データのホワイトバランスを調整する調整部と、
     前記調整部によってホワイトバランスが調整された画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成部と、
     前記生成部によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化部と、
     を有する符号化装置。
  10.  請求項1または7に記載の符号化装置であって、
     前記調整部は、調整に先立って、前記画像データの各画素の第1出力ビット幅を前記第1出力ビット幅よりも大きい第2出力ビット幅に変更する、符号化装置。
  11.  請求項9または10に記載の符号化装置であって、
     前記第1出力ビット幅は、前記画像データを出力した撮像素子の各画素の出力ビット幅である、符号化装置。
  12.  請求項9または10に記載の符号化装置であって、
     前記第1出力ビット幅および前記第2出力ビット幅に関する情報を記録する記録部と、
     を有する符号化装置。
  13.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値が調整された調整済み画像データと、前記第1係数と、前記第2係数と、が符号化された符号化データを、取得する取得部と、
     前記取得部によって取得された符号化データを復号する復号部と、
     前記復号部によって復号された調整済み画像データを、前記復号部によって復号された第2係数に基づいて、調整する調整部と、
     を有する、復号装置。
  14.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて前記少なくとも第2色成分の画素値が調整された調整済み画像データが符号化された符号化調整済み画像データと、前記符号化調整済み画像データに付与された前記第1係数と、を含む符号化データを取得する取得部と、
     前記取得部によって取得された符号化データを復号する復号部と、
     前記復号部によって復号された調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する調整部と、
     を有する、復号装置。
  15.  請求項14に記載の復号装置であって、
     前記符号化データは、さらに、前記第1係数と前記符号化調整済み画像データに付与された前記第1係数との異同を示す識別情報を含み、
     前記調整部は、前記識別情報における両第1係数の値の異同に基づいて、前記調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する、復号装置。
  16.  請求項15に記載の復号装置であって、
     前記調整部は、前記識別情報が両第1係数の値が同一であることを示す場合、前記調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する、復号装置。
  17.  請求項15に記載の復号装置であって、
     前記調整部は、前記識別情報が両第1係数の値が相違することを示す場合、前記調整済み画像データの調整を実行せずに、前記調整済み画像データを出力する、復号装置。
  18.  請求項16に記載の復号装置であって、
     前記調整部は、前記識別情報が両第1係数の値が相違することを示す場合、前記調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する、復号装置。
  19.  第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データを復元する復号装置であって、
     前記第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、前記第1画像データおよび前記第2画像データに施されたホワイトバランスに関する情報と、前記画像データの各画素の出力ビット幅よりも小さい特定の出力ビット幅と、を取得する取得部と、
     前記取得部によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得部によって取得された第2符号化画像データを前記第2画像データに復号する復号部と、
     前記復号部によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置された画像データを生成する生成部と、
     前記ホワイトバランスに関する情報と、前記特定の出力ビット幅と、に基づいて、前記生成部によって生成された画像データの色をホワイトバランスによる調整前の色に変換する調整部と、
     を有する復号装置。
  20.  請求項19に記載の復号装置であって、
     前記復号部は、前記特定の出力ビット幅が取得された場合に復号する、
     復号装置。
  21.  請求項19に記載の復号装置であって、
     前記生成部は、前記特定の出力ビット幅が取得された場合に生成する、
     復号装置。
  22.  請求項19に記載の復号装置であって、
     前記生成部は、前記特定の出力ビット幅が取得された場合に変換する、
     復号装置。
  23.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値を調整する調整処理と、
     前記調整処理により画素値が調整された画像データと、前記第1係数と、前記第2係数と、を符号化する符号化処理と、
     を有する符号化方法。
  24.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて、前記少なくとも第2色成分の画素値を調整する調整処理と、
     前記調整処理によって前記少なくとも第2色成分の画素値が調整された画像データを符号化するとともに、前記符号化された画像データに前記第1係数を付与する符号化処理と、
     を有する符号化方法。
  25.  第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データの各画素の第1出力ビット幅を前記第1出力ビット幅よりも大きい第2出力ビット幅に変更し、当該変更後の画像データのホワイトバランスを調整する調整処理と、
     前記調整処理によってホワイトバランスが調整された画像データから、前記第1色成分の画素群により構成される第1画像データと、前記第2色成分の画素群により構成される第2画像データと、を生成する生成処理と、
     前記生成処理によって生成された第1画像データに基づいて、前記生成部によって生成された第2画像データを符号化する符号化処理と、
     を有する符号化方法。
  26.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて算出された第2係数により、前記第2色成分の画素値が調整された調整済み画像データと、前記第1係数と、前記第2係数と、が符号化された符号化データを、取得する取得処理と、
     前記取得処理によって取得された符号化データを復号する復号処理と、
     前記復号処理によって復号された調整済み画像データを、前記復号処理によって復号された第2係数に基づいて、調整する調整処理と、
     を有する復号方法。
  27.  第1色成分と前記第1色成分と異なる第2色成分とが繰り返し配列された画像データのうちの少なくとも第2色成分の画素値を調整する第1係数を用いて前記少なくとも第2色成分の画素値が調整された調整済み画像データが符号化された符号化調整済み画像データと、前記符号化調整済み画像データに付与された前記第1係数と、を含む符号化データを取得する取得処理と、
     前記取得処理によって取得された符号化データを復号する復号処理と、
     前記復号処理によって復号された調整済み画像データを、前記符号化調整済み画像データに付与された前記第1係数に基づいて調整する調整処理と、
     を有する復号方法。
  28.  第1色成分と前記第1色成分とは異なる第2色成分とが繰り返し配置された画像データを復元する復号方法であって、
     前記第1色成分の画素群により構成される第1画像データを符号化した第1符号化画像データと、前記第2色成分の画素群により構成される第2画像データを前記第1画像データに基づいて符号化した第2符号化画像データと、前記第1画像データおよび前記第2画像データに施されたホワイトバランスに関する情報と、前記画像データの各画素の出力ビット幅よりも小さい特定の出力ビット幅と、を取得する取得処理と、
     前記取得処理によって取得された第1符号化画像データを前記第1画像データに復号するとともに、前記第1画像データに基づいて、前記取得処理によって取得された第2符号化画像データを前記第2画像データに復号する復号処理と、
     前記復号処理によって復号された第1画像データおよび第2画像データに基づいて、前記第1色成分と前記第2色成分とが繰り返し配置された画像データを生成する生成処理と、
     前記ホワイトバランスに関する情報と、前記特定の出力ビット幅と、に基づいて、前記生成部によって生成された画像データの色をホワイトバランスによる調整前の色に変換する調整処理と、
     を有する復号方法。
  29.  請求項23から25のいずれか一項に記載の符号化方法をプロセッサに実行させる符号化プログラム。
  30.  請求項26から28のいずれか一項に記載の復号方法をプロセッサに実行させる復号プログラム。
PCT/JP2019/043343 2019-03-15 2019-11-05 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム WO2020188875A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
PCT/JP2019/011015 WO2020188669A1 (ja) 2019-03-15 2019-03-15 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
JPPCT/JP2019/011015 2019-03-15

Publications (1)

Publication Number Publication Date
WO2020188875A1 true WO2020188875A1 (ja) 2020-09-24

Family

ID=72519291

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/JP2019/011015 WO2020188669A1 (ja) 2019-03-15 2019-03-15 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
PCT/JP2019/043343 WO2020188875A1 (ja) 2019-03-15 2019-11-05 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/011015 WO2020188669A1 (ja) 2019-03-15 2019-03-15 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム

Country Status (1)

Country Link
WO (2) WO2020188669A1 (ja)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004128809A (ja) * 2002-10-01 2004-04-22 Canon Inc 画像処理方法及び装置、及び撮像装置
WO2007108317A1 (ja) * 2006-03-20 2007-09-27 Sony Corporation 画像信号処理装置及び画像信号処理方法
JP2009303139A (ja) * 2008-06-17 2009-12-24 Toshiba Corp 固体撮像装置
WO2014010224A1 (ja) * 2012-07-09 2014-01-16 株式会社ニコン 動画像圧縮装置、動画像復号装置、画像圧縮装置、画像復号装置、撮像装置およびプログラム
JP2016127505A (ja) * 2015-01-07 2016-07-11 三星電子株式会社Samsung Electronics Co.,Ltd. 画像処理装置及び画像処理方法
WO2016167137A1 (ja) * 2015-04-13 2016-10-20 ソニー株式会社 撮影装置、撮影方法、信号処理装置、信号処理方法、及び、プログラム
JP2018137580A (ja) * 2017-02-21 2018-08-30 キヤノン株式会社 画像処理装置、画像処理方法、及び、プログラム

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004128809A (ja) * 2002-10-01 2004-04-22 Canon Inc 画像処理方法及び装置、及び撮像装置
WO2007108317A1 (ja) * 2006-03-20 2007-09-27 Sony Corporation 画像信号処理装置及び画像信号処理方法
JP2009303139A (ja) * 2008-06-17 2009-12-24 Toshiba Corp 固体撮像装置
WO2014010224A1 (ja) * 2012-07-09 2014-01-16 株式会社ニコン 動画像圧縮装置、動画像復号装置、画像圧縮装置、画像復号装置、撮像装置およびプログラム
JP2016127505A (ja) * 2015-01-07 2016-07-11 三星電子株式会社Samsung Electronics Co.,Ltd. 画像処理装置及び画像処理方法
WO2016167137A1 (ja) * 2015-04-13 2016-10-20 ソニー株式会社 撮影装置、撮影方法、信号処理装置、信号処理方法、及び、プログラム
JP2018137580A (ja) * 2017-02-21 2018-08-30 キヤノン株式会社 画像処理装置、画像処理方法、及び、プログラム

Also Published As

Publication number Publication date
WO2020188669A1 (ja) 2020-09-24

Similar Documents

Publication Publication Date Title
WO2019142821A1 (ja) 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
TWI514892B (zh) Image processing apparatus and image processing method
US20180109797A1 (en) Moving image compression device, moving image decoding device, image compression device, image decoding device, imaging device, and non-transitory medium storage program
US10674110B2 (en) Image encoding apparatus, and control method thereof
WO2016171006A1 (ja) 符号化装置および符号化方法、並びに、復号装置および復号方法
WO2011010431A1 (ja) 画像処理装置、画像処理方法および撮像装置
WO2020188875A1 (ja) 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
JP6875802B2 (ja) 画像符号化装置及びその制御方法及び撮像装置及びプログラム
JP2009268032A (ja) 撮像装置
JP5974691B2 (ja) 動画像圧縮装置、撮像装置およびプログラム
JP6465570B2 (ja) 撮像装置、撮像装置の制御方法
JP6152642B2 (ja) 動画像圧縮装置、動画像復号装置およびプログラム
JPWO2019142836A1 (ja) 符号化装置、復号装置、符号化方法、復号方法、符号化プログラム、および復号プログラム
JP2019022225A (ja) 画像圧縮装置およびプログラム
JP5924262B2 (ja) 画像処理装置および画像処理プログラム
JP2017200199A (ja) 動画像圧縮装置、動画像復号装置およびプログラム
WO2016047250A1 (ja) 信号処理装置、撮像装置および信号処理方法
JP7259280B2 (ja) 符号化装置、符号化方法及び符号化プログラム
JP2014143488A (ja) 画像圧縮装置、画像復号装置およびプログラム
JP5974692B2 (ja) 動画像復号装置およびプログラム
JP6574655B2 (ja) 撮像装置および撮像装置における符号化方法
JP2019036992A (ja) 圧縮装置、復号装置およびプログラム
JP2012151593A (ja) 画像処理装置と画像処理方法および撮像装置
JP2007228514A (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: 19920603

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19920603

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP