Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

12-06-2012 02:18 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

OK, the Gaussians in the x and y direction are the same, but both are asymmetric, with a different width on each side. (in the more general case, you would need four widths)

Here's my 5 minute modification (fitsurface4.zip). See if it works for you. I am not sure if it is exactly what you want. (there are probably bugs)

Since there is significantly more asymmetry now, there are probably local minima in the rotation, so you might have to add some more intelligence to get a good angle guess.

(To simulate other data scenarios, make the "guess" array into a control and vary any parameter at will, then look at the middle graph, e.g. fitsurface3.zip)

05-21-2013 02:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

this same problem is mine ihave an image of bead and i have to its center ,but cant able to do this i have labview 11

It is not important to know all the answers, what is important is how to find them

05-21-2013 02:22 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@abhishek_singh wrote:

this same problem is mine ihave an image of bead and i have to its center ,but cant able to do this i have labview 11

This is not sufficeint information to help you.

What have you tried and what kind of errors did you encounter?

Attach your code and your data so we can see what's wrong.

04-21-2014 09:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Dear Altenbach,

First of all like the others here I want to thank you for your tricks which allowed me to build an efficient 2D fitting algorithm for my experimental data. I would now have interest in getting confidence intervals for the different fitting parameters and I was trying to use the built-in labview VI Nonlinear curve fit intervals, but it seems that it does not respond very well to having no X input (unlike the nonlinear fitting VI). I also tried it unsuccessfully with your 2D gaussian fitting code.

Do you have suggestions as to how to treat this problem?

Thank you very much in advance,

Antoine

04-23-2014 08:57 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Please disregard the previous message, th eproblem was actually the same as pointed out in the thread http://forums.ni.com/t5/LabVIEW/Non-linear-Fit-Intervals-Gives-Error-20001/td-p/1301484.

Thank you nonetheless (you answered that hread too...)

04-17-2015 04:27 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Dear altenbach,

Dear All,

thank you for your help on 2D fitting.

I think that the version 2 (FitSurface2.zip 40 KB) should be the best approach for my problem.

I have a spot that should be gaussian (it should be better to use a Pseudo Voigt, i.e. something similar to µ*F_gauss + (1-µ)*F_Lorentz) that should be elliptical and rotate.

However, during an experiment I can obtain a saturated image...

In order to not loose all the experimental run, I would like to fit the spot making a mask (or better not fitting the saturated areas). The vi FitSurface2 transform 2D to 1D: in this way it is possible to fit (for each line) only the tails, discarding the saturated points.

But, how I can do it in Labview? (I can do with Origin, Kaleidagraph...)

awaitig some helps...

dh

04-17-2015 09:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I believe Altenbach's fit is a general 2D non-linear fit to a (more-or-less arbitrary) model. If you want to fit, but your data is saturated, make a model of "saturated data". In your case, the model would be min (Gaussian model, Saturated Value).

Bob Schor

04-17-2015 10:10 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Dear Bob,

I'm sorry but I do not understand "make a model of "saturated data" "

dh

04-17-2015 11:09 AM - edited 04-17-2015 11:10 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@Dariush_Hampai wrote:

Dear Bob,

I'm sorry but I do not understand "make a model of "saturated data" "

I am sure that a saturated 2D gaussian can be modeled mathematically, maybe with just one additional parameter that describes the saturation. So simply add one more parameter, rewrite the model subVI according and fit for it.

If you have problem with that, please attach some typical data.

Is the saturation some nonliear process or is it just an input clipping? Is the saturated value known (e.g. 255, or whatever the Z resolution of the deterctor is)

04-17-2015 11:13 AM - edited 04-17-2015 11:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Dear Altenbach,

in my attach you may find your example with my saturated image