: Error resolving type specified in JSON ‘, Python.Runtime’. Path ‘$type’, line 1, position 462.Įxception Type: JsonSerializationException Message: Error resolving type specified in JSON ‘, Python.Runtime’. Hex = (dominant_color << 16) + (dominant_color << 8) + (dominant_color) Print(“Dominant Color :”, dominant_color) #print(b’#’+b16encode(bytes(dominant_color))) _, labels, centroids = cv2.kmeans(pixels, n_colors, None, criteria, 10, flags)ĭominant_color = palette)] mean() for i in range(img.shape)]Ĭriteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 200. Items, inv = np.unique(a, return_inverse=True)