note 28656 deleted from function.imagecopyresized by aidan

From: Date: Mon, 04 Oct 2004 09:40:21 +0000
Subject: note 28656 deleted from function.imagecopyresized by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77923@lists.php.net to get a copy of this message
Note Submitter: jou at NOSPAM dot kordi dot Res dot kr ---- Re: Numerical filtering Sampling theoem (including filtering, sinc ftn, anti-aliasing, fft...) can only be applied to "time series". "Time series" generally have the following features: 1. Stationary (finite train) 2. Band-limited 3. zero Average These features can make that time series can be approximated as sinusodial functions (aka fourier sum). Hm... I think Image data does NOT belong to time series. (Not Stationary, Not Band-limited, Not Zero avr.) I also think using float is not a mistake but a rough calculation. Generally Time series data can be resampled with the following steps: 1. Anti-aliasing filter (A kind of smoothing) 2. Resample In ImageCopyResampleBicubic(), just averaging summation of pixel values around is also a kind of smoothing (called Moving[Running] Average in time series analysis). And I'd like to comment ImageCopyResampleBicubic() can be modified with more accurate calculation using integer calculation and weighted-summation of four different pixel values around. Example for "Image is Not a Time series": 1-D case: original: 10 10 10 10 10 20 20 20 20 20 30 30 30 30 30 ---15 data are resampled to 11 data--- 1. using sinc function (sampling theorem) 10 9.3 10.4 11.4 21.8 20 17.8 29.0 30.4 28.1 30 (fluctuationg due to Gibbs phenomenon) 2. using ImageCopyResampleBicubic() algorithm 10 10 10 15 20 20 20 25 30 30 30 Good day. jou

« previous php.notes (#77923) next »