How do you remove the color banding (Moire pattern?) from the video clip?
This clip is from an upscaled video from the original video which also has this color banding/Moire pattern.
LR_Moire_pattern.avi
+ Reply to Thread
Results 1 to 26 of 26
-
-
What an ugly job using ai for upscaling.
The issues of the source should be dealt with !before! using ai for upscaling.
That said, filters like Small_Deflicker and ReduceFilter and SMDegrain might help. (probably have to be applied multiple times)
Cu Selur
Ps.: Attached some examples, just to show the general effect,..Last edited by Selur; 29th Apr 2023 at 08:09.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Point taken, thank you. And thanks for the samples.
But what would be the best script to use to remove (or at least minimize) color banding?
Thanks. -
Depends on what it looked like before upscaling
Filters dealing with specific problems generally work better at the original scale. Probably some type of chroma denoising, derainbow filters -
I agree.
In the source rainbow denoising smoothing, heavy chroma denoising might help.
In your sample, that wouldn't be enough. Look at the attachment, I there visualized the Y U V channels of your clip, as you can see the wave like interference is in each channel, so just choma filtering will not be enough.
So some sort of deflickering/defreq will be needed.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Here is the original video before upscaling and before any processing.
LR_original_video.avi
See what you make of this, if you have time.Last edited by meeshu; 30th Apr 2023 at 08:00.
-
This happens if I just apply some heavy temporal chroma denoising (ct = 80) using HQDN3D.
There are probably tons of other filters that could be used, but that is the first one I tried.
The main point is, that typical ai filters won't know whether the color flickering is meant to be there or not, so they might do funny things with it.
Cu Selur
Ps.: also attached a version where I additionally applied codeformer.Last edited by Selur; 29th Apr 2023 at 10:49.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Technically this is not color banding neither Moire Pattern - just to point this for someone trying to search information how to deal with color banding and/or Moire Pattern in future.
-
I did this:
Code:LWLibavVideoSource("LR_original_video.avi", cache=false, prefer_hw=2) ConvertToYV12() # apply a very strong temporal noise reduction filter (and some sharpening) to only the chroma MergeChroma(SMDegrain(tr=6, thsad=5000, plane=3, prefilter=3).aWarpSharp2(depth=10))
Last edited by jagabo; 29th Apr 2023 at 21:10.
-
Thanks for the sample script.
I didn't have the function "LWLibavVideoSource" at first, but managed to locate it and installed the associated dll file (LSMASHSource.dll) within AviSynth+ plugins64+ sub-directory.
I tried running this script via VirtualDub2 on the entire video clip (73 GB!), but VirtualDub2 seemed to hang with the message that VirtualDub was not responding. I waited for several minutes for something to happen, but nothing appeared to be happening so I quit VirtualDub.
Is this usual for VirtualDub to take awhile processing a large video clip when running this script? -
Is this usual for VirtualDub to take awhile processing a large video clip when running this script?
LWLibavVideoSource will create an index of the file inside the system RAM which might take some time depending on the system.
(maybe better use AviSource)
@jagabo: (I get why aWarpSharp2 is encapsulated in a MergeChroma, but) why MergeChroma and plane=3, shouldn't plane=3 already limit the filtering to the chroma planes?
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Last edited by jagabo; 30th Apr 2023 at 02:52. Reason: clarity
-
@meeshu: Side note: If you set cs=0 and lt=0 in hqdn3d, it will also only filter the chroma planes, see: http://avisynth.nl/index.php/Hqdn3d
@jagabo: Ah, okay, thought I missed something.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Comments noted, thanks.
Using this script -
Code:LWLibavVideoSource("LR_original_video.avi", cache=false, prefer_hw=2) ConvertToYV12() # apply a very strong temporal noise reduction filter (and some sharpening) to only the chroma MergeChroma(SMDegrain(tr=6, thsad=5000, plane=3, prefilter=3).aWarpSharp2(depth=10))
Next I tried this script on the smaller test video clip (LR_original_video.avi) from the original video. My resulting clip seems (to me) not to be as good as the resulting clip in post #12!?
LR_original_video_processed.avi
Comments? -
Aside from brightness differences which might be caused by different VUI infos, they look the same to me: https://imgsli.com/MTc0Nzc5
users currently on my ignore list: deadrats, Stears555, marcorocchini -
-
-
Here's an example script.
Code:SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) # loading source: G:\clips\chroma banding\LR_original_video.avi # color sampling RGB24@8, matrix: bt601, scantyp: progressive, luminance scale: limited AviSource("G:\clips\chroma banding\LR_original_video.avi") # adjust the path # current resolution: 640x480 # filtering ConvertToYV12(interlaced=false, matrix="Rec601") hqdn3d(ls=0.00,cs=3.00,lt=0.00,ct=80.00) # adjust the settings to yout liking # setting output fps to 29.970fps AssumeFPS(30000,1001) PreFetch(16) # adjust to the number of logical CPU cores your CPU has # output: color sampling YV12@8, matrix: bt601, scantyp: progressive, luminance scale: limited return last
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Thanks for the detailed sample script!
Currently running this script on the full original video clip. -
I hope you tweaked the parameters a bit,...
users currently on my ignore list: deadrats, Stears555, marcorocchini -
jesus christ he looks like issac kleiner. Selur is right, this is one very ugly upscaling job. Also don't upscale before cleaning the video. Also that's analogue tape flickering, in no way connected to banding and moire. I expected to see something along the lines of rainbowing in the sample
-
-
Probably best approach will be or FFT filter but frequency of those bars is very close to DC (so it will be very difficult to find them in GUI mode - should be possible to set them in manual mode), alternatively if filter similar to GIMP 'wavelet decompose/compose' exist then on low freq (residual or one higher - depends on decomposition level) wavelet plane even average on frame can be used - it should remove those bars easily without affecting other parts...
In past there was fftquiver but now seem after FQPlus there is new ManyPlus filter .
This kind of distortions probably is best to dealt in frequency domain.
Similar Threads
-
Handling moire?
By Selur in forum Newbie / General discussionsReplies: 4Last Post: 26th Feb 2022, 11:10 -
Color moire/flickering in PAL footage
By voyagerhelp in forum Video ConversionReplies: 5Last Post: 9th Jan 2021, 23:17 -
Removing color artifacts without using greyscale
By bruno321 in forum RestorationReplies: 12Last Post: 27th Oct 2020, 09:14 -
Reducing Moiré Effect
By ZetaStax in forum RestorationReplies: 8Last Post: 18th Feb 2020, 10:19 -
Banding on VHS transfer
By intolerantreads in forum Capturing and VCRReplies: 10Last Post: 13th Oct 2019, 10:38