Skip to content

Instantly share code, notes, and snippets.

View GeraZerbetto's full-sized avatar

Gera! GeraZerbetto

  • Universidad de Buenos Aires
  • Buenos Aires, Argentina
  • X @GZerbetto
View GitHub Profile
@benmarwick
benmarwick / object-outline-and-dimensions-opencv.py
Last active April 23, 2024 01:28
Python 3 script to take live video, detect the largest object, trace an outline (contour) and measure linear dimensions, using OpenCV
# in a terminal
# python -m pip install --user opencv-contrib-python numpy scipy matplotlib ipython jupyter pandas sympy nose
import cv2
import pandas as pd
import numpy as np
import imutils
from scipy.spatial import distance as dist
from imutils import perspective