tools/data_prepare/patch_data_prepare_val.py [234:247]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            depth = dataset.get_depth(data_idx)
            image = dataset.get_image(data_idx)
            assert depth.size == image.size
            width, height = depth.size
            depth = np.array(depth).astype(np.float32) / 256
            uvdepth = np.zeros((height, width, 3), dtype=np.float32)
            for v in range(height):
                for u in range(width):
                    uvdepth[v, u, 0] = u
                    uvdepth[v, u, 1] = v
            uvdepth[:, :, 2] = depth
            uvdepth = uvdepth.reshape(-1, 3)
            xyz = calib.img_to_rect(uvdepth[:, 0], uvdepth[:, 1], uvdepth[:, 2])  # rect coord sys
            xyz = xyz.reshape(height, width, 3)  # record xyz, data type: float32
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tools/data_prepare/patch_data_prepare_val.py [405:418]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        depth = dataset.get_depth(data_idx)
        image = dataset.get_image(data_idx)
        assert depth.size == image.size
        width, height = depth.size
        depth = np.array(depth).astype(np.float32) / 256
        uvdepth = np.zeros((height, width, 3), dtype=np.float32)
        for v in range(height):
            for u in range(width):
                uvdepth[v, u, 0] = u
                uvdepth[v, u, 1] = v
        uvdepth[:, :, 2] = depth
        uvdepth = uvdepth.reshape(-1, 3)
        xyz = calib.img_to_rect(uvdepth[:, 0], uvdepth[:, 1], uvdepth[:, 2])  # rect coord sys
        xyz = xyz.reshape(height, width, 3)  # record xyz, data type: float32
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



