Infrared (IR) cut filter switching control
By estimating the proportion of IR light in the scene using characteristic values, the method addresses the issue of frequent mode switching in video cameras, enhancing image quality and reducing mechanical wear on the IR filter.
Patent Information
- Application Number
- JP2023014743
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-02-08
- Filing Date
- 2023-02-02
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-02-02
AI Technical Summary
Existing video cameras face issues with inconvenient and frequent switching between night and daytime modes due to inaccurate estimation of visible light levels, leading to image flickering and unnecessary wear on the IR filter mechanism, especially when using infrared illumination.
A method for controlling the IR cut filter based on estimating the proportion of IR light in the scene by comparing color components with characteristic values, using a first set for daytime mode and a second set for night mode, which includes simulated IR light levels from known light sources, to make informed decisions about mode switching.
This approach reduces unnecessary switching and image flickering by accurately determining when to switch modes, improving image quality and reducing mechanical wear on the IR filter.
Smart Images

Figure 0007541137000009 
Figure 0007541137000010 
Figure 0007541137000012
Abstract
Description
[Technical field]
[0001] The present invention relates to a method implemented in a video camera for controlling the switching of an infrared cut (IR cut) filter between night and day modes. [Background technology]
[0002] Digital video cameras find many uses today, both for more traditional purposes such as video surveillance to deter criminal activity, and in other areas such as monitoring traffic conditions and improving the operations of logistics centers.
[0003] The image sensors used in such cameras usually have a spectral response that has a non-negligible component in the infrared (IR) spectrum. To illustrate this, Figure 2 shows the relative sensitivities of the three different color channels of a typical image sensor used in a surveillance camera.
[0004] In low light conditions, the IR component of the ambient light can be used to provide useful additional information about the imaged scene. On the other hand, this characteristic also makes color imaging more difficult, since every color channel of the video camera will also have a spectral response in the IR, meaning that the blue, green, and red channels will all contain IR radiation, even though it actually exists at wavelengths longer than red. As a result, during daytime imaging, any infrared component that reaches the image sensor will distort the color balance in the image and may even saturate the image sensor. Furthermore, since the camera will detect every incoming radiation, parameters such as exposure settings may be affected in ways that do not maintain good image quality.
[0005] A well-known approach to retaining the benefits of improved low-light imaging while suppressing the unhelpful effects of distorted color and possible saturation is to add a movable infrared-cut (IR-cut) filter in the beam path in front of the image sensor during daylight mode operation. This IR-cut filter blocks the infrared portion of the incoming radiation from reaching the sensor. The IR-cut filter (sometimes referred to as an IR filter) is used during daylight conditions to allow color images to be acquired.
[0006] In daylight mode, with the IR cut filter in place, the pixels of the image sensor are able to detect incident light as electric charges on individual photodetectors, each of which is provided with a color filter array to receive predominantly red, predominantly green, or predominantly blue radiation, thus enabling color separation.
[0007] In night mode, i.e. in low light conditions, the IR cut filter is removed, which means that there will be an increase in intensity coming from the IR part of the spectrum, which is used to improve image quality. The camera may also be equipped with an infrared illumination unit that illuminates the scene with infrared light, improving the quality of images captured in low light conditions.
[0008] It should be noted that once again, once the IR cut filter is removed and no longer blocks IR light from reaching the sensor, it will no longer be possible to provide a color image. As previously mentioned, in the absence of the IR cut filter, IR radiation will be more intense in every color channel, since every color channel has a response in the IR portion of the spectrum. This will distort the color information by adding an unknown factor to each color channel. Therefore, instead of performing color separation during night mode operation, only the total intensity of the incoming radiation will be recorded for each pixel, and the resulting image will typically be presented as a monochrome intensity image.
[0009] The camera will determine whether night mode or day mode is appropriate based on the amount of ambient light received by the sensor. However, when switching from night mode to day mode, it is not uncommon for the camera to discover that after the switch, the IR cut filter blocks the IR portion of the ambient light, the ambient light level is actually too low, thus prompting a switch back to night mode. This may result in an inconvenient switch back and forth between night mode and day mode, and may also result in noticeable flickering of the image and unnecessary wear on the mechanism that moves the IR filter.
[0010] Since such back and forth switching is clearly not beneficial, an additional evaluation may be performed by the camera before switching, where the camera attempts to determine the amount of visible light in the scene, rather than just the total amount of ambient light, to ensure that switching to daylight mode is advisable. One option here is to use an auxiliary light sensor (with an IR cut filter) to measure the visible light in the scene. The downside of this option is that it adds additional components to the camera, further increasing the cost and complexity of the final product.
[0011] US Patent No. 9,386,230 discloses an approach to this problem in which the color temperatures of various known light sources are compared with the color temperature measured from the image captured by the camera. Switching to daytime mode is performed only if the total lux level is high enough, and different lux thresholds are used depending on whether the identified light source is determined as sunlight or incandescent light with high infrared content, or whether the measured color temperature indicates that this light source is a non-IR light source.
[0012] When an infrared illumination unit is used to illuminate the scene, this further complicates estimating when to perform IR cut filter switching. In US 9386230, this situation is addressed by refraining from performing measurements until the level of added infrared illumination has dropped significantly, and therefore does not contribute significantly to the lux level.
[0013] The present invention relates to a method for determining whether it is advisable to switch from a night mode to a day mode, based on an estimation of the proportion of IR in a captured image or video, especially in the presence of an infrared lighting unit. [Prior art documents] [Patent documents]
[0014] [Patent Document 1] U.S. Patent No. 9,386,230 Summary of the Invention
[0015] It is an object of the present invention to facilitate switching between day and night modes by better estimating the amount of visible light in a scene monitored during night mode.
[0016] According to a first aspect, a method implemented in a video camera for controlling an infrared cut (IR cut) filter of the video camera to switch between a day mode and a night mode, the camera comprising an image sensor having a color filter array configured to enable the image sensor to sense different color components in different regions of the sensor, the method comprising the steps of: the image sensor measuring an ambient light intensity and a color component of the ambient light; in the day mode, determining a set of light emitters present in the scene and contributing to the ambient light intensity by comparing the color components with a first set of characteristic values associated with different light emitters; and switching to the night mode when the ambient light intensity is below a first threshold. and in a night mode, determining an IR light ratio of the ambient light intensity by comparing the color components with a second set of characteristic values associated with different IR light ratios; determining a visible light intensity based on the determined IR light ratio and the ambient light intensity; and switching to a day mode when the visible light intensity is higher than a second threshold, wherein the second set of characteristic values is obtained by mixing the wavelength spectrum of each light emitter in the determined set of light emitters with a plurality of predefined intensity levels of added IR light such that the second set of characteristic values includes a plurality of characteristic values per light emitter, and the ratio of IR light for each characteristic value in the second set includes both the IR light from the light emitter and the added intensity level of IR light.
[0017] Using this method, it is possible to make better informed decisions about when to switch the camera to daytime mode, and there is less switching of the IR filter back and forth caused by an untimely switch to daytime mode due to a misjudgment of the amount of visible light in the scene caused by strong IR light in the scene.The second set of characteristic values includes simulated values for light sources in the scene with added IR light, so that it is possible to estimate whether the measured intensity of the ambient light is mostly due to IR, mostly visible, or somewhere in between.
[0018] By limiting the second set of characteristic values to only those values associated with the set of light sources and only those values that contribute to light in the scene, the number of characteristic values in the second set of characteristic values is reduced to a reasonable amount that will have a high probability of giving useful and unambiguous results when compared to the measured values.
[0019] In contrast, if every available light source were to be used, possibly mixed with several different IR light intensity levels, numerous results would have overlapped one another, and the chart presenting such values would have been far too dense to allow any kind of practical utility, since the determination of which values are relevant would have been deemed highly uncertain. Instead, by reducing this light source to the set of light sources determined to contribute to the light in the scene in daytime mode, a much less dense chart of characteristic values is provided in nighttime mode, which makes it possible to determine which light sources, and more importantly, what levels of IR light, are present in the scene.
[0020] Throughout this description, one may notice that both the terms IR and NIR are used, since this is standard practice in imaging. However, in reality, due to the spectral response of the sensor in combination with the characteristics of the color filter array, only this NIR portion of IR light is relevant to various aspects of the present invention. If a camera were available that performed imaging in both the visible portion of the spectrum, as well as other portions of the infrared region, i.e., outside the NIR region, the methods described herein would be equally useful. However, with today's technology, imaging outside the visible and NIR spectral regions is performed by other types of imaging devices, i.e., thermographic or thermal cameras using microbolometers, in which IR cut filters are not usually involved, and therefore the present invention is not used in such types of cameras. Thus, when the terms "infrared" or "IR" are used herein, they will be interpreted by those skilled in the art as radiation in the near infrared (NIR) region of the light spectrum.
[0021] The IR cut filter is configured to block IR light from reaching the camera's image sensor in daytime mode and to allow IR light to reach the image sensor in nighttime mode.
[0022] The color filter array may be configured to allow the sensor to measure three different color components, which may be red, blue, and green; this is a commonly used configuration and standard components are available.
[0023] Comparing the color components to the characteristic values may include obtaining a first ratio of the first color component to one or more of the other color components and a second ratio of the second color component to one or more of the other color components, and comparing the obtained ratios to the corresponding characteristic values of the ratios.
[0024] This means that comparisons become easier to perform, giving the possibility to take into account, for example, three color components, using only two characteristic values.
[0025] The step of determining the set of light emitters may include a lookup in a first matrix table, i.e., accessing a first chart containing characteristic values associated with various light emitters, and the step of determining the IR light ratio may include a lookup in a second matrix table, i.e., accessing a second chart containing characteristic values associated with various IR light ratios. Both of these options would provide an efficient manner of storing and accessing respective characteristic values for comparison.
[0026] The method may be performed repeatedly at predetermined time intervals, in this way changes in the lighting environment are taken into account and up-to-date information is always available.
[0027] The first threshold may be lower than the second threshold. In this way, by introducing a safety margin, back and forth switching is avoided, so that when a switch between modes is performed, even if the ambient light intensity fluctuates slightly, the camera does not immediately switch back. Furthermore, this improves image quality and user experience by avoiding image flicker.
[0028] The predetermined plurality of intensity levels of IR light preferably includes at least three different intensity levels, in this way making it possible to more accurately determine which IR ratio corresponds to the ambient light in the depicted scene.
[0029] The plurality of predetermined levels of IR light intensity preferably includes IR light with a wavelength spectrum corresponding to the wavelength spectrum of an IR LED lighting unit mounted proximate to the camera, in this way the characteristic value used for comparison in the night mode will more closely match the measured value.
[0030] According to a second aspect of the invention, a video camera is provided comprising an image sensor having a color filter array configured to enable the image sensor to sense different color components in different areas of the image sensor, the image sensor being configured to measure an ambient light intensity and color components of the ambient light, and an infrared cut (IR cut) filter configured to be controlled by the video camera to switch between a day mode and a night mode, in which in the day mode, the video camera determines a set of light emitters present in the scene and contributing to the ambient light intensity by comparing the color components with a first set of characteristic values associated with different light emitters, and when the ambient light intensity is lower than a first threshold, the video camera switches to a night mode and when the ambient light intensity is lower than a first threshold, the video camera detects the ambient light intensity and detects the color components of the ambient light. the video camera is configured to determine an IR light ratio of the ambient light intensity by comparing the color components to a second set of characteristic values associated with different IR light ratios, determine a visible light intensity based on the determined IR light ratio and the ambient light intensity, and switch to a daytime mode when the visible light intensity is higher than a second threshold, and obtain the second set of characteristic values by mixing the wavelength spectrum of each light emitter in the determined set of light emitters with a plurality of predetermined intensity levels of added IR light such that the second set of characteristic values includes a plurality of characteristic values per light emitter, wherein the ratio of IR light for each characteristic value in the second set includes both the IR light from the light emitter and the added intensity levels of IR light.
[0031] The video camera may include an IR LED illumination unit, and a plurality of predetermined levels of IR light intensity including IR light with a wavelength spectrum corresponding to the wavelength spectrum of the IR LED illumination unit, the IR LED illumination unit providing relatively good image quality during dark times, and by matching the predetermined levels of IR light intensity to the wavelength spectrum of the LEDs, a more precise determination of the amount of visible light included in the ambient light is achieved.
[0032] According to a third aspect of the present invention, there is provided a non-transitory computer readable storage medium having stored thereon instructions for performing this method when executed on a device having processing capability.
[0033] The aforementioned features of the method according to the first aspect also apply to this second and third aspect, where applicable, and in order to avoid undue repetition, reference is made to the above.
[0034] Further scope of applicability of the present invention will become apparent from the detailed description set forth below. It should be understood, however, that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of example only, since various changes and modifications within the scope of the invention will become apparent to those skilled in the art from this detailed description.
[0035] Thus, it is to be understood that the present invention is not limited to the specific components of the apparatus described or the operation of each method described, and thus such apparatus and methods may vary. It is also to be understood that the terminology used herein is solely for the purpose of describing specific embodiments and is not limiting. It should be noted that, as used in this specification and the appended claims, the articles "a," "an," "the," and "said" are intended to mean that there is one or more of each element, unless the context clearly indicates otherwise. Thus, for example, reference to "a unit" or "the unit" may include several devices, etc. Furthermore, the terms "comprising," "including," "containing," and similar phrases do not exclude other elements or steps.
[0036] The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which presently preferred embodiments of the invention are shown. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather, these embodiments are presented so as to be thorough and complete, and to fully convey the scope of the invention to those skilled in the art. [Brief description of the drawings]
[0037] [Figure 1] FIG. [Diagram 2] FIG. 2 illustrates a spectral response curve. [Diagram 3] FIG. 1 illustrates an example of a monitored scene. [Figure 4] FIG. 1 illustrates various light source spectra. [Diagram 5] FIG. 1 shows various light source spectra with IR added. [Figure 6] 1 is a chart showing characteristic values of several light sources. [Figure 7] FIG. 2 shows the spectral response curves of the camera with the IR cut filter on (in place) and off (removed). [Figure 8a] FIG. 8 shows the spectrum of a D75 light source overlaid on the spectral response curve of FIG. 7 with the IR cut filter turned off. [Figure 8b] FIG. 8b shows the D75 spectrum of FIG. 8a multiplied by the spectral response curve of FIG. 8a. [Figure 9a] FIG. 1 shows the spectrum of a D65 light source with various amounts of added IR. [Figure 9b] 9b is a chart including some characteristic values for the spectrum in FIG. 9a. [Figure 10] FIG. 1 illustrates a method for day mode operation. [Figure 11] FIG. 1 illustrates a method for night mode operation. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0038] 1 shows a surveillance camera 100. The camera has an image sensor 102 and imaging optics 104 that image a monitored scene onto the image sensor 102.
[0039] The image sensor 102 includes a plurality of imaging pixels, each of which is equally sensitive to radiation within a spectral range ranging from the near ultraviolet to the near infrared (NIR), and possibly even into the infrared spectral range.
[0040] To achieve color imaging, a color filter array is placed in front of the sensor 102, with each pixel of the sensor having a color filter in front of it. A common type of color filter array is a Bayer filter with one blue color filter unit, one red color filter unit, and two green color filter units for each group of four pixels. The Bayer filter is transparent in at least a part of the IR region of the light spectrum, i.e. in the near infrared (NIR) region. This fact, combined with the spectral response of the image sensor 102, has the effect that NIR radiation will reach and affect each and every pixel of the image sensor. As mentioned above, this is illustrated in FIG. 2.
[0041] Therefore, to enable color imaging, an IR cut filter 106 is placed in front of the sensor, which is inserted when imaging in daytime mode and retracted when imaging in nighttime mode.
[0042] The captured images are processed in an image processing pipeline (IPP) 108 to generate a video stream, which is then encoded in an image encoding unit 110 according to an encoding standard such as H.264 or H.265, and finally, the encoded video stream is transmitted from the camera via a network interface 112. This video stream may also be stored locally in a memory provided in the camera for this purpose.
[0043] A central processing unit (CPU) 114 controls the operation of the camera 100. In a real situation, the functions of the CPU may be distributed across several different units, including, for example, a graphics processing unit (GPU), but for the purposes of this description, only a single unit is shown.
[0044] An illumination unit in the form of an IR illuminator 116 is provided to further improve the imaging capabilities of the camera when in night mode. In the illustrated embodiment, the IR illuminator 116, for example in the form of one or more IR LEDs, is integrated with the camera 100, but may also be provided as a standalone illuminator controlled by the camera 100 or as a separate unit. The IR illuminator 116 typically illuminates in a wavelength interval centered around 850 nm or 940 nm. The latter interval is invisible to the human eye, while the former may be perceived as a red emission by a human being present.
[0045] 3 shows a scene 300 captured by camera 100 in which a person 302 is walking towards a row of houses 304. We are interested in noting the lighting situation. Potential light sources in the scene are provided by a lamp post 306, a light fixture 308 above the entrance to one of the houses 304, and light sources inside a window 310 of the house 304, such as a candle 312, a lamp 314, and a Christmas tree light bulb 316. In addition to these artificial sources, the sun is also an important light source at dawn, midday, and dusk, and serves as an indirect light source when reflected from the moon 318. Other light sources of an intermittent nature may also appear in the scene from time to time, such as fireworks 320 and headlights of automobiles 322.
[0046] Some of the light sources in the scene have spectral components in the IR or NIR spectrum in addition to their contribution to the light in the visible spectrum, as in the case of an incandescent lamp (a normal light bulb with a tungsten filament) present in lamp 314 and in the case of a burning flame similar to lit candle 312, as well as in the case of sunlight.
[0047] As previously discussed, camera 100 is equipped with an IR illuminator 116 that is typically activated in night mode when IR cut filter 106 is removed and the camera performs imaging using at least a portion of the near infrared to infrared spectrum. Thus, in night mode, the illumination available to camera 100 will consist of light from any light sources in scene 300 combined with illumination from IR illuminator 116, which may be in both the visible and IR portions of the spectrum.
[0048] Returning to the main objective of the present invention, i.e., determining when it is advisable to switch from night mode (without IR cut filter) to day mode (with IR cut filter), the IR content present during night mode imaging makes this a non-trivial task: the high intensity IR illumination in night mode can in fact be made as easily visible when the acquired image is very dark as when the scene is well illuminated, by inserting an IR cut filter.
[0049] A simple, but at the same time slightly impractical, approach would be to simply insert an IR cut filter, assess the situation, and then, if the light levels are too low, retract the filter again or temporarily shut off any IR illuminators under the control of the camera and perform the assessment. However, both options are difficult to implement without visible effects in the video stream, and would usually result in the disturbing flickering effect mentioned in the Background section.
[0050] To provide a better and more efficient scheme for controlling the switching of the IR filters, information about which light sources are active in the scene should be of interest. A light source can generally be characterized by its spectral content, or color temperature. The spectral content of the image is further linked to the spectral content of the light source through the spectral response of the image sensor and the effect of optical elements such as lenses and filters used in the camera. That is, the spectral content of the image will depend on both the illumination present in the scene and the characteristics of the camera, especially the spectral response of the image sensor.
[0051] As mentioned above, the latter is illustrated in FIG. 2, which shows a typical spectral response of an image sensor. The graph in FIG. 2 shows the spectral response (i.e., spectral sensitivity) of each color channel as a function of wavelength for blue 202, green 204, and red 206. It is interesting to note in this graph that when the IR cut filter is removed ("off"), i.e., in night mode, there is a spectral response in the NIR region, regardless of color channel, and above 850 nm this response is roughly equal. The magnitude of the response also makes it clear how including IR or NIR can add significantly to the imaging of a scene.
[0052] Meanwhile, FIG. 4 shows a diagram 400 of the spectral content for several different common light sources, where A is a blackbody radiator, F12 is a standardized fluorescent lamp, and D65 is a simulated daylight spectrum, and FIG. 5 shows another diagram 500 where the spectral content of a visible LED is combined with an NIR LED (850 nm) of various intensities.
[0053] A convenient approach, and one that is well known in the context of white balancing, to compress the characterization of the spectral components is to look at the contributions of the various color components, i.e. the sum or integrated amount of intensity within a particular wavelength interval corresponding to this color component.
[0054] Typically, the color components are red, green, and blue, but it should be possible to use some other color space with other color components. Usually, two different ratios between the components are used to perform the characterization, such as r / g and b / g, or r / (r+b+g) and b / (r+b+g), which reduces the complexity of characterizing to coordinates in a two-dimensional chart or matrix table, while still maintaining information from all three color components.
[0055] 6 shows an example of such a chart where the value of the red component divided by the sum of all color components and the value of the blue component divided by the sum of all color components are plotted for a D75 illuminant (northern sky daylight) at 602, for an LED illuminant at 604, for a fluorescent illuminant at 606, and for a tungsten illuminant (i.e., light bulb) at 608. The circles around each value represent the fact that variations may occur and that a mapping to a particular illuminant may be performed even if the exact same feature value cannot be found in measurements from a real scene.
[0056] The chart in FIG. 6 can also be used when there is more than one light source in the scene. In that case, the measurements would represent a mixture of, for example, perhaps two or three light sources. In such a situation, it can be determined that there is a light source with the shortest Euclidean distance to the measurements in the chart. Other, more sophisticated methods may be used, such as first selecting the light source with the shortest Euclidean distance to the measurements, and then similarly including all light sources with a Euclidean distance less than, for example, three times this shortest distance. Various other methods of selecting which light sources should be included as relevant are also feasible.
[0057] As the inventors have realized, while it is fairly easy to estimate the specific light sources contributing to the illumination in a scene in daytime mode based on a comparison of known characteristic values of the light sources with corresponding values in the captured image, i.e., when the IR component can be ignored, it is not straightforward to utilize this method in nighttime mode, especially in the absence of strong IR or NIR illuminators.
[0058] The inventors have made a useful insight that allows them to use the same principles of comparing characteristic values in night mode, but with important modifications that allow night mode analysis to be performed even when an IR illumination unit is present.
[0059] Initially, only those light sources determined to be present in the scene by the daytime mode analysis performed immediately prior to switching to night mode are included in the night mode comparison, thus resulting in a much more sparsely populated chart against which to compare measurements than if every possible light source were considered.
[0060] For each light source determined to be active in the daytime mode, a set of modified characteristic values (also referred to herein as a second set of characteristic values) is provided, in which IR illumination wavelength spectra at several different levels of intensity are added to the respective light source spectra, and modified characteristic values are calculated from these modified spectra, with this added IR illumination level representing illumination from an IR illumination unit, such as the IR LED illumination unit 116.
[0061] As an option, these corrected characteristic values can be determined by first preparing a large database with measurements for a wide variety of light sources with added IR components at various intensity levels and then selecting the appropriate values from this database. Nowadays, such measurements are performed for a variety of light sources in the context of preparing data used for white balancing, and similar settings can be used here as well.
[0062] In such a setup, the camera is configured to capture several images of an optically gray target while varying the power of the light source to be measured. A stepwise addition of IR illumination is also incorporated. These measurements may be performed with and without an IR cut filter inserted, and the results are then analyzed to find the characteristic values of the various light settings. This setup may be used to map the spectral response of the camera itself. The camera is then exposed to narrowband radiation, such as having a full width at half maximum (FWHM) of 10 nm, which is scanned across the spectral range of the camera (with a color filter array placed in front of the camera), with and without the IR cut filter in place, producing results similar to those shown in FIG. 2.
[0063] However, instead of performing such measurements for a number of different light sources with various levels of added IR intensity, a much more convenient process is to calculate a mixture of each light source spectrum with the IR illumination spectrum at various intensity levels, and then perform further calculations to determine how the image sensor would respond to these various spectra with the IR filter removed, and determine a corrected characteristic value from the resulting spectrum.
[0064] As mentioned earlier, the image sensor is sensitive to IR across all color channels, and this is shown in Figure 2. In Figure 7, the spectral response 700 of the camera is shown in both night mode, i.e., with the IR cut filter removed, and day mode, i.e., with the IR cut filter in place. The spectral response in Figure 7 differs to some extent from the spectral response shown in Figure 2 because the illustration is from a different camera with a different image sensor and different optics.
[0065] By multiplying the spectral response at the camera with the IR cut filter in place and with the IR cut filter removed, one color channel at a time, with each of the generated spectra, and then adding or integrating for each color channel, modified characteristic values at various IR illumination levels for each light source are determined, as well as the IR ratios associated with those particular values. As previously mentioned, this IR ratio will include both the added IR illumination and the IR component of each light source.
[0066] More specifically, this calculation is performed for each of the spectra generated as follows:
[0067] The total amount of light is calculated by multiplying the spectral response with the IR cut filter off by the generated spectrum and determining the sum of all color components (usually R+B+G).
[0068] The amount of visible light is calculated by multiplying the spectral response with the IR cut filter in place by the generated spectrum and determining the sum of all color components.
[0069] The visible portion is calculated by dividing the amount of visible light by the total amount of light, and the IR portion is calculated by subtracting this visible portion from 1.
[0070] The characteristic values associated with that IR portion (usually coordinates on a 2D chart) are determined from the color components calculated with the IR cut filter off, e.g. R / (R+B+G) and B / (R+B+G).
[0071] The basis for such calculations is shown in Fig. 8 for a single light source D75, corresponding to daylight in the northern sky, with 40% IR, i.e. the intensity of the IR part of the spectrum is 40% of the total intensity of the light source. In Fig. 8a, both the spectral content of the D75 light source with IR content and the spectral response of a camera without an IR cut filter are shown. In Fig. 8b, the result of the multiplication between the D75 spectrum and each of the spectral responses of the color channels is shown.
[0072] In Figures 9a and 9b, another illuminant D65, corresponding to average daylight in Western / Northern Europe, is shown mixed with various levels of IR illumination. In Figure 9a, the wavelength spectrum of the D65 illuminant is shown when mixed with several levels of added IR light. It may be noted that for clarity of illustration, the upper part of the y-axis has been cut off in this figure. In reality, the spectral curve at higher levels of added IR continues to a much higher amount.
[0073] As shown in FIG. 7, these curves are then multiplied with the spectral response from the sensor with the IR cut filter in the off position, and the characteristic values are calculated by first adding or integrating the intensities per color component, and then determining the ratio of the blue component to the sum of all color components, and the ratio of the red component to the sum of all color components. The results of these calculations are visualized in the chart in FIG. 9b. A light source containing only IR is also included. It may be noted that in a real situation, the levels of added infrared illumination may be selected to be 70%, 80%, 90%, 95%, 97%, and 98%.
[0074] In the scene shown in FIG. 1, the method presented here would work as follows.
[0075] When the camera is in daylight mode, measurements are performed to determine the ambient light intensity from the captured image, as well as the color components of this ambient light. The measurements of the color components are used to calculate characteristic values, such as r / (r+b+g) and b / (r+b+g) mentioned above, and these characteristic values are compared to a chart or matrix table that lists such characteristic values for a number of different light sources. Light sources that have characteristic values similar to the measured image values are determined to be present in the scene or active in the scene, i.e., they contribute to the light intensity in the scene.
[0076] By simply adding the intensities for each pixel, a color component determination can be calculated. This operation may be performed for all of the pixels of the image sensor, i.e., the entire scene being depicted, or it may be performed only for a relatively small region of the scene. In the latter example, this relatively small region may be an area having a particular characteristic, such as a uniform intensity, an area that is considered to be optically gray, etc.
[0077] Moreover, instead of performing the summation of pixel values for each color channel over the entire image, it should be possible to perform the operation separately in various sub-regions, in which case the resulting color component measurements will have spatial resolution, i.e. the values may vary over the entire image. This option may be used to screen out any spatially limited light sources, such as car headlights, that should not affect the decision to switch the IR-cut filter. As an example, if such deviating measurements, which may be seen as outliers, appear repeatedly over time in some specific regions of the image, these regions may be ignored when determining the color components.
[0078] In a real situation, this measurement would be performed continuously, such as 15 times per second, throughout the entire day. However, it should be noted that the measurements of most interest to the present invention are those performed close to, or just before, the moment when the camera determines that the ambient light intensity is below the threshold for switching to night mode. Thus, the determination of which light sources in the scene are active and contribute to the illumination (albeit at a low level) just before switching to night mode will form the basis of information that will be used to determine when to perform a switch back from night mode to day mode, by inputting it into a chart with modified characteristic values used to make the decision in night mode.
[0079] Returning to the example shown in Figure 3, the artificial light sources present (and possibly active) in the scene are light pole 306, light fixture 308, candle 312, lamp 314, and fairy light bulb 316. In addition to these artificial light sources, there will likely be a contribution from the setting sun and possibly the moon 318. As mentioned earlier, fireworks 320 and car 322 headlights are intermittent in nature and should not contribute significantly to the measurements and can be ignored for now.
[0080] Each of the light source spectra of the light sources determined to be present and active in the scene immediately prior to switching to the night mode will be mixed with a spectrum of several different levels of IR light as described above. Then, for every combination of these light source spectra and added IR light levels, a characteristic value will be calculated, as well as the percentage of IR for that particular combination. This added IR light level typically represents various intensity levels of light from the IR LED lighting unit 116 at the camera 100, and the spectrum of the added IR light preferably matches the spectrum of the IR LED lighting unit that is typically known when setting up the camera and its lighting unit.
[0081] As explained above, in any case where a light source has a portion of its spectrum in the infrared, this portion of the IR spectrum will contribute to the total IR ratio of the light source along with the added IR light intensity level.
[0082] The total IR ratios are available for several different combinations of feature values on the night mode chart, and in such a situation, in the unlikely event that two or more combinations of light source spectrum and added IR light intensity levels are associated with the same feature value, a practical solution may be to simply associate the point on the chart with the highest of the IR ratios.
[0083] Since there may be measurement inaccuracies etc. that cause the measured property values not to exactly match the values in the chart, various methods can be used to determine the most relevant constellation point or points in the chart. Just like with the daytime mode chart, a straightforward choice is to use Euclidean distance and select the constellation point in the chart that is closest to the measured point. Since there are often more than one light source active (and all of them, combined with some level of IR, will give rise to some points in the chart), it may also be appropriate to select the two, three or four closest constellation points.
[0084] The amount of available visible light will then be determined from the point in the chart associated with the highest percentage of IR light. The amount of visible light will then be determined as (1-"IR ratio associated with the point in the chart") * "measured ambient light intensity". This amount of visible light will then be compared to a second threshold to determine if it is appropriate to switch to day mode. If the amount of visible light is lower than the second threshold, no switch will be performed, i.e. the IR cut filter will remain in place, if the amount of visible light is higher than the second threshold the camera will switch to day mode and retract the IR cut filter.
[0085] The first threshold will usually be lower than the second threshold, in some cases 1 / 2 to 1 / 3 lower, and in other cases the second threshold may be set 4 times the first threshold to provide a safety margin and avoid switching back and forth between day and night modes. This approach can be seen as a way of incorporating a hysteresis function. It may be noted that by using the method presented herein it is often possible to shorten the distance between the first and second thresholds, which means that more stringent decisions can be made that require relatively less safety margin, and even better image quality can be achieved by allowing the use of night and day modes in appropriate situations. This is due to the fact that the difference between each threshold tends to be set based in part on an estimate of the amount of IR in the scene.
[0086] The method described herein is also illustrated in Figure 10 for daytime mode operation and in Figure 11 for nighttime mode operation. As shown in Figure 10, during daytime mode operation, i.e., when the IR cut filter is in place, in step 1002, the ambient light intensity and color content of the ambient light reaching the camera's image sensor are measured.
[0087] In step 1004, a set of light sources contributing to the ambient light is determined by comparing the color components to the light source characteristic values. In step 1006, the ambient light intensity is compared to a first threshold, and if the intensity is lower than the first threshold, the camera operation is switched to night mode and the IR cut filter is removed. If the ambient light intensity is higher than the first threshold, the camera again repeats steps 1002-1004.
[0088] 11 illustrates operation in night mode. First, in step 1102, a second set of characteristic values is determined by combining the determined set of illuminants with different levels of IR light. The resulting values form the second set of characteristic values (also referred to in this description as modified characteristic values).
[0089] In step 1104, the ambient light intensity and color components of the ambient light are measured, similar to step 1002 during daylight mode. In the next step 1106, the IR proportion in the ambient light is determined by comparing the color components to a second set of characteristic values, which estimates the visible light intensity reaching the image sensor.
[0090] In step 1108, the estimated visible light intensity is compared to a second threshold, and if the amount of visible light is higher than the second threshold, the camera switches to day mode and inserts an IR cut filter, if the intensity of visible light is below the threshold, the camera stays in night mode and repeats steps 1104-1108.
[0091] In summary, described herein is a method for performing a better controlled switching between daytime and nighttime imaging in a camera, where illuminants that contribute to the ambient light in daytime mode are taken into account when determining the visible light in nighttime mode, characteristic values of these illuminants are mixed with some level of IR light to simulate the presence of IR illuminators, and these characteristic values are compared with corresponding values derived from the color components of the ambient light in nighttime mode to determine the IR ratio and therefrom the amount of visible light.
[0092] Finally, it must be said that other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims.
Claims
1. 1. A method implemented in a video camera (100) for controlling an infrared cut (IR cut) filter (106) of the video camera to switch between a day mode and a night mode, the video camera comprising an image sensor (102) having a color filter array configured to enable the image sensor (102) to sense different color components in different regions of the image sensor, the method comprising: measuring (1002, 1102) the amount of ambient light received by the image sensor and the color components of the ambient light received by the image sensor, the color components being determined by calculating a total or integrated amount of ambient light received by the image sensor within a particular wavelength interval corresponding to the color components; When the video camera is in a daytime mode, determining (1004) a set of light emitters present in a scene and contributing to the intensity of the ambient light by comparing the color components of the ambient light received by the image sensor to a first set of characteristic values of color component contributions associated with various light emitters; switching to a night mode when the amount of ambient light received by the image sensor is below a first threshold (1006); When the video camera is in a night mode, determining 1106 the IR light fraction of the ambient light received by the image sensor by comparing the color components of the ambient light received by the image sensor to a second set of characteristic values of color component contributions associated with different IR light fractions; determining a visible light intensity based on the determined IR light ratio and the amount of ambient light received by the image sensor; switching to a daytime mode when the visible light intensity is greater than a second threshold (1108); Including, obtaining the second set of characteristic values by mixing the wavelength spectrum of each light emitter in the determined set of light emitters with a spectrum of IR light at several different levels such that the second set of characteristic values includes multiple characteristic values for each light emitter, wherein the IR light ratio for each characteristic value in the second set includes both IR light from the spectrum of the light emitter and IR light from the spectrum of the added IR light at the level.
2. The method of claim 1 , wherein the IR cut filter blocks IR light from reaching the image sensor in a daytime mode and allows IR light to reach the image sensor in a nighttime mode.
3. The method of claim 1 , wherein the color filter array is configured to enable the image sensor to measure three different color components.
4. The method of claim 3 , wherein the three color components are red, blue, and green.
5. said comparing said color components with said characteristic values obtaining a first ratio of the first color component to a third color component or the sum of the first, second or third color components, and a second ratio of the second color component to the third color component or the sum of the first, second or third color components; comparing the obtained ratio with a corresponding characteristic value of the ratio; The method of claim 1 , comprising:
6. The method of claim 1 , wherein the step of determining the set of light emitters comprises accessing a first chart that includes the first set of characteristic values associated with various light emitters.
7. The method of claim 1 , wherein the step of determining the IR light ratio includes accessing a second chart that includes the second set of characteristic values associated with different IR light ratios.
8. The method of claim 1 , wherein the method is performed repeatedly at predetermined time intervals.
9. The method of claim 1 , wherein the first threshold is lower than the second threshold.
10. The method of claim 1 , wherein the number of different levels of IR light includes at least three different levels.
11. The method of claim 1, wherein the spectrum of the several different levels of IR light corresponds to a wavelength spectrum of an IR LED lighting unit (116) mounted near the video camera.
12. A video camera (100), comprising: an image sensor (102) having a color filter array configured to enable the image sensor (102) to sense different color components in different regions of the image sensor, the image sensor being configured to measure an amount of ambient light received by the image sensor and a color component of the ambient light received by the image sensor, the color component being determined by calculating a total or integrated amount of ambient light received by the image sensor within a particular wavelength interval corresponding to the color component; an infrared cut (IR cut) filter (106) configured to be controlled by the video camera and switched between a day mode and a night mode; Equipped with When the video camera is in a daytime mode, determining a set of light emitters present in a scene and contributing to the intensity of the ambient light by comparing the color components of the ambient light received by the image sensor to a first set of characteristic values of color component contributions associated with various light emitters; switching to a night mode when the amount of ambient light received by the image sensor is below a first threshold; When the video camera is in a night mode, determining an IR light proportion of the ambient light received by the image sensor by comparing the color components of the ambient light received by the image sensor to a second set of characteristic values of color component contributions associated with various IR light proportions; determining a visible light intensity based on the determined IR light ratio and the amount of ambient light received by the image sensor; configured to switch to a daytime mode when the visible light intensity is greater than a second threshold; The video camera (100) is configured to obtain the second set of characteristic values by mixing a wavelength spectrum of each light emitter in the determined set of light emitters with a spectrum of several different levels of IR light such that the second set of characteristic values includes multiple characteristic values for each light emitter, and the IR light ratio for each characteristic value in the second set includes both IR light from the spectrum of the light emitter and IR light from the spectrum of the added IR light at the level.
13. 13. The video camera of claim 12, further comprising an IR LED lighting unit (116), wherein the different levels of IR light correspond to a wavelength spectrum of the IR LED lighting unit.
14. A non-transitory computer readable storage medium having stored thereon instructions for performing the method of any one of claims 1 to 11 when executed in a video camera having processing capabilities.
Citation Information
Patent Citations
Camera and filter switching method
CN112770021A
Infrared radiation imaging device
JP2010161453A
Imaging device, control method thereof, and control program
JP2019205088A
Method for assessing ambient light during night mode image acquisition
JP2021168465A
JPP6732059B
