seeing-things / zwo

ZWO SDK and custom software for debugging and using it.
23 stars 4 forks source link

Binning no longer works #81

Open bgottula opened 1 year ago

bgottula commented 1 year ago

With binning set to 2 or 4 at the command line, I get the following errors repeatedly:

[2023-02-05 14:50:59.943] [error] LIBUSB_TRANSFER_OVERFLOW
[2023-02-05 14:50:59.955] [error] LIBUSB_TRANSFER_OVERFLOW
[2023-02-05 14:50:59.973] [error] LIBUSB_TRANSFER_OVERFLOW
[2023-02-05 14:50:59.976] [error] LIBUSB_TRANSFER_ERROR
[2023-02-05 14:50:59.990] [error] LIBUSB_TRANSFER_OVERFLOW
[2023-02-05 14:50:59.993] [error] LIBUSB_TRANSFER_ERROR
[2023-02-05 14:51:00.006] [error] LIBUSB_TRANSFER_OVERFLOW
bgottula commented 6 months ago

I think part of the problem is that capture is not complying with the constraint in the docstring for ASISetROIFormat() of ASICamera2.h, which states that the width must be a multiple of 8 and the height must be a multiple of 2. This must be fixed in two places in capture: in camera::init_camera() and in main() where Frame::WIDTH and Frame::HEIGHT are set.

After making these adjustments I'm able to stream from the camera with binning 2 and 4, but capture is still emitting lots of errors and warnings because the frames don't start and end with the expected values: The 16 bit start/end sync markers and frame index apparently aren't present with binning enabled.

I also found that hardware binning is not set to enabled.

With these changes I'm seeing some strange results. When I tried to set the exposure time to 0.5 seconds the reported frame rate was still way higher than 20 FPS. Maybe the way I'm doing libusb transfers only works properly for full frames at 60 FPS? I don't really understand what's happening.