Пример #1
0
        def convert(og_mesh, voxel):
            transforms = tfs.Compose([mesh_conversion,
                                      tfs.MeshLaplacianSmoothing(smoothing_iterations)])

            new_mesh = transforms(voxel)
            new_mesh.vertices = pcfunc.realign(new_mesh.vertices, og_mesh.vertices)
            return {'vertices': new_mesh.vertices, 'faces': new_mesh.faces}
Пример #2
0
    def __call__(self, mesh: Type[Mesh]):
        """
        Args:
            mesh (Mesh): Mesh to be realigned.

        Returns:
            (Mesh): Realigned mesh.
        """
        mesh.vertices = pcfunc.realign(mesh.vertices, self.target)
        return mesh
Пример #3
0
    def __call__(self, src: Union[torch.Tensor, PointCloud]):
        """
        Args:
            src (torch.Tensor or PointCloud): Source pointcloud, which needs
                to be aligned to the target pointcloud.

        Returns:
            (torch.Tensor or PointCloud): Source pointcloud aligned to match
                the axis-aligned bounding box of the target pointcloud `tgt`.
        """
        return pcfunc.realign(src, self.tgt, inplace=self.inplace)