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 4th July 2020, 13:24   #1  |  Link
spotty
Registered User
 
Join Date: Jul 2011
Posts: 8
8mm film - Stabilising frame position

When I do a scan of 8mm film with the Wolverine scanner there is some random error in the positioning of the films frame relative to the optics.
I would like to fix this by scanning zoomed out a bit so the edges of each frame are visible in the image, and then using something like a deshaker to shift each frame back so the edges always stay in exactly the same correct position.

Is there a filter already made for this?
Is there a deshaker that can be configured to ignore the middle of the image and use the outer edges to deshake the whole image?

I want to do that first, trim the edges away, then run a deshaker over the whole image, but program the deshaker that if it creates a black gap at the edge of the image, to instead fill it in with colour estimates so it doesn't stand out too much.
Hope that all makes sense.
spotty is offline   Reply With Quote
Old 4th July 2020, 13:34   #2  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
You can blank out the central part of the image so there's nothing for Deshaker (although that may not be the right filter for the job) to lock onto in the middle of the image.

Can you post a sample or a handful of frames?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 4th July 2020, 15:13   #3  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
These are the three threads started by Videofred which show how to restore amateur film:

The power of Avisynth: restoring old 8mm films

The power of Avisynth: new 8mm film restoring examples

Capturing and restoring old 8mm films

The scripts shown in these various threads all include a section which is designed to correct "gate weave" which is the term for what you describe. The stabilization can also remove some of the motion from hand-held camera shakiness.

I created a derivative of Videofred's script and have posted my version. Here is the relevant code from my long script:

Code:
#STABILIZING
#....................................................................................................................................................................
stab_reference= cropped_source.crop(est_left,est_top,-est_right,-est_bottom).tweak(cont=est_cont).MT_binarize(threshold=80).greyscale().invert()
mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=maxstabH,dymax=maxstabV)
stab=DePanStabilize(cropped_source,data=mdata,cutoff=0.5,dxmax=maxstabH,dymax=maxstabV,method=1,mirror=15)
Here is a link to a side-by-side video that shows the results. The first few examples demonstrate pretty well what sort of improvement you can expect.

Before/After

Last edited by johnmeyer; 4th July 2020 at 15:14. Reason: formatting
johnmeyer is offline   Reply With Quote
Old 11th July 2020, 13:20   #4  |  Link
spotty
Registered User
 
Join Date: Jul 2011
Posts: 8
I have stumbled across a solution to the issue -

I have found that the film can get tight in the gate of the wolverine scanner.
This can cause a jam or cause significant variation in frame position.
Putting a bit of paper under the edge of the gate to open it ever so slightly seems to fix the problem - then the frame position variation is much smaller, small enough not to matter.
So now I scan a little bit more than the frame, then use AviUtil to crop the frame (and check its cropped out all frame edges through the video) and also to do manual color correction.
After that I'm planning on using a deshaker with Avisynth and Videofreds scripts to remove any residual frame misalignment and also camera shake at the same time while filling in any created black bits with some of the image.
If you know of a better way do let me know.
spotty is offline   Reply With Quote
Old 11th July 2020, 15:04   #5  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Just make sure the paper doesn't cause the film to jiggle in the other axis, namely forward and back in the direction of the screen (if you were projecting the film). This can cause the film to pop in and out of focus slightly. However, if that doesn't happen, then it is a brilliant fix. Congratulations!
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 01:26.


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