Method, apparatus, and recording medium for image processing

Image data can be corrected in the same manner as by retouching work using a photograph finishing system in a laboratory. Sub-image data generating means generates sub-image data representing density information or the like of an original image from main image data representing the original image. The sub-image data are displayed on a monitor as a sub-image, and an operator carries out correction using input means while viewing the sub-image. In this manner, corrected sub-image data are obtained by retouching means. Correction means corrects the main image data based on the corrected sub-image data, and processed image data are obtained. The processed image data are reproduced as a printed image by a printer.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing method and an image processing apparatus which enable an operator to correct image data in the same manner as carrying out retouching work, and also 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

In order to generate higher quality images, a photograph finishing system in a laboratory carries out printing after retouching work has been carried out directly on images recorded on an original negative or reversal film. For example, in the case of portrait photographing by using a negative film, retouching is carried out on an image of a person recorded on the film with a pencil along his/her nose so that the appearance of nose is sharpened. In the case where a reversal film is used, chroma of a specific subject in an image to be printed can be emphasized by superposing a color on the film by using a dedicated coloring material.

Meanwhile, following development of computer technology in recent years, printing systems for generating printed images after carrying out appropriate processing on image data obtained by reading an image recorded on a negative or reversal film or on image data obtained by photographing with a digital camera have been proposed. In such a printing system, since printing is carried out after image processing such as tone correction, brightness correction, and white balance correction has been carried out on the image data, high quality prints can be obtained even if photographing was not completely successful.

However, in the above-described photograph finishing system in a laboratory, films are directly manipulated and an operation for the manipulation is substantially complicated. Therefore, only skilled workers can carry out satisfactory processing. It is extremely difficult for a photographer who has photographed an image to be corrected to carry out retouching work directly on a film by himself/herself, and even a skilled worker may not necessarily reflect the photographer's intention accurately in the printed image. Furthermore, although density increasing processing on a film to cause density of a printed image to become lower can be carried out, for example in the case of retouching a negative film, density decreasing processing on a film to cause density of a printed image to become higher cannot be carried out easily. Moreover, since films are manipulated directly, correction is not easily undone.

Meanwhile, image processing used in the above-described printing system is to correct entire image data by setting a parameter for tone correction or the like based on the image data. Therefore, sharpening only a person's nose or emphasizing chroma of a specific subject, which are possible by using the photograph finishing system in a laboratory, are not possible by using the printing system.

SUMMARY OF THE INVENTION

The present invention has been created based on consideration of the above problems. An object of the present invention is to provide an image processing method and an image processing apparatus for enabling correction of image data in the same manner as by a photograph finishing system in a laboratory, and 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:

obtaining corrected sub-image data by correcting at least a portion of sub-image data representing information included in an original image represented by main image data; and

obtaining processed image data by correcting the main image data based on the corrected sub-image data.

It is preferable for the image processing method of the present invention to correct the main image data only for a portion corrected in the sub-image data, based on the corrected sub-image data.

It is preferable for the corrected sub-image data to be obtained by reproducing the sub-image data on reproduction means and correcting the reproduced sub-image data.

The sub-image data may be generated from the main image data. Alternatively, in the case where the main image data have been obtained by photoelectrically reading the original image, the sub-image data may be generated by reading the original image separately from the main image data acquisition. Moreover, in the case where original images have been obtained by consecutively photographing one and the same subject, one of the original images may be the sub-image, and image data representing the sub-image can be the sub-image data.

As the sub-image data, density information of the main image data, information reversing the density information, chroma information of the main image data, and the like can be listed. However, depending on the content of a desired correction, various kinds of information can be used. When the original image is a negative image, the sub-image to be obtained by reproducing the sub-image data is a negative image. Meanwhile, when the original image is a positive image, a negative sub-image can be reproduced by reversing the density information.

The sub-image data may have a predetermined offset value. This is because the density cannot be lowered for a portion having 0 density, in the case where the density is corrected. In this case, by letting the offset value correspond to an orange color, the sub-image obtained by reproducing the sub-image data looks like an image recorded on a negative film. Furthermore, by representing the density information by the orange color, the sub-image looks like an image recorded on a negative film. Moreover, processing efficiency may be improved by letting the number of bits of the sub-image data be smaller than that of the original image data.

The corrected sub-image data and the main image data may be stored in a recording medium by relating the two.

An image processing apparatus of the present invention comprises:

corrected sub-image data generating means for obtaining corrected sub-image data by correcting at least a portion of sub-image data representing information included in an original image represented by main image data; and

correction means for obtaining processed image data by correcting the main image data based on the corrected sub-image data.

It is preferable for the image processing apparatus of the present invention to correct the main image data based on the corrected sub-image data, only for a portion corrected in the sub-image data.

