tum-vision / dvo

Dense Visual Odometry
https://vision.in.tum.de/data/software/dvo
151 stars 77 forks source link

How can I get the rigid body motion matrix G correctly from dvo #10

Open Ethan-Zhou opened 10 years ago

Ethan-Zhou commented 10 years ago

Hi Christian

I run the dvo on dataset "rgbd_dataset_freiburg2_desk_with_person". The registration result of successive frames are great, very little residual last.

Then I compare the motion estimation result (transformation) with the ground truth, to my surprice, they do not coincide with each other, even not qualitatively.

I just run the DenseObject::match() functions, and get the motion matrix G from the parameter transformation.matrix()

I do not know whether I use the lib in a wrong way, but the result of registration tells me it should be right. Is there still anything to do with the transformation object? What unit does it use? meter or milimeter?

I am looking forward to your reply sincerely.

Best Regards,

Yi

christiankerl commented 10 years ago

is the depth scale correct? the values in the RGBD benchmark dataset depth files have to be scaled by (1.0/5000.0) to get the depth in meters. therefore, the scale of the translation vector might be wrong, if you used a different scaling factor.

Ethan-Zhou commented 10 years ago

Yes, you are right, I used the depth in the wrong way. Now the scale of the answer is right. But the estimated motion is still not coincide with the ground truth. Below are the figures of the them, please have a look. estimation groundtruth

I do not know why.

Ethan-Zhou commented 10 years ago

The first image is the estimation result and the second one is the ground truth. Transition in x,y,z direction are all different... Why

Ethan-Zhou commented 10 years ago

I think there may be some problems with my input. Because no matter how I change the way to load the input images, the registration result seems always good, but the motion estimation matrix G varies from time to time. I use OpenCV function imread() to load the images, like below

rgb_ref = imread(rgb_filename,CV_LOAD_IMAGE_UNCHANGED); intensity_ref = imread(rgb_filename,CV_LOAD_IMAGE_GRAYSCALE); depth_ref = imread(depth_filename,CV_LOAD_IMAGE_UNCHANGED);

Are they right?

Ethan-Zhou commented 10 years ago

Hi, another problem is when I run the dvo, strange errors always happen, look below pease,

~/sophus_src/sophus/so3.cpp:45: Sophus::SO3::SO3(const Quaterniond&): Assertion 'unitquaternion.squaredNorm()>SAMLL_EPS' failed Aborted (core dumped)

I don't know why this error just happen randomly when I run your code on a dataset. I have to comment this line off to maintain the code running.

Could you give me some adive on what I came across?

Yiping-Steven commented 6 years ago

What's the aim of scaling by 1.0f/5000.0f?