Horizontal plane detection in Unity android

I’m try to detect the horizontal plane using the camera as seen in the Sony’s AR camera like this - YouTube. I guess i should be checking out for OpenCV for unity but based on a youtube video I saw ,I felt it is not much accurate.Please suggest me the best option I can go with.I wish I could know how the plane detection was done in Sony’s AR camera effect and if that is possible on Unity.Thanks!

First part (masks and hats) are done with some face tracking library.

The second part seems to be marker based Augmented Reality. You can do that with Vuforia and some other libraries. Vuforia is very straight forward - I recommend trying that.