mmatl / pyrender

Easy-to-use glTF 2.0-compliant OpenGL renderer for visualization of 3D scenes.
http://pyrender.readthedocs.io/
MIT License
1.31k stars 225 forks source link

Is there a way to know the image size of the output model? #157

Open yujimori1967github opened 3 years ago

yujimori1967github commented 3 years ago

I am interested in using pyRender.

Is there a way to know the image size of the output model when rendering a 3D model? As a reason for the question, I would like to cut out the image of the output model and use it. This is because it is necessary to prepare many images for AI learning.

As a method I am thinking about, if I can know the size of the output image of the model, for example, I think of a method of adjusting the camera position using the Rotation.from_rotvec method so that it is drawn in the size of W128 ✖ H128 dots. I am.

Best regards

SimantoR commented 3 years ago

So you want to, crop the rendered frame to tightly bound the 3D object? If you have a unique colored background, could just filter it out using some edge detection.