Home | Alpha Telephone | Domain Names | Web Hosting | Get Traffic | xrEvidence | xrSoccer

United States Patent

Previous       Show 10       Next


United States Patent 6,151,410
Kuwata ,   et al. November 21, 2000

Image processing apparatus, image processing method and medium for storing image-processing control program


Abstract

Traditionally, the operator must determine the type of an image displayed on a screen and manually select one of various kinds of effect processing for the type of the image. As is generally known, however, such operations have a lack of accuracy and are difficult for an untrained user to carry out. In addition, the image is not correctly compensated for color slippages over the entire gradation range. Furthermore, in the case of image data including an abnormal element other than just a color slippage, the image can not be corrected with a high degree of efficiency. At a step S102, a sample-count distribution of image data is found for each color component by applying a thinning technique on samples. At a step S116, a judgment as to whether or not analogy exists among the sample-count distributions of the color components is formed. A low degree of analogy is regarded as an indicator which suggests that characteristics recognized from the sample-count distributions shall naturally be made uniform among the color components. In this case, the characteristics are compensated for a color slippage included therein by correcting an offset, putting an emphasis on the contrast and correcting the brightness at steps S204 to S216 in order to produce a well pitched and good image from the image data with poor color reproducibility. In addition, since the compensation and correction work is automated, even an untrained user is capable of correcting the balance of color with ease. Furthermore, at a step S205, an offset quantity reflecting a degree of analogy is calculated for use in the compensation of the characteristics for a color slippage.


Inventors: Kuwata; Naoki (Nagano, JP); Nakami; Yoshihiro (Nagano, JP)
Assignee: Seiko Epson Corporation (Tokyo, JP)
Appl. No.: 08/969,676
Filed: November 13, 1997

Foreign Application Priority Data

Nov 19, 1996 [JP] 8-308392
Jan 24, 1997 [JP] 9-011729
Sep 22, 1997 [JP] 9-256552

Current U.S. Class: 382/167 ; 382/162
Current International Class: H04N 1/60 (20060101)
Field of Search: 358/518-523 382/162-167


References Cited

U.S. Patent Documents
4830501 May 1989 Terashita
4847677 July 1989 Music et al.
5303071 April 1994 Kakimura
5357352 October 1994 Eschbach
5619347 April 1997 Taniguchi et al.
5668890 September 1997 Winkelman
Foreign Patent Documents
43 09 877 A1 Oct., 1993 DE
43 10 727 A1 Oct., 1993 DE
1236795 Sep., 1989 JP
2541937 Jul., 1996 JP
2550186 Aug., 1996 JP
Primary Examiner: Lee; Thomas D.
Assistant Examiner: Brinich; Stephen
Attorney, Agent or Firm: Sughrue, Mion, Zinn, Macpeak & Seas, PLLC

Claims



What is claimed is:

1. An image processing apparatus for carrying out predetermined transformation processing on an input comprising component values of image data produced as gradation-color-specification data composed of color components of an image, thereby representing said image as a set of picture elements arranged to form a dot matrix, producing an output from said transformation processing and carrying out transformation based on a relation between said input and said output to correct a balance of color, said image processing apparatus employing a characteristic uniforming means wherein a distribution of said gradation-color-specification data is found for each of said color components, said characteristic uniforming means treats only picture elements approximated by said gradation-color-specification data for each of said color components as an object for finding said distribution, a slippage among said color components is recognized and said recognized slippage is used as a basis for making characteristics uniform among said color components.

2. An image processing apparatus according to claim 1 wherein said characteristic uniforming means finds said characteristics from predetermined positions at said distributions, computes offset quantities for slippages among said color components and uses said offset quantities for correction of values of said color components in order to make said characteristics uniform.

3. An image processing apparatus according to claim 2 wherein said characteristic uniforming means treats end positions of the range of each of said distributions as a characteristic of said distribution.

4. An image processing apparatus according to claim 2 wherein said characteristic uniforming means treats a position approximately at the center of the range of each of said distributions as a characteristic of said distribution.

5. An image processing apparatus according to claim 1 wherein said characteristic uniforming means makes degrees of spreading of said distributions all but uniform among said color components.

6. An image processing apparatus according to claim 5 wherein said characteristic uniforming means increases a degree of spreading of each of said distribution by shifting the ends of said distribution outward over an effective gradation range.

7. An image processing apparatus according to claim 5 wherein said characteristic uniforming means uses said degrees of spreading of said distributions as a basis for allocating a large number of gradations to a range with a high distribution density and allocating a small number of gradations to a range with a low distribution density.

8. An image processing apparatus according to claim 1 wherein said characteristic uniforming means makes degrees of brightness based on each of said distributions all but uniform among said color components.

9. An image processing apparatus according to claim 8 wherein said characteristic uniforming means forms a judgment as to whether an image is bright or dark by comparing a gradation approximately at the center of the range of each of said distributions with a predetermined gradation.

10. An image processing apparatus according to claim 8 wherein said characteristic uniforming means makes degrees of brightness of an image uniform among said color components by carrying out .gamma. correction based on an outcome of said judgment as to whether said image is bright or dark.

11. An image processing apparatus according to claim 1 wherein said characteristic uniforming means includes a correction control means for finding a degree of analogy among said distributions of said color components and bypassing said transformation processing in case said degree of analogy has a small value.

12. An image processing apparatus according to claim 11 wherein said correction control means divides a gradation range that said gradation-color-specification data can have, into a plurality of sub-ranges and finds a degree of analogy among said color components by compring partial distributions of a color component with those of another color component in the same sub-ranges.

13. An image processing apparatus according to claim 11 wherein said correction control means sets a characteristic vector to represent each of said distributions with said sub-ranges of said distribution of said characteristic vector each serving as a member of said characteristic vector representing said distribution and finds a degree of analogy among said color components from inner products of said character vectors.

14. An image processing apparatus according to claim 11 wherein said characteristic uniforming means provides an effective value for making a decision as to whether or not to make said characteristics uniform and said correction control means in essence makes a decision as to whether or not to make said characteristics uniform by varying said effective value, and makes said effective value continuously variable.

15. An image processing apparatus according to claim 1 wherein said characteristic uniforming means has a color-slippage computing means for finding a color slippage of said gradation-color-specification data from slippages in value among said color components in low-brightness and high-brightness zones in said gradation-color-specification data.

16. An image processing apparatus according to claim 15 wherein said color-slippage computing means forms a judgment on said color slippage based on a slippage in value among said color components in said high-brightness zone.

17. An image processing apparatus according to claim 15 wherein said color-slippage computing means forms a judgment on said color slippage by finding a slippage in value among said color components at the same degree of brightness.

18. An image processing apparatus according to claim 15 wherein said color-slippage computing means finds a representative value representing said gradation-color-specification data for each of said color components for a degree of brightness at which a color slippage is found and regards a difference between said representative value and said degree of brightness as a color slippage.

19. An image processing apparatus according to claim 15 wherein said color-slippage computing means tabulates a brightness distribution for said gradation-color-specification data and finds a slippage in value among said color components at a degree of brightness of a point shifted inward from an end of a reproducible range of said brightness distribution by a distance determined by a predetermined distribution ratio.

20. An image processing apparatus according to claim 15 wherein said characteristic uniforming means has a color-shift correcting means for compressing a detected color slippage and using said compressed color slippage in correction of a component value.

21. An image processing apparatus according to claim 20 wherein said color-shift correcting means adapts a color slippage found at a predetermined gradation for each gradation value and uses said adapted color slippage for correction of a component value.

22. An image processing method for carrying out predetermined transformation processing on an input comprising component values of image data produced as gradation-color-specification data composed of color components of an image, thereby representing said image as a set of picture elements arranged to form a dot matrix, producing an output from said transformation processing and carrying out transformation based on a relation between said input and said output to correct a balance of color, said method comprising the steps of:

finding a distribution of said gradation-color-specification data for each of said color components;

treating only picture elements approximated by said gradation-color-specification data for each of said color components as an object for finding said distribution;

recognizing a slippage among said color components; and

using said recognized slippage as a basis for making characteristics uniform among said color components.

23. A medium for storing an image processing program for carrying out predetermined transformation processing on an input comprising component values of image data produced as gradation-color-specification data composed of color components of an image, thereby representing said image as a set of picture elements arranged to form a dot matrix, producing an output from said transformation processing and carrying out transformation based on a relation between said input and said output to correct a balance of color, said program comprising the steps of:

finding a distribution of said gradation-color-specification data for each of said color components;

treating only picture elements approximated by said gradation-color-specification data for each of said color components as an object for finding said distribution;

recognizing a slippage among said color components; and

using said recognized slippage as a basis for making characteristics uniform among said color components.
Description



BACKGROUND OF THE INVENTION

1. Field of the Invention

In general, the present invention relates to an image processing apparatus, an image processing method and a medium for storing an image-processing control program. In particular, the present invention relates to an image processing apparatus and an image processing method for correcting the balance of color as well as relates to a medium for storing an image-processing control program for the image processing apparatus and the image processing method.

2. Description of the Prior Art

Traditionally, correction of the balance of color in many cases means correction of the so-called color fog or the like. That is, correction of the balance of color implies processing to correct a color slippage observed in equipment such as an image inputting apparatus.

In a digital still camera, for example, image data is output as a gradation-color-specification data of the RGB (red, green and blue) colors. In this case, data with the so-called color slippage due to characteristics of a lens or a CCD device employed in the digital still camera is also observed. An example of the color slippage is a state in which a particular color such as the red color is emphasized more than the color of the real object of observation.

When it is desired to make some compensations of image data for a color slippage thereof by using the conventional image processing apparatus, the data is read by an image processing program and an operator weakens the component value of an emphasized color by carrying out a predetermined operation on a trial-and-error basis.

However, the conventional method for correcting a color slippage has the following problems.

In the first place, carried out by an operator manually on a trial-and-error basis, the correction has a lack of accuracy. For an untrained operator, the correction is difficult to do.

In the second place, since only predetermined component values are increased or decreased in a uniform manner, in some cases, the correction can not be said to be done for all gradations.

Furthermore, if the data contains abnormalities other than just the color slippage, the correction can not be said to be effective.

In addition, it is basically impossible to form a judgment as to whether gradation-color-specification data for each component representing the color of every picture element is correct or not without comparing the color with a standard one. Considering the fact that there are possibly some cases in which it is a matter of course that a component is emphasized by rather an external factor, we can not help saying that it is extremely difficult to automatically form a judgment as to whether or not a color slippage exists.

SUMMARY OF THE INVENTION

Addressing the problems described above, it is thus an object of the present invention to provide an image processing apparatus and an image processing method capable of automating correction of color reproducibility of a color with an abnormality such as the so-called color slippage and also capable of correcting the overall the balance of color, as well as a medium for storing an image-processing control program for the image processing apparatus and the image processing method.

In the image processing apparatus provided by the present invention, predetermined transformation is carried out for converting an input into an output with the balance of color thereof corrected in accordance with an associative relation between the input and the output. To put it in detail, the image processing apparatus inputs each component value of image data which represents an image as a set of picture elements forming a dot matrix by using gradation-color-specification data comprising all but equal color components. The image processing apparatus then carries out the predetermined transformation processing on the input component values. To be even more specific, the image processing apparatus employs a characteristic uniforming means whereby distribution of gradation-color-specification data is found for each color component in order to identify variations among color components and the identified slippages are used as a basis for making the characteristics of color components uniform.

In addition, in the image processing method provided by the present invention, the predetermined transformation is carried out for converting an input into an output with the balance of color thereof corrected in accordance with an associative relation between the input and the output. To put it in detail, the image processing method comprises the step of inputting each component value of image data which represents an image as a set of picture elements forming a dot matrix by using gradation-color-specification data comprising all but equal color components, the step of carrying out the predetermined transformation processing on the input component values, the step of finding distribution of gradation-color-specification data for each color component in order to identify slippages among color components and the step of using identified slippages as a basis for making the characteristics of color components uniform.

Furthermore, an image processing program stored by using a computer in a medium provided by the present invention is used to carry out the predetermined transformation for converting an input into an output with the balance of color thereof corrected in accordance with an associative relation between the input and the output. To put it in detail, the image processing program is used to input each component value of image data which represents an image as a set of picture elements forming a dot matrix by using gradation-color-specification data comprising all but equal color components. The image processing program is then used to carry out the predetermined transformation processing on the input component values. To be even more specific, the image processing program is used to find distribution of gradation-color-specification data for each color component in order to identify slippages among color components and to utilize the identified slippages as a basis for making the characteristics of color components uniform.

With the present invention having a configuration described above, if there is image data which is produced as gradation-color-specification comprising all but equal color components to represent an image as a set of picture elements forming a dot matrix, each component value of the image data is input and the predetermined transformation processing is then carried out on the input component values. That is to say, the predetermined transformation is carried out for converting the input into an output with the balance of color thereof corrected in accordance with an associative relation between the input and the output. In this process, the characteristic uniforming means is used for finding a distribution of gradation-color-specification data for each color component in order to identify slippages among color components and for utilizing the identified slippages as a basis for making the characteristics of the color components uniform.

Let a digital still camera be taken as an example. The traditional correction of the balance of color comprises the steps of forming a judgment as to whether or not a component value of each color is emphasized and adjusting the transformation characteristic of each color component for each picture element to produce a balance of color. According to the present invention, on the other hand, a distribution of gradation-color-specification data is found for each color component and characteristics of color components are identified from the separated distributions of the gradation-color-specification data. An attempt is then made to make the identified characteristics uniform. That is, it has become obvious that, with the characteristics of the distributions of the gradation-color-specification data made uniform for all color components, as an image, a well pitched image having no color slippages can be obtained without regard to the substance of the image. The operation to make the characteristic uniforms is based on the distributions of gradation-color-specification data. It should be noted, however, that the characteristic uniforming is not to be construed as characteristic uniforming in a strict sense. Instead, the characteristic uniforming can be interpreted as an effort to at least set a trend toward uniformity to a certain degree.

Thus, by embracing the concept of making the distributions of components uniform in accordance with the present invention, the formation of a judgment on a color slippage which is basically difficult to judge can be automated, allowing the balance of color to be adjusted more easily. In this case, the scope of the present invention is not necessarily limited to a physically tangible apparatus. Instead, the present invention is also applicable to a method to automate the formation of such a judgment and to adjust the balance of color. That is, the present invention can also be applied to a case in which such a method is implemented by a computer.

In this sense, any distribution is useful as long as the state of the distribution can be recognized for each color component. A variety of statistical techniques including a sample-count distribution can also serve as such a tool. For example, secondary data derived from primary data can even be used as well. Examples of secondary data are a mode, a median and a standard deviation extracted from a sample-count distribution. In this case, a sample-count distribution has a merit that the processing thereof is easy to carry out and can be made simple.

In order to obtain accurate statistical values for all picture elements in a process to find a sample-count distribution described above, however, it takes much labor.

For this reason, it is thus another object of the present invention to reduce the amount of labor to obtain statistical values of a sample-count distribution.

In order to achieve the other object of the present invention described above, a characteristic uniforming means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein only picture elements approximated by the gradation-color-specification data are treated as objects for tabulating a sample-count distribution.

Originally, a color abnormality of an image that can be recognized by a human being by merely looking at the image as a color slippage is an abnormality caused by a color appearing on a portion of the image that should have no color. That is, by looking at a red color only, it is impossible to form a judgment as to whether or not a color slippage exists if the original color is not known. Thus, it is not always necessary to treat all picture elements equally. That is, recognition of variations in characteristic for only picture elements with no color can be said to be an effective way to study balance among colors. For this reason, the characteristic uniforming means forms a judgment as to whether or not pieces of gradation-color-specification data of color components resemble each other for all picture elements. Only if they resemble each other, are they used as objects for finding sample-count distributions. Characteristics are then uniformed by using the sample-count distributions obtained under such a condition as a base.

The judgment as to whether or not pieces of gradation-color-specification data of color components resemble each other can be formed by finding maximum and minimum values of the data and evaluating differences in maximum and minimum among the pieces of gradation-color-specification data. It is quite within the bounds of possibility that data exhibiting extreme values is saturated data which can be excluded from the process to make characteristics uniform.

In this way, according to the present invention, only picture elements approximated by the gradation-color-specification data are picked up to be used in formation of a judgment on characteristics. Accordingly, the present invention is also effective for recognition of variations in characteristic.

On the other hand, there are a variety of concrete methods for making characteristics uniform. As a matter of fact, it is still another object of the present invention to provide a concrete method for making characteristics uniform.

In order to achieve the other object of the present invention described above, a characteristic uniforming means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein a judgment on a characteristic is formed from a predetermined position on a sample-count distribution and the magnitudes of offsets for slippages among color components are found to be used in correction of color-component values in order to make the characteristics uniform.

In the present invention with a configuration described above, in addition to a process to find a sample-count distribution for each color component, positions on a sample-count distributions such as upper and lower ends, an average, a median and a mode are also recognized as well, allowing the characteristic of each color component to be recognized from the sample-count distribution for the color component and the identified positions on the sample-count distribution. Since the recognized characteristic can be considered to be a characteristic wherein slippages among color components result in a real color slippage, the magnitudes of offsets for the slippages can be found to be used in the correction of color-component values.

Thus, according to the present invention, since slippages at the positions of a sample-count distribution are taken into account, the magnitudes of offsets among the color components can be evaluated relatively with ease.

In this case, slippages among color components are found by treating the upper and lower ends at the extreme positions of the range of the sample-count distribution as a characteristic of the sample-count distribution.

If individual sample-count distributions are observed, an extremely large number of different distributions are identified. Nevertheless, even for a diversity of sample-count distributions, the upper-end and lower-end positions thereof can be recognized easily in a uniform manner, allowing a characteristic to be acquired with ease.

As another example, the characteristic uniforming means can also be designed into a configuration wherein a position approximately at the center of a sample-count distribution is judged as the characteristic of the sample-count distribution.

In this case, slippages among color components are found by treating an average value, a median or a mode located approximately at the center position of a sample-count distribution as the characteristic of the sample-count distribution.

Similarly, even for a diversity of sample-count distributions, positions thereof such as an average value, a median or a mode located approximately at the center of a sample-count distribution can be recognized easily in a uniform manner, allowing a characteristic to be acquired with ease. In addition, since slippages at positions with a high distribution density are taken into account, the number of errors generated in the correction of the slippages as a whole is small.

In most of ordinary images, by the way, in spite of the fact that there are differences in absolute value among color components, there are no such big differences in frequency-distribution spreading among them. For this reason, it can be said to be rather natural to have uniformed degrees of frequency-distribution spreading among the color components and, in most cases, non-uniformed degrees of frequency-distribution spreading among the color components are therefore not natural.

For this reason, it is thus a further object of the present invention to solve the unnaturalness of the degrees of spreading of the sample-count distributions.

In order to achieve the further object of the present invention described above, the characteristic uniforming means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein the states of sample-count-distribution spreading of the color components are made all but uniform.

In the present invention with a configuration described above, the states of sample-count-distribution spreading of all color components are recognized and made all but uniform.

As a result, according to the present invention, since the states of sample-count-distribution spreading of the color components are made all but uniform, colors can be generated with a high degree of efficiency for each color component from a number of gradations which are effective for the color component but not effectively utilized, allowing a well-pitched image to be reproduced.

Here, the concept of the frequency-distribution spreading can be interpreted in a variety of ways, making it unnecessary to limit the concept to a particular way of interpretation.

As an example, the characteristic uniforming means can be designed into a configuration wherein the right and left ends of the sample-count distribution are shifted outward in order to widen the spreading within an effective gradation range.

