Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
23rd January 2015, 04:06 | #1 | Link |
Registered User
Join Date: Apr 2008
Location: California, USA
Posts: 127
|
need a luminosity changing script / plug-in
I need some way to change all pixels below a threshold value to pure black (or I can work with "above a threshold to pure white") while leaving everything else alone. I prefer to work in RGB, but can work with planar if that is my only solution. This is to clean up a mask image. Any suggestions would be greatly appreciated.
|
23rd January 2015, 04:50 | #2 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
couldn't be easier
let's say u wanna set pixels below 32 to 0 mt_lut ("x 32 < 0 x ?") to convey rgb on yuv colorspace without converting r=showred ("y8") #or yv12 if u run into troubles with some filters g=showgreen ("y8") b=showblue ("y8") interleave (r,g,b) #filters here# mergergb (selectevery (3,0),selectevery (3,1),selectevery (3,2)) |
23rd January 2015, 05:40 | #3 | Link |
Registered User
Join Date: Apr 2008
Location: California, USA
Posts: 127
|
Feisty2. Thank you for the quick response. I pride myself on self-sufficiency, but I can't find supportive documentation and am definitely misunderstanding something. I have Masktools2 for AviSynth 2.5.8 (I must use 2.5.8 due to other legacy filters). For simplicity, let's assume I have a one frame planar file in the variable SOURCE. What would be the actual lines of code to set every pixel with a Y below 32 to pure black?
|
23rd January 2015, 05:43 | #4 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Code:
mt_lut ("x 32 < 0 x ?", y=3, u=-128, v=-128) Last edited by feisty2; 23rd January 2015 at 05:47. |
28th January 2015, 00:27 | #6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
What legacy plugz are the problem ? (I'm not aware of any v2.58 plugz that fail in v2.6)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 28th January 2015 at 00:30. |
Tags |
color, luminosity, mask, threshold |
Thread Tools | Search this Thread |
Display Modes | |
|
|