Image processing device and method, program, and storage medium

The image processing device addresses the challenge of accurately estimating subject areas by using virtual light sources and contrast corrections based on face and body area information, achieving natural image enhancements.

JP7534866B2Active Publication Date: 2024-08-15CANON KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2020075609
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-04-21
Publication Date
2024-08-15
Estimated Expiration
2040-04-21

AI Technical Summary

Technical Problem

Existing image processing methods struggle to accurately estimate subject areas, particularly when boundaries between skin or clothing colors and background colors are confusing, leading to unnatural brightness corrections.

Method used

An image processing device that includes detection means for subject areas, relighting processes using virtual light sources, and contrast correction processes, with reference regions determined based on face and body area information to perform natural image corrections.

Benefits of technology

Enables more natural image corrections by improving contrast and brightness for subject and background areas, preventing unnatural enhancements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007534866000005
    Figure 0007534866000005
  • Figure 0007534866000004
    Figure 0007534866000004
  • Figure 0007534866000001
    Figure 0007534866000001
Patent Text Reader

Abstract

To provide an image processing apparatus that, when performing image correction for each area of a subject, can perform more natural correction.SOLUTION: An image processing apparatus comprises: a detection unit that detects a subject area from an image; a first image processing unit that performs first image processing on the subject area; a second image processing unit that performs second image processing on an area other than the subject area; a first determination unit that determines, in the subject area, a first reference area on which the first image processing is performed and having a size closer to that of the subject area; and a second determination unit that, in order to determine an area on which the second image processing is performed, determines a second reference area having a size closer to that of the subject area and different in size from the first reference area.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device that performs image processing for each region of an image captured by a digital camera or the like. [Background technology]

[0002] 2. Description of the Related Art Conventionally, there have been proposed correction methods for extracting a subject area and correcting the brightness of the subject area, and image processing devices for correcting the gradation of areas other than the subject area.

[0003] For example, Patent Document 1 discloses a technique for determining a subject area and correcting the lighting of the subject area. By using a virtual light source for relighting processing, it is possible to brighten dark areas such as shadows caused by ambient light and obtain a desirable image.

[0004] In such a case, a method for detecting a subject region is known in which distance information is acquired and a region within a predetermined distance range with respect to the distance value of the main subject is detected as the subject region.

[0005] There are several methods for acquiring distance information, but a representative method is the stereo method, which acquires images from multiple viewpoints and calculates distance based on the principle of triangulation using parallax calculated from the correspondence between pixels in each image. By acquiring distance information and detecting the subject area, it becomes possible to distinguish between subject areas in the foreground and those in the background.

[0006] For example, when a virtual light source is directed at a subject in the foreground and when it is directed at a subject in the background, it is possible to control the amount of illumination (intensity) of the virtual light source depending on the difference in distance from the virtual light source to the subject.

[0007] Furthermore, Patent Document 2 discloses a method of detecting a plurality of subject regions and performing gradation correction for each subject region, such as a region of a main subject and a region other than the main subject.

[0008] The subject area estimation methods used in these methods include multiple subject area estimation methods, such as a method of estimating the human body area from the results of face detection, a technique of estimating the subject area using machine learning, and a method of detecting the subject area by obtaining distance information.

[0009] However, if the estimation of the subject area does not go well, unnatural corrections may be made, such as when correcting the brightness of the person area, the background area also being made brighter, or when correcting the background area to improve the contrast, the contrast may be improved not only in the background area but also in the main subject area.

[0010] To address these issues, Patent Document 1 discloses a method for switching between a means for acquiring subject area information from subject distance information and a means for acquiring subject area information from an image based on the relationship between shooting conditions and subject conditions, and the results of image analysis of the subject. [Prior art documents] [Patent documents]

[0011] [Patent Document 1] JP 2018-182700 A [Patent Document 2] JP 2014-153959 A Summary of the Invention [Problem to be solved by the invention]

[0012] However, in the subject area estimation method using image information such as face detection information and subject continuity, it is difficult to correctly estimate the subject area when the boundary between the skin or clothing color and the background color is ambiguous. The subject area detection method using machine learning also has the same problem. The method using distance information has the problem that the subject area cannot be correctly estimated for a subject that is close to the subject.

[0013] The present invention has been made in consideration of the above-mentioned problems, and its object is to provide an image processing device that can perform more natural correction when performing image correction for each area of ​​a subject. [Means for solving the problem]

[0014] The image processing device according to the present invention includes a detection unit for detecting a subject area from an image, and a calculation unit for calculating the subject area. Relighting process that corrects brightness using a virtual light source a first image processing means for performing the above-mentioned processing for an area other than the subject area; , contrast correction processing and a second image processing means for performing the above in the subject region. Relighting process A size close to the subject area to be subjected to the and smaller than the subject area a first determining means for determining a first reference region; Contrast correction processing In order to determine a region to be subjected to the above-mentioned operation, and is larger than the subject area and a second determination means for determining a second reference region. Effect of the Invention

[0015] According to the present invention, when image correction is performed for each area of ​​a subject, it is possible to perform more natural correction. [Brief description of the drawings]

[0016] [Figure 1] 1 is a block diagram showing the configuration of a digital camera according to an embodiment of the present invention; [Diagram 2] FIG. 2 is a block diagram showing a process flow according to an embodiment. [Diagram 3] FIG. 4 is a block diagram showing the flow of background region correction processing in an embodiment. [Figure 4] FIG. 11 is a block diagram showing the flow of a person area correction process according to an embodiment. [Diagram 5] 1 is a conceptual diagram illustrating a shooting scene to which the present invention is applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.

[0018] The following describes a digital camera as an embodiment of an image processing device of the present invention. In this embodiment, a digital camera (image capture device) is described as an example of an image processing device, but the image processing device of the present invention is not limited to an image capture device and may be, for example, a personal computer (PC), etc.

[0019] Generally, when photographing a person in a backlit scene, if the photograph is taken so that the person subject is properly exposed, the background area will be overexposed. Conversely, if the photograph is taken so that the background area is properly exposed, the person area will be underexposed. In such a case, the photograph will be taken under intermediate photographing conditions between the photographing conditions in which the person area is properly exposed and the photographing conditions in which the background area is properly exposed. However, the image photographed in this way will have a dark person and insufficient contrast in the background. FIG. 5(a) is a conceptual diagram assuming a photographing scene to which the present invention is applied. It shows a state in which the contrast of the background is reduced and the person subject is photographed dark.

[0020] In order to make such images look good, it is desirable to perform processing to brighten the brightness of the subject region and to improve the contrast of the background region. In particular, in landscape scenes in which the background region is a distant mountain, sea, or lake, the contrast is often reduced due to the effects of water vapor and haze in the air, so there is a strong demand for improving the contrast of the background region.

[0021] In this embodiment, a correction process for improving contrast is performed for background region correction, and a relighting correction process for correcting lighting, such as the brightness of the subject and the direction of the light source irradiating the subject, is performed for the subject region.

[0022] <Digital camera configuration> FIG. 1 is a block diagram showing the configuration of a digital camera 100 according to this embodiment.

[0023] 1, light incident via a lens group 101 (image pickup optical system) including a zoom lens and a focus lens, and a shutter 102 with an aperture function is photoelectrically converted in an image pickup unit 103. The image pickup unit 103 is configured with an image pickup element such as a CCD or CMOS element, and an electrical signal obtained by photoelectric conversion is output as an image signal to an A / D converter 104. The A / D converter 104 converts the analog image signal output from the image pickup unit 103 into a digital image signal (image data), and outputs it to an image processing unit 105.

[0024] The image processing unit 105 performs various image processing such as color conversion processing such as white balance, gamma processing, contour enhancement processing, and color correction processing on image data from the A / D converter 104 or image data read from the image memory 106 via the memory control unit 107. The image data output from the image processing unit 105 is written to the image memory 106 via the memory control unit 107. The image memory 106 stores the image data output from the image processing unit 105 and image data to be displayed on the display unit 109. The face / facial organ detection unit 113 detects a facial area and facial organ area where a person's face and organs are present from the captured image.

[0025] The image processing unit 105 performs a predetermined evaluation value calculation process using the face detection results and face organ detection results of the face / facial organ detection unit 113 and the captured image data, and the system control unit 50 performs exposure control and focus adjustment control based on the obtained evaluation value. This allows the system control unit 50 to perform TTL (through-the-lens) type AF (autofocus) processing, AE (automatic exposure) processing, AWB (auto white balance) processing, etc.

[0026] Furthermore, the D / A converter 108 converts digital image data for display stored in the image memory 106 into an analog signal and supplies it to the display unit 109. The display unit 109 performs display according to the analog signal from the D / A converter 108 on a display device such as an LCD.

