Live and Multi-D Acquisition lagging with two synchronous PrimeBSI cameras

Pretty new to MM. Trying to setup two Prime BSI cameras to be triggered simultaneously via MM and running into a few issues:

  1. “Live” mode works fine for either camera alone, but when choosing the “Multi-Camera” option there is a good 10 second delay before an image pops up every time, but, when it does, the appropriate “Inspect Preview” window opens with the two camera histograms (that I’ve labeled red and green) displayed appropriately.

  2. When trying to run a Multi-D Acquisition the Preview window also takes about 10 seconds to open and when it does it freezes after about 5-10 frames so I can’t see what I’m imaging, but the images are captured when I look in the folder in which they are saved. This happens whether I try to capture 10, 100, or 1000 frames. So, I’m imaging, but can’t see what I’m imaging, which won’t work for what I need to do.

    –But, I then realized I had the “On-the-Fly” “Image Flipper” plugin going to rotate one of the camera images by 90 degrees to align them and when I turned that off I still had a long delay after hitting “Acquire” until anything appeared in the Preview pane, but both channels (cameras) displayed appropriately and I could see the images in the preview pane for the entire acquisition whether 10, 100, 1000, or 5000 frames (100 ms exposure with 0 ms interval). So, with Image Flipper turned off I could see what I was imaging, albeit with totally mis-aligned cameras.

So, I guess my two questions are:

  1. Is it normal to have a 9-10 second delay between hitting “Live” or “Acquire” and your image appearing in the image pane when imaging with two cameras simultaneously?

  2. Does using the “On-The-Fly” Image Flipper plug-in while imaging cause problems with MDA or viewing your images while imaging?

Many thanks to anyone who might be able to help me out!

Ali

Hi @ah22, welcome to this forum!

No. Just tested this afternoon with 2 Hamamatsu Flash 4 V2s. There is a bit more delay with two cameras than with one (I have to look into the reasons for that, I have no idea why), but not 9-10 seconds.

Flipping the image requires quite a bit of CPU power, and the large images that the newer cameras can deliver at high speeds make things pretty tough. If you are working at the limits of what your computer (with this software) can do, then that could become a problem.

It would be helpful if you can list which version of Micro-Manager you are using, what exposure time you are using for both cameras, what ROI (if any), i.e. what fps you expect, and what your MDA setting are (exposure times, interval, saving to disk, single files or stack).

Thanks so much for the quick reply @nicost and sorry for leaving out these details:

-MM version 2.0 gamma Windows 64 bit (just downloaded the most recent version)
-Exposure time: 100ms for both cameras
-10fps
-2048 x 2048 full frame on both cameras
-MDA settings: 10, 100, 1000, or 5000 frames, 0 ms interval, saving to 2TB SSD HD as stack
-Sequence Buffer 20GB, ImageJ memory 40GB, 256GB total RAM on the computer

If Image Flipper can’t be used then the only way to align the cameras is to do it manually and get them as close to perfectly aligned physically as possible?

Thanks!

Trying to replicate your situation by using two democameras both set to 2048x2048. I get the delay when starting live mode only once (i.e. the second time I start live I do not get the delay), and only when I set a large sequence buffer (20GB). Setting the sequence buffer size smaller reduces the delay. So, I think this is due to Micro-Manager allocating memory for the sequence buffer. I see the same delay with one camera. You can use the Sequence Buffer Monitor plugin (Plugins > Developer Tools) to estimate how many images pile up in the buffer during an MDA (mine stays empty), and only use a sequence buffer a bit larger than that number (i.e. in my case 1 GB is plenty).

I also tested the image flipper, and did not encounter the problems you describe. Image display continued to work (I acquired 100 time points and saved them to disk). My computer is working harder since it is also generating the synthetic images.

I am not sure what the difference could be. I will test next week with 2 Hamamatsu Flash 4 cameras that we have in the lab. If someone can send me 2 BSIs, I’ll test with those as well;)

Thanks for the reply @nicost . Decreasing the sequence buffer to 2GB solved the delay issue, but I am still having an issue with the “Preview” display when trying to take a movie with MDA with Image Flipper on. With Image Flipper on the preview pane pops up pretty quickly, but it will only show the channel that is not being flipped. It still saves all of the images when I look in the folder, I just can’t see them while I am imaging (which I need to be able to see).

I tried to go into the Configurations settings and added each of the following groups to see if I could transpose the images on the camera to avoid having to go through MM software and eating up the CPU:

“Camera2-Transpose Correction”
“Camera2-Transpose MirrorX”
“Camera2-Transpose MirrorXY”
“Camera2-Transpose XY”

But, changing the preset from 0 to 1 on each of them did not transpose the image in any way so I am stuck with the only way of aligning the cameras being to use Image Flipper (as the images are necessarily a mirror image of each other), which doesn’t allow me to see the flipped channel while I’m imaging in MDA.

Any suggestions much appreciated!

It surprises me a bit that this works OK on my laptop, but not on your machine (which - I suppose - has multiple cores, and a beefy CPU?).

Try the latest nightly build of MM. There have been some very recent updates to the display code that possibly could help in your case.

If that does not help, you could try playing with the lock buttons on the right of the time and channel sliders. That hopefully will give you at least the possibility to see the overlay at a certain time point.

Yes. It has an Intel Core i9-10900X CPU.

I’ve tried the latest 4/24 build and still having the same issue. Without image flipper on, everything is fine in both Live mode and MDA. When trying to mirror image the cameras in MDA with image flipper, however, I can still only see the green channel.

But, when I changed the camera that the image flipper plugin was flipping this worked! So, initially I was image flipping camera 2 (to get its mirror image) and every time I tried to do MDA it would fail for both:
1.) JUST camera 2 with image flipper on: I would get “Error: Acquisition failed”
2.) For multi-camera with image flipper on camera 2: it would only show camera 1 (green) but never camera 2 (red) in the preview pane while imaging, but would be taking the images as they would show up in the images folder

When I switched the image flipper to flip camera 1 (to get its mirror image) instead of flipping camera 2, for whatever reason, this seems to have solved the issue! Fingers crossed it keeps working!

Thank you for your help!!