VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 3 of 5
FirstFirst 1 2 3 4 5 LastLast
Results 61 to 90 of 147
Thread
  1. Originally Posted by mammo1789 View Post
    I must say that there is definitely some noise reduction happening with this method( I was really skeptic). So if i understand it correctly i don't loose any information of the original picture with these ( unlike noise reduction plugins) right? Here is some examples
    Yes, You not loosing information and also You will reduce quantization errors in ADC (it will improve both - digital and analog domain)
    Quote Quote  
  2. Member
    Join Date
    Dec 2011
    Location
    Russia
    Search Comp PM
    Can anyone suggest on how to prepare these identical caps, i.e. how to make all copies begin from the same frame?
    Quote Quote  
  3. Click image for larger version

Name:	Untitled-1.png
Views:	135
Size:	1.75 MB
ID:	10098


    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 see
    Last edited by mammo1789; 14th Dec 2011 at 13:36.
    Quote Quote  
  4. Member
    Join Date
    Dec 2011
    Location
    Russia
    Search Comp PM
    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?
    Quote Quote  
  5. BTW did you make the median function work?
    Nope I just tried the blend one and as I suspected the difference is none. Probably the quality of hardware has to do with it when i post those samples that had difference earlier were from analog 8mm camera Samsung( nothing special) and probably the playing path put some noise which is evident in the example however with Panasonic svhs i captured 3 different materials video ( 5 times each one ) and i didn't noticed any noise reduction so i must conclude that the blending technique is well suited for less quality equipment ( people with bad vcr players can try these and trough some camera ro dvd recorder to act them as tbc other wise not) Median script is giving me error


    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)
    }
    errorClick image for larger version

Name:	Untitled-1.jpg
Views:	117
Size:	100.1 KB
ID:	10100
    Quote Quote  
  6. 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.
    Quote Quote  
  7. Member
    Join Date
    Dec 2011
    Location
    Russia
    Search Comp PM
    Median2, apparently, requires MaskTools plugin be preloaded and something else to source Clense from.
    Quote Quote  
  8. 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
    Quote Quote  
  9. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by manono View Post
    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.
    You're quite right manono.
    I told him that 10 days ago in post #60.
    Quote Quote  
  10. 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)
    Thanks manono

    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:
    I have all of the plugins possible including masktools and remove grain t removegrain and many others ( weakness of avisynth- not bashing that's why i don't like it very much its confusing some times and not to much transparent )


    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 ?
    Click image for larger version

Name:	Untitled-1.jpg
Views:	128
Size:	123.0 KB
ID:	10101
    Quote Quote  
  11. Click image for larger version

Name:	neat video default.png
Views:	228
Size:	460.1 KB
ID:	10102Click image for larger version

Name:	slika original.png
Views:	249
Size:	734.0 KB
ID:	10103
    neat video ( default settings) vs original
    Quote Quote  
  12. Click image for larger version

Name:	vague denoiser remove median.png
Views:	263
Size:	684.1 KB
ID:	10104Click image for larger version

Name:	cnr 2 avisynth.png
Views:	265
Size:	717.0 KB
ID:	10105
    cnr 2 vs (cnr2 vague denoiser degrainmedian fft3dgpu and unsharpmask)
    Quote Quote  
  13. Originally Posted by mammo1789 View Post
    now 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
    Quote Quote  
  14. 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.
    Quote Quote  
  15. Click image for larger version

Name:	original.png
Views:	251
Size:	743.7 KB
ID:	10107Click image for larger version

Name:	Untitled-1.png
Views:	336
Size:	727.3 KB
ID:	10108
    original vs median 5 approach. I don't see any difference what so ever ( zoomed in between blend 4 and median 5 approach )
    Only neatvideo get rid of all the chroma and a lot of grain noise ( although with little smoothing )
    Last edited by mammo1789; 14th Dec 2011 at 20:41.
    Quote Quote  
  16. 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
    Quote Quote  
  17. 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.
    Quote Quote  
  18. Originally Posted by mammo1789 View Post
    ...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?
    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.
    Quote Quote  
  19. 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)

    But as manono says, considering the source quality , I wouldn't bother
    Quote Quote  
  20. 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
    Thanks poisondeathray i will try that i have 2.58 mt version
    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
    Guys this was just a test to see how very noise video can handle this method and what changes will imply, if noise from the source is more than noise from the equipment as we sad before.
    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
    Quote Quote  
  21. Originally Posted by mammo1789 View Post
    ...that way I'm in the rgb land all the way through the dvd making (dvd authoring ).
    Since DVDs are YV12, then I don't think so. Unless I misunderstood what I quoted.
    Quote Quote  
  22. Originally Posted by mammo1789 View Post
    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
    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.
    Quote Quote  
  23. Originally Posted by mammo1789 View Post
    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 ).

    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
    Quote Quote  
  24. Member
    Join Date
    Dec 2011
    Location
    Russia
    Search Comp PM
    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
    Quote Quote  
  25. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    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.
    Quote Quote  
  26. Member
    Join Date
    Dec 2011
    Location
    Russia
    Search Comp PM
    2Bdecided
    That's correct. These were left after picking up the right versions of dll's.
    Quote Quote  
  27. 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)
    Yep thats what i have also

    Tested on RGB and YUY2 caps
    Did you do convert to yv12 for yuv2 files

    You don't need to use LoadPlugin to load plugins that are sitting in your avisynth/plugins folder - they load automatically.
    even I which am avisynth dumb know that


    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
    yep again poi i do rough cut in vdub with direct stream copy of all the captured material prior to any manipulation ( the bad frames, noise signal between, captured blank minutes, and so on ) I edit in premiere after noise reduction which sequence to be first or last putting background music and mixing scene 1 then 5 then 4 for instance slowing down or up the sequence and lot of other stuff just to make pretty movie instead of dull original footage. Do you think that I should do that first and then that finished material putting it to noise reduction in vdub ( i learned that noise reduction should be done first), and then to mpeg encoder, or this is just fine , thanks for suggestion



    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.

    you are right my bad even median and blend approach are smaller than 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.
    Quote Quote  
  28. 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?)
    Quote Quote  
  29. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by jmac698 View Post
    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.
    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.)
    Quote Quote  
  30. 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.
    Quote Quote  



Similar Threads