Skip to content

Instantly share code, notes, and snippets.

@jacobbrunson
jacobbrunson / crops.py
Last active Aug 29, 2015
Analyzing Crop Yields By Drone (in Python!)
View crops.py
# 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)