Devices for refractive field visualization
10636149 ยท 2020-04-28
Assignee
Inventors
- William T. Freeman (Acton, MA)
- Frederic Durand (Somerville, MA)
- Tianfan Xue (Cambridge, MA, US)
- Michael Rubinstein (Somerville, MA, US)
- Neal Wadhwa (Mountain View, CA, US)
Cpc classification
G06T7/246
PHYSICS
G01P5/26
PHYSICS
International classification
G01P5/00
PHYSICS
Abstract
An apparatus according to an embodiment of the present invention enables measurement and visualization of a refractive field such as a fluid. An embodiment device obtains video captured by a video camera with an imaging plane. Representations of apparent motions in the video are correlated to determine actual motions of the refractive field. A textured background of the scene can be modeled as stationary, with a refractive field translating between background and video camera. This approach offers multiple advantages over conventional fluid flow visualization, including an ability to use ordinary video equipment outside a laboratory without particle injection. Even natural backgrounds can be used, and fluid motion can be distinguished from refraction changes. Embodiments can render refractive flow visualizations for augmented reality, wearable devices, and video microscopes.
Claims
1. An augmented reality apparatus comprising: a video camera with an imaging plane, the video camera configured to capture video of a scene including a textured background, the video including captured light that passes from the textured background to the imaging plane through a refractive field; and an augmented reality display configured to render the video of the scene with a visualization of actual motions of the refractive field, the actual motions determined by correlating, over time, representations of apparent motions of the textured background observed at the imaging plane in the video from frame to frame by modelling translations of the refractive field as causing the apparent motions.
2. The apparatus of claim 1, wherein the visualization includes representations of velocities of the refractive field based upon the correlated representations of the apparent motions.
3. The apparatus of claim 1, wherein the refractive field is a fluid.
4. The apparatus of claim 1, further including a processor configured to determine the actual motions by correlating the representations of the apparent motions through an assumption of frame-to-frame changes in at least one of intensity and phase resulting from the motions alone.
5. The apparatus of claim 1, further including a processor configured to determine the actual motions by correlating the representations of the apparent motions using an approximation that the apparent motions are constant from one video frame to another video frame.
6. The apparatus of claim 1, wherein the visualization of actual motions of the refractive field is a visualization of a fluid turbulence, updraft, downdraft, or vortex.
7. The apparatus of claim 1, wherein the actual motions of the refractive field arise from motion of one or more refractive objects in a fluid, and wherein the representations of the apparent motions are representations of motions of the one or more refractive objects.
8. The apparatus of claim 7, wherein the one or more refractive objects include at least one of a smoke particle, molecule, region of the fluid differing in temperature from a surrounding region, region of fluid differing in pressure from a surrounding region, droplet, bubble, exhaust, hydrocarbon, or volatile substance.
9. The apparatus of claim 1, wherein the textured background is a natural background.
10. The apparatus of claim 1, wherein the display is wearable and further configured to render the video of the scene with a visualization of actual motions of the refractive field for viewing by a wearer's eye.
11. The apparatus of claim 10, further comprising a processor configured to determine the actual motions.
12. The apparatus of claim 10, wherein the video camera and the augmented reality display form part of an air traffic control system, an onboard airplane system, a weather monitoring system, a leak detection system, a civil engineering system, an aeronautical engineering system, or a ballistics or combustion monitoring system.
13. A wearable device comprising: a video camera with an imaging plane, the video camera configured to capture video of a scene including a textured background, the video including captured light that passes from the textured background to the imaging plane through a refractive field; and an augmented reality display configured to render a visualization of actual motions of the refractive field in a wearer's eye, the actual motions determined by correlating, over time, representations of apparent motions of the textured background observed at the imaging plane in the video from frame to frame by modelling translations of the refractive field as causing the apparent motions.
14. A video microscope comprising: a video camera with a microscopic field of view and an imaging plane, the video camera configured to output video by capturing light that passes from a textured background to the imaging plane through a refractive field in the microscopic field of view; and a display configured to show a visualization of actual motions of the refractive field in the microscopic field of view, the actual motions determined by correlating, over time, representations of apparent motions observed at the imaging plane in the video from frame to frame by modelling translations of the refractive field as causing the apparent motions.
15. The video microscope of claim 14, wherein the visualization includes representations of velocities of the refractive field based upon the correlated representations of the apparent motions.
16. The video microscope of claim 14, wherein the refractive field is a fluid.
17. The video microscope of claim 14, further including a processor configured to determine the actual motions by correlating the representations of the apparent motions using an assumption of frame-to-frame changes in at least one of intensity and phase resulting from the motions alone.
18. The video microscope of claim 14, further including a processor configured to determine the actual motions by correlating the representations of the apparent motions using an approximation that the apparent motions are constant from one video frame to another video frame.
19. The video microscope of claim 14, wherein the motions of the refractive field arise from motion of one or more refractive objects in a fluid, and wherein the representations of the apparent motions are representations of motions of the one or more refractive objects.
20. The apparatus of claim 19, wherein the one or more refractive objects include at least one of a molecule, region of the fluid differing in temperature from a surrounding region, region of fluid differing in pressure from a surrounding region, droplet, bubble, hydrocarbon, or volatile substance.
21. The video microscope of claim 14, wherein the textured background is a natural background.
22. The video microscope of claim 14, wherein the textured background is an artificial textured background having microscopic features.
23. The video microscope of claim 14, wherein the microscopic field of view includes at least a partial view of a chemical sample or a cell culture or other biological sample.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
(2) The foregoing will be apparent from the following more particular description of example embodiments of the invention, as illustrated in the accompanying drawings in which like reference characters refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating embodiments of the present invention.
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)
DETAILED DESCRIPTION
(28) A description of example embodiments of the invention follows.
(29) The teachings of all patents, published applications and references cited herein are incorporated by reference in their entirety.
(30) Measuring and visualizing how air and fluid move is of great importance, and has been the subject of study in broad areas of science and technology, including aeronautical engineering, combustion research, and ballistics. Special techniques may be necessary to visualize fluid flow, and an example is shown in
(31)
(32) Multiple techniques have been proposed for visualizing or measuring such small distortions in fluids, such as sound tomography, Doppler LIDAR and schlieren photography. Current techniques to visualize and measure fluid flow can be divided into two categories: those which introduce a foreign substance (dye, smoke, or particles) into the fluid; and those that use the optical refractive index of the fluid.
(33) Where foreign substances or markers are introduced, the motions of the markers can be used to give a visualization of the fluid flow. Through particle image velocimetry (PIV), a quantitative measurement of the flow can be recovered by tracking the particles introduced into the fluid.
(34) In the optical technique category, schlieren photography is one method. Schlieren photography uses a calibrated, elaborate optical setup that can include a source grid placed behind a photography subject, a cutoff grid incorporated into a special camera, and special lamps for illumination to amplify deflections of light rays due to refraction to make the fluid flow visible. To attempt to remedy some of the limitations of schlieren photography, the schlieren method has been simplified in the past decade. In background-oriented schlieren (BOS) photography (also referred to as synthetic schlieren), the complicated, hard-to-calibrate optical setup of traditional schlieren imaging is replaced by a combination of a video of a fluid flow captured in front of an in-focus textured background (such as the textured background 106 shown in
(35) Continuing to refer to
(36) However, previous techniques have multiple disadvantages. Introduction of foreign substances or markers with use of PIV requires additional expense and is not suitable for continuous monitoring or virtual reality applications, for example. Even for optical techniques, setups can be expensive and limited to laboratory use. A schlieren photography setup, as described above, is an example of such limitations.
(37) BOS presents an additional issue, in that a textured background must be in focus. To address this issue, light-field BOS has been proposed. In light-field BOS, a textured background like the textured background 106 can be replaced by a light field probe in certain instances. However, the light field probe comes at a cost of having to build a light field probe as large as the fluid flow of interest. Besides, for many applications such as continuous monitoring and virtual reality, light field probes would be undesirable or even impossible to use in some cases.
(38) Furthermore, simply computing optical flow in a video will not generally yield the correct motions of refractive elements, because the assumptions involved in these computations do not hold for refractive fluids. Optical techniques such as schlieren photography rely on a brightness constancy assumption. Under the assumption of brightness constancy (explained further hereinafter), any changes in pixel intensities are assumed to be caused only by translation of the photographed objects. However, even if the brightness constancy holds for solid, reflecting objects, brightness constancy does not typically hold for refractive fluids such as the plume 105a-b of the candle 104 in
(39) Disclosed herein is a novel method to measure and visualize fluid flow. Even complicated airflows, for example, can be measured, without elaborate optical equipment. Binocular videos are not necessarily required, and two-dimensional (2D) fluid flow can be derived even from standard monocular videos. Embodiments disclosed herein apply a recognition that local changes in intensity may be locally invariant, and an observed scene can be modeled as being composed of a static background occluded by refractive elements that bend light and move through space. Embodiments of the current invention include computing the optical flow of the optical flow by re-deriving the optical flow equation for a proposed image formation model. As used herein, video denotes any format that includes a series of images of a scene over time, and video camera denotes any instrument capable of capturing such a series of images. Video cameras can be camera configured to capture a series of images at a standard 30 frames per second (fps), or a higher or lower speeds, or a camera that takes single photographs at similar rates, not necessarily at a constant frame rate.
(40) Embodiments can rely on fluid flows of interest containing moving refractive structures, which are almost always present in fluid flows of interest. Embodiment methods can track features that move with the fluid to recover the fluid flow (also called refractive flow, or calculated or actual fluid flow). Advantageously, fluid flow can be obtained without the added cost of seeding a fluid with particles and are thus markerless. Embodiments can use the displacement field (the field resulting from an initial computation of optical flow) to construct features to track and can be implemented outside a laboratory and even on mobile devices.
(41) Continuing with the description of
(42) Correlating representations of motion can be done in accordance with methods described hereinafter in conjunction with
(43) Light from the textured background 106 passes through the candle plume 105 to an imaging plane of a video camera (not shown). Optical flow is applied to obtain apparent motion velocity vectors v(x,y) 114, and the apparent motion velocity vectors of the video frames 112 are correlated through applying optical flow again to obtain refractive flow.
(44) The results of refractive flow are shown in
(45)
(46) In
(47)
(48)
(49)
(50)
(51) Even where turbulent air 228b in the refractive field 228 is being monitored and visualized in the foreground of the camera 240, for example, distant background turbulent air 226d is relatively constant in position compared with the foreground refractive field 228 and is useful as part of the textured background 226. The video camera 240 provides raw video images 244 to be stored in memory 246. A fluid flow processor 248 obtains the raw video images 244 and applies example methods described hereinafter to produce refractive flow measurements. The refractive flow measurements are output from the fluid flow processor 248 in the form of images 228 with calculated refractive flow vectors overlaid. The images 228 are presented in an display 250 to be seen by a pilot 252. The display 250 is updated continually to provide the pilot 252 with a real-time view of the refractive field 228, and thus the pilot 252 can see and attempt to avoid turbulence such as the updraft 228a and the turbulent air 228b.
(52) It should be noted that in other embodiments, the display 250 can be an augmented reality display. For example, calculated fluid flow velocity vectors such as the vectors 118 in
(53)
(54) As understood in aviation, airplanes can produce wake turbulence, such as jetwash 328a and wingtip vortex 328b produced by the airplane 324. Images from the video camera 340a can be used to provide a display 350a for an air traffic controller 352. Moreover, the video camera 340 can see other air disturbances, such as wind 329. The embodiment of
(55)
(56) Augmented reality eyewear, such as the eyewear 356 shown in
(57)
(58)
(59)
(60) The 3-D processor 448c can optionally output calculated 2-D fluid flow velocity vectors 438. An optional uncertainty processor 448d calculates uncertainties of fluid flow velocity measurements and depth measurements according to embodiment methods and weights the measurements to output weighted fluid flow velocity measurements and depth measurements 432. While the uncertainty processor 448d is separate from the 3-D processor 448c in
(61)
(62)
(63) Refractive flow in the chemical processor 349 can result from bubbles rising, fluid heating, chemical reactions, or any other process that produces fluid currents within the processor 349. The video camera 340b is configured to capture light passing from an artificial textured background 326 through a fluid in the chemical processor 349 to an imaging plane (not shown) of the video camera 340b. In a controlled, artificial environment such as the chemical processor 349 in
(64)
(65) Lighting (not shown) in the video microscope 343 can be adjusted to optimize illumination of the artificial textured background. As understood in the art of microscopy, either forward lighting or backlighting can be used, as deemed appropriate. It should also be noted that, although not shown in
(66)
(67) In
(68) The correlation processor 448a is configured to output correlated representations 418 of motions in the video. The correlated representations 418 are an example output from the processor and can be in the form of calculated fluid flow velocity vectors such as the vectors 118 in
(69)
(70) The output from the processor 448b to the display 450 can be via a dedicated graphics card, for example. The processor 448b also outputs an alarm signal 476 to an alarm 478. The alarm signal 476 can be output to the alarm 478 via a driver (not shown), for example. The alarm 478 is activated by the alarm signal 476 when at least one calculated fluid flow velocity vector exceeds a given threshold in magnitude. Thus, as the alarm 478 feature demonstrates, displays such as the display 450 having augmented reality scenes are not the only way to use refractive flow measurements. The refractive flow measurements can be, optionally, further processed, displayed, or used in any way desired to visualize or calculate or represent fluid flow.
(71)
(72) The 3-D processor 448c is configured to correlate, over space, the representations 474c and 474c of motions from the two respective video cameras 440 and 440 with the respective imaging planes 470 and 470. The 3-D processor 448c correlates the representations over space from frame to frame as a function of the motion 429a of the refractive field 428. The representations of motions 474c and 474c are correlated over space when the location of a representation 474c observed at the imaging plane 470 is matched to a location on the imaging planes 470 where a corresponding representation 474c is observed. Based on the correlated representations of the motions, a depth of the refractive field 428, or a point thereon, can be calculated, as described more fully hereinafter.
(73)
(74)
(75) In
(76) Referring to
(77) At 582g, a representation of the fluid velocity vector field is displayed. The display can be like the display 450 in
(78) Continuing to refer to
(79) One example of monitoring performed by a computer is found in
(80)
(81) Determining the uncertainty in the representation can include calculating variance of the representation of motion and weighting the representation of motion as a function of the variance. In some embodiments, determining the uncertainty includes weighting the representation of motion as a function of the degree of texturing of the stationary background. For example, where the background is heavily textured, the wiggles or representations of motion observed by a video camera can be determined with greater certainty. On the other hand, where a background is only lightly textured, the representations of motion can be determined with less certainty, and these representations can be downweighted in determining refractive flow. Furthermore, where the representations of motion or refractive flow measurements determined there from are displayed on a monitor or other image, uncertainty in the representations can also be displayed through, for example, shading or color coding the representations of motion. As described more fully hereinafter, determining the uncertainty can include applying an L2 norm to the representation of motion, calculating a covariance of the concatenation of a plurality of representations of motion, or weighting the representation of motion as a function of the logarithm of a covariance of the representation of motion in the video captured by the video camera and an additional representation of the motion in an additional video captured by an additional video camera, such as the video cameras 440 and 440 in
(82) Refractive Fluid Flow
(83) An example goal of refractive flow is to recover the projected 2D velocity, u(x, y, t), of a refractive fluid such as hot air or gas, from an observed image sequence, I(x, y, t). Before proceeding by analogy to a differential analysis of refraction flow, a differential analysis of standard optical flow for solid objects is first presented hereinafter.
(84) Differential Analysis of Optical Flow
(85)
(86) Under the brightness constancy assumption, any changes in pixel intensities, I, are assumed to be caused by a translation with velocity v=(v.sub.x, v.sub.y) over spatial horizontal or vertical positions, x and y, of the image intensities, where v.sub.x and v.sub.y are the x and y components of the velocity, respectively. That is,
I(x,y,t)=I(x+x,y+y,t+t),(1)
where (x, y) denotes the displacement of the point (x, y) at time t+t.
(87) Applying a first order Taylor approximation to Equation 1 gives
(88)
(89) The velocity v can then be solved for by using optical flow methods such as the Lucas-Kanade or Horn-schunck methods known in the art.
(90) Extension to Refraction Flow
(91) Brightness constancy, however, does not hold for refractive fluids, as rays passing through a point on the fluid intersect the background at different points at different times, as shown in
(92)
(93) The refractive fluid 628 is shown at two time instants t.sub.1 and t.sub.2. At time t.sub.1, the fluid 628 refracts light rays, effectively moving background points 631 and 633 on the background to different positions, or projection points 629b, on the camera imaging plane 670. At time t.sub.1, for example, the background point 631 appears at a different position on the imaging plane 670 than it does it at the time t.sub.1+t. Similarly, at time t.sub.2, the background point 633 appears at a different point on the camera imaging plane 670 than it does at time t.sub.2+t.
(94) In
(95) To obtain a calculated fluid flow such as the calculated fluid flow velocity vector 638 shown in
I(x+r.sub.x(x,y,t),y+r.sub.y(x,y,t)={tilde over (I)}(x,y),(3)
(96) The refractive field, r, indicates the spatial offset in the imaging plane, caused by light rays bending due to index of refraction gradients between the scene and the camera. For example, such refractive gradients can be due to bubbles of hot air traveling with the velocity of moving air.
(97) The inventors have recognized that it can be further assumed that the moving refraction gradients imaged to a point (x, y) have a single velocity, u(x, y). In other words, the apparent motions v(x,y) are considered to be constant from one video frame to another frame. Under these conditions, namely when motions, or translation, of the refractive field is assumed to be the exclusive cause of local image velocity changes, this refraction constancy can be exploited to explain the observed local velocity changes by the translation, u(x, y), of an assumed refractive field. In other words, the frame-to-frame motions in a video are considered to be a function of motion of the refractive field r(x,y,t). This yields a refraction constancy equation:
r(x,y,t)=r(x+u.sub.xt,y+u.sub.yt,t+t).(4)
(98) It is shown hereinafter in the section labeled Proof of v=r/t that, under the condition of Equation 4, the temporal derivatives of the refraction field correspond directly to the observed motion in the sequence. That is, v=r/t. Additionally taking the partial derivative of Equation 4 with respect to t, the observed motion can be written as
v(x,y,t)=v(x+u.sub.xt,y+u.sub.yt,t+t).(5)
(99) Since, the v(x,y,t) constitute frame-to-frame representations of motions in a video, and since r(x,y,t) in Equation 4 is expressed as a function of motion u(x,y) of the refractive field, an implementation of Equation 5 by a processor is, thus, one way to correlate, over time, representations of motions in the video from frame to frame as a function of motion of the refractive field.
(100) It should be pointed out that the correlating performed in embodiments of the present invention should be distinguished from the correlating performed in signal processing. Further, while one way of correlating representations of motions in the video as a function of motion of a refractive field is described above, the embodiments can include other ways of correlating. For example, another way to correlate representations of motions in the video is to first filter the representations of motion by complex oriented filters, and then extract the phase change of filters response between frames.
(101) Assuming v varies smoothly and that t is small, a first order Taylor expansion can again be used to approximate Equation 5 as
(102)
(103) Equation 6 can be used to develop and implement a two-step approach for solving for the fluid motion, u. The observed or apparent motions, v, can first be calculated using the standard optical flow equation (Equation 2). Then, optical flow can be applied again, this time on the estimated motions, to get the actual motion of the refractive fluid. Solving for u(x,y) for at least one point (x,y), therefore, constitutes calculating a velocity of the refractive field based upon the correlated representations v(x,y,t) of the observed motions. Further, solving for several points can be carried out to produce a fluid velocity vector field. Since the observed motions correspond directly to changes in the refraction field, and following the refraction constancy assumption, computing the optical flow of the optical flow will yield actual or refractive fluid flow.
(104) Refractive Flow Versus Optical Flow
(105) Applying standard optical flow to an observed video sequence will not yield the correct motions of the refractive fluid. To illustrate this, the refraction constancy equation (Equation 4) may be considered again. Approximating Equation 4 by the first order using a Taylor expansion yields
(106)
(107) Note that the optical flow result is equal to the change of refraction field, v=r/t. Then from Equation 7, it can be observed that:
(108)
where the matrix D in Equation 8 can be called the refraction Jacobian matrix (or the refraction matrix).
(109) Equation 8 shows that the observed motions, v, are in fact the product of the refractive matrix D and the fluid flow v. This means that, under the image formation model, the observed motions are caused by both refraction gradients and fluid motion. For example, the same observed motion can result from large refraction changes and small fluid motion, or large fluid motion and small refraction changes.
(110) The form of Equation 8 provides a few insights on refractive flow. First, it can be noted that refractive flow can be obtained where flow is not completely stable laminar flow, in which case the refraction matrix, D, would be zero. This is analogous to the aperture problem known for optical flow. Second, it can be noted that optical flow (brightness constancy) alone will not be able to disambiguate fluid motion from refraction changes. In fact, with the refraction constancy assumption (Equation 4), these two types of motions are implicitly disambiguated by attributing lower-spatial-frequency motion to fluid motion, and higher-spacial-frequency motion to refraction gradients.
(111) Refractive Flow based on Phase Analysis
(112) It is useful to note that the approach to fluid flow described above provides no restriction on how to actually compute optical flow in a refractive flow methods. For example, good results can be obtained when using local phase changes for initially characterizing the observed or apparent motions, instead of using optical flow on the intensities. It should be noted that motions due to refraction can be small, even on the order of one pixel per frame or less.
(113) Phase changes can be obtained by building a two-orientation, two-level complex steerable pyramid and applying DC-balanced temporal high pass filter to the phases (e.g., convolving with [1, 1]). This allows one to avoid having to use an undistorted reference frame, as done in conventional background-oriented schlieren techniques. This decomposition provides both amplitude and phase, which, respectively, capture the texture strength and motion.
(114) A temporal Gaussian blur can be applied to an input video sequence, and an amplitude-weighted spatial blur can be applied to the phases. These variations improve the signal-to-noise ratio of the signal significantly, allowing extraction of very subtle signals due to refraction. To deal with small camera motions, the amplitude weighted mean of the phase over a single orientation, scale, and frame can be subtracted from a phase signal.
(115) After extracting and processing the phases, feature vectors can be created by combining the phase from 19 frames in time (the frame of interest itself, 9 frames before, and 9 frames after the frame of interest). Using a wider temporal extent to compute features can provide a richer representation and can improve results relative to only tracking features between single frames.
(116) Notably, even ordinary consumer cameras can be used to acquire video images in embodiments of the invention. For example, the candle, wind, and landing sequences shown in
(117) Where a background is sufficiently textured, even small differences in air temperatures can be visualized with devices implementing the example methods described above. For example, in a separate test video sequence (not shown), the flow of heated air around a person was visualized. Since the temperature difference between a person and the ambient air can be very small, the amount of refraction produced by heated air around person can likewise be small, resulting in deflections as small as 100th of a pixel. In this test case, the signal-to-noise ratio was increased by having the person running up and down 20 flights of stairs and then acquiring the video of the person in a 4 C. refrigerator using a well-textured background consisting of a multiscale wavelet noise pattern.
(118) However, embodiments of the invention can also visualize scenes without an artificial background like the multiscale wavelet noise pattern previously mentioned. In the wind, take off, and landing videos, for example, atmospheric wind patterns are visualized using the forest and buildings as the textured background to visualize changes in index of refraction at a given position in the scene.
(119) It should be noted that measuring wind speed is an important factor in weather forecasting. Embodiments of the invention allow for denser sampling of wind speed than the point measurements given by an anemometer. Thus, embodiments of the invention can improve the accuracy and range of forecasts.
(120) Proof of v=r/t
(121) If the background is considered to be stationary, then the brightness constancy assumption can be applied to fluid objects:
I(x+r.sub.x(x,y,t),y+r.sub.y(x,y,t),t)=I(x+r.sub.x(x,y,t+t),y+r.sub.y(x,y,t+t),t+t).(9)
(122) A first order approximation to the right hand side of Equation 9 yields
(123)
(124) which yields
(125)
Therefore, the observed image motion v is equal to the temporal gradient of the refractive field r/t.
Conditions for 2D Refraction Constancy
(126) In this section, it is shown when the 2D refraction constancy assumption holds. In general, a fluid element is described by a spatiotemporally-varying index of refraction n(x, y, z, t). The 2D refraction field is determined by the gradient of the index of refraction. It can be assumed that index of refraction does not change when a fluid element moves (3D refraction constancy). That is,
n(x,y,z,t)=n(x+x,y+y,z+z,t+t).
(127) Suppose a ray traveling in this field is defined as f(s)=(f.sub.x(s), f.sub.y(s), f.sub.z(s)). When the index of refraction is close to 1 (as in air), the following equation holds
(128)
where
(129)
is a unit vector describing the local ray direction.
(130) If the distance between the air flow and background is much larger than the thickness of the air, then the refractive field is approximately equal to
(131)
where h is the distance between the air and the background, P is a projection matrix that projects the motion in 3D to 2D, and C.sub.x, y, t is the ray that hits the point (x, y) on the image plane at time t. It can be assumed that all the points on the ray path C.sub.x, y, t share the same motion.
(132) When the motion of air is small, the ray hits (x, y) on the image plane at time t passes through the similar region as the ray hits (x+v.sub.xt, y+v.sub.yt) on the image plane at time t+t. Therefore,
(133)
Furthermore, if it is further assumed that over a short time, the motion along z-dimension is negligible compared with the distance between the air and the background, then h in Equation 12 can be considered to be constant. Therefore, r(x, y, t)=r(x+v.sub.xt, y+v.sub.yt, t+t). This proves the 2D refraction constancy.
(134) Calculations have been derived for tracking the movement of refractive fluids in a single video and for recovering a 3-D position of points on a fluid surface from stereo video sequences. Both of these calculations are based on the refractive constancy assumption previously described, namely that intensity variations over time (the wiggles or apparent motions) can be explained by the motion of a constant refraction field.
(135) Calculations for Three Dimensional (3D) Measurements and Uncertainty
(136)
(137)
(138) The wiggle features in an input video are computed using optical flow, and then using those features to estimate the motion and depth of the fluid, by matching them across frames and viewpoints.
(139) The distortion of the background caused by the refraction is typically very small (in the order of 0.1 pixel) and therefore often hard to detect. The motion features have to be extracted carefully to overcome inherent noise in the video, and to properly deal with regions in the background that are not sufficiently textured regions, in which the extracted motions are less reliable. To address these issues, probabilistic refractive flow and stereo methods that maintain estimates of the uncertainty in the optical flow, the refractive flow, and the fluid depth are presented hereinafter.
(140) The proposed methods have several advantages over existing methods: (1) a simple apparatus that can be used outdoors or indoors, (2) they can be used to visualize and measure air flow and 3D location directly from regular videos, and (3) they maintain estimates of uncertainty.
(141) Gradients in the refractive index of air can show up as minute motions in videos. Theorems are stated hereinafter that establish the relation between those observed motions in one or more cameras and the motion and depth of refractive objects in a visual scene.
(142) In the monocular case previously shown in
(143) Because the input in
(144) The task of refractive flow is to recover the projected 2D fluid motion from an input video sequence.
(145) Similarly, in the stereo case, two cameras with image planes 690.sub.L and 690.sub.R image static background 426 through a refractive fluid layer 628. If a standard stereo matching directly on the input stereo sequence is applied, the method will recover the depth of (solid) points in the background. In contrast, in refractive stereo it is desirable to recover the depth of the (transparent) fluid layer, stereo fusing on the motion wiggles rather than the image intensities.
(146) Methods herein after presented for both refractive flow and refractive stereo are based on this observation: for a point on the fluid object, its refraction wiggle is constant over a short time and across different views. To state this observation more formally, first the wiggle that a point on a fluid layer generates can be defined.
(147) Definition 1 (Refraction wiggle): Let A be a point on the refractive fluid layer, B be the intersection between the background and the light ray passing through A and the center of projection at time t, and t be a short time interval. Then the wiggle of A from time t to t+t is the shift of the projection of B on the image plane during this time.
(148) Then this definition leads to the following two refractive constancy theorems.
(149) Theorem 1 (Refractive flow constancy): Suppose the fluid object does not change its shape and index of refraction during a short during [t1, t2]. Then for any point on the fluid object, its wiggle v(t1) at t1 equals to its wiggle v(t2) at t2.
(150) Theorem 2 (Refractive stereo constancy): Suppose there are at least two (n2) cameras imaging a refractive fluid object, and they are all parallel and close to each other. Then at any time t, and for any point on the fluid object, the corresponding wiggle in all the cameras is the same.
(151) Proofs of Theorems 1 and 2 are included hereinafter in the Supplementary Material section.
(152)
(153) The practical implication of these theorems is that matching the projection of a point on the fluid object across frames (over time) or viewpoints (over space) can be done by matching the observed wiggle features. That is, while the position of intensity texture features is unrelated to the fluid 3D structures, the position of wiggle features respect features on the fluid surface and can serve as an input feature for optical flow and stereo matching methods. Hereinafter, derivations of optical flow and stereo methods for tracking and localizing refractive fluids are presented.
(154) The goal of fluid motion estimation is to recover the projected 2D velocity, u(x, y, t), of a refractive fluid object from an observed image sequence, I(x, y, t). As described in the previous section, the wiggle features v(x, y, t), not the image intensities I(x, y, t), move with the refractive object. Thus, estimating the fluid's motion can be done using two steps: 1) computing the wiggle features v(x, y, t) from an input image sequence I(x, y, t), and 2) estimating the fluid motion u(x, y, t) from the wiggle features v(x, y, t). Each of these steps is described in turn below.
(155) Computing Wiggle Features
(156) The brightness constancy assumption in optical flow is that any changes in pixel intensities, I, are assumed to be caused by a translation with motion v=(v.sub.x, v.sub.y) over spatial horizontal or vertical positions, x and y, of the image intensities, where v.sub.x and v.sub.y are the x and y components of the velocity, respectively. That is,
I(x,y,t+dt)=I(x+v.sub.xdt,y+v.sub.ydt,t).
(157) Based on this brightness constancy equation, a traditional way to calculate the motion vector v is to minimize the following optical flow equation:
(158)
where .sub.1 and .sub.2 are weights for the data and smoothness terms, respectively.
Estimating Fluid Motion
(159) Let u.sub.x and u.sub.y be the x and y components of the fluid's velocity. The refractive constancy equation for a single view sequence is then:
v(x,y,t+t)=v(x+u.sub.xt,y+u.sub.yt,t)
(160) Notice that refractive constancy has the exact same form as brightness constancy (Equation 1), except that the features are the wiggles v rather than the image intensities I. Applying optical flow to the wiggle features v (rather than to the intensities, I), will yield the fluid motion u. The fluid motion u by minimizing the (fluid flow) following equation:
(161)
(162) This is similar to the Horn-Shark optical flow formulation and similar to optical flow methods, and a multi-scale iterative method can be used to solve it.
(163)
(164) Such processing is very sensitive to noise, however, as can be seen in
(165) Both the refractive flow, and its uncertainty can be estimated. Consider a background that is smooth in the x direction and textured in they direction. Due to the aperture problem known in the art of optical flow, the flow in the x direction may be dominated by noise, while the optical flow in they direction can be clean. Knowing the uncertainty in the flow allows uncertain estimates to be down-weighted, increasing the robustness of the method.
(166) To find the variance of the optical flow, the following equation can be formulated as a posterior distribution:
(167)
Here, P(v|I) is a Gaussian distribution, and the mean of P(v|I) equals to the solution of the original optical flow equation for {tilde over (v)} given above. With this formulation, the variance of the optical flow (the wiggle features) can also be calculated. See the supplementary material for the detailed calculation. Let {tilde over (v)} and v be the mean and covariance, respectively, of the wiggle features computed from Equation the equation above for posterior distribution P(v|I). The L2-norm for regularization is used, in contrast to robust penalty functions such as L1 norm traditionally used by optical flow methods, since fluid objects, especially hot air or gas, do not have the clear and sharp boundaries of solid objects.
(168) Then, with the variance of the wiggle features, we can reweight the fluid flow equation can be reweighted as follows:
(169)
Here the squared Mahalanobis distance is denoted as x.sub..sup.2=x.sup.T.sup.1x. In this formulation, the data term is reweighted by the variance of the optical flow to robustly estimate the fluid motion: wiggle features with less certainty, such as motions measured in regions of low-contrast, or of flat or 1-dimensional structure, will have low weight in fluid flow equation. To increase the robustness, the magnitude of u can also be to avoid estimating spurious large flows. The inclusion of the above uncertainty information leads to more accurate estimation of the fluid motion, as shown in
(170) In practice, calculating the covariance matrix precisely for each pixel is computationally intractable, as the marginal probability distribution for each optical flow vector needs to be computed. To avoid this calculation, we concatenate all the optical flow vectors can be concatenated into a single vector and its covariance can be computed. See the supplementary material given hereinafter for the details. Also, the fluid flow equation still has a quadratic form, so the posterior distribution of the fluid flow u can be modelled as a Gaussian distribution, and its variance can be computed. This variance serves as a confidence measure in the estimated fluid motion.
(171) The goal of fluid depth estimation is to recover the depth D(x, y) of a refractive fluid object from a stereo sequence I.sub.L(x, y, t) and I.sub.R(x, y, t) (
(172) A discrete Markov Random Field (MRF), common for stereo matching can then be used to regularize the depth estimates. Formally, let x.sub.L, and x.sub.R be the projection of a point on the fluid object onto the left and right image plane, respectively, and define ECCV-14 submission ID 1550 9 disparity as d=x.sub.Lx.sub.R. The disparity map can be solved first by minimizing the following objective function:
(173)
where f(v.sub.R, v.sub.L) is the data term based on the observed wiggles v.sub.R and v.sub.L, and the last two terms regularize the disparity field. The inventors have found that using the L.sub.2 norm for regularization generates better results overall, better explaining the fuzzy boundaries of fluid refractive objects.
(174) As with the refractive flow, the data term can be weighted by the variance of the optical flow to make the depth estimation robust to points in a scene where the extracted wiggles are not as reliable. To achieve this, the data term, f(v.sub.R, v.sub.L), can be defined as the log of the covariance between the two optical flows from the left and right views:
f({tilde over (v)}.sub.R,{tilde over (v)}.sub.L)=log cov(v.sub.R,v.sub.L)=log|.sub.L+.sub.r|+
where
(175) With calibrated cameras, the depth map, D(x, y), can be computed from the disparity map, d(x, y).
(176) Qualitative Results
(177)
(178)
(179) All the videos were recorded in raw format to avoid compression artifacts. To deal with small camera motions or background motions, the mean flow for each frame can be subtracted from the optical flow result. For each sequence captured, a temporal Gaussian blur was first applied to the input sequence in order to increase the SNR. The high-speed videos were captured using a high-speed camera. For some of the indoor high-speed sequences, a temporal band-stop filter was used to remove intensity variations from the light intensities modulated by AC power.
(180) The refractive flow method was first tested in controlled settings using a textured background. In the hand column, a video at 30 frames per second (fps) was taken of a person's hand right after holding a cup of hot water.
(181) Heat radiating upward from the hand was recovered. In hairdryer, a 1000 fps high-speed video of two hairdryers placed opposite to each other (the two dark shapes in the top left and bottom right are the front ends of the hairdryers) was taken, and two opposite streams of hot air flows were detected.
(182) The kettle and vents columns demonstrate the result on more natural backgrounds. In vents (700 fps), the background is very challenging for traditional background oriented schlieren (BOS) methods, as some parts of the background are very smooth or contain edges in one direction, such as the sky, the top of the dome, and the boundary of the buildings or chimneys. BOS methods rely on the motion calculated from input videos, similar to the wiggle features shown in the second row of
(183) Quantitative Evaluation
(184)
(185) To quantitatively evaluate the fluid velocity recovered by the disclosed refractive flow method, it on was also tested simulated sequences with precise ground truth reference. A set of realistic simulations of dynamic refracting fluid was generated using Stable Fluids, a physics-based fluid flows simulation technique, resulting in fluid densities and (2D) ground truth velocities at each pixel over time, as illustrated in
(186)
(187) To demonstrate further that the magnitude of the motion computed by the refractive flow method is correct, a controlled experiment as shown in
(188) Qualitative Results
(189)
(190) Several stereo sequences were captured using two cameras at acquiring images at 50 FPS. The two cameras were synchronized via genlock and a global shutter was used to avoid temporal misalignment. All videos were captured in 16 bit grayscale.
(191) A controlled experiment to evaluate the velocities estimated by the method. (a) The experiment setup. (b) A representative frame from the captured video. (c) The mean velocity of the hot air blown by the hairdryer, as computed using the method, in meters per second (m/s). (d) Numerical comparison of our estimated velocities with velocities measured using a velometer, for the four points marked x.sub.1-x.sub.4 in (c).
(192) The third row of
(193) Quantitative Evaluation
(194) A synthetic simulation was performed to demonstrate that probabilistic refractive stereo is robust to less-textured backgrounds. The simulation setup is similar to one used for the refractive flow method, and its details and the results are available in the supplementary material given hereinafter. The probabilistic framework allows for depth estimates of the flow even over image regions of only 1-dimensional structure.
(195) Supplementary Material
(196) Refractive Stereo: Quantitative Evaluation
(197) Refractive stereo results were evaluated quantitatively in two ways. First, for natural stereo sequences, recovered depths of the refractive fluid layers were compared with those of the heat sources generating them, as computed using an existing stereo method (since the depth of the actual heat sources, being solid objects, can be estimated well using existing stereo techniques). More specifically, a region on the heat source was chosen and another region of hot air right above the heat source was chosen, and the average disparities in these two regions was compared. Experiments showed that the recovered depth map of the (refractive) hot air matches well the recovered depth map of the (solid) heat source, with an average error of less than a few pixels.
(198) Second, the refractive stereo method was evaluated on simulated sequences with ground truth disparity. The simulation setup is similar to one used for the refractive flow method, except that the ground truth disparity map was manually specified as shown in
(199) To evaluate the performance of the method, four different background patterns were generated as shown in
(200) The probabilistic refractive stereo method was able to handle weaker textures. As long as one direction of the background was textured in both views, the disparity map was accurately recovered. For example, in the second row and second column in
(201)
(202) Definition 1 (Refraction wiggle) Let x be a point on the refractive fluid layer, x be the intersection between the background and the light ray passing through x and the center of projection at time t, and t be a short time interval. Then the wiggle of x from time t to t+t is the shift of the projection of x on the image plane during this time.
(203) This definition leads to the following two refractive constancy theorems.
(204) Theorem 1 (Refractive flow constancy) Suppose the fluid object does not change its shape and index of refraction during a short time interval [t.sub.1, t.sub.2]. Then for any point on the fluid object, its wiggle v(t.sub.1) at t.sub.1 equals its wiggle v(t.sub.2) at t.sub.2.
(205) Proof Let x.sub.t.sub.
(206) Because wiggles are defined by shifts in the image plane, rays are first traced to determine what points in the image plane correspond to these locations on the fluid object. At time ti, i=1, 2, an undistorted ray is emitted from the center of the projection to point x.sub.t.sub.
(207) At a successive time t.sub.i+t, the fluid object moves to a new location (dashed gray blob in
{right arrow over (x.sub.t.sub.
(208) To prove this, it will first be shown that
(209)
same and are the same point on the fluid object, or equivalently, the shifts x.sub.t.sub.
(210) Let z, z, and z, respectively, be the depths of the image plane, the fluid layer, and the background from the center of projection (
(211)
(212) The relationship between .sub.t.sub.
.sub.t.sub.
(213) The angle difference t(x.sub.t.sub.
(214)
(215) From which for x.sub.t.sub.
(216)
(217) Similarly, we can solve for x.sub.t.sub.
(218)
(219) Subtracting the previous two equations from each other yields a difference equation:
(220)
(221) Since x.sub.t.sub.
(222)
(223) The quantity x.sub.t.sub.
(224) Finally, it is proven that wiggles at t.sub.1 and t.sub.2 are equal. By the similar triangle formula, we have:
(225)
(226) Theorem 2 (Refractive stereo constancy) Suppose there are n2 cameras imaging a refractive fluid object, and they are all parallel and close to each other. Then at any time t, and for any point on the fluid object, the corresponding wiggle in all the cameras is the same.
(227)
(228) Proof Similar to the previous proof, let xt be a point on the fluid object. Tracing rays, at time t, an undistorted ray is emitted from the center of the projection o.sub.j(j=1, 2) to the point point x.sub.t. It is refracted by the fluid object and intersects the background at x.sub.j. At a successive time t+t, the fluid object moves, and the light ray from the points on the background to the center of the projection now goes through points x.sub.t+t,j on the fluid object and x.sub.t.sub.
(229)
are equal in both views.
(230) As in the previous proof, it is first shown, that x.sub.t+t,1=x.sub.t+t,2. Following a similar derivation as in the previous proof results in:
(231)
(232) Then, subtracting the previous equation with j=2 from the previous equation with j=1, we have:
(233)
(234) By the same logic as in the previous proof, when x.sub.t+t,1=x.sub.t+t,2, both the LHS and RHS of the previous equation are equal to 0. Therefore, x.sub.t+t,1=x.sub.t+t,2 is the solution to the previous equation.
(235) Thus, x.sub.t+t,1 and x.sub.t+t,2 are the same point.
(236) Finally, it can be proven that wiggles from two views are equal:
(237)
Calculating Fluid Flow Efficiently
(238) It was previously shown that the probabilistic refractive flow method consists of two steps. First, the mean {tilde over (v)} and the variance .sub.v of the wiggle features v are solved for from the following Gaussian distribution:
(239)
(240) To solve for the mean and variance of flow from the previous equation, let the V be the vector formed by concatenating all the optical flow vectors in one frame. That is, V=( . . . , v(x), . . . ). Also, let us represent the previous equation in information form P(v|I)=exp(V.sup.TJV+h.sup.TV), where h and J can be calculated from the previous equation. Then the mean of V is {tilde over (v)}=J.sup.1h and covariance of V is =J.sup..
(241) In the second step, the fluid flow is calculated by minimizing the following optimization problem based on the mean and variance of the wiggle features computed in the first step.
(242)
(243) Calculating the covariance of each wiggle feature requires inverting the information matrix J. This step will be slow if the matrix is large. To avoid this time consuming inversion, we make a slight change to the fluid flow objective function. Let {tilde over (V)}.sub.x, {tilde over (V)}.sub.y, and {tilde over (V)}.sub.t be the vectors formed by concatenating all the partial derivatives of mean wiggle features in a frame, that
(244)
Similarly, let U.sub.x, U.sub.y be the vectors formed by concatenating all the x-components and y-components of u in a frame respectively. Then the refractive flow can be calculated as follows:
(245)
(246) where D.sub.x and D.sub.y are the partial derivative matrices to x and y respectively. The smoothness term of the previous equation is exactly the same as that in the equation for above, and the data term of the equation for above is
(V.sub.x.Math.U.sub.x+V.sub.y.Math.U.sub.y+V.sub.t).sup.TJ(V.sub.x.Math.U.sub.x+V.sub.y.Math.U.sub.y+V.sub.t)=V.sub.x.Math.U.sub.x+V.sub.y.Math.U.sub.y+V.sub.t.sub.J-1=V.sub.x.Math.U.sub.x+V.sub.y.Math.U.sub.y+V.sub.t.sub.,
which is also similar to the data term in the equation for above except that it jointly considers all the wiggle vectors in a frame. Therefore, this change will not affect the result too much, but the method is more computationally efficient, as we never need to compute J.sup.1. The term never appears in the refractive flow expression above.
Probabilistic Interpretation in the Refractive Stereo
(247) In this section, it is shown that the data term defined in Section 5 for refractive stereo is equal to the negative log of the conditional marginal distribution. Let v.sub.R(x)N(
(248)
(249) Where N(v;
(250)
(251) Recall that the optical flow calculated by the method is degraded by noise. Specifically, let v(x) be the ground truth optical flow from the right view at x. The mean optical flow from the right view (or left view) calculated by the method equals the ground truth optical flow plus Gaussian noise with zero-mean and variance equal to .sub.R(or .sub.L), that is:
P(
(252) To evaluate the probability of d, let us consider the marginal distribution
(253)
(254) Assuming that P(v) has an uniform prior, we have:
(255)
(256) Therefore, the data term is equal to the negative log of conditional marginal distribution (plus a constant).
(257) While this invention has been particularly shown and described with references to example embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.