Line Tracer/Digitizer
-
I need it to automatically detect the line and plot the points so instead of the user clicking several points on the line they instead click a couple and the program autofills the other points according to the line
@ParanoidAndroid
Ok and are those lines straight or more like a spline / curve ?
if just a line then
https://www.geeksforgeeks.org/program-find-line-passing-2-points/but since you asked for help i assume its something more complicated ?
-
@ParanoidAndroid
Ok and are those lines straight or more like a spline / curve ?
if just a line then
https://www.geeksforgeeks.org/program-find-line-passing-2-points/but since you asked for help i assume its something more complicated ?
@mrjj They can be any 2D line graph splines, straight, lines curves
-
@mrjj They can be any 2D line graph splines, straight, lines curves
@ParanoidAndroid
Ok. so we need the data these
2D line graph splines, straight, lines curves are based on if we are to calculate its
function based on a few points.Can i see one images with the drawn curves you wish to calculate ?
-
Here is an example of the spline
-
You need to read math, I'm afraid. Rational B-splines, normal cubic splines or polyharmonic splines could work in your case, however I leave the wikipedia-ing to you. ;)
-
You need to read math, I'm afraid. Rational B-splines, normal cubic splines or polyharmonic splines could work in your case, however I leave the wikipedia-ing to you. ;)
@kshegunov
Is there no way to say track the colour of the spline and give pixel coordinates -
@kshegunov
Is there no way to say track the colour of the spline and give pixel coordinatesSorry, I don't understand the question. Please rephrase.
-
@kshegunov instead of using mathematics could you say click to select the colour of the line and then have the application give the coordinates of every pixel connected with that colour
-
@kshegunov instead of using mathematics could you say click to select the colour of the line and then have the application give the coordinates of every pixel connected with that colour
@ParanoidAndroid
Hi
If all images are as clean as this, you can easily scan to find the blue color and hence the Y coordinate.
https://doc.qt.io/qt-5/qimage.html#pixel-1
or the faster way
https://doc.qt.io/qt-5/qimage.html#scanLineBut it wont be fast as such but unless
tiny mini board it should be fine:) -
@ParanoidAndroid
Hi
If all images are as clean as this, you can easily scan to find the blue color and hence the Y coordinate.
https://doc.qt.io/qt-5/qimage.html#pixel-1
or the faster way
https://doc.qt.io/qt-5/qimage.html#scanLineBut it wont be fast as such but unless
tiny mini board it should be fine:)@mrjj thankyou for your help. Will this give an x coordinate aswell
-
@mrjj thankyou for your help. Will this give an x coordinate aswell
@ParanoidAndroid said in Line Tracer/Digitizer:
Will this give an x coordinate aswell
Just iterate over all x coordinates and search for y like @mrjj suggested. Or iterate over y and get x...