2
votes

I've developed a little program that let me load an image then make some angle measurements onto it. Here is a screenshot (there is no image loaded in this screenshot).

Screenshot of the program

When all the measurements are done I have a list of x, y and angle values. What I'd like to do is interpolate them to generate some kind of graph. I would prefer to directly implement this functionality and not rely on any other library (as long as it's possible and not to complicated).

So basically I see two steps, first interpolating the data, second, generating a graph from it.

At first I was going to implement some bicubic interpolation but this kind of interpolation needs a regular grid, which I can't ensure.

For the moment I think I have to main options:

  1. Convert my data to a regular grid and then do a bicubic interpolation.
  2. Find an other kind of interpolation that doesn't require a regular grid.

What way do you think I should go and do you have any idea of which grid-redefining/interpolation I should use? I don't have any opinion on both methods but I think this is going to take me a lot of time and I wouldn't like to realize in the end that I am in a dead-end.

If this is of any relevance I'm working with Qt and on windows.

Edit: Basically I want something like that in the end:

Final picture

1
Can you explain what you mean by "generate some kind of graph"? Like, a pie chart, or...? - Kevin
@Kevin My objective is to generate something like that Image and then overlay it to the current picture with a transparency setting. - Leo
What type of graph are you trying to create? Can you explain the axes, units, and other types of graph details that you want? - Chris O
@ChrisO I edited the post to give you an example. - Leo
I really hope those are surgical gloves in the example image... - user849425

1 Answers

1
votes

What you are looking for is a 2D Least squares fitting function, and generating a heat map or a 3D surface.

QWT is nice library that can help with graphing it, but it is doable without it.

Google Least Squares 2D Calculation