Skip to content

Instantly share code, notes, and snippets.

@smeschke
smeschke / box tracking
Created May 19, 2017 14:53
box tracking
import cv2
import numpy as np
cap = cv2.VideoCapture('/home/stephen/Desktop/fedex.avi')
h,s,v,h1,s1,v1 = 104,0,134,133,255,255#values for the blue
morph = 1
last_box_depart = -10000 #frame number that the last box departed
tracking_box = False
box_ready = False
@edfungus
edfungus / pupil.py
Last active November 27, 2023 17:08
Pupil Detection with Python and OpenCV
#Identify pupils. Based on beta 1
import numpy as np
import cv2
import time
cap = cv2.VideoCapture(0) #640,480
w = 640
h = 480