victorprad / InfiniTAM

A Framework for the Volumetric Integration of Depth Images
http://www.infinitam.org
Other
918 stars 351 forks source link

Poor framerate #37

Closed arennuit closed 8 years ago

arennuit commented 8 years ago

Hello,

I am using InfiniTAM with a Asus Xtion Pro (using OpenNI2) and currently no calibration file on Ubuntu 14.04. I have a serious laptop (i7 latest generation) with a serious GPU (GTX 970M - high end for notebooks).

When testing InfiniTAM I am a bit surprised of the framerate I obtain (I would say about 0.5 to 5 frames/s most of the time + freezes every now and then + smooth every now and them). Obviously with such a framerate the tracking and SLAM is very bad.

I am a bit surprised to get this behaviour and low framerate. Any idea of where it could come from?

Also I have checked the framerate I obtain when I run a plain OpenNI2 sample (NiViewer) and it runs very smooth.

Any idea of how to investigate this issue? I am not even sure where to start...

Regards,

Antoine.

sgolodetz commented 8 years ago

Two thoughts:

I encountered similar issues with the Asus (particularly on Windows) and those two steps helped a lot.

arennuit commented 8 years ago

Thanks a lot @sgolodetz, it does the trick ;) I only modifyed the constructor in file InfiniTAM/InfiniTAM/Engine/OpenNIEngine.h and replaced _imageSizergb = Vector2i(640, 480) by _imageSizergb = Vector2i(320, 240). Note that this post helped in changing the RGB resolution.

Though I am not sure I understand why it works, as I thought RGB data was not used in the default ITMLibSettings (see issue #33).

Also, because of this, can you confirm the calib files only contain the registration between the RGB and D sensors and nothing else? (check here and here for a calibration tool for OpenNI sensors).

Regards,

Antoine

sgolodetz commented 8 years ago

I didn't write the calib file bit - best ask @olafkaehler.

arennuit commented 8 years ago

Understood! Thanks for your relevant help ;)

olafkaehler commented 8 years ago

Our OpenNI interfacing class still opens both RGB and depth streams by default. The RGB images are not used in the default configuration, and we should probably not request RGB images unless we actually do use colour. The USB-bandwidth problems only appears to occur with certain system configurations, though, I've encountered them on Linux so far.

The calibration files also contain the intrinsic calibration parameters of the depth and RGB cameras. You'll probably get marginally better results if you calibrate your own camera, but in practice it doesn't make a big difference.

arennuit commented 8 years ago

Hello @olafkaehler, I see your point for the RGB stream access. My problem did occur on Ubuntu 14.04 and was solved using @sgolodetz's trick.

For the calibration do you mean that:

  1. because I only use the D sensor, the extrinsinc parameters won't be very useful?
  2. because the intrinsic parameters don't vary much, the calibration will be of limited impact?
olafkaehler commented 8 years ago

You are exactly right about the calibration in both points.

arennuit commented 8 years ago

Got it, thanks!

root29 commented 6 years ago

Hi, I also want to run this code in Xtion. But I got some problem: 1.Did you use "roslaunch openni_launch openni.launch" to start Xition ? 2.after that use "./InfiniTAM calibration.txt" ? @arennuit