COLOR AND CONTOUR SIGNAL GENERATION

Abstract: In a method of generating output color signals (Ro, Go, Bo) and determining a contour signal (cont) from a sensor signal (RGBin) obtained by a sensor having a color filter with alternately colored filter elements, the sensor signal (RGBin) is delayed (1H) over at least one row period; for each color, zero values are inserted at locations corresponding to the locations of differently colored filter elements; a plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros is furnished; the plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros is filtered (FR, FG, FB) to obtain the output color signals (Ro, Go, Bo), and the plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros is filtered (Fcont) to obtain the contour signal (cont).

Description: Color and contour signal generation. The invention relates to a method of and a device for g e nerating color and contour signals and to a camera comprising such a device. It is, inter alia, an object of the invention to provide an economical color and contour signal generation. To this end, first and second aspects of the invention provide a method of and a device for generating output color signals and determining a contour signal from a sensor signal obtained by a sensor having a color filter with alternately colored filter elements, as defined in claims 1 and 2, respectively. A third aspect of the invention provides a camera comprising a sensor having a color filter with alternately colored filter elements for generating a sensor signal, and a device as claimed in claim 2. In accordance with a primary aspect of the present invention, a method of generating output color signals and determining a contour signal from a sensor signal obtained by a sensor having a color filter with alternately colored filter elements comprises the following steps: the sensor signal is delayed over at least one row (line) period; for each color, zero values are inserted at locations corresponding to the locations of differently colored filter elements; a plurality of mutually at least one row (line)-delayed color signals with inserted zeros is furnished; the plurality of mutually at least one row (line)-delayed color signals with inserted zeros is filtered to obtain the output color signals, and the plurality of mutually at least one row (line)-delayed color signals with inserted zeros is filtered to obtain the contour signal. The invention yields the advantage that the row (line) memories which are used for color signal generation are also used for generating the contour signal, thus providing a very economical solution. These and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter. In the drawings: Fig. 1 shows an example of an RGB Bayer filter; Fig. 2 shows the sample structure of the RGB pixels and the pitch of the GRB colors in the RGB Bayer filter of Fig. 1; Fig. 3 shows the theoretically assumed Nyquist domain of the RGB filter array; Fig. 4 shows an example of how the filter coefficients relate to the green pixels, inclusive of the zeros, for a 5x3 contour signal; Fig. 5 shows an embodiment of a camera comprising a sensor and a processor for carrying out the parallel 2D Laplacian contour and RGB signal processing for an RGB Bayer sensor; and Fig. 6 shows more details of the parallel RGB and contour processing of Fig. 5. An overview of the Red-Green-Blue (RGB) or Yellow-Green-Cyan (YGC) Bayer color array and its Nyquist domain will be given in a nutshell. Fig. 1 shows an example of an RGB Bayer filter. H indicates the columns, V indicates the rows. Fig. 2 shows the sample structure of the RGB pixels and the pitch of the GRB colors in the RGB Bayer filter of Fig. 1. The pitch p is the distance between two neighboring pixels having the same color. Its inverse value represents the pixel or system clock frequency in the case of a single RGB output of the sensor, i.e. fs = l/p. The sample frequency of each RGB color is inversely proportional to the shortest distance between the pixels of each RGB color, i.e. a horizontal and vertical sample frequency of l/2p = fs/2 for the Red and Blue colors, and a diagonal sample frequency of l/p\/2 = hh 2 for Green. Fig. 3 shows the theoretically assumed Nyquist domain of the RGB filter array. R/B indicates the red/blue domain, while G indicates the green domain. H indicates horizontal resolution and V indicates vertical resolution. The full square corresponds to the domain of a 3 CCD camera. In practice, the Green signal offers less resolution than is suggested by the theoretical Nyquist theorem. Near fs/2, there is much signal distortion. The distortion near fs/2 in the horizontal and vertical directions does not allow much amplification by the contour filter near these frequencies, as otherwise the distortion will further increase. The distortion near fs/2 is such that a distinction of a direction is not possible. By means of parallel processing of the available and missing Green pixels, the contour gain near fs/2 can be minimized as much as possible as a function of the number of coefficients. For general-purpose filter design, an array of 7x5 (7 horizontally, 5 vertically) coefficients has been applied, always using the same delay for the center pixel. In a practical situation, the number of coefficients can of course be limited to the dimensions required by the largest filter type. Some examples of filter coefficients for parallel processing are shown. For a unity signal amplitude, the result of the filters is divided by the sigmaX value. Coefficient [34] represents the center pixel. The filter coefficients for the reconstruction of the RGB signals are as follows. For Green: wG[23]= 0; wG[24]= 1; wG[25]= 0; wG[33]= 1; wG[34]= 4; wG[35]= 1 W G[43]= 0; wG[44]= 1; wG[45]= 0 sigmawG=4. For Red and Blue: wRB[23]= 1; wRB[24]= 2; wRB[25]= 1 wRB[33]= 2; wRB[34]= 4; wRB[35]= 2 wRB[43]= 1; wRB[44]= 2; wRB[45]= 1 sigmawRB=4. Although some possible contour filter coefficients are mentioned, many variations of these coefficients are of course also possible. For a 5x3 (HxV) filter: wc[22]=-2; c[23]=-l; wc[24]= 2; wc[25]=-l; wc[26]=-2 wc[32]=-2; wc[33]= 2; wc[34]= 8; wc[35]= 2; wc[36]=-2 wc[42]=-2; wc[43]=-l; wc[44]= 2; wc[45]=-l; wc[46]=-2 sigmawCR=8. For an alternative 5x3 (HxV) filter with less gain near fs/2: wc[22]=-l; wc[23]= 0; wc[24]= 1; wc[25]= 0; wc[26]=-l wc[32]=-2; wc[33]= 1; wc[34]= 4; wc[35]= 1; wc[36]=-2 wc[42]=-l; wc[43]= 0; wc[44]= 1; wc[45]= 0; wc[46]=-l sigmawCR=4. For a 7x3 (HxV) filter: wc[21]= 0; wc[22]=-l; wc[23]=-l; wc[24]= 2; wc[25]=-l; wc[26]=-l; wc[27]= 0 wc[31]=-2; wc[32]=-2; wc[33]= 2; wc[34]= 8; wc[35]= 2; wc[36]=-2; wc[37]=-2 wc[41]= 0; wc[42]=-l; wc[43]=-l; wc[44]= 2; wc[45]=-l; wc[46]=-l; wc[47]= 0 sigmawCR=8. Also for such a 7x3 (HxV) filter, a version with less gain near fs/2 is possible: wc[21]=-l; wc[22]=-l; wc[23]= 0; wc[24]= 2; wc[25]= 0; wc[26]=-l; wc[27]=-l wc[31]=-2; wc[32]=-2; wc[33]= 2; wc[34]= 8; wc[35]= 2; wc[36]=-2; wc[37]=-2 wc[41]=-l; wc[42]=-l; wc[43]= 0; wc[44]= 2; wc[45]= 0; wc[46]=-l; wc[47]=-l sigmawCR=8. A simple way to avoid much gain near fs/2 is to make the negative coefficients surrounding the center pixel zero. So, wc[23]= 0, wc[25]= 0 and wc[43]= 0, wc[45]= 0. However, this must be done in such a manner that the sigmawCR value is suitable for missing Green as well as for Green center pixels, that are present. For a 5x5 filter: wc[12]= 0; wc[13]=-l; wc[14]=-l; wc[15]=-l; wc[16]= 0; wc[22] = - 1 ; wc[23] — 1 ; wc[24] = 2 ; wc[25] = - 1 ; wc[26] = - 1 ; wc[32]=-l; wc[33]= 2; wc[34]= 8; wc[35]= 2; wc[36]=-l; wc[42]=-l; wc[43] = -l; wc[44]= 2; wc[45]=-l; wc[46]=-l; wc[52]= 0; wc[53]=-l; wc[54]=-l; wc[55]=-l; wc[56]= 0; sigmawCR=8. For another 5x5 filter: wc[12]= 0; wc[13]=-l; wc[14]=-2; wc[15]=-l; wc[16]= 0 wc[22]=-l; wc[23]= 0; wc[24]= 2; wc[25]= 0; wc[26]=-l wc[32]=-2; wc[33]= 2; wc[34]= 8; wc[35]= 2; wc[36]=-2 wc[42]=-l; wc[43]= 0; wc[44]= 2; wc[45]= 0; wc[46]=-l wc[52]= 0; wc[53]=-l; wc[54]=-2; wc[55]=-l; vc[56]= 0 sigmawCR=8. For a 7x5 filter: wc[ll]=-2; wc[12]=-3; wc[13]=-2; wc[14]=-3; wc[15]=-2; wc[16]=-3; wc[17]=-2; wc[21]= 0; wc[22]=-2; wc[23]= 0; wc[24]= 6; wc[25]= 0; wc[26]=-2; wc[27]= 0; wc[31]= 0; wc[32]=-3; wc[33]= 6; wc[34]=24; wc[35]= 6; wc[36]=-3; wc[37]= 0; wc[41]= 0; wc[42]=-2; wc[43]= 0; wc[44]= 6; wc[45]= 0; wc[46]=-2; wc[47] = 0; wc[51]=-2; wc[52]=-3; wc[53]=-2; wc[54]=-3; wc[55]=-2; wc[56]=-3; wc[57]=-2; sigmawCR=24. It is important to realize that the parallel processing method using these types of filters requires a zero to be filled in the R, G and B signals at that location where the sensor does not offer R, G or B signals. See the zero switch box in the embodiment of Fig.6. For the Red (or Blue) signals, zeros are thus inserted as follows: RORORO OOOOOO RORORO etc., while for green and for the contour signals, zeros are inserted as follows: OGOGOG GOGOGO etc. Fig.4 shows an example of how the filter coefficients relate to the green pixels, inclusive of the zeros, for a 5x3 contour signal. The left and right upper pictures show the green samples with the zeros, while the left and right lower pictures indicate the filter coefficients. Fig.5 shows an embodiment of a camera comprising a sensor and a processor for carrying out the parallel 2D Laplacian contour and RGB signal processing for an RGB Bayer sensor S. The RGB input signal RGBin from the sensor S with the RGB Bayer color filter of Fig. 1 is applied directly, and thru a first and a second horizontal row delay (1H) to inputs of an RGB and parallel contour processor RGBproc which furnishes the RGB output signals Ro, Go and Bo, as well as a contour signal cont. For this processing method, only two horizontal row delays (1H) are needed. If a 2D Laplacian contour filter were located after the RGB reconstruction, a total of 4 row delays would be needed. Because of the distortion near fs/2, such a contour filter after the RGB reconstruction will not have a better performance than the parallel contour processing in Fig. 5. Fig. 6 shows more details of the parallel RGB and contour processing of Fig. 5. It shows the zero switch box ZSB for the RGB signals in order to be able to apply 2D Laplacian RGB and contour filters. It is assumed that m row delays and n pixel delays are available for each of the output signals (Go, cont, Ro, Bo) to be generated. However, it has become apparent from the previously mentioned RGB reconstruction filters that a 3x3 row and pixel delay is sufficient. The choice of the contour filter Fcont thus determines the numbers of m and n. The RGB input signal and n-1 row-delayed versions thereof are applied to a zero switch box ZSB for inserting, in each of its output signals, zeros at the positions where the color filter on the image sensor has colors different from the respective output signal. For each color (G, R, B), the zero switch box ZSB has as many output lines (n) as inputs. The green output lines of the zero switch box ZSB are used both for generating the green output signal Go (by means of a green color filter FG) and the contour signal cont (by means of the contour filter Fcont). In the green color filter FG, each output line of the zero switch box ZSB is applied to a filter section FS1 (FS2, FS3) having m pixel delays (m x pix), m multipliers coupled to the respective outputs of the m pixel delays for multiplication by m respective filter weights (m x filt), and an adder Afl (Af2, Af3) for summing the outputs of the m multipliers. An output adder Ao sums the outputs of the n filter section adders Afl, Af2, Af3, ... . Similar filters Fcont, FR and FB, each having n filter sections, are present to generate the contour signal cont, the red output signal Ro and the blue output signal Bo, respectively. A primary aspect of the invention can be summarized as follows. Single sensor digital still color cameras with an RGB Bayer color filter array can be equipped with a one or two-dimensional (ID, 2D) contour filter which is acting parallel to the RGB color reconstruction, i.e. directly on the available and missing Green pixels which are offered by the sensor. The advantage of this method is that contour processing after the reconstruction of the RGB signals has become superfluous. Especially if a subsequent 2D contour processing is planned, this will save chip area because no extra row delays are needed. A preferred embodiment shows the following advantageous features. The zero switch box which makes Laplacian filtering of the RGB and contour signals possible. The parallel contour processing with the original sensor Green data. This saves row delays in comparison with a design in which the two-dimensional contour processing is arranged after the RGB reconstruction. The basic organization of the contour filter coefficients as illustrated in Fig. 4. The contour filter coefficients or varieties of them. It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the device claim enumerating several means, several of these means can be embodied by one and the same item of hardware.

