如何找出ios中相机的焦距和传感器高度是多少? [英] How to find out focal length of camera in ios and what is the sensor height?

查看:297
本文介绍了如何找出ios中相机的焦距和传感器高度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了每个地方以找到相机的焦距及其后传感器高度。
但我没有得到任何具体细节。

I had searched every where for finding focal length of the camera and its back sensor height. But I didn't get any specific detail.

我正在开发一个应用程序,它将从可见的高度计算一个真实世界对象的实际高度从ios相机拍摄的图像。

I am developing one app which will calculate the actual height of an real world object from the height visible in the image captured from an ios camera.

到物体的距离(mm)=

distance to object (mm) =

焦距(mm) *物体的实际高度(mm)*图像高度(像素)----------------------------------- ----------------------------------------

物体高度(像素)*传感器高度(mm)

focal length (mm) * real height of the object (mm) * image height (pixels) ---------------------------------------------------------------------------
object height (pixels) * sensor height (mm)

这里我将对象的距离设置为静态,图像高度以像素为单位。现在我需要焦距和传感器高度来找出真实的物体高度。

here I am having the values distance to object as static, image height in pixel. Now I need focal length and sensor height to find out the real object height.

提前致谢。
bskania

Thanks in advance. bskania

推荐答案

解决此问题的方法。

首先拍摄一个真实世界的物体及其尺寸,即高度和宽度。(焦炭手杖的例子)
现在快速拍摄你想要测量的物体。
对于iphone或ipad,焦距固定为25mm。
现在构建要在快照上测量的对象,并根据要测量的对象重新调整真实世界的焦炭图像大小。

First take one real world object and its measure i.e. height and width.(example of coke cane) Now take a snap of the object that you want to measure. For the iphone or ipad the focal length is fixed to 25mm. Now frame the object that you want to measure on a snap and re-size the real world coke cane image according to the object you want to measure.

使用公式

object_distance =(焦点* real_object_height)/ object_height;

object_distance = (focal * real_object_height)/object_height;

这里,real_object_height =焦炭甘蔗高度;
和object_height =焦炭尺寸重新调整高度

here, real_object_height = coke cane height; and object_height = coke cane re-sized height

并相应地使用公式测量对象的高度

and accordingly measure the height of object using equation

height_of_frame =((obj_distance)* measured_object_height_in_mm / 1000.0))/焦点;

height_of_frame = ((obj_distance) * measured_object_height_in_mm / 1000.0))/focal;

width_of_frame =((obj_distance)* measured_object_width_in_mm / 1000.0))/焦点;

width_of_frame = ((obj_distance) * measured_object_width_in_mm / 1000.0))/focal;

这样你就可以找到物距和它的尺寸。
,但你需要两个静态数据,即你正在使用的相机焦距和一个真实世界物体要比较的尺寸。

this way you can find out the object distance and its measure. but you need two static data i.e. focal length of camera which you are using and the one real world object measure to compare.

谢谢,
bskania。

thanks, bskania.

这篇关于如何找出ios中相机的焦距和传感器高度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