-
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
dtam is producing poor reconstruction on ptam poses #21
Comments
Please do, I won't have time to look at it closely until tomorrow, but I'll try to see if I see anything obvious today and look harder tomorrow. |
I will check the commit you mentioned. The camera I used for my data is "fujifilm finepix 3d" camera , which may not be appropriate for dtam, but what I was expecting is that dtam should produce better result than StereoBM. In a couple of days I would get a grey flea global shutter color camera , I ordered last week , I guess that would be ideal for testing the algorithm , as author themselves used grey flea 2 camera. For distortion , I have used PTAM distortion model , one parameter barrel distortion , and I undistort the images before sending into DTAM pipeline. I have checked in the codes in "patm_poses" branch of a fork of 2.4.9 experimental branch. https://github.com/avanindra/OpenDTAM/tree/ptam_poses I have written the 3d viewer in glfw , I have included the code and libraries as well as ptam libraries , hopefully , you would get no linking error in the first build. once you run the program , you would have to press 'space bar' twice in some intervals , then the pose would be initialized , afterwards press "D" , to start DTAM reconstruction . Press 'S' for sparse points display , "P" for dtam reconstruction display , "O" for opencv stereoBM reconstructions display, "I" for frame display , "G" for opencv stereo depthmap. Following is the link of video sequence ( github was not letting me upload it , so I put it in dropbox. ) https://www.dropbox.com/s/9eyf851qh0k2ifw/DSCF0159.AVI?dl=0 put the video in "Cpp/dataset" directory , for that is the path I have passed from cmake. [ Also , one more point , even though I have put glfw and ptam codes in separate threads , they all are consuming only one cpu , so pose initialization process may take 10 to 15 seconds sometimes. ] Thank you for looking into it. |
Hi there, trying to get your branch "ptam_poses" running up, however got the errors below:
Any idea to get this fixed? Thanks in advance:-) |
You will need to get a copy of glfw3 and edit the cmakelists file to point to it. I used the version on http://www.opengl-tutorial.org/ since I already had it available. You should also make the changes below. @avanindra
Sorry I haven't had time to make a proper pull req, my version of your code has diverged a lot in trying to find the problem. I'm trying to get to that. |
Got the problem fixed by replacing the last line of the CMakeLists.txt by:
Hope it helps:-) |
Thanks, already got the problem fixed and the code compiles and runs. For the initialization part, I'm sort of using the PTAM sparse initialization as @avanindra did. BTW, I found Newcombe's PhD thesis is valuable for reference, maybe you guys should also be interested in. |
Thanks for the reply. I changed the color range as you mentioned. It did improve the reconstruction somewhat. Though I am still not getting accurate reconstruction. Also , I wanted one clarification regarding cost layer of volume. From the code , it seems like you are assuming each cost layer to be planer , as you are assigning same z value to each pixel at a particular cost layer , while I think the cost layer should be spherical , each pixel at one layer equal distant from the reference camera. Sorry , I couldn't respond bit early , I guess I missed reading the github notifications. I somehow missed uploading the glfw libraries in link_library folder. Though , I am glad that you got the code fixed and running. |
@avanindra For a parallel stereo pair, the planar shape with inverse depth parametrization is optimal in the sense that the sampling distribution matches the error distribution. For multiple nonparallel views the optimal sampling shape is intractable, but should be close to both planar and spherical forms, so I just use the easier planar one. Of course none of this applies to things like ultra fisheye lenses where the pixel density is not constant in the pinhole model. Anyway, my experience was that the quality of reconstruction had a lot to do with the quality of the ptam tracking, which was finniky to get started well. In particular ptam likes to sample all of its points from a plane, which messes things up. In your sample video, I wait until the bear's nose comes into view and the camera starts to pan downward, which gives ptam a number of points on both floor and desk. Also, I think I turned off a line of code in the CostVolume.cu that said something like You might want to force the far plane to be at infinity (i.e. 0). Ptam seems to sometimes choose bad near and far planes. I haven't figured out a good heuristic for setting the near plane. |
Hi , a bit late reply from me. I had a point when I said the cost layer should be spherical . It's importance lies in computing the depth derivatives; in which you assume the inverse depth step to be constant , which would be possible only when cost layers are spherical. In case of planer cost layers , the corners would have different inverse depth jump than the middle pixel. Correct me if I am wrong. |
@avanindra https://github.com/avanindra The depth measure you are proposing would be appropriate if the sensor was On the other hand, extreme fisheye cameras are often designed to -Paul On Thu, Jul 2, 2015 at 4:38 AM, avanindra singh [email protected]
|
Hi Paul,
I have been trying to integrate dtam with live ptam frames. I have used 2.4.9 experimental branch. I am noticing that dtam is producing poor reconstruction. The reconstruction is quite smooth , but depths are not correct. I apply opencv stereoBM or SGBM on same ptam keyframes , with same poses , I get much better depth maps and reconstruction. I have tried 32 and 64 depth layers , with 30 image per cost volume. I had set near and far values from distance of sparse points of ptam from camera.
I can upload the running code with dataset , if you want to have a look at it.
The text was updated successfully, but these errors were encountered: