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.
  • 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)

posted on 2022-03-19 22:26  Glovesize  阅读(175)  评论(0)    收藏  举报