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. |
4th June 2018, 15:14 | #1 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Any descreening filter for vapoursynth?
Screening are those pattern when you scan an image that was printed by an inkjet printer. There wasn't many talk about how to remove it in this forum, the only one that I can find is this one from 8 years ago.
The general concept of removing them I've found is to use a fft transform. In the fft image, all the screening patterns will appear as little diamonds across the image, then all you have to do is to cover the center of those little diamond with black. Then there're the better approach where you have to scan the same image at different angles, in which I have no idea how it works. In photoshop there is this top of the line plugin Sattva Descreen that can do this. It was able to separate screen removal and moiré pattern reduction into two parts. So I was wondering does anyone who is familiar with this stuff knows how they do that? Or maybe implement it for vapoursynth? |
5th June 2018, 01:12 | #2 | Link |
Registered User
Join Date: Jan 2016
Posts: 162
|
I suppose fft-screen might be a lightweight start point?
|
5th June 2018, 13:59 | #3 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
Code:
python descreen.py example.png example_result.png Traceback (most recent call last): File "descreen.py", line 36, in <module> middle = np.pad(ellipse(ew, eh), ((ph,rows-ph-eh*2-1), (pw,cols-pw-ew*2-1)), 'constant') File "C:\Users\myname\AppData\Local\Programs\Python\Python36\lib\site-packages\ numpy\lib\arraypad.py", line 1298, in pad raise TypeError('`pad_width` must be of integral type.') TypeError: `pad_width` must be of integral type. Though the results weren't good, I used the sample images from Sattva Descreen's website This is black and white descreen: original: fft_descreen: sattva descreen: Color image descreen original: fft_descreen: sattva descreen: Last edited by lansing; 5th June 2018 at 15:07. Reason: update |
|
5th June 2018, 21:10 | #4 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
Not an inkjet, but an offset press.
I spent far too much time trying to make AviSynth descreen well, and I started out with exactly what you mentioned: Manually picking out peaks in DeFreq, which is incredibly time consuming but gives excellent results. I made some decent progress into something automatic, and I'll dig out my old computer tonight and try to find those scripts, and translate them to VS. The Sattva results are odd; even in their test photos, they seem to unnaturally brighten the image. Clarity-wise, it definitely gives the best definition for the resolution I've seen. |
Tags |
descreening |
Thread Tools | Search this Thread |
Display Modes | |
|
|