1. A method comprising: using a processor to perform the steps of: receiving at least two frames of image data; learning a model for the appearance of an object from the at least two frames of image data; and tracking a changing position of the object in three dimensions from the at least two frames of image data, wherein tracking a changing position comprises representing possible positions as particles, weighting each particle in a set of particles based on the probability that the particle represents the position of the object, and using the weighting of the particles to resample the particles in the set of particles as part of selecting a set of particles for a next frame.