[0027] The codec unit 110 compresses and encodes the image data stored in the image memory 106 based on a standard such as JPEG or MPEG. The system control unit 50 stores the encoded image data in a recording medium 112 such as a memory card or a hard disk via an interface (I / F) 111. The codec unit 110 decodes and expands image data read from the recording medium 112 via the I / F 111, and stores the image in the image memory 106. The image data stored in the image memory 106 is then displayed on the display unit 109 via the memory control unit 107 and the D / A converter 108, thereby allowing the image to be reproduced and displayed.

[0028] The relighting processor 114 performs relighting processing (re-illumination processing) to correct the brightness of the captured image by applying a virtual light source to the image. The image synthesis processor 115 synthesizes two types of images according to a synthesis map. The synthesis map indicates the synthesis ratio of the two types of images.

[0029] The system control unit 50 controls the entire system of the digital camera 100. The non-volatile memory 121 is configured with a memory such as an EEPROM, and stores programs and parameters necessary for processing by the system control unit 50. The system control unit 50 implements each process of this embodiment, which will be described later, by expanding the programs recorded in the non-volatile memory 121 and constants and variables for the operation of the system control unit 50 into the system memory 122 and executing them. The operation unit 120 accepts operations such as menu settings and image selection by the user.

[0030] <Image correction process flow> FIG. 2 is a block diagram showing the process flow in this embodiment. 2, an input image is input to image processing unit 105, and a reference image is generated. The reference image generated here is a reference image for face detection and estimation of a human body region, and is an image with image quality settings suitable for face detection, region detection, etc., which differ from images with white balance, color, etc. set by a user. For example, settings such as auto white balance, color / saturation: standard settings, dark area correction: strong, brightness setting: bright, etc., may be used to make it easy to detect face or human body regions even in images with many dark areas or high saturation.

[0031] Using the reference image generated by the image processing unit 105, the face / face organ detection unit 113 generates face area information 203. The face area information 203 includes information such as contour information of the face area, position information of face organs such as the eyes, nose, and mouth in the face, angles relative to the image, and face detection reliability indicating the detection accuracy for the position information. Generally, a method using template matching or a method using machine learning is used for detecting the face and face organs.

[0032] The background contrast correction region determination unit 300 determines a region in which contrast is to be improved based on face information and a reference image. The contrast enhancement unit 310 enhances the contrast of the contrast enhancement region (contrast correction processing region) determined by the background contrast correction region determination unit 300.

[0033] The relighting correction region determination unit 400 determines a region for performing lighting correction based on face information and a reference image. The relighting processing unit 410 performs relighting processing on the lighting correction region determined by the relighting correction region determination unit 400.

[0034] The contrast enhancement processing performed by the contrast enhancement processing unit 310 may be a commonly used method, and may be a gamma processing or sharpness enhancement processing that improves the ratio of dark and bright areas as a tone conversion characteristic, a processing that enhances only local contrast, etc. In this embodiment, local contrast enhancement processing is applied.

[0035] FIG. 3 is a block diagram showing the flow of processing by the background contrast correction region determination unit 300 and the contrast enhancement unit 310 in this embodiment.

[0036] 3, a background correction subject region setting unit 301 determines a subject region for background correction from face region information 203. A background correction human region identification unit 302 identifies a background region from a reference image 202 and the subject region determined by the background correction subject region setting unit 301, and generates a background contrast correction region map 210. A synthesis processing unit 115 determines a synthesis processing ratio for each region based on region and level information of the background contrast correction region map 210, and performs synthesis processing of the input image 201 and the output image of a contrast enhancement processing unit 311.

[0037] The background contrast correction area map 210 generated by the background correction person area identification unit 302 is area information indicating areas determined as background areas, and is information on parts not determined as person areas. In other words, it is area information in which the area determined as a person area and the determination level at which it was determined as a person area are inverted, and is information equivalent to area information indicating the correction level of contrast correction in the synthesis processing unit 115.

[0038] FIG. 4 is a block diagram showing the flow of relighting processing in the relighting correction area determination unit 400 and the relighting processing unit 410 in FIG.

[0039] The subject region setting unit 401 sets a subject region based on the face region information 203. The subject region identification unit 402 generates a relighting correction region map 220 using the subject region set by the subject region setting unit 401 and the reference image 202.

[0040] A virtual light source calculation unit 411 generates light source information of a virtual light source using the input image 201 and face region information 203. A virtual light source component calculation unit 412 generates a relighting gain map 221 using the virtual light source information calculated by the virtual light source calculation unit 411 and a relighting correction region map 220. The relighting gain map 221 is a gain map expressing a correction gain that corrects the brightness of the subject region for each image region. A gain multiplication unit 413 multiplies the contrast-multiplied image 211 by a gain for each subject region in accordance with the relighting gain map.

[0041] Note that a method for generating light source information of a virtual light source in virtual light source calculation section 411 and a method for calculating a virtual light source component in virtual light source component 412 are described in detail in Patent Document 1, and therefore a description thereof will be omitted in this embodiment. However, while Patent Document 1 performs relighting processing during processing in a signal processing circuit, the relighting processing is performed after degamma processing in the processing flow, and performing relighting processing before performing signal processing in this embodiment can provide substantially the same effect.

[0042] <How to apply human body reference image> Next, a method for setting a subject region in the background correction subject region setting section 301 in FIG. 3 and the subject region setting section 401 in FIG. 4 will be described.

[0043] In this embodiment, a person reference image (person reference region) including a face and a human body region is set in advance. The face region of the person reference image has facial organ information such as the eyes, nose, and mouth. The person reference image is enlarged, reduced, and rotated so that the positions of the organ information of the person reference image and the organ information of the face such as the eyes, nose, and mouth detected from the captured image match, thereby adapting it to the region of the actual image. In addition, the person reference image is set to have a gradation that decreases the judgment level of the person region toward the periphery of the person region.

[0044] The person reference image for background region correction uses a model (subject model image) in which the human body region of the body part is set wider than that of a general human body model, and the person reference image used in the subject region setting unit 401 uses a model in which the human body region of the body part is set narrower than that of a general human body model. Similarly, for the region corresponding to the head in the person region, the person reference image for background region correction uses a model in which the head region is set wider than that of a general human body model, and the person reference image used in the subject region setting unit 401 uses a model in which the head region is set narrower than that of a general human body model.

[0045] Fig. 5 is a conceptual diagram showing an application example of a subject model in this embodiment. Fig. 5(b) shows a reference image that is applied (subject) in the case of relighting processing for correcting the brightness of a person area, and a person reference image is set so as to be inside the person in the image of Fig. 5(a) in which a person is photographed against the backlight.

[0046] FIG. 5(c) shows a reference image that is applied when correcting the background region, and for the backlit image of a person in FIG. 5(a), the person reference image is set so that it is outside the person. Also, since there is more organ information such as the eyes and mouth in the face region than in the body region, the detection accuracy of the face region is high. Therefore, the size of the head region in the reference image may be set to be about the same as that of the actual image, or the enlargement / reduction ratio with respect to the actual image may be set smaller than that of the human body region. FIGS. 5(b) and (c) also show how the ratio of the head region to the reference image with respect to the actual image is set smaller than that of the body region.

[0047] The subject region setting method in the background correction person region identification unit 302 in Figure 3 and the subject region identification unit 402 in Figure 4 performs subject region identification processing to match the contours of the subject by performing shaping processing with reference to the pixel values ​​of the reference image 202, as described in, for example, JP 2017-11652 A.

[0048] In this way, when the subject region identification process that matches the contour is applied to the subject reference image by the subject region identification unit, the background correction person region identification unit 302 for correcting the contrast of the background region sets a person identification region that extends outside the person. Also, since the person identification level decreases from the inside to the outside of the person, the background contrast correction region map that inverts the identified region setting level acts to strengthen the contrast outside the person. In other words, as it approaches the person region, it is no longer determined to be a background region, and therefore the closer it is to the person region, the less contrast enhancement process is applied.

[0049] On the other hand, the subject region identification unit 402 in relighting is set so that the inside of the subject region is the correction region, and the amount of subject correction decreases from the inside to the outside of the subject region. At the same time, processing is performed so that the subject region determination does not go outside the subject. In other words, brightness correction is performed mainly inside the subject, and the brightness correction level decreases toward the outside of the subject. Therefore, it acts to prevent the brightness correction of the person region from going outside the person region.

[0050] In addition, the subject region identification process performs a shaping process of the subject region based on the contour information of the image. However, even if the contour of the subject region cannot be detected, the person reference image is selected so that it does not overlap with each correction region, so that correction defects can be effectively avoided.

