Search Issue Tracker

Duplicate

Fixed in 2018.4.X, 2019.4.X

Votes

14

Found in

2019.2.17f1

Issue ID

1207427

Regression

No

PhotoCaptureFrame Fails to Provide Camera Matrices on HoloLens 2

XR SDK

-

1. With the same Unity App built on top of Unity PhotoCapture and PhotoCaptureFrame API, it is able to take photo and retrieve CameraToWorld and CameraProjection matrices on HoloLens 1. The app works fine taking photo data, however, always fails to provide CameraToWorld and CameraProjection matrices on HoloLens 2.

2. How we can reproduce it using the example you attached
1) Have Windows SDK 18362 and VS2019 installed
2) Load UnityPhotoCapture scene into Unity 2019.2.17f1
3) Choose Universal Windows Platform as platform, and ensure capabilities WebCam, Microphone, Location and SpatialPerception are enabled, and Virtual Reality Supprt - Windows Mixed Reality is enabled as well.
4) Build and deploy the app onto Hololens 2
5) Once app gets launched, air-tap to take a photo and watch debug log. It prints out "Failed to get camera to world matrix!" and "Failed to get camera projection matrix!"

  1. Response avatar

    Resolution Note (2020.2.X):

    Duplicate of 1297267. The newer bug has a repro project that shows more edge cases of the issue.

Comments (33)

  1. F84bbc4ab81706e9c06ad6865d555480?d=mm

    MarionV

    Aug 04, 2020 11:48

    Same as Walkramis. Is it a bug ? If not, how can we use these matrix ?

  2. 8e754bce497dc1d875778cb7a4a92172?d=mm

    Walkramis

    Aug 03, 2020 20:49

    It seems to be working for me with 2019.4.6f1 (functions return true) but I am always getting the same matrix from TryGetCameraToWorldMatrix when taking new photos. Is it not completely fixed or am I missing something obvious?

  3. F84bbc4ab81706e9c06ad6865d555480?d=mm

    MarionV

    Jul 31, 2020 07:37

    I tried it with the Hololens 2 on the Unity 2019.4.6 and it's now working :D !!

  4. D5bdec18ac0eb1cc08516c14aade53e8?d=mm

    vfatuanpv

    Jul 31, 2020 03:25

    POCCE90: I also use Unity 2019.4.2f1
    Take the photo by using UnityEngine.Windows.WebCam; PhotoCapture and the result of TryGetCameraToWorldMatrix is false on Hololens 1

    Can you help me send your example to my email: vfa.tuanpv@gmail.com

  5. 63f9f16383643c39d8564370b6cb4873?d=mm

    pocce90

    Jul 30, 2020 15:21

    EDIT: The same project builded for Hololens 1 works perfectly.

  6. 63f9f16383643c39d8564370b6cb4873?d=mm

    pocce90

    Jul 30, 2020 14:15

    Ah, of course TryGetCameraToWorldMatrix and TryGetProjectionMatrix returns false.

  7. 63f9f16383643c39d8564370b6cb4873?d=mm

    pocce90

    Jul 30, 2020 13:58

    I tried in unity 2020.2.0a19 and unity 2019.4.5f1 with my Hololens 2, and the output of
    photoCaptureFrame.TryGetCameraToWorldMatrix(out c2wMatrix);
    photoCaptureFrame.TryGetProjectionMatrix(out projMatrix);
    is:
    CamToWorld:
    1.00000 0.00000 0.00000 0.00000
    0.00000 1.00000 0.00000 0.00000
    0.00000 0.00000 1.00000 0.00000
    0.00000 0.00000 0.00000 1.00000

    Projection:
    1.00000 0.00000 0.00000 0.00000
    0.00000 1.00000 0.00000 0.00000
    0.00000 0.00000 1.00000 0.00000
    0.00000 0.00000 0.00000 1.00000

  8. D5bdec18ac0eb1cc08516c14aade53e8?d=mm

    vfatuanpv

    Jul 28, 2020 03:19

    Is there any updates on this fix?, I checked all but It still nothing happened

  9. Ced2ee287ee71e9c2b2ea07ae9b6419f?d=mm

    unity_mXfJcqtHzREOAQ

    Jul 21, 2020 07:02

    @MARIONV:
    Hi, I tried on Unity 2020.2.0a18, Unity 2020.2.0a16 , Unity 2019.4.2f1 with XR plugin it still not work on Hololens1 and Hololens2. Still waiting

  10. F84bbc4ab81706e9c06ad6865d555480?d=mm

    MarionV

    Jul 20, 2020 14:18

    Hi,

    I need the camera matrices, so I tried it in the 2020.2.0.a16 and I still obtain the identity matrix. Is it normal ?

    Do you know when it will be fixed for the 2019.4 ? Or if there are any alternatives ?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.