Slit Scan ImagesWritten by Paul Bourke
There are a number of methods by which time and space can be encoded in a single image. Historically one method of achieving this was the multiple exposure, multiple time points overlaid in one image and facilitated by current digital technology where images can be variably added together without the constraints of film.
Multiple exposure, 220 images, 5 seconds apart, Mosman Park, Perth
Another method possible in the digital era is the chronopanorama where an isolated object at different times and at different spatial positions are embedded in an otherwise self consistent panorama. In what follows another approach is outlined, here single rows or columns from frames (typically from a movie) are combined into a single image. This has parallels to slit cameras, also sometimes used for creating panoramas, hence the name.
The general algorithm is straightforward, vertical or horizontal strips from a series of images (generally sequential frames from a movie) are laid adjacent to each other in the output slit-scan image. Variations include: the slit may be of variable width, frames may be skipped, and one may vary the row or column used across the input images. The output image can be considered to vary horizontally (or vertically) in time.Vertical slits
Example 1: Stationary camera.
While not a particularly interesting example, it does serve to illustrate some of the features of such images. Allowing one to think about how to film in order to create more engaging slit-scan images.
Example 2: Linearly moving camera.
The following examples is from a camera pointing perpendicular to the direction of travel and taking vertical slits. If the camera were moving perfectly straight then this would result in a vertical perspective but horizontally orthographic projection, assuming also the speed was correct. In reality, and what makes these images interesting, is the vertical camera movement that shifts the horizon and change in speed that stretches space horizontally. An interesting feature of this type of image is that a stereoscopic pair can be created by choosing two horizontally offset vertical slits.
Slit width = 1, Wellington St park, East Perth
Adjusting the slit width has the effect of providing more continuity. This can be at the expense of introducing a sawtooth effect arising from features that ramp across the slit width, this can be seen in example 1 in the 20 pixel wide slit (inset image bottom right).
Utility to implement simple forward mapping has been developed, standard UNIX command line, as follows. The code to do this is straightforward, the images (individual frame from a movie) can be read one at a time and the appropriate row or column set extracted. The final image size can be determined at the outset, the only slightly tricky thing is dealing with images that may be greater than 32K pixels which is not dealt with by all image formats.
Usage: slitscan [options] nstart nstop mask Options: -col choose columns (default: rows) -w n width of slit (default: 1) -l n line to extract (default: central) -s n skip n frames (default: 1) -o s output file name (default: created internally)
Note that forward mappings have limitations, for example only integer sets of rows or columns can be extracted, there is no antialiasing, and without some difficulty one cannot extract arbitrary diagonal lines or other curves.
These can be overcome by performing a reverse lookup, that is, one determines the best sample pixel from the set of input images for every point in the output image. This is the usual method by which image transformations are performed, it ensures no gaps in the output image which could arise from more complicated extraction schemes than just rows and columns. It also allows trivial implementation of supersampling antialiasing. An important implementation difference is that now one cannot read the input images in sequence because one does not know in advance which image the next pixel may come from. Since the whole image collection cannot usually be expected to reside in memory, this implementation requires a image loading/unloading management scheme, keeping images in memory if possible but releasing them and loading in new images as required.
Usage: reverseslitscan [options] n1 n2 mask Options: -wh w h dimension of the output image (default: 1024 1024) -v1 n variable 1 for modes (default: 0.5) -v2 n variable 2 for modes (default: 0) -m n image mode (default: 0) 0 = columns, v1 is column 1 = rows, v1 is the row 2 = column angle, v1 is column top, v2 is horizontal offset 3 = row angle, v1 is row, v2 is vertical offset -a n antialias level (default: 1)
St George Terrace, Perth CBD
A variation is to scan the row or column across the image. This often leads to more interesting results for stationary cameras and results in increased spatial coherence.
Fireworks, Perth Australia day 2015
Sunrise on Big Pigeon Island
Contribution by David Carson
Update April 2016
Added the ability to extract pixels from every n'th frame.
Usage: slitscan [options] nstart nstop mask Options: -col extract columns (default) -row extract rows -w n width of extracted slit (default: 1) -l n slit row or column to extract (default: central) -s n image skip (default: 1) -o s output file name (default: created internally)