# Computational Methods for Neuron Segmentation in Two-Photon Calcium Imaging Data: A Survey
## 4 Signal/Image Processing-Based Methods  
In this section, we will cover all those neuron segmentation approaches that are based on signal/image processing. The segmentation problem is approached either from a signal fingerprinting perspective by looking for specific fingerprint of the signal or object localization perspective. We have summarized different signal/image processing-based neurons segmentation methods in this section. [PERSON] et al. proposed a gradient vector fields-based cell segmentation and localization approach for calcium imaging data acquired from Zebra fish [38]. First, they compute a gradient vector field of the input frame from a calcium imaging dataset. As pixel values of gradient vector fields represent the local gradient flow in the image, the gradient vector fields are not smooth. Therefore, after calculating the fields, they apply a physical model to diffuse the gradient vectors on image boundaries, resulting in a smoother gradient flow field. Given the diffused gradient flow image, for each point, they then determine a set of positive and negative points along the gradient direction. The positive points are found by considering the points in a given radius along the positive gradient direction and same for negative points. These positive and negative points are used to create orientation and magnitude images. For each pixel, the positively voted points in a given radius are incremented by 1 and the negatively voted points are decremented by 1. For magnitude voting image, the positively voted points are incremented by magnitude of gradient multiplied by a monotonically decreasing Gaussian and the negatively voted points are decremented by same amount. After finding magnitude voting image and orientation voting image, non-maximum suppression is applied. Then a distance proportional to the radius of a neuron is used to find local maxima, which represent the nuclei of the circular neurons. To reduce false positives, mean-shift clustering is used by taking the colour and pixel intensities into account. The authors have validated their approach on two datasets. In the first case, they applied their pipeline to count neurons on retinal sections stained with DNA-binding dye. They reported a false positive rate of 4.2% and a false negative rate of 4.5% against a human expert. In the second case, they applied their approach on retinal sections stained with a different dye. They reported a false positive rate of 6.3% and a false negative rate of 5.2% against a human expert. In a hindsight, their approach achieves impressive results, but it is based on the assumption that neurons have a circular shape which might not be true all the time. Moreover, this approach cannot isolate overlapped neurons. Additionally, the approach is not tested on datasets acquired under diverse conditions and does not take the temporal activity of the neurons into account. [PERSON] et al. developed SIMA, an open source Python package that facilitates common analysis tasks related to fluorescence imaging [39]. The package can be used for motion correction, ROI (region of interest) segmentation and signal extraction from calcium imaging stacks. The package has a GUI (graphical user interface) for interactive editing of the ROIs as well. The segmentation sub-routines are based on normalized cut approach. The normalized cut approach [40] segments the image by an iterative process. At each stage, a subset of the image pixels is split into two new subsets in such a way as to minimize a penalty that depends on a set of connection weights between the pixels until a termination criterion is met. Two factors determine the resulting cuts: (1) the connection weights between pixels, and (2) the termination criterion. The package developed by the authors implements two versions of the normalized cut. In the first version, the connection weights between two pixels are logarithmically related to the correlation and distance between the pixels.