09-27-2016 10:01 AM
Hello!
Using line profile, i've obtained a curve representing the trend of pixel on an image, now i want to apply to this curve a polynomial to get a more linear trend eliminating the disturbs; but before doing this i have to select(interpolate?) some points of this curve(this points will be the input of my polynomial). How can i do this?
Solved! Go to Solution.
09-27-2016 10:44 AM
In the mathematics palette, there are multiple polynomial functions for finding roots, evaluating polynomials, polynomial curve fitting, etc.
09-27-2016 10:56 AM
Since this is in 2D a plain polynomial will not work since the coordinates can overlap (e.g. the curve could zig-zag up giving multiple y for a given x and multiple x for a given y.
If you have x and y as a function of time, you can create two polynomials x(t) and y(t) and create a parametric graph of the interpolated curve. The polynomial itself will do the interpolation. I don't understand why you think you need to pich extra points.
09-27-2016 11:09 AM
So to enter the data obtained with the line profile in the polynomial how should i do?
09-27-2016 11:16 AM
What datatype is the "line profile"? Can you attach some typical data?
09-27-2016 11:48 AM
I have to connect the line profile with the polinomial. The "untitled 4.vi" is a draft and i don't know how to connect the two parts.
09-27-2016 12:02 PM
Your attached code does not contain any data.
09-27-2016 12:10 PM
The data are the points that i have to extrapolate from the curve given by the line profile and that are the inputs of the polynomial. That was my first question
09-27-2016 12:35 PM - edited 09-27-2016 01:02 PM
Again, your VI as posted contains no data.
You can use "polynomial fit" to get the coefficients then use "polynomial evaluation" to calculate the function for an arbitrary x ramp.