Measure object curvature
Fits a 2D spline to the backbone of objects.
Description
Fits a 2D spline to the backbone of objects. Each object in the input collection will be reduced to a single (longest skeleton path) backbone, which will be fit with the spline. Local curvature of the spline can be calculated and any measurements will be assigned to the relevant object (irrespective of whether spline objects are exported). Curvature values can be calculated as "absolute" (always greater than 0, irrespective of the direction of curvature), or "signed" (sign dependent on direction of curvature, but requires the "start" end of the backbone to be specified).
Note: Spline fitting will be performed in 2D, so any 3D objects will be projected into a single plane first.
Parameters
Parameter | Description |
---|---|
Input objects | Objects to which splines will be fit. A single spline will be fit to each object in this collection. Any calculated measurements will be assigned to the relevant object (irrespective of whether spline objects are exported). Note: Spline fitting will be performed in 2D, so any 3D objects will be projected into a single plane first. |
Object output mode | Controls whether spline objects are exported:
|
Output objects | The name assigned to the objects if they are being exported. |
Export every N points | If spline objects are being exported (either as full contours or as individual control points), this value controls the interval between points. As such, increasing values will export fewer and fewer points. |
Spline fitting method | Controls how the spline is fit to the input object:
|
Number of neighbours (smoothing) | Number of neighbouring points used in the calculation of each spline control point. The greater the number of neighbours, the smoother the output spline. |
Iterations | "This many robustness iterations are done. A sensible value is usually 0 (just the initial fit without any robustness iterations) to 4". Description taken from LoessInterpolator documentation |
Accuracy | "If the median residual at a certain robustness iteration is less than this amount, no more iterations are done". Description taken from LoessInterpolator documentation |
Relate to reference point | When selected, the fit spline will be oriented such that the first point is closer to the reference point (specified by measurements "X-axis reference measurement" and "Y-axis reference measurement") than the final point in the spline. Having this consistency to the spline orientation allows measurements relative to the first point to be calculated (e.g. relative location of maximum curvature along the spline). When this is not selected, there's no guarantee of which end of the spline will be "first". |
X-axis reference measurement | If "Relate to reference point" is selected, this is the measurement associated with the input object that will provide the x-axis reference for determining the orientation of the spline. |
Y-axis reference measurement | If "Relate to reference point" is selected, this is the measurement associated with the input object that will provide the y-axis reference for determining the orientation of the spline. |
Measure absolute curvature | When selected (and when "Relate to reference point" is also selected), absolute curvature values will be calculated. Absolute curvatures are always greater than or equal to 0, irrespective of direction. Increasing signed curvature values indicate increasing curvatures. |
Measure signed curvature | When selected (and when "Relate to reference point" is also selected), signed curvature values will be calculated. Signed curvatures are increasingly positive as the spline bends left and increasingly negative as the spline bends right (directions relative to path along spline, starting at first point). |
Calculate angle between ends | When selected, the angle between the two ends of the spline are calculated in degree units. |
Fitting range (px) | If the angle between spline ends is being calculated, this is the number of points at each end of the spline that are fit to get the orientation at that end. |
Draw spline | When selected, the fit spline(s) will be rendered as an overlay on the image specified by "Input image". |
Input image | If drawing the spline(s), this is the image onto which they will be added as overlays. |
Apply to image | If drawing the spline(s), when this is selected, the spline overlays will be added to the image specified by "Input image". If not selected, the image containing the overlays will be stored separately in the workspace with the name specified by "Output image". |
Output image | If drawing the spline(s) and "Apply to image" is not selected, this is the name with which the overlay images will be stored in the workspace. |
Line width | If drawing the spline(s), this is the width of the spline overlay lines that will be drawn. |
Maximum curvature (for colour) | If drawing the spline(s), the local colour of each spline will represent the local absolute curvature. This value controls the maximum absolute curvature that will correspond to the top-end of the curvature colourmap. Values above this will see the colourmap cycling. |