Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import cv2
- img = cv2.imread('parrot.bmp', -1) #2nd argument: 1-colorful img, 0-greyscale, -1-with transparency
- img = cv2.rectangle(img,(65, 165),(265,330),(0,255,0),3) #1st arg: top-left corner of rect
- #2nd arg: bottom-right corner of rect
- #3rd arg: color
- #4th arg: width in pixels
- cv2.imshow('Parrots', img)
- cv2.waitKey(0)
- cv2.destroyWindow('Parrots')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement