The present application claims priority from Japanese patent application JP 2018-5212 filed on Jan. 16, 2018, the content of which is hereby incorporated by reference into this application.
The present invention relates to an encoder, a decoder, an encoding method, a decoding method, an encoding program, and a decoding program.
A feature of performing gradation correction on RAW image data has been disclosed (JP 2006-270478 A). However, if the optical black in the output from an image capture element is not zero, then if encoding is performed with gradation correction by the above-mentioned √γ or the like being performed in order to mitigate encoding distortion of dark portions, then the degree to which encoding distortion of dark portions is mitigated by the gradation correction is reduced compared to a case in which the optical black is zero.
An aspect of the disclosure of an encoder in this application is an encoder, comprising: a correction unit configured to execute gradation correction on RAW image data from an image capture element having optical black on the basis of a gamma coefficient and an optical black value of the optical black; and an encoding unit configured to encode gradation correction RAW image data that has undergone gradation correction by the correction unit.
An aspect of the disclosure of a decoder in this application is a decoder, comprising: an acquisition unit configured to acquire encoded RAW image data resulting from encoding gradation correction RAW image data that has undergone gradation correction on the basis of a gamma coefficient and an optical black value; a decoding unit configured to decode the encoded RAW image data acquired by the acquisition unit into the gradation correction RAW image data; and an inverse gradation correction unit configured to execute inverse gradation correction on the gradation correction RAW image data decoded by the decoding unit on the basis of the gamma coefficient and the optical black value, and output the RAW image data prior to gradation correction.
An aspect of the disclosure of an encoding method in this application is an encoding method, comprising: a correction process of executing gradation correction on RAW image data from an image capture element having optical black on the basis of a gamma coefficient and an optical black value of the optical black; and an encoding process of encoding gradation correction RAW image data that has undergone gradation correction by the correction process.
An aspect of the disclosure of a decoding method in this application is a decoding method, comprising: an acquisition process of acquiring encoded RAW image data resulting from encoding gradation correction RAW image data that has undergone gradation correction on the basis of a gamma coefficient and an optical black value; a decoding process of decoding the encoded RAW image data acquired by the acquisition process into the gradation correction RAW image data; and an inverse gradation correction process of executing inverse gradation correction on the gradation correction RAW image data decoded by the decoding process on the basis of the gamma coefficient and the optical black value, and outputting the RAW image data prior to gradation correction.
<Hardware Configuration Example of Information Processing Apparatus>
The information processing apparatus 100 includes a processor 101, a storage device 102, an operation device 103, an LSI (Large Scale In tegration) 104, an imaging unit 105, and a communication interface (com munication IF) 106. These are connected to one another by a bus 108. The processor 101 controls the information processing apparatus 100. The storage device 102 serves as a work area of the processor 101.
The storage device 102 is a non-transitory or temporary recording medium which stores the various programs and data. The storage devic e 102 can be, for example, a read-only memory (ROM), a random access memory (RAM), a hard disk drive (HDD), or a flash memory. The operati on device 103 operates data. The operation device 103 can be, for exam ple, a button, a switch, or a touch panel.
An LSI 104 is an integrated circuit that executes specific processes including image processes such as color interpolation, contour enhancement, and gamma correction; an encoding process; a decoding process; a compression/decompression process; and the like.
An imaging unit 105 captures a subject and generates RAW image data. The imaging unit 105 has an imaging optical system 151, an image capture element 153 having a color filter 152, and a signal processing circuit 154.
The imaging optical system 151 is constituted of a plurality of lenses including a zoom lens and a focus lens, for example. For a simplified view, in
The image capture element 153 is a device for capturing an image of a subject using light beams passing through the imaging optical system 151. The image capture element 153 may be a sequential scanning type solid-state image sensor (such as a CCD (charge-coupled device) image sensor), or may be an X-Y addressing type solid-state image capture element (such as a CMOS (complementary metal-oxide semiconductor) image sensor).
On the light-receiving surface of the image capture element 153, a pixel group 160 having photoelectric conversion units is arranged in a matrix. For each pixel of the image capture element 153, a plurality of types of color filters 152 that respectively allow through light of differing color components are arranged in a prescribed color array. Thus, each pixel of the image capture element 153 outputs an electrical signal corresponding to each color component as a result of color separation by the color filter 152.
In Embodiment 1, for example, red (R), green (G), and blue (B) color filters 152 are arranged periodically on the light-receiving surface according to a Bayer arrangement of two rows by two columns. As an example, odd-numbered rows of the color array of the image capture element 153 have G and B pixels arranged alternately, whereas even-numbered rows of the color array have R and G pixels arranged alternately. The color array overall has green pixels arranged so as to form a checkered pattern. As a result, the image capture element 153 can acquire RAW image data in color during imaging.
The pixel group 160, in which the pixels are arranged in a 2-dimensional array in the image capture element 153, is constituted of an active pixel area 161 and an optical black pixel area 162. The active pixel area 161 is a pixel area in which a signal charge generated by photoelectric conversion of actually received light is amplified and outputted to the signal processing circuit 154.
The optical black pixel area 162 is a pixel area for outputting optical black that serves as a reference for the black level. The optical black pixel area 162 is provided on the outer periphery of the active pixel area 161, for example. The optical black pixel area 162 is provided in order to perform subtraction correction of heat noise generated by the image capture element 153, for example.
The signal processing circuit 154 sequentially executes, on an image signal inputted from the image capture element 153, an analog signal process (correlated double sampling, black level correction, etc.), an A/D conversion process, and digital signal processing (defective pixel correction). The RAW image data outputted from the signal processing circuit 154 is inputted to the LSI 104 or a storage device 102. A communication I/F 106 connects to an external device via the network and transmits/receives data.
<Mechanical Configuration Example of Encoder>
The gradation correction unit 201 performs gradation correction on the RAW image data. The RAW image data is image data of pixel values that are in a linear relationship with the intensity of light from the image capture element 153, which performs photoelectric conversion of light from the subject attained via the color filters 152. In other words, the RAW image data is image data that has not been subjected to image processing such as gamma correction, demosaicing, white balance adjustment, or color conversion. The data volume of the RAW image data is large compared to data on which the above-mentioned image processes and the encoding process (compression process) has been performed. The RAW image data may be a still image or one frame of a video.
The gradation correction unit 201 performs gradation correction on the RAW image data from the image capture element 153 having the optical black pixel area 162 on the basis of the value of the gamma coefficient (gamma value) and the optical black value. For example, the gradation correction unit 201 executes gradation correction by √γ or the like on the RAW image data according to the optical black value. The gradation correction unit 201 executes a noise reduction process (NR process) when performing gradation correction. Details regarding the gradation correction by the gradation correction unit 201 will be described later.
The encoding unit 202 encodes the RAW image data that has undergone gradation correction by the gradation correction unit 201 (hereinafter referred to as gradation correction RAW image data) and outputs encoded gradation correction RAW image data. If the gradation correction RAW image data is a still image, the encoding unit 202 performs in-frame encoding to encode the gradation correction RAW image data into an I-picture.
If the gradation correction RAW image data is one frame of a video, the encoding unit 202 employs in-frame predictive encoding to encode the gradation correction RAW image data into an I-picture, or employs inter-frame predictive encoding with reference to other gradation correction RAW image data to encode the gradation correction RAW image data into a P-picture or a B-picture.
If the optical black value in the output from the image capture element 153 is not zero, then if gradation correction by √γ or the like were performed as is in order to mitigate encoding distortion of dark portions, then the degree to which encoding distortion of the dark portions is mitigated by gradation correction is small compared to if the optical black value is zero. The encoding unit 202 executes gradation correction by √γ or the like based on the optical black value, and adds the γ value used during decoding/playback to the header information of the encoded gradation correction RAW image data and applies the optical black value thereto. As a result, it is possible to eliminate a decrease in the degree to which encoding distortion of black portions by gradation correction is mitigated.
The recording unit 203 records the encoded gradation correction RAW image data in the storage device 102. The setting unit 204 sets the gamma coefficient value, the calculated provisional gain, and the exposure value and outputs these values to the gradation correction unit 201. Details regarding the setting unit 204 will be described in Embodiments 3 and 4.
<Data Structure Example of Gradation Correction RAW Image Data>
Elements of the header information 301 will be described in detail below. The image format information 311 includes the size of the gradation correction RAW image data prior to encoding, the size of the encoded gradation correction RAW image data, identification information specifying the color array pattern, and the pixel count of the gradation correction RAW image data prior to encoding.
The control information 312 includes a gamma value 321 for when gradation correction is performed, an optical black value 322 that serves as a reference for the black level, a calculated provisional gain 323, a first pouch width 324, a second pouch width 325, and a gradation correction identifier 326, in addition to the type of encoded gradation correction RAW image data (I-picture, P-picture, or B-picture) and identification information of the reference frame.
The calculated provisional gain 323 will be described in Embodiments 3 and 4. The first pouch width 324 and the second pouch width 325 will be described in Embodiment 4. The gradation correction identifier 326 is an identifier for identifying the algorithm that executes gradation correction. With the gradation correction identifier 326, the decoder can identify which algorithm was used to perform gradation correction on the encoded gradation correction RAW image data 300.
<Configuration Example of Encoding Unit 202>
The first accumulation unit 401 accumulates the gradation correction RAW image data outputted from the gradation correction unit 201. The gradation correction RAW image data accumulated in the first accumulation unit 401 is outputted to the subtraction unit 402 as image data to be encoded in the order that the gradation correction RAW image data was inputted. The gradation correction RAW image data that has been encoded is sequentially deleted from the first accumulation unit 401.
When generating the P-picture or the B-picture, the subtraction unit 402 outputs a difference signal (prediction error value) between a component frame of the inputted original image (gradation correction RAW image data) and a prediction value generated by the motion compensation unit 411 to be described later. Also, when generating the I-picture, the subtraction unit 402 outputs the component frame of the inputted original image as is.
When generating the I-picture, the orthogonal transformation unit 403 performs orthogonal transformation on the original image inputted after passing through the subtraction unit 402 without modification. Also, when generating the P-picture or the B-picture, the orthogonal transformation unit 403 performs orthogonal transformation on the above-mentioned difference signal.
The quantization unit 404 converts the frequency coefficient (orthogonal transformation coefficient) for each block inputted from the orthogonal transformation unit 403 into a quantization coefficient. The output from the quantization unit 404 is inputted to the variable-length coding unit 405 and the inverse quantization unit 406.
The variable-length coding unit 405 performs variable-length coding of a motion vector from the motion detection unit 410 and outputs the encoded gradation correction RAW image data (I-picture, P-picture, B-picture).
The inverse quantization unit 406 performs inverse quantization on a quantized coefficient at the block level, which is the level at which encoding is performed, to decode the frequency coefficient. The inverse orthogonal transformation unit 407 performs inverse orthogonal transformation on the frequency coefficient decoded by the inverse quantization unit 406 to decode the prediction error value (or original image).
The addition unit 408 adds the decoded prediction error value to a prediction value (to be mentioned later) generated by the motion compensation unit 411. Decoded values (reference frames) of the picture outputted from the addition unit 408 are accumulated in the second accumulation unit 409. Reference frames not referred to in motion compensation prediction thereafter are sequentially deleted from the second accumulation unit 409.
The motion detection unit 410 uses the reference frames of the second accumulation unit 409 to detect the motion vector for predicting the gradation correction RAW image data to be encoded. The motion vector is outputted to the motion compensation unit 411 and the variable-length coding unit 405.
The motion compensation unit 411 outputs the prediction values predicted at the block level for the gradation correction RAW image data to be encoded on the basis of the motion vector and the reference frame. The prediction values are outputted to the subtraction unit 402 and the addition unit 408.
If motion compensation prediction is to be performed for a given block, when the gradation correction RAW image data to be encoded completely matches the prediction values, only the motion vector is encoded. If the gradation correction RAW image data to be encoded partially matches the prediction values, the motion vector and a difference image are encoded. If none of the gradation correction RAW image data to be encoded matches the prediction values, the image for the entire block is encoded.
<Example of Encoding Process Steps>
Next, the encoder 200 uses the encoding unit 202 to encode the gradation correction RAW image data (step S503). Then, the encoder 200 uses the recording unit 203 to store the encoded gradation correction RAW image data 300 in the storage device 102 (step S504).
<Mechanical Configuration Example of Decoder>
The acquisition unit 601 acquires the encoded gradation correction RAW image data 300 encoded by the encoder 200. If the decoder 600 and the encoder 200 can communicate with each other, then the acquisition unit 601 receives the encoded gradation correction RAW image data 300 transmitted from the encoder 200. If the decoder 600 and the encoder 200 are installed in the same device, then the acquisition unit 601 reads the encoded gradation correction RAW image data 300 stored in the storage device 102.
The decoding unit 602 decodes the encoded gradation correction RAW image data 300 to the gradation correction RAW image data using the control information 312. Specifically, for example, the decoding unit identifies the reference frame according to the type of encoded gradation correction RAW image data 300 (I-picture, P-picture, B-picture) and decodes the encoded gradation correction RAW image data 300 to the gradation correction RAW image data.
The inverse gradation correction unit 603 performs inverse gradation correction on the gradation correction RAW image data decoded by the decoding unit 602 to restore the RAW image data prior to gradation correction. Specifically, for example, the inverse gradation correction unit 603 refers to the gradation correction identifier 326 of the control information 312 to identify the gradation correction algorithm applied to the RAW image data, and executes an inverse gradation correction algorithm corresponding to the identified gradation correction algorithm. The inverse gradation correction unit 603 executes a noise reduction process (NR process) when performing inverse gradation correction.
<Configuration Example of Decoding Unit 602>
The variable-length code decoding unit 701 decodes the inputted encoded gradation correction RAW image data 300 and outputs a quantization coefficient and a motion vector. The decoded quantization coefficient is inputted to the inverse quantization unit 702 and the decoded motion vector is inputted to the motion compensation unit 706.
The inverse quantization unit 702 performs inverse quantization on a quantized coefficient at the block level to decode the frequency coefficient. The inverse orthogonal transformation unit 703 performs inverse orthogonal transformation on the frequency coefficient decoded by the inverse quantization unit 702 to decode the prediction error value (or signal of original image).
The addition unit 704 adds the decoded prediction error value to a prediction value generated by the motion compensation unit 706, thereby outputting the decoded image data at the block level. The image data outputted from the addition unit 704 is outputted as the gradation correction RAW image data and inputted to the third accumulation unit 705.
The third accumulation unit 705 accumulates the decoded value of the image as the reference frame. Image data not referred to in motion compensation prediction thereafter is sequentially deleted from the third accumulation unit 705. The motion compensation unit 706 outputs, to the addition unit 704, the prediction values predicted at the block level for the image to be decoded on the basis of the motion vector and the reference frame.
<Example of Decoding Process Steps>
<Specific Example of Gradation Correction and Inverse Gradation Correction>
Next, specific examples of gradation correction by the gradation correction unit 201 and inverse gradation correction by the inverse gradation correction unit 603 according to Embodiment 1 will be described with reference to
(Characteristics of Gradation Correction when Optical Black Value is Not Used)
Also, the signal level is a voltage indicating the luminance of pixels in the active pixel area 161, for example, and is normalized to within a range of 0.0 to 1.0. Pixels with a low signal level are dark pixels and pixels with a high signal level are bright pixels. OB (optical black) indicates the optical black value.
The gradation correction algorithm shown in the input-output characteristic curve 900 of
E′=OETF[E]=E1/γ (1)
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, and γ is the gamma value.
In the input-output characteristic curve 900, gradation correction is executed for an interval SC9 from an input signal level of 0.0 to the optical black value OB. When encoding the RAW image data, both dark and bright portions are subjected to equivalent encoding, and thus, if gamma correction is performed at the developing stage, then the dark portions are emphasized, and the higher the compression rate is, the more apparent the encoding distortion is.
G={OETF[E]}′=(1/γ)×E{(1/γ)−1} (2)
G is the gain of the input signal level E. In the gain characteristic curve 1000, the value of the gain G for the interval SC9 from an input signal level E of 0.0 to the optical black value OB is greater than the value of the gain G for the optical black value OB. In other words, the gain of the pixels is large for the interval SC9 in which the value of the input signal level E, which is inactive after developing, is from 0.0 to the optical black value OB. Thus, the gain in the interval of greater than or equal to the optical black value OB, which is active for the image after developing, has a low gain and a lesser effect of mitigating encoding distortion.
This similarly applies to
The inverse gradation correction algorithm shown in the input-output characteristic curve 1100 of
E=EOTF[E′]=Eγ (3)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), EOTF[ ] represents an inverse gradation correction function, and y is the gamma value.
(Characteristic Example 1 of Gradation Correction when Optical Black Value is Used)
Next, with reference to
The gradation correction algorithm shown in the input-output characteristic curve 1200 of
E′=OETF[E]=0 E<OB
(E−OB)1/γ OB≤E (4)
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, and γ is the gamma value. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (4) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
G={OETF[E]}′=0 E<OB
(1/γ)×(E−OB){(1/γ)−1} OB≤E (5)
G is the gain of the input signal level E. In the gain characteristic curve 1300, the value of the gain G for the interval from an input signal level E of 0.0 to the optical black value OB is 0.0, and thus, the input signal level E in the interval SC9 from 0.0 to the optical black value OB, which is the dark portion, is not emphasized. Also, the value of the gain G reaches the maximum value at the optical black value OB, and thus, by setting at a high value the gain in the interval of greater than or equal to the optical black value OB, which is active for the image after developing, it is possible to achieve a greater effect of mitigating encoding distortion.
During developing or image adjustment, there are cases in which dark portions should be brightened to allow for greater visibility of figures in dark portions or the like. At this time, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 has a tendency to become prominent. By setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
E=EOTF[E′]=(E′)γ+OB (6)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (6) if the gradation correction identifier 326 indicating formula (4) is detected in the control information 312.
In the input-output characteristic curve 1400, the restored RAW image data has the optical black value OB as the minimum value for the output signal level E, and thus, by setting at a high value the gain in the interval of greater than or equal to the optical black value OB, which is active for the image after developing, it is possible to achieve a greater effect of mitigating encoding distortion.
(Characteristic Example 2 of Gradation Correction when Optical Black Value is Used)
Next, with reference to
In other words, in the input-output characteristic curve 1500 of
The gradation correction algorithm shown in the input-output characteristic curve 1500 of
E′=OETF[E]=0 E<OB
{(E−OB)/(1−OB)}1/γ OB≤E (7)
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, and γ is the gamma value. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (7) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
Thus, by setting the maximum value for the output signal level E′ to 1.0, it is possible to improve color reproduction in the bright portions as compared to the input-output characteristic curve 1200.
G={OETF[E]}′=0 E<OB
(1/γ)×{(E−OB)/(1−OB)}(1/γ)−1 OB≤E (8)
G is the gain of the input signal level E. The value of the gain G for the interval SC9 from an input signal level E of 0.0 to the optical black value OB is 0.0, and thus, the input signal level E in the interval SC9 from 0.0 to the optical black value OB, which is the dark portion, is not emphasized. Also, the value of the gain G reaches the maximum value (infinity) at the optical black value OB, and thus, by setting at a high value the gain in the interval of greater than or equal to the optical black value OB, which is active for the image after developing, it is possible to achieve a greater effect of mitigating encoding distortion.
Similar to the input-output characteristic example 1 for gradation correction when using the optical black value, by setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
E=EOTF[E′]=(1−OB)×(E′)γ+OB (9)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (9) if the gradation correction identifier 326 indicating formula (7) is detected in the control information 312.
Similar to the input-output characteristic example 1 of gradation correction when using the optical black value OB, the restored RAW image data has the optical black value OB as the minimum value for the output signal level E, and thus, the color of the pixel in the interval SC11 where the output signal level E is from 0.0 to the optical black value OB is not reproduced, and by setting at a high value the gain in the interval of greater than or equal to the optical black value OB, which is active for the image after developing, it is possible to achieve a greater effect of mitigating encoding distortion.
Also, the input-output characteristic curve 1700 of
Embodiment 2 is an example in which an input signal level E less than or equal to the optical black value OB is replicated while the gain G of the optical black value OB is maximized in the manner of the input-output characteristic example 2 of gradation correction for when the optical black value of Embodiment 1 is used. In Embodiment 2, differences from Embodiment 1 will be primarily described, and descriptions of the same configurations and content as Embodiment 1 are applicable to Embodiment 2 as well, and descriptions thereof are omitted.
Specifically, for example, in the input-output characteristic curve 1800, a waveform 1801 in the interval SC9 is a waveform attained from negative 1/γ correction, and a waveform 1802 of the interval greater than or equal to the optical black value OB is a waveform attained from positive 1/γ correction.
The gradation correction algorithm shown in the input-output characteristic curve 1800 of
E′=OETF[E]=−α×{(OB−E)/(1−OB)}1/γ+β E<OB
α×{(E−OB)/(1−OB)}1/γ+β OB≤E (10)
where α=1/{1+{OB/(1−OB)}1/γ}
β=α×{OB/(1−OB)}1/γ
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, and y is the gamma value.
In formula (10), the formula for when the condition is E<OB is the formula for negative 1/γ correction, and the formula for when the condition is OB≤E is the formula for positive 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (10) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
By executing negative 1/γ correction in the interval SC9, it is possible to improve color reproduction in the vicinity of the optical black value OB in the RAW image data that has undergone gradation correction. In other words, in the portion of the input-output characteristic curve 1800 in the vicinity of the optical black value OB, noise on the side where the input signal level E is less than the optical black value OB (negative direction) and noise on the side where the input signal level E is greater than the optical black value OB (positive direction) cancel each other out in a noise reduction process, which allows for more efficient noise reduction than in Embodiment 1. Thus, it is possible to mitigate black level degradation in the vicinity of the optical black value OB in the RAW image data that has undergone gradation correction, and improve color reproduction.
G={OETF[E]}′=(α/γ)×{(OB−E)/(1−OB)}(1/γ)−1 E<OB
(α/γ)×{(E−OB)/(1−OB)}(1/γ)−1 OB≤E (11)
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 1900, for example, the gain G takes on the minimum value when the input signal level E is at 0.0 in the interval SC9, increases from 0.0, and reaches the maximum value (infinity) when the input signal level E reaches the optical black value OB.
An interval SC19 is an interval from the optical black value OB to a value 20B for the input signal level E, which is double the optical black value OB. In the interval SC19, the gain G takes on the maximum value (infinity) where the input signal level E is at the optical black value OB, and is reduced from the optical black value OB, reaching the minimum value at 20B. In other words, the waveform 1901 indicating the gain characteristics in the interval SC9 and the waveform 1902 indicating the gain characteristics in the interval SC19 are in linear symmetry about the optical black value OB.
As a result, the optical black value OB is the maximum value for the gain G in the interval SC9 and the interval SC19, which are dark portions. Also, the gain G attenuates, the farther the input signal level E is from the optical black value OB in the interval SC9 and the interval SC19. Thus, by setting at a high value the gain in the interval of greater than or equal to the optical black value OB, which is active for the image after developing, it is possible to achieve a greater effect of mitigating encoding distortion as well as reducing noise occurring in the dark portions.
Also, the waveforms 1901 and 1902 are in linear symmetry about the optical black value OB, and thus, in the vicinity of the optical black value OB, noise on the side where the input signal level E is less than the optical black value OB (negative direction) and noise on the side where the input signal level E is greater than the optical black value OB (positive direction) cancel each other out to reduce noise, and thus, it is possible to mitigate black level degradation.
Also, similar to Embodiment 1, by setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
An interval SC201 is an interval where the input signal level E′ is from 0.0 to β indicated in formula (10), and an interval SC202 is an interval where the input signal level E′ is from β to 1.0. Specifically, for example, in the input-output characteristic curve 2000, a waveform 2001 in the interval SC201 is a waveform attained from negative γ correction, and a waveform 2002 of the interval SC202 is a waveform attained from positive γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 2000 of
E=EOTF[E′]=OB−(1−OB)×{(E′−β)/α}γ E′<β
OB+(1−OB)×{(E′−β)/α}γ β/≤E′ (12)
where α=1/{1+{OB/(1−OB)}1/γ}
β=α×{OB/(1−OB)}1/γ
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (12), the formula for when the condition is E′<β is the formula for negative γ correction, and the formula for when the condition is β≤E′ is the formula for positive γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (12) if the gradation correction identifier 326 indicating formula (10) is detected in the control information 312.
By executing negative γ correction in the interval SC201, it is possible to increase the effect of mitigating encoding distortion in the vicinity of the optical black value OB in the restored RAW image data that has undergone inverse gradation correction, and it is possible to reduce noise occurring in the dark portions, and thus, it is possible to improve color reproduction.
Embodiment 3 is an example in which the gain of dark portions is increased as compared to Embodiment 2. In Embodiment 3, differences from Embodiment 2 will be primarily described, and descriptions of the same configurations and content as Embodiment 2 are applied to Embodiment 3 as well, and descriptions thereof are omitted.
Specifically, for example, in the input-output characteristic curve 2100, a waveform 2101 in the interval SC9 is a waveform attained from negative offset 1/γ correction, and a waveform 2102 of the interval greater than or equal to the optical black value OB is a waveform attained from positive offset 1/γ correction.
The gradation correction algorithm shown in the input-output characteristic curve 2100 of
E′=OETF[E]=OUT[1]−C×{(OB−E+K)1/γ−K1/γ} E<OB
OUT[1]+C×{(E−OB+K)1/γ−K1/γ} OB≤E (13)
where K=(g×γ)γ/(1−γ)
C=1/{(OB+K)1/γ+(1−OB+K)1/γ−2K1/γ}
OUT[1]=C×{(OB+K)1/γ−K1/γ}
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, γ is the gamma value, and g is the calculated provisional gain. In formula (13), the formula for when the condition is E<OB is the formula for negative offset 1/γ correction, and the formula for when the condition is OB≤E is the formula for positive offset 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (13) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
G={OETF[E]}′=(C/γ)×(OB−E+K)(1/γ)−1 E<OB
(C/γ)×(E−OB+K)(1/γ)−1 OB≤E (14)
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 2200, for example, the gain G takes on the minimum value when the input signal level E is at 0.0 in the interval SC9, increases from 0.0, and reaches the calculated provisional gain g, which is the maximum value, when the input signal level E reaches the optical black value OB. The calculated provisional gain is a value set by the setting unit 204.
In the interval SC19, the gain G takes on the calculated provisional gain g, which is the maximum value, where the input signal level E is at the optical black value OB, and is reduced from the optical black value OB, reaching the minimum value at 20B. In other words, the waveform 2201 indicating the gain characteristics in the interval SC9 and the waveform 2202 indicating the gain characteristics in the interval SC19 are in linear symmetry about the optical black value OB.
Also, by offsetting the value of the gain G in the optical black value OB to the calculated provisional gain g from infinity, as described in Embodiment 2, the gain characteristic curve 2200 has a higher input signal level for the bright portion as compared to the gain characteristic curve 1900. Thus, it is possible to emphasize pixels in the vicinity of the optical black value OB by gradation correction and emphasize pixels in the bright portion.
An interval SC231 is an interval where the input signal level E′ is from 0.0 to OUT[1] indicated in formula (13), and an interval SC232 is an interval where the input signal level E′ is from OUT[1] to 1.0. Specifically, for example, in the input-output characteristic curve 2300, a waveform 2301 in the interval SC231 is a waveform attained from negative offset γ correction, and a waveform 2302 of the interval SC232 is a waveform attained from positive offset γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 2300 of
E=EOTF[E′]=OB+K−{(OUT[1]−E′)/C+K1/γ}γ E′<OUT[1]
OB−K+{(E′−OUT[1])/C+K1/γ}γ OUT[1]≤E′ (15)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (15), the formula for when the condition is E′<OUT[1] is the formula for negative offset γ correction, and the formula for when the condition is OUT[1]≤E′ is the formula for positive offset γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (15) if the gradation correction identifier 326 indicating formula (13) is detected in the control information 312.
By executing negative offset 1/γ correction in the interval SC231, it is possible to improve color reproduction in the vicinity of the optical black value OB in the RAW image data that has undergone inverse gradation correction. Also, the gain of the bright portions is increased, and thus, it is possible to emphasize pixels that are in the bright portion as a result of gradation correction.
Additionally, the setting unit 204 may set a calculated gain GOB in the inverse gradation correction unit 603 instead of the calculated provisional gain g (formula (16) below). By setting the calculated gain GOB in the inverse gradation correction unit 603, it is possible to improve the reproducibility of bright portions or optical black portions, which are dark portions, in the original RAW image data as a result of inverse gradation correction.
G
OB
=C×g (16)
Embodiment 4 is an example in which an input signal level E of a given width including an optical black value is provided in the calculated provisional gain g of Embodiment 3. In Embodiment 4, differences from Embodiment 3 will be primarily described, and descriptions of the same configurations and content as Embodiment 3 are applicable to Embodiment 4 as well, and descriptions thereof are omitted.
The range within the pouch width D where the value of the input signal level E is P1 (0.0<P1<OB) to the optical black value OB is a first pouch width D1 and the range within the pouch width D where the value of the input signal level E is from the optical black value OB to P2 (OB≤P2) is a second pouch width D2. The pouch width D is a range in which the gain G of the input signal level E is constant.
The gradation correction unit 201 executes negative gradation correction for input signal levels E in the interval SC24 of 0.0 to P1, or in other words, executes negative offset 1/γ correction, executes gradation correction with a constant gain G for input signal levels E in the interval of the pouch width D, and executes positive gradation correction for input signal levels E in the interval of P2 or greater, or in other words, executes positive offset 1/γ correction.
Specifically, for example, in the input-output characteristic curve 2400, a waveform 2401 in the interval SC24 is a waveform attained from negative offset 1/γ correction, a waveform 2402 in the interval of the pouch width D is a waveform attained from gradation correction in which the gain G is constant, and a waveform 2403 of the interval where the input signal level E is P2 or greater is a waveform attained from positive offset 1/γ correction.
The gradation correction algorithm shown in the input-output characteristic curve 2400 of
E′=OETF[E]=OUT[1]−C×{(IN[1]−E+K)1/γ−K1/γ} E<IN[1]
OUT[1]+C×g×(E−IN[1]) IN[1]≤E<IN[2]
OUT[2]+C×{(E−IN[2]+K)1/γ−K1/γ} IN[2] (17)
where K=(g×γ)γ/(1−γ)
C=1/{(IN[1]+K)1/γ(1−IN[2]+K)1/γ−2K1/γ−g×(P1+P2)}
IN[1]=OB−P1
IN[2]=OB+P2
OUT[1]=C×{(IN[1]+K)1/γ−K1/γ}
OUT[2]=OUT[1]+C×g×(P1+P2)
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, γ is the gamma value, and g is the calculated provisional gain. Also, IN[1] is the first pouch width D1 and IN[2] is the second pouch width D2.
In formula (17), the formula for when the condition is E<OB is the formula for negative offset 1/γ correction, the formula for when the condition is IN[1]≤E<IN[2], or in other words, the pouch width D signifies gradation correction in which the gain G is constant, and the formula for when the condition is IN[2]≤E is the formula for positive offset 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (17) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
G={OETF[E]}′=(C/γ)×(IN[1]−E+K)(1/γ)−1 E<IN[1]
C×g IN[1]≤E<IN[2]
(C/γ)×(E−IN[2]+K)(1/γ)−1 IN[2]≤E (18)
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 2500, for example, the gain G takes on the minimum value when the input signal level E is at 0.0 in the interval SC24, increases from 0.0, and reaches the calculated provisional gain g, which is the maximum value, at P1, which is the right hand edge of the pouch width D. The calculated provisional gain g is a value set by the setting unit 204.
The gain G is held constant at the calculated provisional gain g in the pouch width D. The gain G decreases from the optical black value OB at P2, which is the left hand edge of the pouch width D, or greater. As a result of setting the first pouch width D1, it is possible to preserve noise in the vicinity of the optical black value OB. Also, as a result of setting the second pouch width D2, it is possible to increase the degree to which black is expressed, the higher the compression rate is.
Also, the second pouch width D2 is variable according to the exposure amount set by the setting unit 204. Specifically, the optical black value OB is fixed and the position of P2 is changed. By setting the exposure amount to be an underexposure in the setting unit 204, P2 is changed such that the input signal level E increases, and the second pouch width P2 is widened, for example.
On the other hand, by setting the exposure amount to be an overexposure in the setting unit s204, P2 is changed such that the input signal level E decreases, and the second pouch width P2 is narrowed. In this manner, it is possible to expand or shrink the second pouch width D2 according to the exposure amount and emphasize pixels in the vicinity of the optical black value according to the exposure amount.
An interval SC261 is an interval where the input signal level E′ is from 0.0 to OUT[1] indicated in formula (16), an interval SC262 is an interval where the input signal level E′ is from OUT[1] to OUT[2], and an interval SC263 is an interval where the input signal level E′ is from OUT[2] to 1.0.
Specifically, for example, in the input-output characteristic curve 2600, a waveform 2601 in the interval SC261 is a waveform attained from negative offset γ correction, a waveform 2602 of the interval SC262 is a waveform attained from inverse gradation correction in which the gain G is constant, and a waveform 2603 of the interval SC263 is a waveform attained from positive offset γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 2600 of
E=EOTF[E′]=IN[1]+K−{(OUT[1]−E′)/C+K1/γ}γ E′<OUT[1]
IN[1]+(E′−OUT[1])/(C×g) OUT[1]≤E<OUT[2]
IN[2]−K+{(E′−OUT[2])/C+K1/γ}γ OUT[2]≤E′ (19)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (19), the formula for when the condition is E′<OUT[1] is the formula for negative offset γ correction, the formula for when the condition is In[1]≤E<In[2] signifies inverse gradation correction in which the gain G is constant, and the formula for when the condition is OUT[2]≤E′ is the formula for positive offset γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (19) if the gradation correction identifier 326 indicating formula (17) is detected in the control information 312.
By executing negative offset γ correction in the interval SC261, it is possible to improve color reproduction in the vicinity of the optical black value OB in the RAW image data that has undergone inverse gradation correction. Also, the gain of the bright portions is increased, and thus, it is possible to emphasize pixels that are in the bright portion as a result of gradation correction.
Embodiment 5 shows an example in which the positive slope of the interval in the input-output characteristic curve where the input signal level E is from 0 to OB is constant. In Embodiment 5, differences from Embodiment 3 will be primarily described, and descriptions of the same configurations and content as Embodiment 3 are applicable to Embodiment 5 as well, and descriptions thereof are omitted.
Specifically, in the input-output characteristic curve 2700, for example, the waveform 2701 of the interval SC9 is a linear waveform in which the output signal level E′ increases as the input signal level E increases. In other words, in the interval SC9, the input signal level E is directly proportional to the output signal level E′. The waveform 2702 of the interval SC27 (OB≤E) greater than or equal to the optical black value OB is a waveform attained from positive offset 1/γ correction. The gradation correction unit 201 performs fitting by gradation correction such that the output signal level E′ is 1.0 when the input signal level E is 1.0.
The gradation correction algorithm shown in the input-output characteristic curve 2700 of
E′=OETF[E]=E×S E<OB
β+α×(E−OB)1/γ OB≤E (20)
where α=(1−OB×S)/(1−OB)1/γ
β=OB×S
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, and γ is the gamma value. S is a constant value indicating the slope of the waveform 2701 of the interval SC9. The slope S is equal to 4 in
In formula (20), the formula for when the condition is E<OB is the formula for gradation correction in which the positive slope is constant for the input signal level E, and the formula for when the condition is OB≤E is the formula for positive offset 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (20) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
G={OETF[E]}′=S E<OB
(α/γ)×(E−OB)1/(γ−1) OB≤E (21)
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 2800, for example, the gain G takes on a constant value in the interval SC9.
Also, similar to Embodiment 1, by setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
An interval SC291 is an interval where the input signal level E′ is from 0.0 to β indicated in formula (10), and an interval SC292 is an interval where the input signal level E′ is from β to 1.0. Specifically, for example, in the input-output characteristic curve 2900, a waveform 2901 in the interval SC291 is a waveform attained from inverse gradation correction such the positive slope is constant, and a waveform 2902 of the interval SC292 is a waveform attained from positive γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 2900 of
E=EOTF[E′]=E′/S E′<β
OB+(1/α+(E′−β))γ β≤E′ (22)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (22), the formula for when the condition is E′<β is the formula for inverse gradation correction in which the positive slope is constant for input signal levels E lower than the optical black value OB, and the formula for when the condition is β≤E′ is the formula for positive γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (22) if the gradation correction identifier 326 indicating formula (20) is detected in the control information 312.
By executing inverse gradation correction such that the positive slope is constant in the interval SC201, it is possible to increase the effect of mitigating encoding distortion in the vicinity of the optical black value OB in the restored RAW image data that has undergone inverse gradation correction, and it is possible to reduce noise occurring in the dark portions, and thus, it is possible to improve color reproduction.
Embodiment 6 shows an example in which two fitting coefficients are adopted in the configuration of Embodiment 5. Specifically, for example, in Embodiment 5, in an interval of the input-output characteristic curve 2700 where the input signal level E is greater than or equal to OB (OB≤E), the fitting coefficient a is adjustable. In Embodiment 6, different fitting coefficients are used for the interval SC9 in which the input signal level E is less than OB (E<OB) and the interval in which the input signal level E is greater than or equal to OB (OB≤E). In Embodiment 6, differences from Embodiment 5 will be primarily described, and descriptions of the same configurations and content as Embodiment 5 are applicable to Embodiment 6 as well, and descriptions thereof are omitted.
Specifically, for example, in the input-output characteristic curve 3000, a waveform 3001 in the interval SC9 is a linear waveform in which the output signal level E′ increases as the input signal level E increases, and a waveform 3002 of the interval greater than or equal to the optical black value OB is a waveform attained from positive offset 1/γ correction. The gradation correction unit 201 performs fitting by gradation correction such that the output signal level E′ is 1.0 when the input signal level E is 1.0.
The gradation correction algorithm shown in the input-output characteristic curve 3000 of
E′=OETF[E]=E×α1 E<OB
α2×(E−OB)1/γ+β OB≤E (23)
where α2=(1−β)(1−OB)1/γ
β=α1×OB1/γ
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, and γ is the gamma value. α1 is an adjustable fitting coefficient and indicates a positive slope of the waveform 3001 of the interval SC9. α1 is equal to 2 in
The setting unit 204 can adjust the fitting coefficient α according to fluctuations in the ISO sensitivity in the information processing apparatus 100. As a result, it is possible to adjust the input-output characteristic curve 3000 with the fitting coefficient α1 in the interval SC9, and to adjust the input-output characteristic curve 3000 with the fitting coefficient α2 having a different value from the fitting coefficient α1 in the interval SC27 where OB≤E.
In formula (23), the formula for when the condition is E<OB is the formula for gradation correction in which the positive slope is constant for the input signal level E, and the formula for when the condition is OB≤E is the formula for positive offset 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (23) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
G={OETF[E]}′=α1 E<OB
(α2/γ)×(E−OB)1/(γ−1) OB≤E (24)
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 3100, for example, the gain G takes on a constant value in the interval SC9.
Also, similar to Embodiment 1, by setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
An interval SC321 is an interval where the input signal level E′ is from 0.0 to β indicated in formula (10), and an interval SC292 is an interval where the input signal level E′ is from β to 1.0. Specifically, for example, in the input-output characteristic curve 3200, a waveform 3201 in the interval SC321 is a waveform attained from negative γ correction, and a waveform 3202 of the interval SC322 is a waveform attained from positive γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 3200 of
E=EOTF[E′]/α1 E′<β
OB+(1/α2×(E′−β))γ β≤E′ (25)
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (25), the formula for when the condition is E′<β is the formula for inverse gradation correction in which the positive slope is constant for input signal levels E lower than the optical black value OB, and the formula for when the condition is β≤E′ is the formula for positive γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (25) if the gradation correction identifier 326 indicating formula (23) is detected in the control information 312.
By executing inverse gradation correction such that the positive slope is constant in the interval SC321, it is possible to increase the effect of mitigating encoding distortion in the vicinity of the optical black value OB in the restored RAW image data that has undergone inverse gradation correction, and it is possible to reduce noise occurring in the dark portions, and thus, it is possible to improve color reproduction.
Embodiment 7 is another example of Embodiment 2 in which an input signal level E less than or equal to the optical black value OB is replicated while the gain G of the optical black value OB is maximized in the manner of the input-output characteristic example 2 of gradation correction for when the optical black value of Embodiment 1 is used. In Embodiment 7, differences from Embodiment 2 will be primarily described, and descriptions of the same configurations and content as Embodiment 2 are applicable to Embodiment 7 as well, and descriptions thereof are omitted.
Specifically, for example, in the input-output characteristic curve 3300, a waveform 3301 in the interval SC9 is a waveform attained from negative 1/γ correction, and a waveform 3302 of the interval greater than or equal to the optical black value OB is a waveform attained from positive 1/γ correction.
The gradation correction algorithm shown in the input-output characteristic curve 3300 of
E′=OETF[E]=−(OB−E)1/γ+β E<OB
α×(E−OB)1/γ+β OB≤E (26)
where α=(1−OB1/γ)/(1−OB)1/γ
β=OB1/γ
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, γ is the gamma value, and α is a fitting coefficient that can be adjusted by the setting unit 204. Specifically, for example, the setting unit 204 can adjust the fitting coefficient α according to fluctuations in the ISO sensitivity in the information processing apparatus 100.
In formula (26), the formula for when the condition is E<OB is the formula for negative 1/γ correction, and the formula for when the condition is OB≤E is the formula for positive 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (26) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
By executing negative 1/γ correction in the interval SC9, it is possible to improve color reproduction in the vicinity of the optical black value OB in the RAW image data that has undergone gradation correction. In other words, in the portion of the input-output characteristic curve 3300 in the vicinity of the optical black value OB, noise on the side where the input signal level E is less than the optical black value OB (negative direction) and noise on the side where the input signal level E is greater than the optical black value OB (positive direction) cancel each other out in a noise reduction process, which allows for more efficient noise reduction than in Embodiment 1. Thus, it is possible to mitigate black level degradation in the vicinity of the optical black value OB in the RAW image data that has undergone gradation correction, and improve color reproduction.
G={OETF[E]}′=(1/γ)×(OB−E)1/(γ−1) E<OB
(α/γ)×(E−OB)1/(γ−1) OB≤E (27)
where α=(1−OB1/γ)/(1−OB)1/γ
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 3400, for example, the gain G takes on the minimum value when the input signal level E is at 0.0 in the interval SC9, increases from 0.0, and reaches the maximum value (infinity) when the input signal level E reaches the optical black value OB.
Also, by setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
An interval SC351 is an interval where the input signal level E′ is from 0.0 to β indicated in formula (10), and an interval SC352 is an interval where the input signal level E′ is from β to 1.0. Specifically, for example, in the input-output characteristic curve 3500, a waveform 3501 in the interval SC351 is a waveform attained from negative γ correction, and a waveform 3502 of the interval SC352 is a waveform attained from positive γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 3500 of
E=EOTF[E′]=OB−(β−E′)γ E′<β
OB+{1/α×(E′−β)}γ β≤E′ (28)
where α=(1−OB1/γ)/(1−OB)1/γ
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (28), the formula for when the condition is E′<β is the formula for negative γ correction, and the formula for when the condition is β≤E′ is the formula for positive γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (28) if the gradation correction identifier 326 indicating formula (26) is detected in the control information 312.
By executing negative γ correction in the interval SC351, it is possible to increase the effect of mitigating encoding distortion in the vicinity of the optical black value OB in the restored RAW image data that has undergone inverse gradation correction, and it is possible to reduce noise occurring in the dark portions, and thus, it is possible to improve color reproduction.
Embodiment 8 shows an example in which two fitting coefficients are adopted in the configuration of Embodiment 7. Specifically, for example, in Embodiment 7, in an interval SC27 of the input-output characteristic curve 3300 where the input signal level E is greater than or equal to OB (OB≤E), the fitting coefficient a is adjustable. In Embodiment 8, different fitting coefficients are used for the interval SC9 in which the input signal level E is less than OB (E<OB) and the interval SC27 in which the input signal level E is greater than or equal to OB (OB≤E). In Embodiment 8, differences from Embodiment 7 will be primarily described, and descriptions of the same configurations and content as Embodiment 7 are applicable to Embodiment 8 as well, and descriptions thereof are omitted.
Specifically, for example, in the input-output characteristic curve 3600, a waveform 3601 in the interval SC9 is a waveform attained from negative 1/γ correction, and a waveform 3602 of the interval SC27 greater than or equal to the optical black value OB is a waveform attained from positive 1/γ correction.
The gradation correction algorithm shown in the input-output characteristic curve 3600 of
E′=OETF[E]=−α1×(OB−E)1/γ+β E<OB
α2×(E−OB)1/γ+β OB≤E (29)
where α2=(1−β)/(1−OB)1/γ
β=α1×OB1/γ
E represents the signal level of the RAW image data (input signal level), E′ represents the signal level of the gradation correction RAW image data (output signal level), OETF[ ] represents a gradation correction function, OB is the optical black value, γ is the gamma value, and α1 and α2 are adjustable fitting coefficients. α2 is a fitting coefficient differing from α1 but dependent thereon.
The setting unit 204 can adjust the fitting coefficient a according to fluctuations in the ISO sensitivity in the information processing apparatus 100. As a result, it is possible to adjust the input-output characteristic curve 3600 with the fitting coefficient a 1 in the interval SC9, and to adjust the input-output characteristic curve 3600 with the fitting coefficient α2 having a different value from the fitting coefficient α1 in the interval SC27 where OB≤E.
In formula (29), the formula for when the condition is E<OB is the formula for negative 1/γ correction, and the formula for when the condition is OB≤E is the formula for positive 1/γ correction. The gradation correction unit 201 outputs the gradation correction identifier 326 indicating the gradation correction algorithm of formula (29) to the encoding unit 202, and the encoding unit 202 uses the gradation correction identifier 326 from the gradation correction unit 201 as the control information 312 in the header information 301.
By executing negative 1/γ correction in the interval SC9, it is possible to improve color reproduction in the vicinity of the optical black value OB in the RAW image data that has undergone gradation correction. In other words, in the portion of the input-output characteristic curve 3600 in the vicinity of the optical black value OB, noise on the side where the input signal level E is less than the optical black value OB (negative direction) and noise on the side where the input signal level E is greater than the optical black value OB (positive direction) cancel each other out in a noise reduction process, which allows for more efficient noise reduction than in Embodiment 1. Thus, it is possible to mitigate black level degradation in the vicinity of the optical black value OB in the RAW image data that has undergone gradation correction, and improve color reproduction.
G={OETF[E]}′=(α1/γ)×(OB−E)1/(γ−1) E<OB
(α2/γ)×(E−OB)1/(γ−1) OB≤E (30)
where α2=(1−β)/(1−OB)1/γ
β=α1×OB1/γ
G is the gain of the input signal level E. Specifically, in the gain characteristic curve 3700, for example, the gain G takes on the minimum value when the input signal level E is at 0.0 in the interval SC9, increases from 0.0, and reaches the maximum value (infinity) when the input signal level E reaches the optical black value OB.
Also, by setting the gain G of the dark portion to be large during gradation correction, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent.
An interval SC381 is an interval where the input signal level E′ is from 0.0 to β indicated in formula (10), and an interval SC382 is an interval where the input signal level E′ is from β to 1.0. Specifically, for example, in the input-output characteristic curve 3800, a waveform 3801 in the interval SC381 is a waveform attained from negative γ correction, and a waveform 3802 of the interval SC382 is a waveform attained from positive γ correction.
The inverse gradation correction algorithm shown in the input-output characteristic curve 3800 of
E=EOTF[E′]={1/α1×(β−E′)}γ E′<β
OB+{1/α2×(E′−β)}γ β≤E′ (31)
where α2=(1−β)/(1−OB)1/γ
β=α1×OB1/γ
E′ represents the signal level of the gradation correction RAW image data (input signal level), E represents the signal level of the restored RAW image data (output signal level), and EOTF[ ] represents an inverse gradation correction function. In formula (31), the formula for when the condition is E′<β is the formula for negative γ correction, and the formula for when the condition is β≤E′ is the formula for positive γ correction. The inverse gradation correction unit 603 executes the inverse gradation correction of formula (31) if the gradation correction identifier 326 indicating formula (29) is detected in the control information 312.
By executing negative γ correction in the interval SC381, it is possible to increase the effect of mitigating encoding distortion in the vicinity of the optical black value OB in the restored RAW image data that has undergone inverse gradation correction, and it is possible to reduce noise occurring in the dark portions, and thus, it is possible to improve color reproduction.
As described above, according to the present embodiment, it is possible to mitigate encoding distortion of dark portions resulting from gradation correction. Also, if displaying dark portions to be brighter for a reason such as greater visibility of forms in the dark portions when developing or performing image adjustment, for example, distortion of dark portions occurring between the encoding unit 202 and the decoding unit 602 can be suppressed by setting the gain G of the dark portion to be large during gradation correction. As a result, during developing or image adjustment, even if dark portions are brightened to allow for greater visibility of figures in dark portions or the like, distortion of dark portions has less of a tendency to be prominent. Also, it is possible to restore the original RAW image data through inverse gradation correction.
Number | Date | Country | Kind |
---|---|---|---|
2018-005212 | Jan 2018 | JP | national |
Number | Date | Country | |
---|---|---|---|
Parent | 16962785 | Sep 2020 | US |
Child | 17480727 | US |