grains#
- cuqi.data.grains(size=128, num_grains=34, seed=1)#
Generate a random image of grains built from Voronoi cells.
- Parameters:
size (int) – Size of the image to generate. Image is square with sides of length size.
num_grains (int) – Number of grains in the image.
seed (int) – Random seed for grain structure.
- Returns:
img – Image of grains.
- Return type:
ndarray
Notes
Python translation from phantomgallery code in AIRToolsII jakobsj/AIRToolsII.