Ask Your Question

Revision history [back]

What astype(np.uint8) means?

Hi, I'm newbie trying to learn openCV by myself. I can searcy astype(np.uint8) is expressing sth from 0 to 255.(2**8) At the first time, I thought it means its grayscale. But I got confused after this one.

mat1 = np.array([[11, 12, 13, 14], [21, 22, 23, 24], [31, 32, 33, 34]]).astype(np.uint8)

I try to study this array but have no idea how to understand this one. How do I have to analyze this code??