LeiXu1999 / EPLF-VINS

GNU General Public License v3.0
75 stars 12 forks source link

Question on the function Line::extendLine() #5

Open oranfire opened 7 months ago

oranfire commented 7 months ago

In the function Line::extendLine(), you use the following code to compute the std. of the gradient magnitude

        std::for_each(sampleMagnitude.begin(), sampleMagnitude.end(), [&](const float d)
                      { accum += (d - accum) * (d + accum); });

It seems strange, maybe it should be modified as follows?

        std::for_each(sampleMagnitude.begin(), sampleMagnitude.end(), [&](const float d)
                      { accum += pow(d - mean, 2); });