CS 194-26 Project 2

Building a Pinhole Camera

Roshni Iyer cs194-26-abc

Kate Shijie Xu cs194-26-abf

In this project, we created a pinhole camera (or "camera obscura"). The pinhole camera is a dark box with a pinhole on one face, and a white screen on the opposite face. Light reflecting off an object is directed through the pinhole to the screen, and an inverted image of the object forms on the screen. We then take a picture of that inverted image using a digital camera.

The Process

Pinhole Camera Design

interior view

interior covered by black paper

top view

front view

camera on the go!

Using a cardboard Amazon box of dimensions length = 46cm, width = 57cm, height = 32cm, we designated one side of the box to be our camera screen. This side was covered with white paper, and the remaining sides were covered with black paper. The procedure can be visualized in the interior view of the box shown above. On the opposite face, we cut a large hole and covered it with card paper, each of which contained pinholes of varying sizes. Next to the hole for the card paper, we cut a hole for the IPhone 6S's aperture. The IPhone is then taped such that our camera's aperture fit snugly into the hole next to the card paper. This can be seen in the side view picture above. To ensure that the box was light proof, we reinforced all sides and corners of the box with duct tape and any other areas vulnerable to unwanted light expsoure. This is shown in the box's top view picture above.


To build a pinhole camera, we used an Amazon cardboard box of dimensions length = 46cm, width = 57cm, height = 32cm. The ideal pinhole size is calculated by the equation 1.9 * sqrt(f * lambda) where f is the distance between the pinhole and the screen, and lambda is the wavelength of light (about 550 nm). Thus our ideal pinhole, with f being 57cm is 1.06mm. To get a good range of pinholes, we created a pinhole of size 1mm (to approximate the ideal 1.06mm size), and went up and down a few mm in order to observe the effect that smaller and larger pinholes have on the image produced. So, we created pinholes of sizes 1mm (to approximate 1.06mm), 0.5mm, and 3mm.

To capture pictures with our setup, we took the box to a well-lit, sunny area. We then pointed the pinhole in the direction of an object of interest, which required some heavy box lifting! Lastly, we took a picture using the IPhone 6S.


Scene 1 was taken standing next to a busy road near a high school.

scene 1: 0.5mm

scene 1: 1mm
scene 1: 3mm

Scene 2 was taken standing in a parking lot.

scene 2: 0.5mm

scene 2: 1mm
scene 2: 3mm

Observations: From observation in both scenes 1 and 2, pinhole size 1mm produces the most clear and sharp images. While pinhole size 0.5mm produces sharp images, there is not enough light entering the small pinhole, which leads to darker images being produced. In fact, these images may be so dark (as in the case of scene 2), that it obscures the image clarity altogether. Conversely, a larger pinhole size of 3mm produces brighter images as more light can enter the larger hole. However, this also causes the image to get obscured because light rays in all directions blur the image. The amount of light entering the pinhole is imperative to producing good images.The right balance of light, sharpness, and resolution is achieved by designing a pinhole close to the ideal pinhole size calculated (1.06mm).

Other Images




Cars 1

Cars 2


Light Painting

To achieve Light Painting, we used an app called Slow Camera to set the IPhone's shutter speed to 15 seconds. We then stood in a dark room with a single source of light, and moved around the box with the camera. Since the shutter speed is so slow, our movement caused the light to be drawn out into shapes.