public class ShapeFittingOps
extends java.lang.Object
CannyEdge,
BinaryImageOps.contour(boofcv.struct.image.ImageUInt8, boofcv.struct.ConnectRule, boofcv.struct.image.ImageSInt32)| Constructor and Description |
|---|
ShapeFittingOps() |
| Modifier and Type | Method and Description |
|---|---|
static FitData<georegression.struct.trig.Circle2D_F64> |
averageCircle_F64(java.util.List<georegression.struct.point.Point2D_F64> points,
org.ddogleg.struct.GrowQueue_F64 optional,
FitData<georegression.struct.trig.Circle2D_F64> outputStorage)
Computes a circle which has it's center at the mean position of the provided points and radius is equal to the
average distance of each point from the center.
|
static FitData<georegression.struct.trig.Circle2D_F64> |
averageCircle_I32(java.util.List<georegression.struct.point.Point2D_I32> points,
org.ddogleg.struct.GrowQueue_F64 optional,
FitData<georegression.struct.trig.Circle2D_F64> outputStorage)
Computes a circle which has it's center at the mean position of the provided points and radius is equal to the
average distance of each point from the center.
|
static FitData<georegression.struct.shapes.EllipseRotated_F64> |
fitEllipse_F64(java.util.List<georegression.struct.point.Point2D_F64> points,
int iterations,
boolean computeError,
FitData<georegression.struct.shapes.EllipseRotated_F64> outputStorage)
Computes the best fit ellipse based on minimizing Euclidean distance.
|
static FitData<georegression.struct.shapes.EllipseRotated_F64> |
fitEllipse_I32(java.util.List<georegression.struct.point.Point2D_I32> points,
int iterations,
boolean computeError,
FitData<georegression.struct.shapes.EllipseRotated_F64> outputStorage)
Convenience function.
|
static java.util.List<boofcv.struct.PointIndex_I32> |
fitPolygon(java.util.List<georegression.struct.point.Point2D_I32> sequence,
boolean loop,
double toleranceDist,
double toleranceAngle,
int iterations)
Fits a polygon to the provided sequence of connected points.
|
static void |
indexToPointIndex(java.util.List<georegression.struct.point.Point2D_I32> sequence,
org.ddogleg.struct.GrowQueue_I32 indexes,
org.ddogleg.struct.FastQueue<boofcv.struct.PointIndex_I32> output)
Converts the list of indexes in a sequence into a list of
PointIndex_I32. |
public static java.util.List<boofcv.struct.PointIndex_I32> fitPolygon(java.util.List<georegression.struct.point.Point2D_I32> sequence,
boolean loop,
double toleranceDist,
double toleranceAngle,
int iterations)
sequence - Ordered and connected list of points.loop - If true the sequence is a connected at both ends, otherwise it is assumed to not be.toleranceDist - Maximum distance away each point in the sequence can be from a line, in pixels. Try 2.toleranceAngle - Tolerance for fitting angles, in radians. Try 0.1iterations - Maximum number of iterations done to improve the fit. Can be 0. Try 50.SplitMergeLineFitLoop,
SplitMergeLineFitSegmentpublic static FitData<georegression.struct.shapes.EllipseRotated_F64> fitEllipse_F64(java.util.List<georegression.struct.point.Point2D_F64> points, int iterations, boolean computeError, FitData<georegression.struct.shapes.EllipseRotated_F64> outputStorage)
points - (Input) Set of unordered points. Not modified.iterations - Number of iterations used to refine the fit. If set to zero then an algebraic solution
is returned.computeError - If true it will compute the average Euclidean distance erroroutputStorage - (Output/Optional) Storage for the ellipse. Can be null.public static FitData<georegression.struct.shapes.EllipseRotated_F64> fitEllipse_I32(java.util.List<georegression.struct.point.Point2D_I32> points, int iterations, boolean computeError, FitData<georegression.struct.shapes.EllipseRotated_F64> outputStorage)
fitEllipse_F64(java.util.List, int, boolean,FitData), but converts the set of integer points
into floating point points.points - (Input) Set of unordered points. Not modified.iterations - Number of iterations used to refine the fit. If set to zero then an algebraic solution
is returned.computeError - If true it will compute the average Euclidean distance erroroutputStorage - (Output/Optional) Storage for the ellipse. Can be nullpublic static FitData<georegression.struct.trig.Circle2D_F64> averageCircle_I32(java.util.List<georegression.struct.point.Point2D_I32> points, org.ddogleg.struct.GrowQueue_F64 optional, FitData<georegression.struct.trig.Circle2D_F64> outputStorage)
points - (Input) Set of unordered points. Not modified.optional - (Optional) Used internally to store the distance of each point from the center. Can be null.outputStorage - (Output/Optional) Storage for results. If null then a new circle instance will be returned.public static FitData<georegression.struct.trig.Circle2D_F64> averageCircle_F64(java.util.List<georegression.struct.point.Point2D_F64> points, org.ddogleg.struct.GrowQueue_F64 optional, FitData<georegression.struct.trig.Circle2D_F64> outputStorage)
points - (Input) Set of unordered points. Not modified.optional - (Optional) Used internally to store the distance of each point from the center. Can be null.outputStorage - (Output/Optional) Storage for results. If null then a new circle instance will be returned.public static void indexToPointIndex(java.util.List<georegression.struct.point.Point2D_I32> sequence,
org.ddogleg.struct.GrowQueue_I32 indexes,
org.ddogleg.struct.FastQueue<boofcv.struct.PointIndex_I32> output)
PointIndex_I32.sequence - Sequence of points.indexes - List of indexes in the sequence.output - Output list of PointIndex_I32.