Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't acquire images from 2 cameras on CVS

Hi All,
 
 I am having some difficulty acquiring images with my CVS.  I can acquire 1 image without a problem, but when I try and get 2 images with 2 different cameras, I get an error  saying that there are insufficient resources.  I am using the CVS 1456 which is the top model and I assume that I must be doing something wrong because there are in fact 3 fire wire interfaces so it is suprising that I am having trouble with 2 cameras.
 
 I have attached the vi, Display_Two_Cameras_on_CVS.vi
which has the error.
'-1074364394', Insufficient resources for the required video mode.
It fails at IMAQ1394 Grab Setup.
 
Interestingly 1 camera with 2 displays works fine.  I have attached the vi  Display_One_Camera _Twice_on_CVS.vi which works fine. 
 
 
Hope someone can point me in the righ direction.
 
cheers!
Peter
0 Kudos
Message 1 of 8
(4,707 Views)

Hi All,

 Just to let you know the solution to the problem is to make sure that the image size and frame rate selected from the 1st camera is small enough to leave some room on the bus for data from the 2nd camera.  With 8 bit 640x480 images, the max frame rate to support 2 (3 according to documentation but I have not tried this) is 30 fps.

 Hope this helps someone else!!

cheers,

Peter

0 Kudos
Message 2 of 8
(4,698 Views)
Peter

The maximum cumulative bandwidth on a CVS is 4912 bytes. When spec'ing your system, ensure that the combined bytes per packet value does not exceed the maximum cumulative bandwidth. If you are using 30fps monochrome camera, you should be able to connect 2-3 cameras with no problem. Once you start combining color cameras or high speed cameras, then it gets harder to

Typical bandwidth (bytes per packet) numbers:
640 x 480 x 8-bit mono @ 30 fps: 1280 bytes
640 x 480 x 8-bit mono @ 60 fps: 2560 bytes
640 x 480 x 24-bit color @ 15 fps: 3840 bytes

Hope this helps,

Johann S


Message 3 of 8
(4,650 Views)

Johann-

Does the packet size determine the fps of the camera or is there a fps setting somewhere I am not aware of?

Steve Mleczewski

Industrial Logic

0 Kudos
Message 4 of 8
(4,610 Views)

Steve

The packet size does determine the frame rate.

Johann

0 Kudos
Message 5 of 8
(4,607 Views)
Johann,
 
 thanks for your reply to my initial problems.
 
 
Steve,
 
 the packet size, might be better seen as the primary constraint on the fps rather than the place for you to set the fps.  fps is usually something you can specify in the camera configuration file.  In NI, this can be done through MAX (this is the measurement and automation explorer).  You should be able to browse to the interface (local firewire card or perhaps a remote CVS) and you can then see the cameras plugged in.  You can specify the fps there or you could do it programatically and there are some examples that show how to do this in the ie13994  samples.
 
 You can set a lower fps than there is room for on the bus but you can't set a higher fps than there is room for on the bus. 
hope this helps
 
Peter
 
 
0 Kudos
Message 6 of 8
(4,592 Views)

Hello johannS,

I want to know please how did you come with those calculations that you made concerning the bandwidth

                            Typical bandwidth (bytes per packet) numbers:
                            640 x 480 x 8-bit mono @ 30 fps: 1280 bytes
                            640 x 480 x 8-bit mono @ 60 fps: 2560 bytes
                            640 x 480 x 24-bit color @ 15 fps: 3840 bytes

Thank you

Tchaou

0 Kudos
Message 7 of 8
(4,301 Views)
The packet size for fixed video formats are described in the Industrial Digital Camera Specification. Version 1.30 of the specification is available freely at http://damien.douxchamps.net/ieee1394/libdc1394/IIDC_1.30.pdf. Version 1.31, which adds support for 1394b cameras, is unfortunately not freely available, but all the 1394a standard video mode settings still apply.

The video modes (and corresponding packet sizes) are detailed in Section 2.1.2 Video Mode Comparison Chart.

Looking at the chart, I realize I made a typo for the RGB video mode in my previous post. 640 x 480 x 24-bit color @ 15fps requires 1920 bytes. This is detailed in table Format_0, row Mode_4, column 15fps: The video mode specifies 1H, 640p and 480q. 1H means 1 horizontal line per packet. For this image format it is 1920 bytes. 640p means 640 pixels per packet. At 3 bytes per pixel, this translates to 1920 bytes per packet. 480q means 480 quadlets per packet. At 4 bytes per quadlet, this also translates to 1920bytes per packet.

So there 3 ways to calculate packet size from this video mode table. I usually prefer using the ---q as the bytes per quadlet is always fixed at 4 bytes per quadlet. For ---H and ---p, the multipliers varies based on your color coding.

Hope this helps,

JohannS




0 Kudos
Message 8 of 8
(4,271 Views)