16
General / select faces by camera visibility
« on: November 08, 2022, 08:01:27 PM »
Is there a method (GUI ok, API preferred) to select faces that are visible from a given camera?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
import matplotlib.pyplot as plt
frame = chunk.frames[0]
img = frame.cameras[0].image()
img = np.frombuffer(img.tostring(), dtype=np.uint8).reshape(img.height,img.width)
depth = frame.depth_maps[frame.cameras[0]].image()
depth = np.frombuffer(depth.tostring(), dtype=np.float32).reshape(depth.height,depth.width)
mask = frame.masks[frame.cameras[0]].image()
mask = np.frombuffer(mask.tostring(), dtype=np.uint8).reshape(mask.height,mask.width)
plt.imshow(img)
plt.imshow(mask)
plt.imshow(depth)