Thanks for letting me know about those broken links; I've passed the info along.
Steve, desharpening is a touch more complex than simply blurring. What happens in a sharpen operation is that the difference in luminance between neighboring pixels is exaggerated. Two pixels of nearly the same value will be unchanged, but if their luminance is extremely different, then the contrast between them is increased. To some extent, this process can be reversed by finding those same edges and subtracting the same sharpening filter instead of adding it. Sharpening can't be exactly reversed, though, because the original pixel values have been lost—all we can do is approximate them. As a result, the image will be slightly blurrier than the original, pre-sharpened image, but unpleasant crispiness and ringing can be reduced.
DeSharpen undoes an Unsharp Mask operation using this technique, mostly because Unsharp Mask is well documented and easy to perform. But it uses a Gaussian filter, which may create too broad an edge across with the smoothing happens. The Laplacian sharpener under consideration is evidently finer, capable of enhancing smaller details.
My guess is that you'd want to run your over-sharp footage into the CustomFilter using one of the given Laplacian kernels. This needs to be done in floating point, so you might need a ChangeDepth first. Then you'd subtract that result from the footage using ChannelBooleans (don't forget to set Alpha to Do Nothing). I believe the Gaussian control in Nuke would be a Blur applied before the CustomFilter.
One bit I'm unsure of is the Size control. "Adjusts the size of pixels within the channel defined by the channels control. Values less than 3 increase the light pixels and vice versa." I have no idea what that means.
Anyway, not having Nuke installed to test against, there's not much I can do to reverse engineer it at this time. You can give this a try and see if it gets close:
- Code: Select all
{
Tools = ordered() {
CustomFilter1 = CustomFilter {
CtrlWZoom = false,
CustomData = {
Settings = {
[1] = {
Tools = ordered() {
CustomFilter1 = CustomFilter {
Inputs = {
Matrix = Input {
Value = FilterTable {
Offset = 0,
Type = 6,
EndIn = 1,
Maximum = 1,
MaximumValue = 1,
MinimumValue = 0,
Minimum = 0,
Table = { 0, 0, 9, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
NumEntries = 54,
StartSlope = 1,
StartIn = 0,
EndSlope = 1
}
}
},
Name = "CustomFilter1",
CtrlWZoom = false,
ViewInfo = OperatorInfo { Pos = { 550, -82.5 } },
CustomData = {
}
}
}
},
[2] = {
Tools = ordered() {
CustomFilter1 = CustomFilter {
Inputs = {
Matrix = Input {
Value = FilterTable {
Offset = 0,
Type = 6,
EndIn = 1,
Maximum = 1,
MaximumValue = 1,
MinimumValue = 0,
Table = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, -1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
EndSlope = 1,
NumEntries = 54,
StartIn = 0,
StartSlope = 1,
Minimum = 0
}
}
},
CtrlWZoom = false,
ViewInfo = OperatorInfo { Pos = { 660, -115.5 } },
CustomData = {
}
}
}
},
}
},
Inputs = {
Blend = Input { Value = 0.58, },
Matrix = Input {
Value = FilterTable {
NumEntries = 54,
Type = 6,
Offset = 0,
Minimum = 0,
Maximum = 1,
MinimumValue = 0,
MaximumValue = 1,
StartSlope = 1,
EndSlope = 1,
StartIn = 0,
EndIn = 1,
Table = { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 4, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
},
},
Input = Input {
SourceOp = "PipeRouter1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 275, 577.5 } },
},
ChannelBooleans4 = ChannelBoolean {
Inputs = {
Operation = Input { Value = 2, },
Background = Input {
SourceOp = "PipeRouter1",
Source = "Output",
},
Foreground = Input {
SourceOp = "CustomFilter1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 275, 610.5 } },
},
ChannelBooleans3_1 = ChannelBoolean {
Inputs = {
Blend = Input { Value = 0.973, },
Operation = Input { Value = 2, },
Background = Input {
SourceOp = "PipeRouter1",
Source = "Output",
},
Foreground = Input {
SourceOp = "ChannelBooleans4",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 275, 643.5 } },
},
PipeRouter1 = PipeRouter {
ViewInfo = PipeRouterInfo { Pos = { 165, 610.5 } },
}
}
}
Play with the center value in the CustomFilter, and the Blend in the second ChannelBooleans. I have no idea if it will be useful to you or not—it's just a few minutes of fiddling around.