We usually use 5 components for the GMM, however an automatic
selection could be desirable: if the image contains large, smooth areas, less components would be appropriate while other image areas
containing detail and a wide variety of colors might require more
than 5 components in order to be accurately represented.