color_cloth gets the main colors and its proportions from a cloth image using the EM algorithm from OpenCV library, it assumes that the item is in the center of the image.
- numpy:
pip install numpy
- openCV:
pip install opencv
Image clustering with GMM...
$ python color_cloth.py <path/to/image>
Some examples...
$ python color_cloth.py images/29.jpg
$ python color_cloth.py images/8.jpg
$ python color_cloth.py images/azul.jpg
Some images with complex background, the algorithm ignores the colors and shadows in the background and shows only the color of the cloth: