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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!