Skip to content

A basic cli app which allows you to calculate the Cloud Coverage Index

Notifications You must be signed in to change notification settings

DiXap/CloudCoverageIndexCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Coverage Index Calculator

Generic badge Open Source Love png1 Generic badge
forthebadge made-with-python

Table of contents

About the Project

A basic cli app which allows you to calculate the Cloud Coverage Index given a sky image.
No need to worry for pre-processing!

Getting Started

Since this app is all made with Python you're going to need some python-libraries and utilities listed below.

Prerequisites

  • First check that your current Python version is Python 3.6 or above, by running the following command on your terminal:

    $ python --version

    Python 3.8+ is recommended

    Note that in some linux distros you'll need to run it as:

    $ python3 --version
  • You migth as well check if you have PyPI as your Python package installer:
    Since this process vary for every Linux distro, I'll link you to an article explanning how to set PyPI up.

Instalation

  1. Clone the repo

    $ git clone https://github.com/DiXap/CloudCoverageIndexCalculator.git
  2. Move to project's dir and run the following

    $ pip install -r requirements.txt
  3. The step above is going to automatically install packages needed for this project.
    If you want to install them manually, here's a list with the packages:

    • opencv
    • click
    • numpy

Usage

Since this is a cli app, you're need to know the syntaxis:

$ python main.py [PATH_TO_IMAGE] [OPTIONS]

where:

  • [PATH_TO_IMAGE], refers to the absolute path of the image you want to process

    You can use relative paths only if the image or containing folder are inside project's dir

  • [OPTIONS], put as many flags as you wish in this section:

    Flags Description
    -s Display processed image used to calculate CCI
    --w Save a copy of the processed image
    --d Display original image
    --n Process a night-time image

    At any given time you can pass the --help or -h to see all available flags:

    $ python main.py --help

For example, you can pass the following command:

$ python main.py /PATH/TO/IMAGE -s --w

and the program will show and write the image

drawing

You can even try and pass all flags at the same time!

Regardless of your flag choices, the app will always display the CCI in your terrminal:

$ python main.py /PATH/TO/IMAGE -s --d --w
    CCI for image exmaple.jpg is X.XX%

Images will always be dumped inside ./dump folder, so please, don't delete it.
You can modify this setting in IPP.py:

def write(self, name: str, image='b&w', path='dump/'): # change path='' value
    ...

Night Mode

As was mentioned before, you can get the CCI from a night-time photo, just do as it follows:

$ python main.py /PATH/TO/IMAGE --n

You can add more flags but DO NOT forget to put --n, otherwhise it won't work properly

Tests

These test cases were coded to demostrate functions' error handling.
Feel free to play around with them at tests.py.

Documentation

All documentation was generated using pydoc. You'll find it inside docs.

Contact

Diego J. Padilla

Alejandro Maldonado

Acknowledgements


forthebadge biult-with-love forthebadge powered-by-electricity


Go up

About

A basic cli app which allows you to calculate the Cloud Coverage Index

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages