INNER CODE UNIT · Python
color
yashbhalgat/HashNeRF-pytorch · camera_pose_visualizer.py:42
color = plt.cm.rainbow(idx / len(list_label))
patch = Patch(color=color, label=label)
list_handle.append(patch)
plt.legend(loc='right', bbox_to_anchor=(1.8, 0.5), handles=list_handle)
def colorbar(self, max_frame_length):
cmap = mpl.cm.rainbow
norm = mpl.colors.Normalize(vmin=0, vmax=max_frame_length)
self.fig.colorbar(mpl.cm.ScalarMappable(norm=norm, cmap=cmap), orientation='vertical', label='Frame Number')
def show(self):
plt.title('Extrinsic Parameters')
plt.show()
if __name__ == '__main__':
poses = []
with open(os.path.join('data/nerf_synthetic/chair/', 'transforms_train.json'), 'r') as fp:
meta = json.load(fp)