1. A method of detecting information transmitted by a light source with an image sensor by detecting a pattern of light pulses produced by the light source, the method comprising: capturing on the image sensor an image in which different portions of the image sensor are exposed at different points in time; detecting patterns that include a first set of image features captured when the light source is in a first state of illumination and a second set of image features captured when the light source is in a second state of illumination; measuring a feature of the first set of image features; and decoding information encoded in the pattern of light pulses produced by the light source captured in the image based on the measured feature.