Blobs#

class Blobs(image=None, kulpa=True, binaryImage=False, **kwargs)[source]#

Methods

aligned_box(**kwargs)

Compute rectangle aligned with ellipse axes for blobs

append(item)

S.append(value) -- append value to the end of the sequence

blob_frame()

Transformation from blob coordinate frame to image frame

clear()

copy()

count(value)

dotfile([filename, direction, show])

Create a GraphViz dot file

extend(other)

S.extend(iterable) -- extend sequence by appending elements from the iterable

filter([area, circularity, color, touch, aspect])

Filter blobs

humoments(**kwargs)

Hu image moment invariants of blobs

index(value, [start, [stop]])

Raises ValueError if the value is not present.

insert(i, item)

S.insert(index, value) -- insert value before index

label_image([image])

Create label image from blobs

perimeter_approx(**kwargs)

Approximate perimeter of blob

perimeter_hull(**kwargs)

Convex hull of blob's perimeter

plot_aligned_box(**kwargs)

Plot aligned rectangles of blobs using Matplotlib

plot_axes(**kwargs)

Plot equivalent ellipse axes of blobs using Matplotlib

plot_box(**kwargs)

Plot a bounding box for the blob using Matplotlib

plot_centroid([label])

Plot the centroid of blobs using Matplotlib

plot_ellipse(**kwargs)

Plot the equivalent ellipses of blobs using Matplotlib

plot_labelbox([label])

Plot a labelled bounding box of blobs using Matplotlib

plot_perimeter([show, epsilon, clockwise])

Plot the perimeter of blobs using Matplotlib

polar(**kwargs)

Boundary in polar coordinate form

polarmatch(target)

Compare polar profiles

pop([index])

Raise IndexError if list is empty or index is out of range.

remove(item)

S.remove(value) -- remove first occurrence of value.

reverse()

S.reverse() -- reverse IN PLACE

sort([by, reverse])

Sort blobs

Attributes

a

Radius of equivalent ellipse

area

Area of the blob

aspect

Blob aspect ratio

b

Radius of equivalent ellipse

bbox

Bounding box

bboxarea

Area of the bounding box

centroid

Centroid of blob

children

Child blobs

circularity

Blob circularity

color

Blob color

fillfactor

Fill factor, ratio of area to bounding box area

id

Blob id number

level

Blob level in hierarchy

moments

Moments of blobs

orientation

Blob orientation

p

Centroid point of blob

parent

Parent blob

perimeter

Perimeter of the blob

perimeter_length

Perimeter length of the blob

touch

Blob edge touch status

u

u-coordinate of the blob centroid

umax

Maximum u-axis extent

umin

Minimum u-axis extent

v

v-coordinate of the blob centroid

vmax

Minimum v-axis extent

vmin

Maximum v-axis extent