RAW in "low light" mode - General Discussion and Assistance - CHDK Forum

RAW in "low light" mode

  • 11 Replies
  • 6545 Views
*

Offline srsa_4c

  • ******
  • 4451
RAW in "low light" mode
« on: 04 / September / 2013, 17:23:50 »
Advertisements
After seeing this, and the followup reactions, I decided to do a bit of research on the a3200 (100d).
I used fake raw dimensions and fake raw address to output almost the whole RAM in the raw hook, but there surely are more clever alternatives.

I managed to find RAW data while shooting in "low light" mode. This mode is probably using a special pixel binning readout mode of the CCD with half horizontal and approximately half vertical resolution. The firmware uses 2 buffers in this mode (I'm providing details in case somebody else is interested):
0x4264a280
0x42b8ba80
I did find an address which seems to point to the active buffer in the right moment:
0x9ff0 + 0x14

Normal raw resolution is 4416 x 3296, "low light" raw is 2208 x 1664. The buffer's length is 1664 lines, but the actual image is somewhat shorter. The small sized raw has the same bit depth and CFA pattern as the normal one.

Now the question is, is it worth the trouble supporting raw in this mode? The quality isn't too great, but slightly better than the jpeg.
« Last Edit: 06 / September / 2013, 20:43:41 by reyalp »

*

Offline lapser

  • *****
  • 1093
Re: RAW in "low light" mode
« Reply #1 on: 04 / September / 2013, 18:10:15 »
Now the question is, is it worth the trouble supporting raw in this mode? The quality isn't too great, but slightly better than the jpeg.
First of all, great discovery and hacking job to figure all this out!

It sounds like they're adding or averaging adjacent pixels together to create the low res raw buffer. It seems like you could do a similar thing on the hi-res raw buffer with any camera. I wonder if there's a difference in quality if you take a full sized raw file and reduce it to the same size as the low light raw file, using pixel averaging for the reduction. In other words, can you create a low light raw file by reducing a normal raw file?

So maybe you could take a low light mode jpg picture, and then take the same picture in normal mode saving the raw file. Then see if you can create a jpg from the raw with the same resolution (and best available reduction method) as the low light jpg, and compare the 2 jpg pictures for noise and quality.

I suspect it's not worth it, but I wouldn't use it since I have 2 cameras with native raw.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline reyalp

  • ******
  • 14080
Re: RAW in "low light" mode
« Reply #2 on: 04 / September / 2013, 22:03:29 »
Normal raw resolution is 4416 x 3296, "low light" raw is 2208 x 1664. The buffer's length is 1664 lines, but the actual image is somewhat shorter. The small sized raw has the same bit depth and CFA pattern as the normal one.
Nice work, that's quite interesting.
Quote
Now the question is, is it worth the trouble supporting raw in this mode? The quality isn't too great, but slightly better than the jpeg.
I certainly wouldn't say it's urgent to supprot, but if it's not too hard it could be added as a port-optional feature. It would give a faster option while retaining the ability to do white balance after the fact. For a timelapse where the target is compressed video at a resolution <= the half size raw resolution, this could be quite nice.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: RAW in "low light" mode
« Reply #3 on: 05 / September / 2013, 18:47:02 »
It sounds like they're adding or averaging adjacent pixels together to create the low res raw buffer.
New CCDs support this readout mode in hardware, this quarter resolution raw may be specific to them. It's not only a "more sensitive" mode, but is also faster to read out due to the significantly less image data.
That said, I'm not really satisfied with the image quality. I tried to override the ISO sensitivity (default is 3200), but I still got horrible grain at (supposedly) ISO 80.
Quote
It seems like you could do a similar thing on the hi-res raw buffer with any camera. I wonder if there's a difference in quality if you take a full sized raw file and reduce it to the same size as the low light raw file, using pixel averaging for the reduction. In other words, can you create a low light raw file by reducing a normal raw file?
You can transform the raw data, but I don't think that will help much with quality. Doing it in-camera would be slow, and it would ruin the jpeg if there's only one raw buffer available.
More expensive DSLRs support smaller sized RAWs, but I don't know whether that's achieved through post-process (i.e. DIGIC's DSP) or hw pixel binning.

I certainly wouldn't say it's urgent to supprot, but if it's not too hard it could be added as a port-optional feature.
That would require some core changes - there's only room for one RAW (x,y) size at the moment. And it only makes sense if there's a camera that can produce usable quality in that mode.


*

Offline lapser

  • *****
  • 1093
Re: RAW in "low light" mode
« Reply #4 on: 05 / September / 2013, 19:42:52 »
New CCDs support this readout mode in hardware, this quarter resolution raw may be specific to them. It's not only a "more sensitive" mode, but is also faster to read out due to the significantly less image data.
That said, I'm not really satisfied with the image quality. I tried to override the ISO sensitivity (default is 3200), but I still got horrible grain at (supposedly) ISO 80.
The description of low light mode in the Canon manual says:
"Lets you take shots in dark places with reduced camera shake and subject blur."

So it sounds like their goal is to increase the shutter speed, not improve the image quality. That's why it's probably stuck at 3200 ISO too. It looks like it wouldn't be useful to save raw files in this mode. A raw file of a poor image is still a poor image.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: RAW in "low light" mode
« Reply #5 on: 05 / September / 2013, 20:03:08 »
So it sounds like their goal is to increase the shutter speed, not improve the image quality. That's why it's probably stuck at 3200 ISO too. It looks like it wouldn't be useful to save raw files in this mode. A raw file of a poor image is still a poor image.
But when you are trying to get a group shot of a bunch of new "friends" in a dark and smokey bar, its the perfect mode to at least get you something usable.  The question is whether a RAW/DNG from that shot can be post processed better than the resulting jpg.  Track record on that with regular RAW is not good - maybe this is different?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14080
Re: RAW in "low light" mode
« Reply #6 on: 05 / September / 2013, 21:33:56 »
That would require some core changes - there's only room for one RAW (x,y) size at the moment. And it only makes sense if there's a camera that can produce usable quality in that mode.
Yes, at a minimum raw dimensions would need to be a function call rather than constants. Raw address and size already are, so those could just change to be more complicated functions on the supported ports.

For DNG, you'd probably need two different active areas and default crops (anything else?), though cutting the existing offsets in half and rounding to the nearest even value would probably OK. Or just setting it to the full size. Have to be sure not to change the effective CFA pattern, if some existing ports have an even offset this could be a problem.
Don't forget what the H stands for.

Re: RAW in "low light" mode
« Reply #7 on: 06 / September / 2013, 01:28:47 »
sounds interesting.

however, I would love to see a RAW in hi speed mode.

some new CMOS model is offering a hi speed mode, where it can go up to 10fps at 2000 X 1500.

would be great if this can also be in RAW mode, even if the hi speed might not be as hi because of the buffer to SD card bottleneck. It will still be a very cool feature.


*

Offline srsa_4c

  • ******
  • 4451
Re: RAW in "low light" mode
« Reply #8 on: 06 / September / 2013, 16:24:20 »
There are quality issues with the quarter resolution raw image:

The binned pixels are "off", most demosaic methods don't produce a very nice result. (the image is not mine, I found it on the 'net)

*

Offline reyalp

  • ******
  • 14080
Re: RAW in "low light" mode
« Reply #9 on: 06 / September / 2013, 20:45:28 »
I have no idea why this topic was locked, but I've unlocked it.  :-[

Agree the posted picture explains quality issues with binning.
Don't forget what the H stands for.

 

Related Topics