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 – your senses 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.
Shake during exposure of the image blurs the picture. This can be avoided by steadying the camera, by using short exposure times, or by one kind of in-camera image stabilization.
Another common problem resulting from shake is geometric distortion due to two effects:
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 higher it sits 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, if the camera has a wide-angle lens. 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 seatpost 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 past. 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.
In either case, the camera will lean with the bicycle, which is realistic when cornering but annoying when stopped. The cyclist must remember then to keep the bicycle upright.
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 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 a hand-held 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. The could only be avoided if the camera resets lens position between exposures. At the usual 25 or 30 frame per second, that would be quite a feat. I don't know of any camera which does this.
Digital image stabilization responds to a motion sensor in the camera, or compares stored images. Digital image stabilization can't hold the image steady during exposure – only high shutter speed can prevent blur. Digital image stabilization can look ahead in time, and so, can discriminate between shake and panning. This can 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. The analog signal 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, which is typically scanned 25 or 30 times per second.
An image must flicker 50 or more times per second so you don't notice the flicker. In order to hold it down signal bandwidth, analog TV uses interlaced scanning – odd-numbered lines in one scan,which lasts 1/50 or 1/60 second; even-numbered lines in 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, to reduce the bandwidth of TV channels. Interlacing also makes motion look smoother, because the scan rate is twice the frame rate. On the other hand, objects which move upward or downward in the image can look jagged when their speed is a close match for the progression of interlaced scan lines.
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 when the camera shakes. 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 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.
Image geometry changes with camera aim. As an example, if the camera aims upward, a building appears smaller at the top.
A wide-angle lens reduces reduces the apparent size of objects in the image and with it, the apparent shake, but on the other hand, objects appear larger near the edges of the image. Digital image stabilization moves the displayed image around in the recorded image, causing noticeable changes in shape of objects in a stabilized image shot with a wide-angle lens.
Fisheye lenses create an additional distortion. A fisheye lens compresses the image nearer the edges. – but then, straight lines at the edges 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. That is how Imax movies work – but most of us still only have a flat screen at home.
Because of the compression of the fisheye image near the edges, objects don't appear 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, most obvious with lines that extend from side to side in the image. 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. If stabilization corrections are large, objects noticeably change size and shape..
The following two video examples illustrate this. The differences are easiest to see in a full-screen view. A full-screen icon will appear at the lower right when you mouse over the moving video. Click again at the lower right or strike the ESC key to return to this page.
The first video is unstabilized.
The second example has been stabilized using the Windows application Deshaker (about which more later...). I've restricted the area of the image which Deshaker senses, steadying the center better but increasing errors at the edges. You may also notice discontinuities in the image at the edges: I configured Deshaker to use previous and following frames to fill in areas not included in the current frame. Zooming in slightly moves those areas off the screen, as described in the next section of this article.
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 only as needed during the shakier 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, legendary film director Alfred Hitchcock made creative use of early zoom lenses in his film Vertigo. 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 forward again. This is distracting!
You avoid this by setting the stabilization software to a constant zoom level, or if possible, 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 camera 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 which 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 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, by actually creating new images intermediate between the original ones. In this way, it avoids the jerkiness that is common with this conversion. The SlowMotion 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. It writes only to .AVI files, and you must select a compressor when writing -- or else it produces uncompressed ones, which are huge.
Deshaker corrects for panning, rotation and zoom, horizontal and vertical shake, each adjustable separately . Deshaker has an automatic border-fill option, which is very neat when it works. 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.
Deshaker is a complex application with many settings, and I have a separate article on this site about it.
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.
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. It would be nice also to pre-adjust rotation. A tilt of the head which is undetected while riding can be distracting in a video.
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 avoid the undercorrection/overcorrection problem with fisheye images.
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:
|Articles by Sheldon Brown and others|
Last Updated: by Harriet Fell