Image capture system and method

Abstract: An image capture system wherein brightness and contrast levels are set automatically. A video camera scans an image and generates an analog output signal indicative thereof which is utilised by the image capture system to create rows and columns of picture elements. The image is initially scanned utilising a trial brightness and contrast level and then analysed to determine the number of saturated picture elements within the scanned image. Thereafter, the brightness and contrast levels are adjusted so that the number of saturated picture elements tends towards a selected small number.

Description: The present invention relates to an image capture system for generating an electronic image comprised of rows and columns of picture elements each having an associated digital value by receiving and processing signals output by a camera, the image capture system comprising: means for generating the electronic image from the camera output signals using brightness and contrast level parameters; and control logic for determining the brightness and contrast level parameters to be utilised in processing the camera output signals and for initiating the generating of the electronic image. Such digital image capture systems are well known in the prior art. Such systems typically include a video scanning device such as a camera and a digital system such as a personal computer. By utilising these two devices together in conjunction with a suitable interconnection it is possible to capture and store an image within the memory of a computer and thereafter utilise that image in conjunction with presentations or to create additional copies of that image at a later time. One problem which is associated with such image capture systems is the determination of the brightness and contrast setting which will be utilised to capture a particular image. Each point within an image to be captured has a brightness level which is located somewhere within a grayscale. The darkest point in an image may not reach full black and the brightest point within an image may not reach full white. Known image capture systems translate this brightness at various points throughout the image into a voltage where black and white represent selected points on a continuous voltage scale. GB - A - 2 061 660 discloses a general method of image contrast enhancement performed by analysing the brightness of pixels surrounding a central pixel whose brightness is to be varied and comparing the brightness of the surrounding pixels with the brightness of the central pixel. EP - A - 0 084 908 discloses a system for determining error values between average signal values taken over distinct sub-areas of a television picture and a reference value, and a correction circuit for error minimalization of the video signal corrected for each sub-area. Since known image capture systems generally store the image as a plurality of digital values it is necessary to convert the continuous analog voltage which represents the brightness of the image to a plurality of digital values for each point within the image. Generally, the number of possible digital values which may be assigned to a particular point within an image is a function of the hardware which is utilised to convert the analog signal to a digital signal. These digital numbers must be accurately assigned throughout the range of possible analog voltages in order to obtain an optimum image. For example, digital values should not be assigned to analog voltages which are beyond those which occur in the image. Similarly, if all of the digital values are compressed to the point where they do not accurately represent the full dynamic voltage range of the image some of the detail in the image will not be captured. Attempts to solve this problem are well known in the art. For example, "electric eye" cameras have been present in the photographic art for a generation. These cameras work by setting the middle of a fixed grayscale index to the average brightness of a particular scene. The limitations of this particular approach are well known. For example, if you aim an automatic video camera at a bride in a white gown against a white alter the resultant image will depict a bride in gray against a gray alter. Similarly, if you aim an automatic video camera at a photograph of fireworks against a black sky, every wrinkle within the photographic paper will be visible but the fireworks will be grossly washed out. Those skilled in the art will appreciate that exposing an image in response to the average brightness of that image works only approximately and only under certain conditions. In recognition of this problem several modern photographic camera metering systems have been proposed which utilise a group of multiple sensors, each of which views a different region within a scene or image to be captured. The results of these multiple readings are then utilised as a pointer within a large memory device. Within the large memory device are stored the research results of thousands of different photographic situations. Theoretically, these situations take into account relative differences, absolute image brightness and camera orientation. While this system works much better than a simple average brightness system it is not perfect and may be misled. While the foregoing description of the prior art describes these systems in terms of black and white images, those skilled in the art will appreciate that colour image systems experience similar problems. Indeed, brightness and contrast for each of the three primary colours must be adjusted correctly in order to obtain quality colour image reproduction. ln a colour system each of the three primary colours includes a "white level adjustment" and a black level adjustment" which is utilised to set the voltage limits of the analog voltage representing image brightness to a digital number conversion. These adjustments must be repeated for each of the three primary colours, for a total of six adjustments. In the colour image art these adjustments are often referred to in terms of the primary colour associated there with such as "red white level" or "green black level". It is very difficult for even an expert user to handle all six variables and the above-described prior art automatic adjustment systems are very often fooled into incorrect colour settings. In view of the above, it is apparent that a need exists for an image capture system wherein the brightness and contrast level parameters may be accurately and rapidly determined in order to produce an accurate reproduction of an image. Therefore, in accordance with the present invention there is provided an image capture system of the above type characterised by analyser logic for analysing the electronic image to determine the number of picture elements in the electronic image having a given brightness level represented by a given digital value, the control logic being responsive to the analyser logic to modify the brightness and contrast level parameters such that the number of picture elements having said given brightness level in the electronic image tends towards a selected number. In preferred forms of the invention, the image capture system is as set out in dependent claims 2 to 12. The image capture system may also be an adapter card for use with such a data processing system. In accordance with another aspect of the invention there is provided a method for determining brightness and contrast levels in an image capture system as set out in claim 14, a preferred form of this aspect of the invention being set out in claim 15. The invention will best be understood by reference to the following detailed description in conjunction with the accompanying drawings, wherein: Figure 1 is a block diagram representation of an image capture system in accordance with the present invention; Figure 2 is a schematic representation of a picture element analysis system in accordance with the present invention; Figure 3 is a graphic representation of one method in which the brightness and contrast levels may be adjusted in accordance with the present invention; and Figure 4 is a graphic representation of a method for adjusting the quantum steps of brightness and contrast in accordance with the present invention. With reference now to the figures, and in particular with reference to Figure 1, there is depicted a block diagram representation of an image capture system which may be provided in accordance with the present invention. As may be seen, Figure 1 also shows an image 10 to be captured which includes a plurality of points, each of which will possess a brightness level which corresponds to a point on grayscale 12. Image 10 is preferably scanned by an image capture device, such as camera 14, which will generate an analog output voltage associated with the brightness level of each point within image 10. The analog output voltage of camera 14 is then coupled, via line 16, to digital system 18. Those skilled in the art will appreciate that digital system 18 may comprise any digital system capable of converting the analog output voltage of camera 14 into corresponding digital values and thereafter manipulating those values. For example, digital system 18 may comprise a personal computer, such as the Model PS/2, manufactured by International Business Machines Corporation of Armonk, New York. Preferably included within digital system 18 is an image capture card (not shown) which is utilised to translate the analog voltage output of camera 14 into a series of discrete digital numbers. As discussed above, a limited number of discrete digital numbers are generally available and it is therefore important that no discrete digital number be assigned to a corresponding analog voltage level which is not reached within the image. Additionally, if the range of digital representations does not cover the full analog voltage range of the output signal from camera 14 then some of the detail of image 10 will be lost. The digital representations of each picture element within the scanned representation of image 10 may then be stored in memory 20 for additional processing in a manner well known in the art. After the electronic representation of image 10 has been captured and processed, the picture elements thus generated may be coupled to display driver 22 and utilised to generate an electronic image by means of display device 24. Still referring to Figure 1, the present invention may be described with regard to certain general rules in the image capture art. For example, in every monochrome image the human eye wishes to see at least one point of pure black and at least one point of pure white. This is true due to the fact that an image with no black points will look faded while an image with no white points will look muddy. On examination, a pleasingly "misty" picture or image will often have a small point of black somewhere in the foreground while a pleasingly "dark and moody" picture will generally have a small point of white. If the aforementioned points are removed the remaining picture will revert to being characterised as faded or muddy. Similarly, in each colour image the human eye wishes to see some point of pure "black" and some point of pure "white" in each of the three primary colours. In view of the above, the method of the present invention begins by finding the brightest and darkest point within image 10 for each primary colour. Thereafter, digital system 18 is utilised to set that colour's white and black levels to those points. This is accomplished by actually capturing an image utilising a trial brightness and contrast level for each colour. Thereafter, the captured image is analysed to determine whether or not the brightness and contrast levels are correctly set and if not, the process is repeated until the captured image is correct. One simple approach to the foregoing involves the scanning of each picture element within the captured image and a determination of whether or not any colour component of a picture element within the captured image is saturated black. In the event any colour component of a picture element within the captured image is saturated black, the black level of that colour is decreased to encompass a wider range. If no colour component of a picture element exists within the captured image which is saturated black, the black level is increased. To adjust contrast, if any colour component of a picture element within the captured image is saturated white, the white level of that colour is increased. If no colour component of a picture element exists within the image which is saturated white, the white level will be decreased. Additionally, it has been determined that an accurate image representation may be prepared without examining each colour component of each picture element within the captured image. For example, the picture elements which are located at the edge of the image should generally be excluded to avoid anomalies which may occur due to the proximity of the sync pulses or the proximity of the edge of the sensors within camera 14. The processing time of digital system 18 is mostly utilised in counting picture elements and therefore the process may be speeded up by initially examining only a selected subsample of picture elements. For example, every eighth picture element horizontally and every fourth picture element vertically. As the iterations in route to the proper black level and white level become finer, more picture elements should be included to increase accuracy. Referring now to Figure 2, there is depicted a schematic representation of a picture element analysis system which may be utilised in accordance with the present invention. As may be seen, each electronic image which is captured utilising the system of Figure 1 is created by a plurality of rows and columns of picture elements or pixels 26. ln order to accommodate for peaking, the white or black saturation test in accordance with the method of the present invention is generally applied to groups of picture elements. Elements in the group must be saturated for the group to be considered saturated. Thus a narrow edge enhancement smaller than the size of the group will be ignored. To accommodate the majority of video cameras that apply both horizontal and vertical peaking, these picture elements should cover an area extending both horizontally and vertically. The simplest structure having this characteristic is four pels laid at the corners of a box such as picture elements 28, 30, 32 and 34. However a three pel structure works also and a two pel structure works for one axis. The vertical enhancement circuitry utilised with most video cameras utilises an interlaced image. Therefore the peaking will extend over alternate lines, thus, the group of picture elements which is chosen for analysis is spread out by alternate picture elements as illustrated in Figure 2. The group of selected picture elements is said to be saturated (either black or white) for a colour, if most or all picture elements within the group are saturated. Those skilled in the art will appreciate that the most direct manner to test for saturation of each colour component of each picture element within the group is to test saturation on each picture element individually. It has been determined that a much more rapid approach may be accomplished by combining the picture elements in each group together in a logical OR to test for black saturation. By combining the binary numbers representing the colour components of each picture element utilising an OR gate, such as gate 36, the output will be a logical zero only if the binary numbers representing each colour component of the picture elements individually were all zeroes. Similarly, the binary numbers representative of the colour component of each of the four picture elements may be combined in a logical AND to test for white saturation. By coupling the binary numbers representative of each colour component of each of the four picture elements to an AND gate, such as gate 38, the output will be a logical one only if all of the binary numbers of each colour component of each of the picture elements individually were all logical ones. This approach is much more rapid due to the fact that all three colour components occupy different bits in a single memory word in most systems. By combining individual picture elements in a logical AND or OR it is possible to do much of the processing in parallel between the three primary colours. With reference now to Figure 3, there is depicted a graphic representation of one method in which the brightness and contrast levels may be adjusted in accordance with the method of the present invention. As may be seen, Figure 3 includes a graphic representation of a line 40 which represents the initial trial brightness and contrast level which is set by digital system 18 (see Figure 1). Line 42 represents the desired brightness and contrast level wherein a selected number of picture elements within the captured image will be saturated black or white. By setting this desired value to that level which results in a single picture element reaching saturation, the resultant image will have weak black and white levels. Therefore, the selected brightness and contrast levels are chosen such that the captured image will result in a selected number of picture elements reaching saturation. This selected number is generally preferred to be in the six to twelve picture element range. Line 44 within Figure 3 is utilised to depict a situation in which a larger number than the desired number of picture elements has reached saturation. In accordance with a simple adjustment scheme the trial brightness and contrast level is then reduced by an amount equal to half of the previous step size. Thereafter, a subsequent analysis of the number of picture elements which have reached saturation indicates that the number of picture elements in saturation is still greater than desired. Line 48 represents the next adjustment which is again half of the previous adjustment amount. An analysis at this point indicates that too few picture elements are in a saturated state and the trial brightness and contrast level is therefore increased an amount equal to half of the previous adjustment amount. Those skilled in this art will appreciate that in an ideal environment the magnitude of the adjustment may be decreased by half at each iteration and the trial brightness and contrast level will eventually converge to a point at or near the desired level. In a practical system where there is interaction between the variables, noise within the system or drifting of the aim values the convergence may not operate ideally. In such systems the convergence may be made more robust by halting the division by two after several iterations in the same direction. If the next sample after this point does not reverse direction, the system has drifted and the step size can be made to increase each cycle until the direction finally changes. Of course, those skilled in the art will appreciate that there are many different techniques whereby the black and white levels may be modified to result in the desired number of picture elements reaching a saturated state. For example, it is possible to capture an image at three different level settings and count the number of saturated picture elements which existed at each of those settings. A linear regression may thereafter be utilised to estimate the desired level setting which will give a selected saturated picture element count. Referring now to Figure 4, there is depicted a graphic representation of a method for adjusting the quantum steps of brightness and contrast in accordance with the method of the present invention. As should be appreciated by those skilled in the image capture art, the convergence algorithms discussed above will find the black and white levels for each colour which result in a very small number of pure white and black levels within each colour. As discussed above, the depicted embodiment of the present invention attempts to locate a black and white level which will result in a selected small number of saturated picture elements, that is, between six and twelve picture elements in the saturated state. This mode of operation is necessary to locate a particular black or white level due to the fact that once a picture element has reached a black or white state there is no practical method of knowing from the binary characterisation of that picture element just how far the picture element is saturated. Thus, if the black and white levels achieved by the convergence algorithms discussed above are left at the initial solution two quantum states of black and white level are almost entirely wasted. This is illustrated with regard to Figure 4 for a hypothetical three bit analog to digital conversion scheme. As may be seen, the various states available in a three bit analog to digital conversion scheme are illustrated at reference numeral 56. Line 58 represents a range of the image projected onto the analog to digital conversion numbers after application of the convergence methods discussed above. Thereafter, in accordance with the method of the present invention, the black and white levels within the image capture system disclosed herein are expanded by one full quantum state at each end of the spectrum. If this technique were not applied, the fraction of the "zero" state which is utilised is the black picture element count, divided by the total picture element count, times the total number of quantum states in the depicted example. Generally this is a fraction which is much smaller than unity. The difference between this fraction and unity is the amount of the "zero" state which is wasted relative to the other quantum states in the system. By projecting the final black level this amount into saturation for the final solution, and also projecting the final white level one additional state, the two extreme quantum states will be fully utilised, for all three colours. This technique increases contrast slightly without noticeable saturation and eliminates the tendency for highlights to go green and for shadows to go pink due to different quantum ranges between colours. It should be noted that this final adjustment does not make a fixed fraction of the colour components of the picture elements saturated black, but rather will make saturated black cover the final fraction of the grayscale range. If most of the original image was the same shade of black then this final step will make most of the image saturated black, which is exactly what is desired. If the original image contained only a small point of pure black, then this final step will leave very few colour components within the picture elements as saturated black, again representing the original image accurately. Those skilled in the art upon reference to the foregoing will appreciate that an apparatus and method have been provided whereby the black level and white level for each of the three colours within a digital colour image capture system may be rapidly and automatically adjusted in a manner which provides a more accurate representation of the original image in a manner which will accommodate wide variations in brightness and contrast. Similarly, the method will generate the highest possible gain with minimal clipping and make an extremely accurate technical recording of the image with little or no information loss. Even in those rare cases where the present method fails to give an exact reproduction of the original image it will improve the image which may be obtained utilising other techniques. It should also be appreciated that this technique may be utilised to quickly establish a base brightness and contrast level which may then be varied by the operator, for example, to further intensify the image. There has been described a method and apparatus for automatic brightness and contrast control in a digital image capture system. A video camera is utilised to scan an image and generate an output signal indicative thereof which is utilised to create rows and columns of picture elements. The image is initially scanned utilising a trial brightness and contrast level and then analysed to determine the number of saturated picture elements within the scanned image. Thereafter, the brightness and contrast levels are adjusted so that the number of saturated picture elements tends toward a selected small number. In a preferred embodiment of the present invention, the output signal is digitised and each picture element has a digital value associated therewith. Analysis of the scanned image is accomplished by counting the number of picture elements having a selected digital value. Additionally, once the brightness and contrast levels have been adjusted to substantially achieve the desired number of selected picture elements the digital states are adjusted to more fully utilise the end states.

