Stereo Spin version 02.02
The Stereo Spin program is used to display stereo images from a spinning video from a Microsoft DirectShow-compatible video file or from a set of TIFF, PPM, PGM, BMP files. It can also read raw, uncompressed 8-bit video files. The program currently runs only on Windows, but it uses the portable openGL library for rendering, the portable Tcl/Tk for user interface control, and the portable ImageMagick package for reading images.
Downloading and installing the program
The program installs itself by default into C:\Program Files\CISMM, and puts its running shortcuts into Start Menu/All Programs/CISMM/Stereo Spin.
Cost of Use
The development, dissemination, and support of this program is paid for by the National Institutes of Health National Institute for Biomedical Imaging and Bioengineering through its National Research Resource in Computer-Integrated Systems for Microscopy and Manipulation at the University of North Carolina at Chapel Hill. This program is distributed without charge, subject to the following terms:
- Acknowledgement in any publication, written, videotaped, or otherwise produced, that results from using this program. The acknowledgement should credit: CISMM at UNC-CH, supported by the NIH NIBIB (NIH 5-P41-RR02170).
- Furnish a reference to (and preferably a copy of) any publication, including videotape, that you produce and disseminate outside your group using our program. These should be addressed to: email@example.com; Russell M. Taylor II, Department of Computer Science, Sitterson Hall,University of North Carolina at Chapel Hill, Chapel Hill, NC 27599-3175.
Running the program
The program is run by dragging a video file or image file onto the desktop icon that was created when the program was installed. To select a stack of image files that are numbered consecutively, drag any one of the files onto the icon. It can also be run by selecting it from Start Menu/All Programs/CISMM/Stereo Spin. If you run the program directly by double-clicking on the icon, it will ask for a video or image file (AVI, TIF, or BMP, PPM, raw) that it should open.
Two movies: If you have two different movies, one for the left eye and one for the right, select both and drag them onto the desktop icon. If you have two file sets, select one file from each and drag them both onto the desktop icon.
Required Hardware and drivers
Stereo Spin uses OpenGL stereo, and requires a video card and driver set that supports this. For nVidia graphics, this requires a Quadro-type card with an external stereo-sync connector to work with the glasses (the DirectX/GeForce game-type stereo does not work with this program). For other manufacturers, check their specifications and drivers to ensure that they support OpenGL stereo.
If you do not have hardware stereo that works with OpenGL, use the -cross command-line argument to have it use cross-eyed stereo.
Required Video Formats
This program assumes that the video file being read in is a 360-degree spinning-viewpoint movie, where there is an even separation in angles between frames in the movie. The last frame in the movie should not be the same as the first frame, but rather should have the same angle separation from the first frame as each frame in the movie has from its neighbor. The separation between frames does not have to be 1 degree, so long as it is the same between each frame; thus the number of frames does not have to be 360. Movies that play as a continuous spinning loop without jerkiness when shown in a repeating mode in a media browser should work fine.
The movie can spin either to the left or to the right. The program starts expecting movies where the object spins to the left, but the L and R keys can be used to switch direction as described below.
Non-looped video: It is also possible to use Stereo Spin to show videos that do not loop; for example, images taken by a camera that has been translated along a rail to produce views that can be fused into stereo but which do not form a cycle — the last image cannot be fused with the first. In this case, uncheck the loop checkbox to prevent the video from running past the end. Optionally, this can be done using the -noloop command-line argument when the program is started.
When the program is run and a file is selected, three windows will appear. The control panel named tk that appears on the top when the program is run (shown here to the right) has instructions for using the keyboard and mouse to control the view, and a button to quit the program. The image window that appears below it shows the frames as they are being loaded from the video file and then a (by default) spinning stereo view of the file.
While the frames from the video are being loaded, the dialog box to the right will appear (and each frame will be displayed as it is loaded). If you want to interrupt the loading and quit the program, simply press the Quit button on this dialog box. Once the entire video file has been loaded, this box will disappear.
If hardware and drivers supporting stereo are operating on your compuiter, you should be able to turn on and put on the stereo display glasses and view the images in stereo.
If the program cannot display stereo on this computer, a warning dialog box will appear to the right of the main tk window to let you know that it is not available, and that cross-eyed stereo will be used. In this case, the window will be drawn twice as wide, with the left-eye view on the right side and the right-eye view on the left.
If you see these two views, you can get the stereo effect by crossing your eyes, so that your right eye looks at the left image and vice-versa. This will probably be easier to do if you use the space bar to stop animation while you are fusing the images. You might also be helped by placing your finger halfway between the screen and your eyes, with its tip just below the image bottom; this acts as an aid to crossing your eyes. Then refocus on the screen and lower your finger to get the stereo effect. When it works, you should perceive a single 3D stereo image in the middle of your field of view, with two copies (which you should ignore) off to the sides.
The left mouse button can be used to control the viewpoint. Press the button and then move either left or right to spin the stereo view around the object. If the view seems to move in the wrong direction and the stereo seems wrong, use the R key to switch the direction of motion away from the default.
The stereo window by default shows up at the same size as the original movie. You can resize the window however you like, and the movie’s size will be adjusted.
The key commands for the program are only available when the 3D window has focus; click on its title bar to enable them if focus is lost. The commands are not case-sensitive, either shifted or unshifted characters will work. The program recogizes the following commands:
- R: Right-spinning movie. The default for the program is a left-spinning movie. If stereo looks backwards and the mouse and keyboard commands are not working in the right direction, use this to fix it. When two movies are loaded, one for each eye, this assumes that the right one is listed first.
- L: Left-spinning movie, the default. When two movies are loaded, one for each eye, this assumes that the left one is listed first.
- <: Spin the movie more towards the left. If it is spinning to the right, it slows it down. If it is stopped, it starts it spinning to the left. if it is spinning to the left, it spins faster.
- >: Spin the movie more towards the right. If it is spinning to the left, it slows it down. If it is stopped, it starts it spinning to the right. if it is spinning to the right, it spins faster.
- space: The spacebar stops motion.
- +: Increase stereo disparity. This makes the separation between left- and right-eye views larger, making the image pop out of the screen more. This will also make it more difficult to fuse the images into a 3D percept. The default is a single frame (the minimum). This has no effect if two different movies were loaded for the left and right eyes.
- –: Decrease stereo disparity. This makes the separation between left- and right-eye views smaller, making the image pop out of the screen less. This will also make it easier to fuse the images into a 3D percept. The default is a single frame (the minimum). This has no effect if two different movies were loaded for the left and right eyes.
- Q: Quits the program.
- Avoids crash with display of two separate videos on hardware OpenGL.
- Fixes a bug with display of two separate videos on hardware OpenGL.
- This version can open to independent movies: one for the right eye and one for the left. This is done by dropping both movies onto the desktop icon.
- The code to detect whether hardware stereo was available did not work, and it seems to be impossible when using Glut to do this, so this version has a command-line argument that tells whether to run with hardware stereo or cross-eyed stereo.
- Lets the object spin more slowly than 1 frame per second, which was too fast for some objects.
- Installer added an example spin and example stereo pair.
- Enables display of non-looped videos.
- Properly resizes in cross-eyed stereo mode.
- When hardware stereo is not available, displays cross-eyed stereo..
- Original release version with basic funcionality. Ability to select left/right spinning images, move through the video with the mouse, adjust the disparity, and cause the movie to spin in either direction using keyboard shortcuts.