Visualize button is not working
Closed this issue · 0 comments
niranjanreddy891 commented
import tkinter as tk
from tkinter.filedialog import askopenfilename
def browseFile1():
global infile1
infile1=askopenfilename()
txt1.insert(0.0, infile1)
root = tk.Tk()
root.title("Visualization tool")
Label = tk.Label(root, text="Select a PCD file")
Label.grid(row = 1, column = 0, columnspan = 30)
browseButton1 = tk.Button(root,text="Browse", command=browseFile1)
browseButton1.grid(row = 2, column = 30)
txt1 = tk.Text(root, width = 100, height = 1)
txt1.grid(row = 2, column = 0, columnspan = 30)
def processbutton():
global bro
bro=processbutton()
browseButton2 = tk.Button(text="Visualize", command = processbutton)
browseButton2.grid(sticky='ew', padx=500, pady=10)
def visualize(cloud):
global visual
visual = visualize()
visual = pcl.pcl_visualization.CloudViewing()
# filtering ground points
print(cloud.size)
fil = cloud.make_passthrough_filter()
fil.set_filter_field_name("z")
fil.set_filter_limits(0, 1.5)
cloud_filtered = fil.filter()
print(cloud_filtered.size)
###### visualization
visual.ShowColorCloud(cloud, b'cloud')
flag = True
while flag:
flag != visual.WasStopped()
end
root.mainloop()
Please help me in this issue. Thanks in advance