This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] about grain
#5
(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()
Failed to evaluate the script:
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'
Reply


Messages In This Thread
about grain - by litamonz - 14.06.2024, 18:48
RE: about grain - by Selur - 14.06.2024, 20:34
RE: about grain - by litamonz - 14.06.2024, 22:13
RE: about grain - by Selur - 14.06.2024, 22:18
RE: about grain - by litamonz - 14.06.2024, 23:37
RE: about grain - by Selur - 14.06.2024, 23:41
RE: about grain - by litamonz - 15.06.2024, 00:32

Forum Jump:


Users browsing this thread: 1 Guest(s)