It is also preferable for the corrected sub-image data generating means to comprise means for generating the sub-image data from the main image data.

Furthermore, it is preferable for the corrected sub-image data generating means to comprise:

reproduction means for reproducing the sub-image data; and

input means for allowing an input for correcting the reproduced sub-image data.

The processing carried out in the image processing method may be provided as a program to cause a computer to execute the processing recorded in a computer-readable recording medium.

According to the present invention, the corrected sub-image data are obtained by correcting at least a portion of the sub-image data representing density information, chroma information and the like of an original image, and the main image data are corrected based on the corrected sub-image data. Therefore, the same processing as in retouching work such as sharpening the image of a nose or emphasizing chroma of a specific subject is carried out on the sub-image data to obtain the corrected sub-image data, and based on the corrected sub-image data, the main image data are corrected. In this manner, the image obtained by reproducing the processed image data has been finished with the same processing as in the retouching work carried out by a photograph finishing system in a laboratory. By correcting the sub-image data in this manner, retouching work can be undone after generating the sub-image data again even when the correction was not successful. Therefore, a photographer can carry out the correction easily by himself/herself, and a corrected image reflecting the photographer's intention accurately can be obtained. Since density is easily increased or decreased in the sub-image data, density increase or decrease of a printed image can be carried out more easily than on a film by using a photograph finishing system. Furthermore, a portion of an image, not the entire image, can be corrected easily.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1 is a schematic block diagram showing a configuration of a printing system employing an image processing apparatus according to the embodiments. As shown in FIG. 1 , the printing system comprises sub-image data generating means 1 for generating sub-image data S 1 from original image data S 0 (hereinafter, called main image data) in the manner which will be described later, retouching means 2 for displaying the sub-image data S 1 on a monitor 3 and for obtaining corrected sub-image data S 2 by carrying out retouching based on an input from input means 4 on a displayed image, correction means 5 for obtaining processed image data S 3 by correcting the main image data S 0 according to the corrected sub-image data S 2 , and a printer 6 for printing the processed image data S 3 .

The main image data S 0 to be processed in the embodiments of the present invention are obtained by photoelectrically reading an image recorded on a negative or reversal film, or by photographing a subject with a digital camera.

The sub-image data generating means 1 generates the sub-image data S 1 by extracting density information, chroma information, and the like from the main image data S 0 .

The retouching means 2 is to correct the sub-image data S 1 by using retouching software. There touching means 2 obtains the corrected sub-image data S 2 by reflecting the content of a correction input by an operator using the input means 4 in the displayed image while viewing the sub-image data S 1 displayed on the monitor 3 .

An operation of the present invention based on processing content different among the kinds of retouching will be explained next.

The case where tone and density of an image recorded on a negative film are corrected.

Processing carried out in the case where an image represented by the main image data S 0 is an image of a person, such as sharpening the person's nose, deleting wrinkles at corners of his/her eyes, or deleting a spot caused by dirt attached on the film, is the processing to be carried out here.

FIG. 2 is a flow chart showing the processing carried out in a first embodiment. Hereinafter, processing flow carried out in second to fourth embodiments which will be explained later is the same as this processing flow. Therefore, only the first embodiment will be explained with reference to the flow chart.

The main image data S 0 are obtained by photoelectrically reading an original image recorded on a negative film. The sub-image data generating means 1 generates the sub-image data S 1 representing density information of the original image as a black-and-white image, using a base density of the negative film as an offset density (step S 1 ). Since the base density of the negative film is orange, the offset density means data having values ranging from 20 to 70 degrees in the metric hue angle of the CIELab display system. Density information of the original image can be found by subtracting a G (green) density corresponding to a minimum density Dmin of the original image from a G density of the negative film at each pixel in the original image. In other words, when Rmin, Gmin, and Bmin denote RGB values of the original image at the minimum density Dmin, and let Ri 0 , Gi 0 , and Bi 0 be pixel values in each pixel of the original image, pixel values Ri 1 , Gi 1 , and Bi 1 of each pixel of a sub-image represented by the sub-image data S 1 can be found by using the following equations (1):

The sub-image data S 1 obtained in this manner are reproduced on the monitor 3 as the sub-image. The reproduced sub-image data S 1 includes density information in the orange base density, and are displayed as if the original image recorded on the negative film were displayed. The operator carries out retouching using the input means 4 while viewing the sub-image displayed on the monitor 3 (step S 2 ). For example, when the operator wishes to increase brightness of a person's nose in order to sharpen the nose, retouching using black is carried out. On the contrary, when shadow is added in order to clear up features, retouching is carried out with white. Such retouching can be carried out freely on a desired portion whose density or tone need to be corrected in the original image, such as deleting crows-feet, catching light in a person's eyes, and removing dirt or a scar included in the original image. In this manner, the operator can carry out retouching on the sub-image displayed on the monitor 3 in the same manner as on a negative film with a photograph finishing system in a laboratory. Pixel values Ri 2 , Gi 2 , and Bi 2 (the corrected sub-image data S 2 ) of each pixel in the corrected sub-image are obtained by the retouching means 2 according to the following equations (2):

where R, G, and B are amounts of density correction, and R G B. For a portion whose sub-image data S 1 have not been corrected, R G B 0.

The correction means 5 corrects the main image data S 0 based on the corrected sub-image data S 2 , and the processed image data S 3 are obtained (step S 3 ). Pixel values Ri 3 , Gi 3 and Bi 3 of each pixel in a processed image represented by the processed image data S 3 are found according to the following equations (3):

where k is a coefficient to reflect the amounts of correction in a print as an appropriate density change, and usually takes 1. The operation of the above equations (3) is carried out only on the corrected portion, that is, on the portion where the corrected sub-image data S 2 have a value. For the portion which has not been corrected according to the equation (3), the values of the main image data S 0 are the values of the processed image data S 3 .

Using a look-up table or a conversion equation, the printer 6 converts the processed image data S 3 obtained in this manner into an exposure amount necessary for generating the print. In this manner, the processed image data are reproduced as the print (step S 4 ). The printed image has the same retouching on the original image as would have been carried out by the photograph finishing system in a laboratory.

The case where density and tone of a positive original image are partially corrected.

Processing carried out in the case where density or tone of an original image represented by the main image data obtained by photoelectrically reading a reversal film or photographing with a digital camera is the processing to be carried out here, for example.

The sub-image data generating means 1 generates the sub-image data S 1 representing density information of the original image by black and white, based on the pixel values Ri 0 , Gi 0 , and Bi 0 of the original image. Let values of each pixel in a sub-image represented by the sub-image data S 1 be Di. The pixel value Di can be found by

The sub-image data S 1 obtained in this manner are reproduced as-the sub-image on the monitor 3 . The operator carries out retouching using the input means 4 , while viewing the sub-image displayed on the monitor 3 . For example, in the case where contrast of the original image is partially increased, or in the case where dirt or a flaw in the original image is deleted, the corrected sub-image data S 2 are obtained by correcting the portion with black. A value of each pixel in a corrected image represented by the corrected sub-image data S 2 are expressed by Di . For a portion where the sub-image data S 1 have not been corrected, values of the sub-image data S 1 are values of the corrected sub-image data S 2 . In this case, the amount of correction can be easily understood when the sub-image and an image representing the correction amount (Di Di) added to the sub-image are displayed together on the monitor 3 .

The correction means 5 carries out correction on the main image data S 0 , based on the corrected sub-image data S 2 , and the processed image data S 3 are obtained. Values Ri 3 , Gi 3 , and Bi 3 of each pixel in the processed image are obtained by the following equations (6):

The operation of the above equations (6) is carried out on the corrected portion, that is, on the portion where the corrected sub-image data S 2 have a value. For a portion which has not been corrected by the equation (6), the value of the main image data S 0 are the values of the processed image data S 3 .

The processed image data S 3 obtained in this manner are reproduced as a printed image by the printer 6 , as in the first embodiment.

The case where the entire tone of a positive original image is corrected.

Processing carried out in the case where tone of the main image data obtained by photoelectrically reading an image on a reversal film photographed in fine weather or obtained by a digital camera is reduced as a whole is the processing to be carried out here, for example.

The sub-image data generating means 1 generates the sub-image data S 1 by reversing black and white of density information of the original image, based on the pixel values of the original image data Ri 0 , Gi 0 , and Bi 0 . The sub-image data are obtained by fining a pixel value di according to the following equation (7) after the value Di of each pixel represented by the density information has been found by using the above-descried equations (4) or (5):

di D const ( D const/ D max) Di (7)

where Dmax is a maximum density of the original image and assumed to be 3.0 when the maximum density is unknown, and Dconst is an offset density defining the maximum density of the sub-image and normally equal to or smaller than 0.5. The sub-image data S 1 obtained by the equation (7) reverses black and white of the original image and represents a sub-image having reduced tone.

The sub-image data S 1 obtained in this manner are reproduced on the monitor 3 as the sub-image. Since the sub-image data S 1 have reduced tone and reversed black and white, the tone of the original image can be reduced by correcting the main data S 0 by using the sub-image data S 1 . However, when further correction is desired, the operator carries out retouching by using the input means 4 while viewing the sub-image displayed on the monitor 3 . For example, when shadow of the original image needs to be emphasized, the corresponding portion is retouched with black and the corrected sub-image data S 2 are obtained. A value of each pixel of the corrected image is di . For a portion whose sub-image data S 1 have not been corrected, the value of the sub-image data S 1 are the value of the corrected sub-image data S 2 .

