What is the definition of blobs? #420
-
I understand that the function I mean these lines: blobiness = np.array(blobiness)
shape = np.array(shape)
parallel = kwargs.pop('parallel', False)
divs = kwargs.pop('divs', 2)
cores = kwargs.pop('cores', None)
if np.size(shape) == 1:
shape = np.full((3, ), int(shape))
sigma = np.mean(shape) / (40 * blobiness)
im = np.random.random(shape)
I suppose it is a type of particle size, or maybe a shape factor, but I would like to know the exact meaning according to theory. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
There is no science behind it. It's just meant to provide image for prototyping. The code is meant to provide a similar amount of blobs regardless of the image size, and that 40 is just a number that was chosen such that a |
Beta Was this translation helpful? Give feedback.
There is no science behind it. It's just meant to provide image for prototyping. The code is meant to provide a similar amount of blobs regardless of the image size, and that 40 is just a number that was chosen such that a
blobiness
of 1 gave reasonable sized blobs. Looking at the code, as you did, is probably the best way to understand how it works. Random numbers are generated between 0 and 1, a gaussian blur is performed using theblobiness
to control the size and aspect ratio of the blurring kernel, and then the result is thresholded to give a boolean image with the correct porosity.