Source code for concepts.gui.open3d_gui

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# File   : __init__.py
# Author : Jiayuan Mao
# Email  : maojiayuan@gmail.com
# Date   : 09/13/2024
#
# This file is part of Project Concepts.
# Distributed under terms of the MIT license.


[docs] def pick_points(pcd): print("") print( "1) Please pick at least three correspondences using [shift + left click]" ) print(" Press [shift + right click] to undo point picking") print("2) After picking points, press 'Q' to close the window") vis = o3d.visualization.VisualizerWithEditing() vis.create_window() vis.add_geometry(pcd) vis.run() # user picks points vis.destroy_window() print("") return vis.get_picked_points()