Driver frame buffering issues when using 2x ASI178MM cameras

any question related to our SDK and driver

Moderators: yang, Support@ZWO

Post Reply
Tom351
Posts: 3
Joined: Sat Dec 14, 2019 3:11 pm

Driver frame buffering issues when using 2x ASI178MM cameras

Post by Tom351 » Sat Dec 21, 2019 9:19 am

Hi there,

For a project I am using two ASI178MM cameras connected via USB3.0 to a Raspberry Pi4 (4GB).
Running one camera at a time works perfectly and high framerates are acquired, however running the 2 at the same time results in serious frame buffering issues and the FPS drops significantly on both. Even at different exposures it seems one camera's frame acquisition is affected by the other as it waits for the other acquisition to be completed before finishing its own acquisition. In most of the cases very inconsistent frame captures are seen (capture burst of 20 frames in a row and then a freeze for a couple seconds). I only need a smooth 25/30 FPS capture on both.

What I tried:
Various USB bandwidth settings on both camera's
Enabling/disabling high-speed modes
smaller ROI's to reduce amount of data transfer.
Initially I saw that when the frame acquisition freezes, the Raspberry clock drops to 600 MHz, so I set force_turbo=1 to keep the clock at 1.5 GHz
Same results when connecting the cameras to a more powerful laptop and trying all of the above
All of the above actions were unsuccessful in trying to get smooth 25/30 FPS frame captures from both cameras

What I am using:
Python ZWO ASI bindings by Steve Marple (using start_video_capture and then capture_video_frame to get the frames)
Both camera acquisition loops run in a separate thread
Two USB3.0 cable lengths are 1 meter
V1, 14, 1119 2019.11.19 SDK
Ubuntu 19.10

Anyone has any other ideas to make 2x ASI178MM run smooth?

All help is appreciated,
Tom

User avatar
Support2@ZWO
Posts: 668
Joined: Thu Feb 09, 2017 4:58 am

Re: Driver frame buffering issues when using 2x ASI178MM cameras

Post by Support2@ZWO » Wed Dec 25, 2019 1:40 am

Hi Tom,
Sorry for the late reply.
I need to test it on my side first. So please keep in touch.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

Tom351
Posts: 3
Joined: Sat Dec 14, 2019 3:11 pm

Re: Driver frame buffering issues when using 2x ASI178MM cameras

Post by Tom351 » Mon Dec 30, 2019 9:52 am

Hi Chad,

Thanks for looking into it!
Let me know if you need more information from my side.

Cheers,
Tom

User avatar
Support2@ZWO
Posts: 668
Joined: Thu Feb 09, 2017 4:58 am

Re: Driver frame buffering issues when using 2x ASI178MM cameras

Post by Support2@ZWO » Thu Jan 02, 2020 1:35 am

Hi Tom,
Very sorry, I am busying there days, and forget this issue.
I will test it today. Sorry again.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

User avatar
Support2@ZWO
Posts: 668
Joined: Thu Feb 09, 2017 4:58 am

Re: Driver frame buffering issues when using 2x ASI178MM cameras

Post by Support2@ZWO » Thu Jan 02, 2020 2:19 am

Hi Tom,
We tested it with Pi4 and Desktop.
On pi4, yes, the problem is very serious. But on desktop, it works fine.
So we think it should belongs to the CPU speed. Maybe you also could test it with our Demo.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

Tom351
Posts: 3
Joined: Sat Dec 14, 2019 3:11 pm

Re: Driver frame buffering issues when using 2x ASI178MM cameras

Post by Tom351 » Tue Jan 14, 2020 10:38 pm

Hi Chad,

Thanks for testing it on your side. It could be indeed the cpu speed, however I think it should be powerful enough though.
I expected at least somewhat better results when I drastically decreased the resolution from full to even 640x480 on both cameras to reduce amount of data transfer, however still resulted in the same behavior so perhaps the problem is somewhere else.

Thanks,
Tom

User avatar
Support2@ZWO
Posts: 668
Joined: Thu Feb 09, 2017 4:58 am

Re: Driver frame buffering issues when using 2x ASI178MM cameras

Post by Support2@ZWO » Thu Jan 16, 2020 3:30 am

Hi Tom,
I checked the code. For 178MM, I think reducing the resolution does not reduce the amount of data transfer.
Because if you reduce the resolution, according to our design, the framerate also will increase, so the amount of data transfer may not change.
But I also tested to reduce the USB bandwidth, it also does not work. Considering that we actually use a DLL running on the CPU to control the camera, so I think the speed of the CPU running this DLL is the key.
Thanks
Chad
ZWO Driver Engineer
Location:lon=120.6 lat=31.3
SuZhou China

Post Reply