Search Unity

Difference between AR view and return from cameraManager.TryGetLatestImage

Discussion in 'Handheld AR' started by vertis_winters, Sep 5, 2019.

  1. vertis_winters


    Jun 8, 2019
    I'm working on an ARFoundation app on iPhone and the image aspect ratio that is displayed in the 'live preview' is different from what is returned from TryGetLatestImage. As far as I can tell the live feed is cropping the top/bottom to allow it to appear fullscreen on my device.

    However, given that my app is saving these photos I would rather have the full frame in the live preview (and a black border if necessary) so that both images are consistent.

    I'm a little unsure how to accomplish this. Sending the camera output to a Render Texture(and canvas) sized to be the correct aspect ratio results in squashing (and the UI components go nuts as well).

    I am currently using ARFoundation 2.1.1 and ARKit Plugin 2.1.1