Hi all, Following a little discussion that myself and nomis were having on irc, we got talking about the default option values for sel2path, which we agreed provided far too many control points. I told him that I'd played around with it, and gotten values which produced results I considered better. He suggested I put them in a mail to the developers list, and suggest them as new defaults. So here goes... could people comment on whether they think these are pretty crap, or whether people reckon these might be better as defaults? Cheers. By the way, for those that don't know, to bring up the menu, Shift-Click on the selection-to-path button in the paths dialog while there's a selection active. I've attached a patch which changes the defaults. Are there any objections to me committing this for 1.2 and 1.3? Cheers, Dave. Propsed defaults are: Align threshold: 1.0 Corner always threshold: 60.0 Corner surround: 4 Corner threshold: 100.0 Error threshold: 1.0 Filter alternative surround: 1 Filter epsilon: 10.0 Filter iteration count: 10 Filter percent: 0.33 Filter secondary surround: 5 Filter surround: 3 Unckeck "Keep knees" Line reversion threshold: 0.10 Line threshold: 0.5 Reparametrize improvement: 0.02 Reparametrize threshold: 1.00 Subdivide search: 0.25 Subdivide surround: 6 Subdivide threshold: 0.5 Tangent surround: 4 -- David Neary, Marseille, France E-Mail: bolsh@xxxxxxxx
Index: plug-ins/sel2path/fit.c =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/sel2path/fit.c,v retrieving revision 1.6 diff -u -r1.6 fit.c --- plug-ins/sel2path/fit.c 22 May 2000 17:10:23 -0000 1.6 +++ plug-ins/sel2path/fit.c 22 Oct 2002 14:17:47 -0000 @@ -34,7 +34,7 @@ /* If two endpoints are closer than this, they are made to be equal. (-align-threshold) */ -real align_threshold = 0.5; +real align_threshold = 1.0; /* If the angle defined by a point and its predecessors and successors is smaller than this, it's a corner, even if it's within @@ -55,7 +55,7 @@ pixel is further away than this from the fitted curve, we try again. (-error-threshold) */ /* real error_threshold = .8; ALT */ -real error_threshold = .4; +real error_threshold = 1.0; /* A second number of adjacent points to consider when filtering. (-filter-alternative-surround) */ @@ -71,7 +71,7 @@ results. But if any points that ``should'' be corners aren't found, the curve goes to hell around that point. (-filter-iterations) */ /* unsigned filter_iteration_count = 4; ALT */ -unsigned filter_iteration_count = 4; +unsigned filter_iteration_count = 10; /* To produce the new point, use the old point plus this times the neighbors. (-filter-percent) */ @@ -79,11 +79,11 @@ /* Number of adjacent points to consider if `filter_surround' points defines a straight line. (-filter-secondary-surround) */ -unsigned filter_secondary_surround = 3; +unsigned filter_secondary_surround = 5; /* Number of adjacent points to consider when filtering. (-filter-surround) */ -unsigned filter_surround = 2; +unsigned filter_surround = 3; /* Says whether or not to remove ``knee'' points after finding the outline. (See the comments at `remove_knee_points'.) (-remove-knees). */ @@ -93,7 +93,7 @@ straight line, even if it would otherwise be changed back to a curve. This is weighted by the square of the curve length, to make shorter curves more likely to be reverted. (-line-reversion-threshold) */ -real line_reversion_threshold = .01; +real line_reversion_threshold = .1; /* How many pixels (on the average) a spline can diverge from the line determined by its endpoints before it is changed to a straight line. @@ -104,7 +104,7 @@ /* If reparameterization doesn't improve the fit by this much percent, stop doing it. (-reparameterize-improve) */ /* real reparameterize_improvement = .10; ALT */ -real reparameterize_improvement = .01; +real reparameterize_improvement = .10; /* Amount of error at which it is pointless to reparameterize. This happens, for example, when we are trying to fit the outline of the @@ -117,19 +117,19 @@ /* Percentage of the curve away from the worst point to look for a better place to subdivide. (-subdivide-search) */ -real subdivide_search = .1; +real subdivide_search = .25; /* Number of points to consider when deciding whether a given point is a better place to subdivide. (-subdivide-surround) */ -unsigned subdivide_surround = 4; +unsigned subdivide_surround = 6; /* How many pixels a point can diverge from a straight line and still be considered a better place to subdivide. (-subdivide-threshold) */ -real subdivide_threshold = .03; +real subdivide_threshold = .5; /* Number of points to look at on either side of a point when computing the approximation to the tangent at that point. (-tangent-surround) */ -unsigned tangent_surround = 3; +unsigned tangent_surround = 4; /* We need to manipulate lists of array indices. */