Apparatus is provided having an intraocular device for implantation entirely in a subjects eye, the intraocular device including: a photosensor array having a plurality of photosensors, each photosensor detects ambient photons and generates a signal in response thereto. A spatial density of the photosensors in a central portion of the array is greater than a spatial density of the photosensors in an outer portion of the array. The intraocular device additionally includes a plurality of stimulating electrodes and driving circuitry coupled to the photosensors, and configured to drive the electrodes to apply electrical pulses to a retina of the eye in response to the signals from the photosensors. Other applications are also described.