Virtual Frame Technique: Ultrafast Imaging with Any Camera

Many phenomena of interest in nature and industry occur rapidly and are difficult and cost-prohibitive to visualize properly without specialized cameras. Here we describe in detail the Virtual Frame Technique (VFT), a simple, useful, and accessible form of compressed sensing that increases the frame acquisition rate of any camera by several orders of magnitude by leveraging its dynamic range. VFT is a powerful tool for capturing rapid phenomenon where the dynamics facilitate a transition between two states, and are thus binary. The advantages of VFT are demonstrated by examining such dynamics in five physical processes at unprecedented rates and spatial resolution: fracture of an elastic solid, wetting of a solid surface, rapid fingerprint reading, peeling of adhesive tape, and impact of an elastic hemisphere on a hard surface. We show that the performance of the VFT exceeds that of any commercial high speed camera not only in rate of imaging but also in field of view, achieving a 65MHz frame rate at 4MPx resolution. Finally, we discuss the performance of the VFT with several commercially available conventional and high-speed cameras. In principle, modern cell phones can achieve imaging rates of over a million frames per second using the VFT.


Introduction
Nature is rife with phenomena that occur faster than our senses can capture. As a result, progress in imaging technology often yields new physical insight 1 . Because the rate of data transfer is capped by hardware technology, increasing frame acquisition rate is conventionally achieved by reducing image resolution, sometimes to the extreme of recording only a few lines of pixels 2 , or even just a few single pixels 3 . However, for many rapid phenomena, resolving the 2D dynamics is indispensible. For example, the shape of a crack front reveals the type of fracture underway 4 . Often, processes with rapid, fully two-dimensional dynamics consist of a transition between two states, such as fractured and un-fractured, or wet and non-wet 5 . For these dynamics, the standard use of a camera is extremely inefficient; a 16-bit camera has over 65,000 grayscale values, while only two are necessary. In principle, by sacrificing this (unnecessary) bit-depth, one may may boost the frame rate of any camera by several orders of magnitude while retaining full spatial resolution.
Here we describe a method of imaging dynamic processes in full spatial and enhanced temporal resolution that exploits the dynamic range of the imaging sensor. Binary dynamics are integrated over each exposure time: a time-lapse at ultra-high speeds. A single image, referred to here as a compressed frame stack (CFS), can then be deconvolved into several thousands of 'virtual frames' using thresholding. In this way, ultra-fast frame rates are attained using the Virtual Frame Technique (VFT), while the avoiding trade-off between spatial and temporal resolution typical of conventional high-speed imaging. We directly compare the VFT with a standard fast camera by recording a rapid fracture simultaneously using both methods. The VFT results in a higher resolution, larger field of view, and faster frame rate, while faithfully reproducing the images recorded with the fast camera. The VFT allows the imaging of a wetting front during rapid droplet impact in 2D, achieving frame rates of nearly 8MHz. Using a pulsed light source to shorten exposure time, three additional examples of 2D dynamics are recorded at unprecendented speed and resolution, achieving a peak frame rate above 65MHz at 4MPx. Finally, the frame rates and resolutions attainable using standard operation vs the VFT are discussed for several commercially available cameras.
The Virtual Frame Technique boosts frame rate with no loss in spatial resolution by convolving many 'virtual frames' into a single image. Consider a hypothetical monotonic process, like the movement of a V-shaped front shown in Fig 1. The region of interest is illuminated uniformly such that the instantaneous light intensity reaching each pixel is either value a or value b at all times, i(x, y,t) = a, b for any x, y,t, as shown for a = 0, b = 1 in Fig 1a. Under these conditions, a dynamic process recorded with a finite exposure time τ will appear blurred, as shown in Fig 1b. The gray-scale value of a pixel, I(x, y), is a measure of integrated light intensity for an image taken at time t = 0. For a monotonic process, each pixel will transition from light to dark at a single time, t t (x, y) 1 . As a result, intensity uniquely maps to transition time, and we can re-write equation 1 as: Gray scale of the image encodes temporal information; all pixels with a gray value at the threshold I 0 represent the location of the front at the corresponding time t t (I 0 ). As a result, one can create 'virtual frames' by thresholding the blurred image, as shown in Fig 1c. These virtual frames are instantaneous snapshots of the process at a given time within the exposure, and thousands or more may be stored in a single image (CFS).
The VFT offers significant enhancement of temporal resolution without compromising spatial resolution of dynamic processes. The principle advantage arises from the way the VFT exploits the large bit-depth of typical digital camera sensors: for 16-bit sensors, over 65,000 discrete positions can be recorded in a single exposure, leading to an enhancement of the frame rate by a factor in the tens of thousands. Ideally, virtual frames are limited in number only by the bit depth of the camera, which represents the number of discrete grayscale values, and thus time steps that a single image can contain. The maximum frame rate achievable through this method is where β is the 'boost' in frame rate, the number of virtual frames per frame, and τ once again as the exposure time. In this formula a = 1 or b = 1 corresponds to exact saturation of a pixel. The frame rate is reduced, however, by the noise inherent to the camera's sensor: whereas for sCMOS sensors the readout noise approaches 1 electron rms, a typical EMCCD will exceed this performance at the lowest light levels, and record nearly perfect dark signals. By contrast, a typical high speed camera sensor has several electrons of readout noise and a lower effective bit-depth, ultimately reducing the attainable β . In this way the sensor type and its noise characteristics do enter into the performance capabilities of the VFT. Furthermore, noise in the lighting, resulting in variations in a and b across the image, may increase the minimally resolved timestep. However, smooth spatial variation in the illumination can be accounted for by obtaining images of a(x, y) and b(x, y) and simply evaluating equation 2 for each pixel.
1 t t = 0 corresponds to a pixel dark when the exposure begins, and t t = τ corresponds to a pixel that remains illuminated when the exposure is complete  Background lighting and sample opacity were tuned such that the process appears binary at any instant. Two cameras simultaneously record the dynamics such that the crack moves from left to right across both fields of view. Camera one (red) films at 40KHz with a resolution of 320x208 pixels with a total of 60 kilopixels. Six contrast enhanced images from camera one are shown outlined in red. Camera two (purple) films at 5KHz with a resolution of 1280x1000 pixels with a total of nearly 1.3 megapixels; a compressed frame stack is shown outlined in purple at right. The field of view of camera one is superimposed upon the raw image from camera two with a red dashed box. (c) Virtual frames reconstructed from the raw image in (b) are cropped to match the field of view of camera one. The fractional exposure times are chosen such that they correspond to the images recorded by the fast camera in (b). (d) Top: The crack tip location (∆L) is measured using both the images of camera one and the virtual frames of camera two. The effective frame rate achieved using VFT is 1MHz, corresponding to β = 200. Because the field of view of the virtual frames is larger than the fast camera frames, the VFT camera (cam two) tracks the crack tip for nearly three times as long as the camera simply filming (cam one). Bottom: A sub-set of the data plotted on a smaller scale highlights the enhanced temporal resolution of the VFT.

Proof of Principle: Virtual and Actual Frames of Fracture
Material failure is a highly dynamic process that often occurs at rates that approach the material sound speeds ? . Imaging data have been used in a similar optical configuration to measure the crack tip opening displacement (CTOD), whose curvature [6][7][8] and scaling 9 carry essential information about the state of stress at the crack tip, and can be used to measure the stress intensity factor. The VFT enables us to use the entire imaging sensor at high speed, capturing the CTOD in higher resolution in both time and space. For dynamic fracture processes, the VFT can record the crack tip trajectory at a high rate over a large area of interest, enabling detailed studies of the crack's equation of motion 8 and the instabilities of a propagating crack 10,11 . The binary and monotonic criteria required of the VFT can also be realized using other fracture visualization techniques than the one used here, such as viewing the advancing dynamic fracture front through the sample 12,13 . While imaging clearly provides tremendous insight into the dynamics of rapid fracture, these dynamics are extremely difficult to image even with state-of-the-art high speed cameras, leaving room for significant advancement using the VFT. Using VFT simultaneously with conventional high-speed imaging, we record the dynamics of a crack propagating in a soft elastomer. A 1.5 mm thick sheet of polyvinylsiloxane (PVS) is loaded in tension, and a crack is introduced on the sample's edge which spontaneously accelerates through the sample, as shown schematically in Fig. 2a. An identical projection of the test section is directed onto the two imaging sensors simultaneously using a beam splitter, as shown in Fig. 2b. Six consecutive images from the high-speed camera are shown atop six virtual frames reconstructed from the compressed frame stack (CFS); the virtual frames reproduce exactly the same front geometry as the instantaneous high-speed images, as can be readily seen in Fig. 2b and 2c. The virtual frames were significantly cropped to match the reduced field of view of the high speed camera, and faithfully reproduce the dynamics recorded with the conventional fast camera even on the smallest scales. Using these virtual and fast camera images, the location of the crack tip (∆L) is calculated as a function of time, as shown in Fig 2d. Here, the virtual frame rate used is approximately 1 MHz (β = 200). There is excellent agreement between the two methods, confirming the merit of the VFT. Furthermore, the VFT creates frames 25 times faster 2 , nearly triples the tracking time, and simultaneously increases the field of view, resulting in significant enhancement of data quality. Droplet Impact and the VFT The VFT has been used to enhance the temporal and spatial resolution of droplet impact dynamics. In conjunction with TIR microscopy, the position of the wetting front can be measured at high virtual frame rates 5 . Here, a water droplet falls under gravity and impacts a solid surface illuminated from beneath in total internal reflection as described elsewhere 5,14,15 and shown schematically in Fig 3a. Before the droplet can contact the surface it must drain the air beneath it. As the droplet approaches the surface, the air fails to drain [16][17][18] and instead compresses, diverting the liquid over a nanometer scale air film 5 . Measurements using the VFT show that the liquid front velocity exceeds the liquid capillary velocity. However, the liquid must flow at the smallest scales in order to make contact; this confirms that the air mediates contact at the highest impact velocities 5 . A typical CFS for a droplet impacting at a velocity of 3.5 m/s is shown in Fig 3b. The CFS is used to make virtual frames, as shown in Fig 3c, from which the spatio-temporal dynamics of the advancing wetting front are measured, as shown in Fig 3d. For this impact, the VFT enables us to resolve the front position at micron-scales, with nearly 40 measurements in the first 5 microseconds of the impact process. This corresponds to a virtual frame rate approaching 8 MHz 3 . Such data are necessary to advance our understanding of dynamic wetting processes, as highlighted by recent experimental work 5,14,15 and numerical calculations 19 .

Even Faster: Time-Gated VFT
The methods described to this point may be referred to as 'Continuous VFT,' because the high frame rate is mantained during continuous recording, and the virtual frames span multiple exposures. However, a further boost in frame rate is possible if continuous recording is inessential. While the boost factor β is defined by the camera's sensor, f ps MAX may be increased by reducing τ in equation 3. Augmenting the frame rate in this manner can be achieved by many means, from simply reducing the electronic shutter time for cameras with a global shutter, to external gating using a pulsed light source 4 or an electronically controlled filter such as an image intensifier. Using a camera capable of only 100fps with standard use, several non-trivial rapid dynamics are visualized using time-gated VFT, as shown in Fig 4. These measurements utilize the TIR lighting configuration shown in Fig 3 combined with a rectangular pulse generator powering the light source. Using a pulse length τ = 10ms, a fingerprint contacting the solid surface is seen to make contact first in discrete points, which then merge to form familiar lines, as shown in Fig 4a. It is possible that this transition influences the staying power of fingerprints left behind on a surface 20 . A shorter pulse, τ = 1ms, is used to observe tape being quickly peeled off of a solid surface, revealing cavitation bubbles forming ahead of the releasing front, as noted in 21 , and shown in Fig 4b. This process is not only rapid but small in comparison to the scale of the tape, requiring both high resolution and frame rate to visualize. Finally, the dynamics of an impacting hemispherical elastic solid are visualized using a pulse of length τ = 250µs, as shown in Fig 4c. The frame rate for this measurement exceeds 65MHz while mantaining a 4Mpx field of view. A central bubble of air is mantained for the entire exposure, reminiscent of the dynamics of the impacting droplet in Fig 2, wherein two fronts fill the contact surface. Furthermore, in dynamics not observed in the liquid analog, initially patchy contact is established, and is filled in over 10µs timescales. While there are successful theories that allow us to discuss contact at small scales 22,23 , as well as dynamic contact 24 , they do not include the effect of air, which appears to be deforming our elastic impactor. We note that one may increase the frame rate arbitrarily by further shortening τ, the only drawback being a proportionally smaller measurement time window. Droplet (3) Hemisphere (4) Fracture (2) Tape (4) Fingerprint (4) Figure 5. VFT Capability Phase Space Conventional fast cameras demand a tradeoff between pixel resolution and frame rate (bright lines, dark gray area on left); VFT introduces an alternative tradeoff between bit depth and frame rate resulting in an enhanced frame rate without loss of spatial resolution (faded lines, medium gray area in middle). Note that β ≡ 2 #bits−2 to account for typical sensor and signal noise. This enhanced virtual frame rate does not require any change in the operation of the camera; indeed, the dynamics can be continuously recorded over many exposure times. Using Time-Gated VFT with a controlled exposure time τ, the frame rate may be increased arbitrarily to β /τ using equation 3, shown using the most faded lines and the lightest gray area (on right) for τ = 250µs. Black symbols indicate experimental data from Figs 2, 3, and 4.

