Skip to content

Instantly share code, notes, and snippets.

View ahadcove's full-sized avatar

Ahad ahadcove

View GitHub Profile
@ahadcove
ahadcove / manual_crop.py
Created October 31, 2018 12:23 — forked from smeschke/manual_crop.py
Crop rectangle out of image using mouse clicks
import cv2, numpy as np
# Click on one corner of the image,
# then, click on the other corner on the image.
# The image will be cropped and saved into the folder (see below)
# Press 'esc' to quit
# Before you begin, change the path to you own video:
cap = cv2.VideoCapture('/home/stephen/Desktop/track.MP4')