Skip to content

color_cloth gets the main colors and its proportions from a cloth image ignoring the background, it uses the EM algorithm from OpenCV library, the algorithm needs an image with an item in the center of the picture.

Notifications You must be signed in to change notification settings

taniaReyesM/color_cloth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

color_cloth

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.

Prerequisites

  • numpy: pip install numpy
  • openCV: pip install opencv

e.g.

Image clustering with GMM...
$ python color_cloth.py <path/to/image>

Some examples...
$ python color_cloth.py images/29.jpg
Estampado

$ python color_cloth.py images/8.jpg
sombra

$ python color_cloth.py images/azul.jpg
prenda lisa

Some images with complex background, the algorithm ignores the colors and shadows in the background and shows only the color of the cloth:

$ python color_cloth.py images/22.jpg
Chamarra piel

$ python color_cloth.py images/v.jpg
Blusa verde

About

color_cloth gets the main colors and its proportions from a cloth image ignoring the background, it uses the EM algorithm from OpenCV library, the algorithm needs an image with an item in the center of the picture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages