# importing libraries
import cv2
import sys
import numpy as np
   
# Create a VideoCapture object and read from input file
cap = cv2.VideoCapture(r'c:\users\proberts\Desktop\push-core-1.avi')

start_patch = [348, 587]
end_patch = [447, 676]

color = (0, 255, 255)
  
# Line thickness of 2 px
thickness = 2
   
# Check if camera opened successfully
if (cap.isOpened()== False): 
    print("Error opening video  file")
   
# Read until video is completed
while(cap.isOpened()):
      
    # Capture frame-by-frame
    ret, frame = cap.read()
    if ret == True:


        frame = cv2.rectangle(frame, start_patch, end_patch, color, thickness)

        # Display the resulting frame
        cv2.imshow('Frame', frame)

        # Calculate median of RGB values

        # Press Q on keyboard to  exit
        if cv2.waitKey(25) & 0xFF == ord('q'):
            break

    # Break the loop
    else: 
        break
   
# When everything done, release 
# the video capture object
cap.release()
   
# Closes all the frames
cv2.destroyAllWindows()