View Full Version : Smooth Second Derivative in Interpolation
a uio
18th May 2008, 22:25
Hi,
I've been studying interpolation and resampling and in particular looking at the first and second derivatives of signals interpolated with various filters: lanczos, mitchell-netrevali, spline, etc. I found that most filter produce pretty jumpy second derivatives, except for Blackman Windowed Sinc (order 3 or higher). Blackman produces a very smooth second derivative in the interpolated signal, except for a few minor kinks in some spots.
I was wondering if this is common knowledge? It seems like Blackman produces a far superior result to other filters, at least by this measure.
Cheers,
A
pandy
19th May 2008, 13:32
IMHO Sinc() filters are good for measurements purposes ie they are mathematically correct from signal point of view but from human subjective point of view all Sinc() derived resampling method are far from perfect due pre and postringing - this is very serious problem which can be observed on serious number commercial rescalers - some TV have nasty looking picture full of pre and postriniging around 2T pulses for example (ie Sin^2() pulses which are used to represent finest details in video signal).
Windowed sinc filters aren't sinc filters, also the sinc filter is not mathematically correct in the case of image interpolation ... simply because there is no such thing as correct. An image is aliased garbage, a sinc filter only works "correctly" with non aliased discrete signals.
All that is besides the point of the OP though.
a uio, it's news to me but I fail to see the relevance in isolation. First of you don't say if the second derivative of natural images is smooth in the first place (ie. maybe a jumpy derivative simply means it's blurring less and doing a better job) and neither do you provide a reason why the second derivative would be more perceptually relevant than other types of interpolation errors.
MSE wise the best linear interpolation filters are not smooth in the least you know ...
a uio
19th May 2008, 18:17
The particular application that led me to this is precisely locating zero crossings of the second derivative in signal data. By precisely, I mean between samples. This can be used to find the "center" of edges.
I wrote a little filter to zoom way in and plot the interpolation of a 1D cross section of Video data and see what different interpolation filters did. The Blackman windowed Sinc was the only filter that had anything resembling a smooth, continuous second derivative. Cubic filters all produce a linear sawtooth-like shape, with discontinuities at sample points. Lanczos produced a very wavy second derivative, with sharp vertical slope at each sample. Blackman completely stood out with its nice smooth second derivative. It, not surprisingly, thus had the smoothest first derivative as well.
Of course, Blackman may not produce the "nicest" looking images, but for my particular use, it was oddly unique :)
Cheers,
A
I think it's partly because the blackman window has a very sharp falloff ... bilinear has a really clean 2nd derivative too inside the pixel ;)
PS. have you verified the accuracy of your estimate of the subpixel location of edges? (Either synthetic, edge image blurred with PSF of choice and decimated, or with rl image taken with different levels of zoom.)
*.mp4 guy
19th May 2008, 21:07
Windowed sinc filters aren't sinc filters, also the sinc filter is not mathematically correct in the case of image interpolation ... simply because there is no such thing as correct. An image is aliased garbage, a sinc filter only works "correctly" with non aliased discrete signals.
While I agree that there is so far no mathematically correct form of image interpolation (in the sense that it performs at the theoretical optimum in all cases), some forms of interpolation are clearly more correct then others the majority of the time (when dealing with "real world" images, essentially all the time). Statistical based aproaches imo offer the best chance of "mathematically optimal" interpolation, the HQ2X interpolator shows what is possible with even a very course statistical filter.
pandy
20th May 2008, 11:58
Windowed sinc filters aren't sinc filters, also the sinc filter is not mathematically correct in the case of image interpolation ... simply because there is no such thing as correct. An image is aliased garbage, a sinc filter only works "correctly" with non aliased discrete signals.
Mfa this claim is valid on pictures (images) but not signal.
There is no optimal mathematical method for images or pictures point of view but Sinc() and Sinc() derived are optimal from mathematical point of view.
For example, You measure bandwith of video channel so You use various test signals - from DSP point of view Sinc() is optimal method.
What is the optimal interpolation of a discretely sampled signal? Something with results as close as possible to the original signal at that point. The Sinc filter will not do this for signals which have above Nyquist limit content.
The Sinc filter is only optimal for the class of signals which are bandlimited below the Nyquist limit. Even with a DSP point of view you should consider broadening your horizons beyond just those signals ;)
pandy
22nd May 2008, 16:44
Ok, sampling for Y is 13.5MHz (assumption made for SD BT.601, most of hardware use sampling 27MHz or even higher), accordingly to measurements standards all measurement signals are bandwith limited (they assumed that channel bandwith is 5MHz)- in this case Sinc() are optimal method.
Ok, sampling for Y is 13.5MHz (assumption made for SD BT.601
It's not the sampling frequency which matters, it's the bandwidth of the original signal which you are trying to resample which matters.As I said the Sinc is only optimal if original signal you are trying to resample had no frequency components above the Nyquist limit, that is generally not the case for images ... however you transmit them (images would need to be excessively blurred or ring to be able to have completely no aliasing).
pandy
28th May 2008, 17:20
It's not the sampling frequency which matters, it's the bandwidth of the original signal which you are trying to resample which matters.As I said the Sinc is only optimal if original signal you are trying to resample had no frequency components above the Nyquist limit, that is generally not the case for images ... however you transmit them (images would need to be excessively blurred or ring to be able to have completely no aliasing).
As i wrote earlier - mathematicaly generated signal used for measurements is generated accordingly to Nyquist limit so for this Sinc() is optimal.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.