# Why do cameras go in and out of focus? Why can’t everything just be in focus?

37 views
0

Why do cameras go in and out of focus? Why can’t everything just be in focus?

In: 3

Some types of cameras can always be in focus, but the problem of focus comes from the physics of how your typical camera works.

In short, a large three-dimensional space must be projected onto a small two-dimensional image (the sensor). This is typically achieved by a combination of lens and mirrors. Let’s focus on the lens as the main mechanism.

The focus depends on the type/curvature of the lens, the position of the object, the position of the lens, and the position of the sensor. Notice that of these, when we move the focus ring, we only change the position of the lens. At an appropriate position for a nearby object, the far-away object is no longer properly focused; and vice versa.

The imagery here helps to illustrate this:

https://www.bhphotovideo.com/explora/photography/tips-and-solutions/how-focus-works

Fun Fact: Our eyes aren’t always in focus, either. They’re just really fast and efficient at going in and out of focus.

With a typical still or movie camera, you have a lens system that focus light from the field onto a flat sensor.

https://www.physicsclassroom.com/class/refrn/Lesson-5/Converging-Lenses-Ray-Diagrams

The diagrams here show light passing through opposite sides of a lens. If you narrow that lens opening further and further you get a pinhole camera: https://en.wikipedia.org/wiki/Pinhole_camera

But pinhole cameras are pretty dim because the hole that light passes through is so small. In photography this is the **aperture** component of exposure. The smaller the aperture the more that appears sharp. This is called **depth of field**. There is a tradeoff of much light passes through for a given amount of time. The other components are shutter speed (how long the film or sensor is exposed) and how sensitive said film or sensor is.

But why *should* everything be in focus with a camera? Shallow or deep depth of field can be an artistic choice. Portrait mode on smartphone cameras simulates the background blurring that’s otherwise only possible with larger lenses.

Because of physics, basically. The way light has to pass through your camera’s aperature and lens. It’s fairly hard to describe how a camera works in an ELI5 way, with no visual aids.

But to achieve the best possible chance of having most of the image in focus, you want to have bright light so outside and sunny and shoot images that are further away.

The less light you have, and if you have a photo that mixes really close stuff and far stuff together, it makes it nearly impossible to have everything in focus, without some specialized camera.

The camera is seeing the world through a circular lens and any light reaching that circle helps form the image. The right side of the circle sees the world from a slightly different point of view than the left side. The image you get is an average from every point of view on the lens.

Focus allows you to correct for the different points of view but it only works for a small range of distances. Objects within that range will be in sharp focus.

Big lenses have the worst problem because the range of points of view is greater. Lenses can be “stopped down” to let in less light and this makes focusing less critical; you have a greater “depth of field”. Stopping down will happen automatically in bright lighting conditions, so outdoor shots on a sunny day tend to be all in focus but, in a dark scene, focus is critical and more of the image tends to be blurry.