I have been really annoyed by this issue but it just isnt working. I am trying to put the camera feed on a tkinter canvas using cv2 but it just doesnt want to show
here is the code:
canvas = tk.Canvas(root, width=vp.frame_size[0], height=vp.frame_size[1], background='gray75')
cv_img = cv2.cvtColor(cap.read()[1], cv2.COLOR_BGR2RGB)
photo = PIL.ImageTk.PhotoImage(image = PIL.Image.fromarray(cv_img))
# Add a PhotoImage to the Canvas
canvas.create_image(0, 0, image=photo, anchor=tk.NW)
canvas.pack(pady=20)
but it just shows the "gray75" background
any ideas?