1. A tactile sensor for generating an image of an object, the tactile sensor comprising: a planar optical waveguide comprised of at least a first layer that is flexible and transparent; at least one source of light configured to direct light into the optical waveguide; and a light sensor facing the optical waveguide and configured to generate signals from light scattered out of the optical waveguide, wherein the waveguide is configured so that at least some of the light directed into the optical waveguide is scattered out of the first layer when the first layer is deformed, and wherein the first layer is deformed by the tactile sensor being pressed against the object; the tactile sensor further comprising a rigid layer that is substantially rigid and transparent, wherein the rigid layer is disposed between the light sensor and the optical waveguide, and wherein the optical waveguide presses against the rigid layer, and wherein the rigid layer has a different refractive index than a refractive index of the optical waveguide.