app
Curvature Measurement
Curvature Measurement fits a circle to an ordered image curve, reports radius and curvature, measures traced arc length, and supports pixel-to-physical scale calibration.
Requirements And Launch
labkit_CurvatureMeasurement_app
Basic Workflow
The Files + Analysis tab contains the complete workflow:
- Choose an image in the Image section.
- Use Measure reference pixels, or enter Reference pixels directly, then enter the known reference length and unit.
- Configure and place the optional display scale bar.
- Use Start curve edit and place ordered anchors along the feature.
- Drag anchors to refine the trace; undo or clear as needed, then finish curve editing.
- Choose the densification settings, fit the circle, and measure curve length.
- Export the result CSV and overlay PNG.
The edit buttons change to Finish curve edit or Finish reference edit while their managed interaction is active. Curve and reference edits are mutually exclusive. Anchor edits and result overlays preserve the current axes zoom.
The Summary + Results tab reports curve length, radius, curvature, RMSE, fit center, and pixels per selected unit. Details explains the next valid step before a result exists and reports the current measurement afterward. The Log tab records file, edit, fit, calibration, and export actions.
The chosen image is saved as a portable project source. Older projects are upgraded on load without changing the curve, calibration, or result meaning.
Curve Editing
Curve points are ordered by placement. Undo last point removes the newest anchor and Clear curve removes the complete trace. Neighboring duplicate points are removed before numeric fitting. At least three distinct points are required for a circle fit; length requires at least two.
Fit Parameters And Semantics
Densify before circle fit is enabled by default with 300 dense points. Densification interpolates along the ordered trace before the least-squares circle fit; it changes sampling density, not the manually defined path. Show dense fit points is presentation-only.
For fitted radius r:
curvature = 1 / r
Pixel-domain radius and curvature are always available. With calibration, radius and traced length are converted to the selected physical unit and curvature uses its reciprocal unit. Curve length is the sum of distances along the ordered polyline/densified curve specified by the API options; it is not the circumference of the fitted circle.
Scale Calibration And Bar
Measure the pixel distance spanning a known reference, enter its physical length, and choose m, cm, mm, um, or nm. Calibration stores reference pixels, reference length, unit, and pixels per unit. Scale-bar length defaults to 100 units; position defaults to Bottom right and color to Black. Placing or moving the display bar does not modify the fit.
Outputs
The CSV records point count, fit settings, center, radius, curvature, traced length, calibration, units, and status. The overlay PNG contains the source image, ordered curve, optional dense samples, fit residuals, fitted circle, center, and configured scale bar when available. Each export writes its standard result manifest with source and parameter provenance.
Use Without The GUI
points = [100 80; 130 58; 165 52; 200 66; 225 95];
fit = curvature.analysisRun.computeCurvatureFit(points, ...
struct("densify", true, "densePointCount", 300));
lengthResult = curvature.analysisRun.computeCurveLength(points, struct());
Errors And Limitations
- Collinear or nearly collinear points do not define a stable finite circle.
- Calibration uncertainty propagates directly to physical radius and length.
- A circle fit summarizes a curved segment; it does not prove the feature is truly circular. Inspect residuals and the overlay.
Related Topics
Functions And API
Open a function for exact MATLAB syntax, arguments, outputs, behavior, and source.
| Function | Purpose |
|---|---|
curvature.analysisRun.computeCurvatureFit | Fit a circle and curvature to traced image points. |
curvature.analysisRun.computeCurveLength | Measure the polyline length of traced image points. |
Change history
- 2026-07-20 - App actions require explanatory hover helpfeat | compatible
- 2026-07-19 - App SDK explicit contract replaces the retired UI runtimerefactor | breaking
- 2026-07-17 - Explicit layout action contractrefactor | compatible
- 2026-07-16 - Image App project validation ownershiprefactor | compatible
- 2026-07-16 - Runtime-owned session defaults across App familiesrefactor | compatible
- 2026-07-16 - Curvature consolidates migration and analysis staterefactor | compatible
- 2026-07-16 - UI 7 public runtime boundaryrefactor | breaking
- 2026-07-16 - Canonical single-source app projectsrefactor | compatible
- 2026-07-15 - Runtime V2 lifecycle ownership across the app fleetrefactor | breaking
- 2026-07-13 - MATLAB-compatible image conversion APIrefactor | breaking
- 2026-07-06 - UI 5 facade redesign, app migration, and plot refreshrefactor | breaking
- 2026-07-03 - CSC export and viewport policyfeat | compatible
- 2026-07-03 - UI groups migrationrefactor | compatible
- 2026-07-03 - Declarative app runtimerefactor | compatible
- 2026-07-01 - Debug sample packsfeat | compatible
- 2026-06-30 - Shared image facadefeat | compatible
- 2026-06-30 - App alerts through UI facadefeat | compatible
- 2026-06-30 - Close guards and caught-exception diagnosticsfeat | compatible
- 2026-06-29 - Tool-panel hosts and image app fixesfix | compatible
- 2026-06-24 - File-panel migrationrefactor | breaking
- 2026-06-23 - Facade contract baseline and release validation hardeningci | compatible
- 2026-06-23 - Version metadata baselinefeat | compatible