Claims: Image capture system for generating an electronic image comprised of rows and columns of picture elements each having an associated digital value by receiving and processing signals output by a camera, the image capture system comprising: means for generating an electronic image from the camera (14) output signals (16) using brightness and contrast level parameters; and control logic for determining the brightness and contrast level parameters to be utilised in processing the camera output signals and for initiating the generating of the electronic image; characterised by analyser logic for analysing the electronic image to determine the number of picture elements in the electronic image having a given brightness level represented by a given digital value, the control logic being responsive to the analyser logic to modify the brightness and contrast level parameters such that the number of picture elements having said given brightness level in the electronic image tends towards a selected number. Image capture system as claimed in claim 1 comprising means for digitising the camera output signals to obtain a range of a plurality of digital states (58) corresponding to brightness levels in the image. Image capture system as claimed in claim 1 or claim 2 wherein the means for generating an electronic image is adapted to modify the range of a plurality of digital states to include an additional digital state at each end of the range of the plurality of digital states (60) once the number of picture elements having the given brightness level substantially equals the selected number. Image capture system as claimed in any preceding claim wherein the means for determining the number of picture elements having a given brightness level only does so for a subset of the picture elements comprising a selected number of the total number of picture elements. Image capture system as claimed in any preceding claim wherein, after the brightness and contrast level parameters have been modified once, the control logic modifies the brightness and contrast level parameters such that the number of picture elements having the given brightness level tends towards a selected number by repeatedly adjusting the brightness and contrast level parameters by a fraction of the preceding modification amount. Image capture system as claimed in any preceding claim wherein the analyser logic analyses a plurality of different subgroups of proximate pixels in the electronic image and counts the number of the subgroups having numbers of pixels having the given digital value equal to or exceeding a preselected first number and wherein the control logic modifies the brightness and contrast level parameters as a function of the number of counted subgroups. Image capture system as claimed in claim 6 wherein the number of proximate pixels is at least three. Image capture system as claimed in claim 7 wherein each subgroup of proximate picture elements comprises a group of four picture elements (28, 30, 32, 34) forming a square each separated in a first direction and in a second, orthogonal direction by one additional picture element. Image capture system as claimed in any of claims 6 to 8 wherein the preselected first number is equal to the number of proximate pixels in each subgroup. Image capture system as claimed in any preceding claim wherein the camera output signals are representative of a colour image, wherein each of the picture elements is comprised of multiple colour components and wherein the analyser means comprises means for determining the number of picture elements which include a colour component having a given level represented by a given digital value. Image capture system as claimed in claim 10 wherein the multiple colour components correspond to each primary colour. Image capture system as claimed in any preceding claim including a camera for generating output signals representative of a scene. Data processing system including an image capture system as claimed in any preceding claim. A method for determining brightness and contrast levels in an image capture system, the method comprising the steps of: generating from a signal (16) received from a camera (14) an electronic image comprised of rows and columns of picture elements having a brightness level represented by a digital value, utilising trial brightness and contrast level parameters ; analysing the electronic image to determine the number of picture elements therein having a given brightness level; and modifying said trial brightness and contrast level parameters in response to the analysis of said electronic image such that the number of picture elements having said given brightness level tends towards a selected number. A method as claimed in claim 14 wherein the step of analysing the electronic image comprises the steps of: analysing a plurality of different subgroups of proximate pixels in the electronic image; counting the number of said subgroups having a quantity of pixels having the given digital value, representing the given brightness level, equal to or exceeding a preselected first number, and wherein the modification of the trial brightness and contrast level parameters is a function of the number of counted subgroups.

Inventors: DEACON JOHN JOSEPH, EDGAR ALBERT DURR, DEACON, JOHN JOSEPH, EDGAR, ALBERT DURR
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1990
Main classification: H04N5
IPC codes: G06T1, H04N1, G06T5, H04N5