-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Run badslam on dataset obtained with k4arecorder #41
Comments
There was some related discussion on this previously in #35, but unfortunately I am not aware of existing public code to do this. |
Thanks for the response.
I could provide you with mkv files or image file based data-sets if that helps. |
As a general comment, badslam applies some preprocessing to live Kinect images before using them: It undistorts the images and reprojects them into the same point of view. This is not applied when loading datasets. So, your pipeline would need to do these steps as well somewhere. I saw that you transform the depth images into the color images, but I am not sure whether you also undistort the images. Does the color intrinsics printing here yield any non-zero distortion coefficients? If yes, then the images would also need to be undistorted if they aren't yet, and you would need to write out the calibration.txt parameters of the undistorted images, not the original parameters. By the way, I also remembered some old code that I once used to convert a single .mkv file to the dataset format. However, it was written as throw-away code, only to be used for that single conversion, so it is horribly messy and has some values hard-coded in. So, if the k4a_mkv2image tool works, then that might be better (edit: or just adapt the preprocessing from the live input code instead). |
Thank you very much for the detailed response. Generally it should not be too hard to extend badslam to read from the .mkv file instead of the live device. I did some c++ tests but have currently no time to integrate it. |
The way to do this is to open a handle to the .mkv and use k4a_playback_get_next_capture() instead of k4a_device_get_capture(). The rest of the processing pipeline is the same. |
@brookman Thanks for k4a_mkv2image tool. and BADSLAM will fail to read it: Convert this text file to UTF8 encoding will fix the reading problem. |
I just added basic support to replay .mkv files (re-using the live input code) directly in badslam in this commit: 10751c6 |
After getting badslam running with the K4A (it runs in real time on my notebook which is impressive!) I was wondering if it is possible to replay a recording (.mkv file) generated with the k4arecorder command line tool. While replay works with the k4aviewer I am not sure if it can be replayed with the SDK. Another approach would be to extract image sequences from the mkv and process them to match the ETH3D SLAM dataset format. Has this been done before?
The text was updated successfully, but these errors were encountered: