“CV2.Copymakeborder” Code-Antworten

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

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen