System for processing photographic images

Abstract: An apparatus and method for automatically adjusting density information of pixels contained in image data is disclosed. The image processing method includes the steps of dividing the image data into a plurality of regions based on color information of the pixels contained in the image data and adjusting density information of the pixels contained in at least one particular region among the plurality of regions.

Description: This invention relates to a system for processing a photographic image, and particularly to an image processing method and apparatus for automatically adjusting the density information of pixels contained in an image data set. Conventionally, a photograph is provided by printing an image onto photographic paper where the image has been shot on a film using a camera. The film (specifically, a negative film) has exposure characteristics and these characteristics have some margin or variations considering the varied conditions at the time of shooting. However, the photographic paper on which the image will be printed does not have such exposure characteristics. Accordingly, an image appearing in the film may not appear exactly on the printing paper. For example, in case of photographing a person's figure where the background contains a window into which bright sunlight shines, it is difficult to print both the person's figure and the background with appropriate densities. This is because if it is desired to print the person's figure on the photographic paper using an appropriate density, the background is likely to be whited out due to under exposure. Alternatively if it is desired to print the background on the photographic paper with an appropriate density, the figure is likely to be blacked out due to over exposure. Previously, an operation called "masked printing" has been necessary for printing both the person's figure and the background onto the photographic paper when the film is shot using the conditions described above. This operation requires a high level of printing skill since it varies the light exposure of one part of the photographic paper from another part by exposing one part of the photographic paper while masking the other part. Accordingly, masked printing has a problem in that it should be done by a manual operation using experts and thus it is expensive. Also, there is a problem that, if a film is photographed in conditions where it is under exposed or over exposed, it is necessary to appropriately adjust the duration for printing the photographed image on the film to obtain a good photograph print. EP-A-0 514 933 discloses a method of processing image data for the control of exposure of photographic film. In this method, a color image is divided into a plurality of picture elements by a CCD image sensor and each picture element is resolved into three colors (R, G, B). Accordingly, a human face portion in a picture is extracted or identified. EP-A-0 566 064 discloses a method of determining the exposure of a color image. In this method, an image frame to be printed is divided into a plurality of portions on the basis of photometric data. US-A-5 715 377 discloses an apparatus for printing video images. In this apparatus, a density gradation table is modified on the basis of a percentage of backlighting or people in the image. US-A-5 420 704 discloses a method of analysing a color cast in a color original to be reproduced. In this method, the color image is divided into a plurality of luminance regions to set color cast values. It is the object of the invention to provide an improved method and apparatus of processing image data in which the light exposure on a printed image is automatically set, such that even when a photographed image contains under exposed or over exposed areas, the exposure is set appropriately so as to attain excellent printed pictures. Further, it is another object of the present invention to provide an image processing method and apparatus that makes it unnecessary to adjust the duration for printing an image even when the image or part of the image is photographed with conditions where it is under exposed or over exposed. This object is fulfilled by a method having the features disclosed in claim 1 and an apparatus having the features disclosed in claim 3. Preferred embodiments are defined in the dependent subclaims. According to the present invention, based on the color information of pixels contained in the image data, the density information of the pixel is automatically adjusted. The masked printing technique previously used by experts thus becomes unnecessary. According to further aspects of the present invention, the density information of the pixels contained in the portion of the image data corresponding to the under exposed or over exposed portion of the film is automatically adjusted. Thereby, even if the film is photographed with under exposed or over exposed conditions, it becomes unnecessary to adjust the time duration for printing the photographed image onto the photographic paper. The above and other objects and features of the present invention will be clearly understood from the following description with respect to preferred embodiments thereof when considered in conjunction with the accompanying drawings, wherein the same reference numerals have been used to denote the same or similar parts or elements, and in which: Figure 1 is a block diagram showing the configuration of an embodiment of the image processing apparatus according to the present invention. Figure 2 is a flowchart schematically showing the adjustment processing program. Figure 3 is a schematic diagram describing mapping pixels P X to points Q X in a color space. Figure 4 is a schematic diagram showing an example of the distribution of the points Q X in the color space. Figure 5 is a schematic diagram for describing detection of the spaces C 1 and C 2 in the color space. Figure 6 is a schematic diagram showing the relationship between the average density information d i of the space C i and the new average density information d i ' of the space C i . The general principles of the present invention will now be explained. For automatically using a masked printing technique, it is critical to determine which part of an image is to be masked. Accordingly, for automatically performing masked printing, it is necessary to automatically dividing image data into a region to be provided with a mask and a region that does not need to be provided with a mask. This invention uses the color information of the pixels contained in the image data to divide the image data into these regions. The color information of the pixels is represented by a set of components, e.g. red, green and blue that represent the three primary colors. A photographed subject (object) can be a solid, for example. Alternatively, if the subject (object) is a plane, it is often photographed with depth. In such cases, the difference in density appears in the object image. For example, shading appears at a spherical surface of a red sphere subjected to light from a certain direction, while the color of the sphere is kept red regardless of the shading. Accordingly using such a way of thinking and applying it to colors, it is possible to divide the image data into a plurality of regions. For example, by dividing a region whose color is red and another region that is not, the red sphere can be detected as a circular region. A masked printing effect can be achieved by keeping the original density information at a plurality of regions obtained by dividing the image data, while operating on the density information for each of the other regions. Also, for a portion of the image data corresponding to an over exposed portion or an under exposed portion of the film, it is preferable to emphasize the image by performing a process that multiplies it with a coefficient having an opposite characteristic to the film characteristic. The embodiments of the present invention will now be described with reference to the drawings. Figure 1 shows a configuration of an image processing apparatus 20 of an embodiment of this invention. The image processing apparatus 20 includes an input interface part 21, a CPU 22, a read only memory (ROM) 23, a random access memory (RAM) 24 and an output interface part 26. A digital camera 10 is connected to the input interface part 21 of the image processing apparatus 20. The digital camera 10 can be, for example, a CCD camera. The digital camera 10 receives the image photographed on the film and outputs the image data D 1 corresponding to the image. The image data D 1 consists of a plurality of pixels. The image data output from the digital camera 10 is supplied to the CPU 22 via the input interface part 21. The CPU 22 performs an adjustment processing program for adjusting the density information of the pixels contained in the image data D 1 . The adjustment processing program is stored, for example, in the ROM 23. The RAM 24 is typically a hard disk built in the image processing apparatus 20. The CPU 22, ROM 23 and RAM 24 are all interconnected through a bus 25. A digital printer 30 is connected to the output interface part 26 of the image processing apparatus 20. The image data D 1 processed with the image processing program becomes image data D 2 and it is output to the digital printer 30 via the output interface part 26. The digital printer 30 prints the revised image data D 2 . Figure 2 shows a schematic flow of the adjustment processing program. Each step of the adjustment processing program is performed by the CPU 22. In step S1, pixel P X is mapped into a point Q X in a color space, wherein the pixel P X represents an arbitrary pixel contained in the image data D 1 . The mapping from the pixels P X to the points Q X in the color space will be described below with reference to Figures 3 and 4. In step S2, a space C i (i = 1, 2, ..., n) in the color space where the concentration of the points Q X is above a predetermined threshold is detected. Herein, "n" is an arbitrary integer. How to detect the space C i will be described below with reference to Figure 5. In step S3, the average density information d i is adjusted. In addition, it is preferable to adjust the average density information d i of the space C i for all of "i" values. This is done for the purpose of emphasizing the difference in the average density information d i among the spaces C i . But, a similar effect can also be obtained by adjusting the average density information d i of the space C i for only at least one particular "i". In step S4, density information d X of the pixel P X is adjusted based on the average density information d i of the space C i adjusted in the step S3. In this way the density information d x of the pixel P X is adjusted. With such an adjustment, the density information for all of the image data D 1 are controlled so that a region with a lighter density becomes denser and a region with more density becomes lighter. As a result, a similar effect as that achieved by manual masked printing can be obtained. The mapping from the pixel P X to the point d X will now be described with reference to Figure 3. The pixel P X comprises a B value indicating a degree of blue color, a G value indicating a degree of green color and an R value indicating a degree of red color as its color information. In other words, the color information of the pixel is represented with (b X , g X , r X ). Herein, b X represents the B value of the pixel P X , g X represents the G value of the pixel P X and r X represents the R value of the pixel P X . Each of b X , g X and r X is an integer, for example between 0 and 255. The pixel P X is mapped to the point Q X in the color space 40 through mapping F shown in Figure 3. Herein, the point Q X is a point with coordinates (b X , g X , r X ). The color space 40 is a three dimensional space defined with a B axis 42, a G axis 44 and an R axis 46. By mapping all pixels P X contained in the image data into the color space 40, a set of the points Q X can be obtained. Figure 4 shows an example of the distribution of the points Q X in the color space 40. In Figure 4, spaces C 1 and C 2 indicated with the hatching represent regions with high concentrations of the points Q X in the color space 40. The spaces C 1 and C 2 correspond to regions A 1 and A 2 with different colors in the image data D 1 . This is because the proximity of the points Q X in the color space 40 are correlated with the similarity of colors in the image data D 1 . For example, the region A 1 is a region related to a beige face in the image data D 1 , and the region A 2 corresponds to a green mountain in the image data D 1 . In Figure 4, each pixel contained in the region A 1 of the image data D 1 is mapped into the space C 1 of the color space 40 by the mapping F, and each pixel contained in the region A 2 of the image data D 1 is mapped into the space C 2 of the color space 40. This indicates that the image data D1 is divided at least into the regions A 1 and A 2 based on the color information of the pixels contained in the image data D 1 . In this way, the image data D 1 may similarly be divided into N regions based on the color information of the pixels contained in the image data D 1 . Herein, N is an arbitrary integer equal to or greater than 2. It will now be described specifically how to detect the space C 1 and C 2 in the color space 40 with reference to Figure 5. In Figure 5, a plane 48 is a plane defined with the G axis 44 and the R axis 46. Regions R 1 and R 2 are regions where the concentrations of points Q X detected are above a predetermined threshold. This is accomplished by examining the distribution of points Q X along the R axis 46. The regions R 1 and R 2 are defined by the following equations (1). R 1 : r 11 ≤ R ≤ r 12 R 2 : r 21 ≤ R ≤ r 22 where r 11 , r 12 , r 21 and r 22 are constants. Similarly, regions G 1 and G 2 where the concentrations of points Q X is above a predetermined threshold. This is accomplished by examining the distribution of the points Q X along the G axis 44. The regions G 1 and G 2 are defined by the following equations (2). G 1 : g 11 ≤ G ≤ g 12 G 2 : g 21 ≤ G ≤ g 22 where g 11 , g 12 , g 21 and g 22 are constants. Similarly, regions B 1 and B 2 are regions where the concentrations of points Q X is above a predetermined threshold. These regions are detected by examining the distribution of the points Q X along the B axis 42. The regions B 1 and B 2 are defined by the following equations (3). B 1 : b 11 ≤ B ≤ b 12 B 2 : b 21 ≤ B ≤ b 22 where b 11 , b 12 , b 21 and b 22 are constants. According to the equations 1 thorough 3, the space C 1 and C 2 in the color space 40 are represented by the following equations (4). C 1 : r 11 ≤ R ≤ r 12 , and, g 11 ≤ G ≤ g 12 , and, b 11 ≤ B ≤ b 12 C 2 : r 21 ≤ R ≤ r 22 , and, g 21 ≤ G ≤ g 22 , and, b 21 ≤ B ≤ b 22 A process to adjust the average density information d i of the space C i in the step S3 will now be described in detail. The average density information d i is calculated according to the following equations (5). In other words, the average density information d i is obtained by summing the density information d X corresponding to all of the points Q X contained in the space C i . d i = ∑ QX∈Ci d X d X = (b X + g X + r X ) / 3 Variation Δd i is calculated according to the following equation (6). Δd i = (T-d i ) x K where T represents a predetermined constant indicating a target value, and K represents a predetermined coefficient. T is, for example, a registered center value of a monitor. The color information (b X , g X , r X ) of the pixel P X is updated into new color information (b X ', g X ', r X ') according to the following equations (7). b X ' = b X + Δd i g X ' = g X + Δd i r X ' = r X + Δd i New density information d X ' of the pixel P X corresponds to the new color information (b X ', g X ', r X ') according to the following equations (8). d X ' = (b X ' + g X ' + r X ') / 3 Further, new average density information d i ' of the space C i corresponding to the new color information (b X ', g X ', r X ') is calculated according to the following equations (9). As seen from the equations 6 through 9, in case of the average density information d i of the space C i being greater than the target value T, the new average density information d i ' decreases with the amount of the variation Δd i . In case the average density information d i of the space C i is less than the target value T, the new average density information d i ' increases with the amount of the variation Δd i . The absolute value of the variation Δd i increases as the average density information d i of the space C i deviates from the target value T. Figure 6 shows the relationship between the average density information d i of the space C i and the new density information d i ' of the space C i . In Figure 6, the solid line indicates the average density information d i of the space C i , and the broken line indicates the average density information d i ' of the space C i . As indicated, the line indicating the average density information of the space C i is moved in such a direction that a lighter density region becomes denser and a denser region becomes lighter. Although in Figure 6, the new average density information d i ' is represented by the straight line, it is possible that a curve with a certain curvature may also represent it. For example, the curvature may be a cubic curve (y=ax 3 + bx 2 + cx + d, where a, b, c, d are constants). In the case where an under exposed image or an over exposed image is photographed on the film, the image may not be able to be properly printed in a photographic paper. The reason why such a phenomenon occurs is that a region of the film characteristic with a bad linearity has been reached. Such a characteristic region is preferably multiplied by a coefficient to provide a pseudo linearity. For example, the color information (b X , g X , r X ) of the pixel P X is preferably shifted so as to have an opposite characteristic of or against the film characteristic. For example, for emphasizing the under exposed image photographed to the film, according to the following equations (10), the color information (b X , g X , r X ) of the pixel P X may be updated to new color information (b X ', g X ', r X '), and the density information d X may be updated to the new density information d X '. d X = (b X + g X + r X ) / 3 sht = K 1 X ln (d X ) - K 2 b X ' = b X + sht g X ' = g X + sht r X ' = r X + sht d X ' = (b X ' + g X ' + r X ') / 3 where K 1 and K 2 are predetermined positive coefficients. Then, it is possible to compensate the under exposed portion or the over exposed portion by adjusting the color information (b X , g X , r X ) and the density information d X of the pixel P X . Thereby, even if the film is photographed such that it is under exposed or over exposed, adjusting the time duration of printing the image photographed on the film to the photographic paper can be made unnecessary.

Claims: A method of processing image data for the control of exposure of photographic film which contains a color image composed of pixels and from which a color print is made, with the exposure being controlled by identifying a particular color region, identifying an area of the color image corresponding to the particular region, controlling the exposure of the film in accordance with density of the area, and detecting density values (b X , g X , r X ) of three colors (R, G, B) of each pixel (Px) in the color image on the film; characterized by defining a color space (40) having a B axis, a G axis and a R axis on the basis of the three colors (B, G, R); determining a plurality of regions (C1, C2) within said color space (40) where concentration of points (Q X ) is above a predetermined threshold which points (Qx) are defined by said density values (b X , g X , r X ) ; calculating an average density (d i ) for each region (C1, C2) of said plurality of regions (C1, C2); calculating for each region (C1, C2) variations (Δd i ) of the average density (d i ) from a target value (T); adjusting density data of each pixel (Px) in each region (C1, C2) in accordance with the calculated variation (Δd i ) for the region to compensate for under- and overexposure ; and printing by digital printer (30) with the adjusted densities (dx') of the pixels (Px). The method for processing image data as defined in claim 1, wherein the step of determining a plurality of regions (C1, C2) includes a sub-step of mapping the pixels (Px) of the color image into corresponding points (Qx) in the color space (40) in accordance with the density values (b X , g X , r X ) of the three colors (R, G, B). An image data processing apparatus for printing a color image of a film on a printing paper with the color image being composed of pixels (Px), and the exposure being controlled by identifying a particular color region, identifying an area (A1, A2) of the color image corresponding to the particular region, and controlling the exposure of the film in accordance with density of the area, the apparatus comprising: a detector (10) for detecting density values (b X , g X , r X ) of three colors (R, G, B) of each pixel (Px) in the color image on the film; and the apparatus being characterized by : means for defining a color space (40) having a B axis, a G axis and a R axis on the basis of the three colors (B, G, R); means (S2) for determining a plurality of regions (C1, C2) within said color space (40) where concentration of points (Qx) is above a predetermined threshold which points (Qx) are defined by said density values (b X , g X , r X ); means (22) for calculating an average density (d i ) for each region (C1, C2) of said plurality of regions (C1, C2); means (22) for calculating for each region (C1, C2) variations (Δd i ) of the average density (d i ) from a target value (T) means (S3, S4) for adjusting density data of each pixel (Px) in each region (C1, C2) in accordance with the calculated variation (Δd i ) for the region to compensate for under- and overexposure, and a digital printer (30) for printing with the adjusted densities (dx') of the pixels (Px). An image data processing apparatus as defined in claim 3 wherein the means (S2) for determining comprises means (S1) for mapping the pixels (Px) of the color image (D1) into corresponding points (Qx) in a color space (40) in accordance with the density values (b X , g X , r X ) of the three colors (R, G, B).

Inventors: KITA KOJI, KITA, KOJI
Applicants: NORITSU KOKI CO LTD, NORITSU KOKI CO., LTD.
Application year: 1999
Main classification: H04N1
IPC codes: H04N1, G06T5, G03F3