Skip to content

ToupTek: add opt-in native-resolution binning - #1478

Open
Indigo2233 wants to merge 1 commit into
OpenPHDGuiding:masterfrom
Indigo2233:codex/native-hardware-binning
Open

Indigo2233 wants to merge 1 commit into
OpenPHDGuiding:masterfrom
Indigo2233:codex/native-hardware-binning

Conversation

@Indigo2233

@Indigo2233 Indigo2233 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

My monochrome G3M678M has a faster native bin2 mode. I'd like to use it in PHD2 to reduce the time between guide exposures, especially at short exposures.

This adds an opt-in setting for ToupTek/Omegon cameras. The ROI capture-stall fix is now in #1479. Each PR is based directly on master.

Earlier G3M678M testing with both changes gave a median frame interval of 282 ms with native bin2 versus 340 ms with SDK digital binning, at 200 ms exposure and 16-bit depth. The split branches merge back to the exact tested code; neither was separately rebuilt or rerun on hardware after splitting. Color cameras and other models still need testing.

@Indigo2233
Indigo2233 force-pushed the codex/native-hardware-binning branch from 3adc8c4 to ebab6a7 Compare October 27, 2026 09:31
@Indigo2233
Indigo2233 marked this pull request as ready for review October 27, 2026 09:31
@Indigo2233
Indigo2233 force-pushed the codex/native-hardware-binning branch from ebab6a7 to 83ce013 Compare October 27, 2026 11:08
@Indigo2233 Indigo2233 changed the title Cameras: add opt-in native hardware binning ToupTek: add opt-in hardware binning Oct 27, 2026
@Indigo2233
Indigo2233 force-pushed the codex/native-hardware-binning branch from 83ce013 to 8ea218c Compare October 27, 2026 11:28
@Indigo2233 Indigo2233 closed this Oct 28, 2026
@Indigo2233 Indigo2233 changed the title ToupTek: add opt-in hardware binning ToupTek: add opt-in native-resolution binning Oct 28, 2026
@Indigo2233 Indigo2233 reopened this Oct 28, 2026
@Indigo2233
Indigo2233 force-pushed the codex/native-hardware-binning branch from 8ea218c to 45cfda0 Compare October 28, 2026 03:23
@agalasso
agalasso self-requested a review October 28, 2026 03:34

@agalasso agalasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please summarize this goal of this PR in your own words -- not an LLM-generated essay. What is the point and what is the benefit to you and/or other PHD2 users?
Thanks.

@Indigo2233

Indigo2233 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

The goal is to let PHD2 use the faster camera-side binning mode available on my ToupTek camera. With software binning, it still reads the full sensor, which adds delay between guide exposures. This change reduces that delay, especially at short exposures or on performance limited devices, and may help other ToupTek users whose cameras offer the same capability.

@agalasso

Copy link
Copy Markdown
Contributor

Thanks for updating the pr description -- much more understandable now!

Do I understand correctly that you have a color camera and it supports hw binning? At the time I did the Touptek camera support I'm pretty sure hw binning was not supported for color cameras -- or at least not with the camera I had for testing.

If the SDK can tell us whether hw binning is available we should use that capability and eliminate the "prefer hardware binning" option in the UI -- if hardware binning is available we should always use it IMO. That is what we do with all the other cameras.

You mention the pr has an unrelated change for preventing a stall when changing ROI. I think we should split that out to a separate PR as it is unrelated to hw/sw binning (right?).

Offer an opt-in camera resolution mode to reduce sensor readout overhead.
Verify the selected mode and preserve digital/host binning for unsupported
factors. Initialize the requested resolution on every connection.

Use the active resolution for ROI geometry and Bayer handling. Include
help text and Simplified/Traditional Chinese translations.
@Indigo2233
Indigo2233 force-pushed the codex/native-hardware-binning branch from d4a3036 to 139bc4a Compare October 28, 2026 04:24
@Indigo2233

Indigo2233 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

My test camera is a G3M678M, which is monochrome. In SharpCap, I confirmed that hardware bin2 increases the frame rate from about 30 fps to 45 fps; software bin2 stays at about 30 fps. I also checked the ToupTek 715C manual, which lists hardware 1×1 and 2×2 binning. The ToupTek 4K planetary cameras I’ve looked into all appear to support hardware 2×2 binning, although I’ve only verified it on my G3M678M.

One SDK detail: my G3M678M exposes its faster bin2 mode through the native resolution list (Toupcam_put_eSize), while Toupcam_get_BinningNumber reports zero modes. I’ll account for that in capability detection and remove the preference checkbox so supported modes are selected automatically.

I reproduced the ROI stall with software binning too. That fix is now in a separate PR, #1479, and has been removed from this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants