Measuring distance with iPhone camera

前端 未结 3 1359
悲&欢浪女
悲&欢浪女 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条回答
  •  粉色の甜心
    2021-02-20 04:17

    Well you do have something for reference, hence the use of the card. Saying that after watching the a video for the app I can't seem it seems too user friendly.

    So you either need a reference of an object that has some known size, or you need to deduct the size from the image. One idea I just had that might help you do it is what the iPhone's 4 flash (I'm sure it's very complicated by it might just work for some stuff).

    Here's what I think.

    When the user wants to measure something, he takes a picture of it, but you're actually taking two separate images, one with flash on, one with flash off. Then you can analyze the lighting differences in the image and the flash reflection to determine the scale of the image. This will only work for close and not too shining objects I guess.

    But that's about the only other way I thought about deducting scale from an image without any fixed objects.

提交回复
热议问题