How can I get 6dof data?

I’m doing a project which tracing a ball and making a 3d trajectory based on the computer vision.
The matter is that I should deal with 6dof for an accurate position, because the head movement affects to the capture.
So, I need an access for 6dof data and the camera capture data at the same frame.
Which scripts are related with the project I’m handling?

Please check if NRHDMPoseTracker.cs is helpful to you.