{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / measure / fit / LineModelND / from_estimate

classmethod

skimage.measure.fit:LineModelND.from_estimate

source: /dev/scikit-image/src/skimage/measure/fit.py :245

Summary

Estimate line model from data.

Extended Summary

This minimizes the sum of shortest (orthogonal) distances from the given data points to the estimated line.

Parameters

data : (N, dim) array

N points in a space of dimensionality dim >= 2.

Returns

model : Self or `~.FailedEstimation`

An instance of the line model if the estimation succeeded. Otherwise, we return a special FailedEstimation object to signal a failed estimation. Testing the truth value of the failed estimation object will return False. E.g.

model = LineModelND.from_estimate(...)
if not model:
    raise RuntimeError(f"Failed estimation: {model}")

Aliases

  • skimage.measure.LineModelND.from_estimate