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

07-30-2014 02:26 PM

Options

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

Sorry, I don't have IMAQ. Could you replace your image with a diagram constant of a 2D array?

Also, since your data is arranged in a grid, all you need is reshape to a 1D array (the picture array and the function output inside the model), you don't need this advanced coding that also works for scattered xyz data.

07-30-2014 02:35 PM

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

@altenbach wrote:

Also, since your data is arranged in a grid, all you need is reshape to a 1D array (the picture array and the function output inside the model), you don't need this advanced coding that also works for scattered xyz data.

Here is an old example for this. (read the entire thread to fit for an elliptic peak of arbitrary rotation, see image below)

07-30-2014 04:12 PM

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

07-30-2014 05:05 PM

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

As I said, you should use code that is optmized for gridded data. There is no reason to do the xyz dance.

Here's a quick rewrite of my older code.

(simply read your PNG file, wat a few seconds, and it will fit it just fine. For faster fitting, you should take a reasonably sized subset around the peak)

07-30-2014 05:09 PM - edited 07-30-2014 10:45 PM

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

And here's how it would look taking a reasonable subset. Much faster! (same model VI as above)

Download All

Virus scan in progress. Please wait to download attachments.

07-30-2014 06:11 PM

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

Dear altenbach

Many thanks for your quick reply and help. I thought of using the subset too.

I will need a newer version to read your code. ( my one is 2012 ).

very appreciated your time.

xg

07-30-2014 06:56 PM - edited 09-16-2014 04:47 PM

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

Here's the LabVIEW 2012 version.

(EDIT: rezipped and uploaded new version)

07-31-2014 03:50 AM

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

Many thanks altenbach. I tested it. it is great.

the resaon I wanted to try this is that some of our spot (which is the light reflect from a ball) are disrupted by dust on the surface of the ball ( the part of edge of the spot be eaten away ) which affacts the centroiding calculation.

again, thanks for your help.

xg

09-15-2014 04:42 PM

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

09-15-2014 06:57 PM

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

This thread contains 6 zip files. can you tell which one is giving you problems?