Scalable Cytometry Image Processing (SCIP) is an open-source tool that implements an image processing pipeline on top of Dask, a distributed computing framework written in Python. SCIP performs projection, illumination correction, image segmentation and masking, and feature extraction.
Module here: https://github.com/CellProfiler/CellProfiler/blob/master/cellprofiler/modules/measuregranularity.py