Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Created December 1, 2020 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KelSolaar/06e465813f9df4b8966b8cdd8072505f to your computer and use it in GitHub Desktop.
Save KelSolaar/06e465813f9df4b8966b8cdd8072505f to your computer and use it in GitHub Desktop.
Nuke - RMSE
set cut_paste_input [stack 0]
version 12.1 v1
push $cut_paste_input
push 0
Group {
inputs 2
name RMSE
tile_color 0xffbf00ff
selected true
xpos -150
ypos 87
addUserKnob {20 RMSE_Tab l RMSE}
addUserKnob {13 RMSE_3dPositionKnob l RMSE}
RMSE_3dPositionKnob {{RMSE.RMSE_3dPositionKnob.x} {RMSE.RMSE_3dPositionKnob.y} {RMSE.RMSE_3dPositionKnob.z}}
addUserKnob {22 compute_RMSE_PythonScriptButton l "Compute RMSE" T nuke.toNode('average_CurveTool').knob('go').execute() +STARTLINE}
addUserKnob {20 about_Tab l About}
addUserKnob {26 description_Text l "" +STARTLINE T "RMSE v0.1.0\n\ncolour-science.org - October 09, 2018\n\nThis Gizmo / Group performs RMSE computation.\n\n\[1] https://en.wikipedia.org/wiki/Root-mean-square_deviation"}
}
Input {
inputs 0
name InputA
xpos -40
ypos 63
number 1
}
Input {
inputs 0
name InputB
xpos 70
ypos 111
}
set N4432c000 [stack 0]
MergeExpression {
inputs 2
expr0 "(Ar - Br) ** 2"
expr1 "(Ag - Bg) ** 2"
expr2 "(Ab - Bb) ** 2"
name MergeExpression
xpos -40
ypos 111
}
CurveTool {
ROI {0 0 1024 1024}
autocropdata {256 256 768 768}
intensitydata {{curve x1 0.0001138051146} {curve x1 0.0001138051146} {curve x1 0.0001138051146} -0.0009447585566}
name average_CurveTool
xpos -40
ypos 135
}
NoOp {
name RMSE
xpos -40
ypos 159
addUserKnob {20 User}
addUserKnob {13 RMSE_3dPositionKnob l RMSE}
RMSE_3dPositionKnob {{sqrt(parent.average_CurveTool.intensitydata.r)} {sqrt(parent.average_CurveTool.intensitydata.g)} {sqrt(parent.average_CurveTool.intensitydata.b)}}
}
Output {
name Output
xpos -40
ypos 207
}
push $N4432c000
Viewer {
frame_range 1-24
name Viewer1
xpos -196
ypos 184
}
end_group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment