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
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.....-
gitinstalled and properly setup. -
The latest
pythonoranacondainstalled (preferrably python). -
pipshould be working. -
You should either be on Linux or Windows.
-
You can you VScode terminal or just rawdawg it via terminal in linux.
-
main.py- The main program. -
modules/- Contains modules for themain.pyscript. -
requirements.txt- The dependencies of the program. -
assets/- Contains the sample input for the program. -
README.md- The file that you're currently reading 😏.
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.gitcd tube-color-detectAll the dependencies are listed in the requirements.txt. Install them by running the following command in terminal.
pip install -r requirements.txtpython main.py <image_name.png>Sample images are provided in the assets directory.
The saved output will be stored in image_name_analysis.json