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

how to get the render if the image width != height? #100

Open
special-yang opened this issue Dec 3, 2020 · 0 comments
Open

how to get the render if the image width != height? #100

special-yang opened this issue Dec 3, 2020 · 0 comments

Comments

@special-yang
Copy link

special-yang commented Dec 3, 2020

how to get the render if the image width != height?

for example
#K - K matrix, R - Rotation matrix, t = translation vector

vertices,faces=nr.load_obj(os.path.join(data_dir,'plane.obj'), normalization=False)

neural renderer

renderer = nr.Renderer(camera_mode='projection', image_size=1024, anti_aliasing=False, near=0.1) #image_size is used up in rasterizing function
im = renderer(vertices[None, :, :], faces[None, :, :], mode='depth', K=K, R=R_tensor, t=t_tensor, orig_size=1024)
a = im[0].data.cpu().numpy()
plt.imsave(os.path.join(output_dir,'plane_depth.png'), a, cmap='gray')

in this code orig_size width =height=1024

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

1 participant