← Back to context

Comment by daralthus

5 years ago

The only thing better than a pinhole camera is a pinhole camera with multiple holes.

Let me explain:

When you have two holes (apertures), their images would likely overlap (depending on the arrangement).

Imagine you took two photos from a few millimetres apart to the left and to the right, then you superimposed them. Some areas would look ok (as both views saw the same distant object) and some would be less ok (of objects that are closer).

If you have a DSLR take the lens off and put a sheet with holes in front. Just try it.

Now as you add more holes you get more and more overlapping images on the same area of the sensor and eventually end up with a blur.

This blur is the same blur you see with a single large hole. It's just that with a large hole you had infinitely many overlaps!

Even cooler, if you happen to arrange the holes in a specific pattern you could capture images with different combinations of perspectives from different holes and you may even undo the overlaps. This is called coded aperture imaging:

https://www.paulcarlisle.net/codedaperture/

This doesn't just solve the biggest problem (limited light) of a single hole, but also captures depth information and you can use it for 3d reconstruction, refocusing etc.

One final bit, with a warning of a deep rabbit hole:

That "infinitely many overlaps" I was talking about happens with lenses too and is essentially a convolution where you convolve the image with itself (actually many different perspectives of itself if I am correct). Which is just the Fourier transform.

>That "infinitely many overlaps" I was talking about happens with lenses too and is essentially a convolution where you convolve the image with itself (actually many different perspectives of itself if I am correct). Which is just the Fourier transform.

That statement is a bit muddled, let me unpack it. The infinitely many overlaps thing can be expressed mathematically as the convolution of the image with a function that's one where the aperture is open, and zero where it's not. The thing about the Fourier transform is actually related to a different phenomenon. When the slit is really small, you start getting diffraction effects. The diffraction bands are approximately the Fourier transform of the slit function. However that is not significant unless the slit is extraordinarily tiny.

  • Indeed! We like to think of light as photons, traveling in rays in straight lines. That's geometric optics and works great for most purposes in photography.

    Physical optics takes into account the wave nature of light. This becomes important when the size of the lens becomes small (eg pinholes) ... there's diffraction around edges and pixels receive contributions from many points in space.

    Geometric optics lets you model using ray-tracing, reflections, and Snell's law refraction.

    Physical optics uses tools such as Fourier transforms, convolutions, and sinc functions.

    Understanding a simple lens system? Geometric optics is your friend. Building an astronomical telescope? Check into physical optics.

  • The diffraction bands are approximately the Fourier transform of the slit function.

    Is this correct from a physics standpoint? Feynman had a lot to say about light in his book (QED https://www.amazon.com/QED-Strange-Theory-Light-Matter/dp/06...) and never framed it this way. At one point he remarked that the explanations in the book were related to diffraction, and the explanation there was very different from the Fourier transform.

    • In short, yes. An ideal image source incident on a positive optical lens produces its spatial Fourier transform at the lense's focal point. This is easiest to see with a lasersl backlighting a transparency, since the light is collimated and monochromatic. The transparency produces diffraction at its edges, which causes the effect. Actually, you'd also see the spatial Fourier transform at infinity if you took away the lens. The result of this is that you can do cool spatial frequency filtering effects at the focal point, then convert it back into an image with another lens. Laser systems that require high precision will use such a setup to remove high-frequency components and pass just the collimated light.

  • Pinhole lenses create visible diffraction effects pretty fast. Actually, even normal lenses cause diffraction at small ~f/11-f/22 apertures.

  • I suspect the GP comment is referring in context to the use of the Fourier transform to efficiently implement convolution.

> captures depth information and you can use it for 3d reconstruction, refocusing etc

That’s crazy cool! Got any good links for reading about how to do those things that way; 3d reconstruct and refocus?