View Full Version : Aliasing during downsizing
yup
21st February 2003, 08:09
Hi people!
Simple question. If any know tell me. Use Avisynth prefiltering before downsizing? From digital processing known that at downsizing (from larger size to smaller) we will have problem with aliasing noise and rule of thumb before downsizing need low pass prefiltering. I find simple way with use function ReduceBy2(). Example 720x480 to 640x360 (16:9 ratio film) resizing
# source image720x480
BilinearResize(1280,720)
ReduceBy2()# 640x360
Function ReduceBy2() use prefiltiring before decimation and we go out from alias noise.
This way make picture little blury, but good for encoding.
I know that is function GeneralConvolution, but only work in RGB colorspace.
With kind regards yup.
sh0dan
21st February 2003, 08:33
Blur(1.0) ?
yup
21st February 2003, 08:56
Hi sh0dan!
Which dependence between parameter p in Blur(p) and frequency cut. For resize on horizontal (720>640)I need cut frequency 640/720.
And question Avisynth make prefilter before downsizing?
yup.
sh0dan
21st February 2003, 09:12
Sorry - I misunderstood your question.
I realise I have no clue to what you're talking about? :rolleyes:
But using both Bilinearresize and reduceby2() is sure to make your result blurry. What happends if you use lanczos for upsampling. Perhaps a Blur(-1.0) or another sharpening filter applied to the upsampled image will help you.
Perhaps also using lanczos for downsampling will help (even though it will be slower).
yup
21st February 2003, 09:59
About signal processing. If we have discrete image with size 720x480 in horizontal resolution we have maximum frequency 360=720/2 (Nyquist frequency,Theorem Shanon-Kotelnikov). In horizontal resolution 640 we have maximum frequency 320=640/2. Aliasing frequency from high frequency go to frequenzy band downsized image (we do not filtered their) and distort picture. Because before downsizing we need prefiltering.
With kind regards yup.
yup
21st February 2003, 13:51
Hi sh0dan!
You can speek me before resizing to smaller size, make prefiltering in Avisynth? Yes or No. And why.
With kind rgards yup.
trbarry
21st February 2003, 14:13
BilinearResize already contains a triangle filter to adjust for this somewhat. And BiCubicResize has adjustable parameters to determine how filtered you want the output.
But you should also look at your source first since many times it has already been filtered to not contain frequencies as high as the resolution might suggest. If it already looks clean but soft then it may not need filtering for downsizing.
- Tom
Steady
22nd February 2003, 02:13
Aliasing should not be a problem unless you are resizing by a great amount - more than 2:1. The Bicubic resize is a 4-tap Mitchell-Netravalli B,C spline. The Lanczos resize is a 6-tap windowed sinc (Lanczos window), similar to the Blackman, Hamming etc windows for FFT funtions. The only resize that will cause aliasing is the point resize which simply picks the nearest pixel value. All the others will interpolate by simultating a curve connecting the points.
yup
24th February 2003, 11:10
Tom and Steady thank You for reply.
If I understand if I use bilinearresize, bicubic and Lanczos for downsizing I not have problem with aliasing? But I know interpolation not made prefiltering and only windowing in LanczosResize may decrease frequency responce in high frequency band and only for downsizing not more 2:1 (for 3:1 downsizing we will have alliasing, windowing expand near zero band and decrease high frequency band). Resume for downsizing without aliasing and for scale not more 2:1 best choice LanczosResize.
With kind regards yup.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.