• stixel-world代码解读


    下边缘的求法应该是使用的第二篇论文的方法

    上边缘的求法应该是使用的第一篇论文的方法

    这是求上边缘的代码:

    std::vector<float> integralMembership(vmax);
                float tmpSum = 0.f;
                for (int v = 0; v < vmax; v++)
                {
                    const float d = disparity(u, v);
    
                    float membership = 0.f;
                    if (dB > 0.f && d > 0.f)
                    {
                        const float deltad = (d - dB) / deltaD;
                        const float exponent = 1.f - deltad * deltad;
                        membership = powf(2.f, exponent) - 1.f;
                    }
    
                    tmpSum += membership;
                    integralMembership[v] = tmpSum;
                }
    
                score(u, 0) = integralMembership[vB - 1];
                for (int vT = 1; vT < vB; vT++)
                {
                    const float score1 = integralMembership[vT - 1];
                    const float score2 = integralMembership[vB - 1] - integralMembership[vT - 1];
                    score(u, vT) = score1 - score2;
                }

    这段代码应该是对应stixel-world的论文的cost方程,score1-score2是vT之前不包括vT所有点之和减去vT之后包括vT所有点之和.

    修改代码:

    score(u, 0) = - integralMembership[vB - 1];

    这段代码是求上边缘使用的,求的是delta Du这部分

    float deltaD = 0.f;
    if (dB > 0.f)
    {
        const float YB = tf.toY(dB, vB);
        const float ZB = tf.toZ(dB, vB);
        deltaD = dB - tf.toD(YB, ZB + param_.deltaZ);
    }

    YB和ZB是baseline那个点对应的世界坐标的y值和z值,世界坐标如下图:

     这个toD是to disparity,不是depth

    上边缘应该是先求出道路消失的位置,即vhor

  • 相关阅读:
    【JZOJ4807】破解
    输入挂(更新)
    Gorgeous Sequence(线段树)
    线段树套路系列
    hdu 3333 离线线段树 + 思维/树状数组 /在线主席树
    3183 RMQ / 贪心(坑成。。)
    hdu3594 强连通(仙人掌图)
    hdu3639 强连通
    hdu3861 强连通+最小路径覆盖
    图论--最小树形图朱刘算法模板
  • 原文地址:https://www.cnblogs.com/ymjyqsx/p/9079441.html
Copyright © 2020-2023  润新知