V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
LinChiSin
V2EX  ›  问与答

iOS 怎么获取最新系列 iPhone 后置相机准确的视场角数值(field of view, FOV) ?

  •  
  •   LinChiSin · 2020-09-11 15:02:13 +08:00 · 966 次点击
    这是一个创建于 1359 天前的主题,其中的信息可能已经有所发展或是发生改变。
    虽然已知 AVCaptureDevice 下 activeFormat.videoFieldOfView 可以提供系统 API,但是经过实测效果有些差。

    同时,我还找到了苹果的一份历史文档( https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Cameras/Cameras.html#//apple_ref/doc/uid/TP40013599-CH107-SW15 ),列举了到 iPhone X 在各种相机格式下的 FOV 。

    经实际测试,其列举的数值与系统 API 提供的数值有偏差,并且在我的测试表现中,这个表格提供的数值比系统 API 更准确。

    举例来说,文档中记录的 iPhoneX 在 1280*720 下,FOV 是 60.983 。


    但是系统 API 给的 activeFormat.videoFieldOfView 给的结果是:69.654 :

    '''
    Active Format: <AVCaptureDeviceFormat: 0x2815080f0 'vide'/'420v' 1280x 720, { 1-240 fps}, fov:69.654, binned, supports vis, max zoom:67.50 (upscales @1.50), AF System:1, ISO:24.0-960.0, SS:0.000045-1.000000>

    ''''


    所以,这里有两个疑问🤔️:

    1.为什么苹果提供的历史表格文档会与系统 API 输出有出入,并且准确度不一?

    2.上述历史文档中只到 iPhone X 机型,怎么才能找到最新机型系列( iPhone XR/XS/11/11Pro 等)的文档?

    求大神解答,谢谢 !
    1 条回复    2020-09-12 14:18:10 +08:00
    LinChiSin
        1
    LinChiSin  
    OP
       2020-09-12 14:18:10 +08:00
    up 一下
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   917 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.