Nerei / kinfu_remake

Optimized and reworked version of Kinfu
BSD 3-Clause "New" or "Revised" License
339 stars 125 forks source link

KinFu2 error: Start failed: Bad Parameter #29

Open 447425299 opened 6 years ago

447425299 commented 6 years ago

Thanks for you sharing. I use kinect v1 and meet this error: KinFu2 error: Start failed: Bad Parameter sent to the device! How could I solve it? thanks!

densechen commented 5 years ago

kinect2 has the different resolution about depth model. you should change the default params.

but, i have another problem. when i run this code with kinect2 or iphoneX trueDepth, I always failed on track. could anyone help me?

drmateo commented 5 years ago

Also, for my ICP fails on track using both kinect1 and kinect2. But, I've noticed that raycast is rendering anything (just a black image). @LittleLampChen could you check if you have the same problem with the raycaster output?

densechen commented 5 years ago

I have already solved this problem. you should config correct depth camera intr parameters and correct image size.

drmateo commented 5 years ago

You're right, I should have done a correct parameter set up, but it's still failing. The configuration for the SD stream of a Kinect2 that I did is:

Image dimension > (424 x 512) center image > (255.04, 205.758) focal > (365.564, 365.546)

and the depth image is a 16UC1 ( unsigned short) cv::Mat

densechen commented 5 years ago

it is 512 x 424 or 424 x 512? and i config this on windows without openni2. i have rewrite the demo to read directly from image file

drmateo commented 5 years ago

Height 424 and width 512. Also, I'm rewriting the demo because I'm reading the image from ROS (sensor_msgs). But, in my case, I'm afraid that the error comes from other place, something related with CUDA (SDK 9.2)

densechen commented 5 years ago

Good luck! Cuda 9.2 has many difference with Cuda 8.0

drmateo commented 5 years ago

You're write it was a pain discover the inconsistencies btw CUDA 9.2 and older versions. But finally, I get the solution. I'm going to make a pull request with the changes. Thanks for your help ;)

nakini commented 5 years ago

@drmateo, could you please tell me how to set the parameters inside the code? I am using Kinecet-360 on Ubuntu-16.04. I did try to replace the values 640 and 480 with 320 and 240 in kfusion/src/kinfu.cpp and _kfusion/src/cuda/projicp.cu but it didn't help. Still getting the same error.

Thank you in advance.