Search sheldonbrown.com and sheldonbrown.org
This article is one of a series on shooting video from a bicycle. Much of this article is applicable to other video shoots where camera shake is an issue.
Roads and paths can be bumpy, and off-road riding is even bumpier (though some potholed streets and root-heaved paths compete rather well...). Your head nods with each bump, especially if you ride in a racing position that hangs your head low.
Bumps cause three common problems with video:
Bumpy riding surfaces don't disturb your eyesight much – the sense of balance and of body position steady your direction of view. But, when you are looking at an image on a screen, your eyes do not have this assistance, and nothing outside the image on the screen is shaking.
Shake during exposure of the image blurs the picture. This can be avoided by steadying the camera or by one kind of in-camera image stabilization..
Another common problem resulting from shake is geometric distortion due to the “rolling shutter” effect in many video cameras: the image is not exposed all at the same time, but rather, it is scanned from top to bottom. If the camera moves downward during the scan, the image appears squashed; if upward, stretched and if sideways, skewed. Rapid vibration makes for especially disturbing distortions – entire landscapes may appear to be made of jello.
There are several ways to reduce these problems. The classic solution is to mount the camera on a tripod which rests solidly on the ground, or to have it roll on smooth tracks – but you can't very well do that when riding a bicycle.
Rising off the saddle when riding over bumps can spare your body, and steady a video too, with a helmet-mounted camera.
The heavier the camera, the looser its attachment and the higer it sitts off the helmet, the more it will tend to shake. I like my GoPro camera very much but when mounted on a helmet it sits high, and the soft foam pads inside the helmet amplify head motion. I need to figure out a way to secure the helmet, or at least the camera, better -- perhaps with the kind of strap used inside construction workers' hard hats.
Surprisingly, mounting the camera directly to the bicycle can result in very little apparent shake, as long as the camera has a wide-angle len. The length of the bicycle's wheelbase and the rigidity of its frame avoid the nodding motion of a head-mounted camera. The camera must be rigidly mounted to the bicycle, though. A loose or flexible mount will amplify vibration.
Any camera mounted to the bicycle will lean with it in corners, and there are other bicycle motions which affect the image. These depend on how and where the camera is mounted.
While a forward-facing camera on the helmet turns with your head to look in the direction you are looking, a rearward-facing camera turns to point in some odd direction that doesn't make any sense. To get good use out of a helmet-mounted rearward-facing camera, you must become skilled in the use of a rear-view mirror, and remember not to turn your head, so you don't spoil the shot.
A rearward-facing camera mounted on the rear rack or seat post of the bicycle always looks directly rearward. This camera has a low angle of view, but that is usually not a problem unless you are riding in tight formation with another cyclist. Even then, the cyclist behind you could ride slightly off to one side so that the camera can see beyond. You might also possibly construct a scaffold to raise the rearward-facing camera closer to eye level.
A forward-facing camera mounted on the handlebar can have less shake than a head-mounted one, but it turns with the handlebar, so the image has a slight weaving motion as you balance the bicycle. The handlebar never turns very sharply, and so the camera will not look in the direction you turn your head – a real disadvantage. A camera could also be mounted to the frame of the bicycle or to a front rack, and then it won't weave.
Most helmet cameras have an extreme wide-angle lens, which takes in most of what you see with your eyes, and reduces the apparent amount of shake. There is a trade-off though: by making things look farther away, a wide-angle lens makes it look as though you are going faster than you are. For example, if a car is 50 feet away and a wide-angle lens makes it look 100 feet away, then it will appear to be approaching you at twice its actual speed. This can be misleading and disturbing.
Generally,the increased apparent speed is more disturbing with a forward-facing camera, and a somewhat narrower field of view is desirable – but this increases apparent shake. There are some tricks you can use to reduce the shake. Let's discuss those now.
A bicycle with soft tires and suspension helps. They may slow you a bit but again, on-bike video will usually make it look as though you are going faster than you really are. While suspension reduces discomfort and the likelihood of damage from hard hits, soft tires actually do more to reduce vibration.
Videographers often use “steadicam” accessories. One common kind uses a pivot so the camera can swivel and keep pointing in the same direction, even as the videographers' walking motions disturb the handholds. I don't know of any such device that is made for use with a helmet-mounted camera. That is unfortunate, because physically steadying the camera is a fine solution, which avoids blur as well as shake. I might try to make a steadicam device using the pivots from an old phonograph tonearm. The device would need springs and a damper to keep the camera steadily pointed in the right direction.
If you can't keep the camera steady, then there is image stabilization, either in the camera or in post-processing.
Many small digital still cameras and camcorders have optical or digital image stabilization. Optical image stabilization moves a part inside the lens. Digital image stabilization uses a motion sensor in the camera to reposition the image rectangle, and can be done either in the camera or in post-production. They have different advantages and disadvantages.
Optical image stabilization, like a steadicam accessory, can hold the image steady during exposure, and so can work extremely well for long exposures of still images when the camera is being handheld as steadily as possible. In my experience, optical image stabilization is less successful for rapid vibration and when the camera is panning. Optical image stabilization cannot look ahead in time, and so it may interpret intentional panning as shake – then jerk the panned image when the stabilization reaches the limit of its travel.
Digital image stabilization responds to a motion sensor in the camera or to a comparison between stored images. Digital image stabilization can't hold the image steady during exposure – only high shutter speed can prevent blur, then. Digital image stabilization can look ahead in time, and so, can discriminate between shake and panning. This can also in theory be done in the camera, but is typically done in post-production, taking advantage of the far greater processing power available in a high-end desktop or laptop computer.
An analog video image is generated by a single dot that scans across the camera's sensor and the display screen, in the same way you are reading this page: from left to right, on one line after the other from top to bottom. Because only one location in the image at a time is sensed by the camera and displayed on the screen, a single analog signal can transmit the image. This takes lots of bandwidth, because the dot must be able to change from light to dark and back hundreds of times on each line, and there are hundreds of lines in the image.
An image must have a flicker rate of 50 more times per second so you don't notice the flicker. In order to hold it down the bandwidth, analog TV uses interlaced scanning – odd-numbered lines in one scan,which lasts 1/50 or 1/60 second; even-numbered lines for the next scan. At a normal viewing distance, you don't notice the individual lines flickering, but the bandwidth is halved. All this was figured out around 1940, so TV channels wouldn't take up too much space in the radio spectrum.
Interlaced scanning poses a problem for image stabilization: because the even-numbered and odd-numbered lines are scanned at different times, image stabilization will produce a double image. Or, if the image stabilization works independently on each scan, the images will look jagged because they are composed only of every alternate line.
Digital video is commonly scanned progressively -- all in one sweep. Progressive scanning is much preferable when image stabilization will be used. Flicker is no longer a problem with digital storage because an image can be read out multiple times to a display that runs at a higher scanning rate. Many modern displays don't flicker anyway: each dot of the picture stays lit up until it is refreshed with new data.
If you point most cameras straight at a rectangular grid pattern, the lens will project an accurate, smaller version of that pattern on the film or digital target. The camera's field of view must be substantially less than 180 degrees wide, though, because at the extremes, the camera would be looking into the distance, and the film or target would have to be very wide to store the image.
A viewscreen usually doesn't cover as wide an angle as a wide-angle lens, and objects appear to get larger as they approach the edge of the image – an effect which makes panned shots look weird.
A fisheye lens can have a field of view of 180 degrees or more because it compresses the image nearer the edges. – but then, straight lines at either edge curve like parentheses. You see that with trees, lampposts and buildings in helmet-camera video.
A fisheye-lens image would look normal when projected with another fisheye lens onto on a concave, hemispherical viewscreen. In fact, that is exactly how Imax movies work – but sadly, technology lags and most of us still only have a flat screen at home.
Because of the compression of the image near the edge, objects don't get wider as they pan toward the edge. A fisheye image is actually less distracting than a rectilinear lens in a wide-angle panned shot, or a shot from a bicycle in motion. But the fisheye lens leads to a problem with image stabilization.
Even with an ordinary wide-angle lens, the change in size of objects in the image can pose a problem with image stabilization. A fisheye lens has a different problem. A straight line – for example, the horizon -- which passes through the center of a fisheye-lens image will appear straight. If camera shake makes the line pass above the center, it will appear to bend downward at the edges, and if below the center, upward. Because the extremes of the image are compressed, they don't move up and down as far as the middle – and similarly for vertical lines, or lines at any angle .
Image stabilization software generally averages position all over the image and so it can only produce an average correction. The middle of the image is undercorrected and the edges are overcorrected.
Because image stabilization software must shift the image, either it must be enlarged, or blank areas will appear at the edges. Better image stabilization software lets you choose how you manage this. There are several options:
Leaving blank borders in the picture provides a great demonstration of how image stabilization works, and is good for video that has to be used as evidence in a courtroom – you can't be accused of leaving anything out. It's rather distracting, though.
You may simply choose a zoom level. This works fine as long as the shake isn't too extreme. If your video editing software supports keyframing (to adjust zoom during a clip), you can enlarge the image more during the shaker parts of a clip.
Another common option is for the software to adjust the zoom level so the image fills the screen. This may be for an entire clip, or it may adjust itself during a clip. But then you may get the Alfred Hitchcock zoom effect…
In the mid-1950s, in his film Vertigo, legendary film director Alfred Hitchcock made creative use of one of the first zoom lenses. He zoomed the lens in while moving the camera away (and vice versa) to create a weirdly shifting perspective. I won't spoil the experience for you by describing the scene. See the movie. It's a classic.
Image-stabilization software with auto-zoom can give you the same effect, and it can even look as though you are repeatedly riding your bicycle backwards for a moment, then forwards again. If you let this happen, you might want to provide barf bags for the audience.
You avoid this by setting the stabilization software to a constant zoom level, or setting the auto-zoom to work slowly.
Enlarging the image to remove the black borders will unavoidably result in a loss of sharpness. Shoot at high resolution, then afterwards reduce resolution as needed.
At least one image stabilization application, Deshaker, offers a very neat feature, filling in the borders with data from earlier or later images. If the area filled in is stationary, this is often undetectable, and avoids your having to enlarge the image to remove the blank borders.
The most sophisticated way to deal with black borders is to use the auto fill-in followed by manual zooming.
Now we get down to specifics. I've used two image-stabilization applications. Both run under Windows. Both benefit, as you might expect, from a very fast processor, though neither is, as of yet, available in a 64-bit version. YouTube also now is offering image stabilization -- and does the processing on its own server.
Gooder Video SteadyHand is a free-standing commercial application, available either alone or in a package with two other apps, MotionPerfect – which you use to change the frame rate -- and SlowMotion, whose name describes it.
What I especially like about SteadyHand is that you can independently choose whether to stabilize against horizontal and vertical shake. As vertical shake is the main problem with a helmet-mounted camera, this avoids the pan-and-jerk issue when you turn your head.
In my experience, the fixed-zoom mode of SteadyHand does not work correctly-- it produces a venetian blind effect in the picture. You can, however, turn zoom off and then zoom the picture later in your editing app. This is preferable anyway, so you can also adjust panning to eliminate the blank border areas.
You might as well buy the whole package. The MotionPerfect app converts between 25 and 30 frame per second video, or sets video to any other speed, b yactually creating new images intermeidate between the original ones. In this way, it avoids the jerkiness that is common with this conversion. TheSlowMotion application works similarly, producing smooth slow motion. SteadyHand requires .AVI files as input, and so I have also purchased the AVS4YOU software suite to run conversions. I use the DivX/Xvid MPEG-4 codec, which holds the file size down.
Deshaker is available as a free download. You run it as a filter in VirtualDub, which also is free. You really should donate to the developers. I did. Because Deshaker is currently available only in a 32-bit version, you must also use the 32-bit version of VitualDub. Plugins are available so VirtualDub can read a number of video formats; without them, it reads .AVI or MPEG-1 files.
Deshaker corrects for panning, rotation and zoom, each adjustable separately – but doesn't let you adjust horizontal and vertical stabilization separately, as SteadyHand does. Deshaker has an automatic border-fill option, which is very neat when it works – which is most of the time. Deshaker can account for rolling shutter if the correct rolling shutter value is input, making a linear correction within each frame. Deshaker has an option to ignore pixels outside (or inside) a given area, which is useful to prevent undercorrection of a fisheye image. (The edges will then be overcorrected, but they can be cropped off). Deshaker also lets you change the image resolution during the stabilization process, possibly avoiding the need to run the video through another application.
I have as of yet not found out how to select a codec when running VirtualDub, and it makes huge .AVI files, so I will run the output through the AVS4YOU converter to make a smaller file.
YouTube is now offering online video editing tools including image stabilization. I've only tried this once, and it appears to work OK, but it isn't as feature-rich as SteadyHand or Deshaker.
It may be to your advantage to run more than one pass, or use more than one app in sequence, to take advantage of their different features. For example, to avoid undercorrection with a fisheye lens, you might run Deshaker with adjustment based only on a central area, then crop, then run SteadyHand with only vertical correction. This could work even better, and in one pass, with a feature I'd like to see, dynamic selection of the zoom area…read on.
There are some things which the software I know doesn't do but which would be nice.
Deshaker lets you preselect a zoom level so the software can reposition the image without reaching the borders of what was originally shot. I'd like to be able to adjust panning and zooming with keyframes, moving around in the image, give or take the corrections that the image stabilization software will make later. Doing this without actually cropping the image would let the software use the entire original image to fill in borders. The software would decide how to position the image based on the area selected, reducing the undercorrection at the center of a fisheye image. If the selection area and pan/zoom area were adjustable separately, then it would also be possible to avoid problems due to moving objects in the image.
As a wide-angle image moves around, its perspective changes, as already described. Image-stabilization software could account for this, keeping the perspective constant..
Going further, software also could correct for the curving of a fisheye image and avoid the undercorrection/overcorrection problem.
The software would need the parameters of the lens as an input. To some extent, the software could figure this out for itself based on the input video.
This feature, to be sure, would slow processing significantly because it would require a sophisticated re-mapping of the image.
This would apply different amounts of rolling-shutter compensation to different parts of the image, in either of two ways: