# Import the NumPy library
import numpy as np
w, h = 16, 16
I = np.random.randint(0, 2, (w, h, 3)).astype(np.ubyte)
# Use numpy.ravel_multi_index to convert the RGB values to unique integer indices
F = np.ravel_multi_index(I.T, (256, 256, 256))
n = len(np.unique(F))
print(n)