-
Notifications
You must be signed in to change notification settings - Fork 30
Camera and Optics
By most reasonable photographic standards, the Pi Camera is not up to the task of accurately capturing film. Although its inexpensive sensor has enough resolution to do justice to 8 & even 16mm film, it also has fairly low dynamic range (ability to simultaneously capture bright and dark areas) and its fixed-focus lens is not designed for macro photography. It's slow enough that capturing uncompressed PNG or RAW images is prohibitively slow, we need to use jpeg, which doesn't lend itself nearly as well to post-processing. If you want the best, fastest camera and flawless optics, it doesn't fit the bill.
On the other hand, it's so affordable, moddable, and controllable that we can still get excellent images out of it by carefully tweaking its color and exposure settings, and when necessary by (programmatically) blending together multiple exposures of each frame.
I've been using v1 (5mp sensor) of the pi camera, which was the only one available when I began the project. I've tried using V2 (8mp) but stopped for two reasons:
-
At least shortly after its release, the python interface for the V2 still had a few glitches; e.g. increasing/decreasing contrast during capture caused the camera to continue increasing it with each subsequent exposure until it maxed out. Perhaps this has been fixed by now - I haven't tried it lately.
-
The V2 camera is advertised as better in low-light, and has a lower f/stop value - I think this also means it has a larger aperture, and thus a smaller depth-of-field; some users of the unmodified camera have reported slightly soft images. But depth-of-field decreases as we move the focal plane very close to the camera, to the point that I found I had a very difficult time focusing the camera at all with the V2: I couldn't focus the center and edges simultaneously. (This is only my experience - someone with a better-designed camera mount may get different results.)
##Modifying the Camera The pi camera a fixed-focus pinhole-type lens, and out of the box will not focus nearer than about 25cm. It is also lightly glued into place. By breaking the glue seal and carefully unscrewing the lens until it nearly falls out of the mount, you can get the focus distance down to a little over 2cm. (Others have posted more detailed instructions on this procedure)
At this distance, a 16mm film frame fills about half the width and height of the sensor, providing just about HD resolution. Modern 16mm film is theoretically capable of producing more detail than this, but in practice it seems that the original optics, film, or (ahem) cameraman are much more likely to likely to be the limiting factor.
8mm film frames are much smaller, and to get sufficient resolution for them, you'll need to mount an additional magnifier lens between the camera and the film. I found a 25mm focal length triplet lens from surplusshed.com that worked well for me, and allowed the 8mm frame to fill about 50% of the width and height of the sensor area. I designed and printed mounts for the camera and lens which I will add to github; they will likely require modification to fit with a different projector.
##On replacing the stock lens Several people have tried replacing the stock lens with a separate lens from a DSLR, CCTV camera, or other, and knockoff pi cameras with M12 (CCTV) mounts are available online. My experience (which seems common) was that with anything but the stock lens, I saw odd cyan vignetting in the corners. I'm not an expert in optics, but I suspect the bayer filter for the pi camera may be tuned specifically for the stock lens; this lens is so near to the sensor that light from it will strike the sensor at an angle, and the bayer filter is probably designed with this in mind. When a different lens is used that's much further from the sensor, perhaps the light hits the bayer filter at a different angle, and illuminating the wrong sensor elements.
Whatever the reason, I wasn't able to improve on the stock lens.