Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create a blank image

'''This will create an image with a black background, technically blank 
background, since at any position the black pixel is represented by the
value,(0,0,0). Upon adding any pixel value (R,G,B) to this position (s),
the results is the added pixel itself.'''
import numpy as np
import cv2
height = 460
width =460
channels = 3
img = np.zeros((height,width,channels), dtype=np.uint8)
cv2.imshow("blank_image", img)
Comment

PREVIOUS NEXT
Code Example
Python :: pandas profile report python 
Python :: python beautiful 
Python :: python float print 2 digits 
Python :: how to create a python script to automate software installation? 
Python :: python collections Counter sort by key 
Python :: how to add for loop in python 
Python :: how to find if the numpy array contains negative values 
Python :: how to save an image with the same name after editing in python pillow module 
Python :: numpy convert true false to 0 1 
Python :: reverse range in python 
Python :: python how to draw a square 
Python :: count repeated characters in a string python 
Python :: How to store password in hashlib in python 
Python :: python3 ngrok.py 
Python :: python timedelta to seconds 
Python :: calculate distance in python 
Python :: import numpy financial python 
Python :: split word python 
Python :: how to load mnist dataset in python 
Python :: plot multiple axes matplotlib 
Python :: python how to calculate how much time code takes 
Python :: python replace double quotes with single quotes in string json loads 
Python :: on progress callback pytube 
Python :: get the last element from the list 
Python :: flask get data from html form 
Python :: extract int from string python 
Python :: Calculate Euclidean Distance in Python using distance.euclidean() 
Python :: install play sound python terminal 
Python :: qfiledialog python save 
Python :: change color of text button pyqt5 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =