Information processing device, imaging device, control method and program

The information processing device dynamically adjusts virtual light source positions based on relative positional relationships and subject orientations to ensure effective lighting across multiple images, addressing the impracticality of manual adjustments in existing relighting technologies.

JP7565762B2Active Publication Date: 2024-10-11CANON KK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2020190565
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-11-16
Publication Date
2024-10-11
Estimated Expiration
2040-11-16

AI Technical Summary

Technical Problem

Existing relighting processing technologies struggle to achieve suitable lighting effects across multiple captured images due to varying compositions and poses of subjects, requiring manual adjustment of virtual light sources for each image, which is impractical.

Method used

An information processing device and method that determines the relative positional relationship between a target subject and a virtual light source, adjusts the orientation of the subject, and dynamically changes the virtual light source placement to ensure effective lighting effects through relighting processing.

Benefits of technology

The solution allows for the arrangement of virtual light sources that achieve suitable lighting effects by adjusting their positions based on the determined effectiveness, enhancing the brightness of dark areas in captured images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007565762000004
    Figure 0007565762000004
  • Figure 0007565762000005
    Figure 0007565762000005
  • Figure 0007565762000006
    Figure 0007565762000006
Patent Text Reader

Abstract

To provide an information processing apparatus, an imaging apparatus, a control method, and a program for arranging a virtual light source that achieves suitable lighting effects through relighting processing.SOLUTION: An imaging apparatus has: first acquisition means that acquires relative relationship information determined with reference to a front face of a target subject and indicating the relative positional relationship between the target subject and a virtual light source; second acquisition means that acquires information on the direction of the target subject with respect to an imaged target direction for a picked-up image; setting means that, based on the relative relationship information acquired by the first acquisition means and the information on the direction of the target subject acquired by the second acquisition means, sets a temporary arrangement position of the virtual light source for relighting processing; determination means that determines the effectiveness of the relighting processing performed with the virtual light source being set to the temporary arrangement position; and control means that, based on a result of determination, controls whether to set the arrangement position of the virtual light source when the relighting processing is performed to the temporary arrangement position or whether to change to an arrangement position different from the temporary arrangement position.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an information processing device, an imaging device, a control method, and a program, and more particularly to a technique for imparting the effect of arranging a virtual light source to a captured image. [Background technology]

[0002] There is known a technology (hereinafter referred to as relighting processing) that corrects the brightness of dark areas without creating an unnatural feeling by applying a three-dimensional lighting effect in which a virtual light source is arranged to the image of a subject appearing in a captured image. In such relighting processing, a user may specify the three-dimensional arrangement position (light source position) of the virtual light source, but when there are many captured images to which the relighting processing is to be applied, it is not realistic for the user to set the light source position for each of them. Patent Document 1 discloses a method that simplifies the setting by adopting the relative positional relationship between the subject and the virtual light source applied in the relighting processing for one captured image in the relighting processing for other captured images. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2018-010498 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, the composition of the image and the posing of the subject can take various forms between captured images, and even if a virtual light source that shows the same relative positional relationship as that adopted for a specific captured image is used, it may not be possible to obtain a suitable lighting effect.

[0005] An object of the present invention is to provide an information processing device, an imaging device, a control method, and a program that perform a relighting process to arrange a virtual light source to realize a suitable lighting effect. [Means for solving the problem]

[0006] In order to achieve the above-mentioned object, the information processing device of the present invention is an information processing device that sets a virtual light source for a relighting process to be applied to an image of a target subject included in a captured image, and is characterized by having: a first acquisition means for acquiring relative relationship information indicating a relative positional relationship between the target subject and a virtual light source, determined based on a front of the target subject as a reference; a second acquisition means for acquiring information on the orientation of the target subject relative to an imaged direction for the captured image; a setting means for setting a provisional position of the virtual light source for the relighting process based on the relative relationship information acquired by the first acquisition means and the orientation information of the target subject acquired by the second acquisition means; a determination means for determining the validity of the relighting process that is performed by setting the virtual light source at the provisional position; and a control means for controlling, based on a result of the determination by the determination means, whether to set the position of the virtual light source for the relighting process to the provisional position or to change it to a position different from the provisional position. Effect of the Invention

[0007] With this configuration, the present invention makes it possible to arrange virtual light sources so that a suitable lighting effect can be achieved by the relighting process. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1 is a block diagram showing the functional configuration of a digital camera 100 according to an embodiment and a modification of the present invention. [Diagram 2] FIG. 1 is a block diagram showing a module configuration of an image processing unit 106 according to an embodiment and a modification of the present invention. [Diagram 3] 1 is a flowchart illustrating a generation process performed by the image processing unit 106 according to the first embodiment of the present invention. [Figure 4] FIG. 13 is a diagram for explaining the setting of the arrangement position of a virtual light source in the generation process according to the embodiment and modified example of the present invention. [Diagram 5]FIG. 11 is another diagram for explaining the setting of the arrangement position of a virtual light source in the generation process according to the embodiment and modified example of the present invention. [Figure 6] FIG. 11 is yet another diagram for explaining the setting of the arrangement position of a virtual light source in the generation process according to the embodiment and modified example of the present invention. [Figure 7] 11 is a flowchart illustrating a generation process performed by the image processing unit 106 according to the second embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] [Embodiment 1] 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.

[0010] In the embodiment described below, an example in which the present invention is applied to a digital camera capable of applying relighting processing to a captured image will be described as an example of an image capturing device. However, the present invention can be applied to any device capable of setting virtual light source conditions for relighting processing performed on a captured image.

[0011] Configuration of Digital Camera 100 FIG. 1 is a block diagram showing the functional configuration of a digital camera 100 according to this embodiment.

[0012] The control unit 101 is an arithmetic device such as a microcomputer or a CPU, and controls the operation of each block of the digital camera 100. More specifically, the control unit 101 reads out the operation programs of each block recorded on the recording medium 102, expands them in the memory 103, and executes them to control the operation of each block.

[0013] The recording medium 102 is a recording device, such as a non-volatile memory, configured to be able to permanently hold and rewrite data. The recording medium 102 records parameters and the like required for the operation of each block in addition to the operating programs of each block included in the digital camera 100. The recording medium 102 may also include a recording device, such as a memory card, detachable from the digital camera 100, for recording captured images, associated data associated with the captured images, and image data generated by applying image processing.

[0014] On the other hand, the memory 103 is a recording device configured to be capable of temporarily storing data, such as a volatile memory, and functions as an area for loading control programs for the operations of each block of the digital camera 100. The memory 103 is also used as a temporary storage area for intermediate data output by the operations of each block. In this embodiment, the control unit 101 and an image processing unit 106, which will be described later, use the memory 103 as a work memory.

[0015] The imaging unit 104 is an imaging element such as a CCD image sensor or a CMOS image sensor. The imaging unit 104 photoelectrically converts an optical image formed on the imaging surface of the imaging element by an imaging optical system (not shown) to obtain an analog image signal. The imaging unit 104 also applies A / D conversion processing to the obtained analog image signal, and outputs digital image data (hereinafter simply referred to as a captured image).

[0016] The configuration unit 105 configures a distance map showing the distribution of distances (distances in the imaging direction) between the digital camera 100 and the subject included in the imaging range where the imaging unit 104 has captured an image. The distance map may be, for example, two-dimensional information having a pixel structure similar to that of the captured image, and information on the distance to the subject of the corresponding pixel in the captured image may be stored in each pixel. The configuration unit 105 may configure a distance map corresponding to the captured image based on, for example, the output of an external sensor provided in the digital camera 100, or may configure the distance map by performing stereo matching on a plurality of captured images that have a parallax relationship. Alternatively, the configuration unit 105 may obtain the distance distribution of the subject at the time of capturing an image by other methods and configure the distance map. The distance map configured by the configuration unit 105 is recorded in the recording medium 102 in association with the corresponding captured image.

[0017] The distance map is referred to in relighting processing for a captured image associated with the distance map in order to grasp at least the three-dimensional shape of a subject to be processed (hereinafter referred to as a target subject). Note that, in this embodiment, the three-dimensional shape of the target subject is described as being grasped based on the distance map, but the present invention is not limited to this, and it goes without saying that the grasp may be based on other information.

[0018] The image processing unit 106 applies various image processing including relighting processing to the captured image. More specifically, the image processing unit 106 applies image processing to the captured image expanded in the memory 103, and writes and records the processed image data on the recording medium 102. The image processing performed by the image processing unit 106 may include, for example, processing performed when recording the captured image, such as white balance adjustment, color interpolation, and reduction / enlargement, as well as other processing.

[0019] The display control unit 107 controls the presentation of information via the display unit 110. The display unit 110 is, for example, a display device such as an LCD, and displays various information related to the use of the digital camera 100. When the digital camera 100 is operating in an imaging mode, the display control unit 107 realizes the function of a digital viewfinder by displaying (through display) a captured image output by the imaging unit 104. When the digital camera 100 is operating in a viewing mode, the display control unit 107 realizes the display of a captured image recorded on the recording medium 102 and an image obtained by applying image processing.

[0020] The operation input unit 108 includes a user interface such as a release switch, a setting button, a mode setting dial, and the like, and when it detects an operation input made by a user, it outputs a control signal corresponding to the operation input to the system control unit 101. In addition, in an aspect in which the display unit 110 is equipped with a touch panel sensor, the operation input unit 108 also functions as an interface that detects a touch operation made to the display unit 110.

[0021] In this embodiment, the processing is described as being realized by circuits and processors corresponding to each block of the digital camera 100 as hardware. However, the embodiment of the present invention is not limited to this, and the processing of each block may be realized by a program that performs the same processing as that of the block. In other words, the present invention is not limited to an aspect realized by a circuit (image processing unit 106) incorporated in an imaging device as exemplified in this embodiment, but also includes an aspect realized by executing a corresponding application program in an information processing device such as a general-purpose PC.

[0022] <Functional configuration related to relighting processing> Next, a functional configuration relating to the relighting process implemented by the image processing unit 106 of this embodiment will be described.

[0023] The relighting process according to this embodiment is basically a function that can provide a fixed lighting effect based on a virtual light source arranged at a fixed relative position based on the front of the target subject. That is, once the position and orientation of the target subject are determined for the captured image, the corresponding function of the image processing unit 106 can apply the relighting process by arranging a virtual light source at a fixed position in the virtual space. In other words, the function does not require the setting of an individual virtual light source for each of the multiple captured images selected as the application target, and can set the virtual light source by inheriting, for example, the relative positional relationship of the virtual light source set for one of the captured images.

[0024] On the other hand, with such a setting method, depending on the orientation of the target subject, there is a possibility that an output image with a suitable lighting effect cannot be obtained, for example, the surface illuminated by the virtual light source may not appear in the captured image, or even if it appears, it may be small, etc. Therefore, image processing unit 106 of this embodiment determines the effectiveness of the relighting process when the arrangement position of the virtual light source is set based on a predetermined relative positional relationship, and changes (resets) the arrangement position of the virtual light source as necessary based on the determination result.

[0025] In the following explanation, it is assumed that, for the relighting process, two types of Cartesian coordinate systems with the target subject as the origin are defined for a three-dimensional space in which a model (or point cloud) showing the shape of the target subject and a virtual light source are virtually arranged.

