A computer-implemented method for producing a single image from data collected in a plurality of images captured by an optical system to simulate a mirror used as a rear-view mirror of a vehicle, the method comprising the step of stitching a first image and a second image together to form a single image, characterized in that the optical system includes a plurality of optical sub-systems, including a system designed to detect electromagnetic radiation outside the visible spectrum to collect the plurality of images, and the method comprises the following steps: identifying primary outer edges of a first image of the plurality of images; locating a first border within the first image that extends to part of a first outer edge of the first image; identifying secondary outer edges of a second image of the plurality of images; selecting a second outer edge from the secondary outer edges closest in position and orientation to the part of the first outer edge of the first image; locating a second border within the second image that extends to the second outer edge; adjusting the second image such that a second part of the second border of the second image aligns with the first border of the first image; and a portion of the secondary outer edges and a portion of the first outer edge overlap, with the portion of the first image includes a part of the secondary edges and the first outer edge, and the method includes the step of iteratively selecting first and second images (550a, 550b, 550c) until all of the plurality of images have been adjusted to produce the single image. the optical system includes a plurality of optical sub-systems, including a system designed to detect electromagnetic radiation outside the visible spectrum to collect the plurality of images, and the method comprises the following steps: identifying primary outer edges of a first image of the plurality of images; locating a first border within the first image that extends to part of a first outer edge of the first image; identifying secondary outer edges of a second image of the plurality of images; selecting a second outer edge from the secondary outer edges closest in position and orientation to the part of the first outer edge of the first image; locating a second border within the second image that extends to the second outer edge; adjusting the second image such that a second part of the second border of the second image aligns with the first border of the first image; and a portion of the secondary outer edges and a portion of the first outer edge overlap, with the portion of the first image includes a part of the secondary edges and the first outer edge, and identifying primary outer edges of a first image of the plurality of images; locating a first border within the first image that extends to part of a first outer edge of the first image; identifying secondary outer edges of a second image of the plurality of images; selecting a second outer edge from the secondary outer edges closest in position and orientation to the part of the first outer edge of the first image; locating a second border within the second image that extends to the second outer edge; adjusting the second image such that a second part of the second border of the second image aligns with the first border of the first image; and a portion of the secondary outer edges and a portion of the first outer edge overlap, with the portion of the first image includes a part of the secondary edges and the first outer edge, and the method includes the step of iteratively selecting first and second images (550a, 550b, 550c) until all of the plurality of images have been adjusted to produce the single image.