Discussion
The capabilities of the VFT are summarized in the figure of merit, Fig 5, using the specifications of several conventional and fast cameras. Here, the frame rate is plotted as a function of the number of pixels recorded. For a state-of-the-art high speed camera such as the Phantom v2512 (blue), the trade-off between region of interest and frame rate is clear; as the read-out rate is defined in pixels-per-second, the product of frame rate and pixel number is nearly constant. Using the VFT, this high speed camera receives a maximum frame rate boost of β = 2 12−2 = 1024, allowing sub-nanosecond frame rates even allowing for 2 bits of sensor and signal noise. The advantage of VFT is even more evident in high-bit depth cameras like the Hamamatsu Orca-Flash4.0 V3 (pink) and the Nikon D850 (teal), with bit depths 16 and 14 respectively. Note the large increase in recording capability (medium gray) resulting from using continuous VFT across all cameras. Time-gated VFT (lightest gray) can generate even faster recording speeds, allowing 'slow' cameras to generate blistering virtual frame rates, with multi-megapixel resolution.
As an example, the Nikon D850 using a τ = 250µs light pulse records virtual frames at 16MHz, as shown by the lightest teal curve in Fig 5, while maintaining a resolution over 50Mpx! The performance of the VFT when used with the iPhone X (red) highlight the versatility and platform independence of the technique, and open the door for high-speed imaging experiments without specialized and expensive equipment. We have described a novel and straightforward method for capturing high speed phenomena in detail in the Virtual Frame Technique. When suitable pre-processing is possible, high speed phenomena can be recorded at rates circumscribed only by the camera's bit depth and the exposure time, altering the typical modality of high-speed imaging, wherein the frame rate varies inversely with the number of pixels recording. High speed imaging typically employs short exposure times to reduce blur, capturing discrete, sharp snapshots. However using the VFT one may eliminate the gaps between these frames, recording the dynamics continuously 5 . Counter-intuitively, one may record dynamics with crisper resolution in both time and space by increasing exposure time to record virtual frames.

Supplementary Video
Elastomer_Fracture_1Mfps_at_30fps.mp4 (Fig 2) The VFT is tested by recording images simultaneously using a slow camera and a traditional high-speed camera. The tradeoff between the high rate and region of interest is obvious for the traditional high speed camera, whereas the greater data density at larger observed area offered by the VFT is equally apparent. Frames are replayed at 30 fps (slowed down by 33,000).