Skip to content

Instantly share code, notes, and snippets.

@jacobbrunson
jacobbrunson / crops.py
Last active August 29, 2015 14:27
Analyzing Crop Yields By Drone (in Python!)
# Based on the Mathematica blog post: http://community.wolfram.com/groups/-/m/t/551187
# Screenshot: http://i.imgur.com/caMxnBl.png
from sklearn.cluster import KMeans
import numpy as np
import cv2
img = cv2.imread("crops.png")
img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)