From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

approximation multiple functions

Hello,

Thats my problem:

 

I have set of points and when I do normal approximation I ll get something like his:

ScreenShot084.jpg

 

But I want find functions that will describe this points in better way:

ScreenShot085.jpg

 

But sometimes I get hard sets of points like this:

ScreenShot086.jpg

 

Do You have any idea how this problem may be solved??

0 Kudos
Message 1 of 8
(2,880 Views)

When you say "approximation" do you mean fitting the data to a function? 

 

Before you can fit any function to a set of points you need to define the points which will be in the set.  In the regions in your lower images where the fitted lines overlap or cross each other, how do you determine which points are fitted to which curve? Can the same point be used for more than one curve?

 

Until you can define the point sets, either manually or algorithmically, you will not be able to do any fitting.

 

Lynn

0 Kudos
Message 2 of 8
(2,853 Views)

I don't know how from this data create a set of points that will make the best approximation and this has to be done algorithmically.

How to create set of points that will generate reaults that i want??

One point can be used more than once.

0 Kudos
Message 3 of 8
(2,847 Views)

There is no universal mathematical process which can separate arbitrary data sets into "nice" subsets.

 

What do you know about the underlying science behind the mechanism which generates the points? Are they representing some kind of cell or gain boundaries? Multiple trajectories? Density variations 10^-38 s after the big bang? You will need to apply knowledge of the process or system to begin to select a method for grouping the points.

 

Lynn

0 Kudos
Message 4 of 8
(2,837 Views)

I ve wrote algoritm that detects cracks i some structures, so i get output image like this:

steps12_mean4_y0,200000.jpg

 

The I separate cracks into objects like this one:

 

steps12_mean4_y0,200000.jpg

This cracks are random, only sure information is that their length is greater than thickness

Then by drawning circles inside  thickness measurement is done

I wanted to use centers of this circles as set of points that i gave in 1st post.

Maybe I can use this binary image to make approximation??

Aim of that is to find angles in crack, I ve arleady done that in diffrent ways but this approach seems to be the most promising and universal...

 

0 Kudos
Message 5 of 8
(2,833 Views)

In the area circled on the copy of your image below do you interpret this as two cracks intersecting or two long cracks with some short fragments which should also be analyzed? 

 

original.tagged.jpeg

 

The next crack below the circle has a slight bend near the center.  Is that two cracks with an angle to be measured or will it be treated as one crack?

 

I might try to do linear fits on the crack data.  When you identify straight line segments which represent the cracks, you should be able to calculate the angles from analytic geometry.

 

Lynn

0 Kudos
Message 6 of 8
(2,815 Views)

Pixels are grouped by blob analysis, that place You marked are separate objects.

I am thinking on other way to Group this cracks but no idea so far

I ve thinked about analytic geometry but again i face problem of gruping points because in most cases i wont get straingt line ;/

0 Kudos
Message 7 of 8
(2,802 Views)

If the material is crystaline, then the cracks will be straight, microscopically, because they follow the crystal structure.  Of course you will get some curvature due to offsets along the structure planes.  That does not seem to be a major factor in your image.

 

Why not start by doing the easy parts first.  Fit straight lines to the longest segments.  Where they intesect, calculate angles. In areas like the one I circled the separate objects may be identified by points being farther from the fitted line than the points at the left edge of the circle.  For example suppose that on the "clean" part of the crack 90% (arbitrary) of the pixels are within 5 pixels of the line. Then any area which has more than 10% of the pixels 6 or more pixels away from the line has multiple cracks.  Some of the cases will have multiple objects which you will probably not be able to resolve completely.  They may not meet the length greater than thickness criterion. Or there may be so many small cracks that you effectively have pulverized material rather than intact crystals with cracks as boundaries.

 

Lynn

0 Kudos
Message 8 of 8
(2,778 Views)