I followed this link to visualize multiple .pcd as a video via open3d. It is working fine. However, I am unable to zoom in the generated output.

I have tried to use o3d.visualization.Visualizer.get_view_control() but it doesn't zoom at all.

My code is as follows

import os import fnmatch import numpy as np if __name__ == "__main__": pcd_directory = './2023-04-07-17-17-59/2023-04-07-17-17-59_Clouds' # List all files in the directory files = os.listdir(pcd_directory) # Filter the .pcd files pcd_files = fnmatch.filter(files, '*.pcd') # Sort the .pcd files pcd_files.sort() # Creating an object of class visualizer vis = o3d.visualization.Visualizer() vis.create_window() # Setting the colors of visualizer ropt = vis.get_render_option() ropt.point_size = 1.0 ropt.background_color = np.asarray([0, 0, 0]) ropt.light_on = False # Reading first Pcd and adding to geometry pcd = o3d.io.read_point_cloud(f'./2023-04-07-17-17-59/2023-04-07-17-17-59_Clouds/0000000001.pcd') vis.add_geometry(pcd) # zoom the view ctr = vis.get_view_control() ctr.set_zoom(4) for i in range(1, len(pcd_files) - 550): pcd.points = o3d.io.read_point_cloud(f'./2023-04-07-17-17-59/2023-04-07-17-17-59_Clouds/{i:010d}.pcd').points vis.update_geometry(pcd) vis.poll_events() vis.update_renderer() vis.destroy_window() 

I have attached my current results and expected results below.

Current results

expected results

1

Related questions 5354 How to access the index value in a 'for' loop? 3933 How to use a global variable in a function? 4357 How to find the index for a given item in a list? Related questions 5354 How to access the index value in a 'for' loop? 3933 How to use a global variable in a function? 4357 How to find the index for a given item in a list? 1500 How do I use threading in Python? 1607 How to check for NaN values 625 A non-blocking read on a subprocess.PIPE in Python 1005 How do I use a decimal step value for range()? 918 What is __future__ in Python used for and how/when to use it, and how it works 1013 How to use to find files recursively? Load 6 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.