Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python opencv create new image

# use numpy to create an array of color
image_height = 300
image_width = 300
number_of_color_channels = 3
color = (255,0,255)
pixel_array = numpy.full((image_height, image_width, number_of_color_channels), color, dtype=numpy.uint8)
cv2.imshow('image',pixel_array)
cv2.waitKey(0)
Comment

PREVIOUS NEXT
Code Example
Python :: primes in python 
Python :: dataframe groupby to dictionary 
Python :: convert file to base64 python 
Python :: python memoization 
Python :: python 3 of 4 conditions true 
Python :: t.interval scipy 
Python :: Running setup.py bdist_wheel for opencv-python: still running... 
Python :: print 1 thing repeatedly in 1 line python 
Python :: pyspark concat columns 
Python :: Python Relative Strength Indicator 
Python :: factorise expression python 
Python :: python round number numpy 
Python :: get number of bits on integer in python 
Python :: python console command 
Python :: github black badge 
Python :: matplotlib title not fully visible 
Python :: add field placeholder layout crispy modelform 
Python :: min max scaling pandas 
Python :: export a dataframe from rstudio as csv 
Python :: how to print not equal to in python 
Python :: phi 
Python :: install python 3 on mac 
Python :: datetime to int python 
Python :: django message framework 
Python :: python http server command line 
Python :: combinations python 
Python :: program to find even numbers in python 
Python :: add path python sys 
Python :: django not saving images forms 
Python :: tkinter clear entry 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =