How to make Mat in opencv python
newMat_3ch = np.zeros((rows, cols, 3), dtype = "uint8") #3channel
newMat_1ch = np.zeros((rows, cols), dtype = "uint8") #1channel
Mat is just numpy array.
The study blog from marearts.com
Computer Vision & Machine Learning Research Laboratory