A method and a digital filter for use with photo and video images to produce high-quality images of visually close objects using a camera or video camera equipped with sensors with an electronic shutter. The resolution of an image is increased when a plurality of frames of low resolution are used for producing one frame of high resolution, a plurality of frames is exposed, initial images are in the form of a continuous sequence of frames with high-speed capture, the frequency of the frames is inversely proportional to the magnitude of that part of the light-sensitive region of the sensor which is being scanned, the initial images are aligned, an enhanced image is produced and this image is filtered using a nonlinear filter, which includes a neural network which is pretrained using a test image including radial and sinusoidal test charts, as well as reference points.