Posts: 750
Threads: 72
Joined: Feb 2020
Hello Selur,
I noted that for "Avisynth" there is a full page of "Blur" filters, while in "Vapoursynth" this page is missing, and in effect it seems that there is any "Blur" filter in Hybrid for "Vapoursynth".
Since in some cases it could be useful having this kind of filter, could you add someone also in "Vapoursynth" ?
Thanks,
Dan
Posts: 10.617
Threads: 57
Joined: May 2017
31.12.2022, 11:36
(This post was last modified: 31.12.2022, 12:39 by Selur.)
https://vsdb.top/ lists a few (Blur,BoxBlur, MinBlur, sbr, TemporalSoften, TemporalSoften2,...), but since I don't really use blur (I normally use masked denoising), I don't really know which filters would be interesting or whether there aren't better implementations out there.
Got any recommendations? (where the code preferably works on Windows, Linux and MacOS)
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 750
Threads: 72
Joined: Feb 2020
Hello Selur,
I'm using realesr-general to resize old movies (good as winter task because the GPU get very hot). This is a very good and fast resizer, but the final images are too sharp and too clean. This effect is good for anime movies, but for films the effect is too strong. I'd like to mitigate the effect by blur a little the image and add some grain.
Regarding the "blur" filters, the following ones could be added:
"Blur" - Just the basic "Blur"
"conditional_resize" - Good to fix oversharpened upscales
"MinBlur" - Gauss/Median filter
"TMinBlur" - MinBlur with Thresholded
"SmoothGrad" - smooths the low gradients or flat areas
I think that for my problem "conditional_resize" could be the right one.
Thanks,
Dan
Posts: 10.617
Threads: 57
Joined: May 2017
31.12.2022, 12:51
(This post was last modified: 31.12.2022, 12:55 by Selur.)
SmoothGrad is already in Hybrid (Vapoursynth->Color->Misc)
You can try the others by adding them in a custom section to test whether they really do what you want.
If I find some time next weekend, I'll look at adding some of them.
Cu Selur
Ps.: Instead of blurring, adding some grain might also help with the over sharpening impression.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 750
Threads: 72
Joined: Feb 2020
Hello Selur,
unfortunately SmoothGrad is not useful in my case.
I'd like test "
conditional_resize" which is included in "
kagefunc" package.
To use it I should copy in Hybrid\64bit\vsscripts
kagefunc.py
framematch.py
Most of the dependencies are already available in Hybrid
- vapoursynth-plugin-adaptivegrain-git -> Hybrid\64bit\vsfilters\GrainFilter\AdaptiveGrain
vapoursynth-plugin-addgrain-git -> Hybrid\64bit\vsfilters\GrainFilter\AddGrain
vapoursynth-plugin-bm3d-git -> Hybrid\64bit\vsfilters\DenoiseFilter\BM3D
vapoursynth-plugin-descale-git -> descale.py -> Hybrid\64bit\vsfilters\Support
vapoursynth-plugin-fmtconv-git -> Hybrid\64bit\vsfilters\Support
vapoursynth-plugin-fvsfunc-git -> Hybrid\64bit\vsfilters\Support
vapoursynth-plugin-knlmeanscl-git -> Hybrid\64bit\vsfilters\DenoiseFilter\KNLMeansCL
vapoursynth-plugin-mvsfunc-git -> Hybrid\64bit\vsfilters\Support
vapoursynth-plugin-retinex-git -> Hybrid\64bit\vsfilters\ColorFilter\Retinex
vapoursynth-plugin-tcanny-git -> Hybrid\64bit\vsfilters\Support
vapoursynth-plugin-vsutil-git -> Hybrid\64bit\vsfilters\Support
vapoursynth-plugin-wwxd-git -> libwwxd64.dll
I have some doubt on the following dependencies
descale.py -> copy in Hybrid\64bit\vsscripts ?
libwwxd64.dll -> where I have to copy it ?
could help me on these issues ?
Thanks,
Dan
I was unable to get this filter working, it seems that some of dlls already installed in Hybrid are not compatible with this function.
I will wait for your implementation.
Posts: 10.617
Threads: 57
Joined: May 2017
Quote: I have some doubt on the following dependencies
descale.py -> copy in Hybrid\64bit\vsscripts ?
libwwxd64.dll -> where I have to copy it ?
could help me on these issues ?
for the descale.py I guess, you could have to copy it to vsscripty and import it explicitly.
Location of dlls doesn't matter since you always have to load them explicitly.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 750
Threads: 72
Joined: Feb 2020
Hello Selur,
I copied the following files in Hybrid\64bit\vsscripts
kagefunc.py
framematch.py
descale.py
and libwwxd64.dll in Hybrid/64bit/vsfilters/Support
theoretically all the remaining dependencies are already available in Hybrid.
Then I wrote the attached script, but is issued an error regarding TCanny.dll, if I comment this dll there is an error on another dll and son on.
I was unable to get the script working...
Posts: 10.617
Threads: 57
Joined: May 2017
01.01.2023, 18:19
(This post was last modified: 01.01.2023, 18:28 by Selur.)
Your script calls:
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/vsfilters/Support/TCanny.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/vsfilters/Support/libdescale.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/vsfilters/Support/fmtconv.dll")
'vsfilters/vsfilters' is wrong.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 750
Threads: 72
Joined: Feb 2020
Hello Selur,
I decided to put all the dependencies in one folder and I was able to go forward a little bit.
I used the attached script. Now I get the following error:
File "E:\VideoTest\Upscale\Test_conditional_resize\Test_conditional_resize2.vpy", line 32, in
clip = kfg.conditional_resize(clip, width=1280, height=688, thr=0.00015)
File "D:\Programs\Hybrid\64bit\vsscripts\kagefunc.py", line 174, in conditional_resize
diff_default = core.std.PlaneStats(rescaled, src_luma)
File "src\cython\vapoursynth.pyx", line 2612, in vapoursynth.Function.__call__
vapoursynth.Error: PlaneStats: both input clips must have the same format when second clip is used, passed Gray16[1280x688] and Gray10[1280x688]
I don't know how to fix this issue...
Posts: 10.617
Threads: 57
Joined: May 2017
01.01.2023, 18:38
(This post was last modified: 01.01.2023, 18:39 by Selur.)
Your source is YUV420P10
try converting to YUV444PS before calling conditional_resize.
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444PS)
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.