eolearn.features.blob

Module for computing blobs in EOPatch

class eolearn.features.blob.BlobTask(*args, **kwargs)[source]

Bases: eolearn.core.eotask.EOTask

Task to compute blobs

A blob is a region of an image in which some properties are constant or approximately constant; all the points in a blob can be considered in some sense to be similar to each other.

3 methods are implemented: The Laplacian of Gaussian (LoG), the difference of Gaussian approach (DoG) and the determinant of the Hessian (DoH).

The output is a FeatureType.DATA where the radius of each blob is stored in his center. ie : If blob[date, i, j, 0] = 5 then a blob of radius 5 is present at the coordinate (i, j)

The task uses skimage.feature.blob_log or skimage.feature.blob_dog or skimage.feature.blob_doh to extract the blobs.

The input image must be in [-1,1] range.

Parameters
  • feature ((FeatureType, str) or (FeatureType, str, str)) –

    A feature that will be used and a new feature name where data will be saved. If new name is not specified it will be saved with name ‘<feature_name>_BLOB’

    Example: (FeatureType.DATA, ‘bands’) or (FeatureType.DATA, ‘bands’, ‘blob’)

  • blob_object (skimage.feature.blob_*) – Name of the blob method to use

  • blob_parameters – List of parameters to be passed to the blob function. Below a list of such parameters.

  • min_sigma (float) – The minimum standard deviation for Gaussian Kernel. Keep this low to detect smaller blobs

  • max_sigma (float) – The maximum standard deviation for Gaussian Kernel. Keep this high to detect larger blobs

  • threshold (float) – The absolute lower bound for scale space maxima. Local maxima smaller than thresh are ignored. Reduce this to detect blobs with less intensity

  • overlap (float) – A value between 0 and 1. If the area of two blobs overlaps by a fraction greater than threshold, the smaller blob is eliminated

  • num_sigma (int) – For ‘Log’ and ‘DoH’: The number of intermediate values of standard deviations to consider between min_sigma and max_sigma

  • log_scale (bool) – For ‘Log’ and ‘DoH’: If set intermediate values of standard deviations are interpolated using a logarithmic scale to the base 10. If not, linear interpolation is used

  • sigma_ratio (float) – For ‘DoG’: The ratio between the standard deviation of Gaussian Kernels used for computing the Difference of Gaussians

Stores initialization parameters and the order to the instance attribute init_args.

execute(eopatch)[source]

Execute computation of blobs on input eopatch

Parameters

eopatch (eolearn.core.EOPatch) – Input eopatch

Returns

EOPatch instance with new key holding the blob image.

Return type

eolearn.core.EOPatch

class eolearn.features.blob.DoGBlobTask(*args, **kwargs)[source]

Bases: eolearn.features.blob.BlobTask

Task to compute blobs with Difference of Gaussian (DoG) method

Stores initialization parameters and the order to the instance attribute init_args.

class eolearn.features.blob.DoHBlobTask(*args, **kwargs)[source]

Bases: eolearn.features.blob.BlobTask

Task to compute blobs with Determinant of the Hessian (DoH) method

Stores initialization parameters and the order to the instance attribute init_args.

class eolearn.features.blob.LoGBlobTask(*args, **kwargs)[source]

Bases: eolearn.features.blob.BlobTask

Task to compute blobs with Laplacian of Gaussian (LoG) method

Stores initialization parameters and the order to the instance attribute init_args.