pick most used colors.
The file format does not matter. At least jpg and png are possible.
이미지에서 많이 사용된 색을 골라줍니다.
코드를 작성하는 것보다 라이브러리 다운로드 받는게 더더더더더 힘들었습니다..
- sklearn
- numpy
- matplotlib
- opencv
pip3 install sklearn
pip3 install scipy
pip3 install matplotlib
pip3 install opencv-python
- Set environment
export MPLBACKEND="pdf" or "Agg"
-
run run.py
-
using Tool like PostMan
POST /pick/colors/<int:num>
Host: localhost:5000
Content-Type: multipart/form-data
Kye: img
Values: file, your image
I recommend that you only include num
up to 5
- get colors!
{
"colors": [
{
"rgb": [ 30, 25, 24 ],
"hex": "#1e1918"
}
}
python pick_colors_with_argparse.py --image images/your_image.png --clusters 3