Slivr Tutorial
959 words, 15 imagesHere’s a panoramic photograph. It’s a bit strange because some of the lines aren’t straight, or are curved in ways you wouldn’t even expect from a wide-angle lens, or in most panoramic photos you’ve seen before.
Here’s another one, where everything’s gone mad.
These pictures were created using a technique which I’ve called “Slivr” (formerly Videorama, but that title was overloaded).
The technique involves “scanning” a scene, by taking a video which pans across it, then converting the resulting video file into a wide still picture by taking a narrow slice from each frame and glueing these together into one image. In effect we are modelling what happened in analogue “slit scan” panoramic cameras, which would draw a strip of film past a slit, while moving the lens across the scene.
I’ve written some more on the background of strip scan photography — you may have come from there.
This is a tutorial on how to do it.
Software
This tutorial uses two free applications for Windows.
- VirtualDub, an excellent video processing tool for Windows.
- ImageMagick, a useful command line image processing tool for many platforms, including Windows.
Install these before trying out these instructions.
Taking the video
The movie mode on most digital camera is suitable for experimenting with this technique. Hold the camera in portrait orientation (i.e. on its side) and point it at the left hand side of the scene you want to capture. Start filming, and slowly and evenly pan to the right. Later on, you can experiment with less even movements, but for now try to keep it even.
(Aside: we take the video in portrait orientation because the width of each frame is not important to us — we’ll be throwing most of it away. The taller the frames are, the better, because that gives us the greatest vertical resolution in the finished picture.)
I recommend starting with about 15 seconds of footage for every 45 degrees you film: at 15 frames per second (typical on a stills camera’s movie mode), this gives you 225 frames. With experience, you’ll get a feel for the right speed to use for a subject.
Processing the video into strips
Our next job is to split the video into image files, each one a tall, narrow slice. VirtualDub can do this in one step.
Make a folder for this project, and save the video to this folder. I’m using “C:\pano\office\”.

Launch VirtualDub, and open your video with “File-> Open video file…”.
You’ll see the first frame of your video, twice:

The left hand image is the video you’ve loaded. The right hand image is the video as it will be output when VirtualDub has processed it. You can “scrub” through the video frames using the slider at the bottom.
The first thing we need to do is rotate the video so that it pans left to right, as we filmed it.
Choose “Video->Filters”. If this is greyed out, then choose “Video->Full processing mode” first. This brings up a list of filters — it should be empty for now.

Click “Add”, and select “Rotate” from the list of filters, and click OK.

The rotation you need will depend on how you held the camera.

Click OK on all the dialogues until you’re back to the main window. You may need to move the scrub slider to see the result, which should be that the right hand image is the right way up.

Next, we need to crop the frames. There is no dedicated filter to do this, but VirtualDub allows cropping as a side-effect of each filter.
Choose “Video->Filters” again, and click on the rotate filter you just set up.

Use the Filter input cropping dialogue to set the crop. This crop happens before the rotation, so make a wide, narrow bar. Either drag the top and bottom of the picture, or use the “Y1 Offset” and “Y2 Offset” fields. Either way, you can work out how big your strips are by subtracting “Y1 Offset” and “Y2 Offset” from the original height of the frame. E.g. if your original is 320×240, then Y1=119 and Y2=119 leaves you with a 2 pixel strip, which is a good value to choose as a starting point.

The position, as well as the width, of the crop will affect the final result. Experiment.
Click as many “OK”s as you need to get back to the main screen. The right hand image should now be tall and thin, as the slices we want to create will be.

We’re almost finished with VirtualDub — all that remains is to tell it to output our frames. Choose “File->Save image sequence…”
In the save dialogue, set “Minimum number of digits in name” to enough digits that the first and last frame filenames are the same length. This ensures that when the slices are joined into a panorama, they go in the right order.

Leaving the directory field blank causes VirtualDub to save to the same directory as the original video file. TARGA is a suitable output format, for no other reason that that it’s the default.
Click OK, and watch your project directory fill up with TARGA files (the TARGA icon will vary, depending on what graphics applications you have installed).

Joining the slices
To join the slices, we use the “convert” command from ImageMagick.
Open an MSDOS prompt, “CD” to your project directory, and issue the command “convert *.tga +append pano.jpg”

(Aside: look how much easier command lines are to document than GUIs)
Finished!
That’s it. View pano.jpg in your favourite viewer. Mine looks like this (only bigger):

You might find that yours isn’t quite what you wanted. Maybe it’s wider or narrower than you wanted. Maybe some part of it isn’t the shape you expected. Experiment with wider or narrower slices, taken from different parts of the frame, or resize your image in your favourite image editor. Have fun, and consider posting your best work to Flickr with the “slivr” tag.


December 28th, 2005 at 19:20
John,
I had a few minutes to look over your work. Impressive in terms of simplicity and approach and solution … and … I will share with my students when I have a chance.
andy
January 19th, 2006 at 14:01
how about “panoramic videography”?
March 1st, 2006 at 16:11
how about
Esher
or other plays on the most obvious visual connection with yr software..
August 8th, 2006 at 22:59
slivr
August 11th, 2006 at 10:48
“Slivr” — I like it! In fact, I’m going to use it. Thanks Jonah.
August 11th, 2006 at 10:57
[...] On my Videorama tutorial I solicited better names for the technique — since “videorama” has been used in many other context, most notably as a publisher of porn DVDs. [...]
August 13th, 2006 at 15:56
Just getting into the digital slit-scan thing for a more scientific application but would like some advice on Mac. based processing software. The liks provided here are directed toward Windows operation. Anyone have advice?
Thanks
August 14th, 2006 at 09:53
I like Slivr as well. Thank you for putting together this tutorial. It is a wonderfully simple excercise. I wonder what methods you have explored for steadying the camera as it goes through it’s various motions?
August 15th, 2006 at 09:21
Jamie, I believe Quicktime Pro allows you to save as an image sequence, which is almost all we use VirtualDub for in Slivr. If Quicktime can’t crop into narrow strips too, then you can always coax ImageMagick into doing that part for you.
ImageMagick is portable, and available for OSX as part of Fink.
Jason. So far I do everything freehand. I did have a go at some tripod mounted pans, and found them to be a little uninteresting — I see the wobbliness as an asset. Sometimes if it’s windy the camera movement is excessive. This picture, for example, would benefit from straighter lines.
There are some image stabilising filters out there which will try and rotate/crop/zoom your video to steady it. It might be interesting to use the result of one of these in a slivr.
November 2nd, 2006 at 05:42
http://stereo.jpn.org/eng/stphmkr/help/file_27.htm
November 2nd, 2006 at 12:09
Gregr: cool!
November 9th, 2006 at 19:54
Thanks for the tutorial, i am going to try this
Danny
November 16th, 2006 at 01:01
any luck on the mac side? I am interested to know the results