Skip to content

Instantly share code, notes, and snippets.

@ritvikmath
Created December 20, 2019 15:44
Show Gist options
  • Select an option

  • Save ritvikmath/1259554c562205669b5346944891de6e to your computer and use it in GitHub Desktop.

Select an option

Save ritvikmath/1259554c562205669b5346944891de6e to your computer and use it in GitHub Desktop.
#create a triangle mask by picking all pixels below a given line
triangle_mask = (y > 400 + n - x)
#set the triangle to be cyan
copyImg[triangle_mask] = [0,255,255]
#show image
plt.imshow(copyImg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment