gm2d¶
- kgpy.img.GeneralizedMedian.gm.gm2d(image)¶
Compute the generalized median (GM) of a 2D numpy array (image). The GM is a robust measure of central tendency. The GM is less susceptible to outliers, noise, background and negative pixel values than the centroid. Like the centroid, however, the GM can be computed to sub-pixel accuracy. This implementation takes advantage of FFT convolution for efficiency.
The result is a numpy array given in pixel coordinates, with [0.,0.] corresponding to the center of image[0,0]
2018-Oct-27 C. Kankelborg