Image processing method and image processing apparatus

Information

  • Patent Grant
  • 6885482
  • Patent Number
    6,885,482
  • Date Filed
    Tuesday, August 1, 2000
    24 years ago
  • Date Issued
    Tuesday, April 26, 2005
    19 years ago
Abstract
An image processing method includes the steps of: separating a luminance signal from a color signal of an original image, and multiscale retinex processing only the luminance signal; and producing an image based on the multiscale retinex processed luminance signal and the color signal of the original image.
Description
BACKGROUND OF THE INVENTION

1. Field of the Invention


The present invention relates to an image processing method for providing a desired, optimum dynamic range to a digital color still picture that has been captured by a digital camera, a monitoring camera, etc.


2. Description of the Related Art


As a method for correcting brightness information, color information, etc., of a digital color still image, a retinex method taking a retina of an eye-ball as a model is proposed, in which a brightness value of an image with a biased dynamic range (dynamic characteristic) is corrected based on local information of the image. In such a retinex method, the visibility of an image can be improved by correcting a low brightness value resulting in a darker portion in the image to a high brightness value, and a high brightness value resulting in a brighter portion in the image to a low brightness value.


As examples of such a retinex method, the single scale retinex method (Daniel J. Jobson, et al., “Properties and Performance of a Center/Surround Retinex,” IEEE Trans. on Image Processing vol. 6, pp. 451-462, March 1997) and the color restoration multiscale retinex method (Daniel J. Jobson, et al., “A Multiscale Retinex for Bridging the Gap Between Color Image and the Human Observation of Scenes,” IEEE Trans. on Image Processing vol. 6, pp. 956-976, July 1997) are proposed.


In the single scale retinex method, a spectrum component Ii(x,y) (i=1, 2, . . . ) of a target pixel I(x,y) in an original image is corrected by a surround function F(x,y) obtained from image information of the surround pixels. The result Ri of retinex processing is shown by expression (1):

Ri=log(Ii(x,y))−log[F(x,y)*Ii(x,y)]  (1)

where “*” denotes a convolution operation.


In this case, the surround function F(x,y) is a function which is based on the image information of the surround pixels with respect to the target pixel I(x,y), which is represented by expression (2):
F(x,y)=Ke-r2/c2(2)

where r denotes a distance (r2=x2+y2) between the target pixel and the surround pixel, and c is a scaling variable. Furthermore, K is a scalar coefficient, which is set so that ∫∫F(x,y)dxdy=1 is satisfied, i.e., the total value of the surround function is 1.


As described above, in the single scale retinex method, the spectrum band components of the target pixel are retinex-processed based on the surround function. On the other hand, in the color restoration multiscale retinex (MSR) method, each of the spectrum band components, Ii, of the target pixel is retinex-processed by N types of scales. In this case, the result of the single retinex process for each of the N scales is multiplied by a weighting factor ωn, and the multiplication results with respect to all the scales are totaled. The result of the multiscale retinex (MSR) processing, RMSRi, is represented by expression (3):
RMSRi=n=1NωnRni(3)


As described above, in the MSR processing, the retinex processing is carried out for each spectrum band component of an image. Therefore, the ratio of the spectrum band components in the image is changed, causing a color shift. According to a conventional technique, such a color shift is corrected by a color restoration function. In this case, at first, a color space of an original image is converted into a relative color space by expression (4):
Ii(x,y)=Ii(x,y)/i=1SIi(x,y)(4)


In expression (4), I′i(x,y) denotes a color component of the original image, and S denotes the number of dimensions of the color space. When the three primary colors (R, G, B) are used, S=3. With such a color component, I′i(x,y), the color correction coefficient Ci(x,y) is obtained by expression (5):

Ci(x,y)=f[I′i(x,y)]  (5)


This color correction coefficient Ci(x,y) can be rewritten as in expression (6):
Ci(x,y)=βlog[αIi(x,y)]=β{log[αIi(x,y)]-log[i=1SIi(x,y)]}(6)

where α and β are constants.


The result of the MSR processing, RMSRi, obtained by expression (3) is corrected by the color correction coefficient Ci(x,y) of expression (6), thereby obtaining the result of the color correction multiscale retinex processing, RMSRCRi(x,y), as shown in expression (7):

RMSRCRi(x,y)=Ci(x,y)RMSRi(x,y)  (7)


The result of the color correction multiscale retinex processing, RMSRCRi(x,y), can be rewritten as in expression (8):
RMSRCRi(x,y)=G[Ci(x,y)n=1Nωn{logIi(x,y)-log[Ii(x,y)*Fn(x,y)]}+b](8)

where G and b are constants.


As described above, the result of the retinex processing that is carried out for each of the spectrum band components of the original image is corrected based on the color correction coefficient, thereby preventing the color shift caused by the change in the ratio of spectrum band components.


Such a color correction multiscale retinex method is applied to a medical photograph, an aerial photograph, or the like. With this method, images, patterns, or the like, which cannot be perceived by a human eye, are corrected so as to be perceived by the human eye. However, such a correction does not faithfully reproduce an object as an image. Thus, the color correction multiscale retinex method is not necessarily a suitable processing method for a monitoring camera, a digital still camera, or the like.


Furthermore, the multiscale retinex method requires a product-sum operation which is necessary for a log operation, an exponentiation operation, and a convolution operation. Therefore, as the number of surround pixels to be referred to increases, the calculation amount also increases. Moreover, a memory with a large capacity is required for storing the information of the two-dimensional surround pixels, the result of intermediate processes, etc. Accordingly, when a device using the retinex method is realized, the economical efficiency thereof might be deteriorated. In addition, since the number of accesses to a memory that stores operation values increases, there occurs a possibility that the processing time might increase.


Especially in recent years, digital cameras with high resolutions in which the number of subjective pixels is one or two megapixels have been developed. In such a digital camera, the time required for the MSR processing further increases.


SUMMARY OF THE INVENTION

According to one aspect of the present invention, an image processing method includes the steps of: separating a luminance signal from a color signal of an original image, and multiscale retinex processing only the luminance signal; and producing an image based on the multiscale retinex processed luminance signal and the color signal of the original image.


In one embodiment of the present invention, the image processing method further includes a step of normalizing the multiscale retinex processed luminance signal based on a gain and an offset.


In another embodiment of the present invention, a one-dimensional function having a symmetric property is used as a surround function for the multiscale retinex processing.


In still another embodiment of the present invention, a part of the one-dimensional function in a range such that the one-dimensional function has a symmetric property is converted into a table.


In still another embodiment of the present invention, the image processing method further includes a step of performing a one-dimensional convolution operation in the multiscale retinex processing.


According to another aspect of the present invention, an image processing apparatus includes: a multiscale retinex processing section for separating a luminance signal from a color signal of an original image, and for multiscale retinex processing only the luminance signal; a first memory for storing a plurality of predetermined constants for use in the multiscale retinex processing; and a second memory for storing a size of the original image and the luminance signal of the original image, wherein an image is produced based on the multiscale retinex processed luminance signal and the color signal of the original image.


In one embodiment of the present invention, the plurality of predetermined constants include the number of multiscales, a scaling variable, and a weighting factor.


In another embodiment of the present invention, the multiscale retinex processed luminance signal is normalized based on a gain and an offset.


In still another embodiment of the present invention, the image processing apparatus further includes a third memory for storing the normalized, multiscale retinex processed luminance signal.


In still another embodiment of the present invention, a one-dimensional function having a symmetric property is used as a surround function for the multiscale retinex processing.


In still another embodiment of the present invention, part of the one-dimensional function in a range such that the one-dimensional function has a symmetric property is converted into a table.


In still another embodiment of the present invention, a one-dimensional convolution operation is performed in the multiscale retinex processing.


Thus, the invention described herein makes possible the advantages of (1) providing an image processing method by which the occurrence of the color shift is prevented, and an image is provided with a superior dynamic range, and (2) providing another image processing method by which the calculation amount in the multiscale retinex method can be reduced, whereby the time required for processing is significantly reduced, and by which the memory capacity for storing calculation values can be reduced, thereby realizing an apparatus using such an image processing method at a low cost.


These and other advantages of the present invention will become apparent to those skilled in the art upon reading and understanding the following detailed description with reference to the accompanying figures.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1A is a flowchart illustrating an example of an image processing method according to the present invention.



FIG. 1B is a flowchart illustrating the multiscale retinex (MSR) processing and the setting of conditions for the MSR processing according to an embodiment of the present invention.



FIG. 2 shows a schematic structure of an apparatus used for carrying out the image processing method according to an embodiment of present invention.



FIG. 3 is a flowchart illustrating a process of a method for setting the conditions for the MSR process in the image processing method according to an embodiment of the present invention.



FIG. 4 is a flowchart illustrating a process of the MSR processing in the image processing method according to an embodiment of the present invention.





DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, an embodiment of the present invention will be described with reference to the drawings.



FIG. 1A is a flow chart showing an outline of an image processing method of the present invention. For the purpose of preventing a color shift in an original image, a luminance signal Y is separated from color signals Cr and Cb, or color-difference signals I and Q. (See step S1 of FIG. 1A.) The separated luminance signal Y is subjected to a multiscale retinex (MSR) processing (step S2). Then, a multiscale retinex processed luminance signal YMSR is normalized by expression (9). In expression (9), u denotes a gain of the normalization, and v denotes an offset of the normalization, which are determined by the number of bits representing a luminance signal, the precision of operations, etc.


Yout=uYMSR+v  (9)


After the multiscale retinex processed luminance signal YMSR has been normalized, an image is produced based on the result of the normalization, YOUT, and the color signals Cr and Cb or the color-difference signals I and Q in the original image, and the produced image is output (Step S3).


The RGB components of a primary color signal of the original image has a relationship between the luminance signal Y and the color signals Cr and Cb as shown in expression (10):
(YCrCb)=(0.300.590.110.70-0.59-0.11-0.30-0.590.89)(RGB)(10)


Furthermore, the RGB components of a primary color signal in the original image has another relationship between the luminance signal Y and the color-difference signals I and Q, as shown in expression (11):
(YIQ)=(0.300.590.110.60-0.28-0.320.21-0.520.31)(RGB)(11)


In a digital camera or the like, the luminance signal Y and the color signals Cr and Cb as represented by expression (10), or the luminance signal Y and the color-difference signals I and Q as represented by expression (11) can be obtained. In the image processing method according to the present invention, only the luminance signal Y is extracted from a signal set including the luminance signal Y and the color signals Cr and Cb or a signal set including the luminance signal Y and the color-difference signals I and Q, and the extracted luminance signal Y is subjected to the multiscale retinex (MSR) processing with respect to each of the N scales as shown in expressions (12) and (13):

Yn=logY(x,y)−log[Fn(x,y)*Y(x,y)]  (12)
YMSR=n=1NωnYn;(13)

In expression (13), a weighting factor ωn is represented by expression (14):
n=1Nωn=1(14)


After the multiscale retinex processed luminance signal YMSR has been obtained, an image is produced based on the luminance signal YMSR and the color signals Cr and Cb or the color-difference signals I and Q of the original image.


The brightness of the resultant image has been corrected by the multiscale retinex method so that the image has the desirable dynamic range. In addition, the possibility of a color shift of the resultant image is eliminated.


In carrying out such an image processing, for the purpose of reducing the calculation amount, a two-dimensional surround function as represented by expression (2) is used as a one-dimensional function as shown in expression (15):
fn(t)=kne-t2/c02(15)


In this case, the scalar coefficient K is set such that one-dimensional function as represented by expression (16) is satisfied:


 ∫fn(t)dt=1  (16)


The function fn(t) as represented by expression (15) is an even function, and has a symmetric property such that a value of the function fn(t) in the range t∈[−c,0] (c is scaling variable), and a value of the function fn(t) in the range, t∈[0,c], are equal to each other. Therefore, only values of the function fn(t) in the range, t∈[0,c], are converted into a stored value table, whereby a value of the function fn(t) can be obtained over the entire range of t∈[−c,c].


Furthermore, in place of a two-dimensional convolution operation of expression (12) for the retinex processing of the luminance signal Y, a one-dimensional convolution operation is performed twice, as shown in expressions (17) and (18), whereby the calculation amount is reduced.

Yn=logY(x,y)−log{fn(y)*[fn(x)*Y(x,y)]}  (17)
Yn=logY(x,y)−log{fn(x)*[fn(y)*Y(x,y)]}  (18)


In expression (17), a convolution operation in the y-axis direction is performed after a convolution operation in the x-axis direction. While, in expression (18), a convolution operation in the x-axis direction is performed after a convolution operation in the y-axis direction.


Furthermore, the two log operations in each of the expressions (17) and (18) can be performed by a single log operation as shown in expressions (19) or (20), respectively:

Yn=log(Y(x,y)/(fn(y)*[fn(x)*Y(x,y)]))  (19)
Yn=log(Y(x,y)/(fn(x)*[fn(y)*Y(x,y)]))  (20)

