Pinhole Photography

CS 194-26 Project #2  ·  Owen Jow  ·  September 2016


A pinhole camera is an extremely simplistic imaging device, generally consisting of a darkened box with a tiny hole ("aperture") in one side. Light from the environment passes through the aperture and, by the principle of rectilinear propagation, creates an identical – but inverted – projection of the external scene on the back wall of the box. In this project, we build a pinhole camera of our own, using a digital camera with a 15 second exposure to record the pinhole photographs for all time.



Constructing the Camera

Holes cut with X-ACTO knife
Drills and pin vise
Spray-painted black
To construct the pinhole camera, we first cut holes in a 5" x 7" x 13" cardboard box (one for the aperture, one for the digital camera lens) with an X-ACTO knife. Next, we spray painted everything black and inserted a 2" foam block with a white sheet of paper attached to it, which could be moved back and forth so as to provide an adjustable focal length. The box was then sealed with electrical tape (although originally it was "sealed" with a pair of pants... see right!), and we attached the digital camera (a Canon SD300) via double-sided foam tape. Later, friction tape was also used on and around the camera to cover up light leaks.

Finally, using measured drill sizes, we created a variety of apertures on 0.009"-thick aluminum and brass sheets. Although not all apertures were used, we had diameters ranging from 0.3 to 5mm. The optimal aperture for our 9.5" focal length was calculated as 0.69mm [using the Lord Rayleigh constant in the c * sqrt(fλ) formula], and we did find this diameter to give the best results.

To construct the pinhole camera, we first cut holes in a 5" x 7" x 13" cardboard box (one for the aperture, one for the digital camera lens) with an X-ACTO knife. Next, we spray painted everything black and inserted a 2" foam block with a white sheet of paper attached to it, which could be moved back and forth so as to provide an adjustable focal length. The box was then sealed with electrical tape (although originally it was "sealed" with a pair of pants... see right!), and we attached the digital camera (a Canon SD300) via double-sided foam tape. Later, friction tape was also used on and around the camera to cover up light leaks.

Finally, using measured drill sizes, we created a variety of apertures on 0.009"-thick aluminum and brass sheets. Although not all apertures were used, we had diameters ranging from 0.3 to 5mm. The optimal aperture for our 9.5" focal length was calculated as 0.69mm [using the Lord Rayleigh constant in the c * sqrt(fλ) formula], and we did find this diameter to give the best results.
Pants used to block light
Scrap wood tripod mount
Apertures in aluminum and brass
Sealed with electrical tape and mounted


Visual Results

The below images are our initial results, cropped and flipped. Since they were originally very dark (a result of a small aperture and a mere 15 second shutter speed), they have also had their exposure increased through the Preview program for Mac OS. Notice that a spot in the middle of the image seems to be magnified and overlayed on top of the rest of the image; we didn't know it at the time, but this was a result of light coming in through the Canon SD300's viewfinder. When the viewfinder was eventually covered up, this problem went away.

0.79mm aperture diameter,
10.5" focal length,
and...
15 second exposure
0.69mm aperture diameter,
9.5" focal length,
and...
still 15 second exposure
We also noticed that by changing the "ISO film speed" setting on the digital camera, we could make the image brighter or darker. (This value was initially set to 50.) ISO measures the sensitivity of the image sensor: a higher number means a greater sensitivity to light at the price of a grainier image. In general, we preferred images that were brighter, so we mostly ended up opting for an ISO setting in the 100-200 range. The following (unadjusted) images demonstrate the effect of different ISO values on the recorded output.

0.69mm, 15s, ISO 50
0.69mm, 15s, ISO 100
0.69mm, 15s, ISO 200
0.69mm, 15s, ISO 400
And finally, as a required deliverable, we have a comparison between three different aperture sizes (0.69mm, 3mm, and 5mm). We observed that the images taken with a larger pinhole seemed to be much brighter and blurrier than their small-pinhole counterparts: brighter since the wider aperture let a lot more light through, and blurrier since every point on the output image ended up being the composition of a ton of light rays from the world space. On the other hand, smaller-pinhole images were a lot darker and sharper, since there was much less light and every point on the back wall of the camera was mapped to by only a few rays.

The 0.69mm images below have had their exposure increased via Preview's color adjustment tool. Otherwise, they would all be pretty dark and it wouldn't make for quite as nice of a viewing experience.

0.69mm aperture, 9.5" focal length
3mm aperture, 9.5" focal length
5mm aperture, 9.5" focal length
0.69mm aperture, 9.5" focal length
3mm aperture, 9.5" focal length
5mm aperture, 9.5" focal length
0.69mm aperture, 9.5" focal length
3mm aperture, 9.5" focal length
5mm aperture, 9.5" focal length
Colorful boats (0.69mm)
A clock at Shoreline Park (0.69mm)
NASA Ames Research Center (0.69mm)
Bell AH-1G HueyCobra helicopter (0.69mm)


Light Painting (B & W)

By holding an LED flashlight about three feet from the pinhole camera and tracing movements through the air, we were able to create some rudimentary light paintings. The biggest limitation in this process was the 15 second shutter speed, requiring our art to be drawn very quickly. During this process, we used a 2mm aperture (because we decided that the amount of light hitting the image plane was more important than sharpness for such a task) and an ISO film speed of 200.

"Cal"
Smiley face
"Owen"
Five-pointed star
Man + man's best friend
Guy with sword
"Bears"
"hello"


A Better Digital Camera

As the deadline approached, we wondered if we could obtain better results if we weren't limited to the point-and-shoot camera that we had been using. The photos were still somewhat dark and blurry, and it was possible that we had reached the limit of the Canon SD300. With a different camera, perhaps images could be captured at a higher resolution – and, moreover, with an exposure longer than 15 seconds! Accordingly, we upgraded our digital camera (though not quite to a DSLR) and took a few more pinhole pictures. All of the pictures below are unadjusted and were captured with the following settings: f2.8, ISO 100, 60 second shutter speed.

As the deadline approached, we wondered if we could obtain better results if we weren't limited to the point-and-shoot camera that we had been using. The photos were still somewhat dark and blurry, and it was possible that we had reached the limit of the Canon SD300. With a different camera, perhaps images could be captured at a higher resolution – and, moreover, with an exposure longer than 15 seconds! Accordingly, we upgraded our digital camera (though not quite to a DSLR) and took a few more pinhole pictures. All of the pictures below are unadjusted and were captured with the following settings: f2.8, ISO 100, 60 second shutter speed.
Panasonic Lumix DMC-FZ28