到“兴趣点”的距离在 iPhone 自动对焦中
在iphone中,我想计算相机到拍摄对象的距离。
我想知道也许 iPhone 相机的“主动自动对焦”为我提供了到拍摄对象(兴趣点)的距离?
非常感谢。
PS 如果你们认为这是不可能的,请告诉我;)
In iphone, I want to calculate the distance from the camera to the subject.
I was wondering maybe iphone camera's "Active Auto Focus" provide me the distance to the subject (point of interest)??
many thanks in advance.
p.s. guys if you think it is not possible plz let me know ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,这是不可能的 - 请参阅 此处 了解有关您可以执行的操作和操作的更多信息做不到。您可以判断相机何时自动对焦,但仅此而已。
我确信您可以使用私有 API 调用获得有关焦点/距离的更多信息 - 但除非您不担心进入 App Store,否则这并不是一个真正的选择。
但这并不意味着没有其他方法。看起来关于这个主题的讨论很好:Distance using OpenCV(您可以为 iOS 编译 openCV!)
As far as I'm aware, it's not possible - see here for more info on what you can and can't do. You can tell when the camera is autofocusing, but nothing more.
I'm sure there is probably some more info you can get on focus/distance using a private API call - but unless you're not worried about getting on the App Store, it's not really an option.
That doesn't mean there's not another way though. Looks like a good discussion on the topic here: Distance using OpenCV (you can compile openCV for iOS!)
我一直在研究相机测量短距离的能力,但没有发现任何东西,但我在黑暗中想出了这张照片。我还没有尝试过,但文档让我认为这可能会起作用:
喜欢听听是否有人已经尝试过能够使用这样的方法来进行精确(小于 1 英尺)的距离测量。
I've been investigating the ability of the camera to measure short distances and not finding anything yet I came up with this shot in the dark. I haven't tried it yet, but the docs make me think this might work:
Love to hear if anyone has been able to use a methodology like this to be able to make accurate (less than 1 foot) distance measurements.