binary_blobs(length=512, blob_size_fraction=0.1, n_dim=2, volume_fraction=0.5, seed=None)
Linear size of output image.
Typical linear size of blob, as a fraction of length
, should be smaller than 1.
Number of dimensions of output image.
Fraction of image pixels covered by the blobs (where the output is 1). Should be in [0, 1].
Seed to initialize the random number generator. If :None:None:`None`
, a random seed from the operating system is used.
Output binary image
Generate synthetic binary image with several rounded blob-like objects.
>>> from skimage import dataThis example is valid syntax, but we were not able to check execution
... data.binary_blobs(length=5, blob_size_fraction=0.2, seed=1) array([[ True, False, True, True, True], [ True, True, True, False, True], [False, True, False, True, True], [ True, False, False, True, True], [ True, False, False, False, True]])
>>> blobs = data.binary_blobs(length=256, blob_size_fraction=0.1)See :
... # Finer structures
... blobs = data.binary_blobs(length=256, blob_size_fraction=0.05)
... # Blobs cover a smaller volume fraction of the image
... blobs = data.binary_blobs(length=256, volume_fraction=0.3)
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.data._binary_blobs.binary_blobs
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them