Open bgottula opened 5 years ago
An idea tried on nix was to set the histogram threshold based on a number of allowed saturated pixels, rather than a percentile:
// Calculate Nth percentile pixel value
- constexpr float percentile = 1.0;
- uint32_t integral_threshold = (uint32_t)((1.0 - percentile) * Frame::IMAGE_SIZE_BYTES);
+ constexpr float percentile = 0.999;
+ constexpr int max_saturated_pixels = 10;
+ //uint32_t integral_threshold = (uint32_t)((1.0 - percentile) * Frame::IMAGE_SIZE_BYTES);
+ uint32_t integral_threshold = max_saturated_pixels;
A crude AGC was added to the capture software under #1 but it was not extensively tested. Known or suspected issues:
agc_value
to gain and exposure time settings needs to be further scrutinized.