Classes/Modules¶
Images¶
Image¶
Regions¶
-
class
Regions.
Regions
(obj_regions)[source]¶ This class represent a collection of regions: segmented image elements It cannot be instanced directly. It is returned from the object
Image
through the function Regions(…)Example: >>> import image_features_extraction as fe >>> imgs = fe.Images(folder_name) >>> img = imgs.item(1) >>> regs = img.Regions()
-
count
()¶
-
count_update
(count)¶
-
get_features
(features, class_value=None, class_name='class_name')[source]¶ get_features(…) returns a table with all values for the property names given in input, and supplies an additional parameter for feature classification
Parameters: - features (List) – list of property/measure names (e.g, ‘area’, ‘centroid’, etc )
- class_value (int, string (default=None)) – classification label
Returns: table cointaining all property values (columns) for all elements in the regions object (rows)
Return type: Pandas.DataFrame
Example: >>> import image_features_extraction as fe >>> imgs = fe.Images(folder_name) >>> img = imgs.item(1) >>> regs = img.Regions() >>> df = regs.get_features(['label', 'area','perimeter', 'centroid'], class_value=1)
-
item
(i)[source]¶ Item(..) returns the i-th image element of the regions.
Parameters: i (int) – the i-th element of the collection region Returns: Region Return type: object Example: >>> import image_features_extraction as fe >>> imgs = fe.Images(folder_name) >>> img = imgs.item(1) >>> regs = img.Regions() >>> reg = regs.item(1)
-
prop_values
(prop_name)[source]¶ prop_values(…) returns the values of the specified property/measure name (e.g., ‘area’) for all image elements contained in the object Regions. For a list of property names refer to “regionprops <http://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.regionprops>”_.
Parameters: prop_name (string) – name of the property to measure (e.g, ‘area’) Returns: values of the property name in input Return type: List Example: >>> import image_features_extraction as fe >>> imgs = fe.Images(folder_name) >>> img = imgs.item(1) >>> regs = img.Regions() >>> areas = regs.prop_values('area')
-