설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LensKernelFFT_v01.gizmo 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. set cut_paste_input [stack 0]
  2. version 5.2100
  3. push $cut_paste_input
  4. Group {
  5. name LensKernelFFT
  6. tile_color 0xff7f28ff
  7. selected true
  8. xpos 228
  9. ypos 20
  10. addUserKnob {20 User}
  11. addUserKnob {4 output M {"convolution result" "input kernel" "" ""}}
  12. addUserKnob {4 c l channels M {RGB RGBA ""}}
  13. addUserKnob {4 kernel M {"35mm f1.4" "35mm f2.8" "35mm f5.6"}}
  14. addUserKnob {3 pad l "pad frame" t "If bright areas of the convolved image 'wrap around' to the other side of the image, padding the frame will alleviate this problem. Also, if the bounding extends beyond the image, setting this to a larger size than 0 will allow you to reserve it. value is in pixels.\n"}
  15. addUserKnob {7 mix}
  16. mix 1
  17. addUserKnob {20 Kernels}
  18. addUserKnob {41 kernel14 l "35mm f1.4 kernel" T Read1.file}
  19. addUserKnob {41 kernel28 l "35mm f2.8 kernel" T Read2.file}
  20. addUserKnob {41 kernel56 l "35mm f5.6 kernel" T Read3.file}
  21. }
  22. Read {
  23. inputs 0
  24. format "3908 2602 0 0 3908 2602 1 "
  25. name Read3
  26. xpos -250
  27. ypos -19
  28. }
  29. Read {
  30. inputs 0
  31. format "3908 2602 0 0 3908 2602 1 "
  32. name Read2
  33. xpos -382
  34. ypos -16
  35. }
  36. Read {
  37. inputs 0
  38. format "3908 2602 0 0 3908 2602 1 "
  39. name Read1
  40. xpos -508
  41. ypos -21
  42. }
  43. Switch {
  44. inputs 3
  45. which {{parent.kernel i}}
  46. name Switch1
  47. xpos -382
  48. ypos 91
  49. }
  50. Transform {
  51. translate {1 0}
  52. center {1954 1301}
  53. filter Impulse
  54. name Transform
  55. label recenter
  56. xpos -382
  57. ypos 122
  58. }
  59. Dot {
  60. name Dot1
  61. xpos -348
  62. ypos 170
  63. }
  64. set N1e1bc350 [stack 0]
  65. Dot {
  66. name Dot2
  67. xpos -238
  68. ypos 170
  69. }
  70. Saturation {
  71. saturation 0
  72. name Saturation
  73. label luminance
  74. xpos -272
  75. ypos 224
  76. }
  77. push $N1e1bc350
  78. Copy {
  79. inputs 2
  80. from0 rgba.red
  81. to0 rgba.alpha
  82. name Copy
  83. label luminance->alpha
  84. xpos -382
  85. ypos 218
  86. }
  87. Dot {
  88. name Dot10
  89. xpos -348
  90. ypos 272
  91. }
  92. set N1e17d950 [stack 0]
  93. Dot {
  94. name Dot9
  95. xpos -458
  96. ypos 272
  97. }
  98. Dot {
  99. name Dot11
  100. xpos -458
  101. ypos 745
  102. }
  103. Input {
  104. inputs 0
  105. name Input1
  106. xpos 0
  107. ypos -11
  108. }
  109. NoOp {
  110. name ImgIn
  111. xpos 0
  112. ypos 35
  113. }
  114. Dot {
  115. name Dot12
  116. xpos 34
  117. ypos 59
  118. }
  119. set N4d873c50 [stack 0]
  120. Reformat {
  121. type "to box"
  122. box_width {{"width + (2* parent.pad)" i}}
  123. box_height {{"height + (2* parent.pad)" i}}
  124. resize none
  125. filter Impulse
  126. name Reformat_PadFrame
  127. xpos 0
  128. ypos 349
  129. }
  130. FFT {
  131. channels rgba
  132. name FFT2
  133. xpos 0
  134. ypos 384
  135. }
  136. Dot {
  137. name Dot3
  138. selected true
  139. xpos 34
  140. ypos 451
  141. }
  142. push $N1e17d950
  143. Reformat {
  144. type "to box"
  145. box_width {{LensKernelFFT.Reformat_PadFrame.box_width.main i}}
  146. box_height {{LensKernelFFT.Reformat_PadFrame.box_height.main i}}
  147. resize none
  148. filter Impulse
  149. name ReformatKernel
  150. xpos -382
  151. ypos 350
  152. }
  153. FFT {
  154. channels rgba
  155. normalize_input true
  156. center_kernel true
  157. name FFT1
  158. xpos -382
  159. ypos 395
  160. }
  161. FFTMultiply {
  162. inputs 2
  163. name FFTMultiply1
  164. xpos -382
  165. ypos 442
  166. }
  167. InvFFT {
  168. name InvFFT1
  169. xpos -382
  170. ypos 478
  171. }
  172. Dot {
  173. name Dot4
  174. xpos -348
  175. ypos 548
  176. }
  177. Dot {
  178. name Dot6
  179. xpos -138
  180. ypos 548
  181. }
  182. set N270715f0 [stack 0]
  183. Dot {
  184. name Dot7
  185. xpos 15
  186. ypos 548
  187. }
  188. push $N4d873c50
  189. Dot {
  190. name Dot13
  191. xpos 170
  192. ypos 59
  193. }
  194. Dot {
  195. name Dot15
  196. xpos 170
  197. ypos 415
  198. }
  199. set N5774c4b0 [stack 0]
  200. Dot {
  201. name Dot5
  202. xpos 34
  203. ypos 501
  204. }
  205. set N39ac93a0 [stack 0]
  206. Copy {
  207. inputs 2
  208. channels rgba
  209. name Copy3
  210. xpos 0
  211. ypos 578
  212. }
  213. push $N270715f0
  214. push $N39ac93a0
  215. Dot {
  216. name Dot8
  217. xpos -68
  218. ypos 501
  219. }
  220. Copy {
  221. inputs 2
  222. channels rgb
  223. name Copy2
  224. xpos -102
  225. ypos 581
  226. }
  227. Switch {
  228. inputs 2
  229. which {{parent.c i}}
  230. name Switch2
  231. xpos 0
  232. ypos 668
  233. }
  234. Reformat {
  235. type "to box"
  236. box_width {{ImgIn.width i}}
  237. box_height {{ImgIn.height i}}
  238. resize none
  239. filter Impulse
  240. name ReformatOutput
  241. xpos 0
  242. ypos 692
  243. }
  244. Switch {
  245. inputs 2
  246. which {{parent.output i}}
  247. name Switch3
  248. xpos 0
  249. ypos 742
  250. }
  251. push $N5774c4b0
  252. Dot {
  253. name Dot14
  254. xpos 170
  255. ypos 804
  256. }
  257. set N4d873950 [stack 0]
  258. Dissolve {
  259. inputs 2
  260. channels rgba
  261. which {{parent.mix i}}
  262. name Dissolve1
  263. xpos 0
  264. ypos 801
  265. }
  266. set N4d87f820 [stack 0]
  267. Output {
  268. name Output1
  269. xpos 0
  270. ypos 871
  271. }
  272. push $N4d87f820
  273. push $N4d873950
  274. Viewer {
  275. inputs 2
  276. input_number 1
  277. name Viewer1
  278. xpos -449
  279. ypos 621
  280. }
  281. end_group