Search Unity

Resolved How to get the physical camera sensor size on iOS / Android

Discussion in 'AR' started by cgtinker, Nov 29, 2020.

  1. cgtinker

    cgtinker

    Joined:
    May 6, 2019
    Posts:
    8
    I'm trying to get the physical camera sensor size on iOS and Android mobile devices for intrinsics calculations.

    On Android the sensor size should be found in the SENSOR_INFO_PIXEL_ARRAY_SIZE (Android CameraCharacteristics API). However I don't find a way to access that array via ArFoundation. I can imagine to write a plug-in for that, but I would also require a plug-in for iOS so I don't know if that's the right way to go.

    Is there maybe another (easier) way to get the physical sensor size?
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,142
  3. unity_carlos_vasquez

    unity_carlos_vasquez

    Joined:
    May 24, 2020
    Posts:
    2
    I understand TryGetIntrinsics gives you the (a) focal length, (b) principal point, and (c) the image resolution, all three in pixels. @cgtinker may be you are looking for the actual sensor width and height in mm?