View Full Version : Chroma Noise Reducer 2
Marc FD
20th July 2002, 16:05
If you want a :
- very fast (real-time)
- very effective ( i use it on all my VHS encodes and get _very_ good results )
chroma noise reducer, you should take a look on cnr2 !!
(the algo is not mine. Thx to Gilles Mouchard who made the VDub filter ;) )
Work in YUY2.
Test a little...
> Subtract(clip.cnr2(),clip).Levels(129,1,179,0,255)
...line on a noisy source and you'll se the HUGE amount of noise removed :D
If there is any bugs/features request/questions/ect..
I'm waiting :cool:
(dl with my signature)
edit: latest version can be found in the AviSynth Filter Collection (http://forum.doom9.org/showthread.php?s=&threadid=51320) sticky.
Koepi
20th July 2002, 16:15
So the syntax is
cnr2()
no parameters?
Regards,
koepi
EDIT:
ARGS, sorry, just found the html file in the zip :)
Great work man, respect! :)
Wilbert
23rd July 2002, 12:17
@Marc FD,
I was updating the faq. Could you explain to me the difference between this filter and "Chroma Dynamic Noise Blender and Fixer in HSL plane". What could you do with this filter what you can't do with the other?
Marc FD
23rd July 2002, 14:03
very easy to say : ChroNoFix is a born dead filter :
The algo is very bad and slow : it's mine :D
cnr was a the best chroma denoiser i never seen for VDub : I tested many and them like "VHS" filer but cnr was always the fasted and the better :devil:
And since i wanted to use it on AviSynth (and it worked using YUV space) so i rewrote it totally using the same algo.
so here is Cnr2 :cool:
Read the readme "history" part if you want to know more.
vidiot
23rd July 2002, 15:23
Thanks Marc,
I use the VD Version off this filter with every TV cap. i made
(Maybe because of my bad signal?)
And now it seems to be faster....
Congratulation!
Harald
Marc FD
23rd July 2002, 17:47
it's usefull for TV and VHS because the chroma in "unstable" in low chroma-bandwith analogic hardware
soulfx
24th July 2002, 04:30
Sweet job on this and your other filters and programs Marc,
I've run some older videos with some major Rainbow artifacts through Cnr2 and was able to reduce them nicely. I'll mess around with it a bit on the scene change sen. and de-noise effectiveness.
I'm not sure what's going on, but when I place the filter after a resize (it doesn't matter what resize value and what algorithm *cubic, or linear) it will come up hit the first frame then catch on access violation at 0x025a1443, attempting to write to 0x00000000. What's weird is if I place a TemporalSmoother/Soften2 after the Cnr2 then it will work after a resize. Doesn't really matter I guess, since Cnr2 is fast enough to be placed before the resize... but I was just wondering.
trbarry
24th July 2002, 05:46
Maybe wrong on the details here but I think BiCubicResize in Avisynth 1.05 does not properly end with a EMMS instruction. If the next filter does not happen to supply one first then the first execution of a floating point instruction can cause an error.
I got so paranoid about this that if my filters are going to use floating point I actually start them with an __asm {emms} sequence, just in case.
- Tom
Marc FD
24th July 2002, 16:29
I think you're right Tom.
And because Cnr2 build lookup tables using advanced FP functions (sin,cos,sqrt..) i think it why it crashes. I will had some emms on the init functions
But i never have problems because i always use SimpleResize :D
With simpleresize+cnr2+copysame, i can have real-time encoding in VDub fast mode :devil:
EDIT : using it BEFORE the resize will lead to the best quality.
(and since you pointed out, even on my athlonXP it can do real-time 700x400 filtering :cool: )
JasonFly
30th July 2002, 14:26
I have tested your filter and I think that it is very powerful on low motion scenes.
I have testeed on high motion scenes and it makes th video blocky behind the object that moves.For this test I only use cnr2 filter and the result seems to be the same using xvid encoding or sbc encoding process.
Did anybody noticed this phenomenon?
Marc FD
30th July 2002, 18:10
Strange ...
Maybe ghosting... Because it's a very aggressive filter,able to denoise 95% of the chroma channel of a very noisy analog source :devil:
JasonFly
30th July 2002, 19:48
I made a other test and the result seems to be better using xvid.
Maybe it's the encoding process in sbc that couldn't take advantage of the filter?
The second possibility is that I could have used too low noise reduction parameters using the filter.
But, congratulations for your work Marc FD.
Marc FD
30th July 2002, 19:59
Thanks :)
But the algo is not 100% mine.
An other french made the first cnr ( a VDub filter )
but this filter really needed YUY2 space :D
wing1
31st July 2002, 01:48
Thanks for a great filter. This filter works wonder in Avisynth. Make encoding such great fun :D
In Vdub the cnr has "wide" check box for all three YUV along with the percentile and max filter scales. I've found that using wideness reduces a lot of noise; However, It leaves trails of ghosting and smearing colors effects, especially during high motion scenes. So I usually uncheck the wide option and play with the percentile instead. In cnr2, this option is not available, but instead it has mode. What is the equivalent for no "wideness" in the filter?
Marc FD
31st July 2002, 10:51
quoting from cnr2's readme.html :
-1 : Maximum Scene Detection ( YUV high sensibility )
=> -1 is YUV narrow mode.
enhanced mode is in fact equivalent to wide.
The default mode (mode 0) is luma wide and chroma narrow.
I didn't tested it, but maybe so will test M.A.M. with ultra aggressive Cnr2Ex settings...
PS : If you think you've found better settings that cnr2 defaults, say it. but i think the default values are one of the best compromise between ghosting and denoising :)
Marc FD
31st July 2002, 19:39
Cnr2.1 released
Some _very small_ bugfixes and improvements.
Thx Dividee ;)
ACClarke
31st July 2002, 20:39
if only someone can update freevcr which is, for me, the best software to acquire a video.
but create an avisynth filter with CNR is really a good idea.
merci m'sieur !
Because I always get confused with the different versions: would you mind to change your archive name to cnr21.zip?
bb
Marc FD
1st August 2002, 11:56
before, all my archives had the version number into, but it's really not a good idea because in need to change the links each times and there is a risk of errors => brokens links :(
You can always see the last version avaible on my signature and on my site and in the readme file and in the .dll version info.
I'm a coder, not an archivist ;)
If you really need it, i'd make an effort.
Well, if it's too cumbersome for you, then just leave it as it is. I can change the name during download.
BTW: Thank you for the great filter; keep up the good work!
bb
Marc FD
1st August 2002, 13:37
I think i will return to this method, if it's more user-friendly :)
after all 50% of my time is spend in debugging / distribution for others. If i created filters just for me, it would go much faster...
But i'm too lazy to code only for myself ;)
Marc FD
1st August 2002, 17:18
released Cnr2.2
the first-frame bug should be fixed :)
SILICON
18th September 2002, 21:39
Download CopySame, Cnr2, MAM, and Focus2 (Blur2/Sharpen2)
I want tried the next script:
--------------------------------------------------------
LoadPlugin ("C:\MPEG2DEC\MPEG2DEC.dll")
LoadPlugin("C:\MPEG2DEC\TemporalSoften2.dll")
Mpeg2Source("C:\spygame\pelicula.d2v")
SetMemoryMax(40)
BiLinearResize(336,414,8,0,704,576)
MAM(Cnr2().TemporalSoften2(1,5,0),Convolution3d(0,8,8,8,8,0))
AddBorders(8,81,8,81)
-----------------------------------------------------------
The film is real image, not anime. The origin is a DVDRIP. I will compress it in SVCD. I want increase the compresibility with the filters, not clear noise.
Is the script ok for this purpose?
I can't find the MAN.DLL in the MarcFD's page. żbecause?
Marc FD
19th September 2002, 15:05
because the current implementation is crap.
i could do much better.
And i'm working on XviD now.
Marc FD
17th November 2002, 19:47
up ^^
Cnr2.3 for Avisynth 2.5 out.
download on my site (link on my signature)
what's new ?
- SCD : scene change detection. it's basical stuff, but Cnr2 really missed it. no ghosted iframes now ^^
- YV12 support : not faster, but can avoid colorspace convertions.
- minor bugfixes.
enjoy ^^
Boulder
18th November 2002, 11:06
Marc, are you planning to update the older version (for Avisynth 2.06) as well?
Richard Berg
18th November 2002, 11:55
It should still work in 2.xx. Haven't tried this one, but I've got a couple other 2.5 filters in my autoload directory that seem to do ok -- makes sense, since the relevant video structs were only appended to, not substantively changed. Audio filters will probably crash, however.
Boulder
18th November 2002, 12:01
Thanks Richard, this is definitely good news. I've suffered from a slight scene change misdetection with the filter sometimes, and it's a must for analog TV captures. I'll try if it works.
Boulder
18th November 2002, 12:03
The only problem I've got now is that the file is not on the site :eek:
Marc FD
18th November 2002, 16:10
shit !
i've not updated index.html ^^
i'm too dumb sometimes.
okay i'll do it ASAP, and release an asharp beta tonight ^_^
Boulder
18th November 2002, 17:52
Hmm, doesn't seem to work with Avisynth 2.06. Guess I'll have to stick with the older version instead.
Marc, *cough* would you mind *cough* putting the scene change detection to the older Avisynth version too? :cool:
Marc FD
18th November 2002, 19:58
throw avsiynth 2.06 away and enjoy avisynth 2.5 ^^
it's pretty stable now ^^
anyway, i'm sorry but i've uninstalled Avisynth 2.06 and i'll never install it again. i can live with alpha code ^^ (correction : i like to live with alpha code ^_^)
and as soon as Sh0dan or Richard explain me how to commit something to the CVS (i've no problems with checkouts, but i'm unable to commit :( ) it would always do a coder more to hunt down bugs :D.
Regards,
MarcFD
Boulder
18th November 2002, 20:33
Is it possible to use Avisynth 2.5 with standard YUY2 MJPEG captures without any color space conversions?
Richard Berg
18th November 2002, 21:37
Assuming you're using YUY2-capable filters and compressing to a YUY2 codec, why not?
@Marc - search the forum for TortoiseCVS, it's what everyone seems to use. (I still use WinCVS so my advice probably won't be much good.)
Boulder
18th November 2002, 21:52
This is getting OT a lot here, but I really didn't realise that the new alpha would work just as the older one. The only reason why I haven't switched to AVS2.5 is that I want to be able to encode my TV captures to MPEG-1 just as I did before, without any unnecessary colorspace conversions. I'll definitely have to check that out:cool:
^^-+I4004+-^^
18th November 2002, 22:19
Originally posted by JasonFly
I have tested your filter and I think that it is very powerful on low motion scenes.
I have testeed on high motion scenes and it makes th video blocky behind the object that moves.For this test I only use cnr2 filter and the result seems to be the same using xvid encoding or sbc encoding process.
Did anybody noticed this phenomenon?
i too have noticed something simillar,and CNR can't be used with VERY
himotion scenes.......(sports etc.)
it's in fact same effect as feeding the smoothers/denoisers
with very noisy video and lots of motion,you get ghosting etc.
only with CNR you get ghosting of color (right?)
i'm talking about VD version (just yesterday i installed avs one...),
but as it's the same algo.........
would it be possible to completely turn-off CNR if motion treshold is exceeded?
cheers
Ivo
Marc FD
19th November 2002, 17:17
>would it be possible to completely turn-off CNR if motion treshold is exceeded?
yeah. that's whatthe scd does in 2.3
^^-+I4004+-^^
19th November 2002, 18:55
nice touch!
thanks for answer...
Piper
12th April 2003, 03:01
Marc FD, what is your site address? Your sig seems to have been removed. I'm looking for the latest CNR filter for 2.5.
Thanks.
soulfx
12th April 2003, 03:55
If you do a little jiggy dance, jump up and down, clap your hands together, and search for MarcFD on google you'll find http://ziquash.chez.tiscali.fr/ ;)
Piper
12th April 2003, 04:21
Thanks for the URL.
North2Polaris
29th July 2003, 02:23
On the AviSynth website at:
http://www.avisynth.org/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.5
Chroma Noise Reducer (by Marc FD) is listed as a "spatial smoother"
The Readme file available at:
http://ziquash.chez.tiscali.fr/
describes CNR2 as a "a temporal filter and it's very effective against two chroma artifacts : stationnary rainbows and huge analogic chroma activity."
Is CNR2 a spatial or a temporal smoother? Both?
Thanks.
Wilbert
29th July 2003, 10:06
Thanks, I will correct that! It's a temporal filter.
Btw, be sure to download the one at WarpEnterprises plugin page.
North2Polaris
30th July 2003, 00:24
Originally posted by Wilbert
Thanks, I will correct that! It's a temporal filter.
Btw, be sure to download the one at WarpEnterprises plugin page.
CNR2 is also used as an example of a spatial smoother in the sample script given in the AviSynth processing guide "Converting Analog Captures to XviD/SVCD" at:
http://www.avisynth.org/index.php?page=ConvertingAnalogCaptures_to_XviD%2FSVCD
If possible, it would be good for the guide to be corrected as well.
Wilbert
30th July 2003, 09:23
Thanks, I will do that!
YY1020
3rd August 2003, 14:11
I have some problem with using cnr2.....it crash in vdm
My script below that :
#
# PLUGINS
#LoadPlugin("C:\Plugin\SimpleResize.dll")
LoadPlugin("C:\Plugin\cnr2.dll)
LoadPlugin("C:\Plugin\UnDot.dll")
LoadPlugin("C:\Plugin\MipSmooth.dll")
LoadPlugin("C:\Plugin\MSharpen.dll")
#
# SOURCE
avisource("C:\Ready\F\V.avi")
#
#
# CROPPING
#crop(2,38,716,404)
#
#
# RESIZING
#BicubicResize(640,480,0,0.5)
#SimpleResize(640,360)
#
#cnr2
CNR2()
#
#
#UnDot
UnDot()
#
#
#MipSmooth
MipSmooth(preset="AnimeLQ",Spatial=12,Temporal=16,Spatial_Chroma=16,Temporal_Chroma=16,Scenechange=8,Method="Strong",Scalefactor=0.5)
#
#MSharpen
MSharpen(threshold=15,strength=75,mask=false,highq=true,debug=false)
#
ConvertToYUY2()
#
#Levels
Levels(0, 1.1, 255,0, 255)
#
# TWEAK
Tweak(Sat=1.2,Bright=1.3)
# SUBTITLES
textsub("C:\Ready\sub.ssa")
#
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.