|
| A few weeks ago, someone asked how to extract a curve. The question was
a bit vague but it got me thinking about this because I have been
working with a similar problem.
I have picked up many useful tips from this site, so here is my
contribution. It's a bit complicated, so I have included a trivial demo
to show the process.
The concept is that you start with some raster curve and need to extract
a polynomial that fits the curve. By using a vector path in PSP, it is
easy to trace over the raster curve. The node points in the path can now
be read by a PSP script (thanks Suz) and processed to give the
polynomial coefficients.
The attached files are:
curve_fit_demo.pspimage
Sample image to demonstrate the script
bw_svd.py
Python curve fitting routines must be located in the Python libraries
folder.
e.g., "C:\Program Files\Jasc Software Inc\Paint Shop Pro 9\Python Libraries"
bw_curve_fit.PspScript
Script that you uses the curve fitting routines. The vector must be selected
Bruce
|
|