Search Unity

ARImageReference rectangular image support

Discussion in 'AR' started by Mal_Duffin, Nov 17, 2018.

  1. Mal_Duffin

    Mal_Duffin

    Joined:
    Jan 22, 2015
    Posts:
    71
    When creating an ARImageReference for ARKit, you specify two dimensions for the physical size ( see https://developer.apple.com/documentation/arkit/arreferenceimage/2941027-physicalsize, and https://developer.apple.com/documentation/coregraphics/cgsize )

    Unity only allows you to enter one physical size, and so assumes the image is square. As most images are rectangular, this imposes quite a constraint on the detection.

    Are there any plans to enable the entry of both sizes ( or at least identify if the physical size entered is for the length or height of the image, and the other value gets calculated based on the aspect of the source image ).
     
  2. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    @Mal_Duffin Hey are you able to rotate and zoom in the Augmented objects?
     
  3. jimmya

    jimmya

    Joined:
    Nov 15, 2016
    Posts:
    793
    You enter the smaller physical dimension and using the aspect ratio of the image, XCode deduces the larger dimension. See https://developer.apple.com/documentation/arkit/arreferenceimage/2942251-init
     
  4. Mal_Duffin

    Mal_Duffin

    Joined:
    Jan 22, 2015
    Posts:
    71
    Thanks for the info jimmya!