I am starting development using the API and the approach I am using is to perform an action using the Browser UI and seeing if I can replicate the results using the API. As I peel back the onion, I am finding questions that I have not found directly in the documentation.
The first question is in regard to Camera Settings.
In the Browser UI, there are 2 sliders for the Exposure and Gain
Exposure range is 0 to 1000, Gain range is 0 to 1000
Using the API, there are settings for the AnalogGain, DigitalGain and Exposure. The documentation implies the following ranges:
AnalogGain 256-1024, DigitalGain 256-65535, Exposure 9000-90000
If I use the Browser UI with settings of both the Gain and Exposure being 500, what would the equivalent settings be using the API for the AnalogGain, DigitalGain and Exposure?
Thank you,
Rob
Hi Rob,
They are proportionally mapped. The API gives raw values that come from the hardware driver on the camera itself, which we decided wasn't a friendly scale, so we mapped them to more resonable values.
For exposure
exposureAPI = exposureSlider * 100
For gain
analogGainAPI = Math.round(analogGainSlider * 0.768) + 256;
If I may offer another point here, the exposure values in the API are not quantized lik they are in the front end. They are stepped to values of 90 (90, 180, 270 ... 990). This is because there is a harmonic interference between the frequency of the cameras and the frequency of the projector that cancels itself out at those values. If you play around with different values and you will see banding occur.
steps of 90 offer (in most cases) enough control over the exposure. If you need a value between quantized steps, then I suggest you use the lower exposure, and adjust with the gain setting.
Hope this helps
Thanks Drew! Very helpful.
One followup.
Should digitalGain be a constant default value if using analogGain or should it mirror the analogGain settings?
@Rob M, they are separate and you can leave Digital gain at it's minimal value. Analog Gain will give better results over Digital gain if needed.