tkinter:canvas不能完整显示opencv读取的视频图像
-
- I modified the size of the canvas with the code below
canvas_for_video = tk.Canvas(frame_canvas, height=600, width=1000). Perhaps the reason of it is the size of the canvas will be set as a default value.
- I modified the size of the canvas with the code below
- Then some optimizations were made.
capture = cv2.VideoCapture(video_path)
canvas_width = capture.get(3)
canvas_height = capture.get(4)
canvas_for_video = tk.Canvas(frame_canvas, height=canvas_height, width=canvas_width)
浙公网安备 33010602011771号