In the present invention with a configuration described above, since the width of a sample-count distribution having a mountain-like shape can be recognized by finding the right and left ends of the bottom of the mountain-like shape, the sample-count distribution is transformed into another one by widening the width within an effective gradation range. If the width of the sample-count distribution is stretched only over a portion of the effective gradation range, for example, the image represented by the sample-count distribution can be said to have a weak contrast. In this case, the spreading of the sample-count distribution of each color component is enhanced, that is, the distribution is widened, so that the width thereof occupies the entire effective gradation range in order to make the characteristics uniform. In this context, a characteristic implies the width of a sample-count distribution. It should be noted that the width of a sample-count distribution does not necessarily mean the actual width thereof. The width of a sample-count distribution may imply a net width obtained by cutting off portions of the sample-count distribution each having a predetermined amount at the right and left ends thereof in order to discard sub-ranges that can cause errors.

As a result, according to the present invention, the spreading of only the remaining part of a sample-count distribution, on which a judgment can be formed with ease, is widened by shifting the right and left ends outward, giving rise to a configuration allowing a judgment to be formed easily.

As another example, the characteristic uniforming means can be designed into a configuration wherein a large number of gradations are allocated to a range with a high distribution density while only a small number of gradations are allocated to a range with low distribution density in accordance with the degree of spreading of the sample-count distribution.

In the present invention with a configuration described above, the characteristic uniforming means finds the degree of spreading of a sample-count distribution for each color component. The degree of spreading is then used as a basis for allocating a large number of gradations to a range with a high distribution density and allocating only a small number of gradations to a range with low distribution density. Much like the width of a sample-count distribution, the concept of frequency-distribution spreading corresponds to the way the sample-count distribution is dispersed. The concept of frequency-distribution spreading can thus correspond to a mathematical quantity such as the standard deviation, the variance or the statistical sharpness. When the degrees of spreading each representing the characteristic of a sample-count distribution are made close to each other in an attempt to make the characteristics of color components uniform, the sample-count distribution of each color component is transformed into one with a portion having a high distribution density is widened to cover an allowable range so that the coincidence among the degrees of spreading of the sample-count distributions, which exhibited slippages among color components, can be verified and, at the same time, in the resulting sample-count distribution of each color component, the effective range is utilized as much as possible with no distribution concentrated only on a portion of the distribution range. As a result, an emphasis is put on the contrast as a whole. It is needless to say that the degree of spreading can be a mathematical quantity other than the standard deviation, the variance or the sharpness. In addition, computation in a strict sense is not required for either mathematical quantity, allowing the processing to be made simple.

As a result, according to the present invention, since the concept of frequency-distribution spreading based on a mathematical technique is embraced, an accurate judgment can be formed.

On the other hand, observation of each color component may indicate that balance of brightness is not established. For this reason, it is thus a still further object of the present invention to establish the balance of brightness among color components.

In order to achieve the still further object of the present invention described above, the characteristic uniforming means employed in the image processing apparatus is designed into a configuration wherein degrees of brightness of color components are made uniform by manipulating sample-count distributions thereof.

In the present invention with a configuration described above, since non-uniform degrees of brightness among color components may appear as color slippages, the characteristic uniforming means makes the degrees of brightness of the color components uniform by manipulating sample-count distributions thereof. For example, by positioning a sample-count distribution as a whole on the bright side, the image appears bright. By positioning a sample-count distribution as a whole on the dark side, on the other hand, the image appears dark.

As a result, according to the present invention, by making the degrees of brightness uniform among color components, it is possible to avoid a color slippage which results in only a particular highlighted color component.

It is needless to say that the technique of forming a judgment on the whole brightness can be modified properly. In addition, a variety of techniques can be adopted properly as a method of correction for making an image either brighter or darker.

As an example of correcting the brightness, the characteristic uniforming means can be designed into a configuration wherein a gradation located approximately at the center position of the sample-count distribution is compared with a predetermined gradation in order to form a judgment as to whether the image is bright or dark.

In the present invention with a configuration described above, the characteristic uniforming means compares a gradation located approximately at the center position of the sample-count distribution with a predetermined gradation in an effective gradation range in order to form a judgment as to whether the image is bright or dark.

For example, a median gradation obtained during a process to create a sample-count distribution satisfies conditions of being regarded as a gradation located approximately at the center position of the sample-count distribution. By determining whether such a median gradation is higher or lower than a center gradation of the entire gradation range, it is possible to form a judgment as to whether the degree of brightness is high or low.

As a result, according to the present invention, a gradation located approximately at the center position of a sample-count distribution can be used as a criterion to form a judgment as to whether the degree of brightness is high or low with ease.

As an example of an implementation technique for making degrees of brightness uniform, the characteristic uniforming means described above can also be designed into a configuration wherein degrees of brightness of an image are made uniform among color components by .gamma. correction based on a result of a judgment on the brightness of the image.

In the present invention with a configuration described above, after a judgment on the brightness of an image has been formed by using a variety of techniques, degrees of brightness of the image are made uniform among color components by .gamma. correction based on a result of the judgment. In the case of an image which appears dark, for example, the image as a whole is made brighter by .gamma. correction with the .gamma. parameter set at a value smaller than unity (.gamma.<1) to shift the median gradation to a position closer to the center of the entire gradation range. In the case of an image which appears bright, on the other hand, the image as a whole is made darker by .gamma. correction with the .gamma. parameter set at a value greater than unity (.gamma.>1) to shift the median gradation to a position closer to the center of the entire gradation range.

As a result, according to the present invention, degrees of brightness are made uniform by changing the brightness through .gamma. correction, making the configuration simple by virtue of the wide use of the .gamma. correction.

By the way, in some cases, it is rather characteristics of sample-count distributions not matching each other that are natural. In the case of a scene in the evening, for example, it is not unnatural to have only a color pertaining to the red color group. In such a case, it is rather unnatural to uniform characteristics judged from sample-count distributions for color components.

For this reason, it is thus a still further object of the present invention not to make characteristics uniform in an unnatural way.

In order to achieve the still further object of the present invention described above, the characteristic uniforming means employed in the image processing apparatus is designed into a configuration including a correction control means whereby the degree of analogy among sample-count distributions of gradation-color-specification data of color components is found and, if the degree of analogy is found low, the color balance is not corrected.

In the present invention with a configuration described above, the correction control means finds the degree of analogy among sample-count distributions of gradation-color-specification data of color components and, if the degree of analogy is found low, the color balance is not corrected.

In the present invention with a configuration described above, first of all, the correction control means forms a judgment on the degree of analogy among sample-count distributions of gradation-color-specification data of color components. In the case of a scene obtained in the evening with the color system comprising the red (R), the green (G) and the blue (B), sampled-count distributions in favor of only the red color are obtained. The sampled-count distributions for the blue and green colors are reduced considerably. In such a case, it is rather natural to see the non-uniform characteristics of the sample-count distributions and an extremely low degree of analogy among them. Therefore, it is not necessary to make the characteristics of the sample-count distributions uniform. When the color components appear as values in close proximity to an average, on the other hand, the degree of analogy among the sample-count distributions thereof is judged to be high. In such a case, by making the characteristics of the sample-count distributions match each other, the magnitude of a systematic error inherent in the image inputting apparatus can be reduced.

As a result, according to the present invention, since characteristics are not made uniform deliberately for a low degree of analogy among sample-count distributions, it is possible to prevent an unnatural picture from being generated as a result of making characteristics uniform in a case where a slippage in the balance of color is natural.

When forming a judgment on a degree of analogy among sample-count distributions, it is not always necessary to individually compare the distributions for all gradations.

For this reason, it is thus a still further object of the present invention to simplify the way of obtaining a statistical value representing a sample-count distribution.

In order to achieve the still further object of the present invention described above, the correction control means employed in the image processing apparatus is designed into a configuration wherein the gradation range that the gradation-color-specification data can have is divided into a plurality of zones and a judgment on a degree of analogy among color components is formed by comparing portions of a sample-count distribution in the zones with those of other distributions in the corresponding zones.

In the present invention with a configuration described above, the gradation range that the gradation-color-specification data can have is divided into a plurality of zones and a judgment on a degree of analogy among color components is formed by comparing portions of a sample-count distribution in the zones with those of other distributions in the corresponding zones.

As a result, according to the present embodiment, since a judgment on a degree of analogy among color components is formed by comparing portions of a sample-count distribution in the zones with those of other distributions in the corresponding zones, the amount of labor to form a judgment is reduced in comparison with the formation of such a judgment by comparing sample counts for each gradation over the gradation range.

On the other hand, a variety of techniques for forming a judgment on a degree of analogy among sample-count distributions can be adopted. For this reason, it is thus a still further object of the present invention to provide a technique for forming a judgment on a degree of analogy among sample-count distributions with ease.

In order to achieve the still further object of the present invention described above, the correction control means employed in the image processing apparatus is designed into a configuration wherein formation of a judgment on a degree of analogy among sample-count distributions of color components is based on inner products of characteristic vectors each representing one of the sample-count distributions. To put it in detail, the sum of sample counts in each of the zones of a sample-count distribution is used as a member of the characteristic vector representing the sample-count distribution.

It is easy to check a correlation among sample-count distributions of color components by using such inner products. In the technique provided by the present invention for forming a judgment on a degree of analogy among sample-count distributions, inner products of characteristic vectors each representing a correlation among color components are found by treating the sum of sample counts in each of the zones of a sample-count distribution as a member of the characteristic vector representing the sample-count distribution. A highest degree of analogy is indicated by an inner product having a value of unity. For a low degree of analogy, on the other hand, the value of the inner product approaches a zero. In treating the sum of sample counts in a zone of a sample-count distribution as a member of the characteristic vector representing the sample-count distribution, it is not always necessary to take sample-count sums in all the zones as members. Only sample-count sums in some selected zones can serve as members.

As a result, according to the present invention, since formation of a judgment on a degree of analogy among sample-count distributions is based on inner products of characteristic vectors representing the sample-count distributions, such a judgment can be formed with ease.

When making a decision as to whether or not to make characteristics uniform in the case of a low degree of analogy, the decision does not have to be based on selection of one two choices obtained as a result of comparing a degree of analogy with a threshold value. This is because it is quite within the bounds of possibility that the two choices have a discontinuous value on a boundary thereof, making it difficult to select one of them.

For this reason, it is thus a still further object of the present invention to provide a technique for making a decision as to whether or not to make characteristics uniform whereby the decision is not based on selection of one of two choices.

In order to achieve the still further object described above, the image processing apparatus provided by the present invention is designed into a configuration wherein an effective value is provided for making a decision as to whether or not to make characteristics uniform. In the configuration, the correction control means is in essence capable of making a decision as to whether or not to make characteristics uniform by varying the effective value and making the effective value continuously variable.

In the present invention with a configuration described above, the image processing apparatus provides an effective value used in making a decision as to whether or not to make characteristics uniform and the correction control means in essence makes a decision as to whether or not to implement the correction by varying the effective value. A window function is effective for controlling such a decision making mechanism. To put it in more concrete terms, the effective value is multiplied by a window function, the value of which is set at unity when it is desired to implement the correction or at a zero when it is desired not to implement the correction.

Assume that the effective value is in the range 0 to 1. In a region where the effective value changes from 0 to 1 or from 1 to 0, the change maybe non-continuous, often causing the outcome of a judgment on the degree of analogy to subtly vary in accordance with how pieces of gradation-color-specification data are put to use. As a result, a judgment on even on the very same image may produce two outcomes opposite to each other. As a measure taken for countering such a case, the effective value is made continuously variable over such a region by multiplying it by a window function. It is needless to say that the window function can have a variety of forms. In some cases, the window function can exhibit an exceptional behavior such as making the effective value effective in a region with a low degree of analogy. In other cases, the window function can display just an opposite behavior. Of course, the effective value cited above is a value contributing much to the correction. Examples of the effective value are a correction quantity, a compensation quantity and an offset quantity. On the other hand, the value of the window function can be a variable used in a process of manipulating the effective value.

As a result, according to the present invention, it is possible to make discontinuity difficult to appear in a result of the image processing by making the effective value used in uniforming characteristics continuously variable.

Efforts to make characteristics uniform based on sample-count distributions found for color components have been explained so far. However, a more efficient technique for recognizing the characteristics of the sample-count distributions remains to be identified. For this reason, it is thus a still further object of the present invention to recognize characteristics in an efficient way.

In order to achieve the still further object of the present invention described above, the characteristic uniforming means employed in the image processing apparatus is designed into a configuration including a color-slippage computing means for finding a color slippage of gradation-color-specification data from slippages in value among color components in low-brightness and high-brightness zones of the gradation-color-specification data.

It is not easy to recognize which color is emphasized in the gradation-color-specification data described above. This is because, in the case of an image composed of picture elements arranged to form a matrix, the image data of each picture elements has a component value corresponding to the color of the real image so that, by merely looking at each component value, it is impossible to form a judgment as to whether or not a color slippage from the real image exists.

In the present invention with a configuration described above, on the other hand, the color-slippage computing means finds color-component values in low-brightness and high-brightness zones of gradation-color-specification data on the premise that the gradation-color-specification data is composed of all but equal color components. In low-brightness and high-brightness zones of the gradation-color-specification data which mean the black and white colors respectively, the color components should have an equal value so that, in many cases, color components having values different from each other in these zones can be seen as an evidence of a color slippage. For this reason, the values of color components in these zones are compared with each other and a slippage in value among color components can be used to form a judgment that there is a color slippage in the gradation-color-specification data.

As a result, according to the present invention, a color slippage can be found automatically by recognizing a slippage in value among color components in a zone that should naturally have an equal value for all the color components.

Here, gradation-color-specification data composed of all but equal color components is taken as an object of processing. The approximate equality allows the utilization of a property of the gradation-color-specification data exhibiting that the color components have an equal value in the low-brightness and high-brightness zones. As a result, any gradation-color-specification data can be used as an object of processing as long as the data has such a property. This is because, even if there is no readily available equality relation, such a property allows transition to an equal-value environment through predetermined transformation operations. Assume, for example, that gradation-color-specification data of an L*a*b color system is supplied. By performing color transformation of the supplied data into one with color components having an equal relation such as the RGB color components, the technique described above can be applied to the gradation-color-specification data. It should be noted that, in general, the amount of color-transformation processing is large. In the case of the present invention, however, since the processing is limited to some particular zones, that is, the low-brightness and high-brightness zones described above, the amount of the processing can be decreased, allowing the processing to be carried out by using only few resources.

In addition, the processing of a color slippage can be basically positioned at any stage in the flow of the image processing. That is to say, the color-slippage processing can be carried out after other transformation processing, or prior to the other transformation processing so that the other processing can be carried out after elimination of color slippages. It is needless to say that the latter sequence is preferred.

The low-brightness or a high-brightness zone is the so-called colorless zone, a zone in which color components have an equal value. Thus, a zone in which color components have an equal value can be changed properly. For example, the range of gradation-color-specification data of image data is sufficiently narrower than what the range should naturally be. The gradation-color-specification data can undergo transformation processing if the range includes a low-brightness or a high-brightness zone. It is needles to say that, since the existence of a color slippage is set forth as a premise, the word 'equal' used in the statement "the color components have an equal value" is not to be construed to imply the word "coincident" in a strict sense.

As described above, in the low-brightness and high-brightness zones, color components have an equal value. For this reason described, it is thus a still further object of the present invention to find a color slippage with a high degree of accuracy.

In order to achieve the still further object of the present invention described above, the color-slippage computing means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein a color slippage can be found with a high degree of accuracy.

In general, it is the high-brightness zone that is prone to the problem of a color slippage. This is because, in spite of the fact that a color slippage exists in a low-brightness zone, a change in color caused by a difference in value between color components in the low-brightness zone is hardly seen by the eyes of a human being. Thus, by forming a judgment on a color shift cause by a difference in value among color component only in the high-brightness zone, it is possible to recognize a color slippage only in a range that can be seen with ease by the eyes of a human being as a problem caused by the color slippage.

As a result, according to the present invention, by treating only the high-brightness zone as an object of observation, the amount of processing can be reduced and, at the same time, only a color slippage in a more practical zone can be recognized.

As for differences in value among color components in a zone having a predetermined degree of brightness, it will be satisfactory if a color slippage can be found with a high degree of accuracy by recognizing the trend of variations in value for each color components in a range of brightness having a certain width in a broad sense.

For the reason described above, it is thus a still further object of the present invention to find a color slippage with ease.

In order to achieve the still further object of the present invention described above, the color-slippage computing means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein a judgment on the existence of a color slippage is formed by finding a slippage in value among color components for the same degree of brightness.

To put it in detail, for image data with a certain degree of brightness in a high-brightness zone, if an observation of component-color values thereof indicates that the component-color values are not equal to each other, the difference in value among the color components is regarded as a color slippage. By the same token, for image data with a certain degree of brightness in a low-brightness zone, if an observation of component-color values thereof indicates that the component-color values are not equal to each other, the difference in value among the color components is regarded as a color slippage.

As a result, according to the present embodiment, since a judgment on a color slippage is formed by finding a slippage in value among color components for the same degree of brightness, the processing is simple in comparison with processing in which a range of degrees of brightness are treated as an object of the processing.

In addition, it is a still further object of the present invention to pursue a higher degree of universality.

In order to achieve the still further object of the present invention described above, the color-slippage computing means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein, for each color component, a representative value of gradation-color-specification data corresponding to a degree of brightness, for which a color slippage is to be recognized, is found and a difference between the representative value and the degree of brightness is judged to be a color slippage.

Also in this case, much like the configuration of the present invention described above, a color slippage for each color component at a certain degree of brightness is recognized by finding a representative value of each color component. In case there are some pieces of gradation-color-specification data corresponding to the degree of brightness, a value that can be said to be the representative value such as an average value representing the pieces of gradation-color-specification data is calculated. In the case of gradation-color-specification data composed of all but equal color components, if a maximum value exists in a range of values that color components can have, the degree of brightness for the maximum value is also highest and, if a minimum value exists in a range of values that color components can have, the degree of brightness for the minimum value is also lowest. If a color slippage does not exist in the low-brightness and high-brightness zone, a coinciding relation is seen in brightness values among the color components. Thus, by using a difference between the representative value and the brightness value, a judgment on a universal color slippage can be formed.

As a result, according to the present invention, by finding a representative value of gradation-color-specification data corresponding to a certain degree of brightness for each color component, the reliability of the data can be enhanced and, in addition, since a difference between the representative value and the degree of brightness is judged to be a color shift, it is possible to carry out extremely concise processing.

Even if only the low-brightness or high-brightness zone is taken into consideration, at a minimum or maximum degree of brightness among an entire range of values that the brightness can have, the values for all color components are equal to a minimum or maximum sample count, most likely indicating a circumstance as if no color slippage were generated.

For the reason described above, it is thus a still further object of the present invention to detect a color slippage with a high degree of reliability.

In order to achieve the still further object of the present invention described above, the color-slippage computing means employed in the image processing apparatus provided by the present invention is designed into a configuration wherein a brightness distribution of gradation-color-specification data is tabulated, an upper pseudo end is determined at a distance from the upper true end of the reproducible range of brightness so that the sum of sample counts between the upper pseudo end and the upper true end is equal to a predetermined fraction of the total number of all samples, a lower pseudo end is likewise determined at a distance from the lower true end of the reproducible range of brightness so that the sum of sample counts between the lower pseudo end and the lower true end is equal to the predetermined fraction of the total number of all samples and slippages of color-component values at the upper and lower pseudo ends are found.

It is naturally desired to find a slippage in value among color components at the highest or lowest degree of brightness of the gradation-color-specification data. In the real state of the found brightness distribution, however, sample counts at each of the true ends is most likely an extreme value generated by a cause such as noise. In this case, the sample counts at the true ends are equal to the maximum or minimum sample counts which is uniform for all color components, making it perhaps impossible to form a judgment on a slippage. Thus, by using a statistical technique, upper and lower pseudo ends on a tabulated brightness distribution are determined at a distance from the upper and lower true ends of the distribution range respectively so that the sum of sample counts between the upper pseudo and true ends and that between the lower pseudo and lower true ends are each equal to a predetermined fraction of the total number of all samples in order to provide sample counts for comparison among color components in a true sense at the pseudo ends by exclusion of a sample count caused by noise or the like. Accordingly, by finding color slippages at the pseudo ends from color-component values, effects of noise and the like can be removed.

As a result, according to the present invention, with such a degree of brightness at which a color slippage is found, a sample count generated by a cause such as noise can be excluded by a statistical technique, allowing a color slippage to be found with an even higher degree of accuracy.

It is needless to say that, after a judgment on the existence of a color slippage in gradation-color-specification data has been formed in this way, the color-component values of the gradation-color-specification data are corrected in order to absorb the recognized color slippage. In a concrete implementation of the technique for correcting color-component values, the color-component values are corrected individually. As an alternative, a new filter is created to be used in the correction. As another alternative, on the premise that another color transformation is to be carried out, color-component values are corrected by changing the contents of a table used in the other color transformation or parameters used in interpolation processing.

In the correction of color-component values for a recognized color slippage described above, a recognized color slippage does not necessarily match a correction quantity, a quantity by which a color-component value should be corrected.

For example, assume that the recognized color slippage has a value of +20. In this case, theoretically, the color slippage can be eliminated by adding a product of a parameter of -1 and the color slippage to the color-component value to be corrected. In reality, however, the correction of the color-component value is carried out by using a compressed parameter of typically -0.5 instead of the theoretical parameter -1.

For the reason described above, it is thus a still further object of the present invention to obtain an even better result of correction based on a color slippage.

In order to achieve the still further object of the present invention described above, the characteristic uniforming means employed in the image processing apparatus provided by the present invention is designed into a configuration including a color-slippage correcting means whereby a compressed recognized color slippage is used for correcting a color-component value.

A color slippage used in the correction of a color-component value is a color slippage recognized in a low-brightness or high-brightness zone as described above. In some cases, such a color slippage can not be said to be an appropriate correction quantity for each gradation. In order to solve this problem, a color slippage recognized at a predetermined gradation is adapted to other gradation values by adopting a linear technique. It is then an adapted color slippage that is used in the correction of a color-component value.

Assume, for example, that a color slippage +a and a color slippage +b are recognized at a degree of brightness L in the low-brightness zone and at a degree of brightness H in the high-brightness zone respectively. In this case, at a gradation value (L+X) at a distance X from the degree of brightness L, a correction quantity to be used in the correction of a color-component value is expressed by X * (b-a)/(H-L)+a. Here, the color slippage is subject to linear interpolation. It should be noted that better correction can be applied to the color slippage. For example, color slippages at a plurality of points are found to be used in non-linear processing to compute a correction value.

As a result, according to the present invention, by applying a compressed color slippage in correction of a color-component value instead of using a detected color slippage in the correction as it is, the result of the correction in a sense of feeling is improved. In addition, since a color-component value is corrected by using a correction quantity adapted to each gradation, a color slippage can be absorbed with a high degree of accuracy.

By the way, according to one aspect of the present invention, such an image processing apparatus is implemented by an embodiment which exists as stand-alone equipment while, according to another aspect of the present invention, the image processing apparatus is implemented by an embodiment incorporated in equipment. In addition, the image processing apparatus can also be implemented by software, hardware or a combination of software and hardware which can each be properly modified.

Assume, as an example, a printer driver wherein image data composed of a dot matrix as represented by gradation-color-specification data comprising all but equal color components is transformed into image data adjusted to printing ink to be printed on a predetermined color printer. Also in the configuration of the printer driver, a statistical quantity representing a sample-count distribution of the gradation-color-specification data is found for each color component, characteristics of the color components are uniformed by using the statistical quantity as a base and image data made uniform in this way is printed.

As described above, the printer driver transforms image data supplied thereto into image data adjusted to printing ink to be printed on a color printer. At that time, a sample-count distribution of the image data is found for each color component and the transformation is carried out so as to uniform characteristics identified from the sample-count distributions among the color components prior to the printing. To put it in detail, the sample-count distributions found for the color components are compared with each other and then corrected so as to make the sample-count distributions uniform. As a result, the balance of color as a whole is adjusted and, at the same time, good component colors are generated from individual picture elements.

In addition, the printer driver for transforming image data supplied thereto as gradation-color-specification data composed of all but equal color components into image data adjusted to printing ink to be printed on a predetermined color printer can be designed into a configuration wherein a color slippage of the gradation-color-specification data is found from slippages in value among color components in low-brightness and high-brightness zones of the image data supplied thereto and color-component values of the gradation-color-specification data are individually corrected to absorb the recognized color slippage.

That is, the printer driver transforms image data supplied thereto into image data adjusted to printing ink to be printed on a color printer. At that time, a color slippage is found in the so-called colorless portions such as the low-brightness and high-brightness zones. Then, color-component values of the gradation-color-specification data are individually corrected so as to absorb the recognized color slippage prior to the printing.

If the concept of the present invention is implemented concretely by software executed in an image processing apparatus, it is a matter of course that the software is most likely made available for use in a recording medium for storing the software.

It is needless to say that the recording medium can be a magnetic recording medium or an optical magnetic recording medium. Even recording medium to be developed in the future can be considered as the recording medium in entirely the same way as the magnetic recording medium or the optical magnetic recording medium. In addition, there is no room at all for a doubt as to the equivalence of a copy-level product such as a primary copy product or a secondary copy product to the recording medium. Furthermore, the present invention will have the same effects even if applied to an application wherein the software is transmitted to the image processing apparatus through a communication line by a software supplying apparatus functioning on the software supplying side.

In addition, the concept of the present invention can be implemented partially by software and partially by hardware to give exactly the same effects. According to one aspect of the present invention, some of the software is embedded in the hardware while the rest is stored in a recording medium to be loaded into the hardware whenever necessary. Furthermore, it is needless to say that the present invention can also be applied to a wide range of image processing apparatuses including a color facsimile machine, a color copy machine, a color scanner, a digital still camera and a digital video camera.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an image processing system employing an image processing apparatus as implemented by the first embodiment of the present invention;

FIG. 2 is a block diagram showing a typical hardware configuration of the image processing apparatus shown in FIG. 1 in concrete terms;

FIG. 3 is a block diagram showing an application of an image processing apparatus provided by the present invention in a simple and plain manner;

FIG. 4 is a block diagram showing another application of an image processing apparatus provided by the present invention in a simple and plain manner;

FIG. 5 is a flowchart showing pieces of processing carried out by a picture-element-count-distribution detecting means and an analogy-degree judging means employed in the image processing apparatus provided by the present invention;

FIG. 6 is a flowchart showing pieces of processing which are carried out by an offset correcting means, a contrast correcting means and a brightness correcting means employed in the image processing apparatus provided by the present invention;

FIG. 7 is a diagram showing coordinates in an image to be transformed;

FIG. 8 is a diagram showing a sampling period;

FIG. 9 is a diagram showing sampled-picture-element counts;

FIGS. 10a-c are diagrams each showing a relation between an image to be transformed and picture elements thereof to be sampled;

FIG. 11 is a diagram showing an array of variables for holding picture-element counts used for forming picture-element-count distributions;

FIG. 12 is a flowchart representing a thinning process to extract gray picture elements;

FIG. 13 is a diagram showing a black-and-white image;

FIG. 14 is a diagram showing a picture-element-count distribution of a black-and-white image;

FIGS. 15a-f are diagrams showing picture-element-count distributions of color components of natural and unnatural pictures;

FIG. 16 is a diagram showing an image having a frame on the circumference thereof;

FIG. 17 is a diagram showing picture-element-count distributions of color components of an image having a frame on the circumference thereof;

FIG. 18 is a diagram showing a picture-element-count distribution including end portions obtained from end processing of the distribution;

FIG. 19 is a diagram showing a method for extracting members of a characteristic vector from a picture-element-count distribution represented by the vector;

FIG. 20 is a diagram showing a linear relation between RGB color components of a photographic object and the RGB components of image data representing the photographic object;

FIG. 21 is a diagram showing a transformation table used for carrying out transformation of image data based on picture-element-count distributions;

FIG. 22 is a diagram showing an enlarged gradation range and a full gradation range o f picture-element-count distributions;

FIGS. 23a-23b are diagrams each showing a case in which limits are imposed on the enlargement factor of the contrast of an image;

FIG. 24 is a diagram showing picture-element-count distributions of color components required for uniforming the brightness;

FIG. 25 is a diagram showing transformation relations between the input and the output of .gamma. correction;

FIG. 26 is a diagram showing an S curve representing a relation between the input and the output of transformation processing to put an emphasis on the contrast of an image;

FIG. 27 is a diagram showing a transformation relation obtained by interpolation based on specific points of transformation;

FIG. 28 is a flowchart representing part of processing to correct the contrast and the brightness of an image based on a relation represented by an S curve;

FIG. 29 is a diagram showing ways in which an image processing program is transferred from a recording medium used for storing the program to a hard disk;

FIG. 30 is a diagram showing a graph representing a state of change in value of a window function used for adjusting an offset quantity;

FIG. 31 is a flowchart of an image processing program used for adjusting an offset quantity by using a window function;

FIG. 32 is a diagram showing a graph representing another state of change in value of a window function used for adjusting an offset quantity;

FIG. 33 is a block diagram showing an image processing system employing an image processing apparatus as implemented by another embodiment of the present invention;

FIG. 34 is a block diagram of a digital still camera, an application in which the image processing apparatus provided by the present invention is used;

FIG. 35 is a diagram showing the configuration of a printer driver, another application in which the image processing apparatus provided by the present invention is used;

FIG. 36 is a diagram showing an order in which pieces of processing are carried out in the image processing apparatus provided by the present invention;

FIG. 37 is a diagram showing another order in which pieces of processing are carried out in the image processing apparatus provided by the present invention;

FIG. 38 is a flowchart representing processing to correct a color slippage by the image processing apparatus provided by the present invention;

FIG. 39 is a graph showing a characteristic of image data;

FIG. 40 is a graph showing a state of slippages among color-component values at a high-brightness zone;

FIG. 41 is a graph showing a state of slippages among color-component values at a low-brightness zone; and

FIG. 42 is a diagram showing a range of processing brightness obtained for a picture-element-count distribution.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention will become more apparent from a careful study of the following detailed description of some preferred embodiment s with reference to the accompanying diagrams.

First Embodiment

A first embodiment is described by referring to accompanying diagrams as follows.

FIG. 1 is a block diagram showing an image processing system implemented by the first embodiment of the present invention and FIG. 2 is a block diagram showing a typical hardware configuration in concrete terms.

As shown in the figures, an image inputting apparatus 10 picks up an image, outputting image data to an image processing apparatus 20. The image processing apparatus 20 carries out image processing on the image data such as uniforming characteristics thereof, outputting results of the image processing to an image outputting apparatus 30. The image outputting apparatus 30 displays an image with the contrast thereof emphasized.

Examples of the image inputting apparatus 10 are a scanner 11, a digital still camera 12 and a video camera 14 whereas typical implementations of the image processing apparatus 20 include a computer system comprising a computer 21 and a hard disk 22. Examples of the image outputting apparatus 30 are a printer 31 and a display unit 32. Of course, the image outputting apparatus 30 can also be implemented by equipment such as a color copy machine or a color facsimile machine in addition to the examples cited above.

In the present image processing system, an attempt is made to correct an image with poor color reproducibility caused mainly by a color slippage. Thus, data produced by the image inputting apparatus 10 such as image data obtained as a result of picking up an image by a scanner 11, image data obtained as a result of picking up an image by a digital still camera 12 or dynamic-image data picked up by a video camera 14 is data to be processed. Such data is supplied by the image inputting apparatus 10 to a computer system which functions as the image processing apparatus 20. It should be noted that, in the case of dynamic-image data supplied by a video camera 14, the processing speed of the computer system may not be high enough for keeping up with variations of the dynamic image. In such a case, an initial condition required for the processing time is set for each scene. By carrying out only image transformation for each frame with the same condition setting in an operation to pick up a dynamic image, the speed problem can thus be solved.

The image processing apparatus 20 comprises at least a picture-element count-distribution detecting means for detecting a picture-element-count distribution of each color component, an analogy-degree judging means for judging the degree of analogy among picture-element-count distributions of color components, an offset correcting means for identifying slippages among color components from the picture-element-count distributions in order to make the color components uniform, a contrast correcting means for identifying slippages in degree of contrast among color components from the picture-element-count distributions in order to make the contrasts of the color components uniform and a brightness correcting means for identifying slippages in brightness among color components from the picture-element-count distributions in order to make the brightness amounts of the color components uniform. It is needless to say that, in addition to the means described above, the image processing apparatus 20 may include a color changing means for correcting a difference in color caused by a difference in machine type and a resolution changing means for changing the resolution in accordance with the type of the machine. In this example, the computer 21 uses components such a RAM unit in execution of image processing programs stored in an internal ROM unit and the hard disk 22. In addition to the internal ROM unit and the hard disk 22, these programs can of course be stored in portable storage media such as a flexible disk 41 and a CD-ROM 42 as well as other kinds of storage medium shown in FIG. 29. As shown in FIG. 29, these programs can be installed in a hard disk 43, provided in an IC card having a ROM unit 44 or a RAM unit 45 therein or stored in a storage medium connected to the information processing apparatus 20 through a communication line 46a and communication equipment such as a modem 46b. In the case of the communication line 46a, the other end of the communication line 46a is connected to a file server 46c for supplying certain software.

As an execution result of the image processing program, well pitched image data with corrected color reproducibility to be described later is obtained. The image data obtained in this way is used as a basis for printing the image on the printer 31 serving as the image outputting apparatus 30 or displaying the image on the display unit 32 which is also used as the image outputting apparatus 30. It should be noted that, to put it in concrete terms, the image data is gradation data comprising 256 gradations for each of the RGB (red, green and blue) colors. In addition, the image is data of a matrix of dots arranged to form a lattice shape in the vertical (height) and horizontal (width) directions.

In the present embodiment, a computer system is incorporated between the image in putting and outputting apparatuses as described above. It should be noted, however, that a computer system is not necessarily required. For example, FIG. 3 shows an image processing system wherein an image processing apparatus playing a role of correcting color reproducibility or the like is embedded in a digital camera 12a and an image based on transformed image data is displayed on a display unit 32a or printed on a printer 31a. In addition, FIG. 4 shows an image processing system wherein a printer 31b for printing image data supplied thereto directly without passing through a computer system automatically corrects color reproducibility of image data coming from a scanner 11b, a digital camera 12b or a modem 13b.

Image processing executed by the computer 21 includes pieces of processing carried out by the picture-element count-distribution detecting means and the analogy-degree judging means shown in FIG. 5. FIG. 6 is a flowchart showing pieces of processing which are carried out by the offset correcting means, the contrast correcting means and the brightness correcting means if the degree of analogy among color components is not small. It should be noted that, in a broad sense, the analogy-degree judging means can be said to include a control means for controlling the effectiveness of processing carried out at a later stage in accordance with the degree of analogy.

FIG. 5 is a diagram mainly showing processing to recognize a picture-element-count distribution for each color component. First of all, picture elements, among which gradations are distributed, are explained.

Even though a distribution among all picture elements can be found, it is not always necessary to find a distribution among all the picture elements since the purpose of finding distribution is to identify a characteristic trend. Thus, it is possible to adopt a thinning technique that may result in an error to a certain degree within an allowable range. As shown in FIG. 5, the flowchart of the present embodiment begins with a step S102 at which a thinning process is carried out to select picture elements, among which distribution of gradations needs to be taken into account. In the case of N samples, a statistical error is about 1/(N**(1/2)) where notation ** means involution, that is, an operation to raise N to (1/2)th power of N. Thus, in order to make the error smaller than 1%, it is necessary to take at least 10,000 samples (N=10,000) or 10,000 picture elements in this case.

In the case of a bit-map image like one shown in FIG. 7, the image is a two-dimensional dot matrix comprising a predetermined number of dots arranged in the vertical direction and a predetermined number of dots arranged in the horizontal direction. This bit-map image thus comprises (Width.times.Height) picture elements where notation Width is the number of picture elements arranged in the horizontal direction whereas notation Height is the number of picture elements arranged in the vertical direction. A sampling-period ratio is defined by Eq. (1) as follows:

where min(Width, Height) is the smaller one of Width and Height and notation A is a constant. The sampling-period ratio is a ratio of the total number of picture elements to the number of picture elements to be sampled, that is, the number of picture elements, only one of which is taken as a sample. Let an intersection shown in FIG. 8 indicate a picture element and a circle on an intersection shown in the figure denote a sampled picture element. In this case, since sampling is carried out for each two picture elements, the sampling period ratio is 2. That is, one sampling operation is carried out every other picture element arranged in both the vertical and horizontal directions. For A=200, the number of sampled picture elements on a line is shown in FIG. 9.

As is obvious from the figure, except for a sampling-period ratio of 1 for which no sampling (no thinning) is carried out, that is, each picture element is taken into account, in the case of a bit-map image with a width of at least 200 picture elements, the number of picture elements to be sampled is seen to be greater than 100. Thus, in the case of a bit-map image with a width and height each equal to or greater than 200 picture elements, it is necessary to assure that the number of picture elements to be sampled is at least 100.times.100=10,000 in order to make the error equal to or smaller than 1%.

The reason why min (width, height) is taken as a reference is explained as follows. Consider a bit-map image like one shown in FIG. 10A with width>>height. In this case, if the sampling-period ratio is determined by using the width which is much greater than the height, a large sampling-period ratio or a small number of picture elements to be sampled is obtained. In this case, only picture elements on the two top and bottom lines is most likely extracted in the vertical direction as shown in FIG. 10B. If min (width, height) is taken as a reference, on the other hand, the sampling-period ratio is calculated from the smaller quantity to result in a smaller sampling-period ratio or a larger number of picture elements to be sampled. In this case, picture elements shown in FIG. 10C are to be sampled. As shown in FIG. 10C, even in the vertical direction with fewer picture elements, the thinning technique can be applied to include lines between the top and bottom lines.

It is needless to say that, with respect to picture elements sampled by adopting the thinning technique described above, picture-element counts are found for the 0th to 255th gradations for the R (red) color and stored in an array of variables CNT.sub.-- R (0) to CNT.sub.-- R (255) respectively shown in FIG. 11 in order to recognize the picture-element-count distribution for this red-color component. By the same token, picture-element counts are found for the 0th to 255th gradations for the G (green) color and stored in an array of variables CNT.sub.-- G (0) to CNT.sub.-- G (255) respectively in order to recognize the picture-element-count distribution for this green-color component. Likewise, picture-element counts are found for the 0th to 255th gradations for the B (blue) color and stored in an array of variables CNT.sub.-- B (0) to CNT.sub.-- B (255) respectively in order to recognize the picture-element-count distribution for this blue-color component.

In the example described above, picture-element-count distributions are found by adopting the thinning technique based on an accurate sampling-period ratio for picture elements arranged in the vertical and horizontal directions. It should be noted that this method is also suitable for processing wherein the thinning technique is applied to picture elements which are input sequentially one after another. When applying the thinning technique to a case in which all picture elements have been input, however, picture elements can be selected by specifying their coordinates at random in the vertical and horizontal directions. In this way, for a predetermined minimum required-picture-element count of 10,000, for example, an operation to extract a picture element at random is carried out repeatedly till the 10,000 required picture elements are reached. As the 10,000 picture elements are reached, the operation to extract a picture element is discontinued.

In addition to a simple thinning process described above in which the thinning technique is adopted by specifying only the number of picture elements to be sampled without specifying which picture elements are to be taken as sampling objects, the thinning technique can be applied by specifying which picture elements are to be sampled. For example, small differences in picture-element count among the RGB color components indicate a color close to the gray. In this case, only gray picture elements can be extracted for finding a picture-element-count distribution. This is because, if only gray picture elements are extracted for comparison of picture-element-count distributions, the color characteristic of an input apparatus can be said to be easily judgeable. FIG. 12 is a flowchart representing a thinning process in which only such gray picture elements are extracted. As shown in the figure, the flowchart begins with a step S302 at which a greatest gradation number of a picture element being processed among color components is identified. The flow of processing then goes on to a step S304 at which a smallest gradation number of the picture element being processed among the color components is identified. Then, the flow of processing proceeds to a step S306 at which a maximum gradation difference, that is, the difference between the greatest gradation number identified at the step S304 and the smallest gradation number identified at the step S302, is found. Subsequently, the flow of processing continues to a step S308 to form a judgment as to whether or not the maximum gradation difference is within a range between predetermined threshold values. Typically, in the case of a picture element close to the gray color, the maximum gradation difference is within a range of 52 contiguous gradations. For a maximum gradation difference within such a range of gradations, the flow of processing goes on to a step S310 to include the picture element being processed in a process to find a picture-element-count distribution among gradations for picture elements in the range of gradations. In the case of a maximum gradation difference exceeding such a range of gradations, on the other hand, the color is determined to be a color other than the gray and the picture element being processed is not used in the calculation of a picture-element-count distribution as a gray color. The flow of processing then proceeds to a step S312 to shift the processing to a picture element to be processed next. Then, the flow of processing continues to a step S314 to find out if all object picture elements have been processed. If all object picture elements have been processed, the processing is ended. If not all object picture elements have been processed, on the other hand, the flow of processing returns to the step S302 to repeat the pieces of processing described so far.

As described above, a picture-element-count distribution among gradations of an image selected by adopting the thinning technique is not necessarily appropriate for correcting the image. It is thus necessary to check the following three cases.

The first case is a case of a binary-data image such as a black-and-white image. That is, it is necessary to determine whether or not the image is a black-and-white image. In the case of a binary-data image including a black-and-white image, the concept of color-reproducibility correction is not appropriate. For a black-and-white image like one shown in FIG. 13, the picture-element-count distribution of each color component is shown in FIG. 14. As shown in FIG. 14, the picture-element-count distribution is polarized at the two ends of a distribution range of gradations. To be more specific, the picture-element-count distribution is polarized at the 0th and 255th gradations.

Thus, a black-and-white image can be checked at a step S104 of the flowchart shown in FIG. 5 by forming a judgment as to whether or not the sum of the picture-element counts for the 0th and 255th gradations is equal to the total number of picture elements selected by adopting the thinning technique and by forming such a judgment for each color component. If the sum of the picture-element counts for the 0th and 255th gradations is equal to the total number of picture elements selected by adopting the thinning technique for each color component, that is, if the image is found to be a black-and-white image, the flow of processing goes on to a step S106 to carry out other processing, that is, processing other than correction of color reproducibility of an image, canceling the processing to recognize a picture-element-count distribution for each color component. In the present embodiment, the processing to correct color reproducibility of an image is divided into two major pieces of processing: front-stage processing to recognize a picture-element-count distribution for each color component and a back-stage processing to actually correct image data. In the other processing carried out at the step S106, a flag is set to indiciate that luminance hanging processing is not to be performed at the back stage, terminating the processing to recognize a picture-element-count distribution for each color component.

Binary data is not limited to black-and-white data. That is, binary data may also be color data. Also in the case of such color binary data, processing to correct the color reproducibility is unnecessary as well. Thus, the state of distribution is examined and, if the state of distribution indicates color binary data, the processing to correct color reproducibility of an image is canceled due to the fact that the data is color binary data as is the case with black-and-white data. If data is composed of two colors, the black and an intermediate color, for example, the picture-element-count distribution for each of the color components is also polarized at two gradations as well. If the two colors are the blue and the green, on the other hand, the picture-element-count distribution for the blue-color component is polarized at two gradations but the picture-element-count distributions for the red and green colors are each concentrated at the 0th gradation. In a word, in the case of binary data, the picture-element-count distribution for a color component is either polarized at two gradations or concentrated at a gradation. Thus, by scanning the variable arrays shown in FIG. 11 to count the number of gradations with a non-zero picture-element count, it possible to form a judgment as to whether or not the image is a binary-data image.

The second case is a case of a business graph or a natural picture such as a photograph. That is, it is necessary to determine whether or not the image is a business graph or a natural picture such as a photograph. It is of course necessary to correct the color reproducibility of a natural picture. In the case of a business graph or a painting, however, it is only natural that there is polarization in colors used therein from the beginning. It is thus impossible to carry out processing to make the characteristics of the color components uniform from sample-count distributions for such an image. For this reason, at a step S108 of the flowchart shown in FIG. 5, a judgment as to whether or not the image is a natural picture is formed.

In the case of a natural picture including shadows, there is a large number of colors. In the case of a business graph or a certain painting such as a drawing, however, there is only a limited number of colors used therein. As a result, an image can be judged to be not a natural picture if only few colors are used in the image. With each of the RGB color components including 256 gradations, 16,700,000 different colors can be expressed. An attempt to accurately determine the number of used colors among the 16,700,000 different colors accurately will require as many array variables as the colors. Such a large number of array variables can not practically be implemented. Since picture-element-count distributions have already been found, however, it is possible to determine which gradations are used effectively in each color component. Thus, the number of colors actually used in a natural picture can be determined.

FIGS. 15A to 15C are each a diagram showing an example of a picture-element-count distribution of a business graph. Likewise, FIGS. 15D to 15F are each a diagram showing an example of a picture-element-count distribution of a natural picture. As is obvious from these examples, the picture-element-count distribution of a non-natural picture is a line spectrum. In processing carried out by the computer 21, all the gradations are searched for ones with a non-zero picture-element count and the number of gradations with a non-zero picture-element count is counted and added up for each color component. In the case of a natural picture, the picture-element-count distribution can be considered to be all but uniform over all the gradations for all color components. Thus, the number of gradations with a non-zero picture-element count for the three color components is 768 (=256 per color component.times.3 color components) in most cases. In the case of a business graph, on the other hand, the number of gradations with a non-zero picture-element count for the three color components is only a number of the order of 60 (=20 per color component.times.3 color components) even if the number of colors used in each color component is assumed to be as many as 20. Thus, a threshold value of 200 can be used as an appropriate criterion as to whether an image is a natural or a non-natural picture. That is, if the number of gradations with a non-zero picture-element count for the three color components of an image is equal to or smaller than 200, the image can be judged to be a non-natural picture. If the number of gradations with a non-zero picture-element count for the three color components of an image is greater than 200, on the other hand, the image can be judged to be a natural picture. In the case of a non-natural picture, the flow of processing goes on from the step S108 to the step S106 to carry out the other processing as is the case with a binary data image. It is needless to say that the threshold value can be set at a number other than 200.

In addition, it is also possible to form a judgment as to whether or not the picture-element-count distribution is a line spectrum by finding out whether or not gradations each with a non-zero picture-element count contiguous. That is, non-contiguous gradations each with a non-zero picture-element count indicate that the picture-element-count distribution is a line spectrum. To put it in detail, it is also possible to form a judgment as to whether or not the picture-element-count distribution is a line spectrum by examining a ratio of the number of stand-alone gradations each with a non-zero picture-element count to the total number of gradations each with a non-zero picture-element count. The higher the ratio, that is, the higher the number of stand-alone gradations each with a non-zero picture-element count, the more likely the picture-element-count distribution is a line spectrum. Two adjacent gradations each with a non-zero picture-element count are not counted as stand-alone gradations each with a non-zero picture-element count. On the other hand, a gradation with a non-zero picture-element count which is sandwiched by two gradations each with a zero picture-element count adjacent thereto is counted as a stand-alone gradation with a non-zero picture-element count. In this way, the ratio of the number of stand-alone gradations each with a non-zero picture-element count to a total number of gradations each with a non-zero picture-element count can be found. For example, let both the total number of gradations each with a non-zero picture-element count and the number of stand-alone gradations each with a non-zero picture-element count be 64. In this case, the ratio is equal to unity, indicating that the picture-element-count distribution is obviously a line spectrum.

Furthermore, in a case where an image processing program is executed through an operating system, an image file can be recognized by examining an extension appended to the name of the file. The contents of a bit-map file used in particular for storing a photographic image are compressed. In this case, an extension is often appended to the name of a file to indicate a hint as to what technique of compression was adopted for compression of the contents of the file. For example, an extension 'JPG' indicates that a JPEG format has been adopted for compression of the contents of the file. Since the operating system controls the names of files, if a device driver such as a printer makes an inquiry about the name of a file to the operating system, the operating system will return the name of the file including an extension in response to the inquiry. If the extension indicates that the file contains an image of a natural picture, the ordinary processing to correct the color reproducibility of the image is carried out. An extension 'XLS', an extension inherent to a file for storing a business graph, indicates a non-natural picture. In this case, the other processing described above is performed.

The third case to be taken into consideration is a case of an image with a frame on the circumference thereof. That is, it is necessary to form a judgment as to whether or not a frame exists on the circumference of an image such as one shown in FIG. 16. If the frame is white or black, the picture-element-count distribution of each color component forms a line spectrum at the two ends of a distribution range of gradations representing the frame and a smooth spectrum for gradations between the two ends corresponding to an internal natural picture enclosed by the frame as shown in FIG. 17.

It is needless to say that, since it is proper to exclude a frame from picture-element-count distribution, the existence of a frame can be checked at the step S108 of the flowchart shown in FIG. 5 by forming a judgment as to whether or not the sum of the picture-element counts at the 0th and 255th gradations is sufficiently large and does not match to the total number of picture elements selected by adopting the thinning technique. That is, if the outcome of the judgment formed at the step S108 is YES, the existence of a frame is confirmed in which case the flow of processing goes on to a step S112 to carry out frame processing. If it is desired not to carry out the frame processing, the picture-element counts at the 0th and 255th gradations of the picture-element-count distribution are reset to zero. In this way, the subsequent processing can be carried out in the same way as a case with no frame.

So far, a black or white frame has been described but a frame may be of another specific color. In the case of a frame of a specific color other than black and white, the picture-element-count distribution of each color component forms a protruding line spectrum at a specific gradation representing the frame and a traditional smooth spectrum for the remaining gradations corresponding to an internal natural picture enclosed by the frame. Thus, a line spectrum having a picture-element count with a big difference from the picture-element counts of the adjacent gradations sandwiching the line spectrum can be interpreted as a frame which can be excluded from the picture-element-count distribution. However, the color of the frame may be used also in an area outside the frame. In this case, the same color as the frame used in an area outside the frame is taken into account by taking an average of the picture-element counts of the adjacent gradations sandwiching the line spectrum representing the frame.

After the first and second cases described above have been taken into consideration at the steps S104 and S108 of the flowchart shown in FIG. 5, the flow of processing may eventually go on to a step S114 instead of proceeding to the step S106 for carrying out the other processing be the picture an image of the third case with a frame or an image with no frame. At the step S114, the picture-element counts at both the ends of the gradation range are found. In many cases, the picture-element-count distribution of a natural picture resembles all but a mountain as shown in FIG. 18. It is needless to say, however, that the position and the shape of the picture-element-count distribution varies from image to image. Statistical observation indicates that, at the bottom of the picture-element-count distribution, the picture-element counts approach a zero unlimitedly as the gradation is shifted toward the ends of the gradation range. Thus, in spite of the fact that it becomes important to identify the two ends of the mountain-like shape of a picture-element-count distribution in an attempt to identify the picture-element-count distribution, in actuality, it is most likely impossible to deny the fact that any picture-element-count distribution having a shape resembling a mountain satisfies the condition that the picture-element counts approach a zero as the gradation is shifted toward the ends of the gradation range. Thus, the ends of the gradation range should be excluded from data for comparing picture-element counts with each other since every picture-element-count distribution has a zero picture-element count at the ends of the gradation range anyway.

For this reason, a gradation with a certain picture-element count close the lower true end of the gradation range (that is, the 0th gradation) and a gradation with a certain picture-element count close the upper true end of the gradation range (that is, the 255th gradation) are taken as lower and upper pseudo-end gradations to replace the gradations with a zero picture-element count at the lower and upper true ends of the gradation range respectively. Only a narrower gradation range sandwiched by the lower and upper pseudo-end gradations is taken into account. That is, gradations between the lower true-end gradation and a lower pseudo-end gradation on the left-hand side of the gradation range and gradations between the upper true-end gradation and the upper pseudo-end gradation on the right-hand side of the gradation range are cut off from a picture-element-count distribution under consideration. In the present embodiment, a pseudo-end gradation is determined to result in a predetermined distribution ratio, a ratio of the sum of picture-element counts for all the cut-off gradations to the total number of picture elements. In the case of the picture-element-count distribution ratio shown in FIG. 18, the lower and upper pseudo-end gradations for the red color are set at Rmin and Rmax respectively, each giving a distribution ratio of 0.5%. It is needless to say that the value of the distribution ratio can be changed properly. By cutting off gradations under and above the lower and upper pseudo-end gradations, which are each set at a predetermined distribution ratio in this way, from a picture-element-count distribution under consideration, it is possible to ignore black and white points generated due to causes such as noise. Conversely, if such processing to exclude gradations under and above the lower and upper pseudo-end gradations from a picture-element-count distribution under consideration is not carried out, that is, if the 0th and 255th gradations are taken as upper and lower end gradations respectively as is the case with most picture-element-count distributions, even one existing black or white point may appear as a picture-element count at an end gradation of the picture-element-count distribution. By cutting off gradations under the lower pseudo-end gradation to take out a sum of picture-element counts equal to 0.5% of the total number of picture elements and gradations above the upper pseudo-end gradation to take out a sum of picture-element counts equal to 0.5% of the total number of picture elements as described above, however, this problem can be solved.

A sum of picture-element counts equal to 0.5% of the total number of picture elements selected by adopting the thinning technique or the total number of picture elements excluding the frame is computed in the actual processing. To put it in detail, a sum of picture-element counts at the upper end of the gradation range is found by sequential cumulation starting with the upper true-end gradation having a minimum picture element count in the picture-element-count distribution, that is, the 255th gradation, toward a gradation having a maximum picture element count. The cumulation is ended at an upper pseudo-end gradation as the sum of picture-element counts reaches 0.5% of the total number of picture elements. By the same token, a sum of picture-element counts at the lower end of the gradation range is found by sequential cumulation starting with the lower true-end gradation having a minimum picture element count in the picture-element-count distribution, that is, the 0th gradation, toward a gradation having a maximum picture element count. The cumulation is ended at a lower pseudo-end gradation as the sum of picture-element counts reaches 0.5% of the total number of picture elements. The upper pseudo-end gradations for the RGB color components are referred to as Rmax, Gmax and Bmax respectively. By the same token, the lower pseudo-end gradations for the RGB color components are referred to as Rmin, Gmin and Bmin respectively.

As described above, it may be rather non-uniform picture-element-count distributions of the RGB color components that represent a natural state. In such a case, the color reproducibility should not be corrected. Tracing back from the results of the observation, it is possible to make a decision that picture-element-count distributions of color components which are similar to each other to a certain degree may conversely need to be made uniform while dissimilar picture-element-count distributions should be kept as they are.

For the reason described above, in the present embodiment, the degree of analogy among the picture-element-count distributions of the color components is checked at a step S116 of the flowchart shown in FIG. 5. Let the picture-element-count distributions of the color components be like ones shown in FIG. 19 and the entire gradation range be divided into four zones: 0th to 63rd gradations, 64th to 127th gradations, 128th to 191st gradations and the 192nd to 255th gradations. Consider a characteristic vector having the picture-element counts in the zones as elements thereof for each color components. Let R be the characteristic vector for the red-color component, r63, r127, r191 and r255 be the elements of the characteristic vector R in the four zones and r.sub.-- pixel is the total number of all picture elements. In this case, the characteristic vector R for the red-color component is expressed by Eq. (1) as follows:

By the same token, the characteristic vectors for the green-color and blue-color components can be found. Then, inner products of the characteristic vectors for each two color components are found. To be more specific, an inner product corr.sub.-- rg of the characteristic vectors for the red-color and green-color components, an inner product corr.sub.-- gb of the characteristic vectors for the green-color and blue-color components and an inner product corr.sub.-- br of the characteristic vectors for the blue-color and red-color components are expressed by Eqs. (2), (3) and (4) respectively as follows:

An inner product of two characteristic vectors which is also referred to hereafter as a correlation coefficient can be said to represent the degree of analogy of the two characteristic vectors. The greater the value of an inner product, the higher the degree of analogy between two color components represented by two characteristic vectors represented by the inner product. To put it in detail, an inner product has a value in the range 0 to 1. If even one of the inner products corr.sub.-- rg, corr.sub.-- gb and corr.sub.-- br is equal to or smaller than a threshold value CORR which is typically set at 0.7, the degree of analogy is judged to be low. In this case, the other processing is carried out at the step S106 of the flowchart shown in FIG. 5.

In the present embodiment, the processing based on the inner products of the characteristic vectors constitutes the analogy-degree judging means. A method including processing of inner products of characteristic vectors has been established and a judgment can thus be formed with ease. It is needless to say, however, that the method is not limited to the example explained above. For example, while the entire gradation range is divided into four zones in the case of the example, the number of zones into which the entire gradation range is divided can be set at any arbitrary value greater than four. In addition, the degree of analogy can be found by using a statistical technique based on the end positions, the standard deviation and the sharpness of the picture-element-count distribution.

The following is description of a concrete method for finding the degree of similarity by using such a statistical technique. In a typical statistical technique, representative values or variables of a distribution are used. Differences in average value, the absolute values of differences in center value and differences in standard deviation (variance) between the red-color and green-color components, between the green-color and blue-color components and between the blue-color and red-color components are found. Let Ave.sub.-- rg and Std.sub.-- rg be the absolute values of the difference in average value and the difference in standard deviation between the red-color and green-color components respectively. In this case, let a performance function between the red-color and green-color components be set as follows:

Likewise, let Ave.sub.-- gb and Std.sub.-- gb be the absolute values of the difference in average value and the difference in standard deviation between the green-color and blue-color components respectively. In this case, let a performance function between the green-color and blue-color components be set as follows:

Similarly, let Ave.sub.-- br and Std.sub.-- br be the absolute values of the difference in average value and the difference in standard deviation between the blue-color and red-color components respectively. In this case, let a performance function between the blue-color and red-color components be set as follows:

Distributions similar to each other have all but equal average values, all but equal center values and all but equal standard deviations. Therefore, the differences in variable are each all but a zero, resulting in performance functions h each having a value close to unity. On the other hand, dissimilar distributions exhibit large differences which result in performance functions each having a small value. Thus, by comparing the performance functions with a threshold value found from experiments, it is possible to make a decision as to whether or not correction of color reproducibility is to be carried out. It is needless to say that a center value can be used in the expression of a performance function in place of an average value. At any rate, the performance function is not limited to the expression given above.

When the degree of analogy to a certain extent among the picture-element-count distributions found for the color components from the processing described above has been identified, characteristics of the color components can be judged to be identifiable from the picture-element-count distributions. Then, an attempt is made to establish uniformity among the color components by using the identified characteristics as a basis. It should be noted that, as a result of various judgments described above, in some cases, the other processing is carried out and a flag is set at the step S106 of the flowchart shown in FIG. 5. At a step S202 of the flowchart shown in FIG. 6, the flag is examined. In the case of a flow coming from the step S106 at which the other processing was carried out as evidenced by the set flag, the processing is ended without performing processing to establish uniformity among the color components at steps following S202.

As shown in the flowchart of FIG. 6, the processing to establish uniformity begins with a step S204 at which an offset is computed and then corrected initially. In a narrow sense, the correction corresponds to correction of a color slippage. An offset for uniforming characteristics is an effective value in the present embodiment. Naturally, there must be a relation of direct proportion between RGB color components of a photographic object and the RGB components of image data representing the photographic object like one shown in FIG. 20. However, a transformation characteristic for each component may be shifted due to properties of an image pickup device. With the conventional image processing technology, such a slippage can not be recognized from an ordinary image. If the picture-element-count distributions taken for the color components are found all but similar to each other, it is on the contrary possible to form a judgment that these picture-element-count distributions should originally match each other. In this case, an offset of a slippage for each color component can be detected.

In the case of the present embodiment, the magnitude of an offset of each color component is found