I'm trying to create some pixelart using a matrix in pycharm, the problem is that i have never used this program, its supposed to work just by simply selecting if you're working with the RGB model but it doesn't.
import numpy as np
from matplotlib import pyplot as plt
pixels = ([0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0])
([0,0,0,1,1,1,1,0,0,1,1,1,1,0,0,0])
([0,0,1,1,1,1,1,0,0,1,1,1,1,1,0,0])
([0,1,1,0,1,1,0,0,0,0,1,1,0,1,1,0])
print (pixels[2][4])
cv2.waitKey() `
You need to save
pixels
as a numpy array with typeuint8
and then letcv2
display it. If you pass0
towaitKey
the window will stay open until you close it manually.