Skip to main content

PyPI - Python Version PyPI version

UIB - V Features is a library to extract useful features of different types(morphological, texture and color). To increase the flexibility of the library all functions can be used with masks or contours.

UIB - V Features was originally developed by researchers of UGIVIA. This research group is centered on computer vision and artificial intelligence.

All the features available are grouped in one iterator to simplify the use of this library.

Installation

Install the library is very simple with pip

$ pip install uib-vfeatures

List of features

Morphological

  • Solidity
  • Convex hull perimeter
  • Convex hull area
  • Bounding box area
  • Rectangularity
  • Minor radius
  • Maximum radius
  • Feret
  • Breadh
  • Circularity
  • Roundness
  • Feret Angle
  • Eccenctricity
  • Center
  • Sphericity
  • Aspect Ratio
  • Area equivalent diameter
  • Perimeter equivalent diameter
  • Equivalent elipse area
  • Compactness
  • Area
  • Convexity
  • Shape
  • Perimeter

Color

  • Mean of the LAB channels
  • Mean of the RGB channels
  • Mean of the HSV channels
  • Standard deviation of the LAB channels
  • Standard deviation of the RGB channels
  • Standard deviation of the HSV channels

Texture features

  • Contrast
  • Dissimilarity
  • Homogeneity
  • ASN
  • Energy
  • Correlation

Demo

We're going to use our library with a mask image .

from uib_vfeatures.masks import Masks
from uib_vfeatures import Features_mask as ftrs
import cv2

First of all we read the image from a file, then we try our features with visualizations. We only have three features with visualization: the bounding box area, the eccentricity and the solidity.

mask = cv2.imread("mask.jpg")

Masks.bounding_box_area(mask, True)

Masks.eccentricity(mask, True)
Masks.solidity(mask, True)

Iterator

You can use an iterator and implement every morpholical feature.

features = {}

for key, func in features.items():
    features[key] = func(mask)

As a result we had a dicctionary of the form {'Feature_name': value}

Citation

If you use this code, please cite

@article{PETROVIC2020104027,
    title = {Sickle-cell disease diagnosis support selecting the most appropriate machine learning method: Towards a general and interpretable approach for cell morphology analysis from microscopy images},
    author = {Nataša Petrović and Gabriel Moyà-Alcover and Antoni Jaume-i-Capó and Manuel González-Hidalgo},
    journal = {Computers in Biology and Medicine},
    volume = {126},
    pages = {104027},
    year = {2020},
    issn = {0010-4825},
    doi = {https://doi.org/10.1016/j.compbiomed.2020.104027},
    url = {https://www.sciencedirect.com/science/article/pii/S0010482520303589}
}

Metadata

Release files for uib-vfeatures 0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uib-vfeatures 0.7
File Size Uploaded
uib_vfeatures-0.7.tar.gz 11.4 kB Details

Release files / uib_vfeatures-0.7.tar.gz

Download URL uib_vfeatures-0.7.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
71162b174c4c0686266d4c126ea6f4207871e5a0ac91d180d5fecbd269e8b7b4
BLAKE2b-256 checksum
How to use checksums
283fb9a5490df88a132c1ae23c67a02807ff394e884dd60435ffa116c8aa2b48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.7 This release

1 release file

0.6.1

1 release file

0.6

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1.1

1 release file

0.5.1

1 release file

0.5

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.3

1 release file

0.1.3

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page