Skip to main content
23 votes
Accepted

Python's $\tt resample$ vs $\tt resample\_poly$ vs $\tt decimate$

Downsampling and upsampling are operations that change the sampling rate of a signal. Each one of them is composed of two steps, changing the sampling rate and filtering. Usually, the amount of change ...
A_A's user avatar
  • 10.7k
19 votes
Accepted

Why should an image be blurred using a Gaussian Kernel before downsampling?

An image "should not be blurred using a Gaussian Kernel" in general. This however can be a safe bet for a lot of basic image processing needs, and a smoothing is almost mandatory when you ...
Laurent Duval's user avatar
14 votes
Accepted

Which order to perform downsampling and filtering?

You need to filter first and then downsample. Otherwise, you will run into aliasing problems. I.e. frequencies that are above 30 Hz will create images within your frequencies of interest. You can ...
Maximilian Matthé's user avatar
9 votes
Accepted

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

I don't get your downsample step when you downsampled by factor $M$. Let me go from scratch with the spectrum visualization below, with time domain, continuous frequency domain and discrete frequency ...
AlexTP's user avatar
  • 6,725
9 votes

Why should an image be blurred using a Gaussian Kernel before downsampling?

According to (digital) sampling theorem, signals should be properly bandlimited, before they are (down) sampled. A practical digital filter approximately limits the bandwidth of the signal and makes ...
Fat32's user avatar
  • 28.4k
9 votes

Downsample a signal by a non-integer factor

You need a resampler. There's different resamplers! I'm not sure you're correctly interpreting the answer you cite: you don't just decimate by 647; you'd first (at least mathematically) upsample by ...
Marcus Müller's user avatar
8 votes
Accepted

Is this signal perfect reconstructable?

