sep.extract turns out to be able to do connected component labelling (ccl) quite fast.
We can, however, not use 4-connectivity or an arbitrary structuring element.
8-connectivity is set in stone in SExtractor hence in sep.
sep.extract does more than ccl, it also does source measurements, albeit without the accuracy of (Gaussian) fits - it uses the moments or barycenter method, that is also implemented in PySE, but in PySE as an initial 'guess' to start Gauss fitting.
We don't use these source measurements from sep.extract yet, just the segmented islands, the rest of PySE still uses its own routines for source measurements.
The next step could be to speed up those source measurements using e.g. Numba ot to use the source measurements from sep.extract. The latter option would obviously be the fastest.
sep.extract
turns out to be able to do connected component labelling (ccl) quite fast. We can, however, not use 4-connectivity or an arbitrary structuring element. 8-connectivity is set in stone inSExtractor
hence insep
.sep.extract
does more than ccl, it also does source measurements, albeit without the accuracy of (Gaussian) fits - it uses themoments
orbarycenter
method, that is also implemented inPySE
, but inPySE
as an initial 'guess' to start Gauss fitting. We don't use these source measurements fromsep.extract
yet, just the segmented islands, the rest ofPySE
still uses its own routines for source measurements. The next step could be to speed up those source measurements using e.g. Numba ot to use the source measurements fromsep.extract
. The latter option would obviously be the fastest.