Method, apparatus and recording medium for image processing
The color and tone of an image of an object are changed to a color and tone desired by a user. Image data including an image of an object is input to image processing means and displayed on a monitor. The user observes the image displayed on the monitor and selects an area including an image of an object having the desired color and tone, and an area including the image of an object whose color and tone are to be changed to the desired color and tone. The image processing means extracts color pixels from each respective specified area and generates cumulative histograms of the color pixels as characteristic quantitative data representing the color and tone. Based on the cumulative histograms, the color-tone of the area including the image of the latter object is changed, and processed image data whose color and tone have been changed is obtained.
Latest Patents:
This application is a Divisional of co-pending application Ser. No. 09/748,002 filed on Dec. 27, 2000, and for which priority is claimed under 35 U.S.C. §120; and this application claims priority of Application Nos. 369338/1999 and 329034/2000, filed in Japan on Dec. 27, 1999 and Oct. 27, 2000 under 35 U.S.C. §119; the entire contents of all are hereby incorporated by reference.
BACKGROUND OF THE INVENTION1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus for changing a color and a tone in a specific area included in a color image. The present invention also relates to a computer-readable recording medium storing a program to cause a computer to execute the image processing method.
2. Description of the Related Art
Reproduction of digital image data obtained by digital still cameras (hereinafter referred to as a digital camera) and digital image data obtained by reading images recorded on film has been carried out to generate hard copies such as prints, or soft copies on display screens. In such reproduction of digital image data, a reproduced image is expected to have as high a quality as a photograph printed from a film negative.
Color reproducibility of the same person's face can vary between prints. Furthermore, in an image including a plurality of people, color reproducibility of each person's face can be different, depending on the intensity or position of a light source. In the case of an image including a person obtained by photographing, the face of the person attracts the most attention. In order to generate a high-quality photograph, correction of the face so as to have an adequate skin color is necessary. To accomplish this, various methods of changing a skin color of an image to a preferable skin color, for example by using a display means such as a monitor and a mouse have been developed. One such method comprises the steps of using a mouse to extract pixels of skin color from an image including a person's face and changing the skin color value to a color and tone of a predefined preferable skin color value using the extracted color value as reference (Japanese Patent No. 2878855, for example). A second proposed method comprises the steps of specifying an area of color to be changed contained within a displayed image, specifying the color nearest to the most preferable color for the area in which the change is desired, upon which the color of the area is changed to a pre-defined color (Japanese Unexamined Patent Publication No. 8(1996)-221546). Furthermore, in a third proposed method, the areas containing human faces are automatically extracted and the color of the areas containing faces is changed to a predefined color.
However, in all the methods described above, because the skin color of a human face is changed to a predetermined skin color, the human face does not necessarily have a preferable skin color after the change. Furthermore, since only the face color is changed, a sharp-contrast face of a person in an image obtained by photographing outdoors in sunny weather cannot be corrected.
SUMMARY OF THE INVENTIONThe present invention has been conceived in consideration of the above described problems. An object of the present invention is therefore to provide an image processing method and an image processing apparatus which can change a specific area in an image such as a human face to a preferable color and tone (hereinafter, the color and tone are together referred to as the color-tone), and to provide a computer-readable recording medium storing a program to cause a computer to execute the image processing method.
An image processing method of the present invention comprises the steps of:
receiving specification of a first area having a desired color-tone in a displayed image;
receiving specification of a second area in the image or in another image; and
changing a color-tone of a desired area including the second area into the color-tone of the first area.
In the step of receiving the specification of the first area, not only one area but also a plurality of areas may be specified.
The “desired area including the second area” can refer to not only the entire second area, but also a specific area in the second area, the entire image including the second area, as well as areas comprising the second area and another area.
Furthermore, the specification of the first area may precede the specification of the second area, or vice versa.
Any object can be specified as a first or second area, for example, a human face, the sky, or green foliage.
An image processing apparatus of the present invention comprises:
display means for image display;
area specification means for specifying a first area having a desired color-tone in an image displayed on the display means and a second area in the image or in another image; and
conversion means for converting a color-tone of a desired area including the second area into the color-tone of the first area.
The image processing method of the present invention may be provided as a program stored in a computer-readable recording medium to cause a computer to execute the image processing method.
According to the present invention, a first area having the desired color-tone in the displayed image is specified, and a second area in the image including the first area or in another image is specified. The color-tone of the desired area including the second area is converted into the color-tone of the first area. Thereby, the desired area including the second area can be changed to have the color-tone desired by a user.
BRIEF DESCRIPTION OF THE DRAWINGS
Hereinafter, an embodiment of the present invention will be explained with reference to the accompanying drawings.
The image processing means 2 carries out the image processing on the image data S in the following manner. First, the image data S is displayed on the monitor 3.
After the area R1 has been specified in the above manner, the image processing means 2 extracts from the area R1 an area R1′ containing pixels within a predefined skin-color range. For this extraction, a skin-color range D circled in a CIELAB color space shown in
The user specifies, as an area R2, an area including an image of a face whose color-tone is to be changed to the color-tone of the image of the face in the area R1. This specification is carried out in the same manner as in the specification of the rectangular area R1.
After the skin-color areas R1′ and R2′ have been extracted, cumulative histograms of the skin-color areas R1′ and R2′ are generated.
After the cumulative histograms H1 and H2 are generated in the above manner, color-tone conversion processing to cause the color-tone of the skin-color area R2′ to become the color-tone of the skin-color area R1′ is carried out based on the cumulative histograms H1 and H2. This color-tone conversion processing is carried out by relating the cumulative histogram H1 with the cumulative histogram H2 as shown by dashed lines in
d′=g−1(f(d)) (1)
If only the color-tone of the skin-color area R2′ is changed, a boundary thereof looks unnatural. Therefore, it is preferable for the color-tone to be changed gradually at the boundary.
Operation of the first embodiment will be explained next.
Meanwhile, the user specifies the area R2 including the image of a face whose color-tone is to be changed to become the same as the color-tone of the area R1 while viewing the image displayed on the monitor 3, and completes input of specification of the area R2 from the input means 4 (Step S5). After completion of the specification of the area R2, the skin-color area R2′ included in the area R2 is extracted (step S6).
After the extraction of the skin-color areas R1′ and R2′, the cumulative histograms H1 and H2 of the skin-color areas R1′ and R2′ are generated (Step S7). Based on the cumulative histograms H1 and H2, the color-tone of the skin-color area R2′ is changed to become the color-tone of the skin-color area R1′ according to Equation (1), and the processed image data S1 are obtained (Step S8) to end the procedure.
As has been described above, in this embodiment, the area R1 having the desired color-tone is specified and the color-tone of the area R2 is changed to become the color-tone of the face image in the area R1. Therefore, the skin-color area R2′ in the area R2 can be changed to have the color-tone desired by the user.
In the above embodiment, the color-tone of only the skin-color area R2′ in the area R2 is changed. However, a color-tone of the entire area R2 may be changed. Alternatively, a color-tone of a predetermined area including the area R2 or the entire image displayed on the monitor 3 (excluding the area R1) may be changed.
In the above embodiment, the area R2 is specified in the image in which the area R1 has been specified. However, the area R2 may be specified in an image different from the image having the area R1.
Furthermore, in the above embodiment the image of a face having a desired color-tone is specified as the area R1. However, for cases in which there are a plurality of images of faces having a desired color-tone, the area R1 may be specified so as to include the all of said images of faces. For example, in the image having people's faces as shown in
In the above embodiment, the first and second areas R1 and R2 are specified as the rectangular areas. However, the areas may be specified as areas having any shape.
In the above embodiment, characteristic quantities of the color-tone of the skin-color areas R1′ and R2′ in the areas R1 and R2 are represented by the cumulative histograms H1 and H2, which is not necessarily limited to these histograms.
In the above embodiment, the color-tone of the image of a face is changed. However, an area R1 having a desired color-tone of the sky, green foliage or the like may be specified in an image so that a color-tone of another area R2 is changed to have the same color-tone of the area R1.
In addition, all of the contents of Japanese Patent Application Nos. 11(1999)-369338 and 2000-329034 are incorporated into this specification by reference.
Claims
1. An image processing method, comprising the steps of:
- receiving specification of a first area having a desired color-tone in a displayed image;
- receiving specification of a second area in the image or in another image; and
- changing a color-tone of a desired area including the second area into the color-tone of the first area,
- wherein the color-tone of the second area is changed gradually at a boundary of the second area.
2. An image processing apparatus, comprising:
- display means for image display;
- area specification means for specifying a first area having a desired color-tone in an image displayed on the display means and a second area in the image or in another image; and
- conversion means for converting a color-tone of a desired area including the second area into the color-tone of the first area,
- wherein the color-tone of the second area is changed gradually at a boundary of the second area.
3. A computer-readable recording medium storing a program to cause a computer to execute the procedures of:
- receiving specification of a first area having a desired color-tone in a displayed image;
- receiving specification of a second area in the image or in another image; and
- changing a color-tone of a desired area including the second area into the color-tone of the first area,
- wherein the color-tone of the second area is changed gradually at a boundary of the second area.
Type: Application
Filed: Jun 19, 2007
Publication Date: Oct 25, 2007
Applicant:
Inventor: Fumito Takemoto (Kaisei-machi)
Application Number: 11/812,470
International Classification: G09G 5/02 (20060101);