How Autofocus Works - Computerphile

preview_player
Показать описание
Why are some cameras faster to focus than others? Dr Andy French explains the different approaches the computers inside cameras use to focus.


This video was filmed and edited by Sean Riley.


Рекомендации по теме
Комментарии
Автор

It never ceases to amaze me how autofocus can focus on a tiny scratch on an aircraft window rather than the scene outside.

ukar
Автор

Couple additional pointers: On sensor phase detection is also provided by other manufacturers than Canon, but with different approach. Canon uses those dual pixels, which are two separated diodes. Others use a mask that blocks different half of two adjecent pixels, providing either the "upper beam" or the "lower beam" that went through the lens. These masked pixels are then compensated computationally on the final image, so you cannot see them.


Also, the phase detection is fast, but not really that precise due to the error sources involved such as imperfections on the lenses like chromatic aberration and lens's autofocus motor calibration vs. the phase detection array position. Contrast detection is less error prone, and does not need the lens autofocus motor to be calibrated, as the focus is done on the final imaging device (the sensor).


The best on sensor autofocus uses both methods - it first figures out the distance and direction where to focus with phase detection, but leaves focus a tiny bit out of focus in that known direction. Then the contrast detection is used to find the strongest contrast from that point forward. The end result is fast and accurate (not as fast as phase detection only, but with modern calculation speeds, the difference is not big).

akkual
Автор

Video is quite wobbly so I assume, next video will be about stabilization.

pvc
Автор

FYI: He is saying "phase detection", not face detection.

ahhashim
Автор

1:26 I once built my own active system by fitting a bazooka to my camera. It worked quite well because after it had, _”fired something out from the camera”, _ whatever was left of the original subject was far enough away I could just set focus to infinity.

bakedutah
Автор

Riley makes a video on Autofocus. Oh, the ironing.

blackhatguy
Автор

Man, PhotonicInduction has really changed a lot over the years.

StevenOBrien
Автор

3:57 You might want to turn down the exposure 1 or 2 Stops next time you film a sheet of paper with direct lighting on it

JensUhlmannOfficial
Автор

That's pretty interesting! I remember an older film camera having a circular focus assist in the middle, IIRC it could use it to autofocus, but you could also use it for manual focus - it was seemingly showing different focus levels on each half of the circle, and you'd know you're in focus when you can't distinguish one half from the other. I guess that was phase detection! It also reminds me a bit of how gamma adjustment is done on computer screens nowadays :-)

cheaterman
Автор

A photographer that doesn't use a Mac, I appreciate that

Decco
Автор

In the older pre-SLR days, there was also split field range finders which I always found easier to use than focus field ranging.

cowboyfrankspersonalvideos
Автор

Thank you for this video! As a photography amateur, I've been really interested it understanding the difference between phase detection and other focus mechanisms so I am really glad you chose this topic for a video. However I have to say I really didn't get how it works based on the diagrams you showed. Why does it need a separate sensor? Why is the sensor only one dimensional? How do the two images appear on the two sensors separately...?

aspzx
Автор

Quite a long time ago, I had to write an autofocus program for a microscope stage. I believe the way I did it was to apply a Gaussian blur to the image, subtract the blurred image from the original image and then try to maximize that difference. Similar to this algorithm I guess, but didn't need to decide a direction for subtracting neighboring pixels.

dfs-comedy
Автор

ImageJ is a free software that is getting me through grad school right now

scrtpassword
Автор

FYI : Dual Pixel is EXTRA USEFUL in video cameras, since you always are in "liveview".

luppano
Автор

Quite often you want to discover the structure in your image, not just in X and Y, but also in Z (depth), then apply rules to choose where and how to focus. Here is where the hunting of contrast detection stops being a liability and becomes a benefit, and where the whole-scene processing of contrast detection gains power of the (generally) linear strips of phase detection.

Simple or naive contrast detection algorithms use differences within neighborhoods surrounding a central pixel, which is equivalent to passing an oriented bandpass filter across the image. Why not capture **all** the frequencies in the image? This can be done using a Fourier Transform, one common formulation of which is the FFT. Taking three quick FFTs at slightly different focus settings can reveal an immense amount of information that can then be processed to extract 3-dimensional geometry.

You not also get the static structure of the view, but you can also do things like object tracking without knowing what the object "is", relying on the operator to simply indicate a region of interest to track and keep in focus.

While FFTs are great for auto-focus, they can be a bit heavy for object detection and tracking. This is where MPEG4 algorithms such has H.265 help out. Even if you are capturing your image or video as "Raw" data, the autofocus/autotracking feature is often using the video compression subsystem in the background to do its job. Which is why many cameras offer "Raw+Compressed" options, since it's doing the work anyway, letting the user decide how best to use the available storage space.

bobcunningham
Автор

Brilliant! Something I always wondered. Detailed and clear

MrVipulLal
Автор

FYI he's saying PHASE detection, not FACE. It took me a while to figure it out and confused me at first.

noisycarlos
Автор

This explains why a camera with low dynamic range struggled to focus in darker areas.

Skund
Автор

Very clear explanation, interesting and informative, thank you!

TommiHimberg