Skip to main content

GGB Color Space in Python

Project description

GGB Color Space

PyPI license TravisCI Docker

This package is implementation of GGB color space from Development of a Robust Algorithm for Detection of Nuclei and Classification of White Blood Cells in Peripheral Blood Smear Image.

Installation

Install GGB

This package could be installed via PyPI.

pip3 install ggb

or manually:

python3 setup.py install

Building Docker Image

Dockerfile is also provided in this project. To build the image:

cd docker/
bash docker.build.sh

or pull it directly from Docker Hub:

docker pull reshalfahsi/ggb

Building the Documentation

The documentations to this package could be built using Sphinx.

cd docs/
pip3 install -r requirements.txt
sphinx-apidoc -f -o source ../ggb
make html

The HTML pages are in docs/build/html.

Quick Demo

This package supports various computer vision libraries such as OpenCV and PIL. Complete example for these computer vision libraries provided in here. For the short example in Python3:

# import the package and its necessary components
from ggb import GGB, ColorSpace

# we are using OpenCV
import cv2

import urllib.request as urllib
import numpy as np

# load image from internet
req = urllib.urlopen('https://github.com/reshalfahsi/GGB/raw/master/docs/img/leukocytes.png')
arr = np.asarray(bytearray(req.read()), dtype=np.uint8)
img = cv2.imdecode(arr, -1)

# convert to GGB Color
ggb_image = GGB(image=img, input_color=ColorSpace.BGR).process()

# show the result    
ggb_image.show()

# save the image to OpenCV format
img = ggb_image.write()

Result

Leukocytes

alt text

Fundus

alt text

Car

alt text

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ggb-1.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

ggb-1.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file ggb-1.1.1.tar.gz.

File metadata

  • Download URL: ggb-1.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

File hashes

Hashes for ggb-1.1.1.tar.gz
Algorithm Hash digest
SHA256 7534586de60e1f2d5cdd98940e5e8d404b0f76085892e1e73bd087b587f97657
MD5 67172417cf9e8b6698f15b50de9f4307
BLAKE2b-256 2834560ae03cd8ac310d7f4447af6a432a3ea24e7dee6006ae2a25aecd8dc370

See more details on using hashes here.

File details

Details for the file ggb-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: ggb-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.9

File hashes

Hashes for ggb-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad112f939f6fc236d57fc1863f130744a1f90a7687dc245528c53d6571d53183
MD5 53c61a4bf81255f9612f426b58754f42
BLAKE2b-256 5c5e61a4b8ea6bb41c8642e805898c0e00513cb0d31ec59dbe1bc8780398bf15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page