Search Unity

HumanSegmentation Depth Mode issues

Discussion in 'AR' started by eco_bach, Jun 13, 2019.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Testing DepthMode only and am experiencing strange results.
    First off, Stencil mode seems to compile and work fine at all resolutions.

    But if I disable Stencil Mode and test with only Depth Mode I get the following>

    Full Screen Resolution > crash on launch
    Half Screen Resolution > crash on launch
    Standard Resolution > doesn't crash however the RawImage is showing only white.
    and see the following repeated message in Xcode console
    Code (CSharp):
    1. 2019-06-13 11:30:28.215227-0400 StandardDepth[2189:83955] [] nw_connection_receive_internal_block_invoke [C8] Receive reply failed with error "Operation canceled"
    Is the above expected behavior? I assumed I should be seeing some type of depth image as implied from the WWDC presentation. (attached)

    Screen Shot 2019-06-13 at 11.41.36 AM.png
     
    Last edited: Jun 13, 2019
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    Do you have a callstack for the crashes? What device(s), iOS version and Xcode version are you using?
     
  3. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Thanks.
    iPhone XR, IOS13, Xode beta 11.
    On a 2nd test I am able to render Depth but only at Standard resolution and after making the following change to Update in TestDepthImage component. Will try and replicate once more.

    Question1 > Are there any demos or test code showing how you would use the Stencil result as a mask on another image or video?

    Question2 > The same in regards to using depth result. Are there any demos or code samples posted?

    Code (csharp):
    1.  
    2. // To use the stencil, be sure the HumanSegmentationStencilMode property on the ARHumanBodyManager is set to a
    3. // non-disabled value.
    4. // m_RawImage.texture = humanStencil;
    5.  
    6. // To use the depth, be sure the HumanSegmentationDepthMode property on the ARHumanBodyManager is set to a
    7. /// non-disabled value.
    8.  
    9.  
    10. m_RawImage.texture = humanDepth;
    11.  
     
  4. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    No, there are currently no other samples besides the one you are already using.
     
  5. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    1st Request Demo showing how to Use stencil buffer to mask the actual camera image.
     
  6. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    164
    @eco_bach Hi, i am encountering same error, but with all settings for Stencil and Depth ( even when both disabled ). I am running on IOS 13 Beta 2, can you run the human body skeleton with line renderer successfully? Thanks
     
  7. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Are you can compiling with latest Xcode beta? To test depth you also need to edit zTestDepthImage