CS194-26 Project 2: Building a Pinhole Camera

Allan Zhou, Ian Lee, YiDing Jiang

Overview

In this project we designed and built a pinhole camera or "camera obscura" , a dark room. The camera captures images by projecting light through a pinhole onto the white screen at the back of the camera box, inverted. Since the projection is fairly dim, we used a DSLR camera on 30 seconds exposure to capture a brighter projection on the screen. (Yes, the irony)

Camera Design

The main body of the pinhole camera is an amazon box and a Sony DSLR camera (RX10). We cut a circular hole and a smaller square hole on one side of the box, relatively close to each other. The circular opening is approximately the size of the DSLR's lens and is used for the camera to capture the light reflected off the back screen inside the box. The square hole is about 1.5cmx1.5cm and is used for switching between different pinhole sizes.

In interior opposite to the openings is covered with white paper which acts as the reflective screen. The remaining parts of the interior are covered with black paper and black duct tape to minimize interference from the reflection off the sides.

On the outside, we made an cylinder made of black paper and tape around the circular opening that goes over the camera lens to block light from going through the seams between the lens and the box. We also made two sliders next to the square opening. Pinholes are punched on index cards which slide into the two sliders. We also built flaps with duct tape over all edges where the box closes to block light.

Interior Exterior
Cylinder cover Slider and pinholes cards (taped on the back)

Pinhole Size

To calculate the optimal pinhole size, we used the following formula:

1.9 * sqrt(f * lambda)

f is the length from the pinhole to the screen and lambda is the wavelength of the light. Because natural images are composed of lights with different wavelength, we followed here to calculate the optimal pinhole size using lambda = 550nm.

The distance between the pinhole to the screen is about 21 cm. Following the formula, we calculated the optimal pinhole size to be 0.64 mm.

Results

Two scenes

size Latimer MLK
~.64 mm
~3. mm
~5. mm

In terms of the resolution and how detailed the objects are in the pictures, the 0.64 mm pinhole clearly did the best out of the 3 pinhole sizes. As seen in the picture, the pictures become less focused and blurred as the diameter of the pinhole increases because the size of the circle of confusion becomes larger. With a larger pinhole, the more light rays enter the camera and light rays from the same light source can reach a larger circle of points on the image plane. As a result, every point on the image plane receives photons from more distinct light sources and in turn reflects off light rays that might have different wavelengths, which will eventually be captured by our camera, resulting in blurs.

However, in terms of the color, the larger pinholes are much brighter and have better contrast of colors. On the other hand, the pictures taken with the 0.64mm pinhole size are grayer and are darker towards the border of the pictures. Our hypothesis about the dark border is that because the pinhole is really small, the angles at which the light hits the screen actually matters. If the light hits the surface at an angle, the energy is less concnetrated and therefore less bright compared to the center.

The overall grayness of the pictures may be the result of the black duct tape we used because they are more reflective than black paper. The light from the screen could get reflected off these tapes and cause the pictures to have a grayish tone which is a the average of reflections of all wavelength. This effect is particularly pronounced when the box is placed in direct sunlight even though we made sure to tape all the corners of the box and covered it with clothes when taking pictures.

Other pictures

Flower Clark Kerr's Lawn
Busy Piedmont Avenue Stanley Hall

Here, you can see more illustration of the grayish phenomenon observed above. Furthermore, since the camera is naturally made for long exposure, we took a photo of Piedmont in the morning and you can somewhat see the movements of cars in the picture.

We also included the our camera in these pictures.

Pretty pictures not at optimal size

Indoor attempt, Rubik's cube Golden Gate Bridge (by Gauss)
Bear Transit

Extra Stuff

Clones

This is another attempt to use the long exposure property of the camera. We stood still in front of the camera and moved to adjacent locations every 10 seconds with the same posture. The result is the same posture copied 3 times in the picture.

The technique works better when the background is not extremely bright so the image of the person or object has better chance of being captured. So in hindsight, taking a picture in front of Sproul Hall might not have been the best idea :) but you can see the legs.