IMX camera capabilites #88
Replies: 12 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Dear all, based on the comments of @illgr I reran the tests.
The digital gain varies with the exposure time: IMX290 is lowest at gain 1 and 17 with both 1 sec., but gain 17 will add hot pixels (3); for the IMX477 10 sec at gain 1 or 3 are OK (0 hot pixel), or 1 sec at gain to 40 (with digital gain > 1 🙄). ![]() ![]() Reg. the min pixel value, the gain for the IMX290 should be lower than 10, the IMX477 the gain should be lower than 7. I plotted avg normal vs. the digital gain and the effect is quiet obvious: The stddev against the digital gain shows the effect of the gain kicking in (again: these are darks!!): My conclusion: Stay away 600 sec exposure time and gain larger 10! Even if you have a supersonic transwarp harmonic drive IMX290: (My seeker/plate solver/tracker): IMX477 sensor temp has been 17-19 deg celsius uncooled. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@tschoenfelder Thank you for this detailed analysis. You did a huge amount of work! Thanks. |
Beta Was this translation helpful? Give feedback.
-
@scriptorron Dear Ronald, It's not as nice for the IMX290: The middle DigitalGain==1 steps don't exist: ![]() ![]() For the IMX477 the stddev get's larger, the digital gain getting back to 1.0 makes gain above 23 seemingly a sweet spot. But seeing the curve, I wonder if gain1 loses dynamic range, but wins by reduced noise. ![]() ![]() Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi Torsten, each analog gain value would need a hardware implementation in the camera circuit. I can imagine, that the camera IC has only a few analog gain values implemented. It seems, the kernel driver makes some magic to allow intermediate gain values by a combination of analog and digital gain. I still do not like the digital gain: it takes the 12 bit ADC value, multiplies it by something and rounds or cuts the result to 12 bit. This rounding/cutting adds noise! There is a good reason to do post-processing of astro-images with floating-point arithmetic. In your diagram "IMX477: Digital Gain vs Gain" the digital gain becomes "noisy" for gain values above 11. This is strange, because the gain "magic" in the kernel driver should be deterministic and reproducible. Do you have an idea where this digital gain "noise" comes from? It would be good to know, which gains are done analog only. Can you make a list of IMX477 gain settings which lead to digital gain = 1? It does not need to be complete, only a few recommended values would be enough. Do I understand your last post right, that gains 1, 2, 4, 8, 16, 22.26 are done with digital gain = 1? Regards, |
Beta Was this translation helpful? Give feedback.
-
Torsten, have you seen this: https://forums.raspberrypi.com/viewtopic.php?t=346873 I found this interesting:
I did a google search to find out, if "DGAIN" is already used in the FITS header for other purposes. It does not seem so. In the next driver version I will add "DGAIN" to the FITS. Regarding the "noisy" digital gain: https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf states:
Can it be that the "noise" in your diagrams comes from a wrong metadata of the first image in your sequence? |
Beta Was this translation helpful? Give feedback.
-
DGAIN is implemented in main branch. |
Beta Was this translation helpful? Give feedback.
-
Btw: I am using the standard tuning files inside the PISP directory: and IMX477: |
Beta Was this translation helpful? Give feedback.
-
Hello @scriptorron , Both sensors/base drivers have gain settings, which lead to the wished state of digital gain == 1: The IMX477 has several sweet spots: The larger error bars on the larger gains are due to the fact, that in this area the drivers are mapping different gain settings to some analogue gains and different digital gains: By this, the errors bars at higher gains should be taken with a grain of salt. But the average normal vs the gain requested via EKOS shows a behavior, which seems to be relevant to me: ![]() ![]() ![]() ![]() ![]() For the IMX290, a gain below 12,88 seems to be a goal, but without any distinct sweet spots ... Best regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I ran some checks on IMX219 and IMX477 to get a better feeling on good parameters to use. On the EXIF-Tool report they both state black level 4096 (which would be 1 bit only based on the 12 bit ADC).
I took darks with both sensors with changing gain and expo time via rpicam-still (rpicam-still --raw --immediate --mode {camera['width']}:{camera['height']} --width {camera['width']} --height {camera['height']} -n " +
f"--denoise=off --awb=custom --shutter={shutter} --camera {camera['camera']} --gain {gain} --awbgains 1,1 "+
f"-o pic_dark_{camera['name']}{gain}{shutter}raw{run}.jpg ; due to having the look running in dark/cool night, the IMX219 is called with too high gain and exposure time).
On all pixel values below 62258,25 I calculated average and stddev.
On the IMX219 these numbers look weird. The average gain increases, but not directly correlated with the exposure time. Again, mind the scale ...
On the IMX477, it looks OK, the 600 sec exposure increases may be due to some light leak (even so in the middle of the night, but perhaps ...)
Taking these darks the IMX219 shows a flattening starting above 10 whilst the still stays in the linear range. For the IMX477, the stddev goes up by 4,5 when the expo goes up by 6. This seems to be an improved SNR. BUT: Fr the IMX219, increasing the expo time from 1 to 10 sec. (times 10, the stddev increases by 1,02 only.
But as well the hot pixels are interesting:


Def Hotpixel: all pixels with a value > 62258,25 (2^16 - some percent).
Recall: In the night, 219 covered with black dust cap of the seeker telescope, the ones you know ...
Coming from 0 at short exposures getting to many pixel being just white. What you are not able to see, it's mostly the same pixels, not just random.
It isn't really better with the IMX477:
With 600 sec. the same pixels overshoot regardless Gain 20 or 7.
My theorem is:
I received the IMX290, building a case with peltier cooling. But I am not sure, what 1) the improvements will be and 2) if dew will just kill everything ..
BTW: Does anyone know how to get the sensor temp when using rpicam-still?
Best regards,
Torsten
Beta Was this translation helpful? Give feedback.
All reactions