whereby the calculation amount can be decreased.



FIG. 2 shows a schematic structure illustrating an example of an image processing apparatus that is used for carrying out the above-described image processing method. This image processing apparatus includes: an MSR processing section 11 for receiving and MSR processing an original image; a constant memory 12 for storing various constants used in the MSR processing; an image memory 13 for storing the size of an original image, a luminance value Y, etc.; and an image memory 14 for storing an MSR processed luminance value YMSR, a normalized luminance value YOUT, etc. The image processing apparatus further includes a memory for storing surround function tables 15, 16, and 17 into which surround functions corresponding to the number of scales, N, are converted into a table, and a memory for storing a logarithmic table 18 for log operations.


In such an image processing apparatus, the luminance signal Y is subjected to the MSR processing, as described in step S2 of FIG. 1A. The details of the MSR processing of step S2 are described in FIG. 1B. In the beginning of the MSR processing shown in FIG. 1B, conditions for the MSR processing are set (step S4). After the conditions for the MSR processing have been set, the MSR processing of the luminance signal Y from an original image is performed (step S5).


The process of setting the conditions for the MSR processing in step S4 shown in FIG. 1B is described in the flowchart of FIG. 3. In this case, as a first step in the constant memory 12 the number of multiscales N, a scaling variable cn, the weighting factor ωn, etc., are set. (See step S11 of FIG. 3.) Specifically, for example, when the three scales of small, medium, and large are set in the constant memory 12, the number of multiscales N is set to 3 in the constant memory 12, and the weighting factor ωn is set to ⅓ in the constant memory 12. Furthermore, in the constant memory 12, the scaling variable c1 for the small scale, the scaling variable c2 for the medium scale, and the scaling variable c3 for the large scale are set such that c1=5, c2=160, and c3=400. On the other hand, images are stored in the image memory 13 in a quantized state such as the original image size of 1200×960 and the luminance value Y of 8 bits (0-255), for example.


Next, each of the surround functions with respective scale sizes is converted into a table (step S12). In this case, with respect to each scale, the coefficient kn is set so as to satisfy expression (16), and the function fn(t) calculated by expression (15) is converted into a stored value table in the range of t∈[0,cn].


When three scales of small, medium, and large are set in the constant memory 12, surround function tables 15, 16, and 17 of small scale, medium scale, and large scale, respectively, are stored in the constant memory 12.


Thereafter, a log function of expression (19) is converted into a table based on the bit number representing the luminance signal Y of an original image, the precision of operation, etc. (step S13), and the table is stored in the constant memory 12. Then, the gain u and the offset v, which are coefficients used when the MSR processed luminance value is normalized based on expression (9), are set based on the conditions such as the display range of the luminance signal Y of an original image (step S14). The gain u and the offset v are stored in the constant memory 12.


In the last step (step S15), as an operation condition in the MSR processing section 11, a condition is established such that operations are performed in the order of expressions (19), (14), and (9).


After such a condition has been established, the MSR processing section 11 MSR processes the luminance signal Y from the original image (step S5 of FIG. 1B). The details of the MSR processing of step S5 of FIG. 1B are described in the flowchart of FIG. 4. In this case, as a first step, the variable n (n=1, 2, . . . , N) specifying any of the N scales is initialized so that n=1 (see step S21 of FIG. 4). Then, it is confirmed whether or not the variable n (=1) is greater than the set number of scales N (step S22). When the variable n is smaller than or equal to the number of scales N (n≦N), the luminance signal Y in the original image is single scale retinex processed based on expression (19), thereby obtaining the result of the single scale retinex process, Yn for the luminance signal Y (step S23).


In this process, as a first step, a convolution operation in the x-axis direction is carried out, and the other convolution operation in the y-axis direction is then carried out. Thereafter, each of the results of the convolution operations is subjected to a division processing, and the result of the division processing is subjected to a logarithmic operation processing based on the log function table stored in the memory.


After the luminance signal Y has undergone the single scale retinex processing as described above, the result of the retinex processing, Yn, is subjected to the multiscale retinex (MSR) processing based on expression (14) (step S24). Thereafter, the variable n, specifying a scale, is updated (step S25), and the luminance signal Y is subjected to the single retinex processing and the MSR processing with respect to the nth scale.


In such a manner, the luminance signal Y is subjected to the MSR processing with respect to the predetermined number of scales N, whereby the result of the MSR processing, YMSR, is normalized based on expression (9) (step S26).


After the multiscale retinex processed luminance signal YMSR is normalized as described above, an image is produced based on the result of the normalization, YOUT, and the color signals Cr and Cb or the color-difference signals I and Q of the original image, from which the luminance signal Y has been separated. No color shift occurs in the produced image, and the luminance thereof has been corrected.


In an image processing method of the present invention, a luminance signal is separated from a color signal and subjected to MSR processing. Therefore, there is no possibility for a color shift. In addition, the calculation amount of the MSR processing is significantly decreased, whereby the processing time is considerably shortened. Furthermore, the reduction in the amount of information to be stored in a memory reduces the number of memory accesses, which also reduces the processing time. The reduction of the memory capacity realizes an economical apparatus using a memory with a small capacity.


Various other modifications will be apparent to and can be readily made by those skilled in the art without departing from the scope and spirit of the invention. Accordingly, it is not intended that the scope of the claims appended hereto be limited to the description as set forth herein, but rather that the claims be broadly construed.

Claims
  • 1. An image processing method comprising: separating a luminance signal from a color signal of an original image, and multiscale retinex processing only the luminance signal; and producing an image based on the multiscale retinex processed luminance signal and the color signal of the original image.
  • 2. An image processing method according to claim 1, further comprising normalizing the multiscale retinex processed luminance signal based on a gain and an offset.
  • 3. An image processing method according to claim 1, wherein a one-dimensional function having a symmetric property is used as a surround function for the multiscale retinex processing.
  • 4. An image processing method according to claim 3, wherein a part of the one-dimensional function in a range, such that the one-dimensional function has a symmetric property, is converted into a table.
  • 5. An image processing method according to claim 1, further comprising performing a one-dimensional convolution operation in the multiscale retinex processing.
  • 6. An image processing apparatus, comprising: a multiscale retinex processing section for separating a luminance signal from a color signal of an original image, and for multiscale retinex processing only the luminance signal; a first memory for storing a plurality of predetermined constants for use in the multiscale retinex processing; and a second memory for storing a size of the original image and the luminance signal of the original image, wherein an image is produced based on the multiscale retinex processed luminance signal and the color signal of the original image.
  • 7. An image processing apparatus according to claim 6, wherein the plurality of predetermined constants comprise a number of multiscales, a scaling variable, and a weighting factor.
  • 8. An image processing apparatus according to claim 6, wherein the multiscale retinex processed luminance signal is normalized based on a gain and an offset.
  • 9. An image processing apparatus according to claim 8, further comprising a third memory for storing the normalized, multiscale retinex processed luminance signal.
  • 10. An image processing apparatus according to claim 6, wherein a one-dimensional function having a symmetric property is used as a surround function for the multiscale retinex processing.
  • 11. An image processing apparatus according to claim 10, wherein part of the one-dimensional function in a range, such that the one-dimensional function has a symmetric property, is converted into a table.
  • 12. An image processing apparatus according to claim 6, wherein a one-dimensional convolution operation is performed in the multiscale retinex processing.
Priority Claims (1)
Number Date Country Kind
11-242305 Aug 1999 JP national
US Referenced Citations (18)
Number Name Date Kind
4648051 Wandell et al. Mar 1987 A
4685071 Lee Aug 1987 A
4884221 Sugiyama et al. Nov 1989 A
4992963 Funt et al. Feb 1991 A
5200832 Taniuchi et al. Apr 1993 A
5640469 Lewins et al. Jun 1997 A
5717839 Ichikawa Feb 1998 A
5907629 Funt et al. May 1999 A
5991456 Rahman et al. Nov 1999 A
6038339 Hubel et al. Mar 2000 A
6212304 Durg et al. Apr 2001 B1
6249601 Kim et al. Jun 2001 B1
6304294 Tao et al. Oct 2001 B1
6343147 Yamamoto Jan 2002 B1
6538696 Hieda et al. Mar 2003 B1
6563602 Uratani et al. May 2003 B1
6631216 Hieda et al. Oct 2003 B1
20030152283 Moriwaki Aug 2003 A1
Foreign Referenced Citations (3)
Number Date Country
9-233480 Sep 1997 JP
10-11571 Jan 1998 JP
WO 9745809 Dec 1997 WO