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 22nd December 2011, 03:00   #1  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
How to remove Polavision (instant film) vertical lines

I am transferring a dozen reels of Polaroid "Polavision," which is instant movie film, sold in the late 1970s.

Here is a link to a short DV clip that illustrates the problem:

Polavision vertical line problem

If you don't have time to download the clip, here is a single frame from the capture which illustrates the obvious problem:



I can use a blur filter to average out the vertical lines (which are caused by how the instant film emulsion worked), but I thought I'd ask if anyone has other, better ideas. I have tried DeFreq, but couldn't get it to do anything. Also, if a blur filter truly is my best approach, which blur filter would you suggest I try?

One note: because this is a film transfer, the film "weaves" in the gate, which means that every frame moves around. I may be able to motion-stabilize the frame to avoid this, but I think I have to assume that the lines will be in a slightly different X position in each frame.

Last edited by johnmeyer; 15th February 2022 at 00:57. Reason: replaced Photobucket image
johnmeyer is offline   Reply With Quote
Old 22nd December 2011, 04:40   #2  |  Link
mandarinka
Registered User
 
mandarinka's Avatar
 
Join Date: Jan 2007
Posts: 729
I'm not sure if it will be usable in this case, but try fft3dfilter with defined pattern. Make an image with such vertical stripes in mspaint, splice that after the video (take note of the framenumber and give it to fft3dfilter for the respective parameter.)

It needs some tweaking, but sometimes you can do a lot with this trick, if the defect is regular like this. Example from an experiment (before/after):http://screenshotcomparison.com/comparison/53026
mandarinka is offline   Reply With Quote
Old 22nd December 2011, 06:58   #3  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Quote:
Originally Posted by mandarinka View Post
I'm not sure if it will be usable in this case, but try fft3dfilter with defined pattern. Make an image with such vertical stripes in mspaint, splice that after the video (take note of the framenumber and give it to fft3dfilter for the respective parameter.)

It needs some tweaking, but sometimes you can do a lot with this trick, if the defect is regular like this. Example from an experiment (before/after):http://screenshotcomparison.com/comparison/53026
Thanks for that. I spent some time getting the noise pattern and looking at the results. I couldn't get it to work very well.

I also tried the function that *.mp4 Guy produced:

function DeStripe

It is promising, but it is late here and I haven't yet figured out how to tweak it.
johnmeyer is offline   Reply With Quote
Old 22nd December 2011, 08:27   #4  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
johnmeyer!
Try http://forum.doom9.org/showthread.ph...80#post1541580
Before using turn to right.
Tune thicknessline.
yup.
yup is offline   Reply With Quote
Old 22nd December 2011, 11:09   #5  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
I'm stupid, I know. But these kind of seem to work.
Here's a fast one:
Code:
TurnRight()
Merge(Yadif(0,1),Yadif(0,0),0.5)
Merge(Yadif(0,1),Yadif(0,0),0.5)
TurnLeft()
And here's a slow one that 'kind of' looks the same:
Code:
PointResize(Width*2,Height*2)
TurnRight()
SangNom(0,255).SangNom(1,255)
TurnLeft()
BilinearResize(Width/2,Height/2)
The only real difference is that the slow one (30 fps) is less "tightened" than the fast one (100+? fps)

Here's what I mean: Fast, Slow

Edit: There's also this, which is even faster. (And more like the slow one) - Except that it introduces new (but fortunately slight) checkerboard artifacts in some lines.
In any case, it's much less extreme than the original lines.
Code:
TurnRight()
Merge(Merge(RemoveGrain(15),RemoveGrain(16),0.5),Merge(Yadif(0,0),Yadif(0,1),0.5),0.33)
TurnLeft()

Last edited by Bloax; 22nd December 2011 at 13:00.
Bloax is offline   Reply With Quote
Old 22nd December 2011, 12:58   #6  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
Code:
MergeLuma(Removegrain(4,0),0.59)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 22nd December 2011, 15:14   #7  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 317
I think it's faster if you do RemoveGrain(4,-1), and my quick and dirty tests do show that.
Not that we need chroma for luma functions anyway.

Edit: Interesting.

Code:
TurnLeft()
BilinearResize(Width,Height/2).PointResize(Width,Height).RemoveGrain(15,-1)
TurnRight()
MergeLuma(last2,last)
This is quite destructive, as it pretty much discards half the height, and interpolates what was lost using (hah) RemoveGrain.

Last edited by Bloax; 22nd December 2011 at 15:54.
Bloax is offline   Reply With Quote
Old 22nd December 2011, 18:29   #8  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
I'm battling a cold today, so I'll be a little slow in trying these suggestions. They all look very promising. Thank you all, and I'll get back to you in a little bit ...
johnmeyer is offline   Reply With Quote
Old 24th December 2011, 02:17   #9  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
I tried three of the suggestions above, and compared them using the code below. None of them did any truly bad things to the awful Polavision film. **

I have access to all thirty minutes of film and as I looked at each of the three approaches, the simple mergeright/mergeleft with yadif seemed to remove the lines in more scenes than the other two approaches.

My workflow from here is as follows.

I captured the film twice, at different exposures, and will now merge them together, using the highlights from the darker exposure and the shadows from the lighter exposure. This is a brute force HDR technique that works very well for dense film (Polavision is denser than Kodachrome). I'll then feed the result into a version of VideoFred's film restoration script, but with the additional filter from this thread added at the beginning.

I'll post a few seconds here when I'm finished just so you can see the difference.

Thanks to everyone for their help!

Code:
#Script to remove vertical lines in Polavision captures

load_stdcall_plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")

source=AVISource("e:\frameserver.avi").ConvertToYV12()
assumefps(source,16)

output1 = Fix1(source)
output2 = Fix2(source)
output3 = MergeLuma(Removegrain(4,0),0.59)

one=StackHorizontal(source,output3)
two=StackHorizontal(output1,output2)
StackVertical(one,two)


function Fix1 (clip c)
{
  TurnRight(c)
  Merge(Yadif(0,1),Yadif(0,0),0.5)
  Merge(Yadif(0,1),Yadif(0,0),0.5)
  TurnLeft()
}

function Fix2 (clip c)
{
TurnRight(c)
Merge(Merge(RemoveGrain(15),RemoveGrain(16),0.5),Merge(Yadif(0,0),Yadif(0,1),0.5),0.33)
TurnLeft()
}
**(Polavision film was developed with chemicals in the film cartridge and then projected and stored in that cartridge. As a result, unlike regular film, that chemical residue was never rinsed away. The result is film full of mold and chemical spots).
johnmeyer is offline   Reply With Quote
Reply

Tags
polavision lines

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 18:16.


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