This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HDR with OPT9221, integration time and amplitude

Other Parts Discussed in Thread: OPT9221, OPT8241

I try to use the HDR feature of the OPT9221/OPT8241. When I change the hdr_scale parameter from 0 to 4, I expect to obtain two frames where the second one is exposed with an integration time 2^4 shorter than the first frame. This change in the integration time should be quite obvious when looking at the amplitude content of the frames. But in practice, I just observe 30% lower amplitude for the HDR frame instead of 16 times less. I have tried different values of intg_duty_cycle, dealias enable or disable but still the same behavior. I have also tried different values of hdr_scale and I can measure a small decrease of the HDR frame amplitude when hdr_scale increases but it reaches ~70% of the first frame for hdr_scale=7 (instead of 0.8%!).

Any suggestion of what could go wrong there?

Thanks.

Pierre

  • The minimum integration period per quad is 1024 cycles of the 48 MHz system clock. The integration time per quad for HDR frames is
    (pix_cnt_max * intg_duty_cycle/(64 * (2^hdr_scale))). If this value is less than 1024, it will be clamped to 1024.

    Could you check if you are hitting this limit for HDR_SCALE = 4?
  • I am far from this limit. When I change intg_duty_cycle from 20 to 1 I clearly see the difference (a factor 20) in the amplitude images however with intg_duty_cycle=20 and hdr_scale=4, I barely see the difference (only 30% less counts in the amplitude image). Please, try it yourself, it is quite obvious when you look at the amplitude images in VoxelViewer.

  • Hi Pierre,

    We could not replicate this - with a pix_cnt_max of 100000 and intg_duty_cycle of 20, varying hdr_scale from 0 through 4 results in the expected amplitude.

    Could you let me know the following:
    - which profile are you using? (No Calibration, or any of the other calibrated profiles)
    - what is the pix_cnt_max value in your setting?
  • Hi Anand,
    Good to know your test is working. Could you confirm that when varying hdr_scale from 0 to 4, the amplitude varies from 100% to ~6%?

    Starting from the "No Calibration" configuration, I have tried different different modulation frequencies (24 and 48 MHz) and pix_cnt_max (100000 and 200000) with intg_duty_cycle=20.
    It seems to work partially. I would have expected to see the same decrease in amplitude when changing hdr_scale as when changing normal_frm_intg_scale but it's not the case.
    With mod_freq1=48MHz and pix_cnt_max=200000, with an amplitude of 430 with hdr_scale=0 and normal_frm_intg_scale=0,
    the reduction stopped at ~110 with hdr_scale=5 (a factor 4 instead of 2^5) and at ~18 for normal_frm_intg_scale=6 (factor 24 instead of 64).
    With mod_freq1=24MHz and pix_cnt_max=100000, the amplitude decreases with increasing hdr_scale up to 2. At 3 and rising, the amplitude increases!! That's really odd.
    Among strage behaviours, I have also observed that saturation in the image change the reg/HDR amplitude ratio in a non saturated region. Is it some sort of leaking?

    I have attached an example of data (.vxl) and the corresponding configuration (Lens Only) (.csv) with dealias enable (40 and 60MHz, pix_cnt_max=133333). You can see that in this case that the amplitude ratio between regular and hdr frame is about 1.25 when hdr_scale is 3 (amplitude ratio should be ~2^3=8). For comparison, normal_frm_intg_scale=3 gives a ratio of ~6 (close enough to 2^3).
    Could you tell me what goes wrong with the dealiasing and HDR? Even with a single frequency, the behaviour looks erratic.
    Are you aware of people actually using the HDR feature to increase the dynamic rang of the sensor?

    Thanks.Data+Config_Example.zip