rubengooj / stvo-pl

Stereo Visual Odometry by combining point and line segment features
GNU General Public License v3.0
222 stars 96 forks source link

What is the meaning of J_aux? #3

Closed RichardChe closed 7 years ago

RichardChe commented 7 years ago

Hello, When I was reading the source code, src\stereoFrameHandler.cpp, I found a variable J_aux. According to the comments and the corresponding paper, I guess that it is a variable for jacobian of the projection error. But after referring "A tutorial on SE(3) transformation parameterizations and on-manifold optimization", I am still confused about the result of J_aux:

        Vector6d J_aux;
        J_aux << + fgz2 * dx * gz,
                 + fgz2 * dy * gz,
                 - fgz2 * ( gx*dx + gy*dy ),
                 - fgz2 * ( gx*gy*dx + gy*gy*dy + gz*gz*dy ),
                 + fgz2 * ( gx*gx*dx + gz*gz*dx + gx*gy*dy ),
                 + fgz2 * ( gx*gz*dy - gy*gz*dx );
        J_aux = J_aux / std::max(Config::homogTh(),err_i_norm);

How does this result come out? Thanks!

rubengooj commented 7 years ago

It is the simplified expression of the composition of all the Jacobians involved in the projection error of a point observed in the first stereo frame to the next frame, as expressed in equations (1) and (2) from the paper (in the case of line segments you just have to further compose the Jacobians of both endpoints with the line equation).

RichardChe commented 7 years ago

According to equation (1), it seems that the error is a 2-dimension vector so the corresponding Jacobian is a 2x6 matrix. But J_aux is a 6-dimension vector, which means the error is a scalar (I guess it is the l2-norm of the equation (1)). In that case, I am confused about how to get this simplified form. Would it be possible for you to show me that? Thanks!

rubengooj commented 7 years ago

Yes, that one also stands for the norm of the error in eq. (1), which I programmed like this as I'm solving the problem in eq. (3) in a robust form, as expressed in Section III.C.

RichardChe commented 7 years ago

So it is the jacobian norm of the error with respect to the Lie algebra xi? But how to get this simplified form? I am still confused about this.

rubengooj commented 7 years ago

It is the Jacobian of the parameter 's', which is the squared norm of the error, with respect to 'xi'.

RichardChe commented 7 years ago

OK, I have a better understanding about this. Thx!