zju3dv / pvnet-rendering

render images for pvnet training
Apache License 2.0
183 stars 46 forks source link

question about render image #10

Closed PofeiShit closed 5 years ago

PofeiShit commented 5 years ago

I had rendered some cat images. So in renders/cat folder there are 0.jpg 0_depth.png 0_RT.pkl ... And jpg images are normal, but the values of png images are all 0. And the values of png images in LINEMOD/cat/mask is 0 or 1. So I want to ask if the png of rendered images are normal?

pengsida commented 5 years ago

Yes. They are used as object masks.

PofeiShit commented 5 years ago

but dmap of the render image is all 0, how to used as object masks?

pengsida commented 5 years ago

Oh, sorry. I misunderstood your meaning. Have you visualized the dmap?

from PIL import Image
import numpy as np
import matplotlib.pyplot as plt

img = Image.open('0_depth.png')
img = np.array(img)
plt.imshow(img)
plt.show()
PofeiShit commented 5 years ago

Thank you, I used cv2.imread while -1 is ignored