I'm working on a cartoon source (already did the IVTC previously). In my restoration, I am using the binarize mask to protect my dark/black pixels while I only denoise my light pixels. However, I need to protect my edges, so I incorporated a sharpening filter into the mt_binarize mask to accomplish this(as you can see). However, I feel that it may not be enough to protect fine details. I figured it would be a good idea to add mt_edge into my script, which I did. Now when I did this, I then ONLY got the edgemask output and not the binarize output. Is it possible to combine both masks so that I can get both, my binarize and edge mask outputs in my clip? Here is a sample of what my script currently looks like. Please advise and thank you all for your time.
[avisource(blah.avi)
a=last
b=mctemporaldenoise(settings="high")
mask=mt_binarize(threshold=67, lsfmod(). lsfmod())
Overlay(a,b, mask=mask)]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
Last edited by Betelman; 26th Jan 2020 at 00:57.
-
Use Overlay() to combine masks. Assuming hard masks (all values either 0 or 255)
Overlay(mask1, mask2, mode="Multiply") # logical AND
Overlay(mask1, mask2, mode="Add") # logical OR -
I received the following error message: Invalid arguments to function "Overlay".
Here's my updated script, based on your suggestion:
AVISource("blah.avi")
a=last
b=McTemporalDenoise(settings="high")
mask1 = mt_binarize(threshold=66, toonlite(). toonlite(). LSFmod())
mask2=mt_edge("prewitt")
Overlay(a,b,mask1, mask2, mode="add") -
Create a combined mask with Overlay(), then use that combined mask to overlay your filtered video over the unfiltered video.
-
I don't mean to be a bother, but I'm a bit confused. Can you please re-arrange my script and post so that I can see what you mean?
-
I'm not sure exactly what you're trying to accomplish with the two masks (protect edges and dark areas? protect only edges in dark areas? filter bright areas and dark edges?) but here's how you combine them and then apply them:
AVISource("blah.avi")
a=last
b=McTemporalDenoise(settings="high")
mask1 = mt_binarize(threshold=66, toonlite(). toonlite(). LSFmod())
mask2=mt_edge("prewitt")
combined_mask = Overlay(mask1, mask2, mode="add")
Overlay(a,b,mask=combined_mask) -
I'm trying to protect edges, AND dark areas. Filter everything else mercilessly
Last edited by Betelman; 26th Jan 2020 at 10:56.
-
Similar Threads
-
using masks to target specific colors
By Betelman in forum RestorationReplies: 55Last Post: 29th May 2020, 23:23 -
2 srt files to combine - how?
By jlrm365 in forum SubtitleReplies: 7Last Post: 17th Apr 2016, 08:15 -
Question: Combine Titles
By Erehwon in forum DVD RippingReplies: 2Last Post: 30th Jul 2015, 20:00 -
Combine BDMV's
By themelz in forum Authoring (Blu-ray)Replies: 7Last Post: 17th Apr 2015, 13:49