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 4th June 2018, 15:14   #1  |  Link
lansing
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?
lansing is offline   Reply With Quote
Old 5th June 2018, 01:12   #2  |  Link
WolframRhodium
Registered User
 
Join Date: Jan 2016
Posts: 162
I suppose fft-screen might be a lightweight start point?
WolframRhodium is offline   Reply With Quote
Old 5th June 2018, 13:59   #3  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by WolframRhodium View Post
I suppose fft-screen might be a lightweight start point?
I tried it, it doesn't work with python 3.6, I got an error

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.
update: I got it work changing "/" to "//" in line 34 and 35, following the solution in the issue page.

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
lansing is offline   Reply With Quote
Old 5th June 2018, 21:10   #4  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
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.
foxyshadis is offline   Reply With Quote
Reply

Tags
descreening

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 20:49.


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