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.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I synchronize line camera with galvanometers?

Hello, everyone,
 

  I am Hoon-sup, Kim. I'd like to synchronize galvanometers with line san camera to implement optical coherence tomography system. As you can see the attached snippet of my c language code('each line trigger with galvo.pdf'), I imitated llgrab.c example code and imgSessionLineTrigSource2() function to trigger each line and to grab one image continually.

 

  One image consists of 2048(Width) x 500(Height). I used GL2048L line camera and PCIe-1429 and PCI-6229. The counter0 channel is generating five hundred pulses with 30kHz frequency and then the counter0 output pulses is driving GL2048L as each line trigger mode. Measurement & Automation Explorer(MAX) was set as follows.

Trig mode: 2 variable exposure

CC1: external, Number: 0

 

  For your information, refering to this manual(http://www.ni.com/white-paper/13786/en/), I already checked that HL Trigger each line from Encoder (Express).vi example code is working well.

 

  Even though the acquisition time is correct as 17msec which is calculated from 500 points divided by 30kHz,  I have two problems under the text based customized code as you can see the attached 'two issues.pdf' file.

 

 

  First, Image is continually being shifted to the right with some ratio.

  Second, backward part of the galvanometer analog output signal is sometimes being stopped abruptly with no completion.

 

  In order to synchronizing analog output Channel with Counter Channel, I used "ao/StartTrigger" as a Counter output trigger source and I kept the order of DAQmxStartTask functions, which means that COtaskHandle first and AO0taskHandle last.

 

DAQmxCfgDigEdgeStartTrig(COtaskHandle,"ao/StartTrigger", DAQmx_Val_Rising);

...

 

DAQmxErrChk (DAQmxStartTask(COtaskHandle));

DAQmxErrChk (DAQmxStartTask(AO0taskHandle));

...

 

  Are there any faults when I used a few of DAQmx API and IMAQ API functions in my code? Do I really need to use RTSI bus to connect framegrabber to DAQ board as 'LL Triggered Ring using RTSI from DAQ.vi' from http://www.ni.com/example/29476/en/ ? Actually I would like to resolve this synchronization issue without introducing RTSI bus. I want to know if it is possible or not.

 

Sincerely,

Hoon-sup, Kim

Download All
0 Kudos
Message 1 of 5
(5,131 Views)
hello!Sir,i met the same problem .I Want to perform FFT for every line data ,and use the data to consturt an depth image .what should i do in labview ?Thank you !
0 Kudos
Message 2 of 5
(4,825 Views)
hello! I used the accquire system for the OCT system too.But I wonder how can i use the FFT line data to construct the depth image.I expect you reply,Thank you !
0 Kudos
Message 3 of 5
(4,824 Views)

Dear Monica,

Basically, structured OCT can be produced by the following procedures.

 

1. Getting raw data(lambda domain, lateral domain)

2. rescaling it into raw data(wavenumber domain, lateral domain)

3. IFFT(or FFT) was performed along wavenumber domain. In the case of structured OCT, The results of FFT or IFFT are the same.

4. Complexed value(axial spatial domain, lateral domain) was obtained.

5. Calculating Contrastness * [10*log10(Real^2 + Imiginary^2)/NFFT/NFFT + Brightness];

Scaling factor 'NFFT' is number of data to perform FFT. The division of scaling factor is optional, refering to FFT library to be used.

To make a 8bit bitmap image, you need to adjust Contrastness and Brightness.

 

Sincerely,

Hoon-sup, Kim

0 Kudos
Message 4 of 5
(4,770 Views)
Thang you for you reply,it's very useful !
0 Kudos
Message 5 of 5
(4,742 Views)