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
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,321
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 davidhorman; 16th August 2014 at 23:43.
davidhorman is offline   Reply With Quote
Old 17th August 2014, 01:54   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 1,852
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: 610
Nice. No source code?
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r19 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 17th August 2014, 08:27   #4  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,321
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
davidhorman 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,079
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
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,321
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
davidhorman 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,079
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: 707
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
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,321
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
davidhorman is offline   Reply With Quote
Old 11th July 2015, 18:55   #10  |  Link
Undead Sega
Registered User
 
Join Date: Oct 2007
Posts: 707
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: 376
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: 376
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 31st October 2016, 13:59   #13  |  Link
Yeshua
Registered User
 
Join Date: Oct 2016
Posts: 1
Quote:
Originally Posted by sherkh View Post
Hi, I am actually making crazy bulk on https://deadliftdonkey.com/crazy-bulk-review 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.
Very cool, is the sourcecode available anywhere yet?

Last edited by Yeshua; 10th May 2017 at 15:33.
Yeshua is offline   Reply With Quote
Old 22nd August 2017, 09:02   #14  |  Link
Achroxact
Registered User
 
Join Date: Jul 2017
Posts: 1
Quote:
Originally Posted by shekh View Post
Hi, I am actually making similar thing as a VirtualDub filter.

I have thoughts about rolling shutter compensation. This blog about muscle building 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.

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.

Last edited by Achroxact; 7th September 2017 at 11:08.
Achroxact is offline   Reply With Quote
Old 22nd August 2017, 10:36   #15  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,034
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

Last edited by StainlessS; 22nd August 2017 at 13:05.
StainlessS is offline   Reply With Quote
Old 22nd August 2017, 11:49   #16  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 376
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)
__________________
VirtualDub FilterMod
shekh 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 07:10.


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