Patent Publication Number: US-10311331-B2

Title: Image processing apparatus, image processing system, non-transitory computer readable medium, and image processing method for reflecting features of one image to another image

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2016-006683 filed Jan. 15, 2016. 
     BACKGROUND 
     (i) Technical Field 
     The present invention relates to an image processing apparatus, an image processing system, a non-transitory computer readable medium, and an image processing method. 
     (ii) Related Art 
     With the widespread use of digital cameras and the like, the number of users who capture and view digital images is increasing. Further, with the widespread use of smartphones and tablet computers, there has been an increasing demand for more intuitive operations for image quality adjustment, which is performed by using image editing software for personal computers (PCs), in order to obtain desired images. 
     The image quality of digital images may be adjusted by adjusting the component values of chromaticity, brightness, hue, and saturation in a color space, such as a Red-Green-Blue (RGB) color space, a CIE L*a*b* color space, or a Hue-Saturation-Value (HSV) color space, or the contrast thereof, for example. In this adjustment, a user specifies an image that serves as a sample, and image processing is performed in which the image quality of a processing target image is adjusted to the image quality of the sample image in some cases. 
     SUMMARY 
     According to an aspect of the invention, there is provided an image processing apparatus including a feature value extractor and an image adjuster. The feature value extractor extracts feature values of a first specified image, which is an image of a region specified in advance in a first image. The image adjuster changes, in a case where the feature values of the first specified image are to be reflected in a second image, for each region of the second image, a degree to which the feature values of the first specified image are to be reflected, and adjusts an image quality of the second image. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       Exemplary embodiments of the present invention will be described in detail based on the following figures, wherein: 
         FIGS. 1A and 1B  are diagrams illustrating image processing for adjusting the image quality of a processing target image to the image quality of a sample image; 
         FIGS. 2A and 2B  are diagrams illustrating image processing for adjusting the image quality of a processing target image to the image quality of a sample image; 
         FIG. 3  is a block diagram illustrating an example functional configuration of an image processing apparatus according to exemplary embodiments; 
         FIG. 4A  is a conceptual diagram illustrating a histogram of a specified processing target image and that of a specified sample image before image processing, and  FIG. 4B  is a conceptual diagram illustrating a histogram of the specified processing target image after a brightness component and chromaticity components have been adjusted by an image adjustment unit; 
         FIG. 5  is a diagram for describing example processing performed in a first exemplary embodiment; and 
         FIG. 6  is a diagram for describing example processing of calculating a weighting value β from the ratio of a specified processing target image. 
     
    
    
     DETAILED DESCRIPTION 
     Description of Image Processing 
     Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the attached drawings. 
       FIGS. 1A and 1B  and  FIGS. 2A and 2B  are diagrams illustrating image processing for adjusting the image quality of a processing target image to the image quality of a sample image. 
       FIG. 1A  illustrates a sample image and a processing target image before image processing. Here, a sample image M is illustrated on the left of  FIG. 1A , and a processing target image H is illustrated on the right of  FIG. 1A . In the exemplary embodiments, a processing target image is an image that is subjected to image processing, and a sample image is an image that includes an image having an impression which a user desires and that serves as a sample used when image processing is performed on the processing target image. In the exemplary embodiments, a sample image is used as an example of a first image, and a processing target image is used as an example of a second image. 
     Typically, the sample image M and the processing target image H are displayed on a display device, such as a liquid crystal panel or a liquid crystal display. Image processing is performed by processing image information using image editing software that runs on a tablet computer, a smartphone, a PC, or the like. The user performs an operation for image processing by operating a menu and the like displayed on the display device together with the sample image M and the processing target image H in accordance with operations of the image editing software. In a case of using a tablet computer or a smartphone, the user operation is performed by the user touching the liquid crystal panel, which is a touch panel, with a finger or a stylus, for example. In a case of using a PC, the user operation is performed by using a keyboard, a mouse, and the like connected to the PC. In the above-described cases, a functional unit of the tablet computer or the smartphone which performs image processing and the PC are each regarded as an example of an image processing apparatus that performs image processing on image information regarding an image displayed on the display device. Further, the image processing apparatus and the display device are together regarded as an example of an image processing system. 
     The sample image M and the processing target image H illustrated in  FIG. 1A  are each formed of a foreground F, which is an image of the ground, and a background B, which is an image of the sky. 
     Here, it is assumed that the user wants to change the processing target image H to an image having an impression similar to that of the background B of the sample image M by performing image processing on the processing target image H. This case corresponds to a case of, if the background B of the sample image M is an image of a red sky, and the background B of the processing target image H is an image of a blue sky, changing the background B of the processing target image H to the image of a red sky, for example. 
       FIG. 1B  illustrates the processing target image H after image processing performed by using a method according to the related art. 
     In the processing target image H after image processing illustrated in  FIG. 1B , the color of the background B becomes closer to the color of the background B of the sample image M, and therefore, an image impression received from the processing target image H becomes closer to that received from the sample image M. Further, in the processing target image H after image processing, image processing has been performed not only on the background B, which is an image of the sky, but also on the foreground F, which is an image of the ground, because the entire processing target image H has been subjected to image processing. However, in the processing target image H, only one type of light produced by a light source, namely, natural light, illuminates a subject. Therefore, even if the entire processing target image H is subjected to image processing, the processing result is natural. 
       FIG. 2A  illustrates a sample image and a processing target image before image processing different from those in  FIG. 1A . Here, a sample image M is illustrated on the left of  FIG. 2A , and a processing target image H is illustrated on the right of  FIG. 2A . The illustrated sample image M and processing target image H are each an image of a room having a window. The sample image M is formed of a foreground F 1 , which is an image of a room, the room being a dark region, and a background B 1 , which is an image of an outdoor scene having a high lightness level due to illumination by natural light. The processing target image H is formed of a foreground F 2 , which is an image of a room having a high lightness level due to illumination by illumination light, and a background B 2 , which is an image of an outdoor scene having a high lightness level due to illumination by natural light. In other words, one type of light, namely, natural light produced by a natural light source, is present and illuminates a subject in the sample image M while two types of light, namely, indoor illumination light produced by an artificial light source and natural light produced by a natural light source, are present and illuminate a subject in the processing target image H. 
     Here, it is assumed that a user wants to change the background B 2  of the processing target image H to an image having an impression similar to that of the background B 1  of the sample image M by performing image processing on the processing target image H. That is, it is assumed that the user wants to make the impression of the outdoor scene from the window in the processing target image H similar to the impression of the outdoor scene from the window in the sample image M. This case corresponds to a case of, if the natural light in the sample image M is twilight, the background B 1  is an image of a red sky, the natural light in the processing target image H is daylight, and the background B 2  is an image of a blue sky, changing the background B 2  of the processing target image H to an image of a red sky, for example. 
       FIG. 2B  illustrates the processing target image H after image processing performed by using a method according to the related art. 
     In the processing target image H after image processing illustrated in  FIG. 2B , the entire processing target image H is subjected to image processing. In other words, image processing is performed on the background B 2  of the processing target image H, and image processing is also performed on the foreground F 2  of the processing target image H. In such a case, the indoor illumination light in the foreground F 2  is affected by the natural light in the sample image M, and the color of the illumination light in the foreground F 2  is changed to red, which may result in a noticeable change in the impression of the whole room. 
     In the exemplary embodiments, in a case of adjusting the image quality of a processing target image to the image quality of a sample image, a degree to which the image quality of the sample image is to be reflected is set for each region of the processing target image, and image processing is performed. Specifically, in the example illustrated in  FIGS. 2A and 2B , the image quality is adjusted so that the background B 2  of the processing target image H has an impression similar to that of the background B 1  of the sample image M and so that the effect of the background B 1  of the sample image M is suppressed in the foreground F 2  of the processing target image H. As described above, by changing the degree to which the image quality of a sample image is to be reflected for each region of a processing target image, the image quality is adjusted in accordance with the user&#39;s intention. 
     Hereinafter, a description of an image processing apparatus and so on for implementing the above-described operation is given. 
     Description of Configuration of Image Processing Apparatus 
     First Exemplary Embodiment 
     A description of a first exemplary embodiment is given first. 
       FIG. 3  is a block diagram illustrating an example functional configuration of an image processing apparatus  1  according to this exemplary embodiment. 
     As illustrated in  FIG. 3 , the image processing apparatus  1  includes a user operation accepting unit  11 , a color conversion unit  12 , and a feature value extraction unit  13 . The user operation accepting unit  11  accepts the details of a user operation. The color conversion unit  12  obtains image information (input image data) regarding a processing target image and a sample image, performs color conversion, and obtains chromaticity components and brightness components. The feature value extraction unit  13  extracts feature values from image information obtained after color conversion. The image processing apparatus  1  further includes an image adjustment unit  14  and an image display unit  15 . The image adjustment unit  14  performs a process for adjusting feature values of the processing target image to feature values of the sample image. The image display unit  15  displays, on a display device, the processing target image in which the feature values of the sample image have been reflected. 
     The user operation accepting unit  11  accepts a control signal that indicates the details of an operation performed by a user on a processing target image or a sample image. This operation, which will be described in detail below, corresponds to an operation of touching or dragging on a touch panel by using a finger or a stylus in a case where the user operates a tablet computer or a smartphone. In a case where the user operates a PC, the operation corresponds to an operation of clicking or dragging by using a mouse or the like. 
     The color conversion unit  12  performs color conversion on input image data that is used to display a processing target image and a sample image on the display device. In this case, the input image data is RGB video data (RGB data). The RGB data is converted into IPT data, for example. That is, the chromaticity in an RGB color space is converted into the chromaticity in an IPT color space. An IPT color space is an orthogonal coordinate color space composed of three components of lightness (I), chromaticity in the red-green direction (P), and chromaticity in the yellow-blue direction (T). In this exemplary embodiment, lightness (I) is assumed to be a brightness component, and chromaticity in the red-green direction (P) and chromaticity in the yellow-blue direction (T) are assumed to be chromaticity components. 
     The feature value extraction unit  13 , which is an example of a feature value extractor, extracts feature values from image information regarding the processing target image and the sample image after color conversion. The feature value extraction unit  13  extracts feature values of an image of a region specified by the user in the sample image (hereinafter referred to as a specified sample image). The feature value extraction unit  13  extracts feature values of an image of a region specified by the user in the processing target image (hereinafter referred to as a specified processing target image). The feature value extraction unit  13  further extracts feature values of an image of a region not specified by the user in the processing target image (hereinafter referred to as a non-specified image). In other words, the feature value extraction unit  13  extracts feature values of a non-specified image, which is an image of a region other than the region of the specified processing target image in the processing target image. In this exemplary embodiment, a specified sample image is used as an example of a first specified image, a specified processing target image is used as an example of a second specified image, and a non-specified image is used as an example of a second non-specified image. 
     A description is given below while assuming a configuration in which a user specifies a specified sample image and a specified processing target image; however, this exemplary embodiment is not limited to such a configuration. A specified sample image and a specified processing target image may be images of regions specified in advance in accordance with a certain criterion, or images that are not specified by the user but are specified in accordance with the outlines or color distributions thereof may be used as a specified sample image and a specified processing target image respectively, for example. 
     Feature values are indicators that determine the impression of an image received by a user who views the image. In this exemplary embodiment, the mean and the distribution of the pixel values of pixels that constitute a specified processing target image are assumed to be feature values of the specified processing target image, the mean and the distribution of the pixel values of pixels that constitute a non-specified image are assumed to be feature values of the non-specified image, and the mean and the distribution of the pixel values of pixels that constitute a specified sample image are assumed to be feature values of the specified sample image. A pixel value is composed of a brightness component (I) and chromaticity components (P, T). Accordingly, feature values are extracted for each of the brightness component (I) and the chromaticity components (P, T). Note that, in this exemplary embodiment, an arithmetic mean is used as the mean, and a variance is used as the distribution. 
     More specifically, the feature value extraction unit  13  calculates the arithmetic means of the brightness components (I) and the chromaticity components (P, T) of pixels that constitute a specified processing target image, calculates the arithmetic means of the brightness components (I) and the chromaticity components (P, T) of pixels that constitute a non-specified image, and calculates the arithmetic means of the brightness components (I) and the chromaticity components (P, T) of pixels that constitute a specified sample image. Further, the feature value extraction unit  13  calculates the variances of the brightness components (I) and the chromaticity components (P, T) of the pixels that constitute the specified processing target image, calculates the variances of the brightness components (I) and the chromaticity components (P, T) of the pixels that constitute the non-specified image, and calculates the variances of the brightness components (I) and the chromaticity components (P, T) of the pixels that constitute the specified sample image. 
     The arithmetic mean is calculated for each of the specified processing target image, the non-specified image, and the specified sample image and for each of I, P, and T, which represent the brightness component and the chromaticity components, and therefore, nine values are obtained in total. The arithmetic means are calculated by using expressions 1 below. 
     In expressions 1, I i,j  represents the I value of each pixel at a position (i, j) that constitutes a specified processing target image, a non-specified image, or a specified sample image, P i,j  represents the P value of each pixel at the position (i, j) that constitutes the specified processing target image, the non-specified image, or the specified sample image, and T i,j  represents the T value of each pixel at the position (i, j) that constitutes the specified processing target image, the non-specified image, or the specified sample image. 
     μ It  represents the arithmetic mean of the I values of the specified processing target image. μ Pt  represents the arithmetic mean of the P values of the specified processing target image. μ Tt  represents the arithmetic mean of the T values of the specified processing target image. 
     μ Itg  represents the arithmetic mean of the I values of the non-specified image. μ Ptg  represents the arithmetic mean of the P values of the non-specified image. μ Ttg  represents the arithmetic mean of the T values of the non-specified image. 
     μ Ir  represents the arithmetic mean of the I values of the specified sample image. μ Pr  represents the arithmetic mean of the P values of the specified sample image. μ Tr  represents the arithmetic mean of the T values of the specified sample image. 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             μ 
                             It 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   I 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             μ 
                             Pt 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   P 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           μ 
                           Tt 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               ( 
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           
                             μ 
                             Itg 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   I 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             μ 
                             Ptg 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   P 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           μ 
                           Ttg 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               ( 
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           
                             μ 
                             Ir 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   I 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             μ 
                             Pr 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   P 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           μ 
                           Tr 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               ( 
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
     The variance is also calculated for each of the specified processing target image, the non-specified image, and the specified sample image and for each of I, P, and T, which represent the brightness component and the chromaticity components, and therefore, nine values are obtained in total. The variances are calculated by using expressions 2 below. 
     In expressions 2, I i,j , P i,j , and T i,j  represent the respective values as in expressions 1. 
     σ It   2  represents the variance of the I values of the specified processing target image. σ Pt   2  represents the variance of the P values of the specified processing target image. σ Tr   2  represents the variance of the T values of the specified processing target image. 
     σ Itg   2  represents the variance of the I values of the non-specified image. σ Ptg   2  represents the variance of the P values of the non-specified image. σ Ttg   2  represents the variance of the T values of the non-specified image. 
     σ Ir   2  represents the variance of the I values of the specified sample image. σ Pr   2  represents the variance of the P values of the specified sample image. σ Tr   2  represents the variance of the T values of the specified sample image. 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             σ 
                             It 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       I 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       It 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             σ 
                             Pt 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       P 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Pt 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         
                           σ 
                           Tt 
                           2 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               
                                 ( 
                                 
                                   
                                     T 
                                     
                                       i 
                                       , 
                                       j 
                                     
                                   
                                   - 
                                   
                                     μ 
                                     Tt 
                                   
                                 
                                 ) 
                               
                               2 
                             
                           
                         
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         
                           
                             σ 
                             Itg 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       I 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Itg 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             σ 
                             Ptg 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       P 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Ptg 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         
                           σ 
                           Ttg 
                           2 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               
                                 ( 
                                 
                                   
                                     T 
                                     
                                       i 
                                       , 
                                       j 
                                     
                                   
                                   - 
                                   
                                     μ 
                                     Ttg 
                                   
                                 
                                 ) 
                               
                               2 
                             
                           
                         
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         
                           
                             σ 
                             Ir 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       I 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Ir 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             σ 
                             Pr 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       P 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Pr 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         
                           σ 
                           Tr 
                           2 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               
                                 ( 
                                 
                                   
                                     T 
                                     
                                       i 
                                       , 
                                       j 
                                     
                                   
                                   - 
                                   
                                     μ 
                                     Tr 
                                   
                                 
                                 ) 
                               
                               2 
                             
                           
                         
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
     The image adjustment unit  14 , which is an example of an image adjuster, adjusts feature values of a processing target image in accordance with feature values of a specified sample image to adjust the image quality of the processing target image. Here, the image adjustment unit  14  sets a degree to which feature values of a specified processing target image are to be adjusted to feature values of a specified sample image (hereinafter referred to as a weighting value α) and a degree to which feature values of a non-specified image are to be adjusted to the feature values of the specified sample image (hereinafter referred to as a weighting value β). In other words, the weighting value α is regarded as a degree to which feature values of a specified sample image are to be reflected to feature values of a specified processing target image, and the weighting value β is regarded as a degree to which the feature values of the specified sample image are to be reflected to feature values of a non-specified image. In this exemplary embodiment, the weighting value α is used as an example of a first reflection degree, and the weighting value β is used as an example of a second reflection degree. 
     The image adjustment unit  14  sets the weighting value α and the weighting value β to different values. More specifically, the image adjustment unit  14  sets the weighting value β to a value smaller than that of the weighting value α and adjusts the image quality of a processing target image. In other words, in a case where feature values of a specified sample image are to be reflected in a processing target image, the image adjustment unit  14  changes the degree to which the feature values of the specified sample image are to be reflected for each region included in the processing target image and adjusts the image quality of the processing target image. 
     Note that the weighting value α and the weighting value β have values within a range between 0 and 1. The weighting value β is smaller than the weighting value α, and therefore, has a value smaller than 1. The weighting value α and the weighting value β are set in accordance with a certain rule, such as user settings, for example. In a case where a user sets the weighting value α, the numerical value is determined by the user entering a specific numerical value or selecting one from among three levels of “high”, “medium”, and “low”, for example. The weighting value β is set to a value smaller than the weighting value α by multiplying the set value of the weighting value α by a coefficient, for example. 
     In a case where feature values of a specified processing target image are adjusted to feature values of a specified sample image, the image adjustment unit  14  uses the arithmetic means and the variances of the brightness components and the chromaticity components of the specified processing target image and those of the specified sample image. The image adjustment unit  14  performs a process for making the arithmetic means and the variances of the specified processing target image closer to the arithmetic means and the variances of the specified sample image. 
     In a case where feature values of a non-specified image are adjusted to feature values of a specified sample image, the image adjustment unit  14  uses the arithmetic means and the variances of the brightness components and the chromaticity components of the non-specified image and those of the specified sample image. The image adjustment unit  14  performs a process for making the arithmetic means and the variances of the non-specified image closer to the arithmetic means and the variances of the specified sample image. 
     These processes are performed by using expressions 3 to 8 below, for example. Among these expressions, expressions 3 to 5 are used in the case where feature values of a specified processing target image are adjusted to feature values of a specified sample image. In expressions 3 to 5, α i,j  represents the weighting value α, and the weighting value α is calculated for each pixel at the position (i, j) that constitutes the specified processing target image. Expressions 6 to 8 are used in the case where feature values of a non-specified image are adjusted to feature values of a specified sample image. In expressions 6 to 8, β i,j  represents the weighting value β, and the weighting value β is calculated for each pixel at the position (i, j) that constitutes the non-specified image. 
     The weighting value α is set for each pixel of a specified processing target image; however, it is assumed in this exemplary embodiment that the weighting value α for each pixel of a specified processing target image is set to the same value. Further, the weighting value β is set for each pixel of a non-specified image; however, it is assumed in this exemplary embodiment that the weighting value β for each pixel of a non-specified image is set to the same value. 
     Among expressions 3 to 5, expression 3 is an arithmetic expression for I values, where I i,j  represents the I value of each pixel at the position (i, j) that constitutes a specified processing target image before adjustment, and I′ i,j  represents the I value of each pixel at the position (i, j) that constitutes the specified processing target image after adjustment. 
     Expression 4 is an arithmetic expression for P values, where P i,j  represents the P value of each pixel at the position (i, j) that constitutes the specified processing target image before adjustment, and P′ i,j  represents the P value of each pixel at the position (i, j) that constitutes the specified processing target image after adjustment. 
     Expression 5 is an arithmetic expression for T values, where T i,j  represents the T value of each pixel at the position (i, j) that constitutes the specified processing target image before adjustment, and T′ i,j  represents the T value of each pixel at the position (i, j) that constitutes the specified processing target image after adjustment. 
     By calculating expressions 3 to 5, the brightness component (I) and the chromaticity components (P, T) are adjusted in accordance with the specified sample image for each pixel at the position (i, j) that constitutes the specified processing target image. 
     
       
         
           
             
               
                 
                   
                     I 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       α 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 I 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 It 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Ir 
                               2 
                             
                             
                               σ 
                               It 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Ir 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
             
               
                 
                   
                     P 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       α 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 P 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Pt 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Pr 
                               2 
                             
                             
                               σ 
                               Pt 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Pr 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   
                     T 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       α 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Tt 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Tr 
                               2 
                             
                             
                               σ 
                               Tt 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Tr 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     Among expressions 6 to 8, expression 6 is an arithmetic expression for I values, where I i,j  represents the I value of each pixel at the position (i, j) that constitutes a non-specified image before adjustment, and I′ i,j  represents the I value of each pixel at the position (i, j) that constitutes the non-specified image after adjustment. 
     Expression 7 is an arithmetic expression for P values, where P i,j  represents the P value of each pixel at the position (i, j) that constitutes the non-specified image before adjustment, and P′ i,j  represents the P value of each pixel at the position (i, j) that constitutes the non-specified image after adjustment. 
     Expression 8 is an arithmetic expression for T values, where T i,j  represents the T value of each pixel at the position (i, j) that constitutes the non-specified image before adjustment, and T′ i,j  represents the T value of each pixel at the position (i, j) that constitutes the non-specified image after adjustment. 
     By calculating expressions 6 to 8, the brightness component (I) and the chromaticity components (P, T) are adjusted in accordance with the specified sample image for each pixel at the position (i, j) that constitutes the non-specified image. 
     
       
         
           
             
               
                 
                   
                     I 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       β 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 I 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Itg 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Ir 
                               2 
                             
                             
                               σ 
                               Itg 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Ir 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
             
               
                 
                   
                     P 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       β 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 P 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Ptg 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Pr 
                               2 
                             
                             
                               σ 
                               Ptg 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Pr 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
             
               
                 
                   
                     T 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       β 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Ttg 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Tr 
                               2 
                             
                             
                               σ 
                               Ttg 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Tr 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
           
         
       
     
       FIG. 4A  is a conceptual diagram illustrating a histogram of a specified processing target image and that of a specified sample image before image processing. 
     In  FIG. 4A , the horizontal axis represents the brightness component or the chromaticity component, namely, the I value, the P value, or the T value. The vertical axis represents the frequency (number of pixels). Here, the solid line represents a histogram of a specified processing target image, and the dotted line represents a histogram of a specified sample image. In this case, the arithmetic mean μ It  (or μ Pt  or μ Tt ) of the specified processing target image is different from the arithmetic mean μ Ir  (or μ Pr  or μ Tr ) of the specified sample image because image processing has not been performed. The variance σ It   2  (or σ Pt   2  or σ Tt   2 ) of the specified processing target image is also different from the variance σ Tr   2  (or σ Pr   2  or σ Tr   2 ) of the specified sample image. 
     Here, in a process for adjusting feature values of the specified processing target image to feature values of the specified sample image, a process for making the arithmetic means of the specified processing target image closer to the arithmetic means of the specified sample image and making the variances of the specified processing target image closer to the variances of the specified sample image is performed. 
       FIG. 4B  is a conceptual diagram illustrating a histogram of the specified processing target image after the brightness component and the chromaticity components have been adjusted by the image adjustment unit  14 .  FIG. 4B  illustrates an example case where the weighting value α is set to 1. 
     In  FIG. 4B , the horizontal axis represents the brightness component or the chromaticity component, namely, the I value, the P value, or the T value. The vertical axis represents the frequency (number of pixels). In this case, the weighting value α is equal to 1, and therefore, the arithmetic means of the specified processing target image match the arithmetic means of the specified sample image after the brightness component and the chromaticity components have been adjusted by the image adjustment unit  14 . The variances of the specified processing target image also match the variances of the specified sample image. 
     The example illustrated in  FIGS. 4A and 4B  is the case where feature values of a specified processing target image are adjusted to feature values of a specified sample image. Feature values of a non-specified image are also adjusted to feature values of a specified sample image in a similar manner. That is, in a process for adjusting feature values of a non-specified image to feature values of a specified sample image, a process for making the arithmetic means of the non-specified image closer to the arithmetic means of the specified sample image and making the variances of the non-specified image closer to the variances of the specified sample image is performed. The weighting value β is smaller than 1, and therefore, the arithmetic means of the non-specified image do not match the arithmetic means of the specified sample image and the variances of the non-specified image do not match the variances of the specified sample image unlike the example illustrated in  FIG. 4B . 
     The image display unit  15  displays on the display device the processing target image in which the feature values of the sample image have been reflected. 
       FIG. 5  is a diagram for describing example processing performed in the first exemplary embodiment. 
       FIG. 5  illustrates the sample image M and the processing target image H illustrated in  FIG. 2A . The sample image M is illustrated on the left of  FIG. 5 , and the processing target image H is illustrated on the right of  FIG. 5 . Here, it is assumed that a user wants to change the processing target image H to an image having an impression similar to that of the background B 1  of the sample image M (see  FIG. 2A ) by performing image processing on the processing target image H. 
     A specified sample image M 1  outlined by a bold line corresponds to the background B 1  of the sample image M (see  FIG. 2A ). A specified processing target image H 1  outlined by a bold line corresponds to the background B 2  of the processing target image H (see  FIG. 2A ). The image of a region other than the region of the specified processing target image H 1  corresponds to a non-specified image H 2 . Hereinafter, a description is given while assuming that the user uses a tablet computer or a smartphone and performs an operation by touching the display device with a finger or a stylus, for example. 
     The user first touches any location on the perimeter (edge) of the specified processing target image H 1  with a finger or a stylus and thereafter moves the finger or the stylus on the processing target image H without releasing the finger or the stylus to thereby perform a drag operation. This drag operation is an operation for the user to specify the specified processing target image H 1  in the processing target image H and is accepted by the user operation accepting unit  11 . In other words, the user operation accepting unit  11  accepts an image outlined by a path, produced by the finger or the stylus, on the processing target image H as the specified processing target image H 1 . In a case where this operation is performed by using a mouse or the like, the operation is such that the user clicks any location on the perimeter (edge) of the specified processing target image H 1  and thereafter performs a drag operation without releasing the mouse button. 
     Next, the user touches with a finger or a stylus (or clicks in the case of using a mouse or the like) any location on the perimeter (edge) of the specified sample image M 1  and thereafter moves the finger or the stylus on the sample image M without releasing the finger or the stylus to thereby perform a drag operation. This drag operation is an operation for the user to specify the specified sample image M 1  in the sample image M and is accepted by the user operation accepting unit  11 . In other words, the user operation accepting unit  11  accepts an image outlined by a path, produced by the finger or the stylus, on the sample image M as the specified sample image M 1 . 
     Here, the specified processing target image H 1  corresponds to the background B 2  (see  FIG. 2A ), in which an outdoor scene from a window is visible, and is an image having the color of daylight, such as an image of a blue sky, for example. The non-specified image H 2  corresponds to the foreground F 2  (see  FIG. 2A ), which is an image of a room illuminated by illumination light, and is an image having the color of illumination light. The specified sample image M 1  corresponds to the background B 1  (see  FIG. 2A ), in which an outdoor scene from a window is visible, and is an image having the color of twilight, such as an image of a red sky, for example. 
     The feature value extraction unit  13  extracts feature values of the specified processing target image H 1 , those of the non-specified image H 2 , and those of the specified sample image M 1 . Next, the image adjustment unit  14  adjusts feature values of the processing target image H to the feature values of the specified sample image M 1  in accordance with the feature values of the specified processing target image H 1 , those of the non-specified image H 2 , and those of the specified sample image M 1  extracted by the feature value extraction unit  13 . Here, I′ i,j , and T′ i,j  expressed by expressions 3 to 5 described above correspond to image data of the specified processing target image H 1  after image processing, and I′ i,j , P′ i,j , and T′ i,j  expressed by expressions 6 to 8 described above correspond to image data of the non-specified image H 2  after image processing. That is, the degree to which the feature values of the specified sample image M 1  are to be reflected is adjusted in accordance with the weighting value α and the weighting value β. 
     As a result, the feature values of the specified sample image M 1  are reflected in the specified processing target image H 1 , and therefore, an image impression received from the specified processing target image H 1  becomes closer to an image impression received from the specified sample image M 1 . Specifically, the color of natural light in the specified processing target image H 1  changes to the color of twilight from the color of daylight, that is, the image of a blue sky changes to an image of a red sky. Regarding the non-specified image H 2 , the degree to which the feature values of the specified sample image M 1  are to be reflected is adjusted so as to be smaller than that for the specified processing target image H 1 . That is, in the non-specified image H 2 , the effect of the natural light in the specified sample image M 1  is suppressed so that the impression of indoor illumination light in the non-specified image H 2  does not noticeably change. In other words, in this exemplary embodiment, it is regarded that feature values of a specified processing target image are based on the impression of light in the specified processing target image, feature values of a non-specified image are based on the impression of light in the non-specified image, and feature values of a specified sample image are based on the impression of light in the specified sample image. 
     In actuality, the image display unit  15  converts again I′ i,j , P′ i,j , and T′ i,j  which correspond to image data after image processing, into the format of input image data obtained by the color conversion unit  12  and outputs the result to the display device. That is, the image display unit  15  restores the IPT data to RGB data and outputs the RGB data to the display device, and the processing target image after image processing is displayed on the display device. 
     As described above, in this exemplary embodiment, with image processing performed by the image adjustment unit  14 , the degree to which the image quality of a specified sample image is to be reflected is set for each of the specified processing target image and the non-specified image in a processing target image, and image processing is thereafter performed. Accordingly, the impression of light in the specified processing target image is adjusted to the impression of light in the specified sample image while the impression of light in the non-specified image is such that the effect of the light in the specified sample image is suppressed. Accordingly, by changing the degree to which the image quality of a specified sample image is to be reflected for each region of a processing target image, the image quality is adjusted in accordance with the user&#39;s intention. 
     In the example described above, a specified processing target image is specified through a user operation; however, a region for which the user wants to change the image impression may be specified in a non-specific manner in a manual operation. Assuming such a case, if a portion having a color close to the color of a region specified by the user is present in the vicinity of the specified region, for example, a specified processing target image may be set while automatically including the portion. In this case, the feature value extraction unit  13  calculates the mean of chromaticity data (for example, IPT data) of the region specified by the user. The feature value extraction unit  13  sets a specified processing target image while including pixels that are in the vicinity of the region specified by the user and that have chromaticity data within a predetermined range from the calculated mean, and extracts feature values of the specified processing target image. 
     In the example described above, the case is described where plural types of light that illuminate a subject are present in a processing target image and feature values of a specified sample image are reflected; however, this exemplary embodiment is not limited to this case. This exemplary embodiment is applicable to a case where one type of light is present in a processing target image. Further, one or more types of light may be present in a sample image. 
     Note that, in the example illustrated in  FIG. 5 , the specified processing target image H 1  and the specified sample image M 1  have a quadrilateral shape and a hexagonal shape respectively; however, the specified processing target image H 1  and the specified sample image M 1  may have any shapes, such as a triangular shape and a circular shape. 
     Second Exemplary Embodiment 
     Now, a description of a second exemplary embodiment is given. 
     In the first exemplary embodiment, the weighting value β that is used to adjust feature values of a non-specified image to feature values of a specified sample image is set to the same value for the pixels of the non-specified image. In this exemplary embodiment, the weighting value β is calculated for each pixel that constitutes the non-specified image in accordance with information regarding the pixel of the non-specified image while following a predetermined rule. Specifically, in this exemplary embodiment, the value of the weighting value β is calculated on the basis of the distance from the specified processing target image. 
     An example functional configuration of the image processing apparatus  1  of this exemplary embodiment is similar to that illustrated in  FIG. 3 . The functions of the user operation accepting unit  11 , the color conversion unit  12 , the feature value extraction unit  13 , and the image display unit  15  are similar to those in the first exemplary embodiment. Therefore, a description of the image adjustment unit  14 , which is different from the first exemplary embodiment, is given below. 
     In this exemplary embodiment, the image adjustment unit  14  performs similar processing as in the first exemplary embodiment for a specified processing target image and causes feature values of a specified sample image to be reflected to feature values of the specified processing target image. For a non-specified image, the image adjustment unit  14  adjusts the weighting value β for each pixel of the non-specified image in accordance with the distance from a predetermined position of the specified processing target image to the pixel of the non-specified image. 
     As the predetermined position of the specified processing target image, the image adjustment unit  14  identifies the position of the center of gravity that is present in the figure represented by the specified processing target image, for example. The image adjustment unit  14  calculates, for each pixel of the non-specified image, the distance from the center of gravity and calculates the weighting value β in accordance with the calculated distance. Here, the weighting value β is set to a larger value as the distance from the center of gravity is shorter, and the weighting value β is set to a smaller value as the distance from the center of gravity is longer. A calculation used to convert the distance from the center of gravity into the weighting value β may be any calculation. The weighting value β is calculated by multiplying the distance from the center of gravity by a specific coefficient, for example. 
     After the weighting value β has been calculated for each pixel of the non-specified image, image processing on the non-specified image is performed. The image processing is performed by using the above-described expressions 6 to 8 as in the first exemplary embodiment. That is, β i,j  in expressions 6 to 8 is assigned the weighting value β calculated for each pixel of the non-specified image. 
     As described above, in this exemplary embodiment, with image processing performed by the image adjustment unit  14 , feature values of a specified sample image are reflected for each pixel of a non-specified image in accordance with the distance from the specified processing target image. That is, for a non-specified image, the degree to which feature values of a specified sample image are to be reflected increases as the distance from the specified processing target image is shorter, and the degree to which the feature values of the specified sample image are to be reflected decreases as the distance from the specified processing target image is longer. In other words, in a non-specified image, the effect of light in a specified sample image is reflected to a larger degree as the distance from the specified processing target image is shorter. 
     In the example described above, the predetermined position of a specified processing target image is assumed to be the center of gravity, and the weighting value β is set in accordance with the distance from the center of gravity; however, this exemplary embodiment is not limited to this example. The predetermined position of a specified processing target image may be set to a position on the perimeter (edge) of the specified processing target image, and the weighting value β may be set in accordance with the distance from the perimeter, for example. 
     Third Exemplary Embodiment 
     Now, a description of a third exemplary embodiment is given. 
     In this exemplary embodiment, the weighting value β is calculated for each pixel that constitutes a non-specified image in accordance with information regarding the pixel of the non-specified image while following a predetermined rule as in the second exemplary embodiment. Specifically, in this exemplary embodiment, the value of the weighting value β is calculated on the basis of the color distribution of the non-specified image. 
     An example functional configuration of the image processing apparatus  1  of this exemplary embodiment is similar to that illustrated in  FIG. 3 . The functions of the user operation accepting unit  11 , the color conversion unit  12 , the feature value extraction unit  13 , and the image display unit  15  are similar to those in the first exemplary embodiment. Therefore, a description of the image adjustment unit  14 , which is different from the first exemplary embodiment, is given below. 
     In this exemplary embodiment, the image adjustment unit  14  performs similar processing as in the first exemplary embodiment for a specified processing target image and causes feature values of a specified sample image to be reflected to feature values of the specified processing target image. For a non-specified image, the image adjustment unit  14  adjusts the weighting value β for each pixel that constitutes the non-specified image in accordance with the color distribution of the non-specified image, that is, in accordance with the difference between the pixel value of the pixel of the non-specified image and the mean of the pixel values of the pixels of the specified processing target image. 
     The image adjustment unit  14  obtains the chromaticity (RGB values) of a processing target image in an RGB color space before color conversion by the color conversion unit  12 , for example. Next, the image adjustment unit  14  calculates the mean of the RGB values of the pixels in the specified processing target image. Here, the image adjustment unit  14  calculates the mean (arithmetic mean, for example) of each of the R values, G values, and B values of the pixels in the specified processing target image. Subsequently, the image adjustment unit  14  calculates the difference between the pixel value (RGB values) of each pixel in the non-specified image and the mean pixel value (RGB values) of the specified processing target image and calculates the weighting value β in accordance with the calculated difference. Here, the weighting value β is set to a larger value as the difference between the pixel values decreases, and the weighting value β is set to a smaller value as the difference between the pixel values increases. A calculation used to convert the difference between the pixel values into the weighting value β may be any calculation. The weighting value β is calculated by multiplying the difference between the pixel values by a specific coefficient, for example. 
     Here, the difference between the pixel value of each pixel in the non-specified image and the mean pixel value of the specified processing target image is calculated by using the following expression 9. 
     In expression 9, L i,j  represents the difference between the pixel value of each pixel at the position (i, j) that constitutes a non-specified image and the mean pixel value of a specified processing target image. R i,j  represents the R value of each pixel at the position (i, j) that constitutes the non-specified image, G i,j  represents the G value of each pixel at the position (i, j) that constitutes the non-specified image, and B i,j  represents the B value of each pixel at the position (i, j) that constitutes the non-specified image. R 0  represents the mean R value of the specified processing target image, G 0  represents the mean G value of the specified processing target image, and B 0  represents the mean B value of the specified processing target image.
 
 L   i,j =√{square root over (( R   0   −R   i,j ) 2 +( G   0   −G   i,j ) 2 +( B   0   −B   i,j ) 2 )}  (9)
 
     After the pixel value difference has been calculated for each pixel of the non-specified image by using expression 9, the weighting value β is calculated for the pixel. Thereafter, image processing is performed on the non-specified image. This image processing is performed similarly as in the first exemplary embodiment by using the above-described expressions 6 to 8. That is, β i,j  in expressions 6 to 8 is assigned the weighting value β calculated for each pixel of the non-specified image. 
     As described above, in this exemplary embodiment, with image processing performed by the image adjustment unit  14 , feature values of a specified sample image are reflected for each pixel of a non-specified image in accordance with the difference from the mean pixel value of the specified processing target image. That is, for a non-specified image, the degree to which feature values of a specified sample image are to be reflected increases as the difference from the mean pixel value of the specified processing target image decreases, and the degree to which the feature values of the specified sample image are to be reflected decreases as the difference from the mean pixel value of the specified processing target image increases. 
     In other words, in a non-specified image, the effect of light in a specified sample image is reflected to a larger degree as the color of the non-specified image is closer to the color of the specified processing target image before image processing. Therefore, even in a case where a region for which a user wants to change the image impression is specified in a non-specific manner, the effect of the light in the specified sample image is reflected to a larger degree in a portion having a color closer to the color of the region specified by the user. Further, in the non-specified image, a portion that is affected by light in the specified processing target image before image processing and that has an impression similar to that of the specified processing target image is adjusted so that, even after image processing, the impression of the portion is still close to the impression of the specified processing target image after image processing. 
     In the example described above, the weighting value β is set in accordance with the difference in the values of RGB data; however, this exemplary embodiment is not limited to the example. Chromaticity data in any color space that includes a brightness component and a chromaticity component may be used, and IPT data, CIE L*a*b* data, Lαβ data, CAM02 data, or HSV data may be used instead of RGB data, for example. 
     Fourth Exemplary Embodiment 
     Now, a description of a fourth exemplary embodiment is given. 
     In this exemplary embodiment, the weighting value β is set to the same value for the pixels of a non-specified image and is calculated in accordance with the ratio of the specified processing target image relative to the entire processing target image. 
     An example functional configuration of the image processing apparatus  1  of this exemplary embodiment is similar to that illustrated in  FIG. 3 . The functions of the user operation accepting unit  11 , the color conversion unit  12 , the feature value extraction unit  13 , and the image display unit  15  are similar to those in the first exemplary embodiment. Therefore, a description of the image adjustment unit  14 , which is different from the first exemplary embodiment, is given below. 
     In this exemplary embodiment, the image adjustment unit  14  performs similar processing as in the first exemplary embodiment for a specified processing target image and causes feature values of a specified sample image to be reflected to feature values of the specified processing target image. For a non-specified image, the image adjustment unit  14  adjusts the weighting value β in accordance with the ratio of the specified processing target image relative to the entire processing target image. 
     The image adjustment unit  14  calculates the ratio of a specified processing target image relative to the entire processing target image and calculates the weighting value β in accordance with the calculated ratio, for example. Here, the weighting value β is set to a larger value as the ratio of the specified processing target image relative to the entire processing target image increases, and the weighting value β is set to a smaller value as the ratio of the specified processing target image relative to the entire processing target image decreases. A calculation used to convert the ratio of the specified processing target image into the weighting value β may be any calculation. The weighting value β is calculated by multiplying the ratio by a specific coefficient, for example. 
       FIG. 6  is a diagram for describing example processing of calculating the weighting value β from the ratio of a specified processing target image. In the illustrated example, the degree of reflection is classified into five levels represented by Nos. 1 to 5 in accordance with the ratio of the specified processing target image relative to the entire processing target image. For example, the case No. 1 is a case where the specified processing target image is much larger than the non-specified image and the ratio of the specified processing target image relative to the entire processing target image is largest among the cases Nos. 1 to 5. The ratio of the specified processing target image relative to the entire processing target image decreases in the order of No. 1 to No. 5, and the weighting value β decreases in the order of No. 1 to No. 5. In the illustrated example, the degree of reflection to the non-specified image is represented by five levels ranging from 1 to 5, for example. The weighting value β is calculated on the basis of the degree of reflection, for example. 
     After the weighting value β has been calculated for the non-specified image, image processing is performed on the non-specified image. This image processing is performed similarly as in the first exemplary embodiment by using the above-described expressions 6 to 8. That is, β i,j  in expressions 6 to 8 is assigned the weighting value β calculated for the non-specified image. 
     As described above, in this exemplary embodiment, with image processing performed by the image adjustment unit  14 , feature values of a specified sample image are reflected in a non-specified image in accordance with the ratio of the specified processing target image relative to the entire processing target image. That is, for a non-specified image, the degree to which feature values of a specified sample image are to be reflected increases as the ratio of the specified processing target image relative to the entire processing target image increases, and the degree to which the feature values of the specified sample image are to be reflected decreases as the ratio of the specified processing target image relative to the entire processing target image decreases. As a result, the effect of light in the specified sample image is reflected in the non-specified image to a larger degree as the specified processing target image occupies a larger portion of the processing target image. 
     Note that, in this exemplary embodiment, the weighting value β is set to the same value for the pixels of a non-specified image; however, this exemplary embodiment is not limited to this. This exemplary embodiment may be combined with processing in the third exemplary embodiment or the fourth exemplary embodiment, and the weighting value β may be calculated for each pixel that constitutes a non-specified image on the basis of information regarding the pixel. 
     Fifth Exemplary Embodiment 
     Now, a description of a fifth exemplary embodiment is given. 
     In the first to fourth exemplary embodiments, feature values of a specified sample image are reflected in a non-specified image. In this exemplary embodiment, in addition to feature values of a specified sample image, feature values of an image of a region in the sample image other than the region of the specified sample image are also reflected in a non-specified image. 
     An example functional configuration of the image processing apparatus  1  of this exemplary embodiment is similar to that illustrated in  FIG. 3 . The functions of the user operation accepting unit  11 , the color conversion unit  12 , and the image display unit  15  are similar to those in the first exemplary embodiment. Therefore, a description of the feature value extraction unit  13  and the image adjustment unit  14 , which are different from the first exemplary embodiment, is given below. 
     In this exemplary embodiment, the feature value extraction unit  13  extracts, for a processing target image, feature values of the specified processing target image and feature values of the non-specified image. The feature value extraction unit  13  extracts, for a sample image, feature values of the specified sample image. The feature value extraction unit  13  further extracts feature values of an image of a region not specified by a user in the sample image (hereinafter referred to as a non-specified sample image), that is, feature values of the non-specified sample image, which is an image of a region other than the region of the specified sample image in the sample image. In this exemplary embodiment, the non-specified sample image is used as an example of a first non-specified image. 
     The image adjustment unit  14  performs similar processing as in the first exemplary embodiment for a specified processing target image and causes feature values of a specified sample image to be reflected to feature values of the specified processing target image. For a non-specified image, the image adjustment unit  14  first causes feature values of a non-specified sample image to be reflected. Thereafter, the image adjustment unit  14  further causes, for the non-specified image, feature values of a specified sample image to be reflected. 
     Here, feature values of a non-specified sample image are calculated by using expressions 10 and 11. In expressions 10 and 11, I i,j  represents the I value of each pixel at the position (i, j) that constitutes a non-specified sample image, P i,j  represents the P value of each pixel at the position (i, j) that constitutes the non-specified sample image, and T i,j  represents the T value of each pixel at the position (i, j) that constitutes the non-specified sample image. 
     μ Irg  represents the arithmetic mean of the I values of the non-specified sample image, μ Prg  represents the arithmetic mean of the P values of the non-specified sample image, and μ Trg  represents the arithmetic mean of the T values of the non-specified sample image. 
     σ Irg   2  represents the variance of the I values of the non-specified sample image, σ Prg   2  represents the variance of the P values of the non-specified sample image, and σ Trg   2  represents the variance of the T values of the non-specified sample image. 
     
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             μ 
                             Irg 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   I 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             μ 
                             Prg 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 ( 
                                 
                                   P 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           μ 
                           Trg 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               ( 
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               ) 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         
                           
                             σ 
                             Irg 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       I 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Irg 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                         
                           
                             σ 
                             Prg 
                             2 
                           
                           = 
                           
                             
                               1 
                               ij 
                             
                             ⁢ 
                             
                               
                                 ∑ 
                                 
                                     
                                 
                                 
                                     
                                 
                               
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 
                                   ( 
                                   
                                     
                                       P 
                                       
                                         i 
                                         , 
                                         j 
                                       
                                     
                                     - 
                                     
                                       μ 
                                       Prg 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                             
                           
                         
                         , 
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         
                           σ 
                           Trg 
                           2 
                         
                         = 
                         
                           
                             1 
                             ij 
                           
                           ⁢ 
                           
                             
                               ∑ 
                               
                                   
                               
                               
                                   
                               
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               
                                 ( 
                                 
                                   
                                     T 
                                     
                                       i 
                                       , 
                                       j 
                                     
                                   
                                   - 
                                   
                                     μ 
                                     Trg 
                                   
                                 
                                 ) 
                               
                               2 
                             
                           
                         
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
     The image adjustment unit  14  first performs a process for adjusting feature values of a non-specified image to feature values of a non-specified sample image. This process is performed by using the following expressions 12 to 14, for example. In expressions 12 to 14, γ i,j  represents a weighting value γ, which is calculated for each pixel at the position (i, j) that constitutes the non-specified image. Here, the weighting value γ has a value within a range between 0 and 1 and is set in accordance with a certain rule, such as a user setting, for example. By specifying a relationship between the weighting value γ and the weighting value α or β in advance, the weighting value γ is determined in accordance with the value set for the weighting value α or β. 
     Among expressions 12 to 14, expression 12 is an arithmetic expression for I values, where I i,j  represents the I value of each pixel at the position (i, j) that constitutes a non-specified image before adjustment, and I′ i,j  represents the I value of each pixel at the position (i, j) that constitutes the non-specified image after adjustment. 
     Expression 13 is an arithmetic expression for P values, where P i,j  represents the P value of each pixel at the position (i, j) that constitutes the non-specified image before adjustment, and P′ i,j  represents the P value of each pixel at the position (i, j) that constitutes the non-specified image after adjustment. 
     Expression 14 is an arithmetic expression for T values, where T i,j  represents the T value of each pixel at the position (i, j) that constitutes the non-specified image before adjustment, and T′ i,j  represents the T value of each pixel at the position (i, j) that constitutes the non-specified image after adjustment. 
     By calculating expressions 12 to 14, the brightness component (I) and the chromaticity components (P, T) are adjusted in accordance with the non-specified sample image for each pixel at the position (i, j) that constitutes the non-specified image. 
     
       
         
           
             
               
                 
                   
                     I 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       γ 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 I 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Itg 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Irg 
                               2 
                             
                             
                               σ 
                               Itg 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Irg 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
             
               
                 
                   
                     P 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       γ 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 P 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Ptg 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Prg 
                               2 
                             
                             
                               σ 
                               Ptg 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Prg 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
             
               
                 
                   
                     T 
                     
                       i 
                       , 
                       j 
                     
                     ′ 
                   
                   = 
                   
                     
                       γ 
                       
                         i 
                         , 
                         j 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           
                             ( 
                             
                               
                                 T 
                                 
                                   i 
                                   , 
                                   j 
                                 
                               
                               - 
                               
                                 μ 
                                 Ttg 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             
                               σ 
                               Trg 
                               2 
                             
                             
                               σ 
                               Ttg 
                               2 
                             
                           
                         
                         + 
                         
                           μ 
                           Trg 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
     Subsequently, the image adjustment unit  14  further performs a process for adjusting the feature values of the non-specified image to feature values of a specified sample image. This process is performed by using the above-described expressions 6 to 8. Here, as the weighting value β, the value calculated according to any of the first to fourth exemplary embodiment is used. 
     As described above, in this exemplary embodiment, feature values of a specified sample image and feature values of an image of a region other than the region of the specified sample image in the sample image are reflected in a non-specified image. That is, feature values of images of different regions are reflected in a non-specified image, and the image quality is adjusted. 
     Description of Program 
     The processing performed by the image processing apparatus  1  according to the exemplary embodiments is implemented by software and hardware resources working together. That is, a central processing unit (CPU) not illustrated, which is provided inside the image processing apparatus  1 , executes a program for implementing functions of the image processing apparatus  1  to thereby implement the functions. 
     Accordingly, the processing performed by the image processing apparatus  1  may be regarded as a program causing a computer to execute a process for image processing, the process including: extracting feature values of a first specified image, which is an image of a region specified in advance in a first image; and changing, in a case where the feature values of the first specified image are to be reflected in a second image, for each region of the second image, a degree to which the feature values of the first specified image are to be reflected, and adjusting an image quality of the second image. 
     In the examples described above, although an arithmetic mean is used as the mean, the mean is not limited to an arithmetic mean and may be a geometric mean or the like. In the examples described above, although a variance is used as the distribution, the distribution is not limited to a variance, and various indicators, such as a root-mean-square or a standard deviation, may be used. 
     In the examples described above, although the color conversion unit  12  converts RGB data into IPT data, RGB data need not be converted into IPT data and may be converted into any chromaticity data in a color space including a brightness component and a chromaticity component. For example, RGB data is used without conversion into IPT data, or RGB data may be converted into CIE L*a*b* data, Lαβ data, CAM02 data, HSV data, or the like instead of IPT data. By using a color space, such as a CIE L*a*b* color space, which is perceptually uniform for a user&#39;s vision, or by using color conversion based on CIECAM2 or iCAM which takes into consideration a user&#39;s psychological vision and a user&#39;s physical vision, the impression after image processing becomes more natural. 
     In the examples described above, as the types of light, indoor illumination light produced by an artificial light source and natural light produced by a natural light source are used; however, the types of light is not limited to these. The types of indoor illumination light include warm color light and cool color light, for example. In a case where warm color illumination light and cool color illumination light are present in a processing target image, for example, with processing performed by the image adjustment unit  14 , color conversion may be performed by changing the color of the warm color light or changing the color of the cool color light. 
     In the examples described above, although a processing target image is formed of a specified processing target image and a non-specified image, a processing target image is not limited to such a processing target image. In other words, in a processing target image, the non-specified image may be an image of the entire region other than the region of the specified processing target image or may be an image of a portion of the region other than the region of the specified processing target image. In the examples described above, a non-specified image is assumed to be an image of a region not specified by a user or the like. In a processing target image, in a case where the non-specified image is an image of a portion of the region other the region of the specified processing target image, the non-specified image may also be specified by a user or the like. 
     In the examples describe above, although a portion of a sample image is assumed to be a specified sample image, the entire sample image may be assumed to be a specified sample image. 
     The program for implementing the exemplary embodiments of the present invention may be provided via a communication system or may be stored in a recording medium, such as a compact disc read-only memory (CD-ROM), and provided therefrom. 
     The foregoing description of the exemplary embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Obviously, many modifications and variations will be apparent to practitioners skilled in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical applications, thereby enabling others skilled in the art to understand the invention for various embodiments and with the various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.