Skip to content

Instantly share code, notes, and snippets.

@shks
Last active September 1, 2021 18:02
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 shks/c6c645da6742497f5e31e5c5834cfcd5 to your computer and use it in GitHub Desktop.
Save shks/c6c645da6742497f5e31e5c5834cfcd5 to your computer and use it in GitHub Desktop.
tdTOP_cv2_grayscale
import cv2
import numpy as np
arr = op('td_top').numpyArray('delayed=True')
gray = arr[:, :, 0]
gray = gray * 255.0
gray = gray.astype(np.uint8)
#flip
gray = cv2.flip(gray, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment