LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D imaging

Dear friends,

 

 

I am doing an application that involves optical setup along with a XY scan using stepper motors and also a sensor ( Photo sensor ) to collect in values.

 

My application has to do with imaging surfaces. XY scan is used to move the surface in x pixels and y pixels, a photo sensor is used to collect the values that are reflected off from the surface. I have successfully completed my XY scan program thanks to members who helped me with that.

 

My question:

 

              I need a start as to how to start collecting the values that are read in by Photo sensor and store it into a 2D array.

 

I am a beginner and please help me start with this. 

 

Thanks.

abhi

[ labview 6.1 ]

 

 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 1 of 10
(3,078 Views)

How you collected the data from sensor? Have read the data directly into labVIEW(if so, it should give some kind of voltage graph or data) with DAQ?

 

Or

Have saved the data into some files outside the labVIEW?

 

If you want read any files that contains data, I would suggest you to look on File I/O pallet in Programming main pallet.

 

 

0 Kudos
Message 2 of 10
(3,075 Views)

No the data are read into a DAQ and I need to display what it is reading ( eg. waveform ) also store the value into a 2D array so that I can convert it into an image file later .

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 3 of 10
(3,073 Views)

abhi,

 

If I interpret correctly what you said, your DAQ device output is a waveform.  A waveform is a 1D array of data (Y) bundled with a start time (t0) and a time increment (dt).  When you get this waveform from your DAQ device, does it represent the entire image or only one line?

 

If it is the entire image, then use Get Array Components to get the Y array and use Reshape Array to change it to the desired 2D format.

 

If it is one line of the array, then as above extract the Y array.  Use Replace Array Subset to put the data into the appropriate row of a 2D array.  Before you start the acquisition, initialize a 2D array of the correct size.  The acquistion and Replace Array subset will be inside a loop and the array will be passed from one iteration to the next via a shift register.

 

Lynn

0 Kudos
Message 4 of 10
(3,065 Views)

Hi Jhonsold,

 

              When I meant a waveform it means jus one point. Not a full image. Its like the laser is staring at one point and what ever is reflected is shown as a wave over a time axis. (eg a sine wave that doesnt change shape cos it is from a single point ).

 

However, When moved to the next point it will read in another value and this again will show another wave depending on the surface change of the target.

 

I hope you got the point.

 

So in total , the scanning system moves the target in a fixed X and Y pixels. what ever is the values that are obtained by staring at all X*Y points should be stored in a 2D array so that it can be later transformed into a image plot.

 

 

If you still have any questions,please let me know. I will try explaining better with a diagram maybe.

 

Thanks

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 5 of 10
(3,061 Views)

abhi,

 

If you get a waveform at each x,y location, do you want to display all the waveforms or are you reducing that waveform to a single number at each point?

 

Lynn

0 Kudos
Message 6 of 10
(3,057 Views)
As a number.
Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 7 of 10
(3,053 Views)

abhi,

 

OK.  Then the procedure is much like the one line method I posted above, except that you replace each point in the 2D array as you acquire it.  One point rather than one line. The X and Y pixel locations correspond to the row and column indexes of the array.  Depending on the orientation of your X-Y scan, you may need to transpose or reverse one or both axes.  Also note that arrays in LV start the indexing at zero.

 

Try it.  If you have questions about how something works, post what you have tried along with your question or indication of what is not working as you expect.

 

Lynn

0 Kudos
Message 8 of 10
(3,050 Views)

OK . I think I get it.

 

1. I need to accept in the values for each XY point and store it in a array indexed by this X and Y positions.

2. later export them to be viewed as an Image file.

 

Am I getting it right ?

 

Thanks Lynn ... Smiley Happy

 

 

Abhilash S Nair

Research Assistant @ Photonic Devices and Systems lab

[ LabView professional Development System - Version 11.0 - 32-bit ]

LabView Gear:
1. NI PXI-7951R & NI 5761
2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021

OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
MEMORY - [ 16.0 GB RAM ]
GPU - [ NVIDIA GeForce GT 530 ]
0 Kudos
Message 9 of 10
(3,046 Views)

Yes. 

 

I am not sure what is available in LV6.1, but newer versions have several array to image functions.

 

Lynn

0 Kudos
Message 10 of 10
(3,043 Views)