Skip to content

Instantly share code, notes, and snippets.

@ecwheele
Created April 7, 2018 02:36
Show Gist options
  • Save ecwheele/7601f86dc5a7e8bd54f4e4bb54633fee to your computer and use it in GitHub Desktop.
Save ecwheele/7601f86dc5a7e8bd54f4e4bb54633fee to your computer and use it in GitHub Desktop.
finding rafts on my array
import cv2
import numpy as np
import math
from matplotlib import pyplot as plt
%matplotlib inline
filename = "IsoRaft_4DIV_Post_picking.png"
img = cv2.imread(filename)
plt.imshow(img, cmap='gray')
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
plt.imshow(gray)
edges = cv2.Canny(gray, 150, 255)
plt.imshow(edges)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment