Suppose that an image has hexel values at Cartesian coordinates , where i runs from 1 to N points of a hexagonal lattice. Normalizing the image yields a probability distribution . Then compute the coordinates of the image centroid by
and the covariance matrix by
in which I denotes the 2 × 2 identity matrix and s denotes the length of a hexagon side. The length and width of the hexel image are defined as and , in which and are the larger and smaller eigenvalues of the covariance matrix. The approximating ellipse is centred at the image centroid, and oriented along the principal eigenvector of the covariance matrix.
The first term of the covariance matrix C effectively regards the probability distribution as a weighted combination of Dirac delta functions located at the lattice points. The second term is a correction that arises if each delta function is replaced by a uniform distribution over the corresponding hexagon. This replacement makes biological sense because a column receives visual input from a non-zero solid angle. Without the correction, the length and width would vanish if the image consists of a single hexel concentrated at a single delta function. With the correction, the length and width of an image with a single non-zero hexel become , in which is the lattice constant. The correction becomes relatively minor when the length and width of the image are large.
The above has implicitly defined as the width of a 1D Gaussian distribution, for which is the variance. This is the full-width at of the maximum. Alternatively, the width could be estimated by the full-width at half-maximum, . For either estimate, the width is proportional to . I stick with the simpler estimate , which can be readily scaled by any multiplicative factor of the reader’s preference.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.