def viz_regions(img, xyz, seg, planes, labels): """ img,depth,seg are images of the same size. visualizes depth masks for top NOBJ objects. """ # plot the RGB-D point-cloud: su.plot_xyzrgb(xyz.reshape(-1, 3), img.reshape(-1, 3)) # plot the RANSAC-planes at the text-regions: for i, l in enumerate(labels): mask = seg == l xyz_region = xyz[mask, :] su.visualize_plane(xyz_region, np.array(planes[i])) mym.view(180, 180) mym.orientation_axes() mym.show(True)
def viz_regions(img,xyz,seg,planes,labels): """ img,depth,seg are images of the same size. visualizes depth masks for top NOBJ objects. """ # plot the RGB-D point-cloud: su.plot_xyzrgb(xyz.reshape(-1,3),img.reshape(-1,3)) # plot the RANSAC-planes at the text-regions: for i,l in enumerate(labels): mask = seg==l xyz_region = xyz[mask,:] su.visualize_plane(xyz_region,np.array(planes[i])) mym.view(180,180) mym.orientation_axes() mym.show(True)