Patent Publication Number: US-11647298-B2

Title: Image processing apparatus, image capturing apparatus, image processing method, and storage medium

Description:
BACKGROUND 
     Technical Field 
     One disclosed aspect of the embodiments relates to an image processing apparatus for brightness processing, an image capturing apparatus, an image processing method, and a storage medium. 
     Description of the Related Art 
     In recent years, High Dynamic Range (HDR)-compatible display devices with an enlarged dynamic range are becoming widespread. HDR images enable representation of videos that are bright compared to conventional ones, thereby showing the contrast effects more prominently than conventional Standard Dynamic Range (SDR) images. The contrast effects mentioned in the present specification refer to the phenomenon in which the appearance of the brightness and saturation of a foreground changes with a change in the brightness and saturation of a background. For example, if the brightness or saturation of the background increases, the foreground appears dark, faded in color, or high in contrast. 
     Due to the contrast effects, the appearance of the brightness and saturation of a main subject in an HDR image differs from that in a conventional SDR image; this has become a problem in some scenes. For example, in a portrait scene for an HDR image, when a background is bright due to contre-jour and the like, the difference in brightness/darkness between the background and a person in a foreground is emphasized by the contrast effects, and the face of the person appears dark. 
     Furthermore, while there is a technique to convert an HDR image into an SDR image in order to view the HDR image also on an SDR monitor, the HDR image and the SDR image appear different from each other in contrast due to the contrast effects when viewed in comparison with each other; this has become a problem in some scenes. For example, in a night-view scene for an HDR image, the vicinity of a light source of illumination appears high in contrast and sparkly due to the contrast effects. However, the impression thereof when viewed in the HDR image changes in a converted SDR image, in which the contrast effects are reduced and the contrast is lowered. 
     Japanese Patent No. 4016072 discloses a technique to generate an image that takes a plurality of frequencies into consideration by performing processing for converting luminance values of respective pixels into values representing numerical values that are conveniently allocated to adjectives (from very dark to very bright) indicating human perceptions of brightness that are commonly used in the field of designing of a light environment, and by performing wavelet composition, with respect to each of luminance images obtained through wavelet decomposition. Meanwhile, Japanese Patent Laid-Open No. 2019-071568 discloses a technique to perform tone conversion by making an adjustment to a tone conversion curve corresponding to a dynamic range of an input image so that changes in luminance are visually the same in a bright portion and a dark portion. 
     However, the technique disclosed in Japanese Patent No. 4016072 causes the occurrence of an artifact attributed to the wavelet transform in an image, and is thus inappropriate in direct image correction. On the other hand, with the technique disclosed in Japanese Patent Laid-Open No. 2019-071568, as the adjustment is made using the tone conversion curve, the distribution of degrees of influence of contrast in a space direction is not taken into consideration, and correction is performed uniformly throughout a screen. 
     SUMMARY 
     The disclosure has been made in view of the aforementioned situation, and provides a technique to generate information indicating the distribution of degrees of influence of contrast in an image. Note that the “image” mentioned here is not limited to an HDR image because an image in which the contrast effects can occur is not limited to the HDR image. 
     According to a first aspect of the embodiments, an image processing apparatus includes a first filter unit and a first composition unit. The first filter unit is configured to generate a plurality of results of filter processing for brightness by individually applying each of a plurality of filters for brightness with different frequency bands to a first brightness component image indicating a distribution of brightness components in a first image. The plurality of filters for brightness are spatial filters based on a visual characteristic of a human related to contrast detection. The first composition unit is configured to generate brightness contrast influence information indicating a distribution of degrees of influence of brightness contrast in the first image by compositing together the plurality of results of filter processing for brightness. 
     According to a second aspect of the embodiments, an image capturing apparatus includes the image processing apparatus according to the first aspect and an image capturing unit configured to generate the first image. 
     According to a third aspect of the embodiments, an image processing apparatus includes a filter unit and a composition unit. The filter unit is configured to generate a plurality of results of filter processing for color by individually applying each of a plurality of filters for color with different frequency bands to a color component image indicating a distribution of color components in an image. The plurality of filters for color are spatial filters based on a visual characteristic of a human related to contrast detection. The composition unit is configured to generate color contrast influence information indicating a distribution of degrees of influence of color contrast in the image by compositing together the plurality of results of filter processing for color. 
     According to a fourth aspect of the embodiments, an image processing apparatus includes a filter unit and a composition unit. The filter unit is configured to generate results of a plurality of filter processing for saturation by individually applying each of a plurality of filters for saturation with different frequency bands to a saturation component image indicating a distribution of saturation components in an image. The plurality of filters for saturation are spatial filters based on a visual characteristic of a human related to contrast detection. The composition unit is configured to generate saturation contrast influence information indicating a distribution of degrees of influence of saturation contrast in the image by compositing together the plurality of results of filter processing for saturation. 
     According to a fifth aspect of the embodiments, an image processing method executed by an image processing apparatus, includes generating a plurality of results of filter processing for brightness and generating brightness contrast influence information. The generating of a plurality of results of filter is performed by individually applying each of a plurality of filters for brightness with different frequency bands to a first brightness component image indicating a distribution of brightness components in a first image. The plurality of filters for brightness are spatial filters based on a visual characteristic of a human related to contrast detection. The generating of brightness contrast influence information, indicating a distribution of degrees of influence of brightness contrast in the first image, is performed by compositing together the plurality of results of filter processing for brightness. 
     According to a sixth aspect of the embodiments, an image processing method executed by an image processing apparatus includes generating a plurality of results of filter processing for color and generating color contrast influence information. The generating of a plurality of results of filter processing for color is performed by individually applying each of a plurality of filters for color with different frequency bands to a color component image indicating a distribution of color components in an image. The plurality of filters for color are spatial filters based on a visual characteristic of a human related to contrast detection. The generating of color contrast influence information, indicating a distribution of degrees of influence of color contrast in the image, is performed by compositing together the plurality of results of filter processing for color. 
     According to a seventh aspect of the embodiments, an image processing method executed by an image processing apparatus, includes generating results of a plurality of filter processing for saturation and generating saturation contrast influence information. The generating of results of a plurality of filter processing for saturation is performed by individually applying each of a plurality of filters for saturation with different frequency bands to a saturation component image indicating a distribution of saturation components in an image. The plurality of filters for saturation are spatial filters based on a visual characteristic of a human related to contrast detection. The generating of saturation contrast influence information, indicating a distribution of degrees of influence of saturation contrast in the image, is performed by compositing together the plurality of results of filter processing for saturation. 
     According to an eighth aspect of the embodiments, a non-transitory computer-readable storage medium stores a program for causing a computer to execute an image processing method including generating a plurality of results of filter processing for brightness and generating brightness contrast influence information. The generating of a plurality of results of filter processing for brightness is performed by individually applying each of a plurality of filters for brightness with different frequency bands to a first brightness component image indicating a distribution of brightness components in a first image. The plurality of filters for brightness are spatial filters based on a visual characteristic of a human related to contrast detection. The generating of brightness contrast influence information, indicating a distribution of degrees of influence of brightness contrast in the first image, is performed by compositing together the plurality of results of filter processing for brightness. 
     According to a ninth aspect of the embodiments, a non-transitory computer-readable storage medium stores a program for causing a computer to execute an image processing method including generating a plurality of results of filter processing for color and generating color contrast influence information. The generating of a plurality of results of filter processing for color is performed by individually applying each of a plurality of filters for color with different frequency bands to a color component image indicating a distribution of color components in an image. The plurality of filters for color are spatial filters based on a visual characteristic of a human related to contrast detection. The generating of color contrast influence information, indicating a distribution of degrees of influence of color contrast in the image, is performed by compositing together the plurality of results of filter processing for color. 
     According to a tenth aspect of the embodiments, a non-transitory computer-readable storage medium stores a program for causing a computer to execute an image processing method including generating results of a plurality of filter processing for saturation and generating saturation contrast influence information. The generating of results of a plurality of filter processing for saturation is performed by individually applying each of a plurality of filters for saturation with different frequency bands to a saturation component image indicating a distribution of saturation components in an image. The plurality of filters for saturation are spatial filters based on a visual characteristic of a human related to contrast detection. The generating of saturation contrast influence information, indicating a distribution of degrees of influence of saturation contrast in the image, is performed by compositing together the plurality of results of filter processing for saturation. 
     Further features of the disclosure will become apparent from the following description of exemplary embodiments with reference to the attached drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG.  1    is a block diagram showing a configuration of an image capturing apparatus  100  that includes an image processing apparatus. 
         FIG.  2    is a block diagram showing a detailed configuration of a portion that is involved in contrast correction processing in an image processing unit  104  according to a first embodiment. 
         FIG.  3    is a block diagram showing a detailed configuration of a brightness contrast influence information generation unit  202 . 
         FIG.  4    is a block diagram showing a detailed configuration of a saturation contrast influence information generation unit  203 . 
         FIG.  5    is a flowchart of the contrast correction processing executed by the image processing unit  104  according to the first embodiment. 
         FIG.  6    is a flowchart showing the details of processing of step S 502  in  FIG.  5    (processing executed by the brightness contrast influence information generation unit  202 ). 
         FIG.  7    is a flowchart showing the details of processing of step S 503  in  FIG.  5    (processing executed by the saturation contrast influence information generation unit  203 ). 
         FIGS.  8 A to  8 C  are diagrams illustrating a structure of a brightness contrast influence map. 
         FIGS.  9 A and  9 B  are conceptual diagrams of filters that are used in generating contrast influence information. 
         FIG.  9 C  is a diagram illustrating the results of filter processing. 
         FIGS.  10 A to  10 C  are diagrams illustrating a gain of a filter that is used in generating contrast influence information. 
         FIG.  11    is a block diagram showing a detailed configuration of a portion that is involved in contrast correction processing in the image processing unit  104  according to a second embodiment. 
         FIG.  12    is a block diagram showing a detailed configuration of an HDR/SDR conversion unit  1102 . 
         FIG.  13    is a flowchart of the contrast correction processing executed by the image processing unit  104  according to the second embodiment. 
         FIG.  14    is a flowchart showing the details of processing of step S 1304  in  FIG.  13    (processing for converting an HDR image into an SDR image). 
         FIG.  15    is a diagram illustrating gamma conversion in a linear space. 
         FIG.  16    is a diagram illustrating an example of local tone mapping processing. 
     
    
    
     DESCRIPTION OF THE EMBODIMENTS 
     Hereinafter, embodiments will be described in detail with reference to the attached drawings. Note, the following embodiments are not intended to limit the scope of the disclosure. Multiple features are described in the embodiments, but limitation is not made an embodiment that requires all such features, and multiple such features may be combined as appropriate. Furthermore, in the attached drawings, the same reference numerals are given to the same or similar configurations, and redundant description thereof is omitted. 
     First Embodiment 
       FIG.  1    is a block diagram showing a configuration of an image capturing apparatus  100  (e.g., a digital camera) that includes an image processing apparatus. In  FIG.  1   , an optical system  101  includes a lens assembly composed of a zoom lens and a focus lens, a diaphragm adjustment apparatus, and a shutter apparatus. The optical system  101  adjusts the magnification, the focus position, the light amount, and the like of a subject image that reaches an image capturing unit  102 . 
     The image capturing unit  102  is a photoelectric conversion element, such as a Charge-Coupled Device (CCD) or Complementary Metal Oxide Semiconductor (CMOS) sensor, that converts light beams of a subject that have passed through the optical system  101  into electrical signals through photoelectric conversion. An analog-to-digital (A/D) conversion unit  103  converts input video signals into a digital image. 
     An image processing unit  104  performs exposure amount calculation processing and subject detection processing, such as facial detection, in addition to normal signal processing. In addition, the image processing unit  104  performs processing for generating evaluation values related to the influence of contrast (contrast influence information), and processing for correcting an image using the evaluation values. The image processing unit  104  can perform similar image processing not only with respect to an image output from the A/D conversion unit  103 , but also with respect to an image that has been read out from a recording unit  109 . The detailed configuration and operations of the image processing unit  104  will be described later. 
     In order to realize the exposure amount calculated by the image processing unit  104 , an exposure amount control unit  105  controls a diaphragm, a shutter speed, and an analog gain of a sensor by controlling the optical system  101  and the image capturing unit  102 . 
     A system control unit  106  is a control function unit that performs integrated control on the operations of the entirety of the image capturing apparatus  100 . The system control unit  106  also controls driving of the optical system  101  and the image capturing unit  102  based on luminance values obtained from an image processed by the image processing unit  104  and on an instruction transmitted from an operation unit  107 . 
     A display unit  108  is composed of a liquid crystal display or an organic Electro Luminescence (EL) display, and displays images generated by the image processing unit  104  and images that have been read out from the recording unit  109 . The recording unit  109  has a function of recording images. The recording unit  109  may include, for example, an information recording medium that uses a memory card provided with a semiconductor memory, a package storing a rotatable recording member, such as a magneto-optical disc, and the like, and this information recording medium may be attachable and detachable. 
     A bus  110  is used to exchange images among the image processing unit  104 , system control unit  106 , display unit  108 , and recording unit  109 . 
     The following describes processing for generating pieces of contrast influence information indicating the degrees of influence of contrast at respective positions in an HDR image (the distribution of degrees of influence of contrast in the HDR image) and correcting the HDR image using the generated pieces of contrast influence information (contrast correction processing). Among the pieces of contrast influence information, contrast influence information related to brightness is referred to as brightness contrast influence information, and contrast influence information related to colors is referred to as color contrast influence information. While examples of color contrast include saturation contrast and hue contrast, the present embodiment will be described using saturation contrast as an example, and contrast influence information related to saturation is referred to as saturation contrast influence information. Note that in the present embodiment, an image that is to undergo contrast correction processing is not limited to an HDR image; for example, an SDR image may be used as an image that is to undergo the contrast correction processing. 
       FIG.  2    is a block diagram showing a detailed configuration of a portion that is involved in the contrast correction processing in the image processing unit  104 . The image processing unit  104  includes a brightness and color separation unit  201 , a brightness contrast influence information generation unit  202 , a saturation contrast influence information generation unit  203 , a brightness contrast correction unit  204 , a saturation contrast correction unit  205 , and a brightness and color combining unit  206 . 
     An HDR image that has been developed through normal signal processing of the image processing unit  104  is input to the brightness and color separation unit  201 , and the HDR image that has undergone the contrast correction processing is output from the brightness and color combining unit  206 . The input HDR image is, for example, an HDR image that has been generated by the image processing unit  104  developing a RAW image captured by the image capturing unit  102 . The development is performed using, for example, the gamma of ST 2084 (PQ gamma) and the color space of Rec. 2020. The output HDR image is also an image corresponding to the gamma characteristics and the color space similar to those of the input HDR image. Furthermore, the input image and the output image are composed of RGB or YUV. 
       FIG.  5    is a flowchart of the contrast correction processing executed by the image processing unit  104 . The processing of the present flowchart is started when an HDR image to be processed is input to the brightness and color separation unit  201 . Note that the system control unit or circuit  106  controls the contrast correction processing by controlling respective components of the image capturing apparatus  100 , including respective components of the image processing unit  104 , in accordance with a control program stored in a Random Access Memory (RAM), Read Only Memory (ROM), or a flash memory (not shown) as necessary, unless specifically stated otherwise. Typically, the system control unit or circuit  106  includes a programmable device, processor, or a central processing unit (CPU) that executes a set of instructions or program stored in a memory device, such as a RAM, ROM or a flash memory device, to perform operations, which may correspond to the functional units described in the following. 
     In step S 501 , the brightness and color separation unit  201  separates the input HDR image into a brightness component image and a color component image. Specifically, the brightness and color separation unit  201  converts the HDR image into the ICtCp color space that takes the visual characteristic of a human into consideration, and separates the same into the brightness component image and the color component image. I represents the brightness component image, and Ct, Cp represent the color component image. Although the description is given using the ICtCp color space here, the separation into (the obtainment of) the brightness component image and the color component image may be performed based on a perceptually uniform color space of Lab (an Lab color space). Furthermore, reduction processing may be performed with respect to the separated brightness component image or color component image. 
     In step S 502 , based on the brightness component image separated in step S 501 , the brightness contrast influence information generation unit  202  generates brightness contrast influence information indicating the distribution of degrees of influence of brightness contrast in the HDR image. The brightness contrast influence information is in the form of, for example, a map that indicates the degrees of influence of brightness contrast on a per-position basis. In the following description, this map will be referred to as a brightness contrast influence map. 
     A description is now given of a structure of the brightness contrast influence map with reference to  FIGS.  8 A to  8 C . As shown in  FIG.  8 A , the brightness contrast influence map stores signal values that indicate the degrees of influence of brightness contrast for respective sets of coordinates (x, y), with the upper-left coordinates being (0,0). For example, with regard to a portrait scene under contre-j our shown in  FIG.  8 B , the map indicating the degrees of influence of brightness contrast is as shown in  FIG.  8 C , in which a portion that appears darker due to the influence of brightness contrast (a higher degree of influence) is shown whiter. 
     In the present embodiment, the brightness contrast influence map has signal values that increase as the influence increases, with a portion that is not influenced by brightness contrast having 0. For example, when the brightness contrast influence map is represented using 8 bits, its signal values approach  255  from 0 as the influence of brightness contrast increases. In the present embodiment, the brightness contrast influence information generation unit  202  generates the brightness contrast influence map by performing filter processing with respect to the input brightness component image in a plurality of different frequency bands, and by compositing together the results of the filter processing. Further details of processing for generating the brightness contrast influence information will be described later. 
     In the present embodiment, while the brightness contrast influence information generation unit  202  generates the brightness contrast influence map having the same size as the input brightness component image, it may enlarge the generated brightness contrast influence map and output the enlarged map when the brightness contrast influence map has been generated from the reduced brightness component image. 
     In step S 503 , the saturation contrast influence information generation unit  203  generates saturation contrast influence information indicating the distribution of degrees of influence of saturation contrast in the HDR image from the color component image separated in step S 501 . Similarly to the brightness contrast influence information that has been described in step S 502 , the saturation contrast influence information is in the form of, for example, a map that indicates the degrees of influence of saturation contrast on a per-position basis. In the following description, this map will be referred to as a saturation contrast influence map. In the saturation contrast influence map, a portion that has low saturation and appears faded due to the influence of saturation contrast (a higher degree of influence) has larger signal values. 
     In the present embodiment, the degree of influence of saturation contrast is represented as a proportion, and the saturation contrast influence map has signal values that indicate larger proportions as the influence increases, with a portion that is not influenced by saturation contrast corresponding to a scale factor of 1. In the present embodiment, the saturation contrast influence information generation unit  203  generates the saturation contrast influence map by performing filter processing with respect to the input color component image in a plurality of different frequency bands, and by compositing the results of the filter processing. Further details of processing for generating the saturation contrast influence information will be described later. 
     In the present embodiment, while the saturation contrast influence information generation unit  203  generates the saturation contrast influence map having the same size as the input color component image, it may enlarge the generated saturation contrast influence map and output the enlarged map when the saturation contrast influence map is generated from the reduced color component image. 
     In step S 504 , the brightness contrast correction unit  204  performs brightness contrast correction processing with respect to the brightness component image that was separated from the HDR image in step S 501  based on the brightness contrast influence map that was generated in step S 502 . Provided that a signal value at coordinates (x, y) in the brightness component image is I (x, y) and a signal value at coordinates (x, y) in the brightness contrast influence map is Map_I (x, y), a signal value I′ (x, y) at coordinates (x, y) in the brightness component image after the brightness contrast correction processing is calculated in accordance with Equation (1).
 
 I ′ ( x,y )= I ( x,y )+Map_ I ( x,y )  (1)
 
As stated earlier, in the brightness contrast influence map, a portion that appears darker due to the influence of brightness contrast has larger signal values. Therefore, the portion that appears dark due to the influence of brightness contrast can be corrected to be bright (the influence of brightness contrast can be alleviated) by adding signal values of the brightness contrast influence map to signal values of the brightness component image.
 
     Note that the processing for correcting the influence of brightness contrast is not limited to the processing for alleviating the influence of brightness contrast. For example, correction may be performed so as to enlarge the influence of brightness contrast by, rather than adding, subtracting signal values of the brightness contrast influence map in Equation (1). By thus making a correction so as to enlarge the influence of brightness contrast, for example, a bright subject can be further emphasized in a night-view scene. 
     In step S 505 , the saturation contrast correction unit  205  performs saturation contrast correction processing with respect to the color component image that was separated from the HDR image in step S 501  based on the saturation contrast influence map that was generated in step S 503 . Provided that a signal value at coordinates (x, y) in the color component image is Ct (x, y), Cp (x, y) and a signal value at coordinates (x, y) in the saturation contrast influence map is Map_Ct Cp (x, y), a signal value Ct′ (x, y), Cp′ (x, y) at coordinates (x, y) in the color component image after the saturation contrast correction processing is calculated in accordance with Equation (2). 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               Ct 
                               ′ 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                           = 
                           
                             
                               Ct 
                               ⁡ 
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                             × 
                             
                               Map_ 
                               ⁢ 
                               CtCp 
                             
                             ⁢ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                         
                       
                     
                     
                       
                         
                           
                             
                               Cp 
                               ′ 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                           = 
                           
                             
                               Cp 
                               ⁡ 
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                             × 
                             
                               Map_ 
                               ⁢ 
                               CtCp 
                             
                             ⁢ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   } 
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
     As stated earlier, in the saturation contrast influence map, a portion that appears more shaded due to the influence of saturation contrast has larger signal values. Therefore, the portion that has low saturation and appears shaded due to the influence of saturation contrast can be corrected to have high saturation by multiplying signal values of the color component image by signal values of the saturation contrast influence map. 
     Note that the processing for correcting the influence of saturation contrast is not limited to the processing for alleviating the influence of saturation contrast. For example, correction may be performed so as to enlarge the influence of saturation contrast by, rather than multiplication, division by signal values of the saturation contrast influence map in Equation (2). By thus making a correction so as to enlarge the influence of saturation contrast, for example, a subject that is more colorful than a background can be further emphasized. 
     Furthermore, in the foregoing description, it is assumed that the brightness contrast correction processing is performed by adding signal values of the brightness contrast influence map to signal values of the brightness component image, and the saturation contrast correction processing is performed by multiplying signal values of the color component image by signal values of the saturation contrast influence map. However, it is also possible to adopt a configuration in which the brightness contrast influence map is represented by signal values that indicate proportions similarly to the saturation contrast influence map, and the brightness contrast correction processing is performed by multiplying signal values of the brightness component image by signal values of the brightness contrast influence map. Moreover, it is also possible to adopt a configuration in which the saturation contrast influence map is represented by signal values that indicate the degrees of influence similarly to the brightness contrast influence map, and the saturation contrast correction processing is performed by adding signal values of the saturation contrast influence map to signal values of the color component image. 
     In step S 506 , the brightness and color combining unit  206  combines (composites) the brightness component image that underwent the brightness contrast correction processing in step S 504  and the color component image that underwent the saturation contrast correction processing in step S 505 . In the present embodiment, the brightness and color combining unit  206  combines the brightness component image (I image) that underwent the brightness contrast correction processing and the color component image (Ct image, Cp image) that underwent the saturation contrast correction processing, thereby generating an ICtCp image. Then, the brightness and color combining unit  206  converts the combined ICtCp image into an RGB image or a YUV image. 
     Through the foregoing processing, contrast influence information indicating the distribution of degrees of influence of contrast can be generated from the input HDR image, and the HDR image (corrected image) that underwent contrast correction (the influence of contrast has been alleviated or enlarged) can be generated. 
     Note that in the foregoing description, it is assumed that the contrast correction processing is performed with respect to both of the brightness component image and the color component image that were separated from the HDR image in step S 501 . However, the contrast correction processing may be performed with respect to only one of the brightness component image and the color component image. For example, assume a case where the contrast correction processing is performed with respect to the brightness component image, and the contrast correction processing is not performed with respect to the color component image. In this case, processing of steps S 503  and S 505  is omitted, and processing for combining the brightness component image that underwent the brightness contrast correction processing in step S 504  and the color component image that was separated in step S 501  is performed in step S 506 . 
     Next, a description is given of the details of processing of step S 502  in  FIG.  5    (processing for generating the brightness contrast influence information) with reference to  FIG.  3    and  FIG.  6   . As stated earlier, in the present embodiment, the brightness contrast influence map is used as an example of the brightness contrast influence information. 
       FIG.  3    is a block diagram showing a detailed configuration of the brightness contrast influence information generation unit  202 . The brightness contrast influence information generation unit  202  includes a first filter processing unit  301 , a second filter processing unit  302 , a third filter processing unit  303 , and a composition unit  304 . The brightness and color separation unit  201  inputs the brightness component image to the first filter processing unit  301 , second filter processing unit  302 , and third filter processing unit  303 . The composition unit  304  outputs the brightness contrast influence map to the brightness contrast correction unit  204 . 
       FIG.  6    is a flowchart showing the details of processing of step S 502  in  FIG.  5    (processing executed by the brightness contrast influence information generation unit  202 ). 
     In step S 601 , the first filter processing unit  301  performs first filter processing in a first frequency band with respect to the brightness component image input from the brightness and color separation unit  201 . The details of the first filter processing will be described later. 
     In step S 602 , the second filter processing unit  302  performs second filter processing in a second frequency band, which differs from the first frequency band, with respect to the brightness component image input from the brightness and color separation unit  201 . The details of the second filter processing will be described later. 
     In step S 603 , the third filter processing unit  303  performs third filter processing in a third frequency band, which differs from the first frequency band and the second frequency band, with respect to the brightness component image input from the brightness and color separation unit  201 . The details of the third filter processing will be described later. 
     In step S 604 , the composition unit  304  composites together the results of the first filter processing, second filter processing, and third filter processing. Provided that signal values of the results of the first filter processing, second filter processing, and third filter processing at coordinates (x, y) are F 1  (x, y), F 2  (x, y), and F 3  (x, y), respectively, a signal value Map_I (x, y) at coordinates (x, y) after the composition processing is calculated in accordance with the following Equation (3).
 
