Author Topic: Dark Frames for RAW video--Optimal Opacity?  (Read 6252 times)

Frank7D

  • Senior
  • ****
  • Posts: 457
Dark Frames for RAW video--Optimal Opacity?
« on: February 11, 2017, 05:39:18 PM »
I make my own dark frames to remove FPN rather than using the tools people have shared here, but I hope my question is still generally relevant and is somewhat apples to apples (even if perhaps McIntosh to Granny Smith).

It seems as though when subtracting the dark frames, a crucial decision is how strongly to apply them. So in Photoshop or After Effects for example, after putting the dark frame layer above the video layer and setting the blending mode to "subtract," you would adjust the dark frame's opacity to the value that removes the most FPN.

What I have noticed is that there is inevitably a compromise between FPN vertical lines in the lighter areas and the darker ones. As you reduce the opacity the lighter areas improve but the darker ones get worse. Obviously this is most problematic in high-contrast scenes.

My question: Is this a general characteristic of all dark frames?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #1 on: February 11, 2017, 05:42:13 PM »
Best guess (as I don't use these tools):

When you place the dark frame in a Photoshop layer, the image data is no longer linear; also, values below 0 are clipped. Therefore, a simple subtraction will probably not do the trick.

Subtracting the dark frame before debayering should do the trick (regardless of what tool you use to do that).

Frank7D

  • Senior
  • ****
  • Posts: 457
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #2 on: February 11, 2017, 05:45:49 PM »
a1ex, thanks for the insight! I will explore that possibility.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3401
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #3 on: February 11, 2017, 06:04:51 PM »
Also don't forget to check out @Danne's latest cr2hdr.app which does wonders in DarkFraming average process.
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Frank7D

  • Senior
  • ****
  • Posts: 457
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #4 on: February 11, 2017, 06:59:21 PM »
Jedi: Thanks for the tip. I'm on Windows though so can't use Danne's app.

a1ex: In my current workflow (with After Effects) I found that if I apply a curves effect to the dark frame I can adjust its "linearity" to improve matters. A more perfect solution will have to wait for another day.


Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #5 on: February 11, 2017, 07:13:48 PM »
Could you elaborate on how you apply the darkframes in AE or Photoshop? I want to try out some filters in FFmpeg which could work outside the MLV container workflow. Could you perhaps do a step by step description here?

Frank7D

  • Senior
  • ****
  • Posts: 457
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #6 on: February 11, 2017, 11:11:59 PM »
Danne, there's not much to it.
1 - Put the dark frame above the video (or photo) and set the blending mode to "subtract."
2 - Adjust the dark frame's opacity if needed. Sometimes 100% works fine.
3 - After a1ex's tip about linearity, I tried applying the "curves" effect to the dark frame and found a curve that seemed to result in equal FPN reduction in light and dark areas of the noisy image. Below is a picture of it. Maybe it will need to be adjusted for every image.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7235
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #7 on: February 12, 2017, 02:03:23 PM »
Ok, thanks.
Is the picture showing? Can,t see it on my cell phone at least.

Frank7D

  • Senior
  • ****
  • Posts: 457
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #8 on: February 13, 2017, 04:15:11 AM »
I'm having trouble with it. Maybe this link will work:
https://www.dropbox.com/s/yj4nsm2drx4433w/DarkFrameCurve.jpg?dl=0

SpcCb

  • Member
  • ***
  • Posts: 207
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #9 on: February 13, 2017, 06:00:12 AM »
Best guess (as I don't use these tools):

When you place the dark frame in a Photoshop layer, the image data is no longer linear; also, values below 0 are clipped. Therefore, a simple subtraction will probably not do the trick.

Subtracting the dark frame before debayering should do the trick (regardless of what tool you use to do that).
I agree, it's the optimal and the most simple way.

However, after debayering _theoretically_ if there's no clipping|scaling in the dynamic, and if the process of dark frames and light frames are the same (log, etc.), it should _relatively_ match.
In all cases, if you make a *master dark frame* (average of several frames), it will better work. And maybe a small Gaussian smoothing could help too, to correlate with the Gaussian distribution of light frames.

Brawl

  • Member
  • ***
  • Posts: 209
Re: Dark Frames for RAW video--Optimal Opacity?
« Reply #10 on: February 26, 2017, 11:20:11 PM »
is it possibile to do Dark Frames for RAW video workflow with Premiere or Davinci? thx!