iOS 4.2, looking for a way to manipulate the iPhone 4 camera's focus distance
Asked Answered
H

2

6

I am working in an AR project, and we want to manipulate the focusing distance of the iPhone4 camera. Is this even possible? So far, we've found just toggling and auto focusing as options listed here : http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html%23//apple_ref/occ/instm/AVCaptureDevice/isAdjustingFocus

Thanks in advance for any tips! :)

Hodometer answered 30/11, 2010 at 0:38 Comment(0)
M
4

Regarding the API it seems that the only supported actions are: - check if AF is supported on the device (iPhones 3GS an 4 only I think) - enable/disable AF - set the point-of-interest that is NOT the distance, but only a point in the camera view.

Certainly not what you want to do.

Might be supported in private API... but that would not pass the validation process.

Minimalist answered 2/12, 2010 at 15:36 Comment(0)
V
0

A workaround might be to see how much pixels move as the user shifts slightly, to get a sense of how distant some parts of the image are, and then set the AF point to a region of the image either closer or further based on that.

But, also file a Radar ticket requesting access to specify the focus distance if possible - if enough people ask Apple will add it to the API.

Valgus answered 7/12, 2010 at 6:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.