Questions tagged [interpolation]

Interpolation is a method of constructing new data points within the range of a discrete set of known data points.

Filter by
Sorted by
Tagged with
27
votes
6answers
2k views

Calculating the PDF of a waveform from its samples

A while ago I was trying different ways to draw digital waveforms, and one of the things I tried was, instead of the standard silhouette of the amplitude envelope, to display it more like an ...
20
votes
2answers
6k views

Frequency-domain zero padding - special treatment of X[N/2]

Suppose we wish to interpolate a periodic signal with an even number of samples (e.g. N=8) by zero-padding in the frequency domain. Let the DFT X=[A,B,C,D,E,F,G,H] ...
18
votes
2answers
1k views

How can I design Nyquist interpolation filters with the Parks-McClellan algorithm?

We can easily design interpolation filters that obey certain frequency-domain constraints using the Parks-McClellan algorithm. However, it's not immediately clear how to enforce time-domain ...
14
votes
2answers
6k views

Differences between filtering and polynomial regression smoothing?

What are the differences between classical low-pass filtering (with an IIR or FIR), and "smoothing" by localized Nth degree polynomial regression and/or interpolation (in the case of upsampling), ...
13
votes
2answers
4k views

How does subpixel image shifting using DFT really work?

I am trying to assess the quality of several image interpolation methods for an application that involves generating subpixel-shifted images. I thought I could compare the results of a subpixel shift ...
13
votes
2answers
2k views

Real-valued ringing when zero-padding odd-length FFT

So I'm trying to write a frequency-domain interpolator that zero-pads the frequency response of a signal and inverse transforms. There's two cases I have to deal with: Even-length response - have to ...
10
votes
2answers
4k views

Finding local peaks in-between samples

I have $n$ discrete samples of a seismic signal $y[n]$: I want to find local maxima in the signal. A naive test for if $y[n]$ is a maximum would be: $$y[n]: maxima \textbf{ if } y[n] > y[n-1] \...
10
votes
1answer
766 views

How can I automatically classify peaks of signals measured at different positions?

I have microphones measuring sound over time at many different positions in space. The sounds being recorded all originate from the same position in space but due to the different paths from the ...
10
votes
1answer
547 views

What interpolation methods can I use to get the tightest fit for these curves?

I am working with MRI images of the brain that have certain areas marked by hand like and . I am trying to come up with an interpolating function that will let me describe such curves so that I can ...
9
votes
4answers
10k views

Zero, First, Second … nth-order Hold

The rectangular function is defined as: $$\mathrm{rect}(t) = \begin{cases} 0 & \mbox{if } |t| > \frac{1}{2} \\ \frac{1}{2} & \mbox{if } |t| = \frac{1}{2} \\ 1 & \mbox{if } |t| < \...
9
votes
3answers
541 views

Signal values we will 'miss' between sampling instances during sampling of band limited signals

According to the Nyquist–Shannon sampling theorem, any continuous time signal with a bandwidth $B$ smaller than Nyquist frequency $f_N=f_s/2$ (with $f_s$ the sampling frequency), which is sampled at ...
9
votes
1answer
4k views

How do I use a Savitzky Golay filter to find local maxima (in between samples) in a discretely sampled 1D signal?

I have a seismic signal y(i): Here I have found one maximum: i=152.54, y=222.29 manually and plotted it in red. I want to find all maxima automatically. I read that the Savitzky Golay Filter (SGF) ...
9
votes
1answer
5k views

When is cubic spline interpolation better than an interpolating polynomial?

The following plot is a slight variation of an example in a text book. The author used this example to illustrate that an interpolating polynomial over equally spaced samples has large oscillations ...
8
votes
4answers
7k views

Higher order spline interpolation

I noticed that spline interpolation with a degree higher than 3 (everything beyond cubic splines) have a very high interpolation error, hence the prediction is mostly awful. I've come across various ...
8
votes
4answers
2k views

Whittaker-Shannon ($\mathrm{sinc}$) interpolation for a finite number of samples

Given an infinite number of samples $(N)$, a higher (or lower) number of samples $(cN)$ can be derived using sinc interpolation followed by sampling. How can this be applied to finite length signals? ...
8
votes
1answer
413 views

How do I numerically calculate a function from its noisy gradient?

I have the model $\ s(x,y)=x^2+y^2, 0 \leq x \leq 1, 0 \leq y \leq 1 $. Instead of observing the model directly I am observing the derivatives of the model + some noise (e): $\ p(x,y)=s_x+e, q(x,y)=...
7
votes
3answers
4k views

Why Is Bi Quadratic Interpolation for Image Resampling / Interpolation Rarely Done?

Related question: What are the practically relevant differences between various image resampling methods? Bilinear and bicubic interpolation for image resampling seem to be fairly common, but ...
7
votes
2answers
2k views

Interpolation of magnitude of discrete Fourier transform (DFT)

For example for peak frequency finding, it seems valid to use band-limited interpolation methods on the complex DFT bins, or separately on their real and imaginary parts and to calculate the ...
7
votes
1answer
532 views

How to mix two signals without changing the overall loudness?

I have two audio signals that I want to mix at various mixing ratios. Initially, I simply went for something like $y(t) = \alpha \cdot x_1(t) + (1-\alpha) \cdot x_2(t)$ where $\alpha$ is the ratio ...
7
votes
2answers
13k views

Savitzky-Golay filter parameters

I am trying to smooth a series of data in order to obtain a continuous function that could represent that given data set. It came out that the Savitzky-Golay method could be a good way. Now, I don't ...
7
votes
1answer
752 views

Plotting DNA chromatogram trace data

Sanger DNA sequencing produces a chromatogram trace which can be visualized with a number of programs, including FinchTV or ChromasLite. The raw data consists of co-ordinates for each of the four DNA ...
7
votes
3answers
1k views

Sense of zeropadding in a time domain

I have the task related to Radon transform which contains a subtask which uses resampling by means of DFT. Let's consider the non-periodical discretized signal (Fig.1) (for example the string of ...
6
votes
5answers
2k views

Multi-channel audio upsampling interpolation

I have a four-channel audio signal from a microphone tetrahedral array. I wish to upsample it from 48 kHz to 240 kHz. Is there a preferred interpolation method for audio? Does cubic ...
6
votes
4answers
15k views

Interpolation with an FIR filter

How can I use interpolation with an FIR filter? I am more familiar with interpolation such as nearest distance interpolation, linear interpolation and so on. Suppose a signal is given as the ...
6
votes
1answer
163 views

Proving Nyquist Sampling Theorem for Strictly Band Limited Signals (Whittaker Shannon Interpolation Formula)

I understand that the Nyquist sampling theorem dictates that the minimum sampling frequency, $f_s$, be s.t. $f_s > 2B$, where $ B $, is the bandwidth of the signal. I have read the explanation for ...
6
votes
2answers
1k views

Artifact in Bicubic interpolation

I wrote an algorithm to do bicubic interpolation of an image. I used the method desribed in the wikipedia page. On simple images, the result looks good, but on more complex ones, I got strange ...
5
votes
5answers
4k views

Effects of linear interpolation of a time series on its frequency spectrum

Situation In order to synchonisize different time series i have to apply linear interpolation on them. After the interpolation and synchronization the signal is transferred into its frequency domain ...
5
votes
4answers
2k views

Sampling Theorem illustration

Can someone please explain the illustration (figure 1.19) at the bottom of this image? It looks like there are four sampling points but I don't understand what the different curves represent. Actually ...
5
votes
2answers
791 views

How to deal with signal not equally spaced in time when performing FFT?

I wonder to know what is the best way to handle not equally spaced in time signal when performing FFT ? I guess it depends on the signal itself. I work with signal with about 1000 - 5000 samples and ...
5
votes
2answers
1k views

How to prevent “zipping” effect on a modulated fractional audio delay line? (Flanger)

I am implementing a Flanger using a fractional delay line. I am modulating the length of the delay line using a sin function. The delay line already uses linear interpolation to compute the delay ...
5
votes
1answer
222 views

Can compressed sensing be used instead of intepolation for missing values?

Consider a signal that is sparse in frequency, but it measured in the time domain, for example (in matlab): ...
5
votes
4answers
2k views

Is interpolation of an audio signal to increase frequency resolution possible?

I apologize if some of what I ask is not entirely correct, I'm new to this field, but extremely interested. I have an Audio signal of sample rate 44.1 kHz that I want to segment into 30 frames, and ...
5
votes
2answers
3k views

Fitting piecewise splines to noisy data

I have a system that gives me a noisy data set similar to the one generated by this matlab/octave code. The y-axis represents the signal intensity and the x-axis represents spatial distance. ...
5
votes
4answers
8k views

How Can I Resample a Signal with an Arbitrary Factor (For Example - 128000Hz to 16000.1Hz) in MATLAB?

