Line scan camera crashes while setting the buffers in the driver

Hello all,
I have a SW-4000Q line scan camera from Jai. It is a multispectral camera where I get both RGB and NIR images. The maximum resolution, I can set for the camera is 4096x4096. Initially when I add the camera to the configured devices, the device has a width of 4096 and height 1. With this settings I am able to set the buffer size to a higher value (10) greater than 3 in the driver. But, when I open the camera and save the resolution to 4096x4096. I am not able to open the camera again once it closes. In genicam browser the camera system shows a cross and turns red after sometime as shown below.

Once, this happens I can only open the camera after doing a power reset but then again the saved settings in the camera goes to default settings.

Also, I am using a area scan camera parallely. I have already set the buffer size for this camera for a higher value and I still have around 20 GB of RAM left in my PC. Will the CVB driver be able to set different buffers for each camera or is the area scan interfering with the line scan camera ? I don’t have any issues in using the line scanner with the default buffers of 3.

Is there a better way to set the buffers for the line scan camera.

Hi @keerthitheja
are you sure that it is related to the amount of buffers that the 10GE JAI Kamera is not responding or is it only related to the resolution? Did you try to only set the resolution and leave the number of buffers at 3?

The configuration for the buffers is independent for every camera. So you can set different buffers for each camera .

Hi @Sebastian
It is because of the resolution. First before getting into the buffers, let me explain you the issues I am seeing with respect to the bandwidth. I am running the line scanner camera with the below settings

Exposure time: 10 us
Resolution : 4096 x 4096
line rate: 80 Khz

So, these settings gets me an FPS of 17. Now if I calculate the bandwidth for RGB stream = 4096 x 4096 x 3 x 17 = 856 Mb/sec. With this bandwith I see corrupt frames warning from genicam browser logging. You can see the same thing in the picture below

For the same settings as above, if i run the NIR data stream, I do not see corrupt frames being delivered. Because here we get a bandwith of total 409640961*17 = 270 MB/secs. (I am not sure why genicam browser here shows 841 MB/sec as NIR contains only 1 plane. I guess it is assuming that the image contains 3 planes ?)

Now, if I change the line rate alone to 48 Khz, the FPS changes to 12 for the same resolution of 4096 x 4096. The total band width of the RGB stream comes to 600 MB/sec. With this setting, I do not see any corrupt frames being delivered

If I reduce the resolution to 2560x2048 with maximum possible line rate, I do not see any issues as well.

The corrupt frames is seen with only the maximum resolution and maximum line rate settings. This is for only RGB stream. Now when I run both the streams (RGB and NIR ) together, I see the corrupt frames again.

The line scan camera is connected to a 10GigE port. The settings for the port are as follows
Flow Control : Disabled
Interrupt Moderation: Enabled
Interrupt Moderation Rate: Off
Jumbo Packets: 9014
Receive Buffers: 4096

Now Regarding the buffers:
At the camera side, I have currently set the buffers to 100 and the pack size to 8192. Today, I did not see the issue of camera not responding with higher buffers at maximum resolution. But what I saw was, sometimes I am able to access only the NIR stream (DS1). The genicam broswer does not allow me to open the RGB stream (DS0). So, when this happens I have to close the camera and open the camera again to access both the streams.

I am not sure if these issues are happening due to the network card setting. Any suggestion on what would be the ideal network card settings for this camera. Initially I had set the interrupt moderation rate to Medium. But, later I changed it to Off as suggested by GeniCam user guide because I was seeing corrupt frames delivered.

Hi @Chris, @Sebastian @c.hartmann,
I am still facing this issue. I set the resolution of the line scan camera to 4096 x 4096 and max line rate possible. When I close the camera and try to open the camera again, the camera crashes and a cross appears in the genicam browser.

Also, the quoted issue.

Any suggestions on how to deal with this ?

Hi @keerthitheja ,

Could you try the following.

  1. Go to DS0
  2. Change the Component Selector or Source Selector to the appropriate value.
  3. Start DS0
  4. Go to DS1
  5. Change the Component Selector or Source Selector to the appropriate value.
  6. Start DS1

Hi @c.hartmann
So, for DS0, the component selector is RGB and DS1 the component selector is NIR. I set these values individually for each stream and run the acquisition and it runs fine. But, when I close the camera and open it again, the component selector goes back to RGB for both the streams, I need to manually changed the value for DS1. Now, this problem happens when I use CVB++ as well.

The issue has been answered by you here

Hi @c.hartmann
I think there is something wrong when opening the camera with two streams at high resolution (4096x4096), I see that the throughput of the line scanner ethernet port goes to maximum and the camera stops responding. GeniCam browser logging reads that 1 frame has been acquired for both streams DS0 and DS1. But the camera stays open with a cross mark on the icon. I am not sure why this is happening but it could be because the way GeniCamBrowser loads the camera before opening it ?

What are the steps you have to do when the camera is in the corrupted (cross icon) state, to get it back to a working state again?

Hi @Chris
I need to turn off the PC and the line scanner as well to make it working again. Just by tunring the line scanner off and on alone is not fixing the issue :frowning:

This sounds like the networkcard for some reason might have passed out on all the data :wink:
You could try to test with the socketdriver as well and also a log of the time the error occurs would be helpful.

Hi @Chris
I tried with the socket driver but the system got handged :frowning: Had to force restart the PC. Also couldn’t log anything with the socket driver

Do you have another system where you can test? Still, I think this is not CVB related but a problem of the networkcard/ camera that cant handle the amount of data.

If you could try to get a log with the FilterDriver we might have more information but I think this is not very likely from what I would assume at the moment