Two kinds of motion make it hard or even impossible to align the pictures correctly.
- you move relative to the subject of the shot
- the subject moves
Your movement gives rise to parallax: a change in the apparent position of objects relative to one another. The Wikipedia article about parallax contains this illustration:
A photographer standing at Viewpoint A or Viewpoint B, taking a picture of the three rectangles on the right hand side, sees the yellow star in two different places, producing the two different pictures at the bottom of the illustration.
I have captured panoramic pictures while standing on a moving boat or ship. But sometimes the resulting photos are impossible to stitch together: the displacement of objects made the photos too dissimilar and they could not be lined up correctly.
The Subject Moves
Things change while you are taking your shots. Cars move. Boats move (back and forth, up and down). People walk. Waves crash on shore and flow out again. Trees move in the wind. You need to use stitching software to prevent one object from appearing in two different places.
This picture of Cozumel shows a busy street scene in a Mexican port. It took a lot of work to stitch this together, masking out parts of almost every photo to deal with problems caused by cars, horses, and people moving.
If you zoom in on this picture of almost the whole city of Cartagena, you can see people walking in the street. I had to carefully check the boundaries of each pair of shots to make sure I did not get the same person in two places.
Solution 1: Don’t Move
For optimal stitching, you should take all photos with the optical centre of the lens in exactly the same place. There are lots of articles on the web about the optical centre of a lens. If you do this a lot, you can get special mounts to hold your camera on a tripod and rotate it around the optical centre of the lens instead of rotating around the screw that attaches the camera to the tripod. Practically speaking, if your subject is far away from you, special camera mounts are not needed; just don’t move the camera any more than necessary.
Solution 2: Stop The Motion
Try to do your shots when there is less motion. Wait for a traffic light to stop cars; shoot between big waves; wait for the wind to die down.
Solution 3: Snap Fast
If you or your subject are in motion, try to take the necessary pictures fast enough that the motion of you, the subject, or both will be minimal.
Solution 4: Post Processing
When all else fails, good panorama stitching software can help.
If a person is in two places in two overlapping pictures, you can mask out the person in one picture and the software will include him or her in the other picture.
Software can control how to merge the boundaries of pictures, so that things that are not discrete (e.g. ocean waves) can be made to look smooth.
Often you can tell the stitching software to move the boundary between two pictures, so that the boundary is positioned where nothing is moving: on a building or a mountain.