Module Expr Str ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias Import alias identifier Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr ExtSlice Slice Num Num Slice Num Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword Num keyword Num keyword Num Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index Num Call NameLoad Num Assign NameStore Call NameLoad NameLoad keyword Num keyword Num Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpMult SubscriptLoad NameLoad ExtSlice Slice Index Num Call NameLoad Num Assign NameStore Call NameLoad NameLoad keyword Num keyword Num Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Str Str Str Assign NameStore ListLoad Str Str Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Num Num keyword TupleLoad Num Num keyword NameLoad keyword NameLoad keyword Dict Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad keyword NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr
N/A N/A 
==============
Blob Detection
==============

Blobs are bright on dark or dark on bright regions in an image. In
this example, blobs are detected using 3 algorithms. The image used
in this case is the Hubble eXtreme Deep Field. Each bright dot in the
image is a star or a galaxy.

Laplacian of Gaussian (LoG)
-----------------------------
This is the most accurate and slowest approach. It computes the Laplacian
of Gaussian images with successively increasing standard deviation and
stacks them up in a cube. Blobs are local maximas in this cube. Detecting
larger blobs is especially slower because of larger kernel sizes during
convolution. Only bright blobs on dark backgrounds are detected. See
:py:meth:`skimage.feature.blob_log` for usage.

Difference of Gaussian (DoG)
----------------------------
This is a faster approximation of LoG approach. In this case the image is
blurred with increasing standard deviations and the difference between
two successively blurred images are stacked up in a cube. This method
suffers from the same disadvantage as LoG approach for detecting larger
blobs. Blobs are again assumed to be bright on dark. See
:py:meth:`skimage.feature.blob_dog` for usage.

Determinant of Hessian (DoH)
----------------------------
This is the fastest approach. It detects blobs by finding maximas in the
matrix of the Determinant of Hessian of the image. The detection speed is
independent of the size of blobs as internally the implementation uses
box filters instead of convolutions. Bright on dark as well as dark on
bright blobs are detected. The downside is that small blobs (<3px) are not
detected accurately. See :py:meth:`skimage.feature.blob_doh` for usage.
 skimage data skimage.feature blob_dog blob_log blob_doh math sqrt skimage.color rgb2gray N/A matplotlib.pyplot plt N/A image N/A N/A N/A data hubble_deep_field N/A N/A 0 500 N/A 0 500 N/A image_gray N/A rgb2gray image N/A blobs_log N/A blob_log image_gray max_sigma 30 num_sigma 10 threshold 0.1 N/A N/A blobs_log N/A N/A N/A 2 N/A N/A blobs_log N/A N/A N/A 2 N/A sqrt 2 N/A blobs_dog N/A blob_dog image_gray max_sigma 30 threshold 0.1 N/A N/A blobs_dog N/A N/A N/A 2 N/A N/A blobs_dog N/A N/A N/A 2 N/A sqrt 2 N/A blobs_doh N/A blob_doh image_gray max_sigma 30 threshold 0.01 N/A blobs_list N/A blobs_log blobs_dog blobs_doh N/A colors N/A yellow lime red N/A titles N/A Laplacian of Gaussian Difference of Gaussian Determinant of Hessian N/A sequence N/A zip blobs_list colors titles N/A N/A fig axes N/A N/A plt subplots 1 3 figsize N/A 14 4 sharex True sharey True subplot_kw N/A adjustable box-forced N/A N/A N/A plt tight_layout N/A axes N/A N/A axes ravel N/A N/A blobs color title sequence N/A N/A ax N/A axes N/A 0 N/A axes N/A axes N/A 1 N/A N/A N/A ax set_title title N/A N/A N/A ax imshow image interpolation nearest N/A N/A N/A ax set_axis_off N/A blob blobs N/A N/A N/A y x r blob N/A c N/A N/A plt Circle N/A x y r color color linewidth 2 fill False N/A N/A N/A ax add_patch c N/A N/A N/A plt show