The correction means 5 corrects the main image data S 0 based on the corrected sub-image data S 2 , and the processed image data S 3 are obtained. The values Ri3, Gi 3 and Bi 3 of each pixel of the processed image represented by the processed image data S 3 are found by using the following equations (8):

Ri 3 Ri 0 k di

Gi 3 Ri 0 k di

The processed image data S 3 are reproduced by the printer 6 as the printed image, in the same manner as in the first embodiment.

The case where chroma of the original image is corrected.

Based on the values Ri 0 , Gi 0 , and Bi 0 of each pixel in a positive original image, a chroma value Ci* in the CIE1976Lab display system is calculated as information regarding colorfulness of the original image. First, the values Ri 0 , Gi 0 , and Bi 0 of each pixel are converted into tristimulous values Xi, Yi and Zi based on physiological primary colors, by using equations (9) below:

Xi Ri

Yi A Gi

where the matrix A is a matrix for converting the values Ri, Gi, and Bi of each pixel into tristimulous values Xi, Yi and Zi. The matrix A takes values shown below in the case where the main image data S 0 have been obtained by a digital camera: A = 0.4124 0.3576 0.1805 0.2126 0.7152 0.0722 0.0193 0.1192 0.9505 . ( 10 )

When the original image is a negative image, the values Ri, Gi, and Bi are obtained by subtracting the values of each pixel from 255 (in the case of 8-bit image). Values ai* and bi* of each pixel in the Lab display system are found by using the following equations (11):

where Xn, Yn and Zn are tristimulous values of white, and tristimulous values corresponding to a D 50 light source are used. Furthermore,

if Xi/Xn, Yi/Yn, Zi/Zn 0.08856, f(ai/an) 7.787(ai/an) 16/116. The chroma value Ci* of each pixel is found by using the following equation (12):

After finding the chroma value Ci* in this manner, the magnitude of the chroma value is expressed as black-and-white density information, as in the following equation (13):

where k is a coefficient for causing the chroma information to be in an appropriate range, and normally equal to 1.

The sub-image data S 1 obtained in this manner are reproduced on the monitor 3 . The operator carries out retouching using the input means 4 while viewing the sub-image displayed on the monitor 3 . For example, a portion of the original image where chroma is emphasized is corrected with black, while with white for a portion of the original image where chroma is reduced, and the corrected sub-image data S 2 are obtained. If Ci* denotes each pixel value of the corrected sub-image represented by the corrected sub-image data S 2 ,

where C is the amount of correction. For a portion whose sub-image data S 1 have not been corrected, C 0.

The correction means 5 corrects the main image data S 0 based on the corrected sub-image data s 2 , and processed image data S 3 are obtained. The values Ri 3 , Gi 3 , and Bi 3 of each pixel of the processed image represented by the processed image data S 3 are found in the following manner. First, let

Values ai* and bi* changed from ai* and bi* of each pixel in the original image are found by using the following equations (16):

Based on the values ai* and bi* found in this manner and on the tristimulous value Yi, the values Ri 3 , Gi 3 , and Bi 3 of each pixel in the image represented by the processed image data S 3 are found by using the equations (9) and (11). For a portion which has not been corrected, the values of the main image data S 0 are the values of the processed image data S 3 .

The processed image data S 3 obtained in this manner are reproduced by the printer 6 as a printed image, as in the first embodiment.

In the fourth embodiment, the metric chroma C* of the CIELab display system has been used, which can be Mancel chroma or chromaticness of NCS.

In the above-described embodiments, the main image data S 0 and the sub-image data S 1 have the same number of bits. However, the number of bits of the sub-image data S 1 may be smaller than that of the main image data S 0 . For example, when the main image data S 0 are 12-bit data, the sub-image data may be generated as 8-bit data. By letting the sub-image data be 8-bit data, the sub-image data are easily used by a computer available on the market, and usage of infrastructure, as in the case where the sub-image data S 1 are transferred to a location remote from the main image data S 0 via a LAN for example, can be promoted.

In the above embodiments, the sub-image data S 1 have been generated from the original image data S 0 by the sub-image data generating means 1 . However, the present invention is not limited to this example, and the sub-image data S 1 may be generated in advance. In this case, the sub-image data S 1 may be obtained from the main image data S 0 . If the main image data S 0 are obtained by photoelectrically reading an image recorded on a negative or a reversal film, the sub-image data S 1 may be generated from image data obtained by reading the image separately from the main image data acquisition. Alternatively, in the case where a plurality of images have been obtained by consecutively photographing the same subject, one of the images can be the sub-image, and the sub-image data S 1 may be generated by photoelectrically reading the sub-image. In the case where a plurality of image data sets have been obtained by consecutively photographing the same subject by using a digital camera, the sub-image data may be generated from one of the image data sets.