Map_ I ( x,y )=Max[ F   1 ( x,y ), F   2 ( x,y ), F   3 ( x,y )]  (3)
 
     Note that although the largest values of the plurality of results of filter processing are selected as signal values after the composition processing in the example of Equation (3), it is possible to adopt a configuration in which signal values after the composition processing are generated by calculating average values of the plurality of results of filter processing as in the following Equation (4).
 
Map_ I ( x,y )=( F   1 ( x,y )+ F   2 ( x,y )+ F   3 ( x,y ))÷3  (4)
 
     The brightness contrast influence map is generated through the foregoing processing. 
     Note that although filter processing is performed in three different frequency bands in the example of  FIG.  3    and  FIG.  6   , the number of frequency bands is not limited to three, and may be any number equal to or larger than two (a plural number). In other words, the brightness contrast influence information generation unit  202  (a first filter unit) individually applies each of a plurality of filters for brightness with different frequency bands to the brightness component image, thereby generating a plurality of results of filter processing for brightness. The brightness contrast influence information generation unit  202  is configured to include filter processing units that correspond in number to the number of frequency bands, and the composition unit  304  composites together the plurality of results of filter processing for brightness from the plurality of filter processing units included in the brightness contrast influence information generation unit  202 . 
     Next, a description is given of the details of processing of step S 503  in  FIG.  5    (processing for generating the saturation contrast influence information) with reference to  FIG.  4    and  FIG.  7   . As stated earlier, in the present embodiment, the saturation contrast influence map is used as an example of the saturation contrast influence information. The processing for generating the saturation contrast influence information differs from the processing for generating the brightness contrast influence information in that a saturation component image is generated from the input color component image and filter processing is performed with respect to the generated saturation component image, rather than performing filter processing directly with respect to the input color component image. 
       FIG.  4    is a block diagram showing a detailed configuration of the saturation contrast influence information generation unit  203 . The saturation contrast influence information generation unit  203  includes a saturation signal generation unit  401 , a first filter processing unit  402 , a second filter processing unit  403 , a third filter processing unit  404 , and a composition unit  405 . The brightness and color separation unit  201  inputs the color component image to the saturation signal generation unit  401 . The composition unit  405  outputs the saturation contrast influence map to the saturation contrast correction unit  205 . 
       FIG.  7    is a flowchart showing the details of processing of step S 503  in  FIG.  5    (processing executed by the saturation contrast influence information generation unit  203 ). 
     In step S 701 , the saturation signal generation unit  401  generates a saturation component image from the input color component image. In the present embodiment, a Ct, Cp image is used as the color component image. Provided that a signal value at coordinates (x, y) in the Ct, Cp image is Ct (x, y), Cp (x, y), a signal value S (x, y) at coordinates (x, y) in the saturation component image is calculated in accordance with the following Equation (5).
 
 S ( x,y )=√{square root over ( Ct ( x,y ) 2   +Cp ( x,y ) 2 )}  (5)
 
     In step S 702 , the first filter processing unit  402  performs first filter processing in a first frequency band with respect to the saturation component image input from the saturation signal generation unit  401 . Although the first filter processing in step S 702  is similar to the first filter processing in step S 601 , the first frequency band in step S 702  may be the same as or different from the first frequency band in step S 601 . 
     In step S 703 , the second filter processing unit  403  performs second filter processing in a second frequency band, which differs from the first frequency band, with respect to the saturation component image input from the saturation signal generation unit  401 . Although the second filter processing in step S 703  is similar to the second filter processing in step S 602 , the second frequency band in step S 703  may be the same as or different from the second frequency band in step S 602 . 
     In step S 704 , the third filter processing unit  404  performs third filter processing in a third frequency band, which differs from the first frequency band and the second frequency band, with respect to the saturation component image input from the saturation signal generation unit  401 . Although the third filter processing in step S 704  is similar to the third filter processing in step S 603 , the third frequency band in step S 704  may be the same as or different from the third frequency band in step S 603 . 
     In step S 705 , the composition unit  405  composites together the results of the first filter processing, second filter processing, and third filter processing. The composition method used here is similar to the composition method in step S 604 . 
     The saturation contrast influence map is generated through the foregoing processing. 
     Note that although filter processing is performed in three different frequency bands in the example of  FIG.  4    and  FIG.  7   , the number of frequency bands is not limited to three, and may be any number equal to or larger than two (a plural number). In other words, the saturation contrast influence information generation unit  203  (a second filter unit) individually applies each of a plurality of filters for saturation with different frequency bands to the saturation component image, thereby generating a plurality of results of filter processing for saturation. The saturation contrast influence information generation unit  203  is configured to include filter processing units that correspond in number to the number of frequency bands, and the composition unit  405  composites the plurality of results of filter processing for saturation from the plurality of filter processing units included in the saturation contrast influence information generation unit  203 . 
     Next, the details of the filter processing in steps S 601  to S 603  of  FIG.  6    and steps S 702  to S 704  of  FIG.  7    will be described with reference to  FIGS.  9 A to  9 C  and  FIGS.  10 A to  10 C . As stated earlier, the filter processing in steps S 702  to S 704  of  FIG.  7    is similar to the filter processing in steps S 601  to S 603  of  FIG.  6   , and in either filter processing, spatial filters based on the visual characteristic of a human related to contrast detection are used. However, as stated earlier, the frequency bands of the filters in steps S 702  to S 704  of  FIG.  7    are not necessarily the same as the frequency bands of the filters in steps S 601  to S 603  of  FIG.  6   . 
       FIG.  9 A  is a diagram of one-dimensional representation of a filter that utilizes a Gaussian second-order differential function based on the characteristic of contrast detection among the visual characteristic of a human. The aforementioned filter is of a sombrero type that takes a difference between a central region and peripheral regions. As indicated by Equation (6), the foregoing filter result corresponding to a target pixel (x, y) in the input image is represented as Gf k  (x, y). 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             r 
                             ij 
                           
                           = 
                           
                             
                               
                                 
                                   ( 
                                   
                                     x 
                                     - 
                                     i 
                                   
                                   ) 
                                 
                                 2 
                               
                               + 
                               
                                 
                                   ( 
                                   
                                     y 
                                     - 
                                     j 
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           
                             w 
                             ij 
                           
                           = 
                           
                             - 
                             
                               { 
                               
                                 
                                   - 
                                   
                                     1 
                                     
                                       
                                         πσ 
                                         k 
                                       
                                       4 
                                     
                                   
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     1 
                                     - 
                                     
                                       
                                         
                                           r 
                                           ij 
                                         
                                         2 
                                       
                                       
                                         2 
                                         ⁢ 
                                         
                                           
                                             σ 
                                             k 
                                           
                                           2 
                                         
                                       
                                     
                                   
                                   ) 
                                 
                                 ⁢ 
                                 
                                   e 
                                   
                                     - 
                                     
                                       
                                         
                                           r 
                                           ij 
                                         
                                         2 
                                       
                                       
                                         2 
                                         ⁢ 
                                         
                                           
                                             σ 
                                             k 
                                           
                                           2 
                                         
                                       
                                     
                                   
                                 
                               
                               } 
                             
                           
                         
                       
                     
                     
                       
                         
                           
                             
                               Gf 
                               k 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                           = 
                           
                             
                               
                                 ∑ 
                                 i 
                               
                               ⁢ 
                               
                                 
                                   ∑ 
                                   j 
                                 
                                 ⁢ 
                                 
                                   
                                     w 
                                     ij 
                                   
                                   ⁢ 
                                   
                                     pix 
                                     ⁡ 
                                     
                                       ( 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                       ) 
                                     
                                   
                                 
                               
                             
                             
                               
                                 ∑ 
                                 i 
                               
                               ⁢ 
                               
                                 
                                   ∑ 
                                   j 
                                 
                                 ⁢ 
                                 
                                   w 
                                   ij 
                                 
                               
                             
                           
                         
                       
                     
                   
                   } 
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
     In Equation (6), r ij  is the distance from the target pixel (x, y) for the filter to coordinates (i, j), σ k  is a filter parameter, w ij  is the weight of the filter at coordinates (i, j), and pix (i, j) is a signal value at coordinates (i, j) in the input image. k is an identification number of the filter, and when there are n filters, k=0, 1, 2, . . . , n−1. 
     σ k  changes in accordance with the frequency band used in the detection.  FIG.  9 B  is one-dimensional representations of the shapes of the filters based on Equation (6) for a case where three different frequency bands are used in the detection. The characteristics of the filters are such that the larger the value of σ k , the lower the frequency band used in the detection; as σ k  increases from a small value to a large value, the filters change in shape as indicated by a filter  901 , a filter  902 , and a filter  903  in  FIG.  9 B . 
     In the present embodiment, a signal value F k  (x, y) of the results of filter processing is generated by performing the computation of the following Equation (7) using the filters of Equation (6).
 
 F   k ( x,y )=−1×( Gf   k ( x,y )−pix( x,y ))×gain k   (7)
 
