Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

configure imaq

Hello !
 
I've tried to use the Imaq 1410 for non-standard video input. My video is a 0 - 1 Volt analog signal, and I use 2 external syncronization signals (Hsync and Vsync). Hsync and Vsync are both TTL 0 - 5 Volt, 15.62 khz (Hsync) and 50 Hz (Vsync). I tried to configure the Measurement and Automation Explorer with the following options:
 
Video Lock Mode: External H lock
Channel 0 camera: (All kinds of them which are in the list: VGA, CCIR, NTSC, PAL, RS-170, AREA SCAN, 30/50/60/25 HZ PROGRESSIVE SCAN, LINE SCAN, JAI CV-A1, JAI CV-M1.
 
When I press on the "Snap" or "Grab" Icon in MAX, I get the "Error 0xBFF6001F - Cannot detect recognizable video source".
 
When I use the option:
 
Video Lock Mode : Standard
and connect a standard NTSC camera to the IMAQ 1410, I get a good picture, it works.
 
Can anyone please tell me how to configure my IMAQ  in order to be able to see an image with Video, Hsync and Vsync signals ?
 
0 Kudos
Message 1 of 28
(6,429 Views)
From the specs you have listed, the 1410 should be able to handle your video signal (however you did not list the image size ie:640x480).
 
The 1410 uses a PLL (phase lock loop) to generate an internal pixel clock for a video signal that is non-standard (not 640x480). The PLL parameters in the camera file must be set to match the expected video input - these settings are not available through the Measurement and Automation Explorer interface as of now.
 
A custom camera file can be requesested by using the the link at the bottom of Camera Advisor (www.ni.com/camera). This provides a form to fill out and an email address to send the form to.
0 Kudos
Message 2 of 28
(6,407 Views)
Thank you for your answer !
 
 
My system is composed of LSM (laser scanning microscope) , which generates the video output in correlation with the laser scan position. The LSM controller generates the HSYNC and VSYNC signals according to the laser spot position. The image size is flexible - 256x256 or other square sizes.
 
How would you recommend to reconfigure the system and the camera setup in order to be able to acquire an image ?
(I have an absolute  control over the HSYNC, VSYNC signals. I am also able to generate through the LSM control a pixel clock with various frequencies, however this clock is not synchronized with the HSYNC signal.)
 
Up until now the only thing that I was able to get was some kind of an image output (just a bunch of dots)  (from the Measure and Automation Explorer) by setting HSYNC to 4 KHZ and VSYNC to 200 HZ, I played with the image resolution of various sizes. Even then, the GRABBING function lasted for the most for a few seconds, it always outputs the error "Error 0xBFF6001F - Cannot detect recognizable video source" after a short time. When I used other HSYNC frequencies, it did not work.
 
Can you please also explain to me what HSYNC, VSYNC, image size values are acceptable to the IMAQ 1410 PLL  that I can use ? It seems that there is some kind of a connection between all these values that I can't figure out.
 
You also mentioned a camera file that I should request. Given the information I wrote, can you please tell me what options should I check when requesting this non-standard camera file ?
 
Thanks a million times, waiting for your answer or anyone who can help.
0 Kudos
Message 3 of 28
(6,394 Views)

Here is a preliminary document (should be on our website shortly) on how to configure the 1410 for non-standard analog signals.

0 Kudos
Message 4 of 28
(6,374 Views)

Thank you for your helpful document, Marco !

I can now see an image in MAX (Measurement and Automation Explorer).

As explained in this IMAQ 1410 document, I've made a camera file, using the technique explained there for non-standard cameras. Only, in my case "area scan camera" did not work for me, so I chose "line scan" and it did, but still wrote the error from my previous question:"Error 0xBFF6001F - Cannot detect recognizable video source" after a while, as before. Next, I changed "DetectPCLK (Yes)" to "DetectPCLK (No)", and it now began working smooth.

As I've described before, my system outputs a Video signal, Hsync and Vsync, therefore I work in the "External H Lock Mode". What surprised me was the fact that weather I unplug VSYNC or connect it, it does not affect the image  (is this normal ?), as if the IMAQ does not use this.

The questions I wanted to ask are:

 

A)

When Grabbing or Snapping pictures on MAX, I have horizontal "shifted" lines reappearing on my image. They appear at different locations on it, like "sparks". They seem as if they're a shifted line from another location of the image itself.  In addition it happens that I  see a "down shifting" of the frames as can be seen on old TV's that are not set correctly to the broadcasted station.

I've tried changing the following parameters (in MAX and in the camera file):


AcquisitionWindow, MaxImageSize, AcqWinHeightRef, AcqWinWidthRef, ClampStart, ClampStop, VCODivider, DPAOffset, LinePixels, LinePixelsRef.

None of this seemed to help. I suspected that there is a connection between HSYNC frequency and the MaxImageSize or maybe other parameters, and that they need to be set in a specific relation to each other. If this is the case can anyone please explain me how to do that ? Or maybe there is a document ? If not, what can cause this "horizontal noise" ?

 

B)

In the camera file there are additional parameters which I can't find any documentations explaining their functions. This is very crucial for me, since I would not be able to activate my camera had I used only IMAQ 1410 options given by MAX.

Where could I find information about them, their values and form of use ?

 
I would very appreciate your help on these issues.
0 Kudos
Message 5 of 28
(6,336 Views)

Yes - changing DetectPCLK to No will allow your board to generate the pixel clock rather than searching for one generated from the camera. Since your camera does not output a pixel clock, this setting would have to be set to No.

 

The 1410 uses PLL (phase lock loop) when acquiring the image and locks onto the embedded Hsync and Vsync signals of the video feed – separate Hsync and Vsync signals are not required. It uses the timing info to generate the pixel clock needed to capture the image data.

 

A) Changing the parameters you mentioned:

 

AcquisitionWindow, MaxImageSize, AcqWinHeightRef, AcqWinWidthRef, ClampStart, ClampStop, VCODivider, DPAOffset, LinePixels, LinePixelsRef

 

should fix the issue you described - steps 12 through 16 of the previously attached document describe what these changes should do.

 

I would imagine, from what you described, that a "down shifting" would occur from having too small of a acquisition window height or too much of a top offset. Horizontal shifted lines might be occurring because of too small of a window width is specified or too much left offset (or too little).

 

As the attached document described, it is an iterative process to get the 1410 to generate a matching pixel clock to what your camera is using.

 

B) Creating custom Camera Files is not fully supported at this time and there is little documentation available that describes the setup and usage of the additional parameters you see in your file. If you are still unable to acquire a good pic, you can request a camera file from our R&D department through ni.com/camera (see option 4).

 

I wish I could give you a solid answer as to what setting is off, however, It is difficult to see what is going on without seeing how the changes in the cam file are affecting the image.

 

I hope this helps.

0 Kudos
Message 6 of 28
(6,315 Views)

Thanx again, I now have more control over my image.


I managed to recieve a picture from my Line Scan camera (MAX 3.1.3), but it's all blurred and unfocused. Is it possible that even though my camera outputs a good and focused picture, my IMAQ 1410 is not configured properly and it is the one who causes this ?

If so, what can I do about this, are there any parameters that by setting them right can help ?

Besides the camera file used by MAX, are there other files that are used by it and can be tweaked to change IMAQ 1410/camera properties ?

Regards,

               

0 Kudos
Message 7 of 28
(6,273 Views)

I'm glad to hear that you have a better image. It is possible that the 1410 is causing the image to be "blurry"  - to quote the previously attached document again:

16.       At this point you may need to adjust one additional parameter in the camera file to fine tune the image quality. Open the camera file in a text editor. The DPAOffset parameter controls the phase offset between the pixel clock and the HSync signal. The valid range is 0 to 63, representing 1 pclk cycle. Most video signals give the best image quality with a value close to or equal to 0. Adjust the value of DPAOffset up and down and observe the effect on the image quality. Between each adjustment, save the camera file and reload it in MAX.

 
a poor image might also be caused if the camera is sending data faster than the 1410 can aquire - the maximum pixel clock speed is 25.8 MHz when the board is generating the pixel clock internally. This would mean that if you have a 1024 pixels in your linescan, you could go ~25,000 lines/sec. (maybe a little bit slower to account for camera delay between lines).
 
But it could be just as likely that you have a lense or focus issue.
 
Hopefully these tips will help out.
0 Kudos
Message 8 of 28
(6,257 Views)
Thanx, Marco.
 
But, I think maybe my problem is the opposite. Our machine scans at a low rate of 185 Hz each line, or HSYNC, which means that if I have 1000 pixels, I'm scanning at Pixel-clock rate of 0.185 MHZ.
 
From what I've read in the IMAQ's manual, the IMAQ 1410 is able to produce an inner Pixel Clock in the range of 2MHZ - 25.8 MHZ, which means that we're far behind. Could this be our problem of not being able to get a focused sharp image ?
 
Moreover, in the document  "Configuring a Non Standard Camera for IMAQ 1410" which you've attached, was said that I should also make sure that 100MHz <= PCLK * VCODivider <= 500MHz (STEP 7), which means that the Minimum P-Clock I should reach is  6.25 MHZ (if I set VCODivider to its maximum 16)..... which sets my P-Clock range up to 6.25 MHZ - 25.8 MHZ.
 
If this is the cause for our struggle for getting a sharp picture, what can we do about it ? Can't the IMAQ 1410 produce a lower P-clock than 2 MGHZ ?  And how can I fulfill the second requirement of 100MHz <= PCLK * VCODivider <= 500MHz ?  We cannot reach such a high Pixel-Clock.
 
Thanx again, we really appreciate your help.
 
 
0 Kudos
Message 9 of 28
(6,231 Views)

I'm still confused about what is causing your image to be "blurry" - could you attach a "blurred" picture and if possible a good picture (or at least describe what you are expecting)? How was data previously obtained from the microscope? Is it at all possible to output a pixel clock from your system?

0 Kudos
Message 10 of 28
(6,212 Views)