Chris Leong , Aug 24, 2010; 09:25 p.m.
Discovery and origins Camera obscura
The first mention of the principles behind the pinhole camera, a precursor to the camera obscura, belongs to Mo-Ti (470 BC to 390 BC), a Chinese philosopher and the founder of Mohism. Mo-Ti referred to this camera as a "collecting plate" or "locked treasure room".  The Mohist tradition is unusual in Chinese thought because it is concerned with developing principles of logic.
The Greek philosopher Aristotle (384 to 322 BC) understood the optical principle of the pinhole camera. He viewed the crescent shape of a partially eclipsed sun projected on the ground through the holes in a sieve, and the gaps between leaves of a plane tree.
In the 6th century, Byzantine mathematician and architect Anthemius of Tralles (most famous for designing the Hagia Sophia), used a type of camera obscura in his experiments.
One of the first camerae obscurae was built by the scientist Abu Ali Al-Hasan Ibn al-Haitham, born in Basra (965–1039 AD), known in the West as Alhacen or Alhazen, who carried out practical experiments on optics in his Book of Optics. 
History Camera obscura, from a manuscript of military designs. Seventeenth century, possibly Italian.
Although the pinhole camera and camera obscura are sometimes credited to Ibn al-Haytham (Alhazen, 965–1039), for the first clear description and correct analysis of the device and for first describing how an image is formed in the eye using the camera obscura as an analogy.
However, primitive forms of a camera obscura were known to earlier scholars since the time of Mozi and Aristotle.
Euclid's Optics (ca 300 BC), presupposed the camera obscura as a demonstration that light travels in straight lines.
When Ibn al-Haytham began experimenting with the camera obscura phenomenon, he stated (in Latin translation), Et nos non inventimus ita, "we did not invent this".
In the 4th century BC, Aristotle noted that "sunlight travelling through small openings between the leaves of a tree, the holes of a sieve, the openings wickerwork, and even interlaced fingers will create circular patches of light on the ground."
In the 4th century AD, Theon of Alexandria observed how "candlelight passing through a pinhole will create an illuminated spot on a screen that is directly in line with the aperture and the center of the candle."
In the 9th century, Al-Kindi (Alkindus) demonstrated that "light from the right side of the flame will pass through the aperture and end up on the left side of the screen, while light from the left side of the flame will pass through the aperture and end up on the right side of the screen."
While these earlier scholars described the effects of a single light passing through a pinhole, none of them suggested that what is being projected onto the screen is an image of everything on the other side of the aperture.
Ibn al-Haytham's Book of Optics (1021) was the first to demonstrate this with his lamp experiment where several different light sources are arranged across a large area, and he was thus the first scientist to successfully project an entire image from outdoors onto a screen indoors with the camera obscura.
Several decades after Ibn al-Haytham's death, the Song Dynasty Chinese scientist Shen Kuo (1031–1095) experimented with camera obscura, and was the first to apply geometrical and quantitative attributes to it in his book of 1088 AD, the Dream Pool Essays.
However, Shen Kuo alluded to the fact that the Miscellaneous Morsels from Youyang written in about 840 AD by Duan Chengshi (d. 863) during the Tang Dynasty (618–907) mentioned inverting the image of a Chinese pagoda tower beside a seashore.
In fact, Shen makes no assertion that he was the first to experiment with such a device.
Shen wrote of Cheng's book: "[Miscellaneous Morsels from Youyang] said that the image of the pagoda is inverted because it is beside the sea, and that the sea has that effect. This is nonsense. It is a normal principle that the image is inverted after passing through the small hole."