Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created May 11, 2020 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/022285cb6a371d6a63efd2679a5f0f1c to your computer and use it in GitHub Desktop.
Save prateekjoshi565/022285cb6a371d6a63efd2679a5f0f1c to your computer and use it in GitHub Desktop.
# apply image thresholding
ret, thresh = cv2.threshold(img, 130, 145, cv2.THRESH_BINARY)
# plot image
plt.figure(figsize=(10,10))
plt.imshow(thresh, cmap= "gray")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment