slmsuite.holography.analysis.blob_detect#
- blob_detect(img, filter=None, plot=False, **kwargs)[source]#
Detect blobs in an image.
Wraps
cv2.SimpleBlobDetector(see these links) Default parameters are optimized for bright spot detection on dark background, but can be changed with**kwargs.- Parameters:
img (numpy.ndarray) – The image to perform blob detection on.
filter ({"dist_to_center", "max_amp"} OR None) – One of
dist_to_centerormax_amp.plot (bool) – Whether to show a debug plot.
title (str) – Plot title.
fig (matplotlib.figure.Figure) – Figure for plotting.
axs (list of matplotlib.axes.Axis or matplotlib.axes.Axis) – Axes for plotting.
show (bool) – Whether or not to show the plot.
**kwargs – Extra arguments for
cv2.SimpleBlobDetector.
- Returns:
blobs (ndarray) – List of blobs found by
detector.detector (
cv2.SimpleBlobDetector) – A blob detector with customized parameters.