LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting 2d data to 2d "skeleton" function

So I have a tough (for me) problem that I'm not sure how to begin tackling...

I have a 2d Array of very precise... but very discrete data. It has no constant shape other than its random in nature.

I now have a 2nd 2d array of very continuous, but noisy imprecise data. Both data sets are of the same sample. The goal would be to take the 2d array of continuous data and fit it to the 2d precise but discrete "skeleton" array...

To complicate it further... the continuous data 2d array is in 3 chunks that overlap that don't necessarily line up the same way every time. (but I can figure this out as long as I have the other pieces)

 

Any tips and tricks of where to start tackling this would be great. have a great day all

0 Kudos
Message 1 of 6
(2,531 Views)

The subVI is missing.

0 Kudos
Message 2 of 6
(2,450 Views)

It wasn't letting me post without an attachment for some reason so I chose a random VI, please ignore the attachment, I do not know how to remove it....

 

I'm kinda just looking for where to start tackling this...

 

My idea so far is to take a difference between the two data sets... and model that difference as my "fit" function... just unsure of how to do that...

0 Kudos
Message 3 of 6
(2,440 Views)

What do you mean by fitting? It implies that you can somehow model or parametrize (i.e. calculate) the continuous shape and then adjust the parameters for best fit to the measured discrete dataset. You don't fit "the data", you fit some calculation to the data.

 

What you're saying is that you have 2 different measurements of the same thing, one discrete and one continuous (which is apparently less precise), but what do you want to achieve? An example would help... If you want to somehow alter the continuous measurement so it fits to the discrete data points, you still need some kind of parametrized model, i.e. calculate the 2D shape as a function of some parameters, or know how the continuous measurement relates to the discrete one. If it's a simple geometric relationship (e.g. linear/nonlinear scaling, rotation, warping etc.), you can use the corresponding parameters to manipulate the continuous data for best fit with the discrete data and noise can be reduced by low-pass filtering (or applying a smoothing kernel in case of equidistantly sampled 2D data). However, if you don't know how to parametrize the relationship between the two measurements (or the nature of the error of the continuous measurement), you're out of luck without a proper theoretical model and all you can do is interpolation between the discrete measured data points (in your case probably "interpolate 2D scattered").

 

Nice username btw...

0 Kudos
Message 4 of 6
(2,424 Views)

Ideally, I would love to parametrize the continuous data and be able to adjust it to the discrete dataset.... but I'm not sure if it is doable.

 

The best way for me to describe this is imagine you have a skeleton which represents the very precise yet discrete 2d array.... Now you have some flaps of skin that have the general shape of the bones they need to cover.... but not exactly... So you need to fit the skin to the skeleton so that you can get a good, precise shape of the body... but with no gaps in the data.

 

And thank you, its been my alias for a decade or so.. lol

 

 

0 Kudos
Message 5 of 6
(2,410 Views)

Well, if you don't know the actual shape (or even the expected shape) of the bones, you can't do any fitting because you wouldn't know if the fitted values (between the measured points) are correct or not. How can you get any better result than with an interpolation/spline method? Maybe you can get some information about the "model" from your continuous measurement (so you can do better than simple interpolation) but that's very specific and without an actual example it's hard do advise anything other than "try to parametrize it somehow"...

0 Kudos
Message 6 of 6
(2,392 Views)