Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

ICD files for camera

Hi everyone, I'm trying to look for a reference manual or a similar doc that can help me to understand how the *.ICD files are set for different cameras. We have a custom-made camera and want to read its output using NI-IMAQ through a NI PCI-1424 card. We tried using the NI Camera File Generator but it wasn't of much help since our camera has a very unique setup.

 

Thanks in advance.

0 Kudos
Message 1 of 13
(13,040 Views)

Take a look at the following Knowledge Base Article. It give an overview of the ICD file and gives four different ways of finding a file for your particular cammera. I assume method 1 won't work and you treid method 4, but have you looked at 2 or 3? What camera are you using?

 

 

 

....From What is a Camera File, Do I Need One, and How Can I Obtain One?

 

Option 1: Install the NI-IMAQ Driver
National Instruments includes a variety of camera files with the NI-IMAQ Driver, including the generic camera files for CCIR, NTSC, PAL, and RS170 cameras. These files install to the C:\Documents and Settings\All Users\Shared Documents\National Instruments\NI-IMAQ\Data directory (read NOTE 1 for details). You can select from these files by left clicking on your camera in MAX under your IMAQ card and selecting Open Camera...

Option 2: Search the NI Developer Zone: Industrial Camera Advisor 
If the camera file for your specific camera is not installed with the NI-IMAQ Driver, you may be able to locate it on our website. National Instrument's Industrial Camera Advisor allows you to search for camera files using the manufacturer and model number of your camera.

Option 3: Browse .../camera_files at ftp.ni.com 
If you were unable to locate your camera file on our website, it is possible that the camera file may exist under camera support on our FTP site. National Instruments periodically creates new camera files as we release new IMAQ boards. Here you will find two folders; one for analog and the other for digital cameras. Each directory contains a set of folders with .icd  files by camera manufacturer. Once you download the file, place it in the C:\Documents and Settings\All Users\Shared Documents\National Instruments\NI-IMAQ\Data directory (read NOTE 1 below for details) for it to function properly with National Instruments software.

Option 4: Generate a camera file using the NI Camera File Generator
The NI Camera File Generator is a menu-driven, configuration environment for generating new camera files to equip cameras for which National Instruments does not have files, or for adding features to existing NI camera files. The NI Camera File Generator is a free software tool and the camera files it creates are not eligible for either standard phone or e-mail technical support. You can download the NI Camera File Generator from Products and Services: NI Camera File Generator

0 Kudos
Message 2 of 13
(13,020 Views)

Thanks for your answer, Hueter!

 

I initially looked at the Knowledge Base Article and tried all (1, 2, 3, and 4), but since my camera is a custom-made one, none of the available options worked for me. :mansad:

 

My camera is made out of a 8MegaPixel CMOS image sensor and some embedded control circuitry. Because it is a unique camera, none of the pre-made ICD files will fit its description.

 

Lately, in a desperate attempt for solving this quest, I tried using the ICD files provided as part of NI's IMAQ as a reference. However, there are several variables that I haven't been able to figure out, and as a consequence, its interaction with the DAQ system is not the best. I even got me a book (Image Acquisition and Processing with Labview) for reference but it didn't help much. I as well used the Camera File Generator but it did not allow me to specify details such as description for Enable lines and or synchronization wit HSYNC or VSYNC.

 

I would appreciate if anyone in this forum could please point me to a reference for such ICD files descriptions. It would be really helpful.

0 Kudos
Message 3 of 13
(13,009 Views)

Dont know if this will help, but here are some of the timing signal relations for the 142x cards:

 

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/e8030d8c9b12a2c186256aa9004c75fa?OpenDocument 

 

You will have to click on one of the attachments near the bottom of the page to see the image.

 

-AK2DM

 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 13
(13,004 Views)

Thanks, AK2DM!

 

We have already configured our firmware (at the embedded platform) to take care of HSYNC's and VSYNC's proper generation. The real issue comes whenever we wanted to interface our camera with NI's IMAQ since the ICD file comes to be the interface.

 

So, if there is not a clear understanding of the parameter the ICD file uses, capturing a signal is a tricky game. We have managed to capture some images but their sync (lines and frames) is not the best to say the least. Robot Sad

 

I have been guessing what the labels at the ICD file mean and setting IMAQ up has turned to be a real issue. Robot surprised

0 Kudos
Message 5 of 13
(13,001 Views)

I have had minimal experience tweaking an ICD many years ago. Can you post a copy your file and maybe notate it with question marks? I am pretty busy right now but I amy have a chance to look at it and try to give you some pointers.

 

I once buit a custom laser based high resolution linescan camera and had to resort to a Matrox Meteor II framegrabber since it was very flexible in the type and range of timing and data signals it could handle.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 13
(12,976 Views)

Hi AK2DM,

 

Thanks for for help. Please, find below the file we are currently using. I have highlighted in red what to me is still an unknown or have a vague knowledge.

 

 

