Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create a blank image cv2

'''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 :: how to make a random variable in python 
Python :: python soup 
Python :: python convert date to timestamp 
Python :: dataframe KeyError: 
Python :: flask template split string 
Python :: for i 
Python :: pyspark dropna in one column 
Python :: django get form data from post 
Python :: Pandas categorical dtypes 
Python :: python return specific elements from list 
Python :: how to get today weekday in python 
Python :: types of system 
Python :: remove substring from string python 
Python :: python set day of date to 1 
Python :: python slicing nested list 
Python :: scaling data 
Python :: python set remove multiple elements 
Python :: python copy 
Python :: count characters in string python 
Python :: how to split text into list python by characters 
Python :: get page title by python bs4 
Python :: Accessing elements from a Python Dictionary 
Python :: how to make a variable 
Python :: python diagonal sum 
Python :: python delete from list 
Python :: en_core_web_sm 
Python :: python list all methods of a class 
Python :: get query param in django 
Python :: ImportError: /usr/local/lib/python3.7/dist-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8 
Python :: python while loop 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =