View Full Version : Analogue Camcorder Capture Denoising
Boulder
22nd February 2007, 11:35
Have you experimented with the different optimized versions of RemoveGrain, Repair etc.?
tranfa
22nd February 2007, 12:02
I've installed the versions Heini refers to in the following thread:
http://forum.doom9.org/showthread.php?t=110078
The thread is referred to the RemoveNoiseMC script function, that works fine...
Boulder
22nd February 2007, 12:16
But did you try different compiles, i.e. SSE, SSE2 or SSE3. Or is it possible for you due to your CPU?
tranfa
22nd February 2007, 12:27
But did you try different compiles, i.e. SSE, SSE2 or SSE3. Or is it possible for you due to your CPU?
I tried only the SSE2, like Blue_MiSfit.
Tonight I'll try with the others.
Coming to the CPU, I suppose should be ok: these are the carachteristics of my PC:
Processor: Intel® Centrino® M 740 1.73 GHz 2MB L2 Cache FSB 533Mhz
Chipset Intel® 915PM Express
Memory: 2 modules of 512 (1024 MB) DDR2 PC2700 Samsung
The SetMemoryMax(512) at the beginning of the script always worked, also with heavier functions...
tranfa
23rd February 2007, 00:08
I think I got close to the result: it was the presence of the RemoveGrainSSE3 and RepairSSE3 versions in the plugin directory to create conflict.
Removed them, the script works.
Probably a quite common error for a newbie like me....
Thank you for the help!
Spuds
25th February 2007, 18:28
I think I am interlaced challenged, the more I read and experiment the more confused I seem to get :eek: I have my script to a point that it works well but there are a few things that I really don't understand and would like to get some pointers on.
First is a simple script like this will leave the video a blurry mess
AVISource("Your Video Here")
ConvertToYUY2(interlaced=true)
LeakKernelBob(order=0,sharp=True,Threshold = 0)
AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave()
Crop(4,0,-12,-16,align=true)
BicubicResize(720, 480)
But if I move the crop and resize before the weave line it looks fine, why is that?
The other thing that I still don't get even after reading the docs and the forum is the re-interlace line. The selectevery section looks to select frames 0,3,4,7,8,11 etc .... what happens to 1,2,5,6,9,10. I'm sure my logic is wrong so I'm hoping someone can explain what is going on or if I missed it in a guide just wack me on the head!
foxyshadis
25th February 2007, 18:59
You can never vertically resize interlaced video. You can crop it (an even # of lines both ways or you change the field order), but resizing will blend the lines together and undo all that effort of interlacing it, as you discovered. Generally making the re-interlacing step the very last step is a good idea.
As for where the extra fields go, well, they disappear into neverland. That's what makes the deinterlacer's job so hard, it's missing half the information from the original.
Spuds
26th February 2007, 03:08
Thanks for the reply, thinking about the resize on the interlaced material it makes total sense that I got some bizarre results. It was like watching a jello commercial, the things were wiggling all over the place when you separated the fields.
I think I have a basic understanding of the loss of information on the interlaced stuff, I was just confused as to when you bob a clip and then re-interlace it with 4,0,3. Works great but I don't understand why :o
Didée
26th February 2007, 04:04
I was just confused as to when you bob a clip and then re-interlace it with 4,0,3. Works great but I don't understand why :o
When done correctly, bobbing then re-interlacing is a no-op. It does just nothing. :) (except sucking CPU cycles.)
Things change when you do something in between. The procedure is meant to apply filters that can't work correctly on an interlaced clip. For those, the clip is made progressive by bobbing, then comes the filter, then the interlaced structure is re-build.
Spuds
26th February 2007, 05:12
I'm actually bobing the clip based on much of the information you have shared on how to properly de-noise clips. I did not post the filters between the bob and 4,0,3 since I don't (well yet that is) need help with that. What I'm totally confused about is how the 4,0,3 line re-interlaces the video.
R3Z
27th February 2007, 07:56
When done correctly, bobbing then re-interlacing is a no-op. It does just nothing. :) (except sucking CPU cycles.)
Things change when you do something in between. The procedure is meant to apply filters that can't work correctly on an interlaced clip. For those, the clip is made progressive by bobbing, then comes the filter, then the interlaced structure is re-build.
I am not sure i understand correctly here, are you saying that the script you made for this special case bobs the fields, then your script does its magic and outputs an interlaced frame ?
I am just confused as to what i should do with the resulting frames of the script :o
qt4eva
27th February 2007, 17:15
Hi, I have a similar video and would like to use Didee script on post 5 to try it out. For some reason, it give me this error. Script Error: There is no function named "Minblur" . Please help. Thank you!
Spuds
28th February 2007, 01:54
The MiniBlur function is in post number 5
# Nifty Gauss/Median combination
function MinBlur(clip clp, int r, int "uv")
.
.
.
make sure you copy that entire script. Also note the comment that you will need a cray :)
Spuds
28th February 2007, 04:38
OK this could be a rambling post but I'm really trying to understand the basic logic in some of this analog camcorder de-noising and de-interlacing.
It’s my understanding that the typical analog camcorder records frame after frame of 240 line video in 60fps which ultimately gets played back as 480i 30fps. The resulting playback is an interlaced frame where the even fields are the 240 lines of time 1 and the odd fields are the 240 lines of time 2 (1/60 second later).
Now assuming the above is correct ….
Doing a simple separate fields I have back what the camcorder captured, 240p lines, 60fps. I can then take this and apply any needed filters to eliminate noise or artifacts or whatever you want.
After its been filtered is where I get confused, its going to be shown on a TV so we want to re-interlace and as such I come up with various options. Warring this is my beginners understanding of this video stuff so be kind
1) AssumeBFF().SeparateFields().SelectEvery(4, 0, 3).Weave ()
a. This combines the even fields from frame 1 and the odd fields from frame 2. Assuming my camcorder thoughts are right this compiled fame is of even lines at time 0 and odd lines at time 3/60. Since we never had more than 240 lines of resolution this seems like a large time lag in the fields.
2) AssumeTFF().SeparateFields().SelectEvery(4, 1, 3).Weave ()
a. This would combine the odd fields from frame 1 and the odd fields from frame 2. These fields are spaced 1/30 apart. This ignores the even fields but in this scenario the only difference between and odd and even field is the timestamp as we never had 480 lines of resolution.
3) Weave()
a. Stacks the even/odd from each frame, putting the video back like it was, fields spaced 1/60 apart.
Another though I had was since we don’t have a lot of data in the vertical, use a smart MC de-interlacer to interpolate / create the missing vertical data. If this is plausible is it better to clean the known data and then interpolate the missing data such as bob / clean / weave / mvbob / selectevery or just go right into interpolating the missing data as in mvbob / clean / selectevery
If this is complete gibberish I apologize in advance!
kastiauto
17th August 2007, 15:37
Hi!
What should i comment out if my input source is progressive and i want progressive output?
#SeparateFields().SelectEvery(4,0,3).Weave() # before or after,
after this i get progressive output, but fps is 50fps.
@ Didee, hope you don't mind but I functionalized your script and added to my collection of avs plugin scripts.
@Chainmax, I included your recommendations (Despot & LimitedSharpenFaster).
@ Pookie, Boulder & others, thanks for your invaluable help and patience.
#
# Powerful but slow denoiser & restoration script
#
# A functionalized and nearly verbatim copy of script by Didee.
# http://forum.doom9.org/showthread.php?p=952831#post952831
#
# Includes recommended additions from Chainmax.
#
# Deviations from Didee's original script are noted.
#
R3Z
18th August 2007, 04:19
Hi!
What should i comment out if my input source is progressive and i want progressive output?
#SeparateFields().SelectEvery(4,0,3).Weave() # before or after,
after this i get progressive output, but fps is 50fps.
Remove the bob() from the start if your source is progressive. No need bobing an already progressive source.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.