Alhazen ( Ibn al-Haytham ) also gave the first clear description and early analysis and invented the camera obscura and pinhole camera .
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 .