...
Taking the depth registered row image (see Preprocessing (Image Preparation + Depth Registration) for more information).
Extract every pixel from the image, and plot each RGB triplet onto a 3 axis plot.
Cluster all the RGB values into five clusters.
Determine the cluster with the highest number of pixels. This is the dominant cluster.
Find the geometric centre of the dominant cluster. The R, G and B values of this point is our Dominant Colour.
Convert the RGB value to hex and export both .
...