Yes the signal is perfectly reconstructed. Consider the process at each stage as I show using the block diagram below: Consider each sample of the signal at each node in the diagram (each sample is ...
Dan Boschen's user avatar
8 votes
Accepted

Appropriate Gaussian filter parameters when resizing image

Before downsampling, we need to first remove spatial frequencies in the image that cannot be represented by the new sampling grid, they would alias to a different frequency. When downsampling with a ...
Cris Luengo's user avatar
  • 2,760
7 votes
Accepted

Scipy resample, "fourier method" explanation

Suppose you have initially a real-valued sequence x of length N. The function is basically doing this: To upsample, it ...
Tendero's user avatar
  • 5,040
7 votes
Accepted

Moving average before downsampling: effect on Nyquist frequency?

There is no effect on the Nyquist frequency, which is only dependent on the sample rate. Decimating is the combination of low-pass filtering + downsampling (which is the term for discarding samples ...
Jdip's user avatar
  • 6,814
6 votes
Accepted

Downsampling audio for use in Machine Learning

Is this necessary if I only intend to use the data in the Neural Network toolkit provided by the repo I linked? Yes. Whether or not you are downsampling (instead of just decimating) has nothing to ...
A_A's user avatar
  • 10.7k
6 votes
Accepted

Decimation vs Mean in downsampling operation

What you are calling decimation is in fact downsampling: keeping one of every $k$ samples from the original signal. Proper decimation involves a digital low-pass filter in order to eliminate all ...
Juancho's user avatar
  • 5,024
6 votes

Downsample: resample vs antialias fitlering + decimation

I will explain why method 2 is often a better choice over method 3. The frequency domain approach is equivalent to the "Windowing" method of filter design- in that to do that approach ...
Dan Boschen's user avatar
5 votes

What is the effect of the natural logarithm in the frequency domain?

First note that when you use a logarithmic function you shall avoid negative arguments if it's output should be real valued. Then consider the following relation: $$ y[n] = \ln( 1 + x[n] )$$ where ...
Fat32's user avatar
  • 28.4k
5 votes
Accepted

Downsampling and low pass filtering in one step?

Is it possible to combine decimation and low pass filtering in one step? Not necessarily only for images but also for general signals. Yes, that's what people usually do when they implement ...
Marcus Müller's user avatar
5 votes

The Proper Way to Do Sinc Downsampling (DFT Downsampling) for Uniformly Sampled Discrete Signals with Finite Number of Samples

Interpolation in Frequency (DFT Domain) The implementation is well known. In MATLAB it will be something like: ...
Royi's user avatar
  • 20.5k
5 votes
Accepted

Is spectral density conserved after aliasing?

No. The aliased component will interfere with the non-aliased components and the interference can constructive or destructive. Trivial example: $$x[n] = \sin\left(\frac\pi2n\right)$$ If you down ...
Hilmar's user avatar
  • 48.1k
5 votes

Is downsampling LTI for bandlimited inputs?

Is downsampling LTI for bandlimited inputs? No. Its linear but it's definitely does NOT meet the formal criterion for time invariance. Assuming $y[n] = T\{x[n]\}$ time invariance means $$ T\{x[n-k]\} ...
Hilmar's user avatar
  • 48.1k
4 votes

Which order to perform downsampling and filtering?

Since I can't comment on this particular site I'd say this, consider the following before you do what you're trying to do. Due to the Nyquist law you want your sampling frequency to be that of the ...
eco's user avatar
  • 141
4 votes

Is this signal perfect reconstructable?

First, the P. P. Vaidyanathan condition is a sufficient one, not a necessary one. The upper part keeps every even sample. The lower part convert odds to evens, keeps every (novel) even, and put the (...
Laurent Duval's user avatar
4 votes
Accepted

Downsampling impact on complex phase

Decimating a signal (selecting every Dth sample and discarding the rest) does not distort the signal within the passband in any way other than to cause aliases from higher frequencies to fold into the ...
Dan Boschen's user avatar
4 votes
Accepted

Convert 96 Khz to 48 Khz audio: is this simple downsampling method ok?

Since you have already properly low pass filtered the signal, then there is no risk in taking every other sample to complete the downsampling operation. If you were to create a low pass filter that ...
Dan Boschen's user avatar
4 votes
Accepted

Reversing the order of up and downsampling

The problem with downsampling is that it can be lossy -- since you're reducing the sampling rate, you can introduce aliasing. So, you can reverse the order whenever downsampling does not result in ...
MBaz's user avatar
  • 15.4k
4 votes
Accepted

Can Carrier Offset cause Image Problems

There is no image problem related to carrier offsets. Image issues are the result of quadrature and ampitude imbalance. Also, the graphic doesn't look correct to me, as a Zero-IF receiver would ...
Dan Boschen's user avatar
4 votes

Can you downsample unevenly with even distribution?

Absolutely positively -- uh -- maybe. It depends entirely on the underlying process that generated the original series, what the series "means", how much unique information is actually ...
TimWescott's user avatar
  • 13.3k
4 votes
Accepted

Polyphase Decimation Filter parallel inputs

Problem Statement and Bottom Line of Solution As described, the OP wishes to channelize the input bandwidth that extends from DC to fs/2 (f = 0 to +1.25 GHz) into four channels each having one quarter ...
Dan Boschen's user avatar
3 votes
Accepted

Downsampling and Convolution: When Can one Swap Between Them?

I thought this was because you were getting aliasing in your signal during one of the downsampling operations. However, I re-wrote your code in R (included below) and I did not see the same effect I ...
Peter K.'s user avatar
  • 26k
3 votes

Decreasing Sample Rate in DFT (FFT) for Audio Analysis

I've read that to increase frequency resolution of FFT results one should dicrease sampling rate and increase window size (number of samples). To increase frequency resolution, you increase the ...
endolith's user avatar
  • 16k
3 votes
Accepted

Output gain when upsampling and downsampling

All of the answers above are good in their own way. The reason that the Oppenheim-Schafer book and other similar resources use a gain of $L$ for upsampling and a gain of $1$ for downsampling is to ...
hops's user avatar
  • 1,422
3 votes
Accepted

Properties of Up- and Downsampling

Let me try to explain what happens to the PSD (power spectral density) of a discrete-time Gaussian white noise $x[n]$ of power $\sigma_x^2$ after it's either expanded by $L$ (insertion of L-1 zeros ...
Fat32's user avatar
  • 28.4k

Only top scored, non community-wiki answers of a minimum length are eligible