Created
April 26, 2020 20:01
-
-
Save burrussmp/1af4d7194539d7f0de1cf3a59f3a14b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def calculate_hull(img,sensitivity=0.25): | |
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) | |
gray = np.float32(gray) | |
corners = cv2.goodFeaturesToTrack(gray, 100, sensitivity, 10) | |
corners = np.int0(corners) | |
hull = cv2.convexHull(corners) | |
return hull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment