10

The result will indeed be a high pass filter. From your difference equation, the transfer function of the low pass filter is $$H_l(z)=\frac{\beta}{1-(1-\beta)z^{-1}}\tag{1}$$ with $\beta=1/\alpha$. Note that this is actually a leaky integrator, not a classic low pass filter, because its frequency response does not have a zero at Nyquist. The high pass ...


9

In general you can't simply subtract a low-pass filtered version of a signal from the original one to obtain a high-pass filtered signal. The reason is as follows. What you're actually doing is implement a system with frequency response $$H(\omega)=1-H_{LP}(\omega)\tag{1}$$ where $H_{LP}(\omega)$ is the frequency response of the low-pass filter. Note that $...


9

"Zero-Mean" is the word that's commonly used to describe signals and signals with a zero average. "This is a zero-mean filter." If you really mean a filter that is specifically meant to cancel the DC component, a "DC blocker" is a name for that.


7

A high pass filter will remove a large portion to all of the 0 Hz component or DC offset from a signal. That's similar to subtracting the mean average, which for a normally distributed signal will make around half of the signal negative (since it was below the original average mean). If you want the mean to be the same after a high pass filter, you could ...


7

In the $s$-domain, the LPF-to-BPF transformation doubles the order of the filter. that is because the LPF has one transition from passband to stopband, but the BPF has two such transitions. Remember that when we do frequency response, we substitute $s=j\omega$. That is, we evaluate the $s$-plane transfer function $H(s)$ as $H(j\omega)$. The magnitude of $...


6

The input to your filter is essentially a step function (since it has value 0 prior to t = 0, and a positive value for t > 0), so you see the step response of the filter, hence the initial ringing. This is expected behaviour, and after a suitable amount of time the step response will have settled to zero.


6

A high pass filter has some properties that are similar to taking a derivative. The derivative of a function that is always positive will be negative wherever the slope is negative. There's nothing you can do about it. For example, take the function $f(t) = 400 + \sin \omega t$. This wiggles around between 399 and 401 (very positive), yet the derivative ...


5

If the DFT is the Uniform sampling from $ 0 $ to $ 2 \pi $ then the first bin is given by: $$ x[k] = \sum_{n = 0}^{N - 1} x[n] $$ Namely it is the sum of all the samples. Hence in order to remove the DC (Mean) all you need is a filter which has zero in its DC bin. Since, the filtered signal, which is a convolution (Circular) of the DFT of the input signal ...


5

This is a first order, low pass infinite impulse response filter (IIR). It is some times called the exponentially weighted moving average. You can find the derivation on Wikipedia. Orfanidis' Introduction to Signal Processing gives a nice description as well. Don't think of it as high passing y and low passing x, this will lead to confusion. It is ...


5

For an LTI system another method to generate a highpass filter impulse response $h_{hp}[n]$, from an existing lowpass filter impulse reponse $h_{lp}[n]$ is the following: $$h_{high}[n]=(-1)^n h_{low}[n]$$ From the DTFT properties we can see that: $$h_{high}[n]=e^{j\pi n} h_{low}[n]$$ $$H_{high}(e^{j\omega})=H_{low}(e^{j(\omega - \pi)})$$ which would ...


5

They are both highpass type filters, but used with very different intentions. One should immediately observe the fundamental difference that the output of unsharp masking filter is an enhanced image to be viewed by humans, whereas the output of the Sobel (edge detector) filter is not an image to be viewed by humans, but rather a description of the edges to ...


5

In general there is no straightforward analytical solution. As you know, you need to solve $$\left|H(e^{j\omega_c})\right|=\frac{1}{\sqrt{2}}\tag{1}$$ for $\omega_c$, where it is assumed that the maximum filter gain equals $1$. For Butterworth filters, the specified cut-off frequency always equals the $3\textrm{ dB}$ frequency. This is not the case for other ...


5

A discrete-time first-order high pass filter with unity gain at Nyquist and a zero at DC is described by the following difference equation: $$y[n]=\frac{1+\alpha}{2}\big(x[n]-x[n-1]\big)+\alpha y[n-1],\qquad -1<\alpha<1\tag{1}$$ Its transfer function is given by $$H(z)=\frac{1+\alpha}{2}\frac{1-z^{-1}}{1-\alpha z^{-1}}\tag{2}$$ Evaluating the squared ...


4

If you want to detect the peak value of the time-domain signal, it is important not to change phase of each frequency signals. Otherwise, the peak value will be affected by it and will slightly change. I think you already have recorded signal and you can process it after the recording. If so, it is better to use zero-phased filters, like this function in ...


4

This is a first-order discrete-time Butterworth filter, which can be obtained via the bilinear transform from the following analog prototype filter (with normalized cut-off frequency): $$H(s)=\frac{s}{1+s}\tag{1}$$ The bilinear transform replaces $s$ by $k\frac{z-1}{z+1}$, where $k$ is chosen such that the discrete-time filter has the specified cut-off ...


4

Since you're after a filter which emphasizes abrupt changes you should use High Pass Filter. The issue is you'd be also sensitive to noise. Hence one way to do it is to apply High Pass Filter on slightly blurred image (Which actually results in a Band Pass Filter). One easy choice would be using the Gradient of The Gaussian Filter. Why is it? Because it is ...


4

General We assume 2 modes of filters: LPF or HPF. Classifying Filter Type Usually, if it is a well planned LPF and well Planned HPF a simple test will do. Calculate the sum of all coefficients. The sum of the coefficients is the first element of the DFT of the signal. It means it is the DC gain and well behaved LPF has gain of 1 and well behaved HPF have ...


4

Note that the pole locations would be the same for all $4$ classic types of frequency-selective filters (low pass, high pass, band pass, band stop). It's the location of the zeros that determines which filter type it is. Since we don't see any zeros, we can assume that they are at infinity, hence, the filter is a low pass filter. For a high pass filter you ...


3

Regarding scaling: If you sum up the coefficients, you get the magnitude for DC. Hence, it makes sense that you get those numbers ($\approx 1$ for LP, $\approx 0$ for HP). In addition to Matt L.'s excellent answer one can just point out that what he is using is referred to as magnitude complementary filters, which is the common case for linear-phase FIR ...


3

I agree that a large-order (12 taps+) high-pass Butterworth filter will be sufficient. Why? Well, Butterworth filters are commonly used in professional audio-editing applications to do filtering, because their frequency response is designed to be as flat as possible in the passband. This means that the filtered audio is of higher quality/fidelity, as ...


3

The simplest option is to remove the low-pass signal from the data. Just subtract the outcome of your code from the original image. This amounts to computing: $$I_\textrm{high} = \delta \ast I - g\ast I = (\delta -g) \ast I\,.$$ The term $\delta \ast I$ corresponds to the convolution of a Dirac delta to the image, which is an invariant operation. As the ...


3

out[i] = out[i-1] + (alpha*(in[i] - out[i-1])); From Wikipedia's article on Low pass filters: That is, this discrete-time implementation of a simple RC low-pass filter is the exponentially weighted moving average […] The loop that calculates each of the n outputs can be refactored into the equivalent: for i from 1 to n y[i] := y[i-1] + α *...


3

In addition to @MarcusMüller answer, you can find other names and historical details on this type of filter in Is there a technical term for this simple method of smoothing out a signal?. I will not rewrite the other answer, just give here a few aspects: This filter is so useful and common that its has several names, for instance first order exponential ...


3

Today I received an answer from the authors of the book. It turns out that figure 1.7a was wrong, and they sent me the updated one. The corrected diagram will be added in this Summer's update!


3

Filters generally can't just have a single cut-off frequency (otherwise their complexity will be huge). So a transition region is usually needed. In this case, the filter_stop_freq is that frequency below which the filter MUST act like a stop filter and filter_pass_freq is that frequency above which the filter MUST act like a pass filter. The frequencies ...


3

What you get as $x(\omega)$ is two $\mathrm{sinc}(\pi t) = \displaystyle\frac{\sin(\pi t)}{\pi t}$ shifted by $+\omega_0$ and $-\omega_0$ in frequency ($\omega_0 = 3 \pi$). By the frequency shift property of the FT: $$ \mathcal F\left\{x(t) \cdot e^{i\omega_0 t}\right\} = X\left(e^{j(\omega - \omega_0)}\right) $$ Then, remember $e^{i\omega t} = \cos(\...


3

Welcome to DSP Community. General We assume 2 types of filters: LPF or HPF. Classifying Filter Type Usually, if it is a well planned LPF and well Planned HPF a simple test will do. Calculate the sum of all coefficients. The sum of the coefficients is the first element of the DFT of the signal. It means it is the DC gain and well behaved LPF has gain of 1 ...


3

There are many approximations for the Laplacian Filter (See The Hypermedia Image Processing Reference - Laplacian/Laplacian of Gaussian): Indeed this is an High Pass Filter. Namely it will remove low frequencies (Specifically it will remove the DC Value, namely the output image will have mean value of 0).


3

In complement to Marcus, I have read the term "zero-sum": "zero-sum window", "zero-sum filter", "zero-sum kernel", the latter being more frequent. It is similar to "unit-sum windows", ie windows whose amplitudes sum to one. "Zero-average" can be found in image processing: Further note that applying ...


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