iOS 4.2,寻找操纵 iPhone 4 相机焦距的方法

发布于 2024-10-04 21:50:38 字数 505 浏览 0 评论 0原文

我正在从事一个 AR 项目,我们想要操纵 iPhone4 摄像头的对焦距离。这可能吗?到目前为止,我们发现只有切换和自动对焦作为此处列出的选项:http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureDevice_Class/Reference/Reference.html%23 //apple_ref/occ/instm/AVCaptureDevice/isAdjustingFocus

预先感谢您的任何提示! :)

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! :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若水般的淡然安静女子 2024-10-11 21:50:38

关于 API,似乎唯一支持的操作是:
- 检查设备是否支持 AF(我认为仅限 iPhone 3GS 和 4)
- 启用/禁用自动对焦
- 设置兴趣点,不是距离,而只是相机视图中的一个点。

当然不是你想做的事。

私有 API 可能支持...但这不会通过验证过程。

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.

美羊羊 2024-10-11 21:50:38

解决方法可能是查看用户稍微移动时移动了多少像素,以了解图像某些部分的距离,然后根据该情况将自动对焦点设置为更近或更远的图像区域。

但是,如果可能的话,还要提交一份雷达票,请求访问以指定焦距 - 如果有足够多的人要求苹果将其添加到 API 中。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文