RAW subtract - page 2 - Feature Requests - CHDK Forum supplierdeeply

RAW subtract

  • 14 Replies
  • 12117 Views
*

Offline reyalp

  • ******
  • 13880
Re: RAW subtract & temperature
« Reply #10 on: 27 / July / 2008, 23:54:47 »
Advertisements
The UI you suggest looks OK to me. However, it would be much better (and faster) if we could get a real control of the shutter to create directly a dark frame (i.e., without taking a pre and post raws of a given exposure...). If I remember correctly Dataghost already found a way to close (or open) the shutter during an exposure.
That would be ideal. If you have a link where that was discussed, I'd appreciate it.

FWIW, what I have should just mean that 1 exposure will take longer, which is the same as if you manually took the picture and then did a darkframe shot. Of course how inconvenient that is depends on what you are doing. If you want to avoid fiddling with the options, you could script it so that the first frame has camera NR on and the required raws grabbed, and then turns those options off.
Quote
Anyway, if this type of control is not possible, your approach to create a dark frame is certainly useful. Of course, another solution would be to put the a cap in front of the lens!  :P
Annoying on P&S cameras that have a bunch of delicate moving bits and no thing to attach a cap to :)
Don't forget what the H stands for.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: RAW subtract & temperature
« Reply #11 on: 28 / July / 2008, 03:29:58 »
That would be ideal. If you have a link where that was discussed, I'd appreciate it.

http://chdk.setepontos.com/index.php/topic,1365.msg16080.html#msg16080

*

Offline DBgit

  • *
  • 14
Re: RAW subtract
« Reply #12 on: 28 / July / 2008, 09:57:25 »

FWIW, what I have should just mean that 1 exposure will take longer, which is the same as if you manually took the picture and then did a darkframe shot. Of course how inconvenient that is depends on what you are doing. If you want to avoid fiddling with the options, you could script it so that the first frame has camera NR on and the required raws grabbed, and then turns those options off.


Hum... I'm not 100% sure I understand correctly your technique to get a dark frame.

What I would like to do : shot several frames in a row with the dark frame subtraction off (for e.g.,  it is not possible to get continuous star trails if a dark frame is taken after each shot). After I took these shots, I then need to take the dark frames that were not acquired during the shooting session. To do so, I would ideally tell the camera to close the shutter and take the same shots with the exact same conditions (or alternatively, I can put a cap in front of the lens, put the camera in a black box, etc.). Once everything has been shot, I simply subtract manually the exposures and the dark frames.

If I understand properly the technique you developed, you obtain a dark frame by recording the raw buffer both (i) just after the exposure and (ii) after the exposure has been corrected with a dark frame. You then subtract the two raw files to get the raw dark frame. Although this technique seems to work perfectly, the problem is that you need twice the time to collect the dark frames (and you also need to perform quite a lot of calculation). This can be a problem if one needs to collect the dark frames for several 65 s exposures...


*

Offline LjL

  • ****
  • 266
  • A720IS
Re: RAW subtract
« Reply #13 on: 28 / July / 2008, 14:19:24 »
Yes, that is indeed the drawback of his approach. If you want to save that time, you have to play with DataGhost's build and its functions to take shots with the shutter closed.


*

Offline reyalp

  • ******
  • 13880
Re: RAW subtract
« Reply #14 on: 08 / August / 2008, 00:11:08 »
The big advantage would be to perform the dark frame subtraction at the RAW level (i.e. before the demosaicing process). This can theoretically eliminate the presence of artifacts that can appear when the dark frame is subtracted after the demosaicing process.
Unless you do further processing, you actually just end up with different artifacts. Wherever your dark frame had a near max value pixel, you end up with a corresponding dark pixel in subtracted frame (the noise swamped whatever was there, so you can't actually recover the "right" value) Since it is typically only one color lit, what you see after you demosaic an image like this is a still a bunch of colored spots, they are just darker and the opposite color from the original noise. If your subject was very dark, this actually looks pretty OK, but the brighter it was, the worse it will look.

What you really want to do is interpolate a value for that dark spot from the neighboring, non-zero pixels for the same color, before you demosaic. dcraw (and relatives) will do this for you under some circumstances.

You can actually see these holes with the canon firmware noise reduction, although they seem to do something to keep them from getting too saturated and jpeg smooths it out a bit.

I have raw subtract on the camera basically done, but I'm starting to think it's not that useful. Unless you don't have access to the PC, the camera is just the wrong place to do image processing. It's slow, you can't see what you are doing, and from a programmers perspective, it's far more limited. Processing before demosaicing may be useful, but in that case the right way to do it is still on the PC. Porting the raw handling code to the PC is trivial (i've already done it because it was more convenient than testing on the camera) and once you are there you have gobs of memory, CPU and libraries at your disposal.

This isn't the answer I wanted to come to, given how much time I put into this, but so it goes  >:( I'll still post the code for whoever may want it, but IMO the value is limited.

edit:
posted here http://chdk.setepontos.com/index.php/topic,2099.new.html
« Last Edit: 08 / August / 2008, 05:16:16 by reyalp »
Don't forget what the H stands for.

 

Related Topics