This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Description
Hi,
I think that NumberOfVertices in DiscreteCurveEvolution class on Accord.Math.Geometry can be more than 3, but thrown exception:
private int vertices = 20;
/// <summary>
/// Gets or sets the number of vertices.
/// </summary>
///
public int NumberOfVertices
{
get { return vertices; }
set
{
if (value <= 0 || value > 3)
throw new ArgumentOutOfRangeException("value",
"Number of vertices should be between 0 and 3.");
vertices = value;
}
}
Seems this is enough:
public List<IntPoint> OptimizeShape(List<IntPoint> shape)
{
if (vertices > shape.Count)
throw new ArgumentException("Number of points left must be higher than number of the shape.");
.
.
.
In actually I can't set NumberOfVertices to more than 3 points, caused the exception! In addition, vertices set to 20 in initialization class. Exist repugnance!