Computer-readable media having corresponding apparatus embodies
instructions executable by a computer to perform a method comprising:
receiving a first array; generating a plurality of second arrays based on
the first array, wherein each of the second arrays is generated using a
different threshold number, and wherein each entry of the second arrays
indicates whether a corresponding entry in the first array exceeds the
respective threshold number; generating a first vector, wherein each
entry in the first vector represents a number of connected components for
a respective one of the second arrays; generating a second vector based
on the first vector, wherein each entry of the second vector represents a
variance of a plurality of entries, including a corresponding entry, of
the first vector; generating a third vector, comprising filtering the
second vector; and selecting, based on the third vector, one of the
threshold numbers, of the second arrays or both.