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 ;)
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!)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With