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
render_depth is not returning the expected image #8
Comments
This is an extra feature that is not included in the original project, that is why it is not very well documented right now. The way it is implemented right now is that P = K*H, where K is the intrinsic camera matrix and H is the projection matrix from world to camera coordinates. I have also some options for lens distortion coefficients that will default to 0. I haven't tested all possible scenarios, so if you think there is a bug in the implementation, can you come up with a simple reproducible example where we can easily compute the ground truth (i.e. render a plane) to help me fix it? |
I think there is a bug, because I also tried multiplying P with the intrinsic camera matrix, and the results are wrong. I'll try doing that in the following days. |
I've performed a simple test with a cube and it seems to be ok, but flipped (didn't check the actual depth values, just the projection).
|
Is it possible to provide the code with your .obj file also? I am quite busy these few days but I can test everything later this week. |
@nkolot the formula used in projection.py is obviously wrong, if K is the camera intrinsics, then P = K * H actually maps 3D points into pixel coordinates (i.e., in the range [0, 640] for example). You cannot apply distortion coefficients on this. |
@nkolot I am trying to fix this and will try to do a pull request once it is done . |
Cool, thanks. I haven't had much time lately to look at the issues. |
@liupeidong88 Just letting you know that I fixed this issue today. I need to take care of some additional things and I will merge the changes. |
I merged a fix. @pmcrodrigues can you check if you are getting the expected results now? |
My example code is not working, and documentation is scarce. Can you help?
By running the code below I cannot obtain the expected image.
Also I am not sure were the camera intrinsics should enter in your formulation.
The text was updated successfully, but these errors were encountered: