I was wondering how auto-focus works in mobile cameras. I understood that, mobile phones uses either 'contrast based' or 'phase-detection based' algorithms to find the optimum length position for maximum sharpness of the image frame.
So, In my iPhone 12, I conducted one experiment.
- I shot an image of subject which is close enough. So, auto-focus worked, only subject was sharp, and background was blurred.
- I shot another image in which is subject was far. I tapped on the subject for focus. And subject was sharp and near by objects were blurred.
Then I checked the metadata, and found that, both the cases focal length was 26mm only. Only there was small difference in ISO and shutter speed (may be due to light intensity)
My question is, How iPhone (any phone for that matter) is able to auto-focus without changing the focal length?
I know that, even aperture can be used to get the focus (depth of field), but I believe, aperture is fixed in iPhone (and most of the mobile phones).
edit: This question didn't completely answer my question. I am mainly looking for how camera (specially smartphones) focuses without changing focal length (and have fixed aperture)