test21920×1080 12.7 KB

So I did this test with a 1920x1080 image consisting of my 5 masks and white background. When I inputted this image into the program above, the colors array consists of the following
[[ 10. 133.   1.]
 [ 14.   1. 133.]
 [ 32. 255.   0.]
 [182. 182. 202.]
 [182. 202. 182.]
 [183. 255. 182.]
 [187. 206. 187.]
 [188. 187. 206.]
 [188. 188. 206.]
 [188. 206. 188.]
 [188. 255. 187.]
 [189. 255. 188.]
 [193. 193. 210.]
 [193. 210. 193.]
 [194. 255. 193.]
 [243.   5. 247.]
 [249. 182. 251.]
 [249. 187. 251.]
 [249. 188. 251.]
 [249. 193. 251.]
 [255.   0.   0.]
 [255. 182. 182.]
 [255. 187. 187.]
 [255. 188. 188.]
 [255. 193. 193.]
 [255. 255. 255.]]

With len(colors) = 26. I did not resize the image so I am quite confused why there are 26 unique colors as opposed to 6. Perhaps I am doing something wrong with my preprocessing but I am lost with regards to that.