Measuring distance with iPhone camera

前端 未结 3 1335
悲&欢浪女
悲&欢浪女 2021-02-20 03:50

How to implement a way to measure distances in real time (video camera?) on the iPhone, like this app that uses a card to compare the size of the card with the actual distance?<

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-20 04:33

    I like Ron Srebro's idea and have thought about something similar -- please share if you get it to work!

    An alternative approach would be to use the auto-focus feature of the camera. Point-and-shoot camera's often have a laser range finder that they use to auto-focus. iPhone doesn't have this and the f-stop is fixed. However, users can change the focus by tapping the camera screen. The phone can also switch between regular and macro focus.
    If the API exposes the current focus settings, maybe there's a way to use this to determine range?

提交回复
热议问题