Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th October 2024, 10:38   #3021  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Quote:
Originally Posted by Selur View Post
I just called FFT3DFilter with the default parameters.
Someone knows how to extract the noise frequencies from an image and selectively remove them?

I think it would be really useful and fast with postproduction digital noise, if simple enough.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 20th October 2024, 23:14   #3022  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,218
There were some FFTW-based plugins like DeFreq (?). But it works about good only if you distortion is narrow bandwidth enough (like colour subcarrier). Natural noise is much more complex mixed with useful data and can not be as simply separated. When you run SMDegrain and it blends different frames blocks - it may be equal to special temporal-convolution frequency filter to pass only narrow frequencies and suppress out of band noise. May be same or close idea is implemented in FFT3D plugin via FFT.
DTL is offline   Reply With Quote
Old 21st October 2024, 10:55   #3023  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Quote:
Originally Posted by DTL View Post
Natural noise is much more complex mixed with useful data and can not be as simply separated.
That is not natural noise.

That anime was 3D rendered and digital noise added later, to simulate film effect. The bandwidth, as far as my eyes can see, is really limited and mostly visible in darker area, even if light ones are mildly affected too.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 21st October 2024, 13:30   #3024  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,218
Typical examples for narrow band distortions are Aerial interference with analog broadcast or some analog interference at ADC board/device to convert analog to digital. If random special noise is added - it most probable have too wide (flat) spectrum and can not be easily filtered out with narrow band-stop filters.
DTL is offline   Reply With Quote
Old 24th October 2024, 16:33   #3025  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Quote:
Originally Posted by kedautinh12 View Post
Choose what you like. For personal, i prefer DPIR +UniScale CartoonRestore-lite + AnimeJanai's result
Would you please address me to where to download them?

Do you know of some model that can keep 1x scale and deblur/antialiasing, to have some anime restoration instead of scaling?
__________________
@turment on Telegram

Last edited by tormento; 24th October 2024 at 17:55.
tormento is offline   Reply With Quote
Old 29th October 2024, 12:23   #3026  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Tried to use Oyster_super.

I have to Crop(128,128,-128,-128) and resize because the image become enlarged and corrupted along the sides and doubles.

Plus, the comment says ## Input: 444 YUV/RGB at any bitdepth (output is float) but it needs to be 32 bits.

Anyone else?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 29th October 2024, 23:14   #3027  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 214
Code:
LWLibavVideoSource("INPUT.mkv")
ConvertBits(32).ConvertToPlanarRGB()
AItrashHere()
takla is offline   Reply With Quote
Old 20th November 2024, 12:28   #3028  |  Link
rgr
Registered User
 
Join Date: Jun 2022
Posts: 113
Has anyone compared Stabilization Tools Pack with Deshaker 3.1?
rgr is offline   Reply With Quote
Old 21st November 2024, 16:05   #3029  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
The call from xClean:

ConvertFormat(cconv, fmt_out="444", kernel_c=chroma, tv_in=!fulls, cplace_in=cplace)

causes

Script error: NNEDI3RESIZE does not have a named argument "src_width"
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 969)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 971)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 972)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 973)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 973)
(D:/Programmi/Media/AviSynth+/plugins64/TransformsPackMain-2.2.1~Dogway.avsi, line 1323)
(D:/Programmi/Media/AviSynth+/plugins64/xClean-beta10~mysteryx93.avsi, line 232)


and I can't sort out the bug in the TransformsPackMain-2.2.1.

Any idea?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 3rd December 2024, 22:59   #3030  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
It happens that anime are getting more and more "clean" in the general appearance but if you zoom in the dark areas you can see lot of "pixel fluctuations", perhaps coming from a poor AVC compression strategy, even from BDs. Sometimes it appears on light areas too but it's more rare.

Wanting to cleanup those lurking pixels without ruining the overall quality what do you suggest me?

I have tried with high tr and thsad numbers but all I obtain is to ruin the details without cleaning up the dark areas.

Someone tried it before?
__________________
@turment on Telegram

Last edited by tormento; 3rd December 2024 at 23:03.
tormento is offline   Reply With Quote
Old 4th December 2024, 00:02   #3031  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Quote:
Originally Posted by tormento View Post
It happens that anime are getting more and more "clean" in the general appearance but if you zoom in the dark areas you can see lot of "pixel fluctuations", perhaps coming from a poor AVC compression strategy, even from BDs. Sometimes it appears on light areas too but it's more rare.

Wanting to cleanup those lurking pixels without ruining the overall quality what do you suggest me?

I have tried with high tr and thsad numbers but all I obtain is to ruin the details without cleaning up the dark areas.

Someone tried it before?

Filter the dark areas with stronger filtering than the brighter areas (or no filtering for the bright)

You can use the LumaMask in the MasksPack
poisondeathray is offline   Reply With Quote
Old 4th December 2024, 00:16   #3032  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Quote:
Originally Posted by poisondeathray View Post
Filter the dark areas with stronger filtering than the brighter areas (or no filtering for the bright)

You can use the LumaMask in the MasksPack

Thank you, nice idea.

And what about “subtle pixel noise” in light areas?

It’s way less noticeable but still there.

The problem is that from film grain noise, digital workflow switches that easily fixable rumor to tiny pixel fluctuations than you can really notice on larger screens.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 4th December 2024, 17:33   #3033  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Quote:
Originally Posted by tormento View Post
Thank you, nice idea.
Not really my idea - people have been doing this for >30 years, pre-avisynth with denoising images. You can find video mask scripts 20 years ago

Quote:
And what about “subtle pixel noise” in light areas?
Use a "subtle pixel noise filter" for the light areas using the mask


Quote:
The problem is that from film grain noise, digital workflow switches that easily fixable rumor to tiny pixel fluctuations than you can really notice on larger screens.
Then it wasn't produced correctly. Digital workflows add grain to blend everything in . e.g. CG added to film
poisondeathray is offline   Reply With Quote
Old 4th December 2024, 17:44   #3034  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Posts: 299
Quote:
Originally Posted by poisondeathray View Post
Then it wasn't produced correctly. Digital workflows add grain to blend everything in . e.g. CG added to film
Ray-tracing renderers can produce "real" grians by itself.
And most noises in digital era is added without good reason.
Z2697 is offline   Reply With Quote
Old 4th December 2024, 17:55   #3035  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,591
Quote:
Originally Posted by Z2697 View Post
Ray-tracing renderers can produce "real" grians by itself.
Yes, or not - it depends on the settings

Often the "grain" does not end up look like real film grain, but digital noise - not enough iterations and convergence during render

Quote:
And most noises in digital era is added without good reason.
Yes, digital acquisition tends to be clean, especially with good lighting. The grain is added in post. "Dark" scenes are often shot brighter, then adjusted to look "dark" in post

But for film, the CG elements have grain emulation to blend into the film as stated above
poisondeathray is offline   Reply With Quote
Old 4th December 2024, 19:32   #3036  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Quote:
Originally Posted by poisondeathray View Post
Then it wasn't produced correctly. Digital workflows add grain to blend everything in . e.g. CG added to film
Some full CGI animes start to have good enough quality to be almost on par with drawn ones, i.e. Girls band cry.

The problem is that people are so used to grain that they artificially added it with no apparent reason.

Thus, denoising that digital "pixel fluctuation" makes faint details from CGI to disappear.

I uploaded a small clip from that anime, if you are curious to look at what I mean.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 3rd January 2025, 11:00   #3037  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,371
@tormento, this is more or less the high freq grain, but I'm not sure you can do something with it.
Code:
a=last
STTWM(sw=0,tw=100,aw=100,sthres=0,tthres=2)
ex_makediff(a, metric="none", aug=128, dif=true, show=3)
This a simple filter (or use ex_FluxSmoothT() instead of STTWM):
Code:
pre=STTWM(sw=0,tw=100,aw=100,sthres=2,tthres=2).ex_sbr()
SMDegrain(2, 200, mode="RMDegrain", prefilter=pre,RefineMotion=true)
It's going to be hard to protect everything, since there are many low contrast lines, but it does the job.


You can also add some masks to protect details...
Code:
dt=ex_edge("kayyali",lo=40)
dtm=dt.ex_expand(2,mode="disk")
em=ex_edge("kroon")
gib=em.ex_expand(2).ex_inflate()


ConvertBits(16)
pre=ex_FluxSmoothST().ex_minblur(1)
msk=ex_logic(dtm,em,"max").ConvertBits(16)
pre=ex_merge(pre,last,msk)
SMDegrain(2, 200, mode="RMDegrain", prefilter=pre,RefineMotion=true)
ConvertBits(8,dither=1)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 3rd January 2025, 12:05   #3038  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,371
Quote:
Originally Posted by LouieChuckyMerry View Post
I'm trying to put Deblock_QED to use in the DeblockPack.avsi and seem to actually have it functioning correctly, but wanted to make sure before I spend time testing it. My script is

Code:
Deblock_QED()
ConvertBits(Bits=16)
TemporalDegrain2()
CAS()
Neo_F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0)
I found that putting the Deblock_QED call after converting to 16bits made for LSD flashback-style output; does this mean that it only accepts 8bit input?

Also, while gathering the needed dependencies for Deblock_QED in the DeblockPack.avsi, I encountered the plugin BlockDetect and wondered what it does. Well, I can read what it does, but don't understand why it would be used. Thanks.
I tested and Deblock_QED works fine in HBD.
The Deblock dependency has nothing to do with BlockDetect, its Deblock, here's the avisynth entry page. It's basically a deblock filter, Deblock_QED limits the deblocking to the block edges.

Maybe the issue is on the other filters?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 3rd January 2025, 15:02   #3039  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,842
Quote:
Originally Posted by Dogway View Post
@tormento, this is more or less the high freq grain, but I'm not sure you can do something with it.
Thank you and welcome back!

Please notice a fix for your scripts here.

P.S: MysteryX told me that he is not using Windows anymore and is not interested in further development. What about merging its source with ExTools or so?

P.P.S: Would be possible to have motion compensated BM3D_CUDA and KnlMeansCL?
__________________
@turment on Telegram

Last edited by tormento; 4th January 2025 at 11:26.
tormento is offline   Reply With Quote
Old 6th January 2025, 18:20   #3040  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 721
Quote:
Originally Posted by tormento View Post
Thank you and welcome back!

Please notice a fix for your scripts here.

P.S: MysteryX told me that he is not using Windows anymore and is not interested in further development. What about merging its source with ExTools or so?

P.P.S: Would be possible to have motion compensated BM3D_CUDA and KnlMeansCL?
I am maybe wrong but does not knlmeanscl use some kind of motion compensation already? Try it with 'd=12' and see how it acts. BM3D is already using block matching.
anton_foy is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.