0

I want to set the focus of the camera to be a fixed value (in my case 6"). Objects that are 6in from the camera will be in focus and anything else will be out of focus.

But I don't see any way to hook into the focus value of the iphone camera. You can turn the autofocus on and off or even focus to a point in your image, but that will not work in my case.

Any thoughts?

Can you force the focus of the camera to be a given distance?

jmel
  • 5
  • 3

1 Answers1

0

No. You can't currently set the focus distance manually in iOS. There are no public APIs to do so.

Wildaker
  • 2,533
  • 1
  • 17
  • 19
  • "public API" , is there something available? or anywhere within the AV library? – Michael Lorenzo Dec 06 '14 at 01:46
  • As of iOS 8 you can set the focus distance manual at any point between the minimum (0) and the maximum (1), but you can't do this in feet or metres; and that's a hardware restriction rather than an API limitation—the lens is adjusted using a spring, and the capabilities of that spring can vary over time, in different atmospheric conditions and so on, making "minimum" and "maximum" variable quantities. – Wildaker Dec 07 '14 at 07:16