none
Kinect Fusion - Multiple Static Cameras (WPF): How to set the global X,Y,Z translation independently? RRS feed

  • Question

  • Using OpenCV & some custom coding, I've calculated the relative transforms (translation & rotation in X/Y/Z) between 2 or more Kinects.

    I'm trying to apply these figures to the Kinect Fusion - Multiple Static Cameras (WPF) example (Developer Toolkit 1.8).  But the GUI (or the corresponding XML) only allows me to set the X/Y/Z rotations, and the Distance (correct me if I'm wrong) is only the local Z translation.  How can I set the global translation in any of the X, Y or Z?

    Thanks for any help!

    Thursday, July 31, 2014 11:04 AM

All replies

  • the multi-static sample is intended to be focused on a fixed point. So the values are the distance to the point(a vector line in some global coordinate system you setup) and the rotation around x,y,z of the camera since it may not be completely level without tilt.

    Carmine Sirignano - MSFT

    Thursday, July 31, 2014 6:22 PM
  • Thanks, I understand what you mean.  The point is, in practice, it is quite unlikely that we can have all the Kinects point exactly to a particular common point in space.

    I did some hard work of tracing the code, and I think I've got the answer!  In the "ReconstructionSensor" class, which represents each Kinect, the depth stream is started with 2 lines of code:

            public bool StartDepthStream(DepthImageFormat format)
            {
                    // ... other lines omitted
    
                    // Create the graphics camera and set at origin initially - we will override by setting the transform explicitly below
                    this.reconstructionSensorCamera = new GraphicsCamera(new Point3D(0, 0, 0), Quaternion.Identity, (float)this.depthWidth / (float)this.depthHeight);
    
                    // Update view transform now, from ReconstructionSensorControl
                    this.SetCameraTransformation((float)this.reconstructionSensorControl.AngleX, (float)this.reconstructionSensorControl.AngleY, (float)this.reconstructionSensorControl.AngleZ, (float)this.reconstructionSensorControl.AxisDistance);
            }
    

    In the above, if we can do something to the "Point3D" then we are almost done!  Of course we have to make sure the result is not affected by the AxisDistance.

    Friday, August 1, 2014 11:11 AM