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. |
|
|
Thread Tools | Search this Thread | Display Modes |
12th January 2019, 06:22 | #1 | Link |
Registered User
Join Date: May 2014
Posts: 51
|
How good/bad is this noise removal of a single image using avisynth?
Pardon me if this is not the appropriate forum for asking things about noise removal of images instead of video clips.
This process uses 1 single avs script only. (1 file, not 1 line ) Please comment on how good or bad this removal looks. It will be greatly appreciate if you could provide some idea or even a complete script for a better result. Requirement: 1. remove most of the dots. 2. keep most of the sharpness of texts. 3. this script already takes 5 minutes to run for 1 image, so speed is not the first priority, quality is. Source: Result: |
12th January 2019, 07:40 | #2 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
This is not noise, this is called screening and there is no avisynth filter that can correctly fix this.
You'll need Sattva Descreen. |
12th January 2019, 11:54 | #3 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
I tuned my avs script a little bit. I think I get half of the area correct. With a bit more time I think I can get the remaining half correct too. Last edited by cagali; 12th January 2019 at 12:47. |
|
13th January 2019, 03:11 | #6 | Link |
Registered User
Join Date: May 2014
Posts: 51
|
x1 original
x4 original The screening pattern on the original scan was probably more regular. However the version I have seems to be scaled down, so the pattern is not that regular. Are there any descreen filters that can still process these kind of images probably? (for video-related topics I think doom9 is the proper place, for these image-related topics is there any similar forum? reddit?) x1 descreen filter in gimp, default parameters x4 denoising with avisynth filters |
13th January 2019, 03:15 | #7 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
It looks good
Instead of default gimp parameters, you can use a mask (e.g. luma mask) with layers to improve the gimp filter, just like you can use a mask in avisynth for the text. Because it's "black" text it's "easier" to isolate |
13th January 2019, 04:52 | #9 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
"Sattva Descreen plug-in for Adobe Photoshop ... You need just provide the plug-in with a hi-resolution scan, usually 600...1200 pixels/inch. " The scans I have are just 300 dpi, 2000px x 3000px. |
|
13th January 2019, 08:38 | #10 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
13th January 2019, 09:35 | #11 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
Then next time I could try to use that PS plugin. As I did not cook and eat outside for the whole week, this time I think I will stick to the gimp descreen plugin, also FFT based. |
|
13th January 2019, 09:41 | #12 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
Maybe it is afterall better to use an image software for image processing? What do you think? I know a little bit avisynth scripting but nothing about gimp scripting. Maybe not that difficult anyway. What I originally planned to do is, do some basic descreening/noise removal in 1 avs, and then in the same script use waifu2x to do some tiny final clean-up. |
|
13th January 2019, 14:34 | #13 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
You can do a D9 search on POSTS(Not Threads) for "Mogrify", for AVS writing/reading images for ImageMagick processing .
(if you can find some descreen stuff for that, there is some IM stuff for creating halftone/screening, also think Martin53 did something to create screening in AVS). [See specifically entries under CallCmd, RT_Call (RT_Stats) threads, for writing, reading and calling ImageMagick Mogrify.exe] Perhaps can access GIMP using similar methods(dont know, never tried it). EDIT: This guy has a lot of ImageMagick scripts, think we used some things from there, dont know if anything of interest. http://www.fmwconcepts.com/imagemagi...inex/index.php EDIT: Heres an interesting one if VideoFred is watching:- http://www.fmwconcepts.com/imagemagi...cast/index.php EDIT: Above linked scripts run under bash on linux, but note below Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th January 2019 at 15:26. |
|
13th January 2019, 17:25 | #14 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
Now I remember that a long time ago I read about noise removal in imagemagick. Building imagemagick from source with fft support... Creating spectrum mask from the phase and magnitude of the image... Fred's scripts collection is really a big one, I think it is enough for me to spend a few nights. |
|
13th January 2019, 18:08 | #15 | Link |
Registered User
Join Date: Apr 2002
Posts: 74
|
Gimp
You can do this with the GIMP. Look at this video on Youtube https://youtu.be/3137dDa6P4s
__________________
Intel Core i5-4250U, 8 GB Ram, Intel HD 5000 |
14th January 2019, 17:16 | #16 | Link |
Registered User
Join Date: Sep 2010
Location: Russia
Posts: 85
|
I used to deal a lot with scans so I can probably make a few suggestions here.
As mentioned earlier this is a moire/screen effect, unlike the film noise it has a couple of fixed frequencies which makes it possible to remove it using those frequency peaks on FFT, instead of going in blindly. If you really want to do it with Avisynth there are filters like DeFreq or Vcmohan's FFTQuiver (not sure if that one exactly, he has loads of various scripts). I only used DeFreq, it's tricky to use since you have to describe the FFT areas for removal in text form. The only upside of doing it in Avisynth is batch-processing of loads of similar scans taken from the same source, because then the FFT discrepancies would be the same and it'll be enough to configure the filter once, then follow up with a denoiser as well. At some point I even tried to write a JS helper for it that would at least allow the user to select the areas with a mouse and generate AVS based on that as well as generating a way to import multiple images that have a slightly different size into a single video stream, but's still not very convenient. It would make a lot more sense to use a specialized image editing software here. Considering that you're probably using a denoiser like Waifu2x without GPU acceleration (since it take 5 mins per image and the AVS ver indeed doesn't have it), you're not going to do batch-processing anyway. Here I can suggest a decent free alternative to photoshop plugins - Image Analyzer, which, among other things, has a special tool for editing the frequency spectrum - the Frequency Domain Filter. I wrote a manual for that tool in application to scan retouching. Keep in mind, though, that it's still a long manual process and even after removing most of the noise noise you'll be left with whatever random noise there was in the image. Still, for best results I would recommend applying FDF before the conventional denoisers, otherwise you'll often be left with lots of moire remaining in the image or you'll have to use extreme noise removal presets and lose the details. As for a followup general denoiser for images I can recommend NeatImage. Though it's not free it has a decent trial functionality and you can always search for the free alternatives of it. |
15th January 2019, 08:40 | #17 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
Actually one can do this in programming ways. For example in imagemagick, generate a spectrum mask with a threshold (so one does not need to draw black spots on the FFT image manually), then multiply it with the magnitude of the image, and then... one gets a filtered, cleaner image. |
|
15th January 2019, 08:53 | #18 | Link | |
Registered User
Join Date: May 2014
Posts: 51
|
Quote:
I am going to try the methods you suggested in an image software, see how clean I can get. If it is much better than what I get using avs, I am going to pick the approach. Otherwise I will stick with the avs way, coz there is a small batch to go, less than a 100 images. Thank you for you suggestions!! |
|
15th January 2019, 13:51 | #19 | Link |
Registered User
Join Date: Mar 2016
Posts: 12
|
Pattern Suppressor
I use this FFT action/plugin for pattern removal:
https://www.retouchpro.com/forum/too...ern-suppressor It is FREE! Last edited by WaxCyl; 15th January 2019 at 13:52. Reason: Added It is FREE! |
15th January 2019, 21:35 | #20 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
|
|
|
|