LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Line Profile Max and Mins

Hi,
I am trying to store the max and mins from a line profile that I generated from a picture into a spread sheet and also calculate the average max and min.  It seems like it should be a simple thing to do, but I can't seem to find an easy way to do it. 
I just thought I would try to see if someone has done this before and can enlighten me!
Thanks
 
I am attaching a Line Profile Sample file is you want to use it to try your idea out.
 
0 Kudos
Message 1 of 5
(2,988 Views)

Ok I will try to re-attach the file.

 

0 Kudos
Message 2 of 5
(2,982 Views)
Hi BlueEyes76,

What version of LabVIEW are you trying to do this in?

In most versions of LabVIEW, if you go to Help->Find Examples and search "spreadsheet" you will see a number of VIs that read/write data from spreadsheet files.  Of particular interest may be the "Using Spreadsheet Format.vi".

As for calculating max and min, there is a VI "Array Max and Min" in the Programming->Arrays function palette that will allow you to input an array of numbers and output the max and min.

Please let me know if I can be of further assistance.


Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 3 of 5
(2,958 Views)

Hi,

Thanks for the help.  I am using Labview 8.2 but I think what I want to do is a little more complicated.  I want to find all the max's and all the min's then average them, not just the one max and min of the array.  I had one suggestion from a co-worker that is a less sofisticated way to do this and that is to read in the array, sort it, then if I know how many peaks and valleys there are in the line profile, I can just use the top and bottom of the sorted array to grab the max's and min's.  Then get the average of that.  I can do this, but was looking for a more elegant soltution that didn't require you to know the number of max's or min's in the array, but would just pick them all out and then allow you to calculate an average from that point on.

Any help you could give would be greatly apprecited.

Thanks,

BlueEyes76

0 Kudos
Message 4 of 5
(2,941 Views)

Hi BlueEyes76,

i think a solution could be to create a histogram over all your data. If you do it you have maybe to spheres. One with the big values and one with the small ones. Then you have to fix your ranges for min and max and then you can go through the array and search for the values over the defined max, and under the defined min. From this you can create your average.

Hope it helps.

Mike



Message Edited by MikeS81 on 02-18-2008 02:41 PM
0 Kudos
Message 5 of 5
(2,934 Views)