[0051] In this embodiment, the person reference image used in the background correction subject region setting unit 301 in FIG. 3 and the subject region setting unit 401 in FIG. 4 may be prepared for each direction of the face in the left-right direction. Then, a person reference image with an optimal angle may be selected according to the information of the face direction detected from the image. Also, a three-dimensional model including the face region and the human body region may be prepared, and a human body reference image may be generated according to the face angle. Also, not only a reference image for each face angle, but also a reference image of the face and a reference image of the human body region may be prepared for each angle. Then, a face angle model may be selected according to the face angle detected from the image, and multiple human body regions with different angles from the neck down may be applied to the lower face region of the actual image, and the angle at which the variance of the human body region is the smallest or the similarity within the region is the highest may be used as the reference image of the human body region.

[0052] In the present embodiment, a reference image for correcting the subject region and a reference image for correcting the outside of the subject region, that is, a plurality of reference images are provided, and the reference image to be used is selected from among them. However, a common reference image may be used for both correcting the subject region and correcting the outside of the subject region, and the magnification of the enlargement or reduction may be changed for each of the head region and human body region to which the image is applied.

[0053] In this embodiment, a method of estimating the subject region from the size and orientation of the face region is used, but the method is not limited to this, and there are region estimation methods using machine learning, etc. Even with these methods, if the color and pattern of the background region and the human body region are similar, the human body region is often not extracted correctly, and the present invention is applicable even in such cases.

[0054] (Other embodiments) The present invention can also be realized by a process in which a program for realizing one or more functions of the above-mentioned embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) for realizing one or more functions.

[0055] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]

[0056] 50: system control unit, 101: optical system, 103: imaging unit, 105: image processing unit, 113: face / facial organ detection unit, 114: relighting processing unit, 115: synthesis processing unit

Claims

1. A detection means for detecting a subject area from an image; a first image processing means for performing a relighting process on the subject region to correct brightness using a virtual light source; a second image processing means for performing a contrast correction process on an area other than the subject area; a first determination means for determining a first reference area, which is a target of the relighting process in the subject area and has a size close to the subject area and smaller than the subject area; a second determination means for determining a second reference area having a size close to the object area and larger than the object area in order to determine an area to be subjected to the contrast correction process; An image processing device comprising:

2. 2. The image processing device according to claim 1, wherein the detection means detects a face area and a body area as the subject area, and the first determination means sets a degree to which the first reference area is made smaller than the subject area to be different for the face area and the body area.

3. 3. The image processing apparatus according to claim 2, wherein the first determining means determines a degree to which the first reference region is made smaller than the subject region such that the body region is larger than the face region.

4. 2. The image processing device according to claim 1, wherein the detection means detects a face area and a body area as the subject area, and the second determination means sets a degree to which the second reference area is made larger than the subject area to be different for the face area and the body area.

5. 5. The image processing apparatus according to claim 4, wherein the second determining means determines the extent to which the second reference region is to be made larger than the subject region such that the body region is larger than the face region.

6. 6. The image processing device according to claim 1, wherein the first determination means and the second determination means determine the first reference area and the second reference area by transforming a subject model image based on a face area detection result and the image.

7. A detection step of detecting a subject region from an image; a first image processing step of performing a relighting process for correcting brightness of the subject region using a virtual light source; a second image processing step of performing a contrast correction process on an area other than the subject area; a first determination step of determining a first reference area in the subject area, the first reference area being a target area for the relighting process, the first reference area being close in size to the subject area and smaller than the subject area; a second determination step of determining a second reference area having a size close to and larger than the subject area in order to determine an area to be subjected to the contrast correction process; 13. An image processing method comprising:

8. A program for causing a computer to function as each of the means of the image processing apparatus according to any one of claims 1 to 5.

9. 6. A computer-readable storage medium storing a program for causing a computer to function as each of the means of the image processing apparatus according to claim 1.

Citation Information

Patent Citations

  • Image processing method, image processing device, program, and storage medium

    JP2004021374A

  • Image processing device, image processing method, program, and storage medium

    JP2014153959A

  • Image processing device, image processing method and program

    JP2017084093A

  • Image processing device, control method thereof, program, and recording medium

    JP2018067190A

  • Image processing apparatus, control method of the same, program, and storage medium

    JP2018182700A