eli5 Why do camera lenses need to focus on something? Why can’t they just render an image in which everything is clear?

593 views

Or maybe only some types of lenses work like that?

In: 281

16 Answers

Anonymous 0 Comments

Every type of lens works like that, including your eyes.

Lenses take light rays entering them and force them to converge at a single point. Exactly how far this point is from the lens depends on the angle of the light rays entering the lens, and so it depends on how far away the source of the light is from the lens.

The image sensor in a camera is a single flat plane, and so only light sources from a single plane are ever in focus, if the light source is further away then the light gets focused in front of the sensor, if it the light source is closer than the focus distance then it gets focussed behind the sensor.

There is a caveat to this in that while only one distance away is perfectly in focus, there is a range of distances which are close enough that they are indistinguishable from if they were in focus. The size of this range is the Depth of Field (DoF). Lenses with very narrow openings have a very deep DoF, lenses with very wide openings will have a very shallow DoF. The reason for this comes from the idea of a pinhole camera, if you force light through a small opening it will naturally become focused due to the restriction of possible angles.

Anonymous 0 Comments

Imagine light coming from objects are a bunch of people with paintball guns firing their guns randomly at a wall. In no way from the splatter could you make out an image of where the guns were shooting from even if everyone had their own color.
Now put infront of that wall, another wall that has a hole in the middle. Only the bullets going through that hole would wind up hitting the other side. Those few bullets would form a pattern mirroring where the original shooter was standing. You then could create an approximate image of the scene.
This is a pinhole camera. Later it was discovered that you could funnel a much bigger area then a single hole into the target. The issue is that the lense funnel unlike the pinhole camera takes a wide section of light and throws it backwards into a smaller section.
A good example would be a horizontal line of shooters all shooting straight (think about say the opening throw of dogeball). It can take that volley, shrink it down into a mirrored volley on a tiny canvas. If someone was behind the line throwing it over the heads of the guys in front, it woold be hard to tell where it’s coming from.

Anonymous 0 Comments

The only type of optic that doesn’t need to focus is the [pinhole](https://en.wikipedia.org/wiki/Pinhole_camera#History). It’s just a small aperture, and light travels straight through it (ideally).

But a pinhole only lets a tiny amount of light through. So it can take hours to collect enough light for a photo. If you want to take a photo more quickly, you need to use a larger aperture, and use some device to bend the path of light so it all converges onto a point. The amount of bending necessary to accomplish this depends on the distance to the subject.

Anonymous 0 Comments

Lenses capture many rays of light, but since light reflects off of many different things at once, the rays can mix together and appear blurry.

Focusing a camera basically redirects all the wrong light rays and only lets in light from a specific place, or depth.

[This diagram might help.](https://physics.highpoint.edu/~jregester/potl/Waves/Cameras/pinholecamera.png)

Imagine trying to fill a bathtub with a soda fountain. All the different sodas mix together and you’d have a muddy mixture. Now imagine if you had a hose you could hold under a specific nozzle and only fill the tub with your favorite soda. That’s focusing.

Anonymous 0 Comments

All lenses work like that. The basic idea is that light changes direction when it crosses an interface (place where substances change, like from air to glass, and back from glass to air), and if that interface is not flat, then the light that hits the surface at different locations will turn to different directions (how much depends on the light wavelength and the nature of the different materials). Lenses only work as magnifying (or shrinking) devices because they are made to concentrate the light down to a point.

The very reason that lenses are used is because of this very detail, that we can concentrate light from a wide area and focus it down to a small area. It is a form of magnification. Thus, your piece of film does not have to be the size of whatever you are trying to image. The lens shrunk it all down to fit on that small square.

The distance behind the lens (far side from whatever is being looked at) when the image is perfectly focused to the size of the viewer depends on a lot of things. The important thing to consider though, is that the light is no longer coming in parallel, but that the lens has forced it into a cone shape, and the “focus” point is the point of that cone. This is where ALL the light will come together.

When you take an image via a camera, you do not want to capture the point where ALL light comes together (like burning ants with a magnifying glass), but where the are of image being taken matches the down-size area of the film square (or whatever is used). You have to focus it to that plane (move the lens forward or backward a bit) or the different light waves do not match and the image is blurry (light comes in from different parts of the lens to the same place, so looking backward, you see the thing at different places, it is blurred).

Poorly-made lenses, including the human eye, can fail to focus to a point, and instead the zone of focus is a star (t-shape) or a linear blob. This aberration to the image is called astigmatism, and people like me who suffer from this problem do not see lights as points, but instead they look like lines or the letter t in detail, unless we are wearing glasses to help fix it. So we squint, to squeeze our eye lens and change its shape a little in an effort to get rid of the blurriness.

And that is about all I can do for basic optics without paper to draw on and show you how the light behaves and why there is a focal point in an ideal lens, and taking you to a wave tank and playing with water waves and how changing depths causes them to “Bend”.

Anonymous 0 Comments

You can do this. The device you need is called a “light field camera”. This [article on one](https://www.cnet.com/tech/computing/lytro-illum-changes-the-focus-of-a-picture-even-after-youve-taken-it/ ) talks about artistically adjusting focus after you’ve takel the picture, but “all in focus” is a choice.

The camera is mome expensive and the pictures take a lot of bits to store, so this isn’t going to be the default.

Anonymous 0 Comments

[Light field cameras](https://en.wikipedia.org/wiki/Light_field_camera) can do that, but sadly they are pretty niche. They achieve this by having a [microlens array](https://en.wikipedia.org/wiki/Microlens) inside, providing directionality. Here’s a (https://www.youtube.com/watch?v=rEMP3XEgnws) about how they work.

Anonymous 0 Comments

For things that a far away, the rays of light entering a lens are all almost exactly parallel, no matter how far away the object sending the rays. The lens bends those rays and puts them together to form an image behind the lens.

For objects close to the lens, those rays are not all parallel. If you are standing looking at a nearby tree, rays from the top of the tree come into your eye from above and the rays from the bottom of the tree come in from below. For nearer trees, that spread is larger than for trees farther away. Because the rays enter the lens of your eye with different spreads, the lens can’t create images of the nearer tree and fartherer tree at the same place and one has to be fuzzy.

Anonymous 0 Comments

The single word explanation of why one cannot focus everything is ‘aberration’. Aberration is all of the little errors that happen to screw up the image. As u/whyisthesky mentioned, geometry is one of the biggest issues. Your camera lens is a one size fits all arrangement and it is not matched to the shape of your object. You can get a perfect image, at least geometrically, if the shape of your lens “matches” the shape of the object. (You won’t ever get a perfect image, but you hopefully get the idea.)

Color is another common aberration because each color of light moving from the object to the camera will have a different focal position. You can see this in some images because some colors will be out of focus.

All of the aberrations in the object/camera system add up to an image where you have to focus as best you can and usually that means you focus on a particular part of the object, e.g. the face of a person instead their entire body.

Anonymous 0 Comments

With enough light, and a narrow-enough aperture, lenses can focus on almost everything at once.

Explaining this simply requires simple diagrams and practical demonstrations that unfortunately cannot be easily described. Look up “depth of field” and “aperture” for the simple diagrams.