Image processing device, image processing method, and image processing program
The invention provides an image processing device capable of reducing flickering on a screen by simplifying the structure of an image processing device. The image processing device can include a statistical value calculating unit, a correction parameter calculating unit, and an image correcting unit. The statistical value calculating unit can generate statistical value data. The correction parameter calculating unit generates a control signal in accordance with the degree of change in the scene thereby generating a correction parameter by using a low pass filter whose time constant changes based on the control signal and equalizing the statistical value data. A look-up table can then be generated based on the correction parameter.
Latest Seiko Epson Corporation Patents:
- LIQUID EJECTING APPARATUS AND LIQUID EJECTING SYSTEM
- LIQUID EJECTING SYSTEM, LIQUID COLLECTION CONTAINER, AND LIQUID COLLECTION METHOD
- Piezoelectric element, piezoelectric element application device
- Medium-discharging device and image reading apparatus
- Function extension apparatus, information processing system, and control method for function extension apparatus
1. Field of Invention
The present invention relates to an image processing device for performing image correction processing on image data, an image processing method, and an image processing program.
2. Description of Related Art
In an image process, the characteristics of images on one scene are statistically interpreted, thereby performing image correction processing on image data based on the interpretation result. As a statistical interpretation method, a method of obtaining the distribution (a histogram) of the frequencies of gray levels to calculate a correction parameter from the histogram is known.
In the case where the correction parameter significantly changes among frames when moving images are processed, the contrast or the brightness of the entire screen changes thereby causing flickering of the image. Furthermore, when noise overlaps the image data, the image flickering is increased. In order to solve the above problem, a technology for increasing the time constant of changes in the distribution of the histogram by passing the data on the distribution of the histogram through a cyclic filter circuit when the histogram is generated, is known, thereby preventing fluctuation of the corrected image data, as described in Japanese Examined Patent Application Publication No. 7-99862 (see, for example, Paragraph Number 0018).
SUMMARY OF THE INVENTIONHowever, in the case of passing through a cyclic filter when generating a histogram, which is a source of statistical value calculations, there are problems in that the size of the circuit increases, thereby requiring a large amount of time for processing the data. In particular, in portable electronic apparatuses, such as mobile telephones, a reduction in the size of circuits and an increase in the speed of processing data become a significant concern in view of the miniaturization of devices and a reduction in power consumption.
The invention was made in consideration of such problems. Therefore, an object of the present invention is to provide an image processing apparatus having a simple structure, an image processing method, and an image processing program capable of reducing flickering on a screen.
In order to achieve the above object, an image processing device according to the present invention performs image processing on image data, and can include a statistical value calculating device for performing statistical processing on the image data to generate statistical value data representing statistical values, a scene detecting device for generating a control signal in accordance with the degree of change in a scene based on the image data, a correction parameter calculating device for weighting the statistical value data of a plurality of frames based on the control signal to calculate a correction parameter, and an image correcting device for performing image correction processing on the image data based on the correction parameter.
According to the present invention, it does not equalize the correction parameter during calculating the statistical values, such as a histogram or an accumulative histogram, but the statistical values are weighted after obtaining statistical values. In a process of generating the statistical values, since it is necessary to process image data in units of pixels, an operation circuit is large-scaled thereby increasing processing load. On the contrary, according to the present invention, since the correction parameter is equalized by weighting after obtaining the statistical values, it is possible to simplify the structure of the image processing device. Furthermore, since the weighting may change in accordance with the degree of change in the scene, it is possible to improve the response characteristics of the correction parameter with respect to changes in images. Therefore, it is possible to correct images in accordance with change in the scene, that is, for example, it is possible to display clear images when scenes change.
It is preferable that the correction parameter calculating device generates the correction parameter by performing calculations in which the weighting on statistical value data of a previous frame is smaller as the degree of change in the scene represented by the control signal is larger. Since the continuity of the statistical values is lost due to an increase in the degree of change in the scene, it is possible to improve the response characteristics of the correction parameter by reducing the weighting of the statistical value data in a previous frame.
It is preferable that the correction parameter calculating device include a storing device for storing statistical value data obtained in a previous frame, a counting device for multiplying coefficients by statistical value data in the current frame and the previous statistical value data read from the storing device, respectively, and a coefficient controlling device for changing the coefficients based on the control signal.
It is preferable that when statistical value data of the current frame is S(n), a correction parameter of the frame prior to the current frame by one frame is P(n−1), a first coefficient is A, and a second coefficient is B, the above correction parameter calculating device calculate a correction parameter P(n) of the current frame in accordance with the equations below and controls the values of the first coefficient and the second coefficient based on the control signal, and the equations are P(n)=A*S(n)+B*P(n−1) and 1=A+B. In this case, it is possible to generate the correction parameter by a cyclic low pass filter.
It is preferable that the correction parameter calculating device detects a frame rate of the image data and weights the statistical value data of the plurality of frames based on the detected frame rate and the control signal. In this case, since it is possible to determine the correction parameter in consideration of the frame rate, it is possible to appropriately correct images according to the density of a frame.
According to the present invention, an image processing method performs image processing on image data, and can include the steps of performing statistical processing on the image data to generate statistical value data representing statistical values, generating a control signal in accordance with the degree of change in a scene based on the image data, weighting the statistical value data of a plurality of frames based on the control signal to calculate a correction parameter, and performing image correction processing on the image data based on the correction parameter.
According to the present invention, since the correction parameter is equalized by weighting after obtaining the statistical values, it is possible to simplify the structure of the image processing device. Furthermore, since it is possible to change the weighting in accordance with the degree of change in the scene, it is possible to improve the response characteristics of the correction parameter with respect to changes in images. Therefore, it is possible to correct images in accordance with change in the scene, that is, for example, it is possible to display clear images when scenes change.
According to the present invention, an image processing program performs image processing on image data, and makes a computer function as statistical value a calculating device for performing statistical processing on the image data to generate statistical value data representing statistical values, a scene detecting device for generating a control signal in accordance with the degree of change in a scene based on the image data, a correction parameter calculating device for weighting the statistical value data of a plurality of frames based on the control signal to calculate a correction parameter, and an image correcting device for performing image correction processing on the image data based on the correction parameter. According to the present invention, since the correction parameter is equalized by weighting after obtaining the statistical values, it is possible to significantly reduce the processing load.
The invention will be described with reference to the accompanying drawings, wherein like numerals reference like elements, and wherein:
An embodiment of an image processing device according to the present invention will now be described with reference to the drawings.
The image processing device 100 can include a statistical value calculating unit 10, a correction parameter calculating unit 20, and an image correcting unit 30. The statistical value calculating unit 10 performs predetermined statistical processing on the input image data GDin, thereby generating statistical value data 10A. The statistical calculation processing is schematically described with reference to
The accumulative histogram represents the frequency obtained by gathering the frequencies of the histogram in a predetermined direction (a direction from the minimum value to the maximum value or from the maximum value to the minimum value) at each level.
The width of a level can be arbitrarily determined. However, the width of the level according to the present embodiment is one gray-scale level. According to the present embodiment, two kinds of accumulative histograms are simultaneously generated. That is, the accumulative histogram HG1 from the minimum value to the first gray-scale value D1 and the accumulative histogram HG2 from the maximum value to the second gray-scale value D2 are generated.
The correction parameter calculating unit 20 generates a look-up table LUT based on the statistical value data 10A. The respective gray-scale values of the input image data GDin and the respective corrected gray-scale values corresponding to the gray-scale values of the input image data GDin are stored in the look-up table LUT. The stored contents are updated based on the statistical value data 10A. The image correcting unit 30 generates the output image data GDout with reference to the look-up table LUT. To be specific, the image correcting unit 30 reads the gray-scale values of the input image data GDin, uses them as addresses to access to the look-up table LUT, and outputs the gray-scale values read from the look-up table LUT as the output image data GDout.
The scene detecting unit 21 generates a control signal SE representing the degree of change in the scene from frame to frame based on the input image data GDin. Changes in the scene can be detected based on the correlation of images from frame to frame. For example, it is possible to calculate a difference value between the average brightness of the current frame and the average brightness of a frame prior to the current frame by one frame and thereby generate the control signal SE based on the difference value. The values of the control signal SE may be continuous or discrete. According to the present embodiment, the difference value is compared with a first reference value r1 and a second reference value r2, thereby grading the degree of change in the scene in three stages. In this case, r1<r2.
When the difference value is less than the first reference value r1, the value of the control signal SE is ‘0’. In this case, it means that almost no change occurs in the scene. When the difference value is not less than the first reference value r1 but less than the second reference value r2, the value of the control signal SE is ‘1’. In this case, it means that change occurs a little in scenes. Furthermore, when the difference value is not less than the second reference value r2, the value of the control signal SE is ‘2’. In this case, it means that change occurs in the scene. Furthermore, according to the present embodiment, the control signal SE is generated using the average brightness. However, it should be understood that the degree of change in the scene may be detected based on any statistical values.
The calculating unit 22 includes a first cyclic filter F1 and a second cyclic filter F2. The cyclic filters F1 and F2, which operate as low pass filters, prevent the occurrence of rapid changes in the reference minimum value Rmin and the reference maximum value Rmax, thereby generating a correction parameter P. The first cyclic filter F1 includes a first counter 221, a second counter 222, an adder 223, and a memory 224. The second cyclic filter F2 has the same structure as that of the first cyclic filter F1. Therefore, a detailed description of the second cyclic filter F2 is omitted.
The first counter 221, which includes a multiplication circuit, multiplies the reference minimum value Rmin by a first coefficient A and outputs the multiplication result to the adder 223. The second counter 222, which includes a multiplication circuit, multiplies a correction parameter P(n−1) one frame before by a second coefficient B and outputs the multiplication result to the adder 223. The adder 223 adds the output signal of the first counter 221 to the output signal of the second counter 222 and generates a correction parameter P(n). The memory 224, which operates as means for delaying by one frame, stores the correction parameter P(n) and outputs the correction parameter P(n) to the next frame. Therefore, the correction parameter P(n−1) of a frame prior to the current frame by one frame is output from the memory 224.
According to the above structure, the correction parameter P(n) of the current frame is obtained by the following equation.
P(n)=A*S(n)+B*P(n−1) and 1=A+B
The reference minimum value Rmin of the current frame is S(n) and the correction parameter of the frame prior to the current frame by one frame is P(n−1).
The values of the first coefficient A and the second coefficient B are selected based on the control signal SE. For example, when the value of the control signal SE is ‘0’ (when almost no changes occur in the scenes), then A=B=½. When the value of the control signal SE is ‘1’ (when change occurs a little in scenes), then A=¾ and B=¼. When the value of the control signal SE is ‘2’ (change occurs in the scene), then A=1 and B=0.
In other words, as the degree of change in the scene, which is represented by the control signal SE, is large, it is preferable to generate the correction parameter P by performing calculations in which the weighting on the statistic value data of a previous frame is small.
When the values of the first coefficient A and the second coefficient B are fixed, regardless of the degree of change in the scene, the output of the first cyclic filter F1 is illustrated in
According to the present embodiment, the first coefficient A and the second coefficient B change in accordance with the degree of change in the scene. Therefore, the output of the first cyclic low pass filter F1 is illustrated in
The LUT generating unit 23 illustrated in
Image correction processing based on the correction parameter P will be described with reference to examples illustrated in
Therefore, the correction parameter calculating unit 20 generates the look-up table LUT so that the minimum value of the output image data GDout is the corrected reference minimum value Rmin′ and the maximum value thereof is the corrected reference maximum value Rmax′. To be specific, the correction parameter calculating unit 20 generates the look-up table LUT so that the input-output gray-scale characteristics of the image correction processing are described by the equations below.
GDout=fa*GDin−fb
fa=256/(Rmax′−Rmin′)
fb=fa*Rmin
Furthermore, fa is the slope of the input-output gray-scale characteristics and fb is the intercept of the input-output gray-scale characteristics.
As mentioned above, according to the present embodiment, since the high-frequency components are removed from the statistical values such as the reference minimum value Rmin and the reference maximum value Rmax, it is possible to significantly simplify the structure of the image processing device compared with a case where the high-frequency components are removed during generating a histogram which is a source for obtaining the statistical values and thereby reduce the processing load. Furthermore, since a time constant of the low pass filter is controlled in accordance with the degree of change in the scene, it is possible to appropriately correct the images in accordance with the change in the scene.
An image processing device according to a second embodiment of the present invention will now be described. The image processing device according to the second embodiment is the same as the image processing device 100 according to the first embodiment illustrated in
The memory 227 stores the reference minimum value Rmin of a frame prior to the current frame by one frame. When the reference minimum value Rmin of the current frame is S(n) and the reference minimum value Rmin of the frame prior to the current frame by one frame is S(n−1), the correction parameter P(n) of the current frame is obtained by the following equations.
P(n)=A*S(n)+B*S(n−1) and 1=A+B
The values of the first coefficient A and the second coefficient B are selected based on the control signal SE as illustrated in the first embodiment. For example, when the value of the control signal SE is ‘0’ (when almost no changes occur in scenes), A=B=½. When the value of the control signal SE is ‘1’ (when change occurs a little in the scene), A=¾ and B=¼. Furthermore, when the value of the control signal SE is ‘2’ (when change occurs in the scene), A=1 and B=0. That is, as the degree of change in the scene, which is represented by the control signal SE, is large, it is preferable to generate the correction parameter P by performing calculations in which the weighting of the statistic data of a previous frame is small.
As mentioned above, like in the first embodiment, in the second embodiment, since the high-frequency components are removed from the statistical values, such as the reference minimum value Rmin and the reference maximum value Rmax, it is possible to significantly simplify the structure of the image processing device compared with the case where the high-frequency components are removed in the process of generating the histogram, which is the source for obtaining the statistical values, and thereby reduce the processing load. Furthermore, since the time constant of the low pass filter is controlled in accordance with the degree of change in the scene, it is possible to appropriately correct the images in accordance with change in the scene.
Furthermore, it should be understood that the present invention is not limited to the first and second embodiments. For example, the following modifications can be made.
In the above-mentioned embodiments, the first coefficient A and the second coefficient B may be changed in consideration of the frame rate of the input image data GDin. For example, as illustrated in
According to the above-mentioned embodiments, a process in the correction parameter calculating unit 20 is performed by hardware, however, it may also be performed by software. In this case, the CPU is preferably operated by a predetermined image processing program.
The above-mentioned embodiments are preferably used for electronic apparatuses having liquid crystal panels, electroluminescent (EL) panels, digital micro mirror device (DMD) panels, and various electro-optical panels using fluorescence caused by plasma light emission or electron emission. In this case, the electronic apparatus includes a timing signal generating circuit for generating a control signal to control an electro-optical panel based on the output image data GDout, an image signal generating circuit for generating an image signal supplied from the output image data GDout to the electro-optical panel, a driving circuit for driving the electro-optical panel, and the electro-optical panel. The electronic apparatuses are, for example, mobile personal computers, mobile telephones, televisions, view finder type or monitor direct view type video tape recorders, car navigation devices, pagers, electronic organizers, calculating units, word processors, work stations, picture telephones, POS terminals, and devices having touch panels.
Claims
1. An image processing device for performing image processing on image data, the image processing device comprising:
- a statistical value calculating device that performs statistical processing on the image data to generate statistical value data representing statistical values;
- a scene detecting device that generates a control signal in accordance with a degree of change in a scene based on the image data;
- a correction parameter calculating device that weights statistical value data of a plurality of frames based on the control signal to calculate a correction parameter; and
- an image correcting device that performs image correction processing on the image data based on the correction parameter; and
- the correction parameter calculating device comprises: a storing device that stores statistical value data obtained in a previous frame; a counting device that multiplies coefficients by statistical value data in the current frame and previous statistical value data read from the storing device, respectively; and a coefficient controlling device that changes the coefficients based on the control signal.
2. The image processing device according to claim 1, the correction parameter calculating device generating the correction parameter by performing calculations in which the weighting on statistical value data of a previous frame is small when the degree of change in the scene represented by the control signal is large.
3. The image processing device according to claim 1, wherein, when statistical value data of the current frame is S(n), a correction parameter of the frame prior to the current frame by one frame is P(n−1), a first coefficient is A, and a second coefficient is B, the correction parameter calculating device calculates a correction parameter P(n) of the current frame in accordance with the equations P(n)=A*S(n)+B*P(n−1) and 1=A+B and controls the values of the first coefficient and the second coefficient based on the control signal.
4. The image processing device according to any claim 1, the correction parameter calculating device detecting a frame rate of the image data and weighting the statistical value data of the plurality of frames based on the detected frame rate and the control signal.
5. An image processing method of performing image processing on image data, the method comprising:
- performing statistical processing on the image data to generate statistical value data representing statistical values;
- generating a control signal in accordance with a degree of change in a scene based on the image data;
- weighting the statistical value data of a plurality of frames based on the control signal to calculate a correction parameter; and
- performing image correction processing on the image data based on the correction parameter; and
- the performing image correction processing comprises: storing statistical value data obtained in a previous frame; multiplying coefficients by statistical value data in the current frame and previous statistical value data read from the storing device, respectively; and changing the coefficients based on the control signal.
6. A computer-readable medium that stores a program for performing image processing on image data, the program including instructions that cause a computer to:
- perform statistical processing on the image data to generate statistical value data representing statistical values;
- generate a control signal in accordance with the degree of change in a scene based on the image data;
- weight the statistical value data of a plurality of frames based on the control signal to calculate a correction parameter; and
- perform image correction processing on the image data based on the correction parameter; and
- the instruction to perform image correction processing comprises:
- storing statistical value data obtained in a previous frame;
- multiplying coefficients by statistical value data in the current frame and previous statistical value data read from the storing device, respectively; and
- changing the coefficients based on the control signal.
4694329 | September 15, 1987 | Belmares-Sarabia et al. |
4823184 | April 18, 1989 | Belmares-Sarabia et al. |
5239378 | August 24, 1993 | Tsuji et al. |
5241386 | August 31, 1993 | Tsuji et al. |
5432556 | July 11, 1995 | Hatano et al. |
5751401 | May 12, 1998 | Takaoka et al. |
7106887 | September 12, 2006 | Kinjo |
7113648 | September 26, 2006 | Aihara |
20040001165 | January 1, 2004 | Shiota et al. |
20040201782 | October 14, 2004 | Murai et al. |
20040247199 | December 9, 2004 | Murai et al. |
20050008246 | January 13, 2005 | Kinjo |
20050207669 | September 22, 2005 | Kameyama |
20050286061 | December 29, 2005 | Kurumisawa |
1531332 | September 2004 | CN |
0 501 728 | September 1992 | EP |
0 528 105 | February 1993 | EP |
1 359 746 | November 2003 | EP |
A-04-271669 | September 1992 | JP |
A-04-293365 | October 1992 | JP |
B2 7-99862 | October 1995 | JP |
A-08-153197 | November 1996 | JP |
B2 2972095 | August 1999 | JP |
A 2001-103338 | April 2001 | JP |
A 2001-343957 | December 2001 | JP |
A 2002-77723 | March 2002 | JP |
A 2002-142132 | May 2002 | JP |
A 2002-262303 | September 2002 | JP |
A-2002-320111 | October 2002 | JP |
2002-359754 | December 2002 | JP |
A-2002-369003 | December 2002 | JP |
A-2003-304417 | October 2003 | JP |
A-2003-309763 | October 2003 | JP |
A-2004-007301 | January 2004 | JP |
- Van Wijk, Jarke, J., “Image Based Flow Visualization”, 2002.7, pp. 10/1-10/10, Technische Universiteit Eindhoven, Dept. of Mathematics and Computer Science.
Type: Grant
Filed: Feb 18, 2004
Date of Patent: Dec 25, 2007
Patent Publication Number: 20040247199
Assignee: Seiko Epson Corporation (Tokyo)
Inventors: Kiyoaki Murai (Matsumoto), Hidekuni Moriya (Suwa)
Primary Examiner: Gregory M Desire
Attorney: Oliff & Berridge, PLC
Application Number: 10/779,757
International Classification: G06K 9/62 (20060101);