Although both the pinhole camera and camera obscura is credited to Ibn al-Haytham , the camera obscura was first described by Aristotle , who was the first to describe how an image is formed on the eye , using the camera obscura as an analogy . The camera obscura was known to earlier scholars since the time of Mozi and Aristotle .