How to get the frame from tx2 board camera in OpenCV

I want to access the tx2 camera in OpenCV, what should I do?

You may find an example here: https://devtalk.nvidia.com/default/topic/1001696/jetson-tx1/failed-to-open-tx1-on-board-camera/post/5117370/#5117370.