Kappa ( κ ): Analysis of Curvature in Biological Image Data using B-splines

Hadrien Mary, Gary J. BrouhardbioRxiv 2019 · DOI

Abstract

Curvature is a central morphological feature of tissues, cells, and sub-cellular structures. A challenge for computational biology is to measure the curvature of these structures from biological image data. We present an open-source Fiji plugin for measuring curvature using B-splines. The plugin is named Kappa after the Greek symbol for curvature, κ . Kappa is semi-automated: users create an initialization curve by a point-click method, and the initialization curve is fit to the underlying data using an iterative minimization algorithm. We demonstrate Kappa’s applicability on images of cytoskeletal filaments in vitro , the cell wall of budding yeast, and whole worms moving in an agar dish. In order to verify the accuracy and precision of Kappa, we created a bank of synthetic images of known curvature using sine waves and golden spirals, which we digitized with different signal-to-noise ratios (SNR), pixel sizes, and point-spread functions (PSF). For synthetic images with characteristics similar to real data, the measured curvatures of those images show a high correlation with the theoretical curvatures. Our fitting algorithms perform better with higher SNR, smaller pixel sizes, and especially PSFs equivalent to super-resolution microscopy data (surprise, surprise). Kappa is freely available under the MIT license for simple integration into Fiji-based workflows. The source code and documentation can be found on GitHub at https://github.com/brouhardlab/Kappa .

Introduction

In biological systems, morphology often dictates function. The curvature of a cell membrane or a cytoskeletal filament can act as a physical signal, recruiting specific proteins to high-curvature "hotspots." However, accurately quantifying this curvature from biological images is technically demanding. Biological images are frequently noisy and "crowded," with structures like microtubules often appearing as blurred streaks due to the diffraction limit of light. Digitization further complicates measurement by introducing discretization errors. Existing tools often suffer from "over-fitting," where image noise is misinterpreted as physical curvature. Kappa was developed to provide a robust, semi-automated solution to these challenges.

Methodology: B-splines and Iterative Fitting

Kappa utilizes cubic B-splines, which are sequences of Bézier curves joined with $C^2$ continuity. These mathematical structures are ideal for biological modeling because they are inherently smooth and flexible.

Structure of a cubic B-spline defined by control points $P_0$ through $P_3$.

The workflow begins with a semi-automated initialization phase where a user clicks along a structure to define a rough path. This initial curve is then refined through iterative fitting. Kappa employs two primary algorithms for this: Point Distance Minimization (PDM) and Squared Distance Minimization (SDM). These algorithms "snap" the spline to the underlying pixel data by minimizing the distance between the curve and high-intensity pixels. To prevent "wiggly" artifacts caused by noise, Kappa includes a heuristic to prune redundant control points if they become too densely packed.

Curvature Quantification via Subdivision

To derive precise curvature ($\kappa$) values, Kappa employs the de Casteljau algorithm. This algorithm recursively subdivides the spline into increasingly smaller segments.

The de Casteljau algorithm recursively subdivides the spline to increase point density, enabling high-resolution curvature calculation.

By increasing the density of points along the curve, the software can calculate local curvature at a high resolution, allowing for the detection of subtle morphological changes that might be missed by coarser methods.

Validation and Performance

The authors validated Kappa using a combination of real-world biological data—including microtubules, yeast cell walls, and C. elegans—and a bank of synthetic benchmark images (sine waves and golden spirals) with varying Signal-to-Noise Ratios (SNR) and Point Spread Functions (PSF).

  • High Accuracy: For synthetic sine waves, the Pearson correlation ($r$) between true and measured curvature exceeded 0.8 for any SNR above 10 dB.
  • Robustness: Even at low SNR ($< 5$ dB), the mean curvature error remained remarkably low (approx. $0.022\ \mu m^{-1}$).
  • Resolution Sensitivity: Performance is significantly enhanced with "super-resolution" data (PSF of 10-50 nm), where systemic offsets between measured and theoretical curves are nearly eliminated.
  • Intensity Correlation: A key feature of Kappa is its ability to correlate curvature with signal intensity in a secondary channel, facilitating studies on curvature-sensing proteins.

Discussion and Conclusion

While Kappa is highly effective, it faces challenges in extremely noisy environments where algorithms may settle into "local minima"—fits that are locally optimal but globally incorrect. Additionally, fitting becomes difficult when curvature changes more rapidly than the control point density can accommodate, as seen in the centers of golden spirals.

Future development aims to port Kappa to ImageJ2 (Ops) to enhance computational speed and scriptability. The authors also suggest exploring advanced "tangent distance" minimization or machine learning approaches to further improve fitting accuracy in complex image landscapes.

Kappa is open-source and available for the research community at https://github.com/brouhardlab/Kappa.

Summary updated

Abstract

Abstract Curvature is a central morphological feature of tissues, cells, and sub-cellular structures. A challenge for computational biology is to measure the curvature of these structures from biological image data. We present an open-source Fiji plugin for measuring curvature using B-splines. The plugin is named Kappa after the Greek symbol for curvature, κ . Kappa is semi-automated: users create an initialization curve by a point-click method, and the initialization curve is fit to the underlying data using an iterative minimization algorithm. We demonstrate Kappa’s applicability on images of cytoskeletal filaments in vitro , the cell wall of budding yeast, and whole worms moving in an agar dish. In order to verify the accuracy and precision of Kappa, we created a bank of synthetic images of known curvature using sine waves and golden spirals, which we digitized with different signal-to-noise ratios (SNR), pixel sizes, and point-spread functions (PSF). For synthetic images with characteristics similar to real data, the measured curvatures of those images show a high correlation with the theoretical curvatures. Our fitting algorithms perform better with higher SNR, smaller pixel sizes, and especially PSFs equivalent to super-resolution microscopy data (surprise, surprise). Kappa is freely available under the MIT license for simple integration into Fiji-based workflows. The source code and documentation can be found on GitHub at https://github.com/brouhardlab/Kappa .
BibTeX
@misc{mary2019kappa,
  author = {Hadrien Mary and Gary J. Brouhard},
  title = {{Kappa ( <i>κ</i> ): Analysis of Curvature in Biological Image Data using B-splines}},
  year = {2019},
  doi = {10.1101/852772},
  howpublished = {bioRxiv},
}
Figure