# Can The Function of a Lens Be Emulated By Computers?

**URL:** <https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713>\
**Category:** Factual Questions\
**Created:** [June 20, 2007, 2:39pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713 "2007-06-20T14:39:21Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 20, 2007, 7:53pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/21 "2007-06-20T19:53:52Z")

</div>

I seem to recall one of the recent comet probes (Deep Impact, or more likely the Japanese one) that got into space with a dodgy camera. Eventually the engineers computed a deconvolution function to refocus the images (but they had all the physical details of the lens system to work off).

And last year some researchers developed a (sort of) lensless camera. Similar to Mangetouts proposal - a fixed single lens, then a grid array of small lenses focussing multiple images onto a sensor - the [Plenoptic Camera](http://www.wired.com/science/discoveries/news/2005/11/69594). This allows software refocussing of the image.

So it is possible.

Si

---

<div class="post-metadata">

**Author:** ![Fear\_Itself](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/fear_itself/32/19637_2.png) [@Fear\_Itself](https://boards.straightdope.com/u/Fear_Itself)\
**Post date:** [June 20, 2007, 8:04pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/22 "2007-06-20T20:04:02Z")

</div>

[QUOTE=si\_blakely]  
And last year some researchers developed a (sort of) lensless camera. Similar to Mangetouts proposal - a fixed single lens, then a grid array of small lenses focussing multiple images onto a sensor - the [Plenoptic Camera](http://www.wired.com/science/discoveries/news/2005/11/69594). This allows software refocussing of the image.

So it is possible.  
[/QUOTE]  
I don’t see how a camera with many lenses qualifies as a lensless camera.

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 20, 2007, 8:19pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/23 "2007-06-20T20:19:19Z")

</div>

[QUOTE=Fear Itself]  
I don’t see how a camera with many lenses qualifies as a lensless camera.  
[/QUOTE]  
Fair comment - but the lenses are fixed and simple - no moving parts. The grid array probably does not even need to be perfect - I expect you can reprogram the parameters of the software to account for the variations of each lens.

This solution trades off sensor resolution for the refocus ability - it starts with a 16Meg sensor, but the final images are much less than that. You effectively get 90000 178pixel images each from a slightly different angle. These are then combined by the software and refocussing can be done.

Si

---

<div class="post-metadata">

**Author:** ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)\
**Post date:** [June 20, 2007, 8:30pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/24 "2007-06-20T20:30:50Z")

</div>

I agree with FI – this IS a lensed system. You can take plenty of perfectly servicea\ble pictures with a fixed-focus camera right now. Virtually all disposable cameras work this way. The OP seems to be asking for a system without any lenses at all, not for one that replaces a movable lens with something else.

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [June 20, 2007, 9:05pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/25 "2007-06-20T21:05:01Z")

</div>

[QUOTE=CalMeacham]  
I agree with FI – this IS a lensed system. You can take plenty of perfectly servicea\ble pictures with a fixed-focus camera right now. Virtually all disposable cameras work this way. The OP seems to be asking for a system without any lenses at all, not for one that replaces a movable lens with something else.  
[/QUOTE]  
The OP asked if a computer could act as the focusing element - with the PlenOptic camera, the software can refocus the image after it has been captured. To do this, you need additional information. The sublenses create the additional info for the software to use. Not lensless - but software focus.

Si

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [June 20, 2007, 10:23pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/26 "2007-06-20T22:23:14Z")

</div>

[QUOTE=Fear Itself]  
I don’t see how a camera with many lenses qualifies as a lensless camera.  
[/QUOTE]

If the lenses are fixed and simple, it ought to be possible to do something similar with pinholes. Or just individual sensors mounted at the bottom of really narrow, very carefully-aimed tubes so as to capture the light incoming from one part of the scene only.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 20, 2007, 10:39pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/27 "2007-06-20T22:39:29Z")

</div>

For visible light imaging, lenses (or mirrors) are cheap and simple enough that there’s no need for other systems. But for very high energy light, like extreme X-rays or gamma rays, it’s difficult or impossible to make optical focussing elements, so there, you do need to use some clever lensless systems. The RHESSI solar telescope, for instance, which operates in the extreme X-ray range, uses several sets of slatted opaque grids which it moves relative to each other, and records the changes in intensities for each grid confguration. Assuming that the source changes only slowly compared to the timescale on which the grids are moved, and that it’s relatively simple (ideally, consisting of a small number of discrete point sources), an image of the sources (and even spectra of them, I think) can be deconvolved from the data.

But even though it doesn’t have lenses, you still need _something_ in front of the detector (the grids of slats, in this case). You can’t just stick the CCD out there (or rather, you can, but you’d basically just have a full-sky photometer, which can be done much more easily in other ways).

---

<div class="post-metadata">

**Author:** ![Happy\_Fun\_Ball](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/happy_fun_ball/32/17664_2.png) [@Happy\_Fun\_Ball](https://boards.straightdope.com/u/Happy_Fun_Ball)\
**Post date:** [June 20, 2007, 10:41pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/28 "2007-06-20T22:41:18Z")

</div>

[QUOTE=Mangetout]  
If the lenses are fixed and simple, it ought to be possible to do something similar with pinholes. Or just individual sensors mounted at the bottom of really narrow, very carefully-aimed tubes so as to capture the light incoming from one part of the scene only.  
[/QUOTE]

This has done with pinholes. A Shack-Hartmann wavefront analyzer uses lenses, but before these were popular their was a version that used pinholes. I can’t remember what it was called. All of these devices are used to retrieve phase information by taking the Fourier transform of the field…

---

<div class="post-metadata">

**Author:** ![scm1001](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scm1001](https://boards.straightdope.com/u/scm1001)\
**Post date:** [June 20, 2007, 11:14pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/29 "2007-06-20T23:14:25Z")

</div>

nothing to add to the discussion but just to say this is how good science often works. Take a suggestion that on the face of it is silly or doesnt seem to make sense (can one make a camera without conventional lenses using computer hardware or software) and one ends up with all sorts of interesting devices mentioned here (phased arrays. mirror arrays etc)

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [June 20, 2007, 11:39pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/30 "2007-06-20T23:39:19Z")

</div>

Yes, it’s a useful thinking tool - posit removal of a supposedly essential component, or challenge an absolute.

---

<div class="post-metadata">

**Author:** ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)\
**Post date:** [June 21, 2007, 12:10pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/31 "2007-06-21T12:10:50Z")

</div>

Even in the extreme X-ray and Gamma Ray tregions, you can still use grazing-angle reflections (At a low enough angle, anything becomes a good mirror), so for a long time they used steep parabolic mirrors to focus higjh-energy radiation.

When I say “lens” above, I refer to any positive optical element, be it lens, mirror, gradient index optic, holographic lens, binary lens, fresnel lens, zone plate, or what have you.

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [June 21, 2007, 2:08pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/32 "2007-06-21T14:08:12Z")

</div>

[QUOTE=CalMeacham]  
Even in the extreme X-ray and Gamma Ray tregions, you can still use grazing-angle reflections (At a low enough angle, anything becomes a good mirror), so for a long time they used steep parabolic mirrors to focus higjh-energy radiation.  
[/QUOTE]  
That is how the Chandra X-ray telescope works to focus Xrays. A series of very slightly tapered tubes to make part of a parabola.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 21, 2007, 8:05pm UTC](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713/33 "2007-06-21T20:05:54Z")

</div>

I seem to recall that there’s some problem even with grazing-incidence mirrors, for a mission like RHESSI, but I can’t recall what it was. You can, however, use a pinhole for absolutely anything, but then you’re faced with the problems of a very small aperature (so unless you have a very bright source, you need very long exposure times).

[Previous page](https://boards.straightdope.com/t/can-the-function-of-a-lens-be-emulated-by-computers/408713.md?page=1)
