Guest User

Untitled

a guest
Jun 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. [x,y,w,h] = cv2.boundingRect(contour)
  2. roi = image[y:y+h,x:x+w]
  3. m[y:y+h, x:x+w]=roi
  4.  
  5. cv2.drawContours(m,[c],-1,0,1)
  6. image = cv2.bitwise_and(image,image, mask=m)
Add Comment
Please, Sign In to add comment