“CV2.CopyMakeBorder” Réponses codées

CV2.CopyMakeBorder

cv2.copyMakeBorder(src, top, bottom, left, right, cv2.BORDER_CONSTANT)
Impossible Iguana

CV2.CopyMakeBorder

# Python program to explain cv2.copyMakeBorder() method
  
# importing cv2
import cv2
  
# path
path = r'C:\Users\Rajnish\Desktop\geeksforgeeks\geeks.png'
  
# Reading an image in default mode
image = cv2.imread(path)
  
# Window name in which image is displayed
window_name = 'Image'
 
# Using cv2.copyMakeBorder() method
image = cv2.copyMakeBorder(image, 10, 10, 10, 10, cv2.BORDER_CONSTANT, None, value = 0)
 
# Displaying the image
cv2.imshow(window_name, image)
Bad Badger

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code