Image processing apparatus and control method thereof
AssigneeCanon Kabushiki Kaisha
InventorTetsuya Hata
Life of this patent
Estimating the term…
Abstract
Provided is an image processing apparatus that can flexibly control the position of a virtual light source used for re-lighting processing and correct shading of an object, and a control method thereof. A shading condition detection unit calculates an evaluation value representing the condition of the shading for an object region within an image. A virtual light source control unit then sets a virtual light source based on the evaluation value, and a virtual light addition unit applies the effects of virtual light irradiated by the virtual light source in the image.
Claims20
An image processing apparatus comprising:
- one or more processors;
- and
- a memory that stores a program which, when executed by the one or more processors, causes the one or more processors to function as units comprising:
- (1) a calculation unit configured to calculate an evaluation value representing a degree of shading for an object region in an image;
- (2) a determination unit configured to determine, based on the evaluation value, if the degree of shading for an object region is necessary to be increased or decreased;
- (3) a setting unit configured to set a virtual light source based on the determination result of the determination unit;
- and
- (4) a correction unit configured to apply effects of virtual light irradiated by the virtual light source in the image,
- wherein the calculation unit calculates the evaluation value based on one or more of (a) contrast of the object region, (b) a luminance histogram of the object region in the image, (c) properties of a boundary of a shaded region of the object region, and (d) an area of a shaded region of the object region,
- wherein the setting unit sets the virtual light source so that the virtual light illuminates a shaded region of the object region, in a case where it is determined by the determination unit that the shading needs to be decreased, and
- wherein the setting unit sets the virtual light source so that illuminated areas in the object region due to environmental light and the virtual light overlap, in a case where it is determined by the determination unit that the shading needs to be increased.
An image capturing apparatus comprising:
- (A) an image processing apparatus that comprises:
- (1) one or more processors, and (2) a memory that stores a program which, when executed by the one or more processors, causes the one or more processors to function as:
- (a) a calculation unit configured to calculate an evaluation value representing a condition of shading for an object region in an image;
- (b) a determination unit configured to determine, based on the evaluation value, if the degree of shading for an object region is necessary to be increased or decreased;
- (c) a setting unit configured to set a virtual light source based on the determination result of the determination unit;
- and (d) a correction unit configured to apply effects of virtual light irradiated by the virtual light source in the image;
- and
- (B) an image capturing unit configured to acquire the image by shooting,
- wherein the calculation unit calculates the evaluation value based on one or more of (a) contrast of the object region, (b) a luminance histogram of the object region in the image, (c) properties of a boundary of a shaded region of the object region, and (d) an area of a shaded region of the object region,
- wherein the setting unit sets the virtual light source so that the virtual light illuminates a shaded region of the object region, in a case where it is determined by the determination unit that the shading needs to be decreased, and
- wherein the setting unit sets the virtual light source so that illuminated areas in the object region due to environmental light and the virtual light overlap, in a case where it is determined by the determination unit that the shading needs to be increased.
A method of controlling an image processing apparatus, the method comprising:
- calculating an evaluation value representing a condition of shading for an object region in an image;
- determining, based on the evaluation value, if the degree of shading for an object region is necessary to be increased or decreased;
- setting a virtual light source based on the determination result in the determining;
- and
- applying effects of virtual light irradiated by the virtual light source in the image,
- wherein in the calculating, the evaluation value is calculated based on one or more of (a) contrast of the object region, (b) a luminance histogram of the object region in the image, (c) properties of a boundary of a shaded region of the object region, and (d) an area of a shaded region of the object region,
- wherein in the setting, the virtual light source is set so that the virtual light illuminates a shaded region of the object region, in a case where it is determined in the determining that the shading needs to be decreased, and
- wherein in the setting, the virtual light source is set so that illuminated areas in the object region due to environmental light and the virtual light overlap, in a case where it is determined in the determining that the shading needs to be increased.
A non-transitory computer-readable storage medium that stores a program for causing a computer to function as an image processing apparatus comprising:
- a calculation unit configured to calculate an evaluation value representing a condition of shading for an object region in an image;
- a determination unit configured to determine, based on the evaluation value, if the degree of shading for an object region is necessary to be increased or decreased;
- a setting unit configured to set a virtual light source based on the determination result of the determination unit;
- and
- a correction unit configured to apply effects of virtual light irradiated by the virtual light source in the image,
- wherein the calculation unit calculates the evaluation value based on one or more of (a) contrast of the object region, (b) a luminance histogram of the object region in the image, (c) properties of a boundary of a shaded region of the object region, and (d) an area of a shaded region of the object region,
- wherein the setting unit sets the virtual light source so that the virtual light illuminates a shaded region of the object region, in a case where it is determined by the determination unit that the shading needs to be decreased, and
- wherein the setting unit sets the virtual light source so that illuminated areas in the object region due to environmental light and the virtual light overlap, in a case where it is determined by the determination unit that the shading needs to be increased.
Dependencies are inferred from the claim text.