You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, i need to create a interface for the visualization the Point Cloud (PCD-Format), i tried with this code but it`s doesn't work.
Normally i want to build a simple visualization tool to visualize Point cloud Data with some Buttons for example ( Swiping the Pictures or using some Filter or adding some options too..)
In my code i tried to build Point Cloud viewer
i will be very thankful for the help
from tkinter import*
from PIL import ImageTk,Image
import numpy as np
import open3d as o3d
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone, i need to create a interface for the visualization the Point Cloud (PCD-Format), i tried with this code but it`s doesn't work.
Normally i want to build a simple visualization tool to visualize Point cloud Data with some Buttons for example ( Swiping the Pictures or using some Filter or adding some options too..)
In my code i tried to build Point Cloud viewer
i will be very thankful for the help
from tkinter import*
from PIL import ImageTk,Image
import numpy as np
import open3d as o3d
root= Tk()
root.title(" Visualisierung ")
img = PhotoImage(file='index.ico')
root.tk.call('wm', 'iconphoto', root._w, img)
my_img1= o3d.io.read_point_cloud("z.pcd")
my_img2= o3d.io.read_point_cloud("o.pcd")
my_img3= o3d.io.read_point_cloud("p.pcd")
my_img4= o3d.io.read_point_cloud("u.pcd")
my_img5= o3d.io.read_point_cloud("person.pcd")
image_list = [my_img1, my_img2, my_img3, my_img4,my_img5]
print()
o3d.visualization.draw_geometries([image_list])
my_label = Label(image=my_img1)
my_label.grid(row=0, column=0, columnspan=3)
def forward(image_number):
global my_label
global button_forward
global button_back
my_label.grid_forget()
my_label = Label(image=image_list[image_number-1])
button_forward = Button(root, text=">>", command=lambda: forward(image_number+1))
button_back = Button(root, text="<<", command=lambda: back(image_number-1))
if image_number == 5:
button_forward = Button(root, text=">>", state=DISABLED)
my_label.grid(row=0, column=0, columnspan=3)
button_back.grid(row=1, column=0)
button_forward.grid(row=1, column=2)
def back(image_number):
global my_label
global button_forward
global button_back
my_label.grid_forget()
my_label = Label(image=image_list[image_number-1])
button_forward = Button(root, text=">>", command=lambda: forward(image_number+1))
button_back = Button(root, text="<<", command=lambda: back(image_number-1))
if image_number == 1:
button_back = Button(root, text="<<", state=DISABLED)
my_label.grid(row=0, column=0, columnspan=3)
button_back.grid(row=1, column=0)
button_forward.grid(row=1, column=2)
button_back = Button(root, text="<<", command=back, state=DISABLED)
button_exit = Button(root, text="Exit Program", command=root.quit)
button_forward = Button(root, text=">>", command=lambda: forward(2))
button_back.grid(row=1, column=0)
button_exit.grid(row=1, column=1)
button_forward.grid(row=1, column=2)
root.mainloop()
Beta Was this translation helpful? Give feedback.
All reactions