Claims: CLAIMS: 1. A method of generating output color signals (Ro, Go, Bo) and determining a contour signal (cont) from a sensor signal (RGBin) obtained by a sensor (S) having a color filter with alternately colored filter elements, said method comprising the steps of: delaying (1H) said sensor signal (RGBin) over at least one row period; deriving (ZSB) separate color signals (nxG, nxR, nxB) with inserted zeros from said sensor signal (RGBin), including, for each color (G, R, B), the steps of inserting zero values at locations corresponding to the locations of differently colored filter elements, and furnishing a plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros; filtering (FG, FR, FB) said plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros to obtain said output color signals (Go, Ro, Bo); and filtering (Fcont) said plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros to obtain said contour signal (cont). 2. A device for generating output color signals (Ro, Go, Bo) and determining a contour signal (cont) from a sensor signal (RGBin) obtained by a sensor (S) having a color filter with alternately colored filter elements, said device comprising: means (1H) for delaying said sensor signal (RGBin) over at least one row period; means (ZSB) for deriving separate color signals (nxG, nxR, nxB) with inserted zeros from said sensor signal (RGBin), including, for each color (G, R, B), the steps of inserting zero values at locations corresponding to the locations of differently colored filter elements, and furnishing a plurality of mutually at least one row-delayed color signals (nxG, nxR, nxB) with inserted zeros; means (FG, FR, FB) for filtering said plurality of mutually at least one row- delayed color signals (nxG, nxR, nxB) with inserted zeros to obtain said output color signals (Go, Ro, Bo); and means (Fcont) for filtering said plurality of mutually at least one row-delayed color signals with inserted zeros to obtain said contour signal (cont). 3. A camera comprising: a sensor (S) having a color filter with alternately colored filter elements for generating a sensor signal (RGBin); and a device as claimed in claim 2 for generating output color signals (Ro, Go, Bo) and determining a contour signal (cont).

Inventors: JASPERS CORNELIS ANTONIE MARIA, JASPERS, CORNELIS, ANTONIE, MARIA
Applicants: KONINKL PHILIPS ELECTRONICS NV, PHILIPS NORDEN AB, KONINKLIJKE PHILIPS ELECTRONICS N.V.
Application year: 1998
Main classification: H04N3
IPC codes: H04N9