An electronic device is disclosed herein that includes an infrared light source to emit infrared light, a rolling shutter sensor, and at least one processor. The at least one processor is to: cause the rolling shutter sensor to output a first signal corresponding to a first frame of image data during exposure to the infrared light, reset the rows of the rolling shutter sensor at a same time, cause the rolling shutter sensor to output a second signal corresponding to a second frame of image data without exposure to the infrared light from the infrared light source, determine a difference between the first signal and the second signal to generate an ambient infrared free frame, and recognize a face based on the ambient infrared free frame.