+ Reply to Thread
Results 61 to 90 of 147
-
Can anyone suggest on how to prepare these identical caps, i.e. how to make all copies begin from the same frame?
-
The easiest way is opening one instance of virtualdub and one of virtualdubmod put them side by side and by eye look for first frame to last ( at least thats how i do it ) compare source 1 to source 2 then source 1 to source 3 and so on. I think jagabo has some approach trough avysinth you can try that also. By the way i captured 5 times very noisier record from 1990 MTV channel with a lot of analog broadcast noise because of the reception so i will try how the median and blending approach will keep up with it.I captured in windows 7 intentionally that way i can't use the pc card proc amp controls (levels) in vdub while capturing so i get original from vhs tape. The source vcr ag1980 trough dvd recorder es15 to pc card pinnacle 110i. game booster on ( so it will help stop the interference from other programs while capturing ) Will it going to be irrelevant because the noise from the source is bigger than the noise from the equipment let seeLast edited by mammo1789; 14th Dec 2011 at 13:36.
-
mammo1789
Thank you for your reply. After a bit of fiddling with VirtualDub I figured out that aligning 3 clips is not as scary as it sounds.
BTW did you make the median function work? -
BTW did you make the median function work?
the script
v1=AviSource("E:\New folder (3)\gnr top.avi")
v2=AviSource("E:\New folder (3)\gnr2 top.avi")
v3=AviSource("E:\New folder (3)\gnr3 top.avi")
v4=AviSource("E:\New folder (3)\gnr4 top.avi")
v5=AviSource("E:\New folder (3)\gnr5 top.avi")
#Median2-function that gives median of 5 clips:
Function Median2(clip "input_1", clip "input_2", clip "input_3", clip "input_4", clip "input_5", string "chroma")
{# median of 5 clips from Helpers.avs by G-force
chroma = default(chroma,"process") #default is "process". Alternates: "copy first" or "copy second"
#MEDIAN(i1,i3,i5)
Interleave(input_1,input_3,input_5)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
m1 = selectevery(3,1)
#MAX(MIN(i1,i3,i5),i2)
m2 = input_1.MT_Logic(input_3,"min",chroma=chroma).MT_L ogic(input_5,"min",chroma=chroma).MT_Logic(input_2 ,"max",chroma=chroma)
#MIN(MAX(i1,i3,i5),i4)
m3 = input_1.MT_Logic(input_3,"max",chroma=chroma).MT_L ogic(input_5,"max",chroma=chroma).MT_Logic(input_4 ,"min",chroma=chroma)
Interleave(m1,m2,m3)
chroma == "process" ? Clense(reduceflicker=false) : Clense(reduceflicker=false,grey=true)
selectevery(3,1)
chroma == "copy first" ? last.MergeChroma(input_1) : chroma == "copy second" ? last.MergeChroma(input_2) : last
Return(last)
}
error -
You're not actually using it. What's it called, Median2? If so, then maybe try this (unless and until Gavino shows up to correct me)
. Add it after the last line of the script you showed above:
Median2(V1,V2,V3,V4,V5)
I think it also relies on some other filters, but you should (might?) get a different error message next time. -
Median2, apparently, requires MaskTools plugin be preloaded and something else to source Clense from.
-
Clense requires RemoveGrainT and maybe RemoveGrain also. Its use is explained in the RemoveGrain 1.0 doc. I think, not having used it in awhile, so I'm a little hazy on the details:
http://avisynth.org/mediawiki/Removegrain -
-
You're not actually using it. What's it called, Median2? If so, then maybe try this (unless and until Gavino shows up to correct me)
. Add it after the last line of the script you showed above:
Median2(V1,V2,V3,V4,V5)
Median2, apparently, requires MaskTools plugin be preloaded and something else to source Clense from.Clense requires RemoveGrainT and maybe RemoveGrain also. Its use is explained in the RemoveGrain 1.0 doc. I think, not having used it in awhile, so I'm a little hazy on the details:
You're quite right manono.
I told him that 10 days ago in post #60.
thanks gavino i didn't understand where exactly in the script my bad
no i have another error concerning yuv the files are yuv2 lagarith should i convert them in yuv12 ?
-
-
You mean YV12 and the answer's 'yes'. Try doing it like this:
v1=AviSource("E:\New folder (3)\gnr top.avi").ConvertToYV12(Interlaced=true)
to each of your AviSource lines
yes i meant yv12 and figure it out that i should do that, but something is bothering me is that any color conversation is lossy and you lose color precision with yuv2 to yv12(YV12 samples chroma once in every 2x2 pixel block, yuv2 samples chroma once in every 2 pixels why go to yv12 for median can it work in yuv2? Because i will have another lost when i work in vdub or premiere rgb. -
Last edited by mammo1789; 14th Dec 2011 at 20:41.
-
Judging by the pictures blend and median approach gain information ( the sizes of the pictures on the same spot png captured and the identical method of saving are bigger than original picture) and neat video lost almost half the information. What do you guys think of this
-
Noise is not part of the original information. Ideally what you are doing is removing the noise and retaining the original picture information. Of course, in practice, that's not what you get. You lose picture information that's in the same domain as the noise (in spacial filters) and you get smearing of information between frames (with temporal filters).
But basically, noise is the enemy of compression. In fact, pure noise is virtually uncompressible with lossless algorithms. So the more noise in your picture the bigger the PNG file will be.Last edited by jagabo; 14th Dec 2011 at 22:20.
-
Then maybe you should have configured Lagarith for YV12 to begin with. If you're planning on using a filter that requires YV12 input, as apparently MaskTools does, it's in your best interests to use a YV12 video as your source. I wouldn't worry about it at this point, though. Whatever damage being done is minimal, I think. After all, it's not as if this is some pristine hi-def source.
-
But basically, noise is the enemy of compression. In fact, pure noise is virtually uncompressible with lossless algorithms. So the more noise in your picture the bigger the PNG file will be.
There is some confusing information on this tread As I understand in the beginning of this tread the point was that with multiple pass median or blend approach you suppress noise ( hardware path noise not information or broadcast noise ) without losing original information from the source or without gaining noise ( as I understand you jagabo in your latest post). In theory, also someone here sad that you actually gain information with each pass measured in decibels ( and I was under the impression that that's was going on here, that's why the bigger png pictures )if I am correct. The source noise as you sad jagabo could not be suppress by these methods and that's ok, source noise can be suppressed by software and hardware plugins ( avisynth vdub or else ). Also i know that noise is enemy of compression, but a lot of people here not me ( prefer noise instead of too denoise look)
Then maybe you should have configured Lagarith for YV12 to begin with. If you're planning on using a filter that requires YV12 input, as apparently MaskTools does, it's in your best interests to use a YV12 video as your source. I wouldn't worry about it at this point, though.
I didn't that's the point i thought that this method is not doing any color conversation, but maybe I was wrong. Its best to record in yuv2 ( actually yuv but that's impossible with tv cards) not yv12 from analog source , also yuv format is fake ( based on our brain and eye imperfection and on ancient tv standard) instead rgb which is more complex and mathematically more correct is pc and almost all video editors standard, but that's another story.
masktools supports YV16 and YV24, they are planar formats for YUV 4:2:2 , 4:4:4 . But you need avisynth 2.6.x for YV16 or YV24
ConvertToYV16(interlaced=true)
Whatever damage being done is minimal, I think. After all, it's not as if this is some pristine hi-def source.
But as manono says, considering the source quality , I wouldn't bother
I want to put more delicate sources ( my important homemade videos ) but first i want to practice on not so important ones with noise and some imperfection trough average and median path and get clean material that I will then pass trough neat video( vdub in rgb lagarith ) and edit in premiere, make some fancy menus cg animations and pass lagarith rgb to the mpeg encoder for final dvd ( as we talked with jagabo in other tread ) that way I'm in the rgb land all the way through the dvd making (dvd authoring ).
Also in previous post using these method from analog camera( some sources that I also have ) and trough pass trough in pc there was some difference ( in a good way) and that's what I try to accomplish thanks all you guys for your help
Any advice or comment is always welcome -
-
-
-
Thanks God, I finally figured out how to apply the secret teaching of jmac698 to practice.
In case anyone else will be trying to put it to work:
1. It is necessary to install:
mt_masktools-25.dll (12/31/2010)
RemoveGrainSSE3.dll (4/30/2005)
RemoveGrainTSSE3.dll (1/24/2008)
AvsRecursion.dll (9/19/2005) (where avisynth.dll is located)
2. The function Median1 needs to be preceded by the following strings:
LoadPlugin("C:\AviSynth 2.5\plugins\mt_masktools-25.dll")
LoadPlugin("C:\AviSynth 2.5\plugins\RemoveGrainTSSE3.dll")
input_1=AVISource("C:\1.avi")
input_2=AVISource("C:\2.avi")
input_3=AVISource("C:\3.avi")
Median1(input_1,input_2,input_3)
Tested on RGB and YUY2 caps -
You don't need to use LoadPlugin to load plugins that are sitting in your avisynth/plugins folder - they load automatically.
People who do this are either wasting their time, or trying to document which plugins are required by a particular script. If they really want to do that, they should move all plugins out of the autoload folder and point to them elsewhere - that way, they'd know if they've got the list full + correct.
Cheers,
David. -
2Bdecided
That's correct. These were left after picking up the right versions of dll's. -
mt_masktools-25.dll (12/31/2010)
RemoveGrainSSE3.dll (4/30/2005)
RemoveGrainTSSE3.dll (1/24/2008)
AvsRecursion.dll (9/19/2005) (where avisynth.dll is located)
Tested on RGB and YUY2 caps
You don't need to use LoadPlugin to load plugins that are sitting in your avisynth/plugins folder - they load automatically.
I would use use different order in the workflow, because why waste time denoising content you are going to cut out later anyway? Usually you do some sort of rough edit work first, before exposing to slow filters
The sizes of the entire image:
original: 761,587 bytes
vague: 700,551
cnr2: 734,177
neat: 471,153
All the denoised versions are smaller than the original.
video sequences yuv2 lagarith 35 seconds (all identical) capture 1= 358.166.498 bytes, 2= 358.856.704 bytes,3= 358.545.408 bytes,4= 360.769.536,5= 361.086.976 bytes, blend (jagabo )version= 352.833.536 bytes, median (jmac) version= 295.001.730 bytes (yv12 conversation)
So these "lost" in bytes in yours and jmac( little color precision) versions are just plain noise reduction without any original picture information lost right?
Another thing i noticed (which I sad before that with each pass there is a tape degradation and someone here sad not ) evidence by 4 and 5 pass bytes increase almost 2 mb from the original, for comparison it continue to grow and pass 9 =369.437.191 ( that's almost 10 mb difference) maybe the passes add dirt to the head each time but probably additional noise due to degradation is put inside the material also . Am I right?Last edited by mammo1789; 15th Dec 2011 at 13:24.
-
I would never recommend using converttoyv12. Instead, resize each input clip to double the height, then convert to yv12. This way is completely lossless.
v1=avisource("..")
v1=v1.pointresize(v1.width, v1.height*2).converttoyv12
at the end,
median3(v1,v2,v3).converttoyuy2.pointresize(v1.wid th,v1.height/2)
And you have full precision yuy2. Of course, if this is going to dvd it may not matter, because mpg is yv12.
However, the denoising step might be better in the chroma.
(in math, is the median of an average the same as the average of the median?) -
The conversion to YV12 is lossless, but the conversion back at the end is not (and is equivalent to a chroma shift).
The steps at the end need to be:
median1(v1,v2,v3)
u = UToY().ConvertToYUY2()
v = VToY().ConvertToYUY2()
YToUV(u, v, ConvertToYUY2().PointResize(width,height/2))
(I've also changed the function name to median1 to match the function you supplied in post #27.) -
Thanks G! I see you are avoiding the chroma resizer, I guess the reason is the implicit chroma offset. What is the assumed chroma placement and what style (mpg2, dv etc.) does it correspond to?
I still don't find this obvious to find in the documentation. I usually ignore chroma, not a good practice of course. I think we need meta data per clip for chroma placement that's set on sourcing.
Similar Threads
-
the smurfs 2011
By tarzan54 in forum DVD RippingReplies: 4Last Post: 16th Dec 2011, 21:01 -
http://www.jems.com/video/sponsored-video/sneak-peek-sept-2011-jems
By plainplow in forum Newbie / General discussionsReplies: 4Last Post: 23rd Aug 2011, 15:39 -
My Travel Diary–2011 PowerDirector Video Contest
By sog328 in forum EditingReplies: 4Last Post: 13th Jul 2011, 18:03 -
MSU MPEG-4 AVC/H.264 2011 Video Codec Comparison - CALL FOR CODECS
By DmitriyK in forum Latest Video NewsReplies: 1Last Post: 28th Jan 2011, 15:27 -
denoisers comparisons
By cd090580 in forum RestorationReplies: 17Last Post: 12th Mar 2008, 13:14