Open zerog2k opened 11 months ago
also this register seems to correspond to the prometheus metrics isp_exposure
& isp_exptime
I'm not sure if it's ok that these are the same value - are they the same thing?
# HELP isp_exptime Sensor exposure time
# TYPE isp_exptime gauge
isp_exptime 687
# HELP isp_again Analog Gain
# TYPE isp_again gauge
isp_again 1024
# HELP isp_dgain Digital Gain
# TYPE isp_dgain gauge
isp_dgain 1024
# HELP isp_ispdgain ISP Gain
# TYPE isp_ispdgain gauge
isp_ispdgain 1024
# HELP isp_exposure Exposure
# TYPE isp_exposure gauge
isp_exposure 687
# HELP isp_avelum Average luminance
# TYPE isp_avelum gauge
isp_avelum 47
# HELP isp_exposureismax Exposure reached maximum
# TYPE isp_exposureismax gauge
isp_exposureismax 0
ok I was able to test using libsns_ov9712.so from oem firmware, and the issue still exists, so I suspect it's majestic doing something here with AEC
So an update - after some playing around with the camera positioning, if I angle the camera down just a bit, the image exposure balances out a bit better. I think the main issue here may be that non of the isp exposure/gain settings (exposure, aGain, dGain, ispGain, etc) seem to have any effect on the ov9712 sensor, but it does look like this may be something controlled or influenced by majestic itself. So looking for advice on troubleshooting this. (none of the debug settings like system.logLevel=TRACE seem to induce majestic to output anything extra or meaningful for this investigation.)
You may use HiSilicon's PQTools to adjust low level ISP settings and play with different settings
majestic (or something underneath it) appears to be setting the AEC (auto exposure control) registers too high
when majestic starts up, if I immediate stream the video the image is normal, but over a few seconds the exposure climbs until it's almost completely washed out white
I can see that this has something to do with the AEC (0x10 LSBs) & AECH (0x16 MSBs) i2c registers of the ov9712, as compared to oem firmware, the AEC value is much lower on original: original AEC ( 0x0026 == 38) while the majestic raises to higher values like 0x0326 == 806
I have tried playing with the majestic.yaml
isp.exposure
setting (auto, 100, 1000, 100000), but this does not appear to do anything meaningful that I can seeI can (very temporarily) fix this by setting the AECH high byte register to zero (
ipctool i2cset 0x60 0x16 0
), and I can see the image return to proper exposure on the video stream, however something in majestic (or sensor lib?) is immediately setting this value back to higher number, because the image will flicker back to over-exposed againI'm really not sure why majestic (or something) is trying to set AEC values so high. Is there some way to control this, override, or debug this better?
openipc:
oem firmware: