Skip to main content

GGB Color Space in Python

Project description

GGB Color Space

PyPI license Travis CI docker codecov

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
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 examples for these computer vision libraries are 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.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

ggb-1.1.3-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ggb-1.1.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.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.3.tar.gz
Algorithm Hash digest
SHA256 87f234a8ea94a7553ca8844e03e9af08431e9eb3ae9ef0647c3e9576a4eddd87
MD5 ee957ac788da3e56da9a9afaa1bca740
BLAKE2b-256 92698cbbf1347f74b422d3f32298baffe3a50ba32250a651bbb8aad61ba0fad7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ggb-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0078463b350103d88ecd91c229f5b34ed88e543402e1508328d7e5f25a8cadf
MD5 23ba8db3f034f534de00498d2f51eb2e
BLAKE2b-256 94cb7a4fcf126f6a8783c34f93de676c429d0c6a3441ce0e547d15d2377c7335

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