You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to get the covariance corresponding to the camera pose during projection optimization. I did in following steps:
(1) add the current camera pose as a vertex
setId(0) ; setEstimate(initial value); setMarginalize(false); setFixed(false);
(2) add points
setId(i+1) ; setEstimate(initial value); setMarginalize(true); setFixed(true);
(3) add edge:
setMeasurements(position in image); setInformation(Identity); setRobustKernel(Huber);setDelta(sqrt(5.991)); set camera params(fx,fy,cx,cy)
(4) Get covariance after optimization by using the following code:
g2o::SparseBlockMatrixXd spinv;
optimizer.computeMarginals(spinv,optimizer.vertex(0));
The pose covariance is spinv.block(0,0)->eval().
I did not understand marginalize very well. I am not sure that setMarginalize as true affect the result of optimization or not.
I just worried I did something wrong. Is anyone familiar with this? Could you have a look to see if it is a problem anywhere?
Thanks very much for your help.
The text was updated successfully, but these errors were encountered:
I want to get the covariance corresponding to the camera pose during projection optimization. I did in following steps:
(1) add the current camera pose as a vertex
setId(0) ; setEstimate(initial value); setMarginalize(false); setFixed(false);
(2) add points
setId(i+1) ; setEstimate(initial value); setMarginalize(true); setFixed(true);
(3) add edge:
setMeasurements(position in image); setInformation(Identity); setRobustKernel(Huber);setDelta(sqrt(5.991)); set camera params(fx,fy,cx,cy)
(4) Get covariance after optimization by using the following code:
g2o::SparseBlockMatrixXd spinv;
optimizer.computeMarginals(spinv,optimizer.vertex(0));
The pose covariance is spinv.block(0,0)->eval().
I did not understand marginalize very well. I am not sure that setMarginalize as true affect the result of optimization or not.
I just worried I did something wrong. Is anyone familiar with this? Could you have a look to see if it is a problem anywhere?
Thanks very much for your help.
The text was updated successfully, but these errors were encountered: