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 > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st July 2017, 02:09   #1  |  Link
ingoldie
Registered User
 
Join Date: Sep 2014
Posts: 127
AviSynth equivalent of the Super-Resolution technique in Adobe Photoshop?

Is there any AviSynth equivalent of the Super-Resolution technique in Adobe Photoshop shown in the video below?

https://www.youtube.com/watch?v=o7POpid-e8U

http://photoncollective.com/enhance-...dobe-photoshop
ingoldie is offline   Reply With Quote
Old 1st July 2017, 02:27   #2  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,173
The trick of this method is that he's using 20 images to produce one. For video, how are you going to have 20 versions of the video?

It also gives a mess with motions so that's not good for videos.
MysteryX is offline   Reply With Quote
Old 1st July 2017, 02:30   #3  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,983
The minimum requirement to even begin is alignment.

Image stacking + alignment usually isn't possible in avisynth alone for general use cases , but you can use other programs to do the alignment then do some operations in avisynth if you wanted to

For video, the alignment is usually done with motion tracking (again , not an avisynth - friendly operation) . But video has a host of other potential issues than photography for temporal SR - motion blur, compression artifacts, lens distortions , rolling shutter, moving targets, moving camera, angles of shots, long GOP compression (adjacent p,b frames are usually worse in quality, compared to photography which is analgous to all I frame), and you actually pollute the SNR unless you are very selective with frames. But it does work in very very selective cases for video .

This is all discussed in other threads
poisondeathray is offline   Reply With Quote
Old 1st July 2017, 02:42   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,983
Quote:
Originally Posted by MysteryX View Post
The trick of this method is that he's using 20 images to produce one. For video, how are you going to have 20 versions of the video?
In selected video cases you use n +/- x frames (ie. adjacent frames) . They have overlapping data


Quote:
It also gives a mess with motions so that's not good for videos.
motion tracking data takes away the motion , the camera motion +/- object motion. So everything is static and aligned . Essentially you have multiple frames that are aligned like the photo example in a stack, then you can do operations like median / mean etc...

It's done per frame (poster frame) , using +/- "x" adjacent frames , and it works only in very very selective examples . 99.999999999999999999999999999999999% of general use cases won't work
poisondeathray is offline   Reply With Quote
Old 1st July 2017, 04:10   #5  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
You would need to use mvtools where you can replace normal frames with motion compensated frames from previous to current frame, and use this as a clip. You could create a second motion compensated clip using forward vectors. You can then use rgtools repair, mode=12 for example, and 'repair' the original clip using the back vectors created compensated frame and create a second clip with repaired original frame against the forward vector motion compensated frame. You then do a last repair of the original clip using the second clip. For using mvtools, you use pixel method not block method, which can result in nasty artifacts. You could resolve those in the original source compensated clips with the occlusion mask from framerateconverter.

It might be quite slow though, and repair of rgtools hasn't got AVX2 etc yet (it's fast anyway, but potential improvement is there). Maybe only the back compensated frame would be useful. If this is the case you make the compensated frame, occlusion mask it, repair the original frame with it using mode 12 or whatever best suits.

You could always make both the forward and back frames, occlusion mask them, average them, merge them with the original frame, and then repair the merged frame using the averaged frame and the original frame from this.

Last edited by burfadel; 1st July 2017 at 04:13.
burfadel is offline   Reply With Quote
Old 1st July 2017, 04:12   #6  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,200
You've asked this same question before. The last time you asked it:

Can someone please isolate Super Resolution part?

Since absolutely nothing has changed since then, I'll provide a link to the answer I gave to you in that thread:

nothing new has been invented in the past several months, AFIK.
johnmeyer is offline   Reply With Quote
Old 1st July 2017, 06:04   #7  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,136
implement SRGAN urself if u wanna "real" super resolution
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 1st July 2017, 21:00   #8  |  Link
ingoldie
Registered User
 
Join Date: Sep 2014
Posts: 127
Quote:
Originally Posted by johnmeyer View Post
You've asked this same question before. The last time you asked it:

Can someone please isolate Super Resolution part?
Yes, this question is about Super-Resolution but it doesn't mean this is the same question.
ingoldie is offline   Reply With Quote
Old 2nd July 2017, 14:09   #9  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Gent, Flanders, Belgium, Europe, Earth, Milky Way,Universe
Posts: 663
Ah... Super Resolution.....

It all begins with a good quality source file.

My source files are 1392x1032.

Then, I reduce them (yes, reduce) to 1024x768.
Why? Because a heavy script with removedirt(), Gammac(), stabilizing and degraining etc runs like a train (18fps) when the size from the source file is limited to W=1024 pixels.

Then, I upscale to full HD and do some sharpening on the full HD file.

I know, I know. It's against all rules
But it works and the results are very acceptable.

Source file: 1972 fuji single-8 film. Unsharp frame to test sharpening.


Full HD result: stabilized-cropped-sharpened etc...(reduced to show here)
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest

Last edited by videoFred; 2nd July 2017 at 14:11.
videoFred is offline   Reply With Quote
Old 2nd July 2017, 18:11   #10  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,200
As always, I am in awe of your work. Another fabulous result!
johnmeyer is offline   Reply With Quote
Old 3rd July 2017, 00:11   #11  |  Link
ingoldie
Registered User
 
Join Date: Sep 2014
Posts: 127
Yes, really fabulous!

@videoFred

Can you post your source file and AviSynth script?
ingoldie is offline   Reply With Quote
Old 3rd July 2017, 00:22   #12  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,200
Quote:
Originally Posted by ingoldie View Post
Yes, really fabulous!

@videoFred

Can you post your source file and AviSynth script?
He may have something more recent, but you'll find 99% of what you need in these two threads he started several years ago:

The power of Avisynth: restoring old 8mm films

Capturing and restoring old 8mm films
johnmeyer is offline   Reply With Quote
Old 3rd July 2017, 10:28   #13  |  Link
Gargamel
Registered User
 
Gargamel's Avatar
 
Join Date: Aug 2010
Location: Bretagne, France
Posts: 47
Another perfect result, Fred... one more (as always with you).
Bravo !
Gargamel is offline   Reply With Quote
Old 3rd July 2017, 11:34   #14  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Gent, Flanders, Belgium, Europe, Earth, Milky Way,Universe
Posts: 663
Quote:
Originally Posted by ingoldie View Post

Can you post your source file and AviSynth script?
No Ingoldie. It's much to complicated and I can not give free support world wide any more. (I'm not a free helpdesk )

But you can use my other script and modify it.

Most important:

- good source file
- use Gammac() instead of autolevels()
- filter chain: stabilisation first of all
- then removedirt(), Gammac(), denoising(), color corrections
- then upscaling to HD
- then sharpening on the already upscaled file.

Sharpening:
- unsharpmask() radius 5
- blur(0.8)
- unsharpmask() radius 2
- blur(0.8)
- sharpen(0.8)

PS: I realy wonder what the resizing specialists here are thinking about the downscale/upscale thing

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline   Reply With Quote
Old 3rd July 2017, 17:01   #15  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,983
Quote:
Originally Posted by videoFred View Post

PS: I realy wonder what the resizing specialists here are thinking about the downscale/upscale thing

Downscaling is ok here, because the source didn't have 1392x1032 actual lines of resolution to begin with. When you scan this source film at "HD" you're actually oversampling this particular source

If you started with a real "good quality source" (this is a "relative" term), ie actual 1392x1032 lines of resolution, then and tried to downscale then upscale, you probably wouldn't be happy because you'd be losing real details.

Oversampling has many benefits when you downscale, especially reducing noise, increasing SNR. eg. If you shoot soft UHD footage with a crappy consumer camera, it looks like crap at UHD with noise, ugly compression artifacts, but looks great when you downscale to 1080p . Similar idea with 1080p => SD

Some might argue, why upscale next ? If your algorithm is better than viewer upscale method it can definitely show benefits. Here you chose to demonstrate the downscaled version - how much better is the upscaled version ? It depends on how viewer upscales the downscaled version on playback


Eitherway, that's a nice improvement as always Fred
poisondeathray is offline   Reply With Quote
Old 4th July 2017, 11:40   #16  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 865
Great work, videoFred!
Taurus is online now   Reply With Quote
Old 4th July 2017, 14:13   #17  |  Link
joka
Registered User
 
Join Date: May 2010
Posts: 19
AviSynth equivalent of the Super-Resolution technique in Adobe Photoshop?

From explanation in the video the tools are

pointresize followed by MDegrainN (alignment, averaging and prevent ghosting)

Don't if it works.
joka is offline   Reply With Quote
Old 4th July 2017, 19:13   #18  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 1,843
And finally followed by sharpening. I'm dubious as to whether it can be any better than merely averaging, upscaling, then sharpening.

If the output images were undersampled, then yeah, maybe it would work. But that's unlikely. They certainly don't look undersampled.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 5th July 2017, 01:06   #19  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,200
Quote:
Originally Posted by ingoldie View Post
Can you provide any AviSynth script please?
You must be joking. Nothing they posted implied that they have any AVISynth script, or any other code, that implements what they were talking about.

You already have VideoFred's scripts, and you have seen his latest results which, IMHO, are spectacular. Use that script and see how far you can get.
johnmeyer is offline   Reply With Quote
Old 5th July 2017, 02:31   #20  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,200
ingoldie just sent me yet another PM. I have asked him three times in the last six months to quit doing this. His private message to me was as follows:
Quote:
Originally Posted by ingoldie
If you believe you can get the results in the following links with VideoFred's script, please try.

It should not be so hard to improve this for you.

https://forum.doom9.org/showthread.p...12#post1799912

https://forum.doom9.org/showthread.p...23#post1799923
I will continue to post every private message he sends to me.

In addition to being very annoying and totally unnecessary, I now find that I am only three messages away from filling up my doom9 inbox and will have to start deleting messages, a chore I really don't want to waste my time doing.

Private messages are for things that others shouldn't know or which others might not care about. It is NOT to be used as some sort of private tutorial. I am happy to help people out in public, but I get to pick and choose which subjects I participate in, and who I help.

Hrmpphh!!
johnmeyer is offline   Reply With Quote
Reply

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 14:13.


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