View Single Post
Old 26th July 2021, 15:40   #81  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I think I cocked up the initial post, and removed a ",8" after the matrix string, maybe you took a copy before I fixed it.

Anyways, here a comparison, top is result - Original [should be mid grey-ish],
bottom is same but differences amplified GREATLY, maximum amp'ed.
You can see that the light lines have been modified, and are darker, meaning darker than original, as intended.
It does produce global frame changes, as does most denoise type processing.

Code:
Avisource("SH_2_secs.avi.avi")  # Did not have codec for FOURCC, redid in ffmpeg to UT_Video so AVI.AVI
ConvertToYV24
O=Last
GeneralConvolution(0, "
1 0 1
2 4 2
1 0 1
")
D1=ClipDelta(Last,O,false)
D2=ClipDelta(Last,O,true)
StackVertical(D1,D2)  # Top Subtract, bottom amplified
Return last

# Return Clip Difference of input clips (amp==true = Amplified, show==true = show background)
Function ClipDelta(clip clip1,clip clip2,bool "amp",bool "show") {
    amp=Default(amp,false)
    show=Default(show,false)
    c2=clip1.levels(128-32,1.0,128+32,128-32,128+32).greyscale()
    c1=clip1.subtract(clip2)
    c1=(amp)?c1.levels(127,1.0,129,0,255):c1
    return (show)?c1.Merge(c2):c1
}
Click Me


Pretty much all avisynth scripts, can of course by loaded into Megui main screen top input Avisynth Script editbox.
[or just view in eg VDub2]
__________________
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; 27th July 2021 at 12:49.
StainlessS is offline   Reply With Quote