An apparatus that produces an image of a posterior or an anterior segment of an eye, comprising: a light source; an optical system with a center having optical elements that can be shifted to deliver light from said light source on an optical axis or slightly off said optical axis from said center of optical system and return an imaging path from said posterior and anterior segments; characterized by a means for sequentially turning said light source on and off in synchronization with image capture under each condition; a means for inserting a flipping mask that momentarily blocks unwanted reflections in small areas of an image while leaving the majority areas of the image illuminated; a means for detecting said artifacts in one image without flipping mask, and detecting said flipping artifact mask in second image, and combining images to create a composite image that is artifact-free; a means for tilting or swinging the optical head, changing patient fixation to generate views with artifacts in different locations on each image, averaged images, or movie stream, and a plurality of shifting optical elements, masks and light sources where two or more images having specular and other reflection artifacts located in two or more anatomically different areas of each sequentially acquired image of said eye segments are created, said artifacts in said images are detected by image processing, said images are combined with one or more other images to create a composite image, a stereo image, a panoramic image from multiple images or video stream, or generating a video stream panning the retina without artifacts, where relatively clear well-focused image sections are combined from one or more said other images or video streams to create said composite image or movie. a light source; an optical system with a center having optical elements that can be shifted to deliver light from said light source on an optical axis or slightly off said optical axis from said center of optical system and return an imaging path from said posterior and anterior segments; a means for sequentially turning said light source on and off in synchronization with image capture under each condition; a means for inserting a flipping mask that momentarily blocks unwanted reflections in small areas of an image while leaving the majority areas of the image illuminated; a means for detecting said artifacts in one image without flipping mask, and detecting said flipping artifact mask in second image, and combining images to create a composite image that is artifact-free; a means for tilting or swinging the optical head, changing patient fixation to generate views with artifacts in different locations on each image, averaged images, or movie stream, and a plurality of shifting optical elements, masks and light sources where two or more images having specular and other reflection artifacts located in two or more anatomically different areas of each sequentially acquired image of said eye segments are created, said artifacts in said images are detected by image processing, said images are combined with one or more other images to create a composite image, a stereo image, a panoramic image from multiple images or video stream, or generating a video stream panning the retina without artifacts, where relatively clear well-focused image sections are combined from one or more said other images or video streams to create said composite image or movie.