Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cv2.copyMakeBorder

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

cv2.copyMakeBorder

# Python program to explain cv2.copyMakeBorder() method
  
# importing cv2
import cv2
  
# path
path = r'C:UsersRajnishDesktopgeeksforgeeksgeeks.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)
Comment

PREVIOUS NEXT
Code Example
Python :: python remove last instance of a list 
Python :: python to run excel macro 
Python :: pandas today date 
Python :: spark df to pandas df 
Python :: convert list to tuple python 
Python :: mypy clear cache 
Python :: install python3 in ubuntu 
Python :: python generate pdf from template 
Python :: countplot for different classes in a column 
Python :: pandas read to a csv file 
Python :: python selenium send keys enter send 
Python :: socket get hostname of connection python 
Python :: python flask how to remove last character from string 
Python :: create a virtualenv python3 
Python :: python circular import 
Python :: python list object ids 
Python :: python extract substring 
Python :: how to convert tuple into list in python 
Python :: django message 
Python :: Python Difference between two dates and times 
Python :: how to swap two variables without using third variable python 
Python :: create numpy array with ones 
Python :: how to see the whole dataset in jupyterlab 
Python :: Merge two data frames based on common column values in Pandas 
Python :: python if type dict 
Python :: How to track hands python opencv/mediapipe 
Python :: django error handling < form 
Python :: how to get size of list in python 
Python :: I have string index in pandas DataFrame how can I select by startswith? 
Python :: Spotify API Authentication in Python 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =