Question: an python code using opencv to open an image with using def function I write a button for open an image when we click it,
an python code using opencv to open an image with using def function
I write a button for open an image when we click it, but I couldun't add the image part
here's the code;
class Visualize: def __init__(self): self.root = Tk() self.root.title("T") self.frame = ttk.Frame(self.root, padding=10) self.frame.grid() self.image_button = ttk.Button(self.frame, text="Image", command=self.show_image) self.image_button.grid(column=1, row=0) self.root.mainloop() def show_image(self): # I couldn't write here cv2.destroyAllWindows()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
