  The Sparsity of the Gradient (SoG) is a robust autofocusing criterion for
holography, where the gradient modulus of the complex refocused hologram is
calculated, on which a sparsity metric is applied. Here, we compare two
different choices of sparsity metrics used in SoG, specifically, the Gini index
(GI) and the Tamura coefficient (TC), for holographic autofocusing on
dense/connected or sparse samples. We provide a theoretical analysis predicting
that for uniformly distributed image data, TC and GI exhibit similar behavior,
while for naturally sparse images containing few high-valued signal entries and
many low-valued noisy background pixels, TC is more sensitive to distribution
changes in the signal and more resistive to background noise. These predictions
are also confirmed by experimental results using SoG-based holographic
autofocusing on dense and connected samples (such as stained breast tissue
sections) as well as highly sparse samples (such as isolated Giardia lamblia
cysts). Through these experiments, we found that ToG and GoG offer almost
identical autofocusing performance on dense and connected samples, whereas for
naturally sparse samples, GoG should be calculated on a relatively small region
of interest (ROI) closely surrounding the object, while ToG offers more
flexibility in choosing a larger ROI containing more background pixels.
