The following warnings occurred:
Warning [2] Trying to access array offset on null - Line: 14 - File: inc/plugins/cookielaw.php(272) : eval()'d code PHP 8.3.12-nmm1 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/cookielaw.php(272) : eval()'d code 14 errorHandler->error_callback
/inc/plugins/cookielaw.php 272 eval
/inc/class_plugins.php 142 cookielaw_global_intermediate
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Trying to access array offset on null - Line: 14 - File: inc/plugins/cookielaw.php(272) : eval()'d code PHP 8.3.12-nmm1 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/cookielaw.php(272) : eval()'d code 14 errorHandler->error_callback
/inc/plugins/cookielaw.php 272 eval
/inc/class_plugins.php 142 cookielaw_global_intermediate
/global.php 100 pluginSystem->run_hooks
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.3.12-nmm1 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/printthread.php(287) : eval()'d code 2 errorHandler->error_callback
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



Selur's Little Message Board
"Blur" filters in Hybrid - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: "Blur" filters in Hybrid (/thread-3012.html)

Pages: 1 2 3 4


"Blur" filters in Hybrid - Dan64 - 31.12.2022

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


RE: "Blur" filters in Hybrid - Selur - 31.12.2022

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


RE: "Blur" filters in Hybrid - Dan64 - 31.12.2022

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


RE: "Blur" filters in Hybrid - Selur - 31.12.2022

SmoothGrad is already in Hybrid (Vapoursynth->Color->Misc) Smile

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.


RE: "Blur" filters in Hybrid - Dan64 - 31.12.2022

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.


RE: "Blur" filters in Hybrid - Selur - 01.01.2023

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


RE: "Blur" filters in Hybrid - Dan64 - 01.01.2023

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...


RE: "Blur" filters in Hybrid - Selur - 01.01.2023

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


RE: "Blur" filters in Hybrid - Dan64 - 01.01.2023

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...


RE: "Blur" filters in Hybrid - Selur - 01.01.2023

Your source is YUV420P10
try converting to YUV444PS before calling conditional_resize.
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444PS)

Cu Selur