Skip to content
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

[question] (1) batch depth images and (2) coordinates in image #15

Open
ywpkwon opened this issue Jul 16, 2017 · 1 comment
Open

[question] (1) batch depth images and (2) coordinates in image #15

ywpkwon opened this issue Jul 16, 2017 · 1 comment

Comments

@ywpkwon
Copy link

ywpkwon commented Jul 16, 2017

Thanks for this great tool! Please let me ask two questions.

(1) I tried to extract screenshots of all car models successfully with save model screenshots all 3dw car. How can I save the depth images of all car models? If so, how can I save those in a batch mode?

(2) The output csv file informs bbox and camera position/target/up vectors. Let's say a corner point of a bounding box is (a, b, c). Is there a way to calculate its pixel coordinate in a screenshot image?

@msavva
Copy link
Member

msavva commented Aug 28, 2017

Apologies for the long delay in responding.

  1. We currently do not have a feature for depth image rendering, though that can be implemented by adjusting the rendering code, which is based on JMonkeyEngine3. The relevant part of the code is https://github.com/ShapeNet/shapenet-viewer/blob/master/src/main/scala/edu/stanford/graphics/shapenet/jme3/viewer/ScreenshotAppState.java#L174 where the screenshot is saved out, and you would probably want to extract the depth buffer and save that into a screenshot in addition to the. It is probably useful to refer to the documentation of the JMonkeyEngine API at http://javadoc.jmonkeyengine.org/ in order to find the details of how to do this.

  2. You could compute pixel coordinates by saving the camera projection matrix and applying it to the 3D corner point position to get the corresponding image pixel coordinates. Saving of the camera projection matrix would again have to be implemented since it is not something that we currently provide. The relevant code location would be again, the one above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants