New answers tagged

1

Is this correct? No. This only works if filter and signal have the same sample rate. Either up-sample the signal or down-sample the impulse response, depending on what you want your output sample rate to be. It might be the easiest to down-sample the impulse response to 44.1kHz Resampling from 48kHz to 44.1kHz is fairly awkward and involves a fair bit of ...


0

This answer is based on the algorithm from How to generate exponentially correlated Gaussian random numbers. I will address a slightly more general form of the autocorrelation than is asked for in the question with the requested form being a specific case. Assume an autocorrelation of the form: $$R_{xx}(m-n) = E\left[x_nx_m\right] = \sigma^2e^{-|m-n|/\tau}$$ ...


3

Let's model the data as: $$ {y}_{i} = {x}_{i} + {n}_{i} $$ So the the $ i $ -th pixel in the noisy image $ Y $ is composed by the noiseless image data and additive IID noise. Now assume we have 2 images: $ {Y}^{1} $ and $ {Y}^{2} $: $$ {y}^{j}_{i} = {x}_{i} + {n}^{j}_{i}, j = 1, 2 $$ Indeed, noise wise, when we combine data temporarily (Between 2 images) and ...


1

Both averaging operations are low-pass filers: one is low-passing in time the other is low-passing in space. The cutoff frequencies are determined by the length of the averaging. For your spatial filter this is 7 (I think) and for the temporal one it's 2. The spatial is easy to easy: just look at a single picture. Too "see" the temporal one you ...


-1

filter() implements an IIR-filter. You mention FIR filter. While IIR is a generalization of FIR, it makes some sense to think of them as two different things wrgt optimization. Generally, MATLAB may use libraries or point optimizations implemented in FORTRAN, C or Assembly using algorithmic optimizations, as well as SIMD, multi threading or any other clever ...


3

Feature Extraction There are many modern known features for images. Among them: BRISK Feature. FAST Feature. Harris Feature. KAZE Feature. MSER Feature. ORB Feature. SIFT Feature. SURF Feature. LBP Feature. HOG Features. Those are classic and popular features. Since the blossom of Deep Learning people are less and less invest in researching newer features. ...


0

I assume something processing the two branches inserting zero-samples, convolving with the hinted filter, and adding to produce output. lp1 = zeros(2*length(lp), 1); lp1(1:2:end) = lp; lp2 = conv(lp1, [1 1]); hp1 = zeros(2*length(hp), 1); hp1(1:2:end) = hp; hp2 = conv(hp1, [-1 1]); y = lp2 + hp2;


0

If you want to do any overlap and arbitrarily large vectors while being fast it is a bit cumbersome. If you only do 50% overlap, then it is straight forward to write an unbuffer function


1

The hilbert function in MATLAB will return an FFT based approximation of the Analytic Signal, and the magnitude of the analytic signal is the "envelope", but this isn't the "complex envelope" the OP refers to. The analytic signal is given as: $$x_a(t) = x(t) + j\mathscr{H}\{x(t)\} \tag{1} \label{1}$$ Where $\mathscr{H}\{x(t)\}$ is the ...


3

The Linear Discriminant Analysis (LDA) (Also the Fisher's Linear Discriminant, which the LDA is a generalization of) is a method to find a projection plane to separate data by linear projection Matrix multiplication). Its main limitation is the use of linear projection. On the other hand, it can be used in a supervised manner. Namely it can use the labels to ...


1

Verify that that 12000 sample is indeed occurring at 0.75 sec spot. t(12000) Verify the spectral spacing. F_0(2) - F_0(1) What is the frequency (in Hz) at k = 8000 and k = 3000. F_0(8000), F_0(3000)


0

From the OP's original question and the subsequent comments I suspect that he is interested in creating an FIR filter from a truncated impulse response (for example the impulse response of a Butterworth filter by using only the first 200 samples). The compensation used is commonly done with "windowing" and this refers to the windowing process for ...


-1

Y = fft2(x); imagesc(10*log10(abs(fftshift(Y))));


0

Assuming that you know the set of fundamental frequencies, you should be able to calculate the THD for either signal (original or encoded) as $$\frac{\sqrt{v_2^2 + v_3^2 + \ldots + v_n^2}}{v_1}$$ where $v_1$ is the signal amplitude at the fundamental frequency and $v_2, \ldots, v_n$ are the signal amplitudes at the harmonics of interest for that fundamental ...


1

I'm very new to Fourier transform I suggest to start with the math here. Make sure you understand the formula and WHY it is the way it is. Then work your way up by doing simple examples where you write the code AND also calculate the result by hand so you can compare the two and get a feel of how the code works Start with a single non-zero pixel in the ...


3

You should try something like: F = fft2(img); figure; imagesc(abs(F)); In image processing many times we're after the Log Spectrum: F = fft2(img); figure; imagesc(log10(1 + abs(F)));


1

The transfer function phase is the numerator phase minus the numerator phase The phase of the numerator can be expressed as $atan(\omega)$ For the denominator, it is a bit more complex. You need to expand the denominator to $\frac{s^2}{10} - s$ Replacing $s = j\omega$ in the denominator and you get $-\frac{\omega^2}{10} - j\omega$. For a positive value of $\...


2

If you pop in a very small s you get $$G(s) = \frac{(s+1)}{s(\frac{s}{10} - 1)} \approx\frac{1}{-s} = \frac{j}{\omega}.$$ That has indeed a phase of +90 or -270 degrees. That has nothing to do with the pole location but it's a simple sign flip from: $$G(s) = \frac{(s+1)}{s(1-\frac{s}{10})} $$


0

Windowing is used for multiplying each time frame of the signal with a window function to avoid discontinuity at the borders of the frame. According to Haytham Fayek: There are several reasons why we need to apply a window function to the frames, notably to counteract the assumption made by the FFT that the data is infinite and to reduce spectral leakage.


6

Unsupervised clustering of image data is tricky thing and requires adjusting the method to the content of the images set. Assuming we're dealing with the MNIST data set we can do some nice things using known tools. First, let's assume we're after 2 features, namely we're after a dimensionality reduction from 784 features / dimensions to 2. The first approach ...


6

It depends entirely on how close the less dominant poles are to the dominant poles. A simple way to understand what is happening is consider poles on the real negative axis for continuous time systems: each pole at location $x$ has an impulse response given by $e^{-xt}$ and with that we see how poles further away from the $j\omega$ axis will decay to ...


1

Your regression approach seems to be needless complicated. Let's look at this step by step" First you need to start with a model. A simple linear model would be $$y[n] = w_1x_1[n] + w_2x_2[n] + w_3x_3[n]$$ Going forward I'm going drop the $[n]$ for quicker typing and all sum symbols mean "sum over all n". Then define an error metric. For ...


0

I don't know how it works with images (see below), but with audio you have a waveform that moves into the positive and negative around a center line. This is usually at zero (audio is -1 -> +1), but if there is an offset, ie. if add up all the positive and negative sample values and end up above or below zero, that is the DC offset. In other words, '0Hz' ...


Top 50 recent answers are included