[0026] One Cartesian coordinate system is determined based on the positional relationship between the target subject and the digital camera 100 at the time of imaging, and is referred to as an "absolute coordinate system" in this specification. The absolute coordinate system is configured with the axis connecting the target subject and the digital camera 100 as the z-axis, the axis corresponding to the vertical direction of the real world (imaging environment) as the y-axis, and the axis perpendicular to the y-axis as the x-axis in a plane perpendicular to the z-axis of the target subject's position. Here, the axis corresponding to the vertical direction of the real world is an axis passing through the orthogonal point formed by projecting a vector indicating the vertical direction onto a plane perpendicular to the z-axis. The z-axis is a so-called right-handed system in which the direction from the target subject toward the digital camera 100, the y-axis is a vertical upward direction, and the x-axis is a right direction as viewed from the imaging direction. In one aspect, the positive direction of the z-axis of the absolute coordinate system indicates the direction of the digital camera 100 as viewed from the target subject, and is hereinafter also referred to as the imaging direction of the target subject.

[0027] The other Cartesian coordinate system is determined based on the orientation (posture) of the target subject, and is referred to as a "relative coordinate system" in this specification. The relative coordinate system is configured with the axis pointing in the front direction of the target subject as the z-axis, the axis corresponding to the upward direction defined for the target subject as the y-axis on a plane perpendicular to the z-axis at the position of the target subject, and the axis perpendicular to the y-axis as the x-axis. The z-axis is configured as a right-handed system in which the z-axis is the forward direction, the y-axis is the upward direction, and the x-axis is the right direction as viewed from the front of the target subject.

[0028] In addition, any direction in both coordinate systems is defined by a rotation angle around an axis, and the rotation angle around the x-axis is expressed with a sign indicating that the positive rotation direction is counterclockwise when viewed in the positive direction of the x-axis, and the rotation angle around the y-axis is expressed with a sign indicating that the positive rotation direction is clockwise when viewed in the positive direction of the y-axis. In this embodiment, the direction from the target subject toward digital camera 100 in the absolute coordinate system and the front direction of the target subject in the relative coordinate system are the z-axis, so that rotation around the x-axis indicates the pitch angle (hereinafter, the elevation / depression angle) and rotation around the y-axis indicates the yaw angle (hereinafter, the azimuth angle).

[0029] Fig. 2 is a block diagram showing the module configuration of the relighting process of this embodiment realized by the image processing unit 106. Fig. 2 shows the functions realized by executing the relighting process separated into modules for convenience, and does not limit the circuit configuration of the image processing unit 106 to separating these modules into individual microchips or processors.

[0030] The reading module 201 reads a captured image to which relighting processing is to be applied and a distance map associated with the captured image from the recording medium 102. The reading module 201 expands the read information in the working memory 208. As described above, the relighting processing of the present embodiment may be applied to a plurality of captured images, and the reading module 201 performs an operation of reading the corresponding captured images in order until processing is completed for all of the captured images to which relighting processing is to be applied.

[0031] The reading module 201 also acquires relative relationship information, which is information used to specify the arrangement position of a virtual light source that is provisionally set for a series of captured images to which the relighting process is to be applied, and expands the information in the working memory 208. In this embodiment, the relative relationship information is described as being configured to include information on the distance from the target subject to the provisionally set virtual light source and the angle with respect to the front direction of the target subject (azimuth angle and elevation / depression angle in the relative coordinate system). In other words, the relative relationship information in this embodiment is configured to include a polar coordinate expression (radius and two types of deflection angles) of the arrangement position of the virtual light source in the relative coordinate system. The relative relationship information may be configured based on, for example, a numerical input or the like made by the user prior to the execution of the relighting process, or may be configured based on a lighting condition selected from among preset lighting conditions. The provisionally set virtual light source is a virtual light source set as an initial setting for the relighting process to be applied to each captured image, and is adopted for the process as it is depending on the determination result of the determination module 204 described later.

[0032] The detection module 202 detects an image of a target subject included in a captured image to which the detection module 202 is applied and which is deployed in the working memory 208. The detection of the image of the target subject may be performed by extracting a specific pattern by image analysis, or may be performed by referring to a detection result performed when the captured image is captured, if such a detection result exists. Alternatively, when a user performs an operation input related to the selection of a target subject, the detection module 202 may identify the image of the target subject based on the selection. In the following, the detection module 202 is described as detecting a human face as a target subject, but the implementation of the present invention is not limited to this, and it will be easily understood that other types of subjects may be used as the target subject.

