Skip to content
Discussion options

You must be logged in to vote

I managed to get chatgpt to solve the conversion for me. The solution is below:

def _update_camera(self, view_matrix: np.ndarray) -> None:
        """
        Update the camera to look at the mesh center.

        Parameters
        ----------
        view_matrix : np.ndarray
            View matrix for the camera from open3d.

        Notes
        -----
        This function updates the camera in the scene_dict.
        It should be called before rendering.
        """
        to_world_matrix = np.linalg.inv(view_matrix)

        # Step 2: Adjust the coordinate system by flipping the Z-axis
        z_flip_matrix = np.array(
            [[-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, -1, 0], [0, 0, 0

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@SamTov
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@merlinND
Comment options

Answer selected by merlinND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #936 on October 13, 2023 08:20.