双目视差以及深度

void get_point(Point2f &left1, Point2f& right1)
{
    double fx = 454.025;//像素


    // 基线
    double baseline = 0.191;//单位米
            if ((left1.x - right1.x) == 0.0)
    {
        return  0.0;

    }
    Point3d p;
    double Z = fx * baseline / (left1.x - right1.x);
    double  X = (left1.x - cx)*Z / fx;
    double  Y = (left1.y - cy)*Z / fy;
//单位米

}

你可能感兴趣的:(vs2015)