The present invention is in the field of imaging the electric grid.
Power plants supply the city's electrical needs using alternating current (AC) power transmission. In AC power transmission, electrical energy is distributed by generating an AC voltage waveform (usually a sine wave) with a frequency of 50 or 60 Hz. This waveform is then distributed over the city's grid via power lines. The power plant generates three sine waves with phases spread apart by 120°. On a city scale, power transformers introduce additional phase shifts to these three phases. Each power consumer within the city, from street lamps to household power outlets, connects to ones of these three phases, arbitrarily.
As a result, whether outdoors at night or indoors at all hours, most of the light reaching our eyes—and our cameras—originates from artificial sources powered by the electric grid. These light sources change their intensity and spectral power distribution in response to the grid's alternating current, but their flicker is usually too subtle and too fast to notice with the naked eye (100 Hz or more). Artificial lighting produces unnatural-looking colors in photos and temporal aliasing in video. As a result, it is broadly considered undesirable. A method of harnessing this AC-induced lighting variation, recording, untangling and using these signals as a way of gaining information about the electrical grid, gaining information about light sources and improving/modifying pictures is greatly needed.
The foregoing examples of the related art and limitations related therewith are intended to be illustrative and not exclusive. Other limitations of the related art will become apparent to those of skill in the art upon a reading of the specification and a study of the figures.
Provided herein, in accordance with some embodiments, is a method comprising: operating a rolling shutter imaging sensor to capture one or more images of a scene that is illuminated, at least in part, by an AC-powered light source; applying a machine learning classifier to a set of pixel intensity values for a vertical or horizontal sequence of pixels corresponding to one flicker cycle, wherein the classifier is trained on a plurality of sets of pixel intensity values corresponding to a plurality of labeled light source; and determining an identity of the AC-powered light source, based on the application of the classifier.
Further provided herein, in accordance with some embodiments, is a method comprising: operating a rolling shutter imaging sensor to capture one or more images of a scene that is illuminated, at least in part, by an AC-powered light source; estimating pixel intensity values for a vertical or horizontal sequence of pixels in the one or more images, the sequence corresponding to a flicker cycle of the AC-powered light source; and determining an identity of the AC-powered light source, based on the estimation.
Further provided herein, in accordance with some embodiments, is a method comprising: operating an imaging sensor and a shutter to capture image data of a scene illuminator by a plurality of AC-powered light sources, wherein the shutter is associated with AC mains power and is controlled to open and close based on cycles of the AC mains power; and extracting, for the image data, different components related to different ones of the light sources.
Further provided herein, in accordance with some embodiments, is a method comprising: operating a rolling shutter imaging sensor to capture an image of a scene illuminated by an AC-powered light source, wherein said image is subject to spatial flickering, and generating a de-flickered said image by extracting, for each pixel in said image, a flicker-independent intensity value.
Further provided herein, in accordance with some embodiments, is a system comprising: an imaging device comprising a rolling shutter imaging sensor; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: (a) operate the imaging device to capture an image of a scene illuminated at least by a light source powered by an AC (Alternating Current) power source, (b) estimate a set of pixel intensity values for a vertical or horizontal sequence of pixels corresponding to one flicker cycle, (c) compare said set of pixel intensity values to a database of sets of pixel intensity values corresponding to a plurality of light sources, (d) identify said light source as one of said plurality of light sources in the database.
In some embodiments, said estimating is based, at least in part, on applying to said image at least one digital bandstop filter having a frequency response which blocks multiple harmonics of a base frequency given as a multiple of (i) an inter-row or inter-column delay value of said rolling shutter, divided by (ii) a duration of a cycle of said AC power source.
In some embodiments, said identifying further comprises determining an electric phase of said light source.
In some embodiments, said identifying further comprises determining a point in a cycle of said AC power source in which said image was captured.
In some embodiments, said instructions further comprise operating said imaging device to capture a second image.
In some embodiments, an exposure time used for capturing said second image is equal to an integer multiple of said flicker cycle, and wherein said estimating is based, at least in part, on said second image.
In some embodiments, said light source is within direct view of said imaging device, and wherein said image is captured using an optical filter operatively coupled to said imaging device, wherein said optical filter has a transfer function that creates stripes in the captured image.
In some embodiments, (i) wherein said instructions further comprise operating said imaging device to capture a plurality of images, (ii) wherein said estimating is based, at least in part, on identifying said vertical or horizontal sequence of pixels relating to a diffuse surface in said images, and (iii) wherein said identifying comprises at least determining a point in a cycle of said AC power source in which each said image was captured.
In some embodiments, (i) wherein said instructions further comprise operating said imaging device to capture a plurality of images, (ii) wherein said estimating is based, at least in part, on estimating a temporal difference between each pair of images, based at least in part on relative intensity values of corresponding pixels in said pair of images, (iii) and wherein said identifying comprises at least determining a point in a cycle of said AC power source in which each said image was captured.
In some embodiments, said instructions further comprise operating said imaging device to capture a plurality of images over a specified period, and wherein said identifying further comprises generating a global-shutter image at any point during said period, based, at least in part, on estimating a Fourier series coefficients of a temporal signal observed at each pixel in said images.
Further provided herein, in accordance with some embodiments, is a system comprising: an imaging device comprising a rolling shutter imaging sensor; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: (a) operate the imaging device to capture an image of a scene illuminated at least by a light source powered by an AC (Alternating Current) power source, (b) apply a machine learning classifier to a set of pixel intensity values for a vertical or horizontal sequence of pixels corresponding to one flicker cycle, wherein the classifier was trained on a plurality of sets of pixel intensity values corresponding to a plurality of labeled light source, wherein the application of the classifier results in identification of said light source of said image.
Further provided herein, in accordance with some embodiments, is a system comprising: an imaging device comprising a rolling shutter imaging sensor; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: (a) operate the imaging device to capture an image of a scene illuminated by an AC-powered light source, wherein said image is subject to spatial flickering, (b) generate a de-flickered said image by extracting, for each pixel in said image, a flicker-independent intensity value.
In some embodiments, said extracting is based, at least in part, on applying to said image at least one digital bandstop filter having a frequency response which blocks multiple harmonics of a base frequency given as a multiple of (i) an inter-row or inter-column delay value of said rolling shutter, divided by (ii) a duration of a cycle of said AC power source.
Further provided herein, in accordance with some embodiments, is a system comprising: an imaging device comprising an imaging sensor and a shutter configured to move between a closed position and an open position; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: (a) generate a signal having level changes corresponding to specified points in a cycle of a waveform detected from a mains alternate current (AC) outlet, (b) move said shutter into said open position based upon said level changes, for a specified number of said cycles, (c) operate the imaging device to capture image data of a scene illuminated by a plurality of light sources, wherein said image data is being captured when said shutter is in said open position during said specified number of cycles, and (d) extract, from said image data, components related only to a selected one of said plurality of light sources, wherein said extraction is based on at least some of (i) a light response function, (ii) a chromaticity value, and (iii) an electric phase of said light source.
In some embodiments, said imaging device further comprises a plurality of shutter masks operatively coupled to said shutter.
In some embodiments, said capturing comprises defining a sequence of one or more of said shutter masks, wherein each of said shutter masks is applied to said shutter in said sequence, during each period when said shutter is in a said open position within a said cycle.
In some embodiments, each said open position has a duration of at least 1 microsecond.
In some embodiments, said specified number of cycles is at least 2.
In some embodiments, said system is further configured for detecting at least some of a light response function, a chromaticity value, and an electric phase of a said light source.
In some embodiments, said system is further configured for creating and storing a database of light sources, based, at least in part, on said detecting.
In some embodiments, said databased further comprises, for each light source, at least some of a type, a manufacturer, and a power rating.
In some embodiments, said extraction is based, at least on part, on information retrieved from said database.
In some embodiments, said extraction further comprises performing at least one of reflections corrections and color corrections with respect to said image data.
Further embodiments and the full scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.
Exemplary embodiments are illustrated in referenced figures. Dimensions of components and features shown in the figures are generally chosen for convenience and clarity of presentation and are not necessarily shown to scale. The figures are listed below.
The present invention, in some embodiments, provides systems and methods for imaging scenes illuminated at least by one or more light sources powered by alternating current. (AC) The systems and methods are capable of extracting data concerning those light sources, such as light response function, chromaticity and electric phase. Further, the systems and methods provide the capability to de-flicker images, as well as decompose scenes illuminated by multiple light sources into scenes illuminated by only a single light source. These systems and methods can employ a mechanical shutter or a rolling shutter.
Ubiquitous AC-induced lighting variations are a very powerful visual cue—about indoor and outdoor environments, about the light sources they contain, and the electrical grid itself (Fig. Error! Reference source not found.A-B). To this end, we derive a model of time-varying appearance under AC lighting and describe a novel coded-exposure imaging technique to acquire it. Our approach yields several never-seen-before capabilities that we demonstrate experimentally with our “ACam” camera prototype: (1) acquiring a scene's transport matrix by passive observation only, (2) computing what a scene would look like if some of its lights were turned off or changed to a different bulb type (
The key observation behind our work is that ambient AC lighting has a great deal of structure already. This is because of two fortunate facts: (1) AC light sources often do not flicker with the same phase even if located in the same space and (2) their temporal intensity profile is different depending on bulb type, make and model. The former comes from a desire to spread evenly the three phases of AC across light sources in order to balance load on the grid and make flicker even less noticeable. The latter comes from differences in power circuitry and in the mechanism of light emission (fluorescence, incandescence, LED) Thus, the light arriving at a camera pixel is a mixture of differently-shifted and potentially very diverse signals: even among household LED bulbs, we have observed modulations down to 10% of maximum intensity in some products and near-constant intensity in others. The precise mixture of these light signals differs from pixel to pixel in accordance with the scene's light transport properties.
We also show that ubiquitous rolling-shutter cameras suffice to quantitatively sense and analyze flicker. A rolling shutter creates an inter-row delay of exposure. This delay is constant and very short, enabling fast and dense temporal sampling of flicker. This effect creates a spatiotemporal wave pattern in raw rolling-shutter images (
The results are significantly improved if the input short-exposure rolling-shutter frame is accompanied by an image whose exposure time lasts an integer multiple of the flicker cycle. The latter emulates illumination by direct current (DC), easing signal decomposition to flicker illumination modulation and a flicker independent image. Further, we induce the wave pattern spatially in an image of point emitters by mounting a star-filter on the camera (
We now describe a model of AC-modulated lighting. Power suppliers strive for a zero-mean sinusoidal AC voltage having a regular peak outlet amplitude Vmax. Depending on the country Vmax is 170 or 312 zero-to-peak Volts, yielding a root-mean-squared voltage of 120 or 220 Volts, respectively. There are two exclusive standards, having nominal frequencies 50 Hz and 60 Hz. The Americas use the former, while Asia and Europe mainly use the latter. Imperfections in electricity generation slightly wiggle the AC frequency randomly. Hence, the AC is quasi periodic: for a short time span, the effective frequency is a perturbation of the nominal frequency. The wiggle is practically spatially invariant in spatiotemporal scales typical to computer vision: the temporary frequency of the AC is essentially the same in any electrical outlet across the city. The reason is that electricity perturbations propagate at a speed on the order of the speed of light.
In practice, the temporary frequency of the AC is determined from the time interval Δ between two successive zero crossings (
f=1/(2Δ). (1)
The electric grid carries AC in a discrete set of grid phases, using distinct, exclusive sets of cables. In most scenes there are three such phases spaced 2π/3 apart. Each outlet is connected to one of these grid phases. In our labs, we declared one outlet to be the reference, having phase ϕ=0. Hence, ={0,2π/3,4π/3} (see Fig. Error! Reference source not found.B). Some regions may be linked by a distribution transformer that shifts all phases by a constant ϕ′. If the scene contains two such subregions then ={0,2π/3,4π/3, ϕ′,2π/3+ϕ′,4π/3+ϕ′}. However, we did not encounter such a scene in our experiments. Now suppose we count time t with a stopwatch, beginning from some negative-to-positive zero crossing of the voltage at the reference outlet (
V(t)=Vmax sin(2πft−ϕ). (2)
A bulb β is a system whose input is the voltage V(t) and its output is spectral flux Lβ(t,λ), where λ denotes wavelength. Hypothesize for a moment a bulb which is electrically linear, i.e., the current J(t) satisfies a proportionality J(t)∝V(t). Then, hypothesize that this bulb is unmediated, converting electric power J(t)V(t)∝V2(t) to flux directly and instantaneously. Thus, the spectral flux Lβ(t,λ) is equivalent to V2(t). Consequently, the hypothetical bulb flickers at double the AC frequency and becomes dark whenever V(t) goes to zero. We call this flickering period a cycle, whose duration is Δ.
In practice, the transition from electricity to radiance is mediated by various mechanisms. Optical mediators include heat, gas discharge and phosphorescence. Non-incandescent bulbs generally have electronic components inside the bulb fixture, to which the lay person is oblivious. These components (diodes, inductors, etc.) mediate between voltage and spectral flux. Mediators have response times and nonlinearities. Hence the function Lβ(t,λ) is a distortion of V2(t): there is a delay, and Lβ(t,λ) generally does not go to zero during a cycle.
Denote by the finite set of bulbs in use. Consider a bulb βϵ, such as a particular fluorescent bulb in a brand fixture, whose time-averaged spectral flux over one cycle is
L
β(t,λ)=
We define the unit-less function Bβ(t,λ) to be the spectral bulb response function (SBRF). This function has a time average of 1 for each wavelength and serves as an intrinsic model of a bulb's temporal behavior.
Acquiring a lamp's SBRF requires specialized equipment like integrating spheres and high-speed spectrometers. As such, measuring the SBRF directly is rather involved. A more practical model of bulb behavior is to consider the time-varying measurements from a camera or photodiode placed nearby (with or without color filters):
I
β(t,σ)=
Here Iβ(t,σ) is the intensity measured at a pixel or photodiode at time t and spectral band σ,
In general, both the SBRF and the BRF may exhibit a slightly different temporal profile across cycles (e.g., due to voltage polarity, warm-up period, ambient temperature, etc.) Here we ignore these secondary effects for the sake of simplicity, treating BRFs as essentially invariant to the number of cycles since time zero. Thus, our BRFs are fully specified by their values in very first cycle. In the following we restrict t to lie in the interval [0,Δ] and treat the BRF as a function that is defined over just that interval.
Cameras and photodiodes provide discrete samples of the continuous intensity Iβ(t,σ). Suppose Iβ(t,σ) is resolved into K samples within a cycle. These samples correspond to integrals of Iβ(t,σ) over consecutive time intervals of duration Δ/K. Thus, Eq. (Error! Reference source not found.) becomes
where the K-dimensional row vectors iβ(σ) and bβ(σ) hold the intensity and BRF samples, respectively.
According to one aspect, there is provided a database of light sources. In some embodiments, the database comprises light source specific bulb response function (BRF). In some embodiments, the database further contains for a given light source at least one of: the manufacturer, the power rating, the bulb wattage and the sensor/filter used to capture the data. In some embodiments, the database is for use in at least one of: computerized imaging of a power grid, determining grid phase of a light source, determining bulb type of a light source, unmixing an image, denoising an image, white balancing an image and relighting an image. As used herein, “unmixing” refers to taking a scene illuminated by more than one light source and producing an image of the scene as it would appear when illuminated by only one, or only some of the slight sources. As used herein, “relighting” refers to converting an image of a scene that is illuminated by at least one light to the same scene illuminated by a different light source. In some embodiments, the different light source does not illuminate the original scene. In some embodiments, the image is illuminated by more than one light source and the relighting is generating an image illuminated by one, or only some, of the light sources. In some embodiments, the BRF is a monochrome BRF. In some embodiments, the BRF is a chromatic BRF. In some embodiments, the BRF is monochrome and/or chromatic.
By a first aspect there is provided, a system comprising: an imaging device comprising an imaging sensor and a shutter wherein the shutter is configured to move between a closed position and an open positions; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: generate a signal having level changes corresponding to specified points in a cycle of a waveform detected from a mains alternate current (AC) outlet, move the shutter into the open position based upon the level changes, for a specified number of the cycles, operate the imaging device to capture an image of a scene illuminated by a plurality of light sources, wherein the image data is being captured when the shutter is in the open position during the specified number of cycles, and extract from the image data, components related only to a selected one of the plurality of light sources, wherein the extraction is based on at least some of (i) a light response function, (ii) a chromaticity value, and (iii) an electric phase of the light source.
By another aspect, there is provided a method of at least one of reflection correction, color correction, white balancing, de-flickering, relighting, calculating a light response, calculating a chromaticity value, determining the electric phase of a light source in and decomposing an image, the method comprising operating a system of the invention to capture an image of a scene illuminated by at least one light source, and extracting data from the image.
As used herein, the term “chromaticity” refers to a quality of a color regardless of it luminance. In some embodiments, chromaticity comprises hue. In some embodiments, chromaticity comprises colorfulness. Colorfulness may also be referred to by saturation, chroma, intensity or excitation purity.
In some embodiments, the imaging device is a camera. In some embodiments, the camera is a fixed aperture camera. In some embodiments, the camera is a global shutter camera. In some embodiments, the camera is a mechanical shutter camera. In some embodiments, the camera is not a rolling shutter camera. In some embodiments, the camera is configured to keep its shutter open for at least 1, 2, 3, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 1000, 1500 or 2000 cycles of the electric grid. Each possibility represents a separate embodiment of the invention. In some embodiments, the camera is configured to keep its shutter open for between 2-2000, 2-1500, 2-1000, 2-900, 2-800, 2-700, 2-600, 2-500, 10-2000, 10-1500, 10-1000, 10-900, 10-800, 10-700, 10-600, 10-500, 50-2000, 50-1500, 50-1000, 50-900, 50-800, 50-700, 50-600, 50-500, 100-2000, 100-1500, 100-1000, 100-900, 100-800, 100-700, 100-600, 100-500, 150-2000, 150-15000, 150-1000, 150-900, 150-800, 150-1700, 150-600 or 150-500 cycles of the electric grid. Each possibility represents a separate embodiment of the invention. In some embodiments, the camera is configured to keep its shutter open for between 50 and 2000 cycles. In some embodiments, the camera is a black and white camera. In some embodiments, the camera is a color camera. In some embodiments, the camera is a black and white or color camera.
In some embodiments, the level changes correspond to a programmable delay from specified points in the cycle. In some embodiments, the specified points are at least one reference point. In some embodiments, the reference point is a zero-crossing. In some embodiments, the level change is the same for each cycle.
As used herein, the term “waveform detected from a mains alternate current outlet” refers to the waveform produced by an electric grid. The electric grid will be the grid of the city in which the outlet is located, and the cycle of the waveform will be the cycle of the electric grid. In this way the system of the invention can couple the action of the imaging device and other components of the system to specific points in the AC cycle. In some embodiments, the outlet draws power from the same power grid as the light sources. In some embodiments, the outlet draws power from a different power grid as the light sources. In some embodiments, the mains alternate current outlet is any power outlet. In some embodiments, the mains alternate current outlet is AC power outlet. In some embodiments, the mains alternate current outlet is any outlet in a city.
The system of the invention holds the shutter of the imaging device open for a specified number of cycles of the electric grid. In some embodiments, each open position has a duration of between 1 microsecond and 50 seconds, 1 microsecond and 40 seconds, 1 microsecond and 30 seconds, 1 microsecond and 20 seconds, 1 microsecond and 10 seconds, 1-50, 1-40, 1-30, 1-20, 1-10, 5-50, 5-40, 5-30, 5-20, 5-10, 10-50, 10-40, 10-30, 15-50, 15-40 or 15-30 seconds. Each possibility represents a separate embodiment of the invention. In some embodiments, each open position has a duration of at least 1 microsecond, 100 microseconds, 1000 microseconds, 10000 microseconds, 100000 microseconds, 1 seconds, 2 seconds, 5 seconds, 10 seconds or 20 seconds. Each possibility represents a separate embodiment of the invention.
In some embodiments, the system is connected to the AC electric grid. In some embodiments, the system comprises a direct connection to the AC electric grid. The system can thus open and close the shutter at the same point in the AC cycle. In some embodiments, the signal corresponds to an arbitrary start of the cycle. In some embodiments, at least one signal is produced. In some embodiments a plurality of signals is produced. In some embodiments, the specified number of cycles is at least 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, or 500 cycles of the electric grid. Each possibility represents a separate embodiment of the invention. In some embodiments, the specified number of cycles is between 10-2000, 10-1500, 10-1000, 10-900, 10-800, 10-700, 10-600, 10-500, 50-2000, 50-1500, 50-1000, 50-900, 50-800, 50-700, 50-600, 50-500, 100-2000, 100-1500, 100-1000, 100-900, 100-800, 100-700, 100-600, 100-500, 150-2000, 150-15000, 150-1000, 150-900, 150-800, 150-1700, 150-600 or 150-500 cycles of the electric grid. Each possibility represents a separate embodiment of the invention. In some embodiments, the shutter is opened and closed in response to the same signal. In some embodiments, the shutter is opened and closed at the same specified point of the cycle.
In some embodiments, the scene is illuminated by at least one light source. In some embodiments, the scene is illuminated by at least 2 light sources. In some embodiments, the scene is illuminated by a plurality of light sources. In some embodiments, the light sources are attached to an AC power grid. In some embodiments, the light sources are all attached to the same AC power grid. In some embodiments, the light sources are attached to the same AC power grid as the system of the invention. In some embodiments, at least one light source is a natural light source. In some embodiments, at least one light source is not a man-made light source. In some embodiments, at least one light source does not run on AC power. In some embodiments, at least one light source is not connected to an AC power grid. In some embodiments, the light source is in a database. In some embodiments, the light source is in the DELIGHT database. In some embodiments, the light source is not in the DELIGHT database. In some embodiments, the light source is selected from a fluorescent bulb, a non-fluorescent bulb, an LED, an incandescent bulb, a halogen bulb, a compact fluorescent bulb, a sodium lamp, a mercury lamp and a metal halide lamp.
In some embodiments, the extraction is based on a light response. In some embodiments, the extraction is based on chromaticity value. In some embodiments, the extraction is based on an electric phase of the light source. In some embodiments, the extraction is based on at least one of a light response function, a chromaticity value, and (iii) an electric phase of the light source. In some embodiments, the phase of the light source is extracted. In some embodiments, an image of the scene illuminated by only some of the light sources is extracted. In some embodiments, an image of the scene illuminated by only one light source is extracted. In some embodiments, a de-flickered image is extracted. In some embodiments, an image of the scene illuminated by a different light source is extracted. In some embodiments, the type of bulb in the light source is extracted. In some embodiments, a combination of the above is extracted. In some embodiments, the extraction comprises performing a de-flickering of the image. In some embodiments, the extraction comprises performing a relighting of the image. In some embodiments, the extraction comprises performing a decomposition of the image. In some embodiments, the extraction comprises performing reflection correction with respect to the image. In some embodiments, the extraction comprises performing color correction with respect to the image. In some embodiments, the extraction comprises performing white balancing to the image. In some embodiments, the extraction comprises performing a combination of the above described alterations with respect to the image. In some embodiments, the extraction comprises at least one of reflection correction, color correction, white balancing, de-flickering, relighting, and decomposing the image. In some embodiments, the extraction comprises at least one of reflection correction, color correction, white balancing, de-flickering, relighting, calculating a light response, calculating a chromaticity value, determining the electric phase of and decomposing the image.
In some embodiments, the imaging device further comprises at least one shutter masks. In some embodiments, the system further comprises at least one shutter masks. In some embodiments, the imaging device further comprises a plurality of shutter masks. In some embodiments, the system further comprises a plurality of shutter masks. In some embodiments, the shutter masks are operatively couple to the shutter. In some embodiments, the capturing comprises defining a sequence of one or more shutter masks. In some embodiments, each successive image in said series of images is captured using one of said shutter masks in the sequence. In some embodiments, each of the shutter masks is applied to the shutter in the sequence, during each period when the shutter is in an open position within a cycle. In some embodiments, each shutter mask corresponds to a specified point in the cycle. In some embodiments, each mask is placed in front of the shutter only during the specified point in the cycle. In some embodiments, the sequence of shutter masks moves to block the shutter during one imaging. In this way during one imaging, which last many cycles, there is always the same mask on the shutter during the same point of the cycle.
In some embodiments, the shutter masks are spatially configurable. In some embodiments, a shutter mask blocks, or turns off, at least one pixel. In some embodiments, a shutter mask blocks or turns off, more than one pixel. In some embodiments, a shutter mask blocks or turns off, a block of pixels.
In some embodiments, the specified points are zero points of the waveform. In some embodiments, the specified points are zero points crossings of the waveform. In some embodiments, the specified points may be any time in the waveform.
In some embodiments, the system further comprises a microprocessor. In some embodiments, the microprocessor is an Arduino. In some embodiments, the microprocessor coordinates the opening/closing of the shutter, and/or the moving of the masks, with the AC cycle. In some embodiments, the system further comprises an AC voltage transformer. In some embodiments, the system is compatible with a voltage of 120 and/or 220 volts. In some embodiments, the system is compatible with a frequency of 50 Hz and/or 60 Hz.
In some embodiments, the system is further configured for detecting at least one of a light response function, a chromaticity value and an electric phase of a light source. In some embodiments, the system is further configured for creating and storing a database of light sources, based, at least in part on the detection. In some embodiments, the database is the DELIGHT database. In some embodiments, the database is a continuation of the DELIGHT database. In some embodiments, the extraction is based, at least in part, on information from the database. In some embodiments, the extraction is based, at least in part, on information from the DELIGHT database.
Let us point a camera at a bulb in the scene. The measured signal i(σ) follows Eq. (Error! Reference source not found.). This signal is normalized by the mean brightness, yielding inorm(σ). Now, all temporal variations are due to the bulb's BRF, chromaticity and grid phase. We recognize the bulb and its phase using:
where is the set of bulbs in DELIGHT, is the set of possible grid phases, Qβ(σ) is the chromaticity of bulb β in the database, and shift ( ) circularly shifts to the right the bulb's sampled BRF by phase ϕ. When using a monochrome camera, there is only one spectral band so Qβ(σ)=1.
To simplify notation, we drop the spectral band σ wherever we can. A scene contains static objects and is illuminated by S light sources. It is observed by a camera having a linear radiometric response and P pixels. As in Example 2, we resolve the time-varying image into K frames.
Now suppose only source s is on, with chromaticity Qs, BRF baS and phase 0. Furthermore, suppose matrix Is holds the resulting single-source image sequence. Each column of Is is a frame and each row is the intensity of one pixel through time. At frame k pixel p's intensity follows Eq. (Error! Reference source not found.):
I
s[p,k]=τpsQsbs[k] (8)
where brackets denote individual elements of Is and bs. The factor τps expresses light transport. This factor specifies the total flux transported from source s to pixel p via all possible paths. This transport encapsulates global factors such as the camera's numerical aperture and spectral response; spatial and angular variations in radiance at pixel p by source s; the BRDF at p when illuminated by s; shadows, inter-reflections, etc.
Expressing Eq. (Error! Reference source not found.) in matrix form we obtain:
I
s=τsQsbs (9)
Here column vector τs concatenates the transport factors of all pixels for source s. It follows that individual frames of the sequence are just scalings of vector τs.
Now, the scene is illuminated by S sources connected to phase zero. The image sequence becomes a superposition of S single-source sequences, one per source s:
I=I
1
+ . . . +I
s
+ . . . +I
s (10)
Suppose the chromaticities and BRFs of these sources are b1, . . . , bS and Q1, . . . , QS respectively. Combining Eqs. (Error! Reference source not found.) and (Error! Reference source not found.), factorizing various terms and denoting T for transpose we obtain
Matrix T is the scene's P×S transport matrix. Each column of T describes the appearance of the scene when a specific source is turned on. This matrix is time-invariant and generally unknown.
Finally, suppose the sources in the scene have phases ϕ1, . . . , ϕs instead of being zero. The BRF matrix in Eq. (Error! Reference source not found.) now contains BRFs that have been circularly shifted individually according to their sources' phase:
B=[shift(ϕ1,b1)T . . . shift(ϕs,bs)T]T (14)
Single-source sequences are linearly mixed in the data I. We seek unmixing, i.e., linear source separation. The key is to estimate the transport matrix T based on Eq. (Error! Reference source not found.).
Consider any two sources s1 and s2 that are connected to the same phase and have the same BRF. According to Eq. (Error! Reference source not found.), the two-source sequence due to these sources is
I
s
+I
s
=(τs
Thus, the contributions of the two sources add up as if the scene is illuminated by a single source having the same phase and BRF. The contribution of these sources is therefore inseparable. Divide all sources used in the scene into subsets of sources, where each subset has no linear dependency to another. We consider unmixing only across these linearly-independent subsets. For the rest of the paper we refer to these independent subsets as the S “sources.”.
Assume we know QB. This is measured in two ways:
The transport matrix is estimated using
where ⊙ denotes a Hadamard (element-wise) multiplication and∥F is the Frobenius norm. The P×K weight matrix W discards saturated data:
Eq. (Error! Reference source not found.) is a simple least-squares estimator. Due to noise and minor differences between sources of the same class, the assumption of a known QB is not precisely met. To counter slight inconsistencies, a refinement allows B to change a bit. Using {circumflex over (T)} derived in Eq. (Error! Reference source not found.), we compute:
After this least-squares estimation of
Each column of {circumflex over (T)} is an unmixed image of the scene. This image is already white balanced because the chromaticities of all sources are factored into Q.
We can reconstruct the single-source image sequence of a source s using
I
s={circumflex over (τ)}sQsshift(ϕs,bs) (19)
where {circumflex over (τ)}s is the corresponding column of {circumflex over (T)}. The intensities in this sequence can safely exceed the saturation level of the sensor. This is because Eqs. (Error! Reference source not found.) and (Error! Reference source not found.) bypass saturated data when estimating {circumflex over (T)}. Intensities in the captured image sequence suffer from sensor readout noise. Yet, since Eq. (Error! Reference source not found.) forces all pixels to vary in synchrony according to a common BRF, the rendered sequence Îs is less noisy than the input data.
Last but not least, light sources can be changed to bulbs that were not seen at all during the acquisition. Changing bulbs means changing their chromaticity and BRF to that of other bulbs (e.g., in DELIGHT or merely imagined). Moreover, we can change the grid phase of light sources and can use a diagonal amplification matrix A to amplify or de-amplify them. This leads to generalized relighting:
I
relight
={circumflex over (T)}[AQB]relight (20)
To separate a semi-reflection from a transmitted scene, we show a new principle: passive AC-based unmixing. We realize this principle using either one of the following two mechanisms:
The indoor environment is illuminated by two kinds of sources. First, part of the natural daylight illuminates the indoors through a window. The second light source indoors is connected to the AC grid. In this case τout and τac correspond to the two sources. Since daylight is approximately time-invariant at timescales of a few thousand cycles, its BRF is a vector of all ones. The bulb's BRF bac is unknown, i.e., we are not relying on any database or known grid phase.
As before, our input data is an image sequence I. We ignore chromaticities for brevity. Now consider two frames k1 and k2 with bac[k1]>bac[k2]. The corresponding images, represented by columns of I, are:
I[k1]τblackoutτblackacbac[k1] (21)
I[k2]=τblackoutTblackacbac[k2] (22)
It follows that vectors τac and I[k1]-I[k2] are equal up to a scale factor. Along similar lines, it is possible to show that vectors τout and I[k2]-AI[ki] are also equal up to a scale factor for some unknown scalar A. We estimate this scalar using independent component analysis (ICA). Specifically, A is optimized to minimize the mutual information of vectors I[k1]-I[k2] and I[k2]-AI[ki].
We now briefly describe the model of illumination under AC power. AC voltage is approximately a sinusoid in time. Its frequency f is either 50 Hz or 60 Hz, depending on the country. Bulbs flicker at double the AC frequency, in a cycle lasting Δ=1/(2f) seconds. Each bulb is powered by one of three electric grid lines, having respective AC phases ϕϵ{0°, 120°, 240°}. Any electric outlet or bulb connected to one of these power lines can be considered as a reference, i.e., having ϕ=0°.
Events of interest, such as raw image acquisition, take place in absolute time, denoted τabsϵ (
Herein, the time variable tcan ranges over the circular domain [0,Δ]. If a bulb is connected to an outlet of phase ϕ, then the bulb's flicker response is Bβ(tcan−ϕΔ/2π). BRFs can be measured “in the field” (see Example 18) or obtained from a database such as DELIGHT.
An image has R×C pixels, where r indexes rows and c indexes columns. The scene is illuminated by S sources, indexed by s. Let Bs be the BRF of the bulb type to which source s belongs, and ϕs be the electric phase to which this source is connected. The intensity of an object illuminated by S sources at pixel (r,c) is
i(r,c,tcan)=Σs=1Sτs(r,c)Bs(tcan−ϕsΔ/2π) (25)
Here τs (r,c) is the response of image pixel (r,c) to illumination by s. It encompasses image radiance factors that depend on the distance of the object from the light source, surface slope, albedo, lens aperture, bidirectional reflectance, inter-reflections and exposure duration Texp. That is, τs (r,c) is the light transport coefficient at this pixel. The transport coefficients in all pixels constitute a matrix τs.
In a rolling shutter, the exposure of each row is delayed by D seconds relative to the preceding row. Though some rolling-shutter sensors delay columns rather than rows, without loss of generality, we assume a sensor with inter-row delay. Let row 0 (topmost row) be acquired at absolute time tkabs, where k=0, 1, . . . is the discrete index of a captured rolling-shutter frame. Row r is thus acquired at time
t
k,r
abs
=t
k
abs
+rD (26)
Rows thus correspond to distinct temporal samples. Often D is much smaller than the exposure duration Texp. This enables a high temporal sampling rate (1/D Hz), while enough photons accumulate during Texp for a high signal.
We now model image formation of an AC-illuminated scene that is viewed by a rolling-shutter camera (
k
t
k
canϵ[0,Δ]. (27)
We describe herein how this mapping can be derived from image data. For the moment, let this mapping be known. Following Eq. (26), row r of rolling-shutter frame k is acquired at canonical time
t
k,r
can
=t
k
can
+rD. (28)
Let ikroll (r,c) be the intensity measured at pixel (r,c) of frame k. Combining Eqs. (25, 28), this intensity is equal to
i
k
roll(r,c)=Σs=1Sτs(r,c)Bs(tkcan+rD−ϕsΔ/2π (29)
Eq. (29) corresponds to a spatial vertical wave pattern with a period of Δ/D rows (
i
k
roll(r,c)=ikroll(r+Δ/D,c) (30)
For a sequence of rolling-shutter frames, Eq. (29) expresses a spatiotemporal wave function that moves vertically with upward velocity
v=1/D (31)
pixels per second. To see this, consider two consecutive rolling-shutter images, k and k+1, whose canonical times are tkcan, tk+1can, respectively. In an image region Ω for which τs(r,c) is vertically uniform, Eq. (29) satisfies
i
k
roll(r,c)=ik+1roll(r−v(tk+1can−tkcan),c) (32)
This wave motion is independent of the scene's BRFs.
When the exposure time is Δ (e.g., 0.01 sec in a 50 Hz electric grid) or an integer multiple thereof, the image is unaffected by the wave pattern and emulates imaging under DC. Following Eqs. (24, 29),
By another aspect, there is provided a system comprising an imaging device comprising a rolling shutter imaging sensor; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: operate the imaging device to capture an image of a scene illuminated by at least one AC powered light source, wherein the image is subject to spatial flickering, generate a de-flickered image by extracting, for each pixel in the image, a flicker-independent intensity value.
By another aspect, there is provided a system comprising an imaging device comprising a rolling shutter imaging sensor; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: operate the imaging device to capture an image of a scene illuminated at least by one light source powered by an AC power source, estimate a set of pixel intensity values for a vertical or horizontal sequence of pixels corresponding to one flicker cycle, compare the set of pixel intensity values to a database of sets of pixel intensity values corresponding to a plurality of light sources, identify the light source as one of the plurality of light sources in the database.
By another aspect, there is provided a system comprising an imaging device comprising a rolling shutter imaging sensor; at least one hardware processor; and a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to: operate the imaging device to capture an image of a scene illuminated at least by one light source powered by an AC power source, apply a machine learning classifier to a set of pixel intensity values for a vertical or horizontal sequence of pixels corresponding to one flicker cycle, wherein the classifier was trained on a plurality of sets of pixel intensity values corresponding to a plurality of labeled light source, wherein the application of the classifier results in identification of the light source of the image
By another aspect, there is provided a method for de-flickering an image subject to spatial flickering, comprising: capturing with a rolling shutter imaging device an image of a scene illuminated by a single light source powered by an AC power source, wherein the image is subject to spatial flickering, extracting for each pixel in the image a flicker-independent intensity value, thereby extracting a de-flickered image from an image with spatial flickering.
By another aspect, there is provided a method for at least one of reflection correction, color correction, white balancing, de-flickering, relighting, calculating a light response, calculating a chromaticity value, determining the electric phase of a light source and decomposing of an image, the method comprising, operating an imaging device with a rolling shutter to capture an image of a scene illuminated by at least one light source powered by an AC power source, estimating a set of pixel intensity values for a vertical sequence or horizontal sequence of pixels corresponding to one flicker cycle, comparing the set of pixel intensity values to a database of sets of pixel intensity values corresponding to a plurality of light sources, identifying the at least one light source as one of the plurality of light sources in the database. In some embodiments, the pixel intensities are flicker-independent.
By another aspect, there is provided a method comprising: operating a rolling shutter imaging sensor to capture one or more images of a scene that is illuminated, at least in part, by an AC-powered light source; estimating pixel intensity values for a vertical or horizontal sequence of pixels in the one or more images, the sequence corresponding to a flicker cycle of the AC-powered light source; and determining an identity of the AC-powered light source, based on the estimation. In some embodiments, the pixel intensities are flicker-independent.
By another aspect, there is provide a method comprising: operating an imaging sensor and a shutter to capture image data of a scene illuminator by a plurality of AC-powered light sources, wherein the shutter is associated with AC mains power and is controlled to open and close based on cycles of the AC mains power; and extracting, for the image data, different components related to different ones of the light sources.
In some embodiments, the imaging device is a camera. In some embodiments, the camera is in a computer. In some embodiments, the camera is in a smart phone. In some embodiments, the camera is a webcam. In some embodiments, the camera is a commercially available camera. In some embodiments, the camera is a black and white camera. In some embodiments, the camera is a color camera. In some embodiments, the camera is a black and white or color camera. In some embodiments, the camera delays the exposure of each row. In some embodiments, the camera delays the exposure of each column. In some embodiments, the camera delays the exposure of each row and/or column.
In some embodiments, the estimating is based, at least in part, on applying to the image at least one digital bandstop filter. In some embodiments, the bandstop filter has a frequency response which is a multiple of (i) and inter-row or inter-column delay value of the rolling shutter, divided by (ii) a duration of a cycle of the AC power source. In some embodiments, the bandstop filter has a frequency response which blocks multiple harmonics of a base frequency given as a multiple of (i) and inter-row or inter-column delay value of the rolling shutter, divided by (ii) a duration of a cycle of the AC power source. It will be understood by one skilled in the art that for cameras with a row delay the value will be the delay between rows, and for cameras with a column delay the value will be delay between columns. In some embodiments, the multiple is an integer multiple. In some embodiments, the harmonic is a multiple or integer multiple. In some embodiments, the bandstop filter blocks the main frequency. In some embodiments, the bandstop filter blocks the main frequency and at least one of its harmonics.
In some embodiments, the identification further comprises determining an electric phase of the light source. In some embodiments, the identification further comprises determining at least one of a light response function, a chromaticity value, and an electric phase of the light source. In some embodiments, the identification further comprises determining at least one of a light response function, a chromaticity value, a contribution of each light source to the total illumination in the image, and an electric phase of the light source. In some embodiments, the identification further comprises determining a point in a cycle of the AC power source in which the image was captured. In some embodiments, the determining the point in a cycle is determining the phase of the cycle. In some embodiments, the phase is selected from 0, 120 and 240 degrees.
In some embodiments, the instructions further comprise operating the imaging device to capture a second image. In some embodiments, the exposure time used for capturing the second image is equal to an integer multiple of the flicker cycle. In some embodiments, the exposure time is equal to an integer multiple of the AC cycle. In some embodiments, the estimating is based, at least in part, on the second image.
In some embodiments, the instructions further comprise operating the imaging device to capture a plurality of images. In some embodiments, the estimating is base, at least in part, on identifying a second vertical or horizontal sequence of pixels relating to a diffuse surface in the images. It will be understood that for cameras with vertical delay the sequence will be vertical and for cameras with horizontal delay the sequence will be horizontal. In some embodiments, the estimating is based, at least in part, on estimating a temporal difference between each pair of images. In some embodiments, the estimating difference is based at least in part on relative intensity values of a selected pixel in the pair of images. In some embodiments, the estimating difference is based at least in part on relative intensity values of corresponding pixels in the pair of images. In some embodiments, the identifying comprises at least determining a point in a cycle of the AC power source in which each of the images was captured. In some embodiments, the phase of the cycle is determined. In some embodiments, the point in the cycle in which all of the images were captured is determined.
In some embodiments, the identifying further comprises generating a global-shutter image. In some embodiments, the global-shutter image is generated at any point during the period. In some embodiments, the global-shutter image is generated at any point during the cycle. In some embodiments, the global-shutter image is based, at least in part, on estimating Fourier series coefficients of a temporal signal observed at each pixel in the image. In some embodiments, the Fourier series coefficients are determined using at least one of equations 47, 48, and 49. In some embodiments, the Fourier series coefficients are determined using equation 56. In some embodiments, the Fourier series coefficients are determined using at least one of equations 47, 48, 49 and 56.
In some embodiments, the period is longer than an AC cycle. In some embodiments, the period is multiple AC cycles. In some embodiments, the period is as long as the shutter is open.
In some embodiments, the scene is illuminated by at least one light source. In some embodiments, the scene is illuminated by at least 2 light sources. In some embodiments, the scene is illuminated by a plurality of light sources. In some embodiments, the light sources are attached to an AC power grid. In some embodiments, the light sources are all attached to the same AC power grid. In some embodiments, the light sources are attached to the same AC power grid as the system of the invention. In some embodiments, at least one light source is a natural light source. In some embodiments, at least one light source is not a man-made light source. In some embodiments, at least one light source does not run on AC power. In some embodiments, at least one light source is not connected to an AC power grid. In some embodiments, the light source is in a database. In some embodiments, the light source is in the DELIGHT database. In some embodiments, the light source is not in the DELIGHT database. In some embodiments, the light source is selected from a fluorescent bulb, a non-fluorescent bulb, an LED, an incandescent bulb, a halogen bulb, a compact fluorescent bulb, a sodium lamp, a mercury lamp and a metal halide lamp.
In some embodiments, the light source is within direct view of the imagining device. In some embodiments, the light source is out of the view of the imaging device. In some embodiments, the light source is within direct view of the imaging device and the image is captured using an optical filter operatively coupled to the imaging device. In some embodiments, the optical filter has a transfer function that creates stripes in the captured image. In some embodiments, the stripes are an optical spread. In some embodiments, the stripes are horizontal, vertical or both. In some embodiments, the optical filter has an optical transfer function, or a point spread function, that creates stripes on a sensor plane with the filter. In some embodiments, the optical filter has an optical transfer function, or a point spread function, that creates stripes on an image taken with the filter. In some embodiments, the optical filter is a star filter. Examples of optical filters include, but are not limited to a diffuser, a prism a diffraction grating, a star filter and a fast-rotating mirror. In some embodiments, the optical filter is anything that spreads light. In some embodiments, the optical filter creates a two-arm, or more, spread. In some embodiments, the image is captured using an optical filter operatively coupled to the imaging device. In some embodiments, the imaging device further comprises an optical filter.
Machine learning is well known in the art, and the systems of the invention can use a machine learning algorithm to identify and categorize different AC-powered light sources. In some embodiments, at least 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, or 20 light sources with different BRFs are analyzed before the algorithm can identify and/or classify an unknown AC-powered light source.
In some embodiments, the methods of the invention further comprise color-correcting at least one of the one or more images. In some embodiments, the color correction is based on the determined identity of the AC-powered light source. In some embodiments, the methods of the invention further comprise determining a phase of the AC power. In some embodiments, the determining is determining a phase of the AC power of at least one light source illuminating the scene. In some embodiments, the phase of the AC power is determined based on the estimation. In some embodiments, when the scene is illuminated by multiple AC-powered light sources the methods of the invention further comprise creating at least one new image of the scene, each image simulating an appearance of the scene under illumination by at least one of the multiple AC-powered light sources. In some embodiments, the simulated appearance is of the scene under illumination by not all of the light sources. In some embodiments, the simulated appearance is of the scene under illumination by only one light source. In some embodiments, the simulated appearance is of the scene under illumination by a different light source that did not originally illuminate the scene. In some embodiments, the methods of the invention further comprise relighting the scene. In some embodiments, the methods of the invention further comprise decomposing the lighting of the scene. In some embodiments, the methods of the invention further comprise at least one of: color-correcting at least one of the one or more images; determining a phase of the AC power, and when the scene is illuminated by more than one light source creating at least one new image of the scene simulating the scene illuminated by not all of the more than one light source.
The flicker that affects ikroll has a known spatial frequency of D/Δ. We leverage this property to decompose ikroll into a flicker-dependent and flicker-independent component. This operation is motivated by common (non-flicker) intrinsic-image decomposition techniques.
Consider an image region illuminated by a single source s. Then, Eq. (29) becomes
i
k
roll(r,c)=τs(r,c)Bs(tkcan+rD−ϕsΔ/2π) (34)
for all pixels in the region. This is a product of a flicker-independent component τs (r,c) and a flicker dependent component Bs(tkcan,r)≡Bs(tkcan+rD−ϕsΔ/2π. From Eq. (34)
ln[ikroll(r,c)]=ln[τs(r,c)]+ln[Bs(tkcan,r)]. (35)
Due to the vertical periodicity of Bs(tkcan,r), all the signal energy associated with ln[Bs(tkcan,r)] resides in specific spatial frequencies: 0, +D/Δ, ±2D/Δ, . . . . Thus, M non-DC harmonics of ln[Bs(tkcan,r)] can be eliminated using a linear filter V(r) whose frequency response blocks frequencies ±D/Δ, ±2D/Δ, . . . ±MD/Δ. This vertical homomorphic spatially invariant filtering yields
{circumflex over (τ)}(r,c)≡exp(ln[ikroll]*V(r))=
exp(ln[τs(r,c)]*V(r)+ln[Bs(tkcan,r)]*V(r))=
exp
Here {circumflex over (B)}s is the temporal mean of ln[Bs]. For any image region dominated by any single source s, the result {circumflex over (τ)}(r,c) approximates τs (r,c) there (
We used a cascade of digital filters, i.e., V(r)=V1(r)*V2(r)* . . . *VM(r). Each Vm(r) blocks the mth flicker harmonic by a 4 order bandstop Bessel filter, defined by a critical bandstop domain [D(m/Δ−ε), D(m/Δ+ε)]. In our case 1/Δ=100 Hz, ε=8 Hz and M=8.
AC Lighting Retrieval from a Single Frame: Image regions mainly illuminated by a single source are modeled by Eq. (34). Different sources may illuminate different image regions. In regions dominated by each source s, we seek: (a) the bulb type βϵper s, (b) the electric phase ϕs, and (c) the canonical time of the image tkcan. The AC phase ϕs and tkcan are linearly coupled in Eq. (34). Hence define an unknown
g
k
can
=t
k
can−ϕΔ/2π (37)
Suppose we have an approximation of the transport coefficients {circumflex over (τ)}s. Such an approximation can be obtained by the filtering operation of Eq. (36). Alternatively, if the flicker spatial period is small, {circumflex over (τ)}s may be approximated by a low-pass filter of ikroll Then, from Eq. (345),
Define a vertical image line
r,c={(r−l,c), . . . ,(r,c), . . . ,(r+l,c)}, (39)
where l=┌Δ/(2D)┐. The mean intensity of ikfilt on
Eq. (40) normalizes ikfilt by μr,c, so that the subsequent analysis is insensitive to any potential residual scale factor. Now, we recognize the bulb type β that dominates pixel (r,c) as well as the value of gkcan there using
Once ĝkcan(r,c)) has been estimated for all pixels, we decompose it into an associated per-pixel electric-grid phase ϕ(r,c) and frame canonical time tkcan. Let pixel (r0,c0) be strongly dominated by illumination from the reference AC outlet. Hence, set {circumflex over (ϕ)}(r0,c0)=0°. Thus, following Eq. (37),
{circumflex over (t)}
k
can
=ĝ
k
can(r0,c0) (42)
Based on Eqs. (37, 42),
{circumflex over (ϕ)}(r,c)=2π[{circumflex over (t)}kcan−ĝkcan(r,c)]/Δ (43)
It is expected that in areas that are strongly dominated by a single source, {circumflex over (ϕ)}(r,c) should be either 0°, 120°, or 240°.
Previously we assumed an approximately constant τs per region Ω. We compensated for deviation from this assumption by roughly estimating τs from a single image. However, we can retrieve τs directly by using a second image. Specifically, in addition to ikroll, let us capture ikDC using Eq. (33). In image regions dominated by s,
i
DC(r,c)=τs(r,c)+Σs′≠sτs′(r,c)≅τs(r,c) (45)
Then, from Eqs. (34, 45) derive
Thus, in a region dominated by a single source, the image iknorm is invariant to the scene's light transport τs, expressing Bs(tkcan+rD−ϕsΔ/2π), as desired. Consequently, we use iknorm instead of ikfilt in Eq. (40), and then apply Eqs. (41-43).
Canonical Volume from an Image Sequence
We now deal with a long sequence of Kroll raw rolling-shutter frames. They express a data volume Iroll=[i0roll, i1roll, . . . iK
Assigning according to Eq. (27) faces three challenges:
We compute the canonical time of each frame up to an unknown shift both for scenes having a significant large diffuse surface, and for emitter scenes. Because we do not solve for a global shift currently, we determine all canonical times relative to the first frame, whose canonical time is denoted tr.
Canonical Times from Diffuse Surfaces: Suppose there is a large diffuse surface in the scene, such as a wall, reflecting light towards the camera. Recall that in this case, the rolling-shutter sequence creates a spatiotemporal wave whose vertical motion and velocity are independent of BRFs. Consequently, the wave's motion enables estimation of canonical time differences, e.g., tkcan−t0can, without prior knowledge of bulb BRFs.
Similar to before, we consider a vertical image region Ω, where the corresponding diffuse surface is mainly illuminated by a single source s. We choose Ω manually in an image region that clearly exhibits a flicker wave pattern. The imaging model is thus represented by Eq. (34). As described hereinabove, shift analysis is simplified if it relies on images iknorm having vertical flicker that is invariant to spatial variations of τs in the scene.
Irrespective of the BRFs in the scene, the wave pattern in iknorm has a spatial period of Δ/D pixels, i.e, fundamental angular spatial frequency 2πD/Δ. We can then rely on simple Fourier analysis. The fundamental mode of the pattern has phase
θk=angle{Σ(r′,c′)ϵ
not to be confused with electric grid phase. Here angle is the argument of a complex number and
Recall that for iknorm we require iDC. However, there is no need to capture iDC if we compute assignment of for an entire batch of frames, whose sampling times tkcan span the interval [0,Δ] uniformly. We can approximate it using
Canonical Times Without Surface Reflection: In outdoor nocturnal scenes, sometimes no reflecting object is reliably sensed in the short exposures needed, due to low photon counts away from emitting bulbs. Thus, only bulbs are effectively observed. Contrary to the situation described earlier, here temporal assignment cannot rely on a wave pattern that is spatially observed on a surface. We now show that canonical time estimation is still possible.
The method described here applies to general scenes. There is no need for a star filter. Moreover, since this method does not make use of the rolling-shutter model, it can apply to global shutter sensors as well. However, unlike previously where assignment is done for each frame individually, here, we rely on the entire batch of captured frames to assign canonical time to each frame. Moreover, we require that our image batch's random samples span the interval [0,Δ] uniformly.
We make the following observation. In any scene, if the canonical times of two rolling-shutter frames are very close, then the pixel intensities in these frames are very close as well, i.e., if |tkcan−tk′can|<<Δ, then ∥ikroll−ik′roll∥ is small. This pair-wise affinity between closely-timed images leads to an overall mutual ordering between all rolling-shutter frames, i.e., expressing how far tkcan and tk′can, are, even for dissimilar frames in the set.
Any frame ikroll is a point in a vector space of dimension R×C. For a specific scene, the set of all Kroll rolling-shutter frames {ikroll} resides on a low-dimensional manifold in this space. Moreover, when |tkcan−tk′can|<<Δ, it follows that ikroll and ik′roll lie close to each other on this manifold. Furthermore, the underlying phenomena that drive changes in the images are temporally periodic. For this reason, the manifold has a ring topology.
Hence, location on the ring encodes the canonical time tkcan of any rolling-shutter frame. Thus, to estimate tkcan relative to to t0can, we need to measure how far on the ring ikroll is relative to i0roll. A ring can be expressed as a curve in a two-dimensional space. Dimensionality reduction from RxC into two dimensions, the ring structure and the embedding of ikroll on the ring emerge from a diffusion map. Let us denote the dimensionality reduction of the frames from R×C to two dimensions by an operator
A=DM
RC→2
{I
roll} (50)
The diffusion maps algorithm requires specifying the pairwise affinity of frames. We used a Gaussian kernel whose width was manually adjusted per scene to yield a ring. As seen in
[a0a1]=1K
where 1Kroll is a row vector of length Kroll, all of whose elements are 1's. Here T denotes transposition. Then, the ring is centered by
Using SVD, decompose à to
Ã=UΣV (53)
where Σ is a 2×2 diagonal positive matrix. Now, any rolling-shutter frame k is represented by column k of V, where Vϵ2×K
θk=angle{v0(k)+j1(k)} (54)
We use Eq. (48) to convert temporal phase-angle θk to canonical time.
So far we assumed that the relation between t0can and the AC zero crossings is unknown. To recover this relation, we rely on two priors: a database of BRFs (DELIGHT) and knowledge of the bulb type that affects one pixel (r0,c0) in the image. We treat that bulb as a reference whose AC phase is ϕ is zero. Then we find the temporal shift δ that best aligns the BRF Bβ to the time-varying normalized intensity at (r0,c0):
Once {circumflex over (δ)} is estimated, we set t0can={circumflex over (δ)} and thus determine tkcan for all frames relative to the AC zero crossing.
We have previously described temporal assignment of rolling-shutter frames to canonical times {t0can, . . . , tk
Here are the mathematical details. Per pixel, the real-valued Fourier series of the canonical signal is
There are 2M+1 real-valued Fourier coefficients pm, qn, for each pixel (r,c). To make the estimation well-posed, 2M+1≤Kroll. Fortunately, BRFs are usually smooth. So, intensity variations due to flicker can be represented with just a few Fourier coefficients.
Concatenate these Coefficients to Form a Vector
p(r,c)=[p0(r,c),p1(r,c), . . . ,q1(r,c),qM(r,c)]T (57)
Then, rendering of a global-shutter image for any time tcan is enabled by expressing Eq. (56) as
i
can(r,c,tcan)=h(tcan)p(r,c) (59)
Let us estimate p(r,c) from a sequence of rolling shutter frames. The canonical time assigned to row r of frame k is given by Eq. (28). Intensities in frame k are given by
i
k
roll(r,c)=ican(r,c,tk,rcan)=h(tk,rcan)p(r,c) (60)
Define a Matrix
H
r=[h(t0,kcan)T, . . . ,h(tk,rcan)T, . . . ,h(tk
Let column vector dr,c of length Kroll denote the intensities at pixel (r,c), i.e., dr,c[k]=ikroll(r,c). Then,
d
r,c
=H
r
p(r,c) (62)
Computing p(r,c) is essentially a least-squares Fourier series estimation:
{acute over (p)}(r,c)=(HrTHr)−1HrTdr,c (63)
Live Rolling-to-Global Shutter Conversion: When the field of view includes a diffuse surface, we can estimate global-shutter images in real-time. This yields a live-streaming algorithm that can continuously compute global-shutter frames. To achieve this, we develop the following updated process:
Temporal smoothness of BRFs allows using a small number of Fourier coefficients. Hence even during ramp-up, when Kroll is small, we obtain a good estimate of Ican.
As used herein, the term “about” when combined with a value refers to plus and minus 10% of the reference value. For example, a length of about 1000 nanometers (nm) refers to a length of 1000 nm+−100 nm.
It is noted that as used herein and in the appended claims, the singular forms “a,” “an,” and “the” include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to “a polynucleotide” includes a plurality of such polynucleotides and reference to “the polypeptide” includes reference to one or more polypeptides and equivalents thereof known to those skilled in the art, and so forth. It is further noted that the claims may be drafted to exclude any optional element. As such, this statement is intended to serve as antecedent basis for use of such exclusive terminology as “solely,” “only” and the like in connection with the recitation of claim elements, or use of a “negative” limitation.
In those instances where a convention analogous to “at least one of A, B, and C, etc.” is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., “a system having at least one of A, B, and C” would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.). It will be further understood by those within the art that virtually any disjunctive word and/or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase “A or B” will be understood to include the possibilities of “A” or “B” or “A and B.”
It is appreciated that certain features of the invention, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features of the invention, which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable sub-combination. All combinations of the embodiments pertaining to the invention are specifically embraced by the present invention and are disclosed herein just as if each and every combination was individually and explicitly disclosed. In addition, all sub-combinations of the various embodiments and elements thereof are also specifically embraced by the present invention and are disclosed herein just as if each and every such sub-combination was individually and explicitly disclosed herein.
The present invention may be a system, a method, and/or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire. Rather, the computer readable storage medium is a non-transient (i.e., not-volatile) medium.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
Additional objects, advantages, and novel features of the present invention will become apparent to one ordinarily skilled in the art upon examination of the following examples, which are not intended to be limiting. Additionally, each of the various embodiments and aspects of the present invention as delineated hereinabove and as claimed in the claims section below finds experimental support in the following examples.
Various embodiments and aspects of the present invention as delineated hereinabove and as claimed in the claims section below find experimental support in the following examples.
The ability to perform the various imaging procedures described herein relies on a key image acquisition task: capturing a sequence of K frames that spans one cycle. Very little light, however, enters the camera at the timescale of 1/K-th the AC cycle. For instance, acquiring K=20 images per cycle in North America, where light flickers at 120 Hz, requires a frame exposure time of 416 μsec. This is especially problematic at night and indoors where light levels are usually low and sensor readout noise overwhelms the signal. Moreover, frame acquisition must support high-dynamic range (HDR) imaging. This is because the field of view may include both bright light sources and poorly-lit surfaces (e.g., from shadows, squared-distance light fall-off, AC flicker, etc.) These issues make capturing K-frame sequences impractical with a high-speed camera.
To overcome them, our ACam keeps its electronic shutter open for hundreds of cycles while optically blocking its sensor at all times except during the same brief interval in each cycle. This is illustrated in
We implement high-speed pixel masking with a digital micromirror device (DMD) that is optically coupled to an off-the-shelf camera. The design was modified for the purpose of passive AC-modulated imaging. Figure Error! Reference source not found. shows our ACam and highlights its main components. It operates correctly on 60 Hz/120V and 50 Hz/220V grids.
Each ACam image yields exactly one frame of the K-frame sequence, indexed bykϵ[1 . . . K]. The procedure is applied K times to acquire all frames—and is potentially applied more times if high dynamic range (HDR) frames are needed.
Acquiring frame k without HDR: To capture a frame we (1) define a sequence of M binary DMD masks, (2) open the electronic shutter for C cycles while the DMD is locked to the AC, and (3) close the shutter and read out the image. In practice, C ranges from 100 to 1500 cycles depending on light levels. During this period the DMD repeatedly goes through its M masks. ACam imaging is therefore controlled by three quantities: the number of cycles C, the matrix M holding the mask sequence, and the timing signal that forces the DMD to switch from one mask to the next.
Our mask matrix has the following general form:
M=[m10m20 . . . mM/20] (23)
where mm is a column vector representing a binary pixel mask and 0 is a mask of all zeros. The zero mask blocks the sensor completely and is active at all times except during the interval corresponding to frame k. The non-zero mask, on the other hand, determines which pixels are actually exposed to light during that interval. To acquire a non-HDR image we set mm=1 for all m. This forces the DMD to act like a “flutter-shutter” synchronized with the AC. To acquire an HDR image we modify M adaptively over repeated long-exposure acquisitions (see below).
AC-locked mask switching: We generate the mask-switching signal with an Arduino microcontroller plugged into the reference outlet (
Acquiring frame k with HDR: We first acquire the frame without HDR, using a long enough exposure time to achieve good signal-to-noise ratio at dimly-lit surfaces. If this frame has saturated pixels, we repeat the acquisition with a modified mask matrix that exposes saturated pixels to light for a lot less. Specifically, let p be a saturated pixel and let M[p,:] be the row corresponding to p. We modify M[p,:] by zeroing out half its non-zero elements. This cuts in half the time that pixel p will be exposed to light. In contrast, the rows of M associated with unsaturated pixels are left as-is. The process of modifying M and re-acquiring the frame is repeated until either the number of saturated pixels falls below a threshold or M has rows with only one non-zero element. Our ACam's DMD can handle up to M=96 masks so the maximum number of iterations is └log2(M/2)┘=6. In this way, the brightest points in a scene can be exposed up to M/2 times less than the darkest ones.
We feed the Arduino in the ACam with a reduced version of the raw AC voltage in the reference outlet. The AC voltage is reduced so as to span the Arduino's analog input voltage range, in our design 0 to 3.3V. For the inner-camera module, our experiments used Allied Vision Prosilica GT 1920, relying either on color or monochrome (BW) sensors.
Controller Delay Calibration: The ACam tracks zero-crossings in real time. During capture of frame kϵK, the Arduino repeatedly detects AC voltage zero-crossings. Once a zero-crossing is detected, the Arduino exposes sub-frame k by holding mask 0 for [(k−1)Δ]/K seconds before switching to mask mm (see
To compensate for this phase shift, we find ΔφArd by imaging a known scene bulb, e.g. a Sodium lamp, which is abundant in outdoor scenes. Then, ΔφArd is determined as the phase difference between the measured BRF and the corresponding DELIGHT BRF. This calibration is done once per camera and operating conditions; ΔφArd is then applied to all measured I.
Re-syncing to AC: Due to random wiggle of the AC frequency, the ACam is locked to last-detected zero crossing. In practice, locking the camera to every zero-crossing is technically more involved.
Fortunately, the temporal blur effect shown in
In order to perform many of the tasks described herein we created a Database of Electric LIGHTs (DELIGHT). Databases have contributed immensely to computer vision and graphics, particularly in determining subspaces of physics-based effects. Our work provides a missing link: a database of BRFs, which dominate indoor and nocturnal outdoor lighting. The database is very helpful for comp u t e r vision on the electric grid, particularly for recognition of grid phase and bulb type at a distance, as well as unmixing, white balancing and relighting. To do this we acquired a variety of bulbs and fixtures. Street lighting is dominated by a few bulb types, mainly high-pressure sodium, metal halide, mercury and fluorescent. Each streetlight type is used rather consistently in large areas. Indoor lighting has higher variety, including halogen, fluorescent tubes, different compact fluorescent lamps (CFLs) and simple incandescent.
Bulb BRFs were captured in three ways:
LED lighting has an interesting variety of BRFs, some having very low and some very high BRF amplitudes (
To keep it common to all BRFs, DELIGHT was acquired by connecting all bulbs and fixtures to a single 50 Hz reference outlet in Haifa. The AC voltage V(t) was simultaneously measured at this outlet. We used three sensing schemes: (1) a photodiode with one of three color filters; (2) the same photodiode without any filters; and (3) our ACam prototype described herein, fitted with a color camera. For schemes (1) and (3), we saved in DELIGHT the BRF of individual bulbs and their chromaticity. For scheme (2) only a monochrome BRF is saved. In all cases, metadata such as bulb wattage and sensor/filter used are stored as well.
The ability of our ACam to distinguish grid phase was tested. Figures Error! Reference source not found.A-B and Error! Reference source not found.A show results from Haifa Bay, when the ACam was fitted with a monochrome camera. In this metropolitan scale, we recognize the bulb types and their three grid phases. Simple analysis shows that the distribution of grid phases is approximately uniform over the bulbs detected in the field of view.
The ACam was also capable of separating a source image into unmixed images of the scene as it would appear if it were illuminated by only one source of light. No whit balancing was necessary as the chromaticities of all light sources are already factored into the unmixing equations. Examples for indoor and outdoor scenes are shown in Figures Error! Reference source not found.A-D and Error! Reference source not found.A-D respectively.
We can now reconstruct the single-source image sequence of a source s using
Î
s={circumflex over (τ)}sQsshift(ϕs,bs) (19)
where {circumflex over (τ)}s is the corresponding column of {circumflex over (T)}. The intensities in this sequence can safely exceed the saturation level of the sensor. This is because Eqs. (Error! Reference source not found.) and (Error! Reference source not found.) bypass saturated data when estimating {circumflex over (T)}. We therefore obtain high dynamic range results thanks to the AC (Fig. Error! Reference source not found.C).
The unmixing process also leads to denoising. Intensities in the captured image sequence suffer from sensor readout noise. Yet, since Eq. (Error! Reference source not found.) forces all pixels to vary in synchrony according to a common BRF, the rendered sequence Îs is less noisy than the input data (Fig. Error! Reference source not found.D).
The ACam can be used to separate combined images arising from semi-reflection by transparent structures (windows, glass, etc.). This can be done with AC powered light sources on both sides of the transparent structure or when natural illumination is involved. An example of the result from such a separation when natural light is illuminating from one side of the transparent structure is shown in Figures Error! Reference source not found.A-C.
Ground Truth Experiment:
Semi-Reflection Separation: Bulb flicker can be used for separating semi-reflections passively, using two mechanisms. Example 7 demonstrates the second mechanism, in which a scene illuminated by two light sources, one fed by AC voltage and one natural, is unmixed without prior knowledge of scene BRFs.
Here we show results for the first mechanism, which is more general and can be used to unmix scenes with an arbitrary number of illumination sources (
In
Having now shown that flicker can be sensed in great detail with a specially-designed camera tethered to an AC outlet, we demonstrate that even an untethered smartphone can achieve the same task. We exploit the inter-row exposure delay of the ubiquitous rolling-shutter sensor. When pixel exposure time is kept short, this delay creates a spatiotemporal wave pattern that encodes (1) the precise capture time relative to the AC, (2) the response function of individual bulbs, and (3) the AC phase that powers them. To sense point sources, we induce the spatiotemporal wave pattern by placing a star filter or a paper diffuser in front of the camera's lens. We demonstrate several new capabilities, including: high-rate acquisition of bulb response functions from one smartphone photo; recognition of bulb type and phase from one or two images; and rendering of live flicker video, as if it came from a high speed global-shutter camera.
In some instances, we deal with a data sequence of many raw rolling-shutter frames. The sequence is converted to a canonical volume that expresses the spatiotemporal signal of flicker, as if acquired by a very fast global-shutter camera (
Rolling-shutter cameras have been leveraged in computational photography for three-dimensional sensing, compressed sensing and white balance. They have also been used for inter-device communication. We show experimental results using several rolling-shutter cameras: two off-the-shelf machine vision cameras and two smartphones.
We show that from a pair, or even a single, rolling-shutter image, it is possible to extract useful information about the camera and scene illumination. This information includes (a) a flicker-independent (deflickered) image of the scene; (b) recognition of the types and electric phases of the scene's light sources; (c) image regions that are dominated by any one source; and (d) the canonical time of the image, relative to the zero-crossing of the AC-grid voltage.
This analysis mainly applies to image regions that are predominately illuminated by a single source. For example,
For information extraction using a single image, we rely on one more assumption: that τs is relatively uniform in pixel neighborhoods dominated by a single source. We can also obviate this assumption, making the estimation insensitive to τs variations, by using a pair rather than a single image.
In
t
k,r′
can=(r′−r+1)D,(r′,c)ϵ
We implement Eq. (41) by searching for the optimal gkcan on a discrete grid having W samples, i.e. gkcan=0,Δ/W, 2Δ/W, . . . . The estimation precision is thus Δ/W. In the example of
Consider scene regions having strong emitters. This is essentially the situation in wide-field cityscapes (
Ideally, we need an optical PSF that is vertical and narrow having a weak central point so as to minimize interference with adjacent sources. These desiderata are practically addressed by mounting an optical star-filter on the camera lens.
In order to demonstrate that canonical volume can be extrapolated from an image sequence, a OnePlus cellphone with exposure set to 1/500 seconds was used for manual triggering of 138 rolling-shutter frames. The results, including rendered from different time points are provided in
We used two rolling-shutter machine-vision cameras: IDS UI-155xLE (color) and IDS UI-348xLE (monochrome). In addition, sequences were captured using a OnePlus 3 smartphone mounted on a tripod and triggered manually, as well as an iPhone 7. The exposure time was set per scene depending on its brightness. We used a HOYA 52 mm cross-screen filter to capture emitter scenes. For our smartphone cameras, we estimated D using a still image of a smooth surface. Then, we applied a spatial discrete Fourier transform on a long vertical line
The emulated global-shutter images resulting from Example 17 enable source separation as with the ACam. An example is shown in
We acquired BRFs in separate, dedicated images in which the camera's inter-row delay D is minimal. We did this in two ways: The first way was to place a paper diffuser in front of a smartphone lens as in
The electronic control of the ACam can be replaced by computational post processing that assigns tcan to each frame and row. This enables a rolling-shutter camera to operate asynchronously when capturing an image sequence. In contrast, data acquisition in the ACam is intermittently suspended during operation by a controller enslaved to AC zero crossings. Moreover, as typically the inter-row delay is much smaller than a flicker period, a rolling shutter offers very dense temporal sampling of flicker. The ACam is essentially a global-shutter system, which does not exploit the spatial domain for temporal sampling. These characteristics offer a speed advantage to a rolling shutter system.
Unlike our rolling-shutter system, the ACam has relay optics, which limit the system's overall numerical aperture and complicate the system's robustness. Consequently, the ACam needed significantly longer exposures than our rolling-shutter system. Experiment times ranged between 26-400 sec, depending on scene illumination strength, while yielding 26 samples of a flicker cycle. In comparison, the experiment of
The ACam still has advantages, though. Being a coded aperture system, ACam can integrate optically an arbitrarily large number of flicker cycles. This enables superior dynamic range and sensitivity to low-light conditions, with which rolling-shutter readouts are currently incompatible.
In some ways the rolling shutter approach is much simpler than a tethered coded-aperture system of ACam. It enables practical use of flicker for computer vision methods that rely on illumination and reflection modulation, e.g., photometric stereo, shape from shadows and spacetime stereo. Bulb recognition can assist in color balancing. Flicker may assist smartphones in separating window reflections as the ACam can. Scene separation into single-source images can be done using a sequence of rolling-shutter images in real-time (
This application claims the benefit of priority of U.S. Provisional Patent Application No. 62/506,678, filed May 16, 2017, entitled “Computational Imaging on the Electric Grid”; U.S. Provisional Patent Application No. 62/608,086, filed Dec. 20, 2017, entitled “Rolling Shutter Imaging on the Electric Grid”; and U.S. Provisional Patent Application No. 62/664,199, filed Apr. 29, 2018, entitled “Rolling Shutter Imaging on the Electric Grid”; the contents of which are incorporated herein by reference in their entirety.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/IL2018/050539 | 5/16/2018 | WO | 00 |
Number | Date | Country | |
---|---|---|---|
62506678 | May 2017 | US | |
62608086 | Dec 2017 | US | |
62664199 | Apr 2018 | US |