In Equation (7), pix (x, y) is a signal value at coordinates (x, y) in the input image, and gain k  is a gain conforming to the frequency band used in the detection; the method of calculating gain k  will be described later.
 
     Furthermore, when the results of filter processing are represented as proportions rather than difference values, the results of filter processing can be generated by performing computation of the following Equation (8). 
     
       
         
           
             
               
                 
                   
                     
                       F 
                       k 
                     
                     ⁡ 
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       
                         
                           - 
                           1 
                         
                         × 
                         
                           ( 
                           
                             
                               
                                 Gf 
                                 k 
                               
                               ⁡ 
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                             - 
                             
                               pix 
                               ⁡ 
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                           
                           ) 
                         
                         × 
                         
                           gain 
                           k 
                         
                       
                       + 
                       
                         pix 
                         ⁡ 
                         
                           ( 
                           
                             x 
                             , 
                             y 
                           
                           ) 
                         
                       
                     
                     
                       pix 
                       ⁡ 
                       
                         ( 
                         
                           x 
                           , 
                           y 
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
     In the present embodiment, Equation (7) is used in generating the brightness contrast influence map, and Equation (8) is used in generating the saturation contrast influence map. A brightness component signal value I (x, y) is used as pix (x, y) in generating the brightness contrast influence map, and a saturation component signal value S (x, y) is used as pix (x, y) in generating the saturation contrast influence map. 
     Note that in generating the brightness contrast influence map, instead of using the brightness component signal value I (x, y) as is as pix (x, y), a signal obtained by converting the brightness component signal value I (x, y) to linear based on the monitor gamma Electro-Optical Transfer Function (EOTF) described in ST 2084 may be used as pix (x, y) as shown in Equation (9). 
     
       
         
           
             
               
                 
                   
                     
                       p 
                       ⁢ 
                       _in 
                     
                     = 
                     
                       
                         ( 
                         
                           
                             
                               
                                 p 
                                 ⁢ 
                                 _out 
                               
                               
                                 1 
                                 
                                   m 
                                   2 
                                 
                               
                             
                             - 
                             
                               c 
                               1 
                             
                           
                           
                             
                               c 
                               2 
                             
                             - 
                             
                               
                                 c 
                                 3 
                               
                               · 
                               
                                 
                                   p 
                                   ⁢ 
                                   _out 
                                 
                                 
                                   1 
                                   
                                     m 
                                     2 
                                   
                                 
                               
                             
                           
                         
                         ) 
                       
                       
                         1 
                         
                           m 
                           1 
                         
                       
                     
                   
                   ⁢ 
                   
                     
 
                   
                   ⁢ 
                   
                     
                       
                         m 
                         1 
                       
                       = 
                       0.1593017578125 
                     
                     , 
                     
                       
                         m 
                         2 
                       
                       = 
                       78.84375 
                     
                     , 
                     
                       
 
                     
                     ⁢ 
                     
                       
                         c 
                         1 
                       
                       = 
                       0.8359375 
                     
                     , 
                     
                       
                         c 
                         2 
                       
                       = 
                       18.8515625 
                     
                     , 
                     
                       
                         c 
                         3 
                       
                       = 
                       18.6875 
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
     In Equation (9), p_out is a signal obtained by normalizing the brightness component signal value I (x, y) to 0.0-1.0, where 0.1 corresponds to an upper limit value based on the number of output bits, and 0.0 corresponds to a lower limit value based on the number of output bits. For example, when the number of output bits is 10 bits, the upper limit value is 1023, and the lower limit value is 0. p_in is a signal obtained by converting the brightness component signal value I (x, y) to linear, and has been normalized to 0.0-1.0. When a converted signal is expressed using 10 bits, 0.0 is treated as 0, and 1.0 is treated as  1023 . 
       FIG.  9 C  is a conceptual diagram of the results of performing filter processing with respect to the input image in the aforementioned three different frequency bands shown in  FIG.  9 B . A first filter processing result  905  denotes the result of performing filter processing with respect to an input image  904  using the filter  901  corresponding to the first frequency band. A second filter processing result  906  denotes the result of performing filter processing with respect to the input image  904  using the filter  902  corresponding to the second frequency band. A third filter processing result  907  denotes the result of performing filter processing with respect to the input image  904  using the filter  903  corresponding to the third frequency band. The high-frequency band of the filter  901  enables detection of the influence of contrast in a portion near the boundary between a person and a background, and the low-frequency band of the filter  903  enables detection even inside the face of the person. By performing filter processing with respect to the input image in a plurality of frequency bands using the filters that utilize the aforementioned Gaussian second-order differential function, the influences of contrast of subjects with different sizes can be detected. 
     Next, the method of calculating the gain gain k  conforming to a frequency band, which is used in the aforementioned Equation (7) and Equation (8), will be described in detail. First, parameters that are necessary for explaining the method of calculating the gain gain k  will be described. 
       FIG.  10 A  is a diagram of the result of dividing a filter that utilizes the aforementioned Gaussian second-order differential function into regions. A region that is indicated by reference sign  1001  and equivalent to a positive region of the filter is regarded as a central region of the filter, and regions that are indicated by reference sign  1002  and equivalent to negative regions of the filter are regarded as peripheral regions of the filter. It is assumed that average values of luminances in ranges that are equivalent to the central region  1001  and the peripheral regions  1002  are respectively used as a central luminance x k  of the filter and a peripheral luminance y k  of the filter, and the size of the range of the central region  1001  is z k . 
     In the present embodiment, gain gain k  conforming to a frequency band is a gain f_gain k  (x k , y k , z k ) based on the central luminance x k , the peripheral luminance y k , and the size z k  of the central region of the filter, and is represented as Equation (10).
 
gain k   =f _gain k ( x   k   ,y   k   ,z   k )  (10)
 
A description is now given of the gain f_gain k  (x k , y k , z k ).
 
     The gain f_gain k  (x k , y k , z k ) is a preset table with which one gain is determined given the three parameters: the central luminance x k  and the peripheral luminance y k  of the filter, and the size z k  of the central region of the filter.  FIG.  10 B  is a diagram showing the gain gain k  for a case where one parameter changes while the other two parameters are fixed. The property of the table is such that the gain decreases as the central luminance x k  of the filter increases, the gain increases as the peripheral luminance y k  of the filter increases, and the gain decreases as the size z k  of the central region of the filter increases. As such, the table f_gain k  (x k , y k , z k ) is a table with which the gain changes based on the influence of contrast. 
     Although the gain gain k  conforming to a frequency band is defined as f_gain k  (x k , y k , z k ) in the foregoing description, gain k  may be defined using other methods. For example, the gain gain k  may be defined using a gain scn_gain k  (z k /M) in the following Equation (11), with which a correction is made while placing priority on the influence of contrast of a main subject based on a scene. 
     
       
         
           
             
               
                 
                   
                     gain 
                     k 
                   
                   = 
                   
                     
                       
                         f 
                         ⁢ 
                         _gain 
                       
                       k 
                     
                     × 
                     
                       
                         scn 
                         ⁢ 
                         _gain 
                       
                       k 
                     
                     ⁢ 
                     
                       ( 
                       
                         
                           z 
                           k 
                         
                         M 
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
     In Equation (11), M is the size of the main subject, and z k  is the size of the central region of the filter. The size M of the main subject is the size of the result of detection of a subject region (e.g., the frame size of the result of facial detection). 
       FIG.  10 C  is a diagram showing scn_gain k  (z k /M) for a case where the proportion of the size z k  of the central region of the filter to the size M of the main subject is represented by a horizontal axis. The calculation of scn_gain k  (z k /M) can be performed using a preset table shown in  FIG.  10 C . The characteristic of correction of the influence of contrast using a filter in which the size z k  of a central region of the filter is smaller than the size M of a main subject is that shadows and the like within the main subject are also corrected. Therefore, when the proportion of the size z k  of the central region of the filter to the size M of the main subject is small, a gain that can leave shadows of the main subject can be obtained by reducing scn_gain k  (z k /M). 
     Regarding the method of calculating the gain gain k , although the above has described the method of calculating the gain that is used in generating the brightness contrast influence map, the same gain that is used in generating the brightness contrast influence map can be used also in generating the saturation contrast influence map. Alternatively, the gain that is used in generating the saturation contrast influence map may be calculated separately by replacing the central luminance and the peripheral luminance in the above description with the central saturation and the peripheral saturation. 
     Although the method of calculating the gain gain k  according to the present embodiment has been described thus far, the method of calculating gain k  is not limited to the above-described method. For example, a fixed value may be used as the gain. 
     As described above, according to the first embodiment, the image capturing apparatus  100  individually applies each of a plurality of filters for brightness with different frequency bands to the brightness component image indicating the distribution of brightness components in the HDR image, thereby generating a plurality of results of filter processing for brightness. The plurality of filters for brightness are spatial filters based on the visual characteristic of a human related to contrast detection. Then, by compositing together the plurality of results of filter processing for brightness, the image capturing apparatus  100  generates the brightness contrast influence information indicating the distribution of degrees of influence of brightness contrast in the HDR image. 
     Furthermore, the image capturing apparatus  100  individually applies each of a plurality of filters for saturation with different frequency bands to the saturation component image indicating the distribution of saturation components in the HDR image, thereby generating a plurality of results of filter processing for saturation. The plurality of filters for color are spatial filters based on the visual characteristic of a human related to contrast detection. Then, by compositing together the plurality of results of filter processing for saturation, the image capturing apparatus  100  generates the saturation contrast influence information indicating the distribution of degrees of influence of saturation contrast in the HDR image. 
     In this way, information indicating the distribution of degrees of influence of contrast in an image can be generated. 
     Second Embodiment 
     A second embodiment will be described in relation to a configuration in which processing for correcting the influence of contrast is performed with respect to an SDR image converted from an HDR image based on contrast influence information generated from the HDR image. In the present embodiment, a basic configuration of the image capturing apparatus  100  is similar to that of the first embodiment. The following mainly describes differences from the first embodiment. 
       FIG.  11    is a block diagram showing a detailed configuration of a portion that is involved in contrast correction processing in the image processing unit  104  according to the second embodiment. The image processing unit  104  includes a brightness and color separation unit  1101 , an HDR/SDR conversion unit  1102 , a brightness contrast influence information generation unit  1103 , and a saturation contrast influence information generation unit  1104 . The image processing unit  104  also includes a brightness and color separation unit  1105 , a brightness contrast correction unit  1106 , a saturation contrast correction unit  1107 , and a brightness and color combining unit  1108 . 
     An HDR image that has been developed through normal signal processing of the image processing unit  104  is input to the brightness and color separation unit  1101 , and an SDR image that has undergone the contrast correction processing is output from the brightness and color combining unit  1108 . The input HDR image is, for example, an HDR image that has been generated by the image processing unit  104  developing a RAW image captured by the image capturing unit  102 . The development is performed using, for example, the gamma of ST 2084 (PQ gamma) and the color space of Rec. 2020. The output SDR image is an image that has been developed using, for example, the sRGB gamma and the sRGB gamut. Furthermore, the input image and the output image are composed of RGB or YUV. 
     Note that similarly to the first embodiment, the input image is not limited to the HDR image. Furthermore, the output image is not limited to the SDR image, and may be an image of any format as long as it is an image that has a smaller dynamic range for brightness components and color components than the input image. 
       FIG.  13    is a flowchart of the contrast correction processing executed by the image processing unit  104  according to the second embodiment. The processing of the present flowchart is started when an HDR image to be processed is input to the brightness and color separation unit  1101 . Note that the system control unit  106  controls the contrast correction processing by controlling respective components of the image capturing apparatus  100 , including respective components of the image processing unit  104 , in accordance with a control program stored in a ROM (not shown) as necessary, unless specifically stated otherwise. 
     In steps S 1301  to S 1303 , the brightness and color separation unit  1101 , the brightness contrast influence information generation unit  1103 , and the saturation contrast influence information generation unit  1104  perform processing that is similar to that of steps S 501  to S 503  in  FIG.  5   . 
     In step S 1304 , the HDR/SDR conversion unit  1102  performs processing for converting the HDR image into an SDR image (image generation processing for generating the SDR image from the HDR image). The details of processing of step S 1304  will be described later. 
     In step S 1305 , the brightness and color separation unit  1105  separates the SDR image generated in step S 1304  into a brightness component image and a color component image. The details of the separation method are similar to those of step S 501  in  FIG.  5    and step S 1301  in  FIG.  13   . 
     In step S 1306 , the brightness contrast correction unit  1106  performs brightness contrast correction processing with respect to the brightness component image, which was separated from the SDR image in step S 1305 , based on the brightness contrast influence map generated in step S 1302 . The brightness contrast correction processing according to the present embodiment differs from step S 504  of  FIG.  5    according to the first embodiment. Provided that a signal value at coordinates (x, y) in the brightness component image is I (x, y) and a signal value at coordinates (x, y) in the brightness contrast influence map is Map_I (x, y), a signal value I′ (x, y) at coordinates (x, y) in the brightness component image after the brightness contrast correction processing according to the present embodiment is represented by Equation (12).
 
 I ′ ( x,y )= I ( x,y )−Map_ I ( x,y )  (12)
 
As stated earlier, in the brightness contrast influence map, a portion that appears darker due to the influence of brightness contrast has larger signal values. Therefore, by subtracting signal values of the brightness contrast influence map from signal values of the brightness component image, contrast can be added to a portion that appears weak in contrast based on brightness contrast compared to the HDR image due to the conversion from the HDR image into the SDR image.
 
     Note that the processing for correcting the influence of brightness contrast is not limited to the processing for enlarging the influence of brightness contrast. For example, correction may be performed so as to alleviate the influence of brightness contrast by, rather than subtracting, adding signal values of the brightness contrast influence map in Equation (12). In this way, correction may be performed also with respect to the SDR image so as to alleviate the influence of brightness contrast similarly to the first embodiment. 
     In step S 1307 , the saturation contrast correction unit  1107  performs saturation contrast correction processing with respect to the color component image, which was separated from the SDR image in step S 1305 , based on the saturation contrast influence map generated in step S 1303 . The saturation contrast correction processing according to the present embodiment differs from step S 505  of  FIG.  5    according to the first embodiment. Provided that a signal value at coordinates (x, y) in the color component image is Ct (x, y), Cp (x, y) and a signal value at coordinates (x, y) in the saturation contrast influence map is Map_Ct Cp (x, y), a signal value Ct′ (x, y), Cp′ (x, y) at coordinates (x, y) in the color component image after the saturation contrast correction processing according to the present embodiment is represented by Equation (13). 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             
                               Ct 
                               ′ 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                           = 
                           
                             
                               Ct 
                               ⁡ 
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                             × 
                             
                               1 
                               
                                 
                                   Map_ 
                                   ⁢ 
                                   CtCp 
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     x 
                                     , 
                                     y 
                                   
                                   ) 
                                 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           
                             
                               Cp 
                               ′ 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 , 
                                 y 
                               
                               ) 
                             
                           
                           = 
                           
                             
                               Cp 
                               ⁡ 
                               
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                             × 
                             
                               1 
                               
                                 
                                   Map_ 
                                   ⁢ 
                                   CtCp 
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     x 
                                     , 
                                     y 
                                   
                                   ) 
                                 
                               
                             
                           
                         
                       
                     
                   
                   } 
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
     As stated earlier, in the saturation contrast influence map, a portion that appears more shaded due to the influence of saturation contrast has larger signal values. Therefore, by multiplying signal values of the color component image by signal values of the saturation contrast influence map, saturation can be emphasized in a portion that appears weak in saturation based on saturation contrast compared to the HDR image due to the conversion from the HDR image into the SDR image. 
     Note that the processing for correcting the influence of saturation contrast is not limited to the processing for enlarging the influence of saturation contrast. For example, correction may be performed so as to alleviate the influence of saturation contrast by, rather than division, multiplication by signal values of the saturation contrast influence map in Equation (13). In this way, correction for alleviating the influence of saturation contrast may be performed also with respect to the SDR image similarly to the first embodiment. 
     In step S 1308 , the brightness and color combining unit  1108  combines (composites) the brightness component image that underwent the brightness contrast correction processing in step S 1106  and the color component image that underwent the saturation contrast correction processing in step S 1107 . The details of the combining method are similar to those of step S 506  in  FIG.  5   . 
     Through the foregoing processing, contrast influence information indicating the distribution of degrees of influence of contrast can be generated from the input HDR image, and the SDR image (corrected image) that underwent contrast correction (the influence of contrast has been enlarged or alleviated) can be generated. 
     Note that in the foregoing description, it is assumed that the contrast correction processing is performed with respect to both of the brightness component image and the color component image that were separated from the SDR image in step S 1305 . However, the contrast correction processing may be performed with respect to only one of the brightness component image and the color component image. For example, assume a case where the contrast correction processing is performed with respect to the brightness component image, and the contrast correction processing is not performed with respect to the color component image. In this case, processing of steps S 1303  and S 1307  is omitted, and processing for combining the brightness component image that underwent the brightness contrast correction processing in step S 1306  and the color component image that was separated in step S 1305  is performed in step S 1308 . 
     Next, a description is given of the details of processing of step S 1304  in  FIG.  13    (processing for converting the HDR image into the SDR image) with reference to  FIG.  12    and  FIG.  14   . 
       FIG.  12    is a block diagram showing a detailed configuration of the HDR/SDR conversion unit  1102 . The HDR/SDR conversion unit  1102  includes a gamma conversion unit  1201 , a local tone mapping processing unit  1202 , and a gamut conversion unit  1203 . The input image is the HDR image that has been developed using the PQ gamma described in ST 2084 as the gamma and the color space of Rec. 2020, and the output image is the SDR image that has been developed using the sRGB gamma as the gamma and the sRGB gamut as the color space. 
       FIG.  14    is a flowchart showing the details of processing of step S 1304  in  FIG.  13    (processing for converting the HDR image into the SDR image). 
     In step S 1401 , the gamma conversion unit  1201  performs gamma conversion corresponding to the SDR image with respect to the input HDR image. The gamma conversion refers to processing for restoring the gamma applied to the HDR image to a linear space, thereby converting it to the gamma that should be applied to the SDR image. 
     First, in order to restore the gamma applied to the HDR image to a linear space, the gamma conversion unit  1201  applies the monitor gamma (EOTF), which is the reverse characteristic of the gamma applied to the HDR image. In the present embodiment, the monitor gamma (EOTF) described in ST 2084, which is shown in the aforementioned Equation (9), is applied. p_out in the aforementioned Equation (9) is an R, G, B signal obtained by normalizing an output signal of the HDR image to 0.0-1.0, where 1.0 corresponds to an upper limit value based on the number of output bits, and 0.0 corresponds to a lower limit value. For example, when the number of output bits is 10 bits, the upper limit value is 1023, and the lower limit value is 0. p_in is an R, G, B signal obtained by normalizing an input signal resulting from the restoration of the HDR image to the linear space to 0.0-1.0, where 0.0 and 1.0 respectively represent luminance values of 0 cd/m 2  and 10000 cd/m 2 . 
     Next, the gamma conversion unit  1201  applies the SDR gamma (OETF) to signal values that have been restored to the linear space. With regard to p_in calculated using the aforementioned Equation (9), 0.0 corresponds to 0 cd/m 2 , and 1.0 corresponds to 10000 cd/m 2 . In order to apply the SDR gamma of later-described Equation (15) to p_in, it is necessary to normalize p_in again so that 0.0 corresponds to 0 cd/m 2  and 1.0 corresponds to 100 cd/m 2  as shown in the following Equation (14). p_in′ denotes a signal value obtained by performing the normalization again.
 
 p _in′=100× p _in  (14)
 
     The gamma conversion can be realized by applying the signal value p_in′, which is obtained by performing the normalization again using Equation (14), as p_in in later-described Equation (15). p_in is an R, G, B signal obtained by normalizing a linear input signal to 0.0-1.0, where 0.0 and 1.0 represent luminance values of 0 cd/m 2  and 100 cd/m 2 , respectively. p_out is an R, G, B signal obtained by normalizing an output signal to 0.0-1.0, where 1.0 corresponds to an upper limit value based on the number of output bits, and 0.0 corresponds to a lower limit value. For example, when the number of output bits is 10 bits, the upper limit value corresponds to 1023, and the lower limit value corresponds to 0. 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           if 
                           ⁡ 
                           
                             ( 
                             
                               
                                 p 
                                 ⁢ 
                                 _in 
                               
                               &gt; 
                               0.003108 
                             
                             ) 
                           
                         
                       
                       
                         
                           
                             p 
                             ⁢ 
                             _out 
                           
                           = 
                           
                             
                               1.055 
                               * 
                               
                                 
                                   p 
                                   ⁢ 
                                   _in 
                                 
                                 
                                   ( 
                                   
                                     1 
                                     2.4 
                                   
                                   ) 
                                 
                               
                             
                             - 
                             0.055 
                           
                         
                       
                     
                     
                       
                         else 
                       
                       
                         
                           
                             p 
                             ⁢ 
                             _out 
                           
                           = 
                           
                             12.92 
                             × 
                             p_in 
                           
                         
                       
                     
                   
                   } 
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
       FIG.  15    is a diagram illustrating the gamma conversion in the linear space. A horizontal axis corresponds to an input linear signal, and a vertical axis corresponds to an output linear signal. The characteristic  1501  indicated by a dash line represents the input/output characteristic of the HDR image, and the characteristic  1502  indicated by a solid line represents the input/output characteristic of the SDR image after the gamma conversion. As shown in  FIG.  15   , the input/output characteristic of the SDR image after the gamma conversion is in the form of the input/output characteristic of the HDR image being pressed to linear. 
     In step S 1402 , the local tone mapping processing unit  1202  performs local tone mapping processing with respect to the image that underwent the gamma conversion in step S 1401 . In the local tone mapping processing, processing for increasing contrast in a luminance region that is subject to tone compression and the like is carried out while changing the brightness in a dark portion and a bright portion. As the local tone mapping processing, a common method is used that generates a gain map with which the tone characteristics change locally with use of the results of distinguishing images and regions of different frequency bands, and carries out tone processing with reference to the generated gain map. 
     A description is now given of an example of the local tone mapping processing of step S 1402  with reference to  FIG.  16   .  FIG.  16    shows exemplary tone characteristics that are used in local tone mapping. An input signal is a signal that was converted into the SDR gamma in step S 1401 , and an output signal is a target output signal that is to be achieved by the local tone mapping processing. The signal obtained by performing the gamma conversion corresponding to the SDR image with respect to the input HDR image becomes uniformly dark compared to the brightness represented by the HDR image because a signal with a wide dynamic range is confined in the SDR range as described earlier using  FIG.  15   . Therefore, as indicated by the tone characteristic  1602  of  FIG.  16   , the characteristic with which low luminance to intermediate luminance are corrected to be bright compared to the original tone characteristic  1601  is generated. Provided that the tone characteristic of  FIG.  16    is y=tm (x), an image signal after the gamma conversion is p, and a low-frequency image generated by performing LPF processing and the like with respect to the image signal after the gamma conversion is p_lpf, an output signal p_out resulting from local tone mapping is represented by Equation (16). 
     
       
         
           
             
               
                 
                   
                     p 
                     ⁢ 
                     _out 
                   
                   = 
                   
                     
                       
                         tm 
                         ⁡ 
                         
                           ( 
                           p_lpf 
                           ) 
                         
                       
                       p_lpf 
                     
                     × 
                     p 
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
     In step S 1403 , the gamut conversion unit  1203  performs processing of conversion from the Rec. 2020 gamut of the HDR image input in step S 1401  into the sRGB gamut of the SDR image. This processing may be processing based on simple matrix conversion, or may be gamut mapping processing that uses a lookup table. 
     Through the foregoing processing, the HDR image is converted into the SDR image. 
     As described above, according to the second embodiment, the image capturing apparatus  100  performs processing for correcting the influence of contrast with respect to the SDR image converted from the HDR image based on contrast influence information generated from the HDR image. In this way, the influence of contrast can be enlarged or further alleviated in a portion in which the influence of contrast appears weak compared to the HDR image due to the conversion from the HDR image into the SDR image. 
     OTHER EMBODIMENTS 
     Embodiment(s) of the disclosure can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions, or units, of one or more of the above-described embodiment(s) and/or that includes one or more units or circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions, or units, of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like. 
     While the disclosure has been described with reference to exemplary embodiments, it is to be understood that the disclosure is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions. 
     This application claims the benefit of Japanese Patent Application No. 2019-209824, filed Nov. 20, 2019 which is hereby incorporated by reference herein in its entirety.