I need to simulate the sampling of a continuous (fsCtu = 128000Hz), acoustic signal with two microphones that have a slight offset in sampling rate (fsMic1 = 16000, fsMic2 = 16000.1) in Matlab. What ...
5
votes
3answers
564 views

Absolute convergence of periodic sinc interpolation

An $N$-periodic complex discrete-time sequence $[x_0, \dots, x_{N-1}]$ can be resampled to an $M$-periodic sequence $[y_0, \dots, y_{M-1}]$ with $M>N$, using sinc interpolation: $$\begin{align}y_m ...
4
votes
4answers
2k views

Algorithm for 1d spline interpolation suitable for 8 bit microcontroler

What is a concise, fast, down to earth algorithm for doing (or closely approximating) spline interpolation on a 1d continuous stream of data? (Edit1: The paragraph below equates to saying "the ...
4
votes
2answers
6k views

What Does 'Zero Order Hold' and 'First Order Hold' Mean?

While studying the Image Magnification in spatial domain, I have come across this definition of Image Magnification by Replication: Replication is a zero order hold where each pixel along a scan ...
4
votes
1answer
520 views

Shannon interpolation formula for downsampled data with an “almost ideal” low pass filter

Let $x[n]$ be a discrete time signal with DFT given by $X(f)=\sum_n x[n]e^{-2\pi inf}$ supported on $[-1/2M,1/2M]$ with $f\in[-1/2,1/2]$. I can then down-sample to get $y[n]:=x[nM]$. Then, let $$\...
4
votes
2answers
461 views

Nonnegative or positive band-limited interpolation

Given samples of an everywhere non-negative or positive-valued continuous-time signal band-limited to half the sampling frequency, is there some practically applicable way to interpolate it so that ...
4
votes
5answers
226 views

Reconstructing/interpolating small regions of a bandlimited signal by taking the fewest possible samples

I have a signal which is bandlimited and can be sampled at arbitrary continuous positions. The value at any position is given by an expensive computation. I need to do some further computation on ...
4
votes
1answer
9k views

Bicubic Interpolation

I'm trying to do bicubic interpolation on an 8*8 matrix(image) shown below. ...
4
votes
3answers
163 views

How to find peak value of an analog signal efficiently after sampling in the digital domain?

I have a bandlimited analog signal for which I want to find the peak value in real time. The signal is sampled and processed digitally at just enough sampling rate. Since the peak of the analog signal ...
4
votes
2answers
215 views

Why Zero Padding in the Center of the DFT Interpolates / Upsamples the Signal (Sinc Interpolation / DFT Interpolation / Periodic Interpolation)

I'm experimenting with the Inverse Discrete Fourier Transform. Starting from the two-cycles continuous $x(t)$ signal below: I have the discrete signal $x(n) = \{ 1, 0, -1, 0, 1, 0, -1, 0 \}$ leading ...
4
votes
3answers
2k views

Interpolation by factor of 2

I want to up-sample my input signal by a factor of $2$. I saw zero padding followed by low pass filter method being used in few cases. But still I need some help in this. Say I have $10$ input ...
4
votes
1answer
1k views

How can I smoothly interpolate between 2 position?

I've got a 1D signal (position of a servo motor over time) and I've extracted 'peaks'/'key' positions picking running average "local extrema" points. Below is are 2 plots from 2 servos and the white ...
4
votes
2answers
161 views

A cubic interpolation function: folkloric copypasta or clever trade-off?

I've been reading on interpolation methods recently and I have come across an implementation of cubic interpolation that is leaving my head scratching. Every other variant and example of cubic ...
4
votes
1answer
1k views

How to apply a Butterworth filter to data of varying sample rate?

I am trying to apply a Butterworth bandpass filter to accelerometer data of my smartphone. However, the accelerometer samples I receive do not come at regular intervals. Sample frequency varies ...
4
votes
2answers
3k views

Difference between Sub Sampling and Down Scaling of Images

I know that there are many ways to upscale (interpolate) an image using bilinear, bicubic, sinc... Somehow, these same algorithms can also be used to downscale an image. But when it comes to ...
4
votes
1answer
3k views

Interpolation in Contrast Limited Adaptive Histogram Equalization

I have been trying to implement the CLAHE algorithm and came across this page which states step by step procedure for the algorithm. I understand the initial steps to perform HE of tiles in the image....
4
votes
3answers
928 views

creating a seamless signal / loop using interpolation

I'm trying to create a seamless loop using a "non-periodic" signal using interpolation to smooth out the beginning and the end but I'm still getting a click at the beginning when it loops and I listen ...

1
2 3 4 5 6