-
Notifications
You must be signed in to change notification settings - Fork 151
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
How to produce point cloud using DTAM? #34
Comments
Also, I have doubt if the ray is right? because in such computation way, ray is 1_3, not 3_1 and 3*3. How can I get properly 3D point based on depth? |
It depends on what coordinate frame you want the results in. If your feeling really nice you might make this into a function inside of the Optimizer class, since I think people have this question a lot. I'm currently not in a position to compile the code (need to update my cuda install for gcc 4.9), but if you want to try the following and make a pull request, I'll just incorporate it. For convenience, the CostVolume object exposes its [world_x; world_y; layer; 1] -> [pixel_x; pixel_y; layer; 1] matrix as CostVolume.projection. Inverting this and applying it to the unnormalized depth map will give a point cloud.
|
Oh and fyi, the formula you quoted, which I see you got from #8 , is correct only if you get everything in the correct coordinate system and if the x,y,d inputs are taken elementwise. In both the original post by avanindra and my reply we were each implicitly assuming the other one knew that. We also assumed the other one could figure out when to transpose implicitly. Sorry for the confusion, but it should be equivalent to the above. Also, make sure you are on the experimental branch if you use the above, since the main branch projection matrix didn't comply with spec. |
Hi , Then, I read deeply into the code, I find a function 'diagnosticInfo' , it may give the results I want.After my try, it got the following results. Can you give a hand to me? May it is a bit wrong about the coordinate system. By the way, I want to result like this video. Xiaoshui |
Can you post your depth map as an image? It should evolve like https://youtu.be/Df9WhgibCQA?t=1m16s (on the right side).That should give me an idea if it's the settings or the algorithm that isn't working. For reference, your first result is not too surprising to me, since badly reconstructed points spray off to infinity. You should look and see if the reconstructed surface is buried in the tip of that point cloud. You're correct that the diagnosticInfo function can do what you want internally, but it also does occlusion filtering and such to simulate a virtual camera. By the way, the thing you posted is either not DTAM or has half of the algorithm turned off, which you can tell because the map doesn't optimize at all. It looks like straight cost volume reconstruction to me. |
Hi ,
Because I want to use DTAM to conduct 3D reconstruction, I need point cloud results. Actually, I only got depth map. How can I obtain point cloud (x,y,z) for every point?
I have changed the parameters value like #8 .
thetaStart = 0.6 * layers
thetaEnd = 0.03 * layers
thetaStep = 0.99
epsilon = 0.003 * layers
lambda = 0.3 / layers
And when I do the following step, it got wrong.
ray = ( K * R ).inv() * T;
P=1/(optimizer.depthMap())*ray + cameraCenter;
It is wrong because ray is a array 3*1, while (1/optimizer.depthMap()) is the depth of whole image. It cannot directly multiple. And I do not know what cameraCenter is in your example "testprog.cpp"?
Can you give me more detail information about how to code this part?
Thank you for your answer!
Xiaoshui
The text was updated successfully, but these errors were encountered: