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 16th August 2014, 23:27   #1  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
Deshaker3D - experimental 3D image stabiliser (VDub Deshaker required)

Deshaker3D download

Well, I've been threatening to do this for years, but I've finally gone and done it.

This Avisynth filter can be used in place of pass 2 of guth's VirtualDub filter, Deshaker.

It implements deshaking in 3D (treating each frame as a plane in 3D space) which eliminates (or at least mitigates) the distortion that occurs when using a purely 2D process (as Deshaker does):



YouTube video

Calling the filter requires a log file created by Deshaker pass 1 (probably to be found at C:\Users\[username]\AppData\Local\Deshaker\Deshaker.log).

Parameters are as follows:

Code:
deshaker3d(clip, int fov, string log_file, int x, int y, int z)

# fov - horizontal FOV of the image (non-constant FOV clips may not work well)
# log_file - path to Deshaker pass 1 log file
# x - amount of horizontal smoothing
# y - amount of vertical smoothing
# z - amount of rotational smoothing
Input clips must be converted to RGB32.

Omitting the y and z parameters will cause all smoothing to use the x parameter. If you don't want a particular kind of smoothing, set to 0.

Smoothing parameter values don't match those used by Deshaker, but higher numbers=smoother. The maximum effective value is approximately num_frames/2.

Deshaker3D doesn't implement a lot of Deshaker's functionality for now, but may implement more in future.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 16th August 2014 at 23:43.
wonkey_monkey is offline   Reply With Quote
Old 17th August 2014, 01:54   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,685
This looks very interesting. Does it retain the Deshaker rolling shutter "fix?"
johnmeyer is offline   Reply With Quote
Old 17th August 2014, 07:31   #3  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Nice. No source code?
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 17th August 2014, 08:27   #4  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
Quote:
This looks very interesting. Does it retain the Deshaker rolling shutter "fix?"'
Not yet. It might not be too hard to do though.

Quote:
Nice. No source code?
Maybe one day, when I can pare down my image library a bit. It's currently a mess of files scattered across my hard drive.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 21st August 2014, 01:56   #5  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Thanks, nice to see another stabilization plugin for Avisynth. I quickly played around with this but did not get to work right. Output seems similar to the input . What are the defaults (or recommended values) for "fov" and "x"? I know VDub Deshaker requires RGB32 but is there any possibly of adding support for YV12 in Deshaker3D?
Reel.Deel is offline   Reply With Quote
Old 21st August 2014, 09:45   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
I can add "support" in the sense of internally calling ConvertToRGB32 when required, and calling ConvertToYV12 at the end

FOV for a "normal" camera would be somewhere around 45-60 degrees. x depends on how much smoothing you want - you should certainly see some difference with x=100. If not, can you post your script and your Deshaker logfile?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 21st August 2014, 14:21   #7  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by davidhorman View Post
I can add "support" in the sense of internally calling ConvertToRGB32 when required, and calling ConvertToYV12 at the end
No worries, I can add support for it myself

Quote:
FOV for a "normal" camera would be somewhere around 45-60 degrees. x depends on how much smoothing you want - you should certainly see some difference with x=100.
Yeah I was using too low of a value for "fov", setting it to 50 and x=100 I can definitely see a difference.
Reel.Deel is offline   Reply With Quote
Old 10th July 2015, 00:31   #8  |  Link
Undead Sega
Registered User
 
Join Date: Oct 2007
Posts: 713
This is mighty impressive!

Has there been any developments on this???
Undead Sega is offline   Reply With Quote
Old 10th July 2015, 21:51   #9  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
Quote:
Originally Posted by Undead Sega View Post
This is mighty impressive!
Thanks!

Quote:
Has there been any developments on this???
Nope...
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 11th July 2015, 18:55   #10  |  Link
Undead Sega
Registered User
 
Join Date: Oct 2007
Posts: 713
Why not?

I have not seen anything like this anywhere, so this must be a first right???
Undead Sega is offline   Reply With Quote
Old 13th July 2015, 20:24   #11  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Hi, I am actually making similar thing as a VirtualDub filter.

I have thoughts about rolling shutter compensation. This thing is quite subtle and Deshaker motion estimation does not seem to be accurate with wide angle material. So I have doubts whether it is worth the attempt. Ideally it needs dedicated motion estimation which can handle camera model, but this is so much more work to do.
shekh is offline   Reply With Quote
Old 20th November 2015, 14:29   #12  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Quote:
Originally Posted by shekh View Post
Hi, I am actually making similar thing as a VirtualDub filter.
Just begin to post about it here: http://forum.doom9.org/showthread.ph...68#post1747268
shekh is offline   Reply With Quote
Old 22nd August 2017, 10:36   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by Yeshua View Post
Very cool, is the sourcecode available anywhere yet?

++ on that, Pretty Please David

Oops, Yeshua was addressing Shekh, I was addressing David.
Yeshua, Shekh posted link to source in earlier Shekh linked thread.
__________________
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; 22nd August 2017 at 13:05.
StainlessS is offline   Reply With Quote
Old 22nd August 2017, 11:49   #14  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Quote:
Originally Posted by Achroxact View Post
I know this is a quite old post but shekh i am having the same issue as you, have you find to make it work.
By the same issue you mean you also attempt to implement deshaking algorithm?
The estimation is not big problem. What I tried and it was good:
step 1: (same as 2d case) collect motion vectors grid
step 2: find rotation quaternion that resolves motion vectors (It is trivially derived by gradient descent method)
__________________
VirtualDub2
shekh is offline   Reply With Quote
Old 8th April 2019, 18:48   #15  |  Link
TCmullet
Registered User
 
Join Date: Nov 2003
Posts: 365
Need a 2d (or 3d) deshaker for Avisynth. (Will use Vdub as front end for Avisynth output, but other than that, no Vdub involvement feeding Avisynth.) Thank you for any reference. I've not been able to find anything.
TCmullet is offline   Reply With Quote
Old 8th April 2019, 19:07   #16  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
DePan?

http://avisynth.org.ru/depan/depan.html
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 9th April 2019, 00:55   #17  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 775
Just saw posts 13, 14 are abused with garbage links.

[MODERATOR EDIT]
Original posts 13, 14 deleted by spam

Last edited by tebasuna51; 24th August 2022 at 10:33.
shekh is offline   Reply With Quote
Old 9th September 2019, 10:25   #18  |  Link
nji
Registered User
 
Join Date: Mar 2018
Location: Germany
Posts: 200
Hi shekh.

I would like to ask if there is an up-to-date version of your plugin.
(Only the plugin and the needed files for ini etc. for use in VDub2)

I use DeShaker for a long time, but had to make the experience
that with large FOV it produces "wobbling" results (due to the
lack of taking perspective into account) that make the result
worse than the shaking version.

In Deshaker - as a first step - a simple option for FOV
(wide-angle, normal, tele) would be fantastic.
But ... sadly ... DeShaker isn't improved anymore.

As far as I understand the matter, BEFORE phase 1 in DeShaker
there would have to be the perspective correction (panotools etc.?)
and after that to calculate the motion vectors etc.

But maybe your plugin works well enough already?

Greetings! :-)
nji is offline   Reply With Quote
Old 9th September 2019, 10:31   #19  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,492
There's no update. It's on my list now I have a much faster remapper but it's a low priority. There isn't really any sensible pre-correction you can do, because Deshaker always treats the input as a 2D image.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 9th September 2019, 11:20   #20  |  Link
nji
Registered User
 
Join Date: Mar 2018
Location: Germany
Posts: 200
Hi wonkey_monkey.

Thankyou for your reply.

Actually I posted to the right addressee (shekh), but into the wrong thread.
I meant the VDub plugin (https://forum.doom9.org/showthread.php?t=172886).
I'm sorry.
nji 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 04:36.


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