How to find out if my image type is CV_8UC1 in opencv python and what are the other possible images types?

inspect the .dtype and .shape of your numpy array.

np.info(your_array) does a lot more, can be interesting

8UC1 means uint8, single channel, i.e. numpy shape has two dimension (h,w)

8UC3 means uint8, 3-channel (color), numpy shape is (h,w,3)

3 Likes