用法:
skimage.data.binary_blobs(length=512, blob_size_fraction=0.1, n_dim=2, volume_fraction=0.5, seed=None)
生成具有多個圓形 blob-like 對象的合成二值圖像。
- length:int 可選
輸出圖像的線性大小。
- blob_size_fraction:浮點數,可選
Blob 的典型線性大小(作為
length
的一部分)應小於 1。- n_dim:int 可選
輸出圖像的維數。
- volume_fraction:浮點數,默認 0.5
被斑點覆蓋的圖像像素的分數(輸出為 1)。應該在 [0, 1] 中。
- seed:{無,int
numpy.random.Generator
如果種子是沒有的
numpy.random.Generator
使用單例。如果種子是一個int 一個新的Generator
使用實例,播種種子.如果種子已經是一個Generator
實例然後使用該實例。
- blobs:布爾數組
輸出二值圖像
參數:
返回:
例子:
>>> from skimage import data >>> data.binary_blobs(length=5, blob_size_fraction=0.2) 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) >>> # 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)
相關用法
- Python skimage.data.file_hash用法及代碼示例
- Python skimage.draw.random_shapes用法及代碼示例
- Python skimage.draw.polygon2mask用法及代碼示例
- Python skimage.draw.ellipse_perimeter用法及代碼示例
- Python skimage.draw.bezier_curve用法及代碼示例
- Python skimage.draw.line用法及代碼示例
- Python skimage.draw.set_color用法及代碼示例
- Python skimage.draw.circle_perimeter用法及代碼示例
- Python skimage.draw.polygon用法及代碼示例
- Python skimage.draw.rectangle_perimeter用法及代碼示例
- Python skimage.draw.ellipse用法及代碼示例
- Python skimage.draw.polygon_perimeter用法及代碼示例
- Python skimage.draw.circle_perimeter_aa用法及代碼示例
- Python skimage.draw.line_nd用法及代碼示例
- Python skimage.draw.disk用法及代碼示例
- Python skimage.draw.rectangle用法及代碼示例
- Python skimage.draw.line_aa用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.color.lab2lch用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.data.binary_blobs。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。