-
Notifications
You must be signed in to change notification settings - Fork 517
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
Creating a pcl grabber without Ros #21
Comments
Hi, |
Thanks, |
I don't know. looks like errors from interpolated depth points. |
Ok, thanks. Still having problems. Am i correct? So that in case I can focus on the single parts. I have seen that even just passing to createCloud directly the depth and the rgb of the camera gives bad results, but that function just uses the lookuptable created with createLookup(). Just visualizing the depth cloud (setting all points to the same color) shows problems. I presume that there is some fault in my camera parameters. The parameters are the following: color: rotation_ translation -5.1927840124258939e-02, -4.5307585220976776e-04, 7.0571985343338605e-05 Could you just confirm that you are using the same, or almost the same? Thanks |
Hi, in theory you just have to do the following:
But since the resolutions are different I did some extra steps:
In the https://github.com/code-iai/iai_kinect2/tree/libfreenect2-upstream branch I have modified the depth registration to be easier to use. That one just needs to be initialized with the camera parameters and image resolutions of both sensors, distortion coefficients of the depth sensor and the translation and rotation between the depth and color sensor. And than you simply have to give the raw depth image as input. So if you want to create a lower resolution depth image you can simply half the intrinsic and registered image size. Right now the rotation and translation has to be computed for each sensor. That can be done with the calibration tool I provided. Or you can simply use the values that are in the repository, but those might not be perfect for other sensors. |
Perfect, thank you for the exhaustive answer. |
Those look fine. In https://github.com/code-iai/iai_kinect2/tree/master/kinect2_bridge/data are the parameter I got from calibrating my sensors. |
Ok, thanks. Nice improvement :) |
yep. |
Thanks, |
It should mean something like "camera matrix of the sensor to which the depth image should be registered". What would you suggest instead? |
If I understood correctly its the camera matrix which before you called cameraMatrixColor right? I would leave that name or something like cameraParameterMatrixColor |
yes, but you can register it to any other camera, so it does not have to be a color camera... that's why i changed it. |
Ok, seems logic. |
Maybe this could be useful also for other people if using this code with the kinect v2 (correct me if I am wrong): |
sizeRegistered: cv::Size(1920,1080)
|
Ok thanks |
Today I tested your new version, but there is a problem.
with the following parameters taken from the camera: color: registered_ is just in a sequence of zero values if printed out as uint16_t. |
first of all the images are flipped. so you need to flip them
the depth registration need a depth image with |
Added that. Still problems but I will debug a little and see. |
but the depth image is not 0 right? |
No, I was wrong, interpolation is not always 0. I will continue investigating and let you know as soon as I find something strange. |
how do you compute the 3d points? I do it in the viewer like this:
|
I have fixed something and it looks better but it is not registered. I am using a similar code to yours. I tried yours but it is not working...
|
Fixed something else and it looks better.
|
try this:
|
the alignment is a calibration problem. so if you calibrate your sensor you will get better results. |
Ok I will try to calibrate it. You have been really helpful, thank you again. |
your welcome. could this be closed now? |
I would suggest to just wait 1-2 day to be sure everything is fixed if it is ok for you. |
You can close, thanks |
Hello,
I am working on simple wrapper to use libfreenect2 to get a pcl point cloud without ros.
I used part of your code for registration and I did the following
I am not sure about the registration API and I am not getting a nice cloud. Is the call order correct?
Thanks
The text was updated successfully, but these errors were encountered: