Giter Club home page Giter Club logo

color-extractor's Issues

Still maintained?

Is this project still maintained? I found two bugs inside resize that makes the project unusable and no updates for a year.

Back function

I am having a hard time trying to figure out of your Back code works. I am trying to remove the background from images and thought this would be a cool way to do it.

I trued running back by itself But I dont know where I import the picture

Getting top 5 colors of the image

Hi,
I am trying out the command line tool.
how to use the ./color-extractor CLI tool to get the top 5 colors of my image along with their frequencies. I am able to get only one. Also please provide me the json file format for --settings option. I tried to provide 'all' option to the selector but could not make it work. Also please let me know how to pass settings while using the library from python code.

Thanks,
Shabnam

Error in image_to_color.py while using as library: Line 36

Hey Thanks for the fabulous work!

I tried and CLI is working perfectly fine. However, when tried as library in a python file, giving this error:

Traceback (most recent call last):
File "test.py", line 10, in
print(img_to_color.get(img))
File "/home/color-extractor-master/color_extractor/image_to_color.py", line 36, in get
if self._settings['debug'] is None:
KeyError: 'debug'

Non CS background so might overlook something, please help!
Thanks in advance.

opencv example in README leads to incorrect color identification with default settings

In the README example, an image file is opened using opencv, which will open the file in BGR. However, the color_names.npz dataset that comes with the repo is stored as RGB. Therefore if you use the example verbatim, you will get incorrect color identifications. Since from_file.py uses skimage.io instead of opencv, the only corrections needed are on the README, which are:

  • replacing opencv calls with skimage.io calls
  • removing any mention of needing color name files stored as BGR.

opencv error

> time ./color-extractor color_names.npz cq5dam.web.415.311.png 
OpenCV Error: One of arguments' values is out of range (Seed point is outside of image) in floodFill, file /build/opencv/src/opencv-3.1.0/modules/imgproc/src/floodfill.cpp, line 508
Unable to find colors for cq5dam.web.415.311.png: `/build/opencv/src/opencv-3.1.0/modules/imgproc/src/floodfill.cpp:508: error: (-211) Seed point is outside of image in function floodFill
`
./color-extractor color_names.npz cq5dam.web.415.311.png  5.72s user 0.35s system 105% cpu 5.770 total

Image:
cq5dam web 415 311

Not Working

Just tried simple example by following readme but program always return error 'Unable to find colors for'. Tried with different images.

Question about extracted colors

I think this app is exactly what I need for a webapp I'm building. I wanted to confirm though that when you extract colors from an image, that every single color is given a name? I'd need every single color ever extracted on the app to fall into some repeatable category, i.e., red, blue, orange, etc. From looking at the XKCD Color Survey, it looks like it's even possible to extract colors and give them names such as "banana?" Is that correct?

What about black, white and gray? Are they extracted and named as well?

Thanks

No 'white' color in the dataset

The xkcd dataset (color_names.npz) used for KNN to predict color name from RGB values doesn't has white color.

Counter({'black': 1782,
         'green': 53000,
         'blue': 54785,
         'brown': 10529,
         'purple': 26416,
         'maroon': 3283,
         'red': 15476,
         'pink': 13617,
         'orange': 9152,
         'yellow': 7857,
         'mustard': 711})

In fact, it has only a few colors, not all 27 as mentioned on the blog post.

We turned to a K-Nearest-Neighbors algorithm to give color names to RGB values, thanks to the XKCD Color Survey. The XKCD survey consists of 200,000 RGB values labeled with 27 different color names (e.g. black, green, teal, etc.) that we use to train a scikit-learn KNeighborsClassifier.

How do I add white to dataset as I need it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.