CMeasure

class ikomia.core.pycore.CMeasure

Class to handle available measures that can be computed on blob object in image (ie connected component). Here is the list of possible measures (MeasureId):

  • Surface: cv::contourArea

  • Perimeter: cv::arcLength

  • Centroid: computed from moments or average on points coordinates if moments are not available cv::Moments

  • Bbox: cv::boundingRect

  • Oriented bbox: cv::minAreaRect

  • Equivalent diameter: estimation based on blob surface

  • Elongation: computed from R. Mukundan and K.R. Ramakrishnan. Moment Functions in Image Analysis –Theory and Applications. World Scientific, 1998

  • Circularity: computed from surface and perimeter -> circularity = (4*PI*surface) / (perimeter²)

  • Solidity: computed from the convex hull -> solidity = surface / hullSurface

Import

from ikomia.core import CMeasure

Methods

__init__(arg1)

__init__( (object)self) -> None :

get_available_measures()

Get available measures (static method).

get_name(id)

Get measure name from its identifier (static method).

Attributes

id

Measure identifier

name

Measure name

Details

__init__((object)arg1) None
__init__( (object)self) -> None :

Default constructor

__init__( (object)self, (int)id) -> None :

Construct a measure with the given identifier.

Args:

id (MeasureId): measure identifier

__init__( (object)self, (int)id, (str)name) -> None :

Construct a measure with the given identifier and name.

Args:

id (MeasureId): measure identifier

name (str): measure name

static get_available_measures() object :

Get available measures (static method).

Returns:

available CMeasure objects

Return type:

CMeasure list

static get_name((int)id) str :

Get measure name from its identifier (static method).

Returns:

measure name

Return type:

str