This invention relates generally to techniques of processing video signal data, and, more specifically, to processing video binary data to correct for variations across an imaged optical field such as, for example, to compensate for shading effects caused by lenses, sensor sensitivity variations and housing internal reflections in cameras and the like.
Lens shading is a phenomenon of a non-uniform light response across an image field of a lens. That is, a simple lens used to view a scene with a uniform light intensity across it will typically produce an image of that scene having a significantly non-uniform light intensity. The light intensity is normally highest in the middle of the image and falls off on its edges, as much as sixty percent or more. Such a lens obviously is not suitable for most optical applications without this effect being corrected. Correction can be provided by the use of a complex assembly of lenses that images scenes without imparting intensity variations across it.
Electronic cameras image scenes onto a two-dimensional sensor such as a charge-coupled-device (CCD), a complementary metal-on-silicon (CMOS) device or other type of light sensor. These devices include a large number of photo-detectors (typically two, three, four or more million) arranged across a small two dimensional surface that individually generate a signal proportional to the intensity of light or other optical radiation (including infrared and ultra-violet regions of the spectrum adjacent the visible light wavelengths) striking the element. These elements, forming pixels of an image, are typically scanned in a raster pattern to generate a serial stream of data of the intensity of radiation striking one sensor element after another as they are scanned. Color data are most commonly obtained by using photo-detectors that are sensitive to each of distinct color components (such as red, green and blue), alternately distributed across the sensor. Shading effects of lenses that image object scenes onto the sensor cause an uneven distribution of light across the photo-sensor, and thus video signals from the sensor include data of the undesired intensity variation superimposed thereon.
Rather than eliminating the lens shading effect by the use of a complex (and expensive) lens, it has been suggested that the signals from the photo-sensor may be processed in a manner to compensate for the effect. The amount of compensation applied to the signal from each photo-detector element is dependent upon the position of the element across the surface of the photo-sensor.
The electronic signal processing techniques of the present invention allow compensation for lens shading and/or other similar phenomenon, such as sensor sensitivity variations and internal camera reflections, which superimpose a predictable optical variation onto the image across the multi-element sensor. These techniques have particular application to digital cameras and other types of video devices but are not limited to such applications. The techniques may be implemented at a low cost, take practically none of the valuable space in portable devices and operate at the same rate as the video data being modified is obtained from the photo-sensor, thereby not adversely affecting the performance of the video system.
In an example of lens shading compensation, a spherical intensity correction to the video data is made by correcting the data of each image pixel by an amount that is a function of the radius of the pixel from the optical center of the image. The position of each pixel is first converted from a x-y coordinate position of the raster or other linear scanning pattern to a radial distance, and then that radial distance is used to generate the correction for the pixel from a small amount of correction information. This avoids having to keep correction data for each pixel, and thus saves having to include a large memory to store such data. Use of circuits dedicated to carrying out these operations allows them to be performed at the same rate as the video data is outputted by the photo-sensor, without having to employ an extremely fast, expensive digital signal processor. In a particular application, the radial position of a pixel is calculated from the scan position by an adder circuit.
Each camera or other optical system is calibrated, in one example, by imaging a scene of uniform intensity onto the photo-sensor and then data of a resulting spherical intensity or other variation across the photo-sensor is calculated along a single radius. Only a relatively few data points are preferably stored, in order to minimize the amount of memory required to store correction data, and a determination of values between the stored values are obtained during the image modification process by a form of interpolation. In order to avoid noticeable discontinuities in the image intensity, these few data points are preferably fit to a smooth curve that is chosen to match the intensity variation across the image that is to be corrected. In addition to correcting for lens shading, these techniques also correct for any intensity variations caused by the photo-sensor and/or its interaction with the incident image light.
Additional objects, advantages and features of the present invention are included in the following description of exemplary embodiments thereof, which description should be taken in conjunction with the accompanying drawings.
An implementation of the techniques of the present invention is described in a camera or other video acquisition device where digital data of the image(s) are modified on the fly to compensate for intensity modifications superimposed across the image by the camera's optical system, photo-sensor and reflections from internal camera surfaces. In
The optical system 13 can be a single lens, as shown, but will normally be a set of lenses. An image 29 of a scene 31 is formed in visible optical radiation through a shutter 33 onto a two-dimensional surface of an image sensor 35. An electrical output 37 of the sensor carries an analog signal resulting from scanning individual photo-detectors of the surface of the sensor 35 onto which the image 29 is projected. The sensor 35 typically contains a large number of individual photo-detectors arranged in a two-dimensional array of rows and columns to detect individual pixels of the image 29. Signals proportional to the intensity of light striking the individual photo-detectors are obtained in the output 37 in time sequence, typically by scanning them in a raster pattern, where the rows of photo-detectors are scanned one at a time from left to right, beginning at the top row, to generate a frame of video data from which the image 29 may be reconstructed. The analog signal 37 is applied to an analog-to-digital converter circuit chip 39 that generates digital data in circuits 41 of the image 29. Typically, the signal in circuits 41 is a sequence of individual blocks of digital data representing the intensity of light striking the individual photo-detectors of the sensor 35.
Processing of the video data in circuits 41 and control of the camera operation are provided, in this embodiment, by a single integrated circuit chip 43. In addition to being connected with the circuits 17, 21, 25 and 41, the circuit chip 43 is connected to control and status lines 45. The lines 45 are, in turn, connected with the shutter 33, sensor 29, analog-to-digital converter 39 and other components of the camera to provide synchronous operation of them. A separate volatile random-access memory circuit chip 47 is also connected to the processor chip 43 for temporary data storage. Also, a separate non-volatile re-programmable memory chip 49 is connected to the processor chip 43 for storage of the processor program, calibration data and the like. A usual clock circuit 51 is provided within the camera for providing clock signals to the circuit chips and other components. Rather than a separate component, the clock circuit for the system may alternatively be included on the processor chip 43.
A functional block diagram of the processor chip 43 is shown in
The flow of video data through the block diagram of
The correction data in lines 65 are generated by a block of dedicated processing circuits 71. The block 71 includes circuits 73 that calculate a quantity related to the radial position of each image pixel from a center of the image for which video data are being acquired, in the order of such acquisition. In this specific example, this quantity is the mathematical square of the radius (r12). This radius is calculated for each pixel from the linear position in x-y coordinates of the photo-detector(s) generating the video signal for that pixel, and at the same rate at which the video data are being received from the sensor. This conversion of linear to radial position is made since the modification of the image data varies as a function of radius across the image. That calculated radius function is then used by a calculation circuit 75 to generate the modification factor applied to the multiplier 63. Although the circuits 75 could solve an equation each time that represents the radius dependent modification to be made to the video data, a memory 77 stores a look-up table that is used in this embodiment instead. But in order to reduce the size of the memory 77, only a few points of correction data are stored and the circuits 75 calculate the values of points in between those that are stored. A set of registers 79 store parameters that are used by both of the calculation circuits 73 and 75.
The calculation circuits 73 and 75 operate independently of the DSP 55. The DSP could possibly be used to make these calculations instead but this would require an extremely fast processor, if sufficient speed were even available, would be expensive and would take considerable more space on the chip 43. The circuits 73 and 75, dedicated to performing the required repetitive calculations without participation by the DSP 55, are quite straightforward in structure, take little space on the chip 43 and frees up the DSP 55 to perform other functions.
The memory or memories 77 and 79 storing the image modification data and parameters are preferably a volatile random-access type for access speed and process compatibility with other processor circuits so that they can all be included on a single cost effective chip. The image modification data and parameters are generated once for each camera at a final stage of its manufacture and then are permanently stored in the non-volatile memory 49. These data are then loaded through lines 81 into the memories 77 and 79 each time the system is initialized, under control of the DSP 55 operating through control and status lines 83.
With reference to
Data blocks 93, 95, 97, etc. are generated by the modification processing circuits 71 (
The usual video system processes data for each of multiple distinct color components of the image. A typical commercial sensor alternates photo-detectors along the rows that are covered with red, green and blue filters. There are several different arrangements of the color sensitive photo-detectors that are commercially used. In one such arrangement, one row contains alternating red and green sensitive photo-detectors, while the next row contains alternating blue and green sensitive photo-detectors, the photo-detectors also being positioned along the rows to provide alternating color sensitivity in columns. Other standard arrangements use other combinations of two alternating colors. As indicated in
If there is only one set of correction data for all of the discrete colors being detected, an image modification factor is generated for each image pixel from that set of data, regardless of the color. This is quite adequate in cases where the variation across the image that is being removed by the signal modification affects all colors to the same or nearly the same degree. However, where the variation is significantly color dependent, separate correction factors are used for each color component. Use of color dependent modification is illustrated in
One particular type of photo-sensor that is commercially available stacks multiple photo-detectors at each photo-site or pixel. The top detector passes the colors red and green, while filtering out the color it is sensitive to, for example blue. The detector immediately beneath this top detector passes the color green and filters out the color it is sensitive to, in this example red. The bottom sensor is then sensitive to the color green.
Other types of color systems can also be corrected by the techniques described herein. There was a commercial color system, for example, that used only two color components. Also, there are four-color systems in which a separate detector with a wide spectral range is used to acquire “black and white” information.
An example lens shading correction function 141 is illustrated in
As can be seen from
The curve 141 has been found in the general case to approximate an exponential function of the square of the radius; that is, the intensity correction for any image pixel is a function of a square of its radial distance from the optical center, f (ri2). An equation can thus be written for each camera or other optical system that is solved by the DSP 55 or dedicated circuits for each pixel to determine the amount of correction for that pixel but it has been found to be more efficient to maintain a table of values of the curve 141 that are looked-up during the image processing.
An example of the shading table 77 (
An example technique implemented by circuits 73 (
In
The quantity ri2 is calculated by the circuits 73 (
At the beginning of the scanning of a designated line of pixels, the initial radius RINIT from the center to the first pixel (left most pixel) of a given line is calculated, as follows:
RINIT2=|R02−2Y0HY+(1+2ny) HY2 | (1)
where Y0 refers to the y-coordinate of the upper most line and R0 is the radius from the center (XC, YC) to the upper-left most pixel (X0, Y0). The algorithm also accommodates scanning patterns that omit a proportion of the pixels or lines of pixels. The quantity HY represents the number of lines in each step. If each line is being scanned, HY=1, if every other line is being scanned, HY=2, and so on. The quantity nY is the number of the line actually being scanned (if lines are being skipped, nY still counts 0, 1, 2 etc.), counting from the top where nY=0 for the second line, nY=1 for the third line, and so on.
In order to simplify the radius calculations, some of the frequently referenced quantities are calculated once during factory calibration and then permanently stored in the non-volatile memory 49 (
For each pixel along this designated line of pixels, the radius ri2 from the center (0, 0) to each given pixel is calculated in order, as follows:
ri2=|RINIT2−2X0HX+(1+2nX) HX2| (2)
where RINIT is the radius of the first pixel of the line calculated by equation (1) above, X0 refers to the x-coordinate of the initial pixel of the line, HX is the number of pixels in each step, and nX is the number of the pixel actually being used (if pixels are being skipped, nX still counts 0, 1, 2, etc.), counting from the left where nX=0 for the second pixel, nX=1 for the third pixel, etc. A value of X0 is stored in the non-volatile memory 49 during factory calibration and transferred to the registers 79 (
Since the scan pattern is known to move from pixel-to-pixel across one line, then the same on another line, the calculations of equations (1) and (2) need not be made for each pixel but rather the process can be considerably simplified. Since the radius function R02 of the first pixel 151 is known, the radius function for each other pixel is calculated by building upon it. When scanning across a row, ri2 of a pixel other than the first pixel is calculated by adding the following to the radius value of the immediately preceding pixel:
(1+2mX)HX2 (3)
where mx is the number of HX steps passed from the initial pixel in the row of pixels. Similarly, the RINIT2 of each row after the first is calculated by adding the following to the the RINIT2 of the immediately preceding line:
(1+mY)HY2 (4)
where my is the number of HY steps passed from top row. The calculations of equations (3) and (4) are much simpler to make than those of equations (1) and (2), so the circuits 73 (
Since each camera's optical system, sensor or physical configuration can have different imaging and other characteristics, each unit is preferably calibrated as part of the manufacturing process and parameters resulting from that calibration stored in the non-volatile memory 49 (
This process corrects for any intensity shading introduced by the optical system 13, the sensor 29 (
Although the present invention has been described with respect to certain embodiments, it will be understood that the invention is entitled to protection within the full scope of the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
4482975 | King et al. | Nov 1984 | A |
4947445 | Sakamoto | Aug 1990 | A |
5181098 | Guerin et al. | Jan 1993 | A |
5267055 | Sakamoto et al. | Nov 1993 | A |
5621824 | Ijiri et al. | Apr 1997 | A |
5973735 | Stekelenburg et al. | Oct 1999 | A |
6195469 | Nishioka et al. | Feb 2001 | B1 |
6323934 | Enomoto | Nov 2001 | B1 |
6833862 | Li | Dec 2004 | B1 |
7098945 | Sasai et al. | Aug 2006 | B1 |
7268917 | Watanabe et al. | Sep 2007 | B2 |
20020025164 | Suzuki | Feb 2002 | A1 |
20020094131 | Shirakawa | Jul 2002 | A1 |
20020101522 | Hosier et al. | Aug 2002 | A1 |
20020135688 | Niikawa | Sep 2002 | A1 |
20020165890 | Thakur | Nov 2002 | A1 |
20030156190 | Sato et al. | Aug 2003 | A1 |
20030156204 | Sato et al. | Aug 2003 | A1 |
20040095611 | Watanabe et al. | May 2004 | A1 |
20040257454 | Pinto et al. | Dec 2004 | A1 |
20050041806 | Pinto et al. | Feb 2005 | A1 |
Number | Date | Country |
---|---|---|
0720125 | Jul 1996 | EP |
09307789 | Nov 1997 | JP |
10-142065 | May 1998 | JP |
10-160566 | Jun 1998 | JP |
2001-274973 | Oct 2001 | JP |
WO 0227804 | Apr 2002 | WO |
02059837 | Aug 2002 | WO |
02065760 | Aug 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20040032952 A1 | Feb 2004 | US |