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

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th December 2020, 12:27   #1  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,435
Luminosity mask for Vapoursynth?

I just came across this luminosity masking technique recently while working on my scans in Photoshop and found it very useful. Variant masks were created for different levels of highlights and shadows, and with these we can easily apply different filters to parts of the frame base on luminosity.

So I'm requesting a plugin like this to anyone that is interested or just share your thought how to make one.
lansing is offline   Reply With Quote
Old 29th December 2020, 13:43   #2  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 194
You'd need to find the formulas used to generate the luminosity masks in Photoshop.
butterw2 is offline   Reply With Quote
Old 29th December 2020, 20:28   #3  |  Link
VoodooFX
Registered User
 
Join Date: Sep 2008
Posts: 187
I think you are talking about adaptive binarization, would be nice to see such algos ported to Synths, here is one paper on it Comparison of Niblack inspired Binarization Methods for Ancient Documents.

Wolf's algo is pretty good, paper claims that Fang and NICK is even better.

Here is paper about improving such algos with preprocess Improvement of Image Binarization Methods Using Image Preprocessing with Local Entropy Filtering

Last edited by VoodooFX; 29th December 2020 at 20:32.
VoodooFX is offline   Reply With Quote
Old 30th December 2020, 07:08   #4  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,435
Quote:
Originally Posted by VoodooFX View Post
I think you are talking about adaptive binarization, would be nice to see such algos ported to Synths, here is one paper on it Comparison of Niblack inspired Binarization Methods for Ancient Documents.

Wolf's algo is pretty good, paper claims that Fang and NICK is even better.

Here is paper about improving such algos with preprocess Improvement of Image Binarization Methods Using Image Preprocessing with Local Entropy Filtering
No, that algorithm was made specifically to filter text from old text books.
lansing is offline   Reply With Quote
Old 30th December 2020, 15:27   #5  |  Link
quietvoid
Registered User
 
Join Date: Jan 2019
Posts: 259
You might have some luck with the mask from https://git.kageru.moe/kageru/adaptivegrain

Info about the algorithm: https://blog.kageru.moe/legacy/adaptivegrain.html
A pure python version is also available in the article.

Last edited by quietvoid; 30th December 2020 at 15:30.
quietvoid is offline   Reply With Quote
Old 31st December 2020, 17:34   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,548
Those photoshop ones work in RGB, but there is an avisynth masks pack that had a lumamask function that could specify Y ranges to isolate black and white points (for the mask) with falloff (so you don't get abrupt binarized transitions) . It would have to be converted to vapoursynth-ese , but it might be a good starting point. I think the legendary didee was the original author, but dogway made some mods
poisondeathray is offline   Reply With Quote
Reply

Tags
luminosity mask

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 06:15.


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