Google Tango: Aligning Depth and Color Frames

前端 未结 4 374
面向向阳花
面向向阳花 2021-01-03 12:03

I would like to align a (synchronous) depth/color frame pair, using the Google Tango tablet, such that, assuming that both frames have the same resolution, each pixel in the

4条回答
  •  死守一世寂寞
    2021-01-03 13:05

    Generating simple crude UV coordinates to map tango point cloud points back onto source image (texture coordinates) - see comments above for more details, we've messed this thread up but good :-( (Language is C#, classes are .Net) Field of view calculate FOV horizontal (true) or vertical (false)

    public PointF PictureUV(Vector3D imagePlaneLocation)
            {
                // u is a function of x where y is 0
                double u = Math.Atan2(imagePlaneLocation.X, imagePlaneLocation.Z);
                u += (FieldOfView(true) / 2.0);
                u = u/FieldOfView(true);
                double v = Math.Atan2(imagePlaneLocation.Y, imagePlaneLocation.Z);
                v += (FieldOfView() / 2.0);
                v = v / FieldOfView();
    
                return new PointF((float)u, (float)(1.0 - v));
            }
    

提交回复
热议问题