A system for creating a corrected image of a scene for a terminal-imaging seeker , the system comprising: a lens configured to receive light from a scene aligned with an optical axis; a focal plane array aligned with the optical axis and having an imaging region comprising a plurality of light-sensitive pixels; a spatial light modulator capable of generating a plurality of different coded-aperture mask patterns, each having a plurality of pinhole-like transparent apertures , the spatial light modulator comprising a plurality of electrically-controllable elements, each configured to modulate light transmission therethrough in response to an electrical control signal, the spatial light modulator aligned along the optical axis so as to transmit light through the plurality of pinhole-like transparent apertures onto the imaging region of the focal plane array thereby forming a raw super-imposed image of a corresponding plurality of overlapping images of the scene, wherein the spatial light modulator comprises two layers of liquid-crystal elements, the first layer configured to controllably modulate light transmission in parallel lines perpendicular to the optical axis, the second layer configured to controllably modulate light transmission in parallel lines perpendicular to both the optical axis and the parallel lines of the first layer; a controller configured to generate an electrical control signal that causes the spatial light modulator to generate a first of the plurality of coded-aperture mask patterns; and an image processor configured to create, based on algorithms corresponding to the first of the plurality of coded-aperture mask patterns and on a first raw super-imposed image, the corrected image of the scene. a lens configured to receive light from a scene aligned with an optical axis; a focal plane array aligned with the optical axis and having an imaging region comprising a plurality of light-sensitive pixels; a spatial light modulator capable of generating a plurality of different coded-aperture mask patterns, each having a plurality of pinhole-like transparent apertures , the spatial light modulator comprising a plurality of electrically-controllable elements, each configured to modulate light transmission therethrough in response to an electrical control signal, the spatial light modulator aligned along the optical axis so as to transmit light through the plurality of pinhole-like transparent apertures onto the imaging region of the focal plane array thereby forming a raw super-imposed image of a corresponding plurality of overlapping images of the scene, wherein the spatial light modulator comprises two layers of liquid-crystal elements, the first layer configured to controllably modulate light transmission in parallel lines perpendicular to the optical axis, the second layer configured to controllably modulate light transmission in parallel lines perpendicular to both the optical axis and the parallel lines of the first layer; a controller configured to generate an electrical control signal that causes the spatial light modulator to generate a first of the plurality of coded-aperture mask patterns; and an image processor configured to create, based on algorithms corresponding to the first of the plurality of coded-aperture mask patterns and on a first raw super-imposed image, the corrected image of the scene. <EOS>