CameraFile (6.00) {
   Manufacturer (Custom-Made)
   Model (Camera File)
   CreationDate (20100630170424)
   InterfaceInfo (1424) {
      AcquisitionWindow (0, 0, 2048, 2048)          << What are the two first numbers?
      BinaryThreshold (0, 200)    << We tried changing these values but it didn't work at all. Some times, it even went back to (0, 200) when we opened NI's MAX.
      BitDepth (12)
      BitsPerComponent (12)
      NumComponents (1)
      NumPhantomComponents (0)
      SwapRGB (No)
      FrameTimeout (20000)  << Say, we are capturing 2048x2048 frames using a 20MHz PCLK clock. It is about 210ms for capturing it. Why do this value has to be almost 10 times 210ms to make NI's IMAQ work?
      LUT (Normal)
      LUTTransform (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
      MaxImageSize (2100, 2100)   << We set these values a little bit above our acquisition window size? Is it a correct methodology?
      ScanType (Area)
      Scaling (1)
      OnBoardClock (20.000000)  << We were assuming this notation will allows having a PCLK of 20MHz
      DetectPCLK (Yes)
      HSyncBlanking (Yes)   << Why there is not a VSyncBlanking field?
      NonContLineEnables (Yes)
      FastRearm (Yes)
      SwapColumns (No)
      SynchronizeEnables (Yes)
      DisableIORdy (No)
      ConfigDelay (0)
      Enables {            << If one wants to have more than two enable lines, say four lines, does the Mode has to move from 0x2 to 0x4 then?
         Mode (0x2) 
         HEnable (0x1)   << are this line and the line below directly related to the Line and Frame synchronization signals? Are they directly mapped to the Enable A and Enable B hardware lines?
         VEnable (0x1)
      }
      Interlaced (No)
      Serial {
         Baud (9600)
         SerialDisabled (Yes)
         Databits (8)
         Parity (N)
         DTR (High)
         RTS (High)
         Stopbits (1)
         TermChars ()
      }
      SignalLevels {
         PixelClock (RS422, High)
         EnableA (RS422, High)
         EnableB (RS422, High)
         EnableC (RS422, High)
         EnableD (RS422, High)
         PGOutput (RS422)
         MasterClock (RS422)
         DataLines (RS422)
         Trigger0 (TTL)
         Trigger1 (TTL)
         Trigger2 (TTL)
         Trigger3 (TTL)
      }
      ControlLinesSource {             << as far as I understood these lines are mainly use for actuators? Is it really the case?
         UseDefaultSource (Yes)
         CCSourceLine0 (None, 0)
         CCSourceLine1 (None, 1)
         CCSourceLine2 (None, 2)
         CCSourceLine3 (None, 3)
      }
      Tap (0) {
         Position (Normal)
         Start (Left, Top)
      }
   }
   Pattern {              << We were assuming this was used for Pattern Recognition? Is it a correct assumption?
      Action (PG) {
         Line (0) {
            Start (Low)
         }
         Line (1) {
            Start (Low)
         }
         Line (2) {
            Start (Low)
         }
         Line (3) {
            Start (Low)
         }
         Clock (0x78)
      }
   }
}

0 Kudos
Message 7 of 13
(12,971 Views)

In our desperate attempt for capturing image data, we decided to setup a fixed source of data (FPGA generating test patterns).  Such patterns are then send to the IMAQ+MAX application in order to evaluate the main camera parameters.

 

We set up two different patterns for a 256x256 pixel resolution using a 12-bits bus. The first one provides a checker board pattern where every other pixel is set to be "1". The second pattern makes half of the line (128 pixels) being white while the rest of the pixels is set to go black. Both patterns have a "7" blank spacing for both lines and frames.

 

For the second pattern (half-of-the-line set to black), we most of the time captured the image that appears attached to this posting, which does not make sense. We were expecting something like half of the plane (left) being filled with whites and the other half (right) set to blacks. The correct "answer" seems to appear from time to time, but it is not consistent at all. We tried tweaking the values for the left and top offsets in the Camera File Generator but it didn't provide us with the expected results either.

 

Do you happen to have any idea what is happening with our system? Am I forgetting to set up something?

0 Kudos
Message 8 of 13
(12,880 Views)

To show in a more descriptive manner I'm posting a raw video taken using the Camera File Generator software where it is possible to see how the lower part of the capture frame only corresponds to the expected output.

 

There is as well some other issues related to the missalignment of the frames that we haven't figured out yet.

 

Notice that we moved the Leff and Top Offset values to be "6" (we are originally generating "7" line and frame blanks) just to show the image seen with the application.

 

0 Kudos
Message 9 of 13
(12,876 Views)

Hi,

 

Does your camera working?

 

Thanks

0 Kudos
Message 10 of 13
(11,446 Views)