[0033] Furthermore, the detection module 202 derives the orientation of the detected target subject (the forward direction of the target subject (person's face)). Here, the orientation of the target subject is determined based on an absolute coordinate system and is expressed by the angle (azimuth angle) between the z axis and the projection vector of the vector indicating the forward direction of the target subject onto the xz plane, and the angle (elevation / depression angle) between the z axis and the projection vector onto the yz plane. That is, when the target subject is captured facing the digital camera 100 (when the captured direction coincides with the forward direction of the target subject), the azimuth angle is 0 degrees and the elevation / depression angle is 0 degrees. When the target subject is captured in any other state, the deviation angle from the z axis is expressed with a sign. The orientation of the target subject may be derived by, for example, image analysis of the captured image to which the target is applied, or by referring to normal information obtained based on a distance map associated with the captured image.

[0034] Setting module 203 sets various parameters for a virtual light source used in relighting processing of a target subject. The parameters of the virtual light source may include the type, color temperature, intensity, etc. of the virtual light source in addition to the arrangement position of the virtual light source. In the following explanation, in order to simplify the explanation of the determination of the effectiveness of the virtual light source according to this embodiment, the virtual light source will be explained as a point light source that illuminates in all directions. Setting module 203 derives a provisional arrangement position (initial setting position) of a virtual light source for one target subject as coordinate values ​​of an absolute coordinate system based on the information on the orientation of the target subject and the relative relationship information derived by detection module 202.

[0035] The determination module 204 determines the validity of the relighting process to be performed. In this embodiment, the relighting process that is the subject of the determination by the determination module 204 is a relighting process that is performed by placing a virtual light source at an initial setting position. The determination module 204 outputs information on the obtained determination result to the change module 205.

[0036] Depending on the input determination result, change module 205 controls whether or not to have setting module 203 change the setting of the virtual light source. More specifically, when change module 205 determines that the effectiveness of the relighting process performed by placing a virtual light source at an initial setting position does not satisfy a predetermined criterion, change module 205 causes setting module 203 to re-set the placement position of the virtual light source. Conversely, when change module 205 determines that the effectiveness of the relighting process satisfies the predetermined criterion, change module 205 causes setting module 203 to determine the initial setting position as the final placement position of the virtual light source.

[0037] The relighting module 206 applies a lighting effect to the image of the target subject included in the captured image to which the relighting process is to be applied by executing a relighting process with the setting of the virtual light source set by the setting module 203. The relighting process applied by the relighting module 206 may be performed by deriving and replacing the pixel value after the lighting effect is applied by the virtual light source for each pixel in the area in which the image of the target subject appears. Here, the relighting process of this embodiment aims to increase the brightness of the dark part of the target subject, and realizes a lighting effect in which the light irradiated by the virtual light source is diffusely reflected (uniformly reflected in all directions) on the surface of the target subject. In this case, the lighting effect for any pixel is proportional to the cosine (inner product) of the angle θ between the normal of the surface corresponding to the pixel in the three-dimensional space in which the shape of the target subject is developed and the vector from the virtual light source toward the surface, and is expressed in inverse proportion to the square of the distance D from the virtual light source to the surface. Therefore, for example, when the pixel to be processed has a pixel value (Rin, Gin, Bin), the pixel value (Rout, Gout, Bout) after the application is It can be expressed as JPEG0007565762000001.jpg5087, where A is a coefficient that changes according to cosθ, (Rv, Gv, Bv) is the light source reflection color defined for the virtual light source, and M is a normalization coefficient for normalizing the pixel value after application. However, the arithmetic expression for the relighting process in implementing the present invention is not limited to this, and may be derived using other arithmetic expressions.

[0038] The write module 207 writes out and records the image (result image) obtained by applying the relighting process by the relighting module 206 onto the recording medium 102. When writing out the result image, the write module 207 may associate information on the setting of a virtual light source in the applied relighting process with the result image so that the information can be referenced after recording.

[0039] <<Generation Process>> Hereinafter, the content of the generation process for generating an image resulting from application of relighting processing to a specific subject, which is realized by the image processing unit 106 of this embodiment having such a module configuration, will be specifically described with reference to the flowchart in Fig. 3. The control unit 101 can cause the image processing unit 106 to perform the process corresponding to the flowchart by, for example, reading out a corresponding processing program stored in the recording medium 102, expanding it in the memory 103, and executing it. This generation process will be described as being started when, for example, multiple captured images are selected as application targets, and relative relationship information is configured for the multiple captured images by inputting information on the initial setting positions of the virtual light source. That is, prior to execution of the generation process according to this flowchart, the relative relationship information is stored in the working memory 208.

[0040] In S301, the reading module 201 identifies a captured image to which relighting processing has not been applied from among a plurality of captured images to which relighting processing is to be applied, reads it as a captured image to be processed (target image), and develops it in the working memory 208.

[0041] In S302, the detection module 202 detects an image of a target subject in the target image. In this embodiment, in order to facilitate understanding of the invention, it is assumed that only one image of a target subject appears in each captured image, but the implementation of the present invention is not limited to this. When images of multiple target subjects appear, for example, the image with the largest number of pixels in the target image may be set as the image of the target subject, or the user may be requested to select which target subject to apply the relighting process to. Alternatively, when the target subject is a person, the person may be recognized, and only the image corresponding to the person selected in advance may be detected.

[0042] In addition, in this step, the detection module 202 derives the orientation of the detected target subject. As described above, the orientation of the target subject may be derived by referring to information on a distance map associated with the target image.

[0043] In S303, setting module 203 performs initial setting of the virtual light source. This initial setting includes provisionally setting the arrangement position of the virtual light source to an initial setting position, and setting module 203 derives coordinate values ​​of the absolute coordinate system of the virtual light source based on the relative relationship information. Here, when the relative relationship information specifies that lighting is to be performed from a position with an azimuth angle α, an elevation / depression angle β, and a distance D with respect to the front direction of the target subject, the coordinate values ​​(light_x, light_y, light_z) of the relative coordinate system of the initial setting position are expressed as follows: JPEG0007565762000002.jpg2773. Then, the setting module 203 performs coordinate conversion from the relative coordinate system to the absolute coordinate system using a rotation matrix based on the orientation of the target subject detected in S302, and obtains coordinate values ​​in the absolute coordinate system of the virtual light source.

[0044] In S304, determination module 204 determines the validity of the relighting process using the virtual light source set in S303. In this embodiment, in order to simplify the calculations involved in determining the validity, determination module 204 determines whether the validity of the relighting process to be performed satisfies a predetermined criterion based on the location of the initial setting position. More specifically, determination module 204 determines the validity of the relighting process based on the virtual light source at the initial setting position based on the positional relationship between the initial setting position of the virtual light source and the target subject in the absolute coordinate system.

[0045] Here, when the virtual light source is placed in front of the target subject (on the digital camera 100 side), the light emitted from the virtual light source is mainly reflected by the surface (front surface) of the target subject that appears in the resultant image. Therefore, in terms of the number of pixels that appear in the resultant image to which the lighting effect is applied (brightness correction is performed), the relighting process performed on the virtual light source can be said to be highly effective. On the other hand, when the virtual light source is placed at a position farther away from the target subject as viewed from the digital camera 100, the light emitted from the virtual light source is mainly reflected by the surface (back surface) of the target subject that does not appear in the resultant image. Therefore, it is difficult to say that the relighting process performed on the virtual light source is highly effective. Therefore, the determination module 204 of this embodiment determines the effectiveness based on whether the virtual light source is behind the target subject, that is, whether the z coordinate in the absolute coordinate system of the initial setting position is a negative value. More specifically, if the z coordinate in the absolute coordinate system of the initial setting position is a negative value, the determination module 204 determines that the effectiveness of the relighting process to be performed does not satisfy a predetermined criterion, and if the z coordinate is 0 or greater, it determines that the predetermined criterion is satisfied.

[0046] As a specific example of this determination, a case where the relative relationship information specifies that the face of a person, which is a target subject, is illuminated from a direction of an azimuth angle of -60 degrees will be described with reference to the drawings. For example, as shown in FIG. 4(a), when a target image is captured in a state in which the target subject 400 faces leftward (at an azimuth of +45 degrees) with respect to the digital camera 100, the target subject and the front direction are specified in a state as shown in FIG. 4(b) in the xz space of the absolute coordinate system. Then, the initial setting position 401 of the virtual light source defined based on the relative relationship information is a position that forms -15 degrees with respect to the z axis in the same xz space as shown in FIG. 4(c). In this case, since the initial setting position in the absolute coordinate system is in front of the target subject, that is, a position closer to the digital camera 100 than the target subject, the determination module 204 determines that the validity of the relighting process related to the virtual light source satisfies a predetermined criterion.

[0047] On the other hand, for example, as shown in Fig. 5(a), when a target image is captured with target subject 500 facing rightward (at an orientation of -45 degrees) with respect to digital camera 100, the target subject and the front direction are defined in the xz space of the absolute coordinate system in the state shown in Fig. 5(b). Then, the initial setting position 501 of the virtual light source defined based on the relative relationship information is a position that forms -105 degrees with respect to the z axis in the same xz space as shown in Fig. 5(c). In this case, since the initial setting position in the absolute coordinate system is deeper than the target subject, that is, a position farther away from digital camera 100 than the target subject, determination module 204 determines that the validity of the relighting process related to the virtual light source does not satisfy a predetermined criterion.

[0048] In this embodiment, since the absolute coordinate system and the relative coordinate system have their origins at a common position, the determination can be made simply based on the angle in the example shown in Fig. 4 and Fig. 5, but the implementation of the present invention is not limited to such an example. In other words, if the origin of the relative coordinate system is defined differently from that of the absolute coordinate system, it goes without saying that the determination is made taking into consideration the distance between the virtual light source and the target subject.

[0049] In S305, change module 205 determines whether or not to change the arrangement position of the virtual light source based on the determination result made in S304. If the determination result indicates that the validity of the relighting process related to the virtual light source arranged at the initial setting position satisfies a predetermined criterion, change module 205 determines not to change the arrangement position of the virtual light source and moves the process to S308. That is, in this case, setting module 203 receives information to that effect from change module 205 and determines (mainly sets) the arrangement position of the virtual light source to the initial setting position for the relighting process performed by relighting module 206. Also, if the determination result indicates that the validity of the relighting process related to the virtual light source arranged at the initial setting position does not satisfy the predetermined criterion, change module 205 determines to change the arrangement position of the virtual light source and moves the process to S306.

[0050] In S306, the change module 205 judges whether the target subject is a subject having a plane-symmetric shape. In this embodiment, in order to detect a person's face as the target subject, the plane passing through the midline of the face is set as a symmetry plane, and the target subject is treated as having a plane-symmetric shape, and the change module 205 moves the process to S307. Note that even in a mode in which a subject other than a person's face is the target subject, for a subject whose shape symmetry is known in advance, the judgment in this step may be made based on which type the detected subject corresponds to. Alternatively, a three-dimensional shape may be constructed based on a distance map, and the presence or absence of symmetry may be judged based on the three-dimensional shape. At this time, if the change module 205 judges that the target subject is not a subject having a plane-symmetric shape, the change module 205 has the setting module 203 determine the arrangement position of the virtual light source at the initial setting position, and moves the process to S308.

[0051] In S307, the change module 205 derives a new arrangement position of the virtual light source and makes the setting module 203 set it. In this embodiment, the change module 205 derives a position that is plane-symmetrical to the initial setting position via a symmetry plane related to the shape of the target subject as the arrangement position of the new virtual light source. For example, when the target subject and the initial setting position are in the state shown in FIG. 5(c), the change module 205 derives a symmetrical position 601 shown in FIG. 6(a) as the arrangement position of the new virtual light source. In other words, the arrangement position of the new virtual light source becomes a coordinate obtained by inverting the positive and negative of the azimuth angle in an arithmetic expression for deriving the three-dimensional coordinate of the initial setting position in the relative coordinate system. When the setting module 203 receives information on the arrangement position of the new virtual light source together with a change instruction from the change module 205, the setting module 203 updates the setting of the virtual light source based on the information, changes the arrangement position, and completes this setting.

[0052] In S308, relighting module 206 applies relighting processing to the target subject based on the virtual light source set by setting module 203, and generates a resultant image. The relighting processing performed in this step is performed based on the changed virtual light source if the position of the virtual light source has been reset in S307, and is performed based on the virtual light source set in S303 if not.

[0053] In S309, the write module 207 writes the resultant image generated by the relighting module 206 onto the recording medium 102. At this time, the write module 207 records information on the settings of the virtual light source used in the generation in association with the resultant information.

[0054] In S310, the reading module 201 judges whether or not there is a captured image to which the relighting process has not been applied among the multiple captured images to which the relighting process has been applied. If the reading module 201 judges that there is a captured image to which the relighting process has not been applied, the process returns to S301. If the reading module 201 judges that there is no captured image to which the relighting process has not been applied, the process ends.

[0055] As described above, according to the imaging device of the present embodiment, in the relighting process, a virtual light source can be arranged so as to realize a suitable lighting effect. More specifically, in a mode in which a virtual light source is set at a position showing a certain relative relationship with a target subject and the relighting process is applied, if it is determined that the effectiveness does not satisfy a predetermined criterion, the light source position can be adaptively re-set and the relighting process can be executed.

[0056] In this embodiment, an aspect has been described in which an image of one target subject is identified for one target image and relighting processing is performed, but it is also possible to detect images of multiple target subjects and set and determine a virtual light source and perform relighting processing for each of them.

[0057] [Variation 1] In the above-described first embodiment, a mode has been described in which it is determined that the effectiveness of the relighting process does not satisfy a predetermined criterion when the initial setting position of the virtual light source is deeper than the target subject in a coordinate system including an axis connecting the target subject and the digital camera 100. However, the implementation of the present invention is not limited to this, and the determination of whether the predetermined criterion is satisfied may be made by comparing the depth value (z coordinate value in the absolute coordinate system) of the initial setting position with a predetermined threshold value that is not 0. In other words, it may be determined that the predetermined criterion is satisfied when the depth value of the initial setting position exceeds the threshold value, and that the predetermined criterion is not satisfied when the depth value is below the threshold value.

[0058] For example, in the aspect illustrated in FIG. 5, if the distance between the virtual light source and the target subject is 10, the absolute coordinates (light_x', light_y', light_z') of the initial setting position are JPEG0007565762000003.jpg27137. Here, in the aspect where the threshold value is set to z=-5, the change module 205 does not allow the setting module 203 to change the arrangement position, so that the relighting process by the relighting module 206 is performed based on the initially set position.

[0059] [Variation 2] In the above-mentioned embodiment 1 and modification 1, the determination of whether the effectiveness of the relighting process satisfies a predetermined criterion has been described as being performed based on the z coordinate of the initial setting position, but the implementation of the present invention is not limited to this. The determination of the effectiveness may be performed based on the azimuth angle of a vector indicating the initial setting position in an absolute coordinate system. The determination module 204 may determine that the effectiveness of the relighting process does not satisfy the predetermined criterion when the absolute value of the azimuth angle determined in the range of -180 degrees to +180 degrees exceeds, for example, 120 degrees. In this case, in the aspect illustrated in FIG. 5, since the azimuth angle of the vector indicating the initial setting position is -105 degrees, the determination module 204 determines that the effectiveness of the relighting process satisfies the predetermined criterion. Note that, in this modification, the aspect in which a threshold value is set for the absolute value of the azimuth angle has been described, but the aspect in which the predetermined criterion is not satisfied or is satisfied may be determined for a predetermined azimuth angle range.

[0060] [Variation 3] In the above-described embodiment and modified example, it has been described that the determination of whether the effectiveness of the relighting process satisfies a predetermined criterion is made after deriving the absolute coordinates of the initial setting position of the virtual light source determined by the relative relationship information, but the implementation of the present invention is not limited to this. When the relative relationship information is configured based on the setting of the virtual light source used in the relighting process for another captured image and the initial setting of the virtual light source for the target image is performed using this, the above determination may be made based on the orientation of the target subject in both images.

[0061] For example, a case will be described in which the target subject faces the left of the digital camera 100 in the former image as shown in Fig. 4(a) and faces the right of the latter image as shown in Fig. 5(a). In this case, if a virtual light source is set to suitably illuminate the front surface of the former image (the surface facing the digital camera 100), a suitable resultant image may not be obtained even if a virtual light source with a similar relative relationship is set in the latter image in which the illuminated surface is less likely to appear. Therefore, the determination module 204 may determine that the effectiveness of the relighting process does not satisfy a predetermined criterion when, for example, the azimuth angle of the target subject in the former image is different from the azimuth angle of the target subject in the latter image in positive and negative.

[0062] [Embodiment 2] In the above-described embodiment and modified example, a relighting process is executed after the final placement position of the virtual light source is determined, and then the resultant image is recorded. However, the present invention is not limited to this. For example, when determining the placement position of the virtual light source, images obtained by applying the relighting process to each of a plurality of types of virtual light sources having different positions (hereinafter, referred to as trial images and distinguished from resultant images) may be generated, and the final placement position of the virtual light source may be determined.

[0063] <<Generation Process>> Hereinafter, the content of the generation process realized by the image processing unit 106 of this embodiment for generating an image as a result of applying relighting processing to a specific subject will be specifically described with reference to the flowchart in Fig. 7. The control unit 101 can cause the image processing unit 106 to perform the process corresponding to the flowchart by, for example, reading out a corresponding processing program stored in the recording medium 102, expanding it in the memory 103, and executing it. This generation process will be described as being started when, for example, a plurality of captured images are selected as application targets, and relative relationship information is configured for the plurality of captured images by inputting information on the initial setting positions of the virtual light source.

[0064] In the description of the generation process of this embodiment, steps that perform the same processes as those in the generation process of embodiment 1 are given the same reference numbers and their description is omitted, and only steps that perform processes unique to this embodiment will be described below. Also, as in embodiment 1, the target subject detected by detection module 202 is assumed to be a human face, and will be described as having a plane-symmetric shape with the plane passing through the midline of the face as the plane of symmetry.

[0065] When the image of the target subject is detected and the orientation of the target subject is derived in S302, the setting module 203 provisionally sets the arrangement positions of two types of virtual light sources (sets them as comparison candidates for the actual setting) in S701. Here, of the two arrangement positions set in this step, one is an arrangement position based on relative relationship information (initial setting position), and the other is an arrangement position that is plane-symmetric to the initial setting position via the symmetry plane of the target subject (hereinafter referred to as a candidate position).

[0066] In S702, the relighting module 206 applies relighting processing to the target image, in which a virtual light source is placed at an initial setting position and a candidate position, and generates two types of trial images.

[0067] In S703, the determination module 204 determines whether the effectiveness of the relighting process is higher when the virtual light source is placed at the initial setting position or the candidate position, based on the two types of trial images generated in S702. Here, the effectiveness of the relighting process may be quantified, for example, by the sum of the brightness correction amounts (amounts of change from pixel values ​​of the target image) or by the total number of pixels whose correction amounts are equal to or greater than a threshold. That is, in this step, the determination module 204 quantifies and compares the illumination effects applied to the two types of trial images to determine whether the effectiveness of the relighting process is higher when the virtual light source is placed at the initial setting position or the candidate position. If the determination module 204 determines that the effectiveness of the relighting process is higher when the virtual light source is placed at the initial setting position, the process proceeds to S704, and if the determination module determines that the effectiveness of the relighting process is higher when the virtual light source is placed at the candidate position, the process proceeds to S705.

[0068] In this embodiment, the effectiveness is determined based on the amount of lighting effect, but the present invention is not limited to this. For example, other criteria may be used, such as determining that a trial image that provides a more natural expression is effective based on the continuity of luminance changes in the trial image.

[0069] In S704, the write module 207 writes out, as a resultant image, a trial image obtained by the relighting process in which the virtual light source is placed at the initial setting position, from among the trial images generated by the relighting module 206, onto the recording medium 102. At this time, the write module 207 records information on the setting of the virtual light source used during generation (including the fact that the placement position is the initial setting position) in association with the resultant information.

[0070] On the other hand, if it is determined in S703 that placing a virtual light source at the candidate position results in a more effective relighting process, then in S705 the write module 207 writes out the trial image obtained by the relighting process related to the candidate position as a result image onto the recording medium 102. At this time, the write module 207 records information on the settings of the virtual light source used in the generation (including the fact that the placement position is the candidate position) in association with the result information.

[0071] In this way, the effectiveness of the relighting process can be judged based on the trial image, and a result image in a more suitable form can be output. Note that, in the present embodiment, the relighting process of the writing quality is executed for each of the initial set position and the candidate position prior to the judgment, and then two types of trial images are obtained, and then the judgment is performed. However, the present invention is not limited to this embodiment. For example, it is possible to use an image obtained by applying the relighting process to a limited area of ​​the target subject for the judgment, or to make the judgment using only the calculation result of the pixel value (or the value before normalization) without generating an image.

[0072] [Variation 4] In the above-mentioned second embodiment, the effectiveness of the relighting process is determined by quantifying the lighting effect for each of the positions of the two types of virtual light sources, but the implementation of the present invention is not limited to this. For example, the lighting effect may be quantified only for the virtual light source at the initial setting position, and if the value does not meet a predetermined threshold, the change module 205 may be configured to change the position of the virtual light source. In other words, the setting may be changed without evaluating the lighting effect for the position after the change of the virtual light source.

[0073] [Variation 5] In the above-mentioned embodiment and modified example, the arrangement position of the virtual light source different from the initial setting position is determined to be a position that is plane-symmetrical to the initial setting position via a symmetry plane, but the present invention is not limited to this. When the virtual light source is arranged at a plane-symmetrical position, the positional relationship between the target subject and the virtual light source may change drastically depending on the relative relationship information, so that an image may be output in which an illumination effect is applied to an unintended part of the target subject. For this reason, the arrangement position of the virtual light source different from the initial setting position may be determined so that the positive and negative x coordinates in the absolute coordinate system are the same as those of the initial setting position. For example, when the initial setting position of the virtual light source is 501 in FIG. 5(c), as shown in FIG. 6(b), the z coordinate may be determined to be 0 or more by changing the azimuth angle with respect to the front direction of the target subject while maintaining the distance between the target subject and the virtual light source. In the example of FIG. 6(b), the arrangement position is determined to be position 602 (position where the azimuth angle is +15 degrees: position where the azimuth angle is -90 degrees) where the azimuth angle is changed so that the z coordinate is 0. Alternatively, the z-coordinate value of the absolute coordinates of the initial setting position may simply be set to 0, so that the position is simply determined to be not deeper than the target subject.

[0074] [Variation 6] In the above-described embodiment and modified example, the arrangement position of the virtual light source different from the initial setting position is described as being derived by a predetermined method, but the implementation of the present invention is not limited to this. The arrangement position of the different virtual light source may be determined by specifying an arrangement position where the effectiveness of the relighting process is estimated to be higher than when the virtual light source is arranged at the initial setting position, based on, for example, the shape of the target subject or the distribution of shadows in the target image.

[0075] [Variation 7] However, when a virtual light source is placed at a position not based on the relative relationship information, the direction of the target subject illuminated by the virtual light source may overlap with the direction of the ambient light when the target image is captured. In essence, the application of a relighting process is expected to increase the brightness of dark areas, but if a further lighting effect is applied by the relighting process to a part of the target subject that is already illuminated by ambient light, the resulting image may not be in a state desired by the user. Therefore, when changing the placement position of the virtual light source from the initial setting position, the change module 205 may obtain the direction of the ambient light for the target image, and may control not to change the position if the similarity between the direction from the changed virtual light source toward the target subject and the direction of the ambient light exceeds a threshold value.

[0076] [Variation 8] In the above-described embodiment and modified example, a method has been described in which the arrangement position (initial setting position) of the virtual light source is first set for a plurality of captured images to which the relighting process is to be applied based on common relative relationship information, and then the arrangement position is adaptively changed according to the determination result of the determination module 204. This method is suitable from the viewpoint of simplifying the setting operation, for example, in a mode in which the relighting process is applied collectively to a plurality of still images. On the other hand, in a mode in which the relighting process is applied to a moving image, that is, in a mode in which the images of a series of frames constituting the moving image are the application targets, if the settings of the virtual light source are different between the frames, the output (moving image) may give a viewer a complicated impression. Alternatively, not limited to a moving image, if a relighting process in which the arrangement positions of the virtual light source are different is applied to a plurality of captured images captured in the same imaging scene to generate resultant images, the viewer may feel uncomfortable when viewing these images at the same time.

[0077] For this reason, for captured images of the same captured scene among the multiple captured images to which the control is applied, a common virtual light source arrangement position may be set, that is, control may be performed to maintain the relative relationship between the target subject and the virtual light source. For example, when executing the generation process on a moving image, for a frame section captured in the same captured scene, the operation of the change module 205 may be controlled to maintain the setting of the virtual light source adopted in the relighting process of the image of the first frame of the section.

[0078] [Other embodiments] The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described 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) that implements one or more of the functions.

[0079] 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]

[0080] 100: digital camera, 101: control unit, 102: recording medium, 103: memory, 104: imaging unit, 106: image processing unit, 201: reading module, 202: detection module, 203: setting module, 204: judgment module, 205: change module, 206: rewriting module, 207: writing module, 208: working memory

Claims

1. An information processing device that sets a virtual light source for a relighting process applied to an image of a target subject included in a captured image, comprising: a first acquisition means for acquiring relative relationship information indicating a relative positional relationship between the target subject and a virtual light source, the relative positional relationship being determined based on a front of the target subject; a second acquisition means for acquiring information on a direction of the target subject relative to an image capture direction for the captured image; a setting means for setting a provisional arrangement position of a virtual light source for the relighting process based on the relative relationship information acquired by the first acquisition means and information on the orientation of the target subject acquired by the second acquisition means; a determination means for determining the validity of the relighting process performed by setting a virtual light source at the provisional arrangement position; a control means for controlling, based on a result of the determination by the determination means, whether to set a placement position of a virtual light source for performing the relighting process to the tentative placement position or to change the placement position to a placement position different from the tentative placement position; 13. An information processing device comprising:

2. The control means controlling the setting means to determine, when the determining means determines that the validity satisfies a predetermined criterion, a placement position of a virtual light source that performs the relighting process to the tentative placement position; When the determining means determines that the validity does not satisfy the predetermined standard, the setting means is controlled to change the arrangement position of the virtual light source that performs the relighting process from the tentative arrangement position to the different arrangement position.

2. The information processing apparatus according to claim 1,

3. The information processing apparatus according to claim 2 , wherein the determining means determines the validity based on a position of the tentative arrangement position in the captured direction.

4. The information processing device according to claim 2 or 3, characterized in that the determination means determines that the validity does not meet the specified standard when the tentative placement position is located farther away from the imaging device that captured the captured image in the captured direction than a specified position.

5. The information processing device according to any one of claims 2 to 4, characterized in that the determination means determines that the validity does not meet the specified standard when the tentative placement position is located farther away from the imaging device that captured the captured image than the target subject in the captured direction.

6. 4. The information processing device according to claim 2, wherein the determination means determines that the validity does not satisfy the predetermined standard when the tentative placement position is within a predetermined azimuth angle range based on a front of the target subject.

7. the relative relationship information indicates a relative positional relationship between the target subject and a virtual light source in the relighting process applied to different captured images, The information processing device further includes a third acquisition means for acquiring information on a direction of the target subject with respect to an image capture direction for the different captured images, The determination means determines the validity based on information on the orientation of the target subject acquired by the second acquisition means and information on the orientation of the target subject acquired by the third acquisition means.

3. The information processing apparatus according to claim 1, wherein the information processing apparatus is a computer.

8. The method further includes a quantifying means for quantifying a lighting effect resulting from application of the relighting process for each of the tentative placement position and the different placement position, The determining means determines the effectiveness based on the lighting effect of each arrangement position quantified by the quantifying means.

2. The information processing apparatus according to claim 1,

9. The determination means is determining that the effectiveness is high when the lighting effect of the temporary arrangement position is greater than the lighting effect of the different arrangement position; determining that the effectiveness is low when the lighting effect of the temporary arrangement position is smaller than the lighting effect of the different arrangement position; The control means controlling the setting means to determine, when the determining means has determined that the effectiveness is high, a placement position of a virtual light source for performing the relighting process to be the tentative placement position; When the determining means determines that the effectiveness is low, the setting means is controlled to change the arrangement position of the virtual light source for performing the relighting process from the tentative arrangement position to the different arrangement position.

9. The information processing apparatus according to claim 8,

10. The method further includes estimating a direction of ambient light in the captured image, The control means controls the setting means not to change the arrangement position of the virtual light source that performs the relighting process to the different arrangement position when a similarity between a direction from the different arrangement position toward the target subject and a direction of the ambient light estimated by the estimation means exceeds a threshold value.

10. The information processing apparatus according to claim 1,

11. The imaging device further includes an identification unit that identifies an imaging scene in which each of the captured images was captured when a series of captured images is selected as the captured images, The control means controls the setting means so that a relative positional relationship between a position of a virtual light source that performs the relighting process and the target subject is maintained for a group of captured images captured in a same imaging scene among the series of captured images.

11. The information processing apparatus according to claim 1,

12. an imaging means for capturing an image and outputting the captured image; An information processing device according to any one of claims 1 to 11, an execution means for executing the relighting process using a setting of a placement position of a virtual light source for performing the relighting process set by the information processing device; An imaging device comprising:

13. A method for controlling an information processing device that sets a virtual light source for a relighting process applied to an image of a target subject included in a captured image, comprising: a first acquisition step of acquiring relative relationship information indicating a relative positional relationship between the target subject and a virtual light source, the relative positional relationship being determined based on a front surface of the target subject; a second acquisition step of acquiring information on a direction of the target subject relative to an image capture direction for the captured image; a setting step of setting a provisional arrangement position of a virtual light source for the relighting process based on the relative relationship information acquired in the first acquisition step and information on the orientation of the target subject acquired in the second acquisition step; a determination step of determining the validity of the relighting process performed by setting a virtual light source at the provisional arrangement position; a control step of controlling, based on a result of the determination step, whether to set the arrangement position of a virtual light source for performing the relighting process to the tentative arrangement position or to change the arrangement position to a different arrangement position from the tentative arrangement position; A control method comprising the steps of:

14. A program for causing a computer to function as each of the means of the information processing apparatus according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Image processing system and control method of the same

    JP2016072692A

  • Image processing device and method and control program

    JP2018010498A

  • Image processing system and image processing method

    JP2021108023A