{'fraction_non_alphanumeric': 0.030443957304705907, 'fraction_numerical': 0.008850464034746265, 'mean_word_length': 4.596422838798441, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The STONE Transform: Multi-Resolution Image Enhancement and Real-Time Compressive Video

Compressed sensing enables the reconstruction of high-resolution signals from under-sampled data. While compressive methods simplify data acquisition, they require the solution of difficult recovery problems to make use of the resulting measurements. This article presents a new sensing framework that combines the advantages of both conventional and compressive sensing. Using the proposed \stone transform, measurements can be reconstructed instantly at Nyquist rates at any power-of-two resolution. The same data can then be"enhanced"to higher resolutions using compressive methods that leverage sparsity to"beat"the Nyquist limit. The availability of a fast direct reconstruction enables compressive measurements to be processed on small embedded devices. We demonstrate this by constructing a real-time compressive video camera.


I. INTRODUCTION
In light of the recent data deluge, compressive sensing has emerged as a method for gathering high-resolution data using dramatically fewer measurements. This comes at a steep price. While compressive methods simplify data acquisition, they require the solution of difficult recovery problems to make use of the resulting measurements. Compressive imaging has replaced the data deluge with an algorithmic avalancheconventional sensing saturates our ability to store information, and compressive sensing saturates our ability to recovery it. Spatial Multiplexing Cameras (SMC's) are an emerging technology allowing high-resolution images to be acquired using a single photo detector. Interest in SMC's has been motivated by applications where sensor construction is extremely costly, such as imaging in the Short-Wave Infrared (SWIR) spectrum. For such applications, SPC's allow for the low-cost development of cameras with high resolution output. However the processing of compressive data is much more difficult, making real-time reconstruction intractable using current methods.
The burden of reconstruction is a major roadblock for compressive methods in applications. For this reason it is common to reconstruct images offline when sufficient time and computing resources become available. As a result, the need to extract real-time information from compressive data has led to methods for analyzing scenes in the compressive domain before reconstruction. Many of these methods work by applying image classifiers and other learning techniques directly on compressive data, sacrificing accuracy for computation tractability.
The reconstruction problem is particularly crushing in the case of video processing. Naively extending SMC methods to video results in cameras with poor temporal resolution and burdensome Size, Weight and Power (SWaP) characteristics.
Many proposed video reconstruction schemes rely on costly optical flow maps, which track the movement of objects through time. This calculation makes video reconstruction slow -a few seconds of video may take hours or days to reconstruct. When the number of frames becomes large, the reconstruction problem becomes orders of magnitude more costly than for still images, eclipsing the possibility of realtime video using conventional methods.
We present a framework that unifies conventional and compressive imaging, capturing the advantages of both. Using a new transform, we acquire compressive measurements that can be either reconstructed immediately at Nyquist rates, or "enhanced" using an offline compressive scheme that exploits sparsity to escape the Nyquist bound.
A cornerstone of our framework is a multi-scale sensing operator that enables reconstructed in two different ways. First, the proposed measurements can be reconstructed using high-resolution compressive schemes that beat the Nyquist limit using sparse representations. Alternately, the data can be reconstructed using a simple, direct fast O(N log N ) transform that produces "preview" images at standard Nyquist sampling rates. This direct reconstruction transforms measurements into the image domain for online scene analysis and object classification in real time. This way, image processing tasks can be performed without sacrificing accuracy by working in the compressive domain. The fast transform also produces realtime image and video previews with only trivial computational resources. These two reconstruction methods are demonstrated on an under-sampled image in Figure 1.
In the case of high-resolution compressive video reconstruction, we also propose a numerical method that performs reconstruction using a sequence of efficient steps. The compressive video reconstruction relies on a new "3DTV" model, which recovers video without expensive pre-processing steps such as optical flow. In addition, the proposed reconstruction uses efficient primal-dual methods that do not require any expensive implicit sub-steps. These numerical methods are very simple to implement and are suitable for real-time implementation using parallel architectures such a Field Programmable Gate Arrays (FPGA's).
The flexibility of this reconstruction framework enables a real-time compressive video camera. Using a single-pixel detector, this camera produces a data stream that is reconstructed in real time at Nyquist rates. After acquisition, the same video data can be enhanced to higher resolution using offline compressive reconstruction. A 1024×1024 test image. (center) A direct (non-iterative) preview from 6.25% sampling. (bottom) An iterative reconstruction leverages compressed sensing to achieve higher resolution using the same data.

A. Structure of this Paper
In Section 2, we present background information on compressive imaging and the challenges of compressive video. In Section 3, we introduce the STOne transform, which enables images to be reconstructed using both compressive and Nyquist methods at multiple resolutions. We analyze the statistical properties of the new sensing matrices in Section 4. Then, we discuss the 3DTV model for compressive reconstruction in Section 5. This model exploits compressive sensing to construct high resolution videos without common computational burdens. Fast, simple numerical methods for compressive video reconstruction are introduced in Section 6, an assortment of applications are discussed in section 7, and numerical results are presented in Section 8.

A. Single Pixel Cameras
Numerous compressive imaging platforms have been proposed, including the Single-Pixel Camera [1], flexible voxel camera [2], P2C2 [3], and coded aperture arrays [4]. To be concrete, we focus here on the spatially multiplexing Single Pixel Camera (SPC), as described in [1]. However, the measurement operators and fast numerical schemes are easily applicable to a wide variety of cameras, including temporal and spectral multiplexing cameras.
Rather than measuring individual pixels alone, SPC's measure coded linear combinations of pixels [1]. An SPC consists of a lens, a Digital Micro-mirror Device (DMD), and a photo detector. Each mirror on the DMD modulates an individual pixel by diverting light either towards or away from the detector. This results in a combination coefficient for that pixel of +1 or −1, respectively.
When the combination coefficients are chosen appropriately, the resulting measurements can be interpreted as transform coefficients (such as Hadamard coefficients) of the image. For this reason, it is often said that SPC's sense images in the transform domain.
The ith measurement of the device is an inner product φ i , v where v is the vectorized image, and φ i is a vector of ±1's encoding the orientation of the mirrors. Once M measurements have been collected, the observed information can be written where the rows of Φ contain the vectors {φ i }, and b is the vector of measurements. If v contains N pixels, then Φ is an M × N matrix. Image reconstruction requires of solving this system. If Φ is a fast binary transform (such as a Hadamard transform) the image reconstruction is simple and fast. However, it is often the case that M < N, and image reconstruction requires additional assumptions on v.

B. Compressed Sensing
Because SPC's acquire measurements in the transform domain (by measuring linear combinations of pixels), they can utilize Compressive Sensing [5], [6], which exploits the compressibility of images to keep resolution high while sampling below the Nyquist rate. Compressive imaging reduces the number of measurements needed for image reconstruction, and thus greatly accelerates imaging. The cost of such compressive methods is that the image reconstruction processes is computationally intense. Because we have fewer measurements than pixels, additional assumptions need to be made on the image.
Compressed sensing assumes that images have sparse representations under some transform. This assumption leads to the following reconstruction problem: where S is the sparsifying transform, and the 0 norm, | · | 0 , simply counts the number of non-zero entries in Sv. In plain words, we want to find the sparsest image that is still compatible with our measurements. It has been shown that when S and Φ are chosen appropriately, nearly exact reconstructions of v are possible using only O(|Sv| 0 log N ) measurements, which is substantially fewer than the N required for conventional reconstruction. In practice, accurate recovery is possible when Φ consists of randomly sampled rows of an orthogonal matrix [7], [8].
In practice, it is difficult to solve (1) exactly. Rather, we solve the convex relation, which is denoted: for some regularization parameter µ, where | · |/ · denotes the 1 / 2 norm, respectively. It is known that when S and Φ are mutually incoherent, the solutions to (2) and (1) coincide with high probability. Most often, the measurement matrix Φ is formed by subsampling the rows of an orthogonal matrix. In this case, we can write where R is a diagonal "row selector" matrix, with R i,i = 1 if row i has been measured, and R i,i = 0 otherwise. The matrix T is generally an orthogonal matrix that can be computed quickly using a fast transform, such as the Hadamard transform.

C. The Challenges of Compressive Video
Much work has been done on compressive models for stillframe imaging, while relatively little is known about video reconstruction.
Video reconstruction poses many new challenges that stillframe imaging does not. Object motion during data acquisition produces motion artifacts. Rather than appearing as a simple motion blur (like in conventional pixel domain imaging), these motion artifacts get aliased during reconstruction and effect the entire image. In order to prevent high levels of motion aliasing, reconstruction must occur at a high frame rate, yielding a small number of measurements per frame.
The authors of [9] conduct a thorough investigation of motion aliasing in compressive measurements. A tradeoff exists between spatial resolution and temporal blur when objects are moving. When images are sampled at low resolutions (i.e. pixels are large), objects appear to move slower relative to the pixel size, and thus aliasing due to motion is less severe. When spatial resolution is high, motion aliasing is more severe. For this reason it is desirable to have the flexibility to interpret data at multiple resolutions. Higher resolution reconstructions can be used for slower moving and objects, and low resolutions can be used for fast moving objects. This is an issues that will be addressed by the new Sum-To-One (STOne ) transform, introduced in Section III.

D. Previous Work on Compressive Video
A video can be viewed as a sequence of still frames, each individually sparse under some spatial transform. However, adjacent video frames generally have high correlations between corresponding pixels. Consequently a large amount of information can be obtained by exploiting these correlations.
One way to exploit correlations between adjacent frames is to use "motion compensation." Park and Wakin [10] first proposed the use of previews to compute motion fields between images, which could be used to enhance the results of compressive reconstruction.
The first full-scale implementation on this concept is the Compressed Sensing Multi-scale Video (CS-MUVI) framework [11]. This method reconstructs video in three stages. First, low-resolution previews are constructed for each frame. Next, an optical flow model is used to match corresponding pixels in adjacent frames. Finally, a reconstruction of the type (7,2) is used with "optical flow constraints" added to enforce equality of corresponding pixels.
The CS-MUVI framework produces good video quality at high compression rates, however it suffers from extreme computational costs. The CS-MUVI framework relies on special measurement operators that cannot be computed using fast transforms. A full-scale transform requires O(N 2 ) operators, although the authors of [11] use a "partial" transform to partially mitigate this complexity. In addition, optical flow calculation is very expensive, and is a necessary ingredients to obtain precise knowledge of the correspondence between pixels in adjacent images. Finally, optimization schemes that can handle relatively unstructured optical flow constraints are less efficient than solvers for more structured problems.
A similar approach was adopted by the authors of [12] in the context of Magnetic Resonance Imaging (MRI). Rather than use previews to generate motion maps, the authors propose an iterative process that alternates between computing compressive reconstructions, and updating the estimated flow maps between adjacent frames. This method does not rely on special sensing operators to generate previews, and works well using the Fourier transform operators needed for MRI. However, this flexibility comes at a high computational cost, as the computation of flow maps must now be done iteratively (as opposed to just once using low-resolution previews). Also, the resulting flow constraints have no regular structure that can be exploited to speed up the numerics.
For these reasons, it is desirable to have more efficient sparsity models allowing for efficient computation. Such a model should (1) not require a separate pre-processing stage to build the sparsity model, (2) rely on simple, efficient numerical schemes, and (3) use only fast transform operators that can be computed quickly. The desire for more efficient reconstruction motivates the 3DTV framework proposed below.

III. MULTI-RESOLUTION MEASUREMENT MATRICES: THE STONE TRANSFORM
In this section, we discuss the construction of measurement operators that allow for fast low-resolution "previews." Previews are conventional (e.g. non-compressive) reconstructions that require one measurement per pixel. Because they rely on direct reconstructions, previews have the advantage that they do not require the solution of expensive numerical problems and thus require less power and time to reconstruct. At the same time, the data used to generate previews is appropriate for high-resolution compressive reconstruction when the required resources are available.
Such measurement matrices have the special property that each row of the matrix has unit sum, and so we call this the Sum To One (STOne) transform.

A. The Image Preview Equation
Previews are direct reconstructions of an image without the need for full-scale iterative methods. Such an efficient reconstruction is only possible if the sensing matrix Φ is designed appropriately. We wish to identify the conditions on Φ that make previews possible.
The low resolution preview must be constructed in such a way that it is compatible with measured data. In order to measure the quality of our preview using high resolution data, we must convert the low-resolution n × n image into a high resolution N × N image using the prolongation operator P N n . To be compatible with our measurements, the low-resolution preview must satisfy where we have left the sub/super-scripts off P for notational simplicity. In words, when the preview is up-sampled to full resolution, the result must be compatible with the measurements we have taken.
The solution of the preview equation (3) is highly non-trivial if the sensing matrix is not carefully constructed. Even when Φ is well-behaved, it may be the case that ΦP is not. For example, if Φ is constructed from randomly selected rows of a Hadamard matrix, the matrix ΦP is poorly-conditioned. As a result, the low-resolution preview is extremely noise-sensitive and inaccurate. Also, for many conventional sensing operators, there is no efficient algorithm for solving the preview equation. Even when Φ can be evaluated efficiently (using, e.g., the fast Hadamard or Fourier transform), solving the preview equations may require slow iterative methods.
Ideally, we would like the matrix ΦP to be unitary. In this case, the system is well-conditioned making the preview highly robust to noise. Also, the equations can be explicitly solved in the form u n = Φ T P T b.
These observations motivate the following list of properties that a good sensing operator should have: 1) The matrix Φ has good compressive sensing properties.
It is known that compressive reconstruction is possible if the rows of Φ are sub-sampled from an orthogonal matrix [7], [8]. That is, we want to define Φ = RT for some row selector R and fast orthogonal transform T . 2) The preview matrix ΦP must be well conditioned and easily invertible. These conditions are ensured if ΦP is unitary.
3) The entries in Φ must be ±1. Our sensing matrix must be realizable using a SMC.
It is not clear that a sensing matrix possessing all these properties exists, and for this reason several authors have proposed sensing methods that sacrifice at least one of the above properties. CS-MUVI, for example, relies on Dual-Scale-Space (DSS) matrices that satisfy properties 2 and 3, but not 1. For this reason, the DSS matrices do not have a fast transform, making reconstruction slow.
Below, we describe the construction of sensing matrices that satisfy all of the above desired properties.

B. Embeddings of Images into Vectors
Suppose we have compressive measurements taken from an N × N image. We wish to acquire a low-resolution n × n preview for n < N. If n evenly divides N, then we can define the downsampling ratio δ = N/n.
Depending on the situation, we will need to represent images as either a 2-dimensional array of pixels, or as a 1dimensional column vector. The most obvious embedding of images into vectors is using the row/column major ordering, or equivalently to perform the transform on the image in the row and column directions separately. This embedding does not allow low-resolution previews to be constructed using a simple transform.
Rather, we embed the image into a vector by evenly dividing the image into blocks of size δ × δ. There will be n 2 such blocks. The image is then vectorized block-by-block. The resulting vector has the form where v i contains the pixel data from the ith block. It is possible to embed the image so that the vector is in block form (4) for every choice of n = 2 k < N . When such an embedding is used, previews can be obtained at arbitrary resolutions.
The new embedding is closely related to the so-called nested-dissection ordering of the image, which is well known in the numerical linear algebra literature [13], [14]. The proposed ordering is defined by a recursive function which breaks the square image into four symmetrical panels. Each of the four panels are addressed one at a time. Every pixel in the first panel is numbered, and then the second panel, and then the third and fourth. The numbering assigned to the pixels in each panel is defined by applying the recursive algorithm. Pseudocode for this method is given in Algorithm 1.
Algorithm 1 Ordering of Pixels in an n × n Image 1: Inputs:

2:
Image: a 2d array of pixels 3: L: The lowest index to be assigned to a pixel 4: function ASSIGN(Image,L)

5:
Let N be the side length of Image   The third level of recursion breaks each sub-panel into 4 pixels, which are numbered in clockwise order. Note that the ordering of the panels is arbitrary, but we choose the clockwise ordering here for clarity. assigned a contiguous block of indices to each sub-block of the image, and thus the corresponding embedding admits a decomposition of the form (4).
Below, we present Theorem (2), which can be used to obtain previews for any n = 2 k with 1 ≤ k < K.

C. Interpolation Operators
In order to study the relationship between the low and high resolution images, we will need prolongation/interpolation operators to convert between these two resolutions.
The prolongation operator maps a small n × n image into a large N × N image. It replaces each pixel in the lowresolution image with a δ × δ block of pixels. If the image has been vectorized in the block-wise fashion described above, the prolongation operator can be written in block form as where 1 δ 2 denotes a δ 2 ×1 column vector of 1's, and ⊗ denotes the Kronecker product.
The row-selector matrix and measurement vector can also be broken down into blocks. We can write where R i is a δ 2 × δ 2 row-selector sub-matrix, and b i contains a block of δ 2 measurements.

D. A Sum-To-One Transform
We now introduce a fast orthogonal transform that will be the building block of our sensing matrices. This transform has the property that each row of the transform matrix Sums To One, and thus we call it the STOne transform. It will be shown later that this property is essential for the existence of fast preview reconstruction methods.
Consider the following matrix stencil: It is clear by simple observation that this matrix is unitary (i.e. S T 4 S 4 = I 4 ), and its Eigenvalues are ±1. Furthermore, unlike the stencil for the standard Hadamard matrix, this stencil has the property that the rows of the matrix sum to 1.
We will use the matrix S 4 as a stencil to construct a new set of transform matrices as follows where ⊗ denotes the Kronecker product. We have the following result; Theorem 1: For all k ≥ 1, each row of the matrix S 4 k sums to 1. Also, every matrix S 4 k is unitary.
Proof: The summation result follows immediately by inspection. To prove the unitary claim, we simply use the Kronecker product identity The result follows by induction. Note that because the Kronecker product is associative, we can form arbitrary decompositions of S 4 k of the form for any between 1 and k.

E. Reconstructing Low Resolution Previews
In this section, we show how the sum-to-one transform can be used to obtain low-resolution previews. The construction works at any power-of-two resolution.
The low resolution preview is possible if our data satisfies the following simple properties: 1) The sensing matrix is of the form where R is a row-selector matrix, and S N 2 is the fast sum-to-one transform. 2) Every block, R i , of δ 2 diagonal entries of R contains at least one non-zero entry. 3) Every δ × δ patch of the image is mapped contiguously into the vector v. The will be true for any power-oftwo downsampling when the pixels are ordered using Algorithm 1. We show below that when the measurement operator has these two properties it is possible to efficiently recover lowresolution previews using a simple fast transform.
As discussed above, the low-resolution preview requires us to solve the equation When the measurements are taken using the sum-to-one transform, the solution to this equation is given explicitly by the following theorem. Theorem 2: Consider a row selector, R, a measurement operator of the form Φ = RS N 2 , and a prolongation operator P as described above. Suppose that images are represented as vectors in the block form (4).
If each sub-matrix R i contains exactly one non-zero entry, then the preview equation has a unique solution, which is given by whereb is an n 2 × 1 vector containing the known entries of b.
If each sub-matrix R i contains one or more non-zero entries, then the preview equation may be overdetermined, and the least squares solution is given by In other words,b i is the mean value of the known entries in b i .
Proof: The preview equation contains the product S N 2 P, which we can decompose using the Kronecker product definition of the sum-to-one transform: The up-sampling operator works by replacing every pixel in u n with a constant panel of size δ × δ, and has the form P = I n 2 ⊗ 1 δ 2 . We can thus write Now is when the sum-to-one property comes into play. The product S δ 2 1 δ 2 simply computes the row sums of the matrix S δ 2 , and so S δ 2 1 δ 2 = 1 δ 2 . This gives us Using this reduction of the transform and prolongation operators, the low-resolution preview equation (5) reduces to Note that the matrix (S n 2 ⊗1 δ 2 ) is formed by taking the matrix S n 2 and copying each of its rows δ 2 times. If each of the R i contain only a single non-zero entry, then the operator R simply selects out a single copy of each row. In this case, it follows that the preview equation reduces to ΦP u n = S n 2 u n =b.
The solution to this equation is u n = S −1 n 2b = S n 2b. If we allow the R i to contain more than one non-zero element, then we must seek the least squares solution. In this case, consider the sum-of-squares error function: where S n 2 ,i denotes the ith row of S n 2 . Observe now that where C i is a constant that depends only on b. It follows that the least-squares energy (6) can be written where C is a constant,R i = r i , andb i = 1 ri δ 2 γ=1 b i,γ . This energy is minimized when we choose u n to satisfy the equation S n 2 u =b.
Theorem 2 shows that under-sampled high resolution STOne coefficients can be re-binned into a complete set of low resolution STOne transform coefficients. These low-resolution coefficients are then converted into an image using a single fast transform. This process is depicted in Figure 3.

F. Design of the Measurement Sequence
In this section, we propose a "structured random" measurement sequence that allows for previews to be obtained at any resolution or time. It is clear from the discussion above that it is desirable to form the measurement operator by subsampling rows of S N . However, the order in which these rows are sampled is of practical significance, and must be carefully chosen if we are to reconstruct previews at arbitrary resolutions. We demonstrate this by considering the following scenarios.
Suppose that we have a sequence of measurements {b ki } taken using row indices K = {k i } of the matrix S N 2 . After measurement b i is acquired, we wish to obtain an n×n preview using only the most recent n 2 measurements. If we break the set of rows of S 2 N into n 2 groups, then we know from Theorem 2 that the preview exists only if we have sampled a measurement from each group. It follows that each of latest n 2 measurements must lie in a unique group.
After measurement b i+1 is acquired, the measurement window is shifted forward. Since we want to have previews available at any time, it must still be true that the most recent n 2 measurements lie in unique groups even after this shift. Now, suppose that because of fast moving objects in the image, we decide we want a "faster" preview with a shorter acquisition window. We now need an n × n preview with n < n. When we sample the most recent (n ) 2 data and redistribute the row space into (n ) 2 groups, each of the data in this new window must lie in a unique group.
Clearly, the measurement sequence must be carefully constructed to allow for this high level of flexibility. The measurement sequence must have the property that, for any index i and resolution n, if we break the row space into n 2 groups, the measurements b i−n 2 +1 through b i all lie in separate groups. Such an ordering is produced by the recursive process listed in Algorithm 2. Let |K| be the length of the list K.

5:
if |K| = 1 then Randomly assign the names K 1 , K 2 , K 3 , and K 4 to sub-lists The top level input to the algorithm is a linearly ordered sequence of row indices, K = {k i } = {1, 2, · · · N 2 }. At each level of the recursion, the list of indices is broken evenly into four parts, , and each group is randomly assigned a unique name from {K 1 , K 2 , K 3 , K 4 }. Each of the 4 groups is then reordered by recursively calling the reordering algorithm. Once each group has been reordered, they are recombined into a single sequence by interleaving the indices -i.e. the new sequence contains the first entry of each list, followed by the second entry of each list, etc.
Note that Algorithm 2 is non-deterministic because the index groups formed at each level are randomly permuted. Because of these random permutations, the resulting ordering K exhibits a high degree of randomness suitable for compressive sensing.
Compressive data acquisition proceeds by obtaining a sequence of measurements denotes row k i of S N 2 , and the sequence K = {k i } is generated from Algorithm 2. If the number of data acquired exceeds N 2 , then we proceed by starting over with row k 0 , and proceeding as before. Any window of length n 2 will still contain exactly one element from each row group, even if the window contains the measurement where we looped back to k 0 .

IV. STATISTICAL ANALYSIS OF THE STONE PREVIEW
Suppose we break an N × N image into an n × n array of patches. In the corresponding low resolution preview, each pixel "represents" its corresponding patch in the full-resolution image. The question now arises: How accurately does the low resolution preview represent the high resolution image?
We can answer this question by looking at the statistics of the low resolution previews. When the row selector matrix is generated at random, the pixels in the preview can be interpreted as random variables. In this case, we can show that the expected value of each pixel equals the mean of the patch that it represents. Furthermore, the variation of each pixel about the mean is no worse than if we had chosen a pixel at random as a representative from each patch. To prove this, we need the following simple lemma: Lemma 1: The ith entry of S N v can be written It follows that M ean(e) = M ean(S N v − µ) = 0. The variation about the mean is given by where we have used the unitary nature of S N and sum to one property, which gives us the identity S N µ = µ. We now prove the statistical accuracy of the preview.
Theorem 3: Suppose we create an n × n preview from an N × N image. Divide the rows of S N 2 into n 2 groups. Generate the row selector matrix by choosing an entry uniformly at random from each group. Then the expected value of each pixel in the low resolution preview equals the mean of the corresponding image patch. The variance of each pixel about this mean equals the mean of the patch variances .
Proof: The STOne transform has the following decomposition: Let δ = N/n. Break the rows of S 4 K into n 2 groups, each of length δ 2 . The rth row block of S 4 K can then be written (using "Matlab notation") where r = i/δ 2 is the index of the row block of length δ 2 from which row i is drawn, S 4 K−k (r, :) denotes the rth row of S 4 K−k , and the transform S 4 k operates on a single δ × δ block of the image. The measurement taken from the ith block can be written: where r = i−δ 2 r is the index of the obtained measurement relative to the start of the block. Now, note that S 4 k (r i , :)v k = µ k + e The reconstructed preview is then Because S 4 K−k is unitary and the entries in η i are identically distributed, each entry in S 4 K−k η has the same variance as the entries of η, which is M ean(V ar(e r i j )).

A. Motivation
First-generation compressive imaging exploits the compressibility of natural scenes in the spatial domain. However, it is well-known that video is far more compressible than 2dimensional images. By exploiting this high level of compressibility, we can sample moving scenes at low rates without compromising reconstruction accuracy.
Rather than attempt to exploit the precise pixel-to-pixel matching between images, we propose a model that allows adjacent images to share information without the need for an exact mapping (such as that obtained by optical flow). The model, which we call 3DTV, assumes not only that images have small total variation in the spatial domain but also that each pixel generates an intensity curve that is sparse in time.
The 3DTV model is motivated by the following observation: Videos with sparse gradient in the spatial domain also have sparse gradient in time. TV-based image processing represents images with piecewise constant approximations. Assuming piecewise constant image features, the intensity of a pixel only changes when it is crossed by a boundary. As a result, applying TV in the spatial domain naturally leads to videos that have small TV in time. This is demonstrated in Figure 4.
The 3DTV model has several other advantages. First, stationary objects under stable illumination conditions produce constant pixel values, and hence are extremely sparse in the time domain. More importantly, the 3DTV model enforces "temporal consistency" of video frames; stationary objects appear the same in adjacent frames, and the flickering/distortion associated with frame-by-frame reconstruction is eliminated.

B. Video Reconstruction From Measurement Streams
In practice, multiplexing cameras acquire one compressive measurement at a time. Because data is being generated continuously and the scene is moving continuously in time, there is no "natural" way to break the acquired data into separate images. For this reason, it makes sense to interpret the data as a "stream" -an infinite sequence of compressive measurements denoted by To reconstruct this stream, it must be artificially broken into sets, each of which forms the measurement data for a frame. Such a decomposition can be represented graphically as follows: where b f denotes the measurement data used to reconstruct the f th frame. In practice the data windows for each frame may overlap, or be different widths.
Suppose we have collected enough data to reconstruct F frames, denoted {u f } F f =1 . The frames can then be simultaneously reconstructed using a variational problem of the form (2) with where Φ f represents the measurement operator for each individual frame.

C. Mathematical Formulation
The 3DTV operator measures the Total-Variation of the video in both the space and time dimension. The conventional Total-Variation semi-norm of a single frame u f is the absolute sum of the gradients: The 3DTV operator generalizes this to the space and time dimensions We can reconstruct an individual frame using the variational model where R f and b f denote the rows selector and data for frame u f . The 3DTV model extends conventional TV-based compressed sensing using the operator (8). This model model can be expressed in a form similar to (9) by stacking the frames into a single vector as in (7). We define combined row-selector and STOne transforms for all frames using the notation Using this notation, the 3DTV model can be expressed concisely as Note that just as in the single-frame case, S is an orthogonal matrix and R is diagonal.

VI. NUMERICAL METHODS FOR COMPRESSIVE RECOVERY
In this section, we discuss efficient numerical methods for image recovery. There are many splitting methods that are capable of solving (10), however not all splitting methods are capable of exploiting the unique mathematical structure of the problem. In particular, some methods require the solution of large systems using conjugate gradient sub-steps, which can be inefficient. We focus on the Primal Dual Hybrid Gradient (PDHG) methods. Because the STOne transform is self-adjoint, every step of the PDHG scheme can be written explicitly, making this type of solver efficient.

A. PDHG
Primal-Dual Hybrid Gradients (PDHG) is a scheme for solving minimax problems of the form max y min x f (x) + Ax, y − g(y) where f, g are convex functions and A ∈ R m,n is a matrix. The algorithm was first introduced in [15], and later in [16]. Rigorous convergence results are presented in [17]. Practical implementations of the method are discussed in [18].
The scheme treats the terms f and g separately, which allows the individual structure of each term to be exploited. The PDHG method in its simplest form is listed in Algorithm 3.

Algorithm 3 PDHG
Require: x 0 ∈ R N , y 0 ∈ R m , τ > 0, σ > 0 1: for k = 0, 1, . . . do 2:x k+1 = x k − τ A T y k 3: y k+1 = arg max y −g(y) − 1 2σ y −ŷ k+1 2 7: end for Algorithm 3 can be interpreted as alternately minimizing for x and then maximizing for y using a forward-backward technique. These minimization/maximization steps are controlled by two stepsize parameters, τ and σ. The method converges as long as the stepsizes satisfy τ σ < A T A . However the choice of τ and σ greatly effects the convergence rate. For this reason, we use the adaptive variant of PDHG presented in [18] which automatically tunes these parameters to optimize convergence for each problem instance.

B. PDHG for Compressive Video
In this section, we will customize PDHG to solve (10). We begin by noting that where C = {p| − 1 ≤ p i ≤ 1} denotes the ∞ unit ball. Using this principle, we can write (10) as the saddle-point problem where 1 C (p) denotes the characteristic function of the set C, which is infinite for values of p outside of C and zero otherwise.

Algorithm 4 PDHG Compressive Reconstruction
Require: Note that only steps 3 and 6 of Algorithm 4 are implicit. The advantage of the PDHG approach (as opposed to e.g. the Alternating Direction Method of Multipliers) is that all implicit steps have simple analytical solutions.
Step 3 of Algorithm 4 in simply the projection ofp k+1 onto the ∞ unit ball. This projection is given by where max{·} and min{·} denote the element-wise minimum and maximum operators.
Step 3 of Algorithm 4 is the quadratic minimization problem The optimality condition for this problem is If we note that S and R are symmetric, R 2 = R, and we write I = S 2 (because S is symmetric and orthogonal) we get S(µR + 1 τ I)Su k+1 = µSRb + 1 τû k+1 .
Since (µR + 1 τ I) is an easily invertible diagonal matrix, we can now write the solution to the quadratic program explicitly as Note that (12) can be evaluated using only 2 fast STOne transforms.

A. Fast Object Recognition and the Smashed Filter
Numerous methods have been proposed to performing semantic image analysis in the compressive domain. Various semantic tasks have been proposed including object recognition [19], human pose detection [20], background subtraction [21] and activity recognition [22]. These methods ascertain the content of images without a full compressive reconstruction. Because these methods do not have access to an actual image representation, they frequently suffer from lower accuracy than classifiers applied directly to image data, and can themselves be computationally burdensome.
When sensing is done in an MSS basis, compressive data can be quickly transformed into the image domain for semantic analysis rather than working in the compressive domain. This not only allows for high accuracy classifiers, but also can significantly reduce the computational burden of analysis.
To demonstrate this, we will consider the case of object recognition using the "Smashed Filter" [19]. This simple filter compares compressive measurements to a catalog of hypothesis images and attempts to find matches. Let {H i } denote the set of hypothesis images, and H i (x) denote an image translated (shifted in the horizontal and vertical directions) by x ∈ R 2 . Suppose we observe a scene s by obtaining compressive data of the form b = Φs. The smashed filter analyzes a scene by evaluating min x,Hi In plain words, the smashed filter compares the measurement vector against the transforms of every hypothesis image in every possible pose until a good 2 match is found. The primary drawback of this simple filter is computational cost. The objective function (13) must be explicitly evaluated for every pose of each test image. The authors of [19] suggest limiting this search to horizontal and vertical shifts of no more than 16 pixels in order to keep runtime within reason.
The complexity and power of such a search can be dramatically improved using MSS measurements. Suppose we obtain measurements of the form b = RS N s. We can then re-bin the measurements using Theorem 2, and write them asb = S ns , whereb is a dense vector of measurements ands is a lower resolution preview of the scene. Applying Theorem 2 to the whereH i is representation of image H i at resolution n.
The expression on the right of (14) shows that applying the smashed filter in the compressive domain is equivalent to performing classification in the image domain using the previews! Furthermore, the values of S ns − S nHi (x) 2 for all possible translations can be computed in O(N log N ) using a Fourier transform convolution algorithm, which is a substantial complexity reduction from the original method.

B. Enhanced Video Reconstruction Schemes
Several authors propose compressive video reconstruction schemes that benefit from preview reconstruction. The basic concept of these methods is to use an initial low-quality reconstruction to obtain motion estimates. These motion estimates Preview 5% Sampling 1% Sampling Fig. 6. Reconstruction of high speed video from under-sampled data. A frame from the original full resolution video is displayed on the left. A 64 × 64 preview generated from a stream with 6.25% sampling is also shown. Compressive reconstructions using 1% and 6.25% sampling are shown on the right.
are then used to build sparsity models that act in the time domain and are used for final video reconstruction. Such methods include the results of Wakin [10] and Sankaranarayanan [11] which rely on optical flow mapping as well as the iterative method of Asif [12].
The methods proposed in [10] and [11] use a Dual-Scale sensing basis that allows for the reconstruction of previews. However, unlike the MSS framework proposed here, these matrices do not admit a fast transform. The matrices proposed in [11] for example require O(N 2 ) operations to perform a complete transform. The proposed MSS matrices open the door for a variety of preview-based video reconstruction methods using fast O(N log N ) transforms.

VIII. NUMERICAL EXPERIMENTS A. Preview Generation
We demonstrate preview generation using a simple test image. The original image dimensions are 1024×1024. An MSS measurement operator is generated using the methods described in Section III. The image is embedded into a vector using the pixel ordering generated by Algorithm 1. Transform coefficients are sampled in a structured random order generated by Algorithm 2.
We reconstruct previews by under-sampling the STOne coefficients, re-binning the results into a complete set of low resolution coefficients, and reconstructing using a single lowresolution STOne transform. Two cases are considered. In the first case we have the original noise-free image. In the second case, we add a white Gaussian noise with standard deviation equal to 10% of the peak signal (SNR = 20 Db). Reconstructions are performed at 256 × 256, 128 × 128 and 64 × 64 resolutions. Results are shown in Figure 5.
This example demonstrates the flexibility of MSS sensing -the preview resolution can be adapted to the number of available measurements. The 64 × 64 reconstructions are obtained using only 64 2 out of 1024 2 measurements (less than 0.4% sampling).

B. Simulated Video Reconstruction
To test our new image reconstruction framework, we use a test video provided by Mitsubishi Electric Research laboratories (MERL). The video was acquired using a high-speed camera operating at 200 frames per second at a resolution of 256×256 pixels. A measurement stream was generated by applying the STOne transform to each frame, and then selecting coefficients from this transform. Coefficients were sampled from the video at a rate of 30 kilohertz, which is comparable to the operation rate of currently available DMD's. The coefficients were selected in the order generated by Algorithm 2, and pixels were mapped into a vector with nested dissection ordering. Thus, previews are available at any power-of-two resolution, and can be computed using a simple inverse STOne transform. At the same time, the data acquired are appropriate for compressive reconstruction.
The goal is to reconstruct 20 frames of video from undersampled measurements. We measure the sampling rate as the percentage of measured coefficients per frame. For example, at the 1% sampling rate, the total number of samples is 200 × 256 2 × 0.01. Results of compressive reconstructions at two different sampling rates are shown in Figure 6.
Note that non-compressive reconstructions require a lot of data (one measurement per pixel), and are therefore subject to the motion aliasing problems described in [9]. By using the compressive reconstruction, we obtain high-resolution images from a small amount of data, yielding much better temporal resolution and thus less aliasing. By avoiding the motion aliasing predicted by the classical analysis, the compressive reconstruction "beats" the Nyquist sampling limit. Figure 7 considers 3 different reconstructions at the same sampling rate. First, a full-resolution reconstruction is created using a complete set of STOne samples. Because a long measurement interval is needed to acquire this much data, motion aliasing is severe. When a preview is constructed using a smaller number of samples and large pixels, motion aliasing is eliminated at the cost of resolution loss. When the compressive/iterative reconstruction is used, the same undersampled measurements reveal high-resolution details.

C. Single-Pixel Video
To demonstrate the STOne transform using real data, we obtained measurements using a laboratory setup. The Rice single-pixel camera [1] is depicted in Figure 8. The image of the target scene is focused by a lens onto a DMD. STOne transform patterns were loaded one-at-a-time onto the DMD in an order determined by Algorithm 2. The DMD removed pixels with STOne coefficient −1 and reflects pixels with coefficient +1 towards a mirror. A focusing lens then converges

Original
Complete Transform Preview Compressive Fig. 7. Detailed views of reconstructions. On the left is a frame from the original video showing the part of the image we will be using for comparisons. A full-resolution reconstruction using a complete set of transform coefficients is show beside it. Motion aliasing is present because of object motion over a long data acquisition time. A preview from 5% sampling is also shown. Motion aliasing has been dramatically reduced by shortening the data acquisition time at the cost of lower resolution. On the right is displayed a compressive reconstruction using the same 5% sampling a the preview. This reconstruction simultaneously achieves high resolution and fast acquisition. the selected pixels onto a single detector which generates a measurement. Data was generated from two scenes at two different resolutions. The "car" scene was acquired using 256×256 STOne patterns, and the "hand" scene was acquired using 128 × 128 patterns. For both scenes, previews were reconstructed at 64 × 64 resolution. Full-resolution compressive reconstructions were also performed. Frames from the resulting reconstructions are displayed in Figure 9. Both the previews and compressive reconstructions were generated using the same measurements. Note the higher degree of detail visible in the compressive reconstructions.

IX. CONCLUSION
Compressed sensing creates dramatic tradeoffs between reconstruction accuracy and reconstruction time. While compressive schemes allow high-resolution reconstructions from under-sampled data, the computational burden of these methods prevents their use on portable embedded devices. The STOne transform enables immediate reconstruction of compressive data at Nyquist rates. The same data can then be "enhanced" using compressive schemes that leverage sparsity to "beat" the Nyquist limit.
The multi-resolution capabilities of the STOne transform are paramount for video applications, where data resources are bound by time constraints. The limited sampling rate of compressive devices leads to "smearing" and motion aliasing when sampling high-resolution images at Nyquist rates. We are left with two options: either slash resolution to decrease data requirements, or use compressive methods that prohibit real-time reconstruction. The STOne transform offers the best of both worlds: immediate online reconstructions with highresolution compressive enhancement.