Skip to content

jack-thesparrow/tube-color-detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tube Color Detector

A Python script that takes the image sample(shown below) as input and gives the colors in the tubes in order in image_name_analysis.json

Sample Input Images

Sample Output

For the image assets/bottle0.jpeg the bottle0_analysis.json would be as follows:

{
  "tube0": [
    "red",
    "tan",
    "rose",
    "purple"
  ],
  "tube1": [
    "blue",
    "white",
    "rose",
    "orange"
  ],
  "tube2": [
    "blue",
    "red",
    "cyan",
    "lime"
  ],
.....and so on.....

⚠️ Prerequisites

  1. git installed and properly setup.

  2. The latest python or anaconda installed (preferrably python).

  3. pip should be working.

  4. You should either be on Linux or Windows.

  5. You can you VScode terminal or just rawdawg it via terminal in linux.

📁 File Structure

  • main.py - The main program.

  • modules/ - Contains modules for the main.py script.

  • requirements.txt - The dependencies of the program.

  • assets/ - Contains the sample input for the program.

  • README.md - The file that you're currently reading 😏.

How to use the program:

Firstly clone the repo via by pasting the commands in the terminal:

git clone https://github.com/jack-thesparrow/tube-color-detect.git

or if you have git SSH setup the you can do:

git clone git@github.com:jack-thesparrow/tube-color-detect.git

Now go inside the directory via:

cd tube-color-detect

All the dependencies are listed in the requirements.txt. Install them by running the following command in terminal.

pip install -r requirements.txt

Now you can run the script using:

python main.py <image_name.png>

Sample images are provided in the assets directory.

The saved output will be stored in image_name_analysis.json

🌚 Our Team (Core Contributors)

About

A Python program that detects the colors stored in tubes and returns a JSON file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors