cci

module
v0.0.0-...-52bde04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2020 License: GPL-3.0

README

Cloud Cover Index

CCI is a school project that computes the cloud cover index of any image of the sky using a basic RGB-based cloud segmentation algorithm.

How to use

Build at home
  1. Download 1.15 Golang compiler. Instructions here.
  2. Build binary with go build -o cci cmd/main.go
  3. (optionally) Run and build in the same command go run cmd/main.go
Instructions

Use built binary with the following flags

  • -src path to the source image
  • -mask path to the mask image
  • -s if set, an output file with the segmentation results will be created
  • -out path to the output file (will be created for you)

Examples

  • Just output cloud cover index:
./cci -src myImage.jpg -mask myMask.png
  • Output cloud cover image and segmentation file:
./cci -src myImage.jpg -mask myMask.png -s -out myOutputFile.png

Package structure

  • cmd is a command line interface that read input files and parses them into Golang's image pgk abstractions.
  • alg is a package that deals with image objects and run segmentation algorithms.

Results

Source Image Segmentation result CCI
360-1 360-1 seg 0.181054

command: ./cci -src samples/360-1.jpg -mask samples/mask-1350-sq.png -s -out samples/360-1.png

Source Image Segmentation result CCI
360-2 360-2 seg 0.292510

command: ./cci -src samples/360-2.jpg -mask samples/mask-1350-sq.png -s -out samples/360-2.png

Source Image Segmentation result CCI
360-3 360-3 seg 0.44803

command: ./cci -src samples/360-3.jpg -mask samples/mask-1350-sq.png -s -out samples/360-3.png

Source Image Segmentation result CCI
360-4 360-4 seg 0.505722

command: ./cci -src samples/360-4.jpg -mask samples/mask-1350-sq.png -s -out samples/360-4.png

Source Image Segmentation result CCI
360-5 360-5 seg 0.517248

command: ./cci -src samples/360-5.jpg -mask samples/mask-1350-sq.png -s -out samples/360-5.png

Source Image Segmentation result CCI
360-6 360-6 seg 0.324765

command: ./cci -src samples/360-6.jpg -mask samples/mask-1350-sq.png -s -out samples/360-6.png

Source Image Segmentation result CCI
rect-1 rect-1 seg 0.121358

command: ./cci -src samples/rect-1.jpg -mask samples/mask-1350-sq.png -s -out samples/rect-1-circle-mask.png

Source Image Segmentation result CCI
rect-1 rect-1 seg 0.167027

command: ./cci -src samples/rect-1.jpg -mask samples/3264-1831-rect-mask.png -s -out samples/rect-1-rect-full-mask.png

Source Image Segmentation result CCI
rect-1 rect-1 seg 0.007702

command: ./cci -src samples/rect-1.jpg -mask samples/3264-1831-happy-mask.png -s -out samples/rect-1-rect-happy-mask.png

Source Image Segmentation result CCI
rect-1 rect-1 seg 0.308125

command: ./cci -src samples/small-lots-of-clouds.jpg -mask samples/3264-1831-rect-mask.png -s -out samples/small-lots-of-clouds.png

Contributors

Directories

Path Synopsis
package alg contains a cloud cover index calculator that performs the computations using a source and a mask image.
package alg contains a cloud cover index calculator that performs the computations using a source and a mask image.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL