A system and method for rejecting afocal light collected from an in vivo human retina is disclosed. The system may include a detector, a server system being in communication with the detector and a memory system with a rejection of collected afocal light and a disk having an optointerruptor and a motor, which is speed controlled via a non-transitory storage media. The method includes utilizing a series of optical shapes or codes, similar to other structured illumination systems, illuminating the series of optical shapes or codes several times, collecting and processing the series of optical shapes or codes yielding measurements of optical noise and optical signal and subtracting the noise and signal from the final image.