14.06.2024, 23:37
(14.06.2024, 22:18)Selur Wrote: For a specific color mask, use: https://github.com/Beatrice-Raws/VapourSynth-TColorMask instead of BinarizeMask with a threshold.It seems there might be a version compatibility issue causing it to not work, I'm using the R68.
import vapoursynth as vs
import havsfunc as haf
import TColorMask as tcm
core = vs.core
video = core.ffms2.Source(source=r"C:\Users\gzr\Downloads\asd.mkv")
video = core.resize.Bicubic(clip=video, format=vs.YUV420P8, range_s="limited")
white_mask = tcm.TColorMask(video, colorYUV=(235, 128, 128), threshYUV=(10, 50, 50), show=True)
for i in range(5):
white_mask = core.std.Maximum(clip=white_mask)
grain_video = haf.GrainFactory3(clp=video, g1str=20, g2str=20, g3str=20)
sharpened_video = haf.LSFmod(input=grain_video, strength=200, Smode=3, Lmode=1, soft=30, edgemode=1)
result = core.std.MaskedMerge(clipa=video, clipb=sharpened_video, mask=white_mask)
result.set_output()
Python exception: No module named 'TColorMask'
Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3365, in vapoursynth._vpy_evaluate
File "src\\cython\\vapoursynth.pyx", line 3366, in vapoursynth._vpy_evaluate
File "C:\Users\gzr\Desktop\Avisynth stuff\a\2.vpy", line 3, in
ModuleNotFoundError: No module named 'TColorMask'