Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. x,y = 123,123
  2. replace = xyz.copy()
  3. replace[y: y + abc_size, x: x + abc_size] = abc
  4. cv2.imshow('replace', replace)
  5.  
  6. x,y = 123,123
  7. added = xyz.copy()
  8. added[y: y + abc_size, x: x + abc_size] += abc
  9. cv2.imshow('added', added)
  10.  
  11. background = np.zeros_like(xyz)
  12. x,y = 123,123
  13. background[y: y + abc_size, x: x + abc_size] = abc
  14. add_weighted = cv2.addWeighted(background, .5, xyz, .5, 1)
  15. cv2.imshow('add_weighted', add_weighted)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement