texts: The Fourier transform of sinusoids' products with possible other components

texts:
I know that in general it transforms the signal from the time to the frequency field but these specific cases seem pretty demanding. Do I calculate each part separately and then just leave them with convolution between them? Or do I have to calculate any integrals?
\begin{align}
&\frac{1}{t^2}\cdot\cos(2πt)\cdot\cos(2πt)\\
&8\cos(20πt)\cdot\cos(40\pi{t})\cdot\cos(80\pi{t})
\end{align}
For example for the second one will the result be
$$\bigg(4\big[\delta(f-10)+\delta(f+10)\big]\bigg)\star \bigg(\frac 12\big[\delta(f-20)+\delta(f+20)\big]\bigg)\star\bigg(\frac 12\big[\delta(f-40)+\delta(f+40)\big]\bigg)$$
Is that correct?


texts:
Is the log in log-power spectral features natural logarithm, or common log of base 10? does it even matter?
I found sources for how to calculate it, but they all call it 'log'.
no one mentions the base for the logarithm.

The answers provided for this question were insightful though I checked a few papers and finally realized that for log power spectral features (speech separation use cases), natural logarithm is used. though this is a very specific use case and both common base-10 log and natural log can be used in speech processing depending on the application.


texts:
I work with the K-LC6 microwave module. Previously, when the microwave module was assembled on discrete elements, the signal-to-noise ratio was 5. Now, with the transition to specialized microcircuits, this ratio has dropped to 2. What are some ways to extract a signal from noise or suppress noise to improve the signal-to-noise ratio?
The useful signal is in the 1 kHz band and takes ~ 1-10 Hz. Noise is evenly distributed in this band (1 kHz).
I tried two methods to improve the signal-to-noise ratio.

I split the 1 kHz band with bandpass filters into 10 bands at 100
Hz. When processing, I select the band with the maximum signal.
Since the noise is evenly distributed, and the signal is in one of
10 bands at 100 Hz, I manage to improve the signal-to-noise ratio.
The disadvantages of this method are that it requires computational
capabilities, and if the signal is at the intersection of 100 Hz
bands at this moment, I lose part of the signal.

Since the noise is quasi-stationary, I pass the signal through the
LPF 0.01Hz. Or further I get rid of noise according to this formula:
S = √ (A ^ 2-N ^ 2)
A - signal + noise
N - A passed through the low-pass filter of 0.01 Hz.
Thus, I seem to get rid of quasi-stationary noise, but anyway, some
movements with a frequency> 0.01Hz can penetrate the final
processing. The disadvantages of this method are that any movement>
0.01Hz can easily penetrate a useful signal.

Are there any other methods to improve the signal-to-noise ratio?


texts: How to merge 2 WAV files together? Can I take the average of the 2 audio file float values?

texts:
I'm trying to do one simple thing on Google's C++ Oboe library: pick 2 recordings and merge both. That is, make as if the 2 were playing at the same time.
Oboe works with Float numbers from -1.0 to +1.0. Can I simply do like this:
Audio1:
-0.2, -0.221, -0.23, -0.24, ...

Audio2:
-0.3, -0.23, -0.12, -0.87, ...

Audio Mixed:
(-0.2+-0.3)/2,  (-0.221+-.023)/2, (-0.23 -0.12)/2, (-0.24-0.87)/2, ...

?
That is, take the average of both audios into the new audio?
Is this how 2 simple audio files are merged together?


texts: Introductory book on time-frequency analysis?

texts: I'm looking for an introductory book to time-frequency analysis. The book should be practical in nature and not mathematics heavy. Suggestions?


texts:
From discussions all over the internet, I understand that in a 512 sample point fft, only the first 256 contain relevant information provided that my signal is real. The other half contains complex conjugates of the first half. I base my question on this discussion at stack exchange.

I'm trying to plot the fft of a wav file. I used 2 files - one wav file containing some music and another that was generated by scrip to play at 440Hz.
The fft plot of the 2nd (440hz signal) showed 2 peaks - one at 440hz and another at the other end of the plot. This was expected. However, plot of the music wav file was asymmetric. How can that be?

I used the file onclassical_demo_elysium_anonymous-elysium_the-young-false-man_small-version_live-and_restored found here. Scipy did not parse it properly first and I had to strip the meta tags using audacity before I could get it working.

I used print  and I got this for the 440hz tone :

[ 203395.00000000  +0.j          203395.08226712 -57.78564066j
203395.32901382-115.57039787j ...,  203395.74007235+173.35334037j
203395.32901385+115.57039784j  203395.08226713 +57.78564063j]

For the music file, I got this :

[[ 2.+0.j -4.+0.j]
[-1.+0.j -7.+0.j]
[ 0.+0.j -2.+0.j]
...,
[ 0.+0.j -6.+0.j]
[ 0.+0.j -2.+0.j]
[ 1.+0.j -1.+0.j]]

I don't think any of them are symmetrical! Or else the first and last values should coincide at least in the real part right?

And just for the sake of it, the 440hz signal plot :

I tried plotting abs(fft) - still asymmetrical. Also, why is the plot having both blue and green colors - real and complex parts?


texts:
I am looking over Blackman-Tukey method for Autopower.

It uses the DFT after a window is applied on a autocorrelation.

$$
Power Spectrum = \frac1{2\pi} \ \sum_{(k=-(N-1))}^{N-1}  w[k] R[k] e^{-i\omega k}
$$

Where does the $ 1/(2\pi) $ come from?
It's not from the Autocorrelation $R[k]$ or window $w[k]$ and it's not an inverse transform, it's forwards, so why require it here?
$e^{-i\omega k}$ why is this not the DFT exponential term of $e^{-i 2\pi kn/N }$
We seem to be missing an $n$?
Is this autocorrelation method 'biased' by division of $N$ (length of raw original signal) after the autocorrelation calculation?
I assume it must be to give a Power spectrum because if there was no
division of N it would be giving Energy spectrum.


texts: Why is signum function used to calculate Fourier transform of unit step function

texts:
I read in a standard textbook that the Fourier transform of unit impulse function is calculated with the help of approximations and signum function as the integration of unit impulse does not converge. What's so special about signum function that it is used to calculate Fourier transform? I tried to find out an approximation as:

$$
\lim_{ a \rightarrow 0 }
\int_{-\infty}^{+\infty} e^{-at} u(t) e^{-j\omega t} dt
$$

But I am getting wrong result. Why is this so?


texts: Validity of differentiation property of Fourier transform

texts:
we know the differentiation property of Fourier transform says that, if $$x(t)\longleftrightarrow X(j\omega)$$ then $$\dfrac{d}{dt}x(t)\longleftrightarrow j\omega X(j\omega)$$
We know that we can use this property to find Fourier transform of signum function $sgt(t)$, but cannot be used to find Fourier transform of unit step function $u(t)$.

My argument with intuition is that, we can apply this property only if the average value of the signal is zero. That is, $$\lim_{T_1\to \infty}\frac{1}{2T_1}\int_{-T_1}^{T_1}x(t)dt=0$$

Is this correct or any other validation exists?

Thanks in advance.


texts: Noise variance calculation for 16APSK Demodulator

texts:
I need to use approximate LLR algorithm for 16APSK demodulation. For that, I need to calculate noise variance which is given as

$Noise\;variance = \frac {Signal\;power\;\times\;Symbol\;time}{Sample\;time\;\times\;10^{\frac{Es/No}{10}}}$

I have the following informations
SNR = 10, Signal Power = unity.
Number of bits/symbol = 4,
Code rate = 8/9

How can I know symbol time and sample time values? If I have to assume, what are the typical assumptions?
And if Es/No = SNR? or it is dependent on  symbol time and sample time?
So far I have assumed Symbol time = Sample time.
Though I can understand symbol time, I am unable to comprehend the meaning of sample time in  this context.


texts:
I hope I can find some help here.

I have started working on a little project concerning voice recordings. What I would like to is: given two audio files in RAW format (or WAV, as long as I can convert them to arrays of bytes), I would like to overlap them, that it get the RAW signal that is roughly equivalent to playing them at the same time.

Being the complete newbie that I am at signal processing, the first thing I've tried, as soon as I was able to turn my files into arrays, was to average them arithmetically ((x+y)/2) and geometrically (sqrt(x*y)). Clearly both approaces return a shriek from hell. Now I was looking into convolutions, but I don't think it is the way to go. Last I thought I could go with FFT, sum themin the transform space and then convert back, but I'm not quite sure. So here goes:

How can I overlap two RAW audio signals? That is, given two audio signals that sound good by themselves, how can I produce a new audio signal that sounds as if the former were being played at the same time?

Hope it is possible to do it using RAW audio, but other suggestions are appreciated. Thanks


texts: Trouble Implementing Huggins Binaural Pitch

texts:
I'm trying to make an implementation of the Huggins Binaural Pitch illusion, which is where if you play whitenoise into each ear, but offset one ear by a period $T$ that it will create the illusion of a tone of $1/T$.

Unfortunately when I try this, I don't hear any tone.

I've found a python implementation here, but unfortunately I don't know python (I'm a C++ guy) and while I see that this person is doing some extra filtering work and other things, it's hard to pick apart which extra work may be required versus just dressing.

Here is a 3 second wav file that I've made:

stereonoise.wav

The first 1.5 seconds is white noise.  The second half of the sound has the right ear shifted forward 220 samples.  The sound file has a sample rate of 44100, so that 220 sample offset corresponds to a period of 0.005 seconds aka 5 milliseconds aka 200hz.

I don't hear a 200hz tone though.

Can anyone tell me where I'm going wrong?

The 160 line single file standalone (no libs/non standard headers etc) c++ code is here:
http://pastebin.com/ZCd0wjW1


texts: Techniques to reject noisy neural network input

texts:
Suppose an artificial neural network is used to approximate a sine wave (shown in red in the graph below), given the linear input variable $x$ (scaled such that the ANN input is $x_{\rm nn}\in[-1;1]$).

The mean squared error between the target function (sine wave) and the trained ANN output is as shown approximately $4.8\times10^{-3}$, if the ANN structure is 1-8-1 (one input $x_{\rm nn}$, 8 hidden nodes and 1 output node).

Now suppose the ANN structure is changed to 2-8-1, where the second input is normally distributed random noise. The output is then as shown below. The MSE has increased to approximately $1.2\times10^{-2}$ (using the exact same noise sequence as during training) or slightly larger if a new noise sequence is used when testing the network.

The results above were obtained using standard gradient-descent type training with regularisation. All nodes in the hidden layer have $\rm tanh()$ activation functions and the output node is linear, as is standard with function approximation.

What methods are available to automatically remove the second input?
That is, training methods allowing the ANN to automatically discover the fact that the second input is noise, and therefore not a useful input. (Therefore excluding all methods where the human programmer must train several different ANN architectures with different input combinations, and evaluate all of them to decide which inputs to use and which to exclude.)

This question extends to larger ANNs where it is difficult to see beforehand which inputs are useful. Ideally, all weights associated with nonsense inputs should automatically be forced to zero.


texts: Convolution by IIR filter, a case where circular convolution is allowed?

texts:
The question is, how to attain the frequency domain representation of any signal (which is finite, non-unit length) convolved with an IIR filter.

The correct answer in my opinion is that there is in fact no answer, which might seem very strange at first. But if we work through the math and use the property of circular convolution we of course will still get an answer.

So let's say our signal is simple discrete step function of the length N-1, starting at t=0, the frequency domain representation is then:

$$F(\omega)=\large e^{j \omega\frac {N-1}{2}}$$

To make the point clearer let's say the IIR filter is of the form. $h(n) = \cos(\omega_0 n)$, which converter to frequency domain is equal to:

$$
H(\omega)=
\begin{cases}
1, & \omega = \omega_0
\\ 0, & \text{otherwise}
\end{cases}
$$

Calculating the frequency representation of the convolution can be done using the formula $$Y(\omega)=F(\omega) H(\omega)$$

Where $Y(\omega)$ is the frequency domain representation of the convolution. However, there is a problem, convolving these functions necessarily results in time domain aliasing, as there is no possible way of having zeroes near the edges. And so, the aliasing occurs, thus the result is:

$$
F(\omega)  G(\omega)=
\begin{cases}
\large e^{j \omega\frac {N-1}{2}}, & \omega = \omega_0
\\ 0, & \text{otherwise}
\end{cases}
$$

In time domain the result is either sinusoidal wave or nothingness, depending on the frequency of the sine wave and width of the pulse we started with.

So continuing this line of thought, sine waves in LTI systems have linear response because of circular convolution (as without the fold back the sine wave would distort). This means that LTI systems properties are a completely theoretical construct, which we of course already knew since infinite sine waves with no end or beginning don't exist in real world. Either way, my line of thought is that you can't convolve an infinite signal using the equation, as no amount of infinities makes a signal fold back onto itself, as using the math will do (admittedly, I may be completely wrong on this). I will be trying to solve the equation for a case where the sine wave is casual next...

A frequency representation of a particular interval can of course be attained (which conviniently cuts the impulse response to a FIR, removing the funny things caused by infinities). The problem also disappears if the filter settles to zero after infinite time, which probably satisfies the definition of IIR, but is of no interest for the purpose of the discussion.

Am I correct on this or does letting the aliasing occur lead to the correct answer for the convolution functions in cases of infinite time functions? If that is the case, what is the rationale behind it?


texts:
I have several signals that consist of repetitive units. In the figure you'll clearly see the variability of the signals, that increases top down. The first signal is super repetitive and units are indicated with green lines.
In the third, you'll see peaks and in the middle a little insertion that I know consists of rather diverging units, which still are units however (red lines).
The remaining three signals display the variation more.

Which signal processing / machine learning tool should I use in order to detect these units? With thresholding it works to find the significant peaks, but once signals get funky it's really difficult to accurately detect unit positions.

Edit:

I made some progress with spectral analysis and plotted a filtered signal over the initial signals. Indicated by the blue arrow is a region variable repeats. Here, the amplitude of the original and filtered signal do not match. Same for the red arrow. Similar effects for signal further down.


texts: Even and odd components of a constant function

texts:
Let $x(t)= 1$ for all values of $t$. The even and odd components of $x(t)$ are ____ , _____
respectively.


texts: Due to the 16QAM and 16APSK characteristic, is there exact comparison between 16QAM and 16APSK BER?


texts: Is it possible to recover the original signal from an LC circuit?

texts:
I'm using some photo detectors called Silicon Photo-multipliers (SIPMs) which produce a signal like the following:

Now, I take this signal and pass it through an LC circuit to get the following result:

Now, my question is: is it possible to recover the original SiPM pulse, given that the only thing that I have available is its LC output?

Note: those are not the precise fits for my pulses, that's just an example of what they look like. I can post the actual signals, if required.


texts:
I am wondering if a baseband signal, which is can be defined as $s_{BB}(t) = I + jQ$, is at the same time an analytic signal. In my understanding, analytic signals are defined as $s^+(t) = s(t) + jH(s(t))$, where $H(s(t))$ is the hilbert transform of $s$.
So optically the formula for the baseband and analytic signal look very similar. The difference is, that the analytic signal does not have negative frequencies, whereas the baseband signal has negative frequencies.
So in my understanding, a baseband signal is not an analytical signal. Is that correct?
Another related question that I have: I have read in a book that it is possible to send an analytic signal via 2 cables to a different location. This is like sending an IQ baseband signal somewhere which is modulated to a higher frequency. I have never seen an application where this is done (probably because I only deal with digital transmission systems). I think it would always make more sense to send the IQ baseband signal across the wire, because it uses lower frequencies. But maybe there are applications that I am not aware of?
Edit: I have found this https://en.wikipedia.org/wiki/Analytic_signal#Complex_envelope.2Fbaseband
it says "This function goes by various names, such as complex envelope and complex baseband." So I guess that answers the first part of my question with "yes, a downconverted analytic signal is called complex envelope or complex baseband"


texts: How to approach detection of anomalies in a video feed?

texts:
As part of a project I have a video from a quadrotor that captures the road and the environment around it and I want to identify and detect potholes and speedbumps on the road using image processing. What is the best approach for this?

Here is what I've done until now.

The video feed is converted into grey scale and I use one particular portion of it(marked by the blue rectangle) for processing. In that window, I again get smaller windows of and I calculated their corresponding Grey Level co-occurrence Matrix (GLCM henceforth) of all those windows. I calculated the textural features from the GLCMs like ASM, erratic homogeneity etc and I plotted them as well.

I did this with the hope that there will be some kind of obvious change in the features when the blue rectangle reaches the speed bump(which is slightly ahead in the image). But the results erratic and I cannot make a definite decision.

If there is any other approach, or if there's any change I could implement to get better results in the same method do let me know.


texts: Kalman Filter - Updating the Covariance Matrix Step

texts: I am trying to simulate the Kalman Filter. I have the covariance matrix P_{0|0}. Tell me please, how can I get the predicted (a priori) estimate covariance matrix on the (k-1) step? P_{k-1|k-1}?


texts: Matlab stores all level of Wavelet's Approximation & Details in a single Row

texts:
I'd like to ask when we apply Wavelet transform on 1-D Signal in Matlab it simply stores both Approximations and Details into a single row which is quite annoying for me,

have a look,

Where,

X = original Signal
cDn = Details coefficients
cAn = Approximations

This is how Matlab do it,

Suppose I have a random sequence,

X=[2 2 3 100 4 0 98 100 90 2 3 67 98 0 6 6 89 9 21 78]

If I apply 2-level Wavelet transform on this signal it will be decomposed in to cA1 and cD1. cA1 will then further decomposed into cA2 and cD2. But matlab will store all these A's and D's into a single row. Have a look what matlab will do to the resultant coefficients after performing Wavelet Transform on it.

X = 20 Samplesc  -> cD1 = 10 Samples
                    cA1 = 10 Samples
                                     -> cD2 = 5 Samples
                                        cA2 = 5 Samples

Rows = 1
Columns = 20

Column 1 to 5 =   cA2
Column 6 to 10 =  cD2
Column 11 to 20 = cD1

Why Matlab does that ? Why it doesn't decompose signal in Rows since that would be easier to represent.


texts: How can I remove the central line; there is someone told me use high-pass filter, is that right? how to use it in matlab


texts: Bandpass Filter Order vs Sample Numbers of Noisy Signal

texts:
I'm working on signal filtering in MATLAB. i wrote sample code that generate 50 Hz signal with some noisy frequency and use Kaiser bandpass filter to get only 50Hz frequency. this code work great! but there is a big problem!

Sample Rate is 2000 Hz and Filter Order is about 39000 , and my signal length is 50000 samples! in other hand i have to wait about 25 seconds to gathering my signal! that is too long time!, if i decrease signal length ( to about 6000 samples ) filter result is so noisy because of filter order. if i decrease filter order , filter signal result is too noisy too! the best time that i cloud wait for gathering data is about 3 seconds.

is there any way to get same result with 6000 samples of signal and high order filter? ( 39000 )

thanks.

Fs = 2000;                    % Sampling frequency
T = 1/Fs;                     % Sample time
L = 50000;                     % Length of signal
t = (0:L-1)*T;                % Time vector

Hd =  KAISERFilter;

for i=1:50

a = 5;
b = 500;
r1 = a + (b-a).*rand(1,1);
r2 = a + (b-a).*rand(1,1);
r3 = a + (b-a).*rand(1,1);
r4 = a + (b-a).*rand(1,1);

n = r1 *sin(2*pi*49.2*t) + r2 *sin(2*pi*50.5*t) + 0.1 * randn(size(t)) +  r3 *sin(2*pi*15.5*t) +  r4 *sin(2*pi*110*t) ;
x = 30 *sin(2*pi*50*t); % main frequency
y = x+n;

subplot(2,1,1);
plot(y)
title('Signal')
xlabel('time (milliseconds)');

yf = filter(Hd.Numerator,1,y);

and Kaiser filter code is :

function Hd = KieserFilter

% All frequency values are in Hz.
Fs = 2000;  % Sampling Frequency

Fstop1 = 49.5;              % First Stopband Frequency
Fpass1 = 49.9;            % First Passband Frequency
Fpass2 = 50.1;            % Second Passband Frequency
Fstop2 = 50.5;              % Second Stopband Frequency
Dstop1 = 1e-06;           % First Stopband Attenuation
Dpass  = 0.057501127785;  % Passband Ripple
Dstop2 = 1e-06;           % Second Stopband Attenuation
flag   = 'scale';         % Sampling Flag

% Calculate the order from the parameters using KAISERORD.
[N,Wn,BETA,TYPE] = kaiserord([Fstop1 Fpass1 Fpass2 Fstop2]/(Fs/2), [0 ...
                             1 0], [Dstop1 Dpass Dstop2]);

% Calculate the coefficients using the FIR1 function.
b  = fir1(N, Wn, TYPE, kaiser(N+1, BETA), flag);
Hd = dfilt.dffir(b);


texts: How to calculate the Fourier transform of a mean filter in Matlab?

texts:
In Matlab, how can I calculate the discrete-space Fourier transform of a mean which takes the average of 4 adjacent points, with this kernel

$$\begin{pmatrix}
      0 &1& 0\\
      1 &0& 1\\
      0 &1& 0\\
\end{pmatrix}$$


texts:
Consider an LTI system whose impulse response is $$h[n]=\frac{1}{2^n}u[n]+\frac{1}{3^n}u[n]$$
The input signal to this system is $x[n]$ and is null for $n<0$ but may or may not be null for $n=0$.

I found the difference equation, which turned out to be $$y[n]-\frac{5}{6}y[n-1]+\frac{1}{6}y[n-2]=2x[n]-\frac{5}{6}x[n-1]$$

Then the instruction goes as follows:

  It is desired to compute the output $y[n]$ for $n=0,1,...,1000$ with the input signal being the same $x[n]$. Determine the impulse response $\hat{h}[n]$ of the minimum-sized FIR system whose output $\hat{y}[n]$ equals $y[n]$ for $n=0,1,...,1000$ and find the difference equation of that FIR filter.

I don't know for certain how to deal with this. My first attempt consisted of establishing that

$$\hat{h}[n]=\left\{
 \begin{array}{ll}
  h[n]  & \mbox{if } 0\leq n\leq 1000 \\
  0 & \mbox{otherwise }
 \end{array}
\right.$$

I don't know if that is correct. I just thought that, due to the causality of both $h[n]$ and $x[n]$, the convolution between them would be exactly the same for the first 1001 values if $h[n]$ were cut off at $n=1000$. I named $\hat{h}[n]$ that cut-off version of the first impulse response. Nevertheless, I'm really doubtful about this reasoning. On top of it, I don't even know if that response is the shortest possible as I am asked to find in the exercise.

Assuming that the expression above for $\hat{h}[n]$ is okay, it can be expressed as $$\hat{h}[n]=\frac{1}{2^n}(u[n]-u[n-1001])+\frac{1}{3^n}(u[n]-u[n-1001])$$

After some algebra, that equation becomes impossible to deal with. The $\hat{H}(z)$ has a 1001st grade polynomial in its numerator and a 2nd grade one in its denominator. Because the filter is a FIR one, those poles should be cancelled by two of the zeros of the numerator, but it's just impossible to find the zeros of a 1001st grade polynomial, so I really don't think that this is the way to solve this problem.

Any ideas?

Thanks for your time!


texts: Is there a good method to extract a reference sin/cos from a group of signals?

texts:
For the removal of a pure interference from a group of sampled signals, if I know the exact frequency of the interference I can simply use an I/Q demodulation technique (i.e., a phasor projection) to calculate it and remove it from the signals of interest. But I don’t have a pure version of the interference so I need to derive it from the data.

I know this is related to clock recovery, but with limited signal record lengths  any control loop (e.g., PLL or DLL) would be problematic.

So far I have simply hacked together an ad-hoc relatively long sequence of bandpass filtering, limiting, bandpass filtering, normalization for the I reference and afterwards all-pass filtering/Hilbert transform and normalization for the Q reference. It seems to work, but it’s too much of a hack. And it gets complicated if there are multiple interferers.

Is there a better/simpler way to extract these references?

If not, what would be a good alternative for simple bandpass filters? (as the requirements for these are quite stringent.)

If this was implemented in a real-time system (continuous data stream) instead, would you go the PLL/DLL route, or would this technique be good enough or even equivalent?

Although the most common method to remove these types of interference is to use a notch filter, the ringing in the impulse response of such filters is unacceptable for many applications.

This is particularly true for applications in which an intentional impulsive large artifact is present.


texts: Advise on detecting anatomical landmarks in a CT reconstructed volume

texts:
I'm trying to automatically detect some medical defined anatomical landmarks in a CT reconstructed volume. Medical doctors use these landmarks to measure some patient specific parameters.
I have attempted to use the SIFT feature descriptor, since these anatomical landmarks are kind of "keypoints". This did not work very well since the landmarks are points (or tiny regions) that are in general not "interest points" as defined by SIFT.
I have been looking many pattern/template matching algorithms but, when I do not have rotation/translation/scale problems, I find that the extracted features do not differentiate each landmark enough (from the rest of the landmarks and from the rest of the non landmark patches) to train a classifier that performs well enough (at least an 80% of detection accuracy).

Please let me know if I'm not stating the problem clearly enough.

I would really appreciate any advise.

Thanks!

Example image:

The small x crosses and little squares are over the landmarks I want to detect (I forgot to mention that I have a training set, with the labeled landmarks). The white lines represent the measures taken. These are some slices of different cases (of course, I cannot post the full 3D volume).


texts: bibliography about implementation of IIR filters

texts:
I need to implement a 6th order IIR filter. The filter I need to implement is the A-weighting. I've simply used the bilinear function of Matlab with an fs of 20Khz. I need to implement this over the LPC1769 micro-controller. The application is mainly the filter and the communication with the ADC and the LCD to show the RMS value of the signal after being processed by the filter.

I've been reading the book "Real-Time Digital Signal Processing..." of Kuo, but I need more detail in the implemetation considerations.Could you recommend me some books or papers about this?

I would like to know more about how to implement filters, the implications of the ordering choise of the biquad stages, or the meaning of the parameters that are used in the fdatool of matlab at the moment of quantizing a filter.


texts: Zero State and Zero Input Responses from Steady State Response

texts:
Let a linear, time-invariant, causal discrete linear system be described by the following difference equation:

$$y[n] = 0.9y[n-1] + 0.1x[n]$$

Assuming that $y[-1]=2$ and $x[n]=20\cos(\Omega n)u[n]$, $\Omega = \omega T_s = 0.2\pi$, find the total response, identifiying the terms related to the zero state and zero input responses.

I've found the transfer function of the system to be:
$$H(z) = 0.1\frac{z}{z-0.9}$$

and from it I've determined the magnitude and phase of the steady-state response:
$$|H \left(e^{j \Omega}\right)| = \frac{0.1}{\sqrt{1.81-1.8\cos(\Omega)}}$$
$$\angle H \left(e^{j \Omega}\right) = -\arctan\left[\frac{-\sin(\Omega)}{1-0.9\cos(\Omega)} \right]$$

Therefore the steady-state response of the system is:
$$y_{ss}[n] = 20 \frac{0.1}{\sqrt{1.81-1.8\cos(\Omega)}} \cos\left(\Omega n -\arctan\left[\frac{-\sin(\Omega)}{1-0.9\cos(\Omega)} \right] \right)$$

$$\therefore \boxed{y_{ss}[n] = 3.363\cos(0.2\pi n + 1.138)}$$

But how do I find the total response (zero state and zero input) from the steady-state response?


texts: Rough estimate of how close a human speaker is to a microphone?

texts:
Is there a known technique for estimating how close a human speaker is to a single microphone? I'm hoping that there is a known technique that can analyze an incoming audio signal that contains a human voice with typical ambient room noise, and give a rough estimate of how close the speaker is to the microphone. Is there an algorithm/formula that can analyze such a signal and look for early reflections/reverb and then give a quality measurement back? Note, I am not looking for an estimate in units of distance (3 feet, etc.), just something that would tell me if the speaker is right on top of the mic, near the mic, far from the mic, or really far from the mic. Also, if it simplifies things, I can safely make the assumption that the speaker's voice will be significantly louder than any other human voice in the room.

Any papers or especially open source libraries would be fantastic.

PREREQUISITE: I would assume that an algorithm/formula that can detect if there is a human voice of significant volume present in an audio source would be a prerequisite for making the above quality measurement. Any information or resources along those lines would also be greatly appreciated.


texts: Why reprojection error is minimized instead of triangulation error for bundle adjustment?

texts: For bundle adjustment optmization why is reprojection error minimized instead of traingulation error or ray-to-3d point error? Disadvantage with reprojection error is: for perspective camera, its highly dependent on depth of the camera from the point in 3d right.


texts: Suggest an image segmentation technique to find the paste radii?

texts:
I am new to MATLAB/Digital Image Processing. So pardon me for any typing errors or wrong use of jargon.

1) I am trying to find the paste diameters for a total of 100 images in sequence. I am posting only one of the RGB images here.

2) I have attempted using imfindcircles and regionprops to find the diameters. imfindcircles demands a min and max radius range and since I have evolving paste diameters (for 100 images) it does not seem to be applicable. After some image segmentation and applying regionprops, the diameters were also not accurate.

3) What I have achieved so far using the image segmentation techniques is:

using the following code:

A = imread('ref.jpg');
I = imsharpen(A);
I = rgb2gray(I);
I = imadjust(I);
I = im2bw(I);
I = imcomplement(I);
I = im2bw(I, .8);
I = bwareaopen(I,2000);
nhood = true(9);
I = imclose(I,nhood);
I = imfill(I,'holes');
I = imcomplement(I);
I = bwareafilt(I,1,'largest');
imshow(I)

4) But I actually require is this (A perfect circle). With this I can find the pixel area and then the diameters:

5) Please suggest an alternate way to measure the diameter of the paste or help me reach step 4. I need to segment it from the mould (noise) above. Also I would like to reiterate that I have a bundle of images so any user-defined technique such as imdistline wont work.

Please let me know if you have any follow-up questions

Thankyou


texts: Plotting convoluted and original signals on the same graph

texts:
So I have a frequency response (got it by windowed fft-ing) of a note E4 played on a guitar and now I'm trying to implement a dynamic threshold for finding the peaks (fundamental frequency of the note and its harmonics).

I found an article that describes doing it by convolving normalized Hamming window with the frequency response. Now, I've done it, but I just don't know how to plot it correctly as the convoluted signal is delayed for a few samples like this (the red one):

Here's the code in Scilab:

// plot the frequency response
x_axis = linspace(0, Fs, row);
plot(x_axis(1 : $/2), win_response);

// calculate convolution on each window, siggram_n is just normalized
// matrix of windowed freq. response
[rows_sig, cols] = size(siggram_n);
conv = [];
for i = 1 : cols
    conv = [conv (convol(siggram_n(:, i), win_response))'];
end

// calculate the average of all convolutions
[rows, cols] = size(ko);
conv_n = [];
for i = 1 : rows
    conv_n = [conv_n sum(conv(i, :))/cols];
end

// raise to the power of 0.7 to flatten the threshold - from the article
conv_n = conv_n .^ 0.7;

// plot the convoluted signal
x_axis = linspace(0, Fs, 2*length(conv_n));
plot(x_axis(1 : $/2), conv_n, 'red');

It's not only important that I know how to plot this, because I'll need to find the peaks, so I have to somehow "synchronize" both signals. What am I doing wrong?


texts: I am reading the paper "Algebraic Signal Processing Theory: Foundation and 1-D Time". In   page one, the first paragraph of second column, I did not get why shift invariance forces the algebra $A$ to be commutative? Is it taking about a  particular  signal model $(A,M,\Phi)$ or it is considered  a general case?


texts: Difference Fourier Shift Theorem and Cross Correlation Theorem

texts:
can someone explain me the difference between the Fourier Shift Theorem and the Cross Correlation Theorem?

  The shift theorem says that a delay in the time domain corresponds to a linear phase term in the frequency domain

source

So in case of image processing I can find out the shift of two images, which are shifted against each other. I only need to calculate the normalized cross power spectrum of this two images and do an invers Fourier Transform to get the peak, which represents the shift of these to images.

The Cross correlation Theorem says

  the cross-correlation between two signals is equal to the product of fourier transform of one signal multiplied by complex conjugate of fourier transform of another signal.

source

So what is the difference between these two theorems?

With both I can for example calculate the shift between two images. I can do it, in both ways, with the Phase Correlation (cross-power-spectrum), right?


texts: Autocorrelation of Addition of Two Independent Signals

texts:
Given a random signal $ Z \left( t \right) $ which is addition of two independent signals $ X \left( t \right) $ and $ Y \left( t \right) $ with constant parameters $ a $ and $ b $:
$$ Z (t) = aX(t) + bY (t) $$
If the auto correlation function of $ R_{XX} \left( \tau \right) $ and $ R_{YY} \left( \tau \right) $ is known (Assume both are Stationary Signals).
What would be the Auto correlation function of $ Z \left( t \right) $?
Is it given by (I skipped the steps):
$$ {R}_{ZZ} \left( \tau \right) = a^2 R_{XX} \left( \tau \right) + b^2 R_{YY}\left( \tau \right) $$
I neglected the $ {R}_{XY} \left( \tau \right) $ contribution because it is zero as $ X \left( t \right) \perp Y \left( t \right) $ (Independent Random Signals).


texts:
Question: The following  sentence is not clear to me (especially why down-shift occurs). Could someone explain it please?

On the other hand, downsampling the output of the highpass filter down-shifts the high-frequency
band and expands it to the full range $|\omega| < \pi$.


texts: In which way do image transformations change camera extrinsics?

texts:
Given a pinhole camera model, we have an image and according camera intrinsics K and extrinsic parameters R.

When we scale the image or crop it, the corresponding camera intrinsics K change in ways that can be found in literature.

However, assume we transform or distort the image using a projective projection Q. How do the intrinsic parameters K of the camera change?

For further reference, Q is generated by K * U * K^-1, where U is a rotation matrix.

The projective transformation is illustrated in the two images below:

The transformation used in this example is a slight rotation around the vertical axis.


texts: How to generate a signal which frequency are obtained?

texts:
I want to generate a signal which frequency are obtained.
For example,I want the frequency domain similiar to this one:

So I use the following code:

fs =44100;
t = 0:1/fs:4;
f = 800 + 500*sin(2*pi*t);
x = sin(2*pi*f);
plot(t,x)

But using Adobe Audition to visualize its spectrogram.

It looks different from my hope.
So how can I generate a signal if already have freqency?


texts: Is there such a thing as a continuous phase BPSK?

texts:
My knowledge of signals and signal processing is limited, so I apologize in advance for my naïve and possibly confusing question.

In the case of BFSK, the frequencies are altered to represent the data (1's and 0's). The frequency transitions are abrupt. You can use Continuous Phase BFSK to "line up" the transitions in frequency.

Now, for my question: lets say I am using BPSK which uses changes in phase to represent the data. If the phase changes from 0 to 180 (or vice versa), wouldn't that have a similar abruptness as BFSK? Is there something I can do, similar to CP BFSK to smooth the transition out?


texts: How to create a control loop using a 100Msps digital signal as input

texts:
I would like to know what type of microcontroller should I buy for this control loop task.
Scenario:
I have a digital signal coming from the following equipment:
$\boxed{\text{Ultrasonic}\\\text{transducer}} \longrightarrow\boxed{\text{ADC}}\longrightarrow\boxed{\text{DSP Board}\\\text{(some high and low pass filter)}}\longrightarrow\boxed{\text{USB 2.0}\\\text{(40MBPS) output}}$
I want to be able to use this digital signal coming trough USB as input in my controller and calculate the TOF (time-of-flight) of the echo and react with my controller every $1\textrm{ ms}$ or less using a PID control law.

How should I deal with this digital signal output in my microcontroller, to be able to detect the echo in generate a reaction in less than $1\textrm{ ms}$?

Any suggestion of microcontroller that I could use for this task?

And how can I deal with such high speed input?


texts: Image Processing: How to detect a quadrialteral signboard in image?

texts:
How can I detect a quadrilateral signboard from an image captured using a mobile phone?
How can i detect shapes like rectangle? rounded rectangle (rounded corners instead of shape corners)?

I am using opencv.wrapper  but i am new to it.

Thanks.

Here is the sample:
alt text http://www.freeimagehosting.net/uploads/b03442fd36.png

alt text http://www.freeimagehosting.net/uploads/e6b36040e8.png

Due to the noise and many lines there, i am not able to determine which is the boundary line of the signboard. Sometimes I can find the boundary of the lines after hough transform. I am trapped....in this kind of scenario...

This is the 2 raw pictures taken from mobile phone camera

alt text http://www.freeimagehosting.net/uploads/6dbd613edf.jpg
alt text http://www.freeimagehosting.net/uploads/720da20080.jpg

I need ya advice to see how i can process the image to get the signboard out?

Thank you very much


texts:
Can any one help me understand why there is a shift in Q values? It seems there is a DC offset/bias. How do I remove it or set it accordingly to make it equal to the I values/waveform? I am using a custom HW with LMS7002m
RF chip.
I am generating a single frequency sine wave at 2.47GHz using the internal test signal generator. I am attaching the plots I vs sample, Q vs sample , I vs Q.

However if I enable the DCLOOP_STOP in register 0x040C, I get the following plot. The Q values get adjusted after 61250 samples. This remains fixed each time I run, the Q values get adjusted around 61250 samples I am not sure where this value comes from and why is this behaviour.


texts:
Let me preface this question with the fact that two hours ago I had no idea what a cloud point was. I do however have a solid mathematical background although geometry has never been my focus. I do know a lot about search trees, distances and space partitioning which I feel like would be useful for the potential solution to a problem I'm facing.

I have a 3D scanner that with high accuracy can generate a point cloud. Let's say I have a database of a number of objects in the range of 10,000. The way these are stored depends on the solution, but they could be point clouds themselves scanned by the 3D scanner, actual 3D models or perhaps even another representation of the object.

What I'm looking for is to match the newly scanned object to the 'closest' or most resembling object from the database and preferably tell me if there is no match as well (although this could just be some threshold I have to empirically set). I don't know if this is feasible in theory, feasible computationally or even reliable but I'm very interested if this is, I don't really know what to look for or where to start.


texts: Intersymbol interference due to limited channel bandwidth

texts:
What is the difference between limited-bandwidth induced intersymbol interference (ISI) and ISI due to multipath propagation.
I noticed that the delay spread in indoor environment is in the range of nanoseconds, and is smaller than the symbol duration, yet ISI problem appears. Is this due to the limited bandwidth of the channel? Are there other causes for ISI?


texts: DCT of 4x4 checkerboard matrix - what's the correct result?


texts: How can we calculate the frequency response of each filter of a Discrete Wavelet Decomposition filter bank?

texts:
I am using the Multilevel Wavelet decomposition. The decomposition results in a filter bank such as the following:

Specifically, I am using one of the Daubechies wavelets, db7.

In reality Level 2 coefficients are the result of filtering by $\ g(n)$ then down-sampling and filtering by $\ h(n)$. Suppose that the whole operation I described above is a single filter ie. at each level the coefficients get generated by a single filter.
I would like to know how to calculate the frequency response of those filters at each level.

Is it correct to feed an impulse, i.e a Kronecker Delta function to the wavelet decomposition and then compute the Fourier Transform of the resulting coefficients ?

Thanks

PS: The same question has been asked here and the response was to get the convolution of the impulse response of $\ g(n)$ and an up-sampled version of $\ h(n)$. What puzzles me in that response though, is why divide by $\sqrt2$ the result of the convolution. Also, it seems like more code compared to just calling the wavelet decomposition routine with a Kronecker delta function.


texts: Relation between Fourier phase and Analytic Signal Phase

texts:
Do you know if there is a relation between the
phase of the Fourier Transform and the phase of the Analytic signal?
I mean, if i have a signal s(t)  then...
FT_s=FFT(s(t))
phaseFourier=atan(Imag(FT_s),Real(FT_s))

A_s=s(t)+iH(s(t))
phaseAnalytic=atan(Imag(A_s),Real(A_s))

Then...
phaseFourier= ?(phaseAnalytic)

ThankYou


texts:
I'm currently working on the development of deep learning methods for online artifact removal from EEG signals. I'm interested in removing common biological artifacts such as EOG and EMG individually from a 16-channel EEG signals.
Rather than training a model to detect artifactual epochs and then using a BSS method (such as ICA or CCA), I want to investigate how a deep learning model (such as a convolutional autoencoder) can be trained to reconstruct a denoised version of the input.
Something very similar has already been done by Leite et al. and Zhang et al. in which the common methodology is:

use clean EEG recording as ground truth and divide it into epochs
use dedicated noise recordings (for example ocular movements) and divide them as well
sum a linear combination of EEG epoch and noise to obtain the desired SNR
Train the CNN by giving the noisy epoch in input and use the clean epoch to compute the loss

However, in my opinion, this approach does not translate well to online processing for the following reasons:

The previous method only learns a function to filter the epoch and cannot detect which epoch is contaminated
In online processing, a circular buffer (e.g. 1 second) can be stored and fed into the network to predict the clean sample at time t. Then the buffer slides ahead of one time step. The problem is that the artifact in this case is not centered in the window, but instead can contaminate from 1 to many samples.
The training is also problematic, by using a sliding window with stride 1 sample to obtain the inputs for the model, the percentage of clean and artifactual inputs will be highly unbalanced in favor of the former. This will likely results in the model learning how to reconstruct perfectly the original EEG signal (like an autoencoder) but failing to filter correctly the noise.

I would like to see your opinions regarding the doubts I listed above and how you would approach a problem like this (which changes or corrections). Any kind of suggestion is welcomed as well.
Thank you for your time.


texts: Forecasting with ARMA models, from a filter point of view

texts:
ARMA
 models are afaik just filters with transfer function
$ {MA(z) \over AR(z)}  \equiv {FIR(z) \over IIR(z)} $ .
However forecasters of stock prices, market trends ...
seem to be mainly statisticians, with their own vocabulary and culture.
For example, "signal-to-noise ratio" is rarely mentioned;
for another, differencing must increase noise.
Can anyone suggest either

textbooks or introductory courses on ARMA forecasting
from a filter or signal processing point of view
websites with real time series and running code to ARMA-model them ?

(I'm interested in ARMA models for prediction, not in spectral analysis as such.
ARMA models may well be wrong for prediction from short, noisy data --
what will the economy do next year ? --
hence the need for real examples.)

Added: Some 40 years ago, R.W. Hamming wrote
in Digital Filters:

  ... We have a predicting filter without finding, or even talking about, the transfer function.
  Statisticians often do this,
  and neglect to examine the corresponding transfer function of the formula,
  which can often shed some light on the whole system.


texts: How to deduce the transfer function from its nyquist plot

texts: Say we have the Nyquist plot corresponding to an unknown transfer function , is there a way to deduce the zeros and the poles of this transfer function or at least know what order is the denominator ?


texts: Which channel coding technique is suitable for wireless SPIHT compressed image: Reed-Solomon or convolutional code?

texts: I want to transmit a SPIHT-based (Set Partitioning In Hierarchical Trees) image compressed image over a wireless fading channel, which will be suitable as channel coding technique: Reed-Solomon or convolutional code?


texts: How to determine if output signals represent the same process with different unknown random inputs

texts:
This is a question about how to determine if two different output signals represent the same process with different random inputs.  This is related to validating ship motion modeling. When ship motion is modeled, using inertia and hydrodynamic equations, the resulting motion can be evaluated for a specified time history of a wave field. The question is how to determine if the ship model motion represents an actual ship where the ocean wave motion is not known and only the ship motion is measured? There are two sets of motion data, one set is output from ship model simulation, and the second set is measurements of the ship motion at sea. Is there a way to determine if these two sets of motion represent the same ship response, just driven by different forcing?  Let's assume that the ship motion is a linear operator.

This is not a navigation problem about the change in speed or heading due to propeller or rudder inputs.  The question is for the case of fixed speed and heading, what is the ship motion that results primarily due to ocean waves.  The model has fixed propeller speed with rudder feedback to maintain course.  The model also has an ocean wave spectrum with a prescribed wave heading.  The measurements on the ship are the inertia measurements of pitch, roll, heave, and heave velocity, and long/lat.  Previously significant motion values were used to compare two different models, but the significant motion (mean top 1/3) don't compare very well.  I was thinking of comparing the histogram of motion and/or the frequency content, for a fixed time period, like five minutes.

Given two linear processes, L1, and L2, with measured outputs X1 and X2, to unknown random inputs Y1, Y2.  Can the similarity of L1 and L2 be determined from the outputs X1 and X2?


texts: Taking audio frequency and picking out peaks (Peak Detection)

texts:
So I have a unique challenge. I want to take an audio file, and pick out the peaks in the samples and plot that onto a graph. Each point based on the amplitude/pitch(?) will be represented as either a small dot (lower amplitude) or a bigger dot (higher amplitude).

So if I had to look at a drum track, I should notably see big dots where the drum is hit, but smaller dots when a cymbal is hit.

From a technology stack perspective, I am using Python - and using a Library called Aubio (although I am not sure if there is a better library out there).

EDIT:

Forgive me on the lingo - very new at this audio stuff.  Okay so the issue I have currently is that I have a waveform graph that shows the samples over time using a standard sampling technique.

But I found an article on Peak detection, which is exactly what I am looking for (I think).

The challenge I have now is pulling those peak values out via Python and Aubio and plotting them on a Graph.


texts: How to envelope a non periodic Impulse signal?

texts:
I want to analyse a trc oscilloscope file, find impulses and envelope them. In the end I want to plot the envelope.

data file (trc): https://ufile.io/z4m4d

Code: (Python)

import matplotlib.pyplot as plt
import pandas as pd
import readTrc
import numpy as np
from scipy.signal import hilbert

#Read trc file
datX, datY, m = readTrc.readTrc('C220180104_ch2_UHF00014.trc')
srx, sry = pd.Series(datX * 1000), pd.Series(datY * 1000)
df = pd.concat([srx, sry], axis = 1)
df.set_index(0, inplace = True)

#Impulse location
x1 = df[1].idxmax() - 0.0005        #numeric used to show area before impulse
x2 = df[1].idxmax() + 0.003         #numeric used to show area after impulse
df2 = df.loc[x1:x2]

#Locate Maximum
print('Maximum at:', round(df[1].idxmax(), 6), 'ms')

#Plot Impulse (abs)
df3 = df2.abs().interpolate()
df3.plot.area(grid = 1,
              linewidth = 0.5)

#Envelope
signal = hilbert(df2)
envelope = np.abs(signal)
df4 = pd.DataFrame(envelope)
df4.plot(color = 'red')

plt.xlabel('Zeit / ms')
plt.ylabel('UHF-Signal / mV')

##plt.savefig('UHF_plot.png', dpi = 600)
plt.show()

print('done')

The Output does not look like an envelope.

Plot:

The hilbert function produces this (it does not look like an envelope):

How would I get something like this:


texts: Why not use synthetic datasets for training machine vision (deep learning) algorithms?

texts:
I am studying some examples of how to perform 3D instance segmentation in indoor scenes, and I have noticed many of the available datasets are from real environments. I was wondering with the availability of animation and computer graphics why people don't use these methods to create datasets ?
For one thing they are much, much simpler to annotate (for example for instance segmentation) since we already know the objects in the scenes. And we will have a lot more variety in the dataset since we have a much bigger freedom in in choosing and manipulating the objects in the scene (type of objects, color, lighting).
I do understand that for some more advanced tasks like analysing how humans interact with the environment the animations would be less realistic, but for tasks like instance segmentation it seems to me that the datasets would be accurate enough.
I do understand that creating these scenes (specially if we want to create an animation) could also be time consuming but wouldn't that be offset by the ease of annotation ? (specially for 3D scenes)
So what am I missing here ? why don't we have more of these types of datasets ? what is the drawback of using such a dataset ?


texts: How much is the chance for a pure mathematician (geometer) to get a postdoc in imaging if he switches fields after Ph.D. and apply for one?

texts:
Before I start my question, I should probably mention that this question might not be the right question to ask here, but I tried academiabeta, and stackoverflow, but without getting any to-the-point responses. I also noticed that there were some questions of similar interest asked here, but mine is little different and more subject/situation-specific. Also I am afraid my question might be a little too long, pardon my slightly unnecessary detail!

Here is my situation: I am a pure mathematician finishing Ph.D., working in Riemann surfaces, Teichmueller theory and differential geometry (with published papers in decent journals), having backgrounds in these topics and some PDE and topology and have some introductory knowledge about programming. I have been wanting to switch to little more applied areas (described below) because: 1) I believe getting posts and grants are slightly easier in there, 2) my postdoc hunting in pure mathematics have resulted in vein (despite getting shortlisted twice in Europe). I wanted to switch later anyway but reason 2) is forcing me to think of it now.

By applied areas, I meant areas like medical imaging, computer vision or even theoretical biology (there are interesting works of Prof. Robert Penner on moduli spaces and protein folding, for example), where they use Riemann surface and differential geometry a lot, and I want to work in more theoretical problems, but would also like to learn more computational techniques (although secondary).

Without further ado, here is my question:

Since I have not published any single papers in those applied areas, or haven't had any formal training in them, what are my chances of getting a postdoc in these areas, being a pure mathematician all my life so far? If any of you have done so before, or are working in these applied areas, I would very much appreciate if you inform me! By informal communication with some people (who are Ph.D. students) working in these areas, I was informed that my backgrounds are good, but one or two professors I have contacted already mentioned that they want somebody with actual research experience in say imaging, which I do not have. So, I am not sure where I stand compared to other applicants. Your responses and honest opinion (even though not in my favor) will be highly appreciated! Thanks a lot in advance!


texts: choosing an input signal for system identificaiton

texts:
I know we can use a

-step
-impulse
-sinus
-multisine
-random phase multisine

To identify a system.

But what are the advantages/disadvantags of each type of input?


texts: relationship between block size and detected frequencies in goertzel algorithm

texts:
I'm trying to use the goertzel algorithm to detect a pair of frequencies in a signal.

The sample rate I'm using is 8000 hz, and the size of the incoming sample buffer is 60 samples.

I have a large array of 600 samples in size, so each time a new buffer comes in I move the data 60 samples to the right in the large buffer to make room for the new buffer, which I put at the front of the array (from index 0).

[ buffer0 | ... | buffer9 ]

I apply the goertzel algo to this large array. I'm looking for the frequencies 133.33 and 333.33 hz.

My algorithm gives me normalized magnitude. For the first frequency, I get a more or less stable detected magnitude around 0.5, which is also the amplitude of the original signal (I'm responsible for generating the signal myself). So that seems correct.

For the second frequency, I get a wildly varying normalized magnitude which seems to vary between 0.0 and 0.50, almost in a sine-like fashion. I know that the amplitude of this sine wave is 0.5.

When I save the generated signals and analyze them using audacity's spectrum feature I can see the correct frequencies in the spectrum, so it looks like the signal is being generated correctly.

My questions:

1) the algorithm seems to have a hard time detecting the second frequency. Why?
2) what is the relationship between the number of samples used for running the goertzel algo, and the detected frequencies?

My goal is to detect 64 unique combinations, so I was thinking of generating one frequency from a set of 16 and another one from a set of 4 and then just adding the two signals with 0.5 amplitude.

Thanks
B


texts: A basic question about the use of moving average vs low-pass filters in DSP

texts:
I'm newbie novice in digital signal processing. If one has a signal with some noise superimposed in time series, for which type of information/analysis one would use moving average or LP filter in practice.

Imagine you have a 5 seconds of sampled data in time where the sampling rate is 200Hz.

Can you give a practical example when would you use LP filter and when would you use a moving average filter? I read that moving average is a type of LP filter but I would like to see the differences in big picture.

I see many engineers use MATLAB or Python functions and perform Low Pass filter using FFT but not moving average. So this made me to ask this question.


texts: Burst Deblurring algorithm - Understanding the results

texts:
I've attempt to implement the algorithm from the paper "Burst Deblurring: Removing Camera Shake Through Fourier Burst Accumulation".

The main idea is to take several frames of the same scene, each blurred due to camera shake originated from hand tremor vibrations (which are random in nature).
Since the camera trajectories of each frame are different, the blur kernels are also different. Thus, each Fourier frequency of the original scene will be differently affected on each frame of the burst.

Now we can reconstruct an image whose Fourier spectrum takes for each frequency the value having the largest Fourier magnitude in the burst. Since a blurring kernel does not amplify the Fourier spectrum, the reconstructed image picks what is less affected from each image of the burst.

Obviously in a real scenario there are additional variables affecting the reconstruction (scene/lighting changes during burst, frames misalignment, noise, etc.), but I'm am dealing with a simple toy-case where I took a sharp image and blurred it with 100 different normalized and centered blur kernels (the blur kernels centers of gravity were centered up to sub-pixel values, so not [0,0], but [0.2,-0.3] for example).

The results are 100 blurred images which should be aligned and noise free.I than used them to reconstruct the original image and I examined the PSNR compared to the original image based on the number of frames used:

What I don't understand is what is the source for the drops in PSNR values when taking more frames (like 25 frames compared to 15)? For my toy-case, shouldn't the plot be monotonically increasing?

The code for the algorithm:

    if max:
        image = np.zeros(shape=(fft_shape[0], fft_shape[1]), dtype=np.complex128)

        # Get the point-wise Fourier magnitude for each frame:
        fft_abs = np.abs(blur_ffts)

        # The best frame per Fourier-pixel:
        best_frame = np.argmax(fft_abs, axis=0)

        # Reconstructing the Fourier transform of the image:
        for i in range(fft_shape[0]):
            for j in range(fft_shape[1]):
                image[i, j] = blur_ffts[best_frame[i][j]][i][j]


texts: What are $H(i\omega)$, $H(s)$ and $H(z)$ called?

texts: What are the Fourier-, Laplace- and Z-transforms of the impulse response of a filter called? I've seen $H(s)$ referred to as the system function or transfer function, what about $H(i\omega)$ and the discretized $H(z)$?


texts: WiFi Channelization for 40, 80 and 160 MHz

texts:
I have some questions on WiFi channelization in 802.11n and 802.11ac.  Here is the snip of List of WiFi channels (source: WiKi):

I am working on the L1 layer for 802.11n and 802.11ac model where I am transmitting and receiving some WiFi packets
Questions

Transmitting and Receiving WiFi Packets on 20MHz channels is pretty straight forward. If I want to use 40 MHz channel (Channel 38) , I need to do channel bonding, where channel 36 and Channel 40 are used.
Is the centre frequency going to be 5190 (channel 38) ? If that's the case, why we even bother to use the term primary and secondary channels?
What about the reception side? Do I need to tune my Rx to Channel 38 with samplerate > 2·40 MHz, or do I need to use any of the primary and secondary channels?


texts: connection between theory that is done in $L^2(\mathbb{R})$ and its application on discrete signal

texts:
I have problems understanding connection between theory that is done in $L^2(\mathbb{R})$ and its application to discrete signals.

Look at this paper: http://home.ustc.edu.cn/~zhanghan/cs/Mallat_Zhang93.pdf

All theory is done for $L^2(\mathbb{R})$
and integrals, and that's all fine. On page 8(3404) functions $g$
are sampled with period $T$ so that we are able to perform calculations on a computer in order to get representation of some sampled function $f$.
We use sum inner product and work with sequences instead of functions.

What allows us to use theory about square integrable functions on a sequence of numbers?


texts: Is convolution the only way to apply filters?

texts: I've read about the discrete convolution and how it applies to filters, but is convolution the only way to apply filters (to input signals)?


texts: How to determine the parameter of a Complementary Filter?

texts:
I know that the Complementary Filter has the functions of both LPF and HPF. But I think my understanding on the principal behind it is still unclear.

I am quite new on digital signal processing, and maybe some very fundamental explanations will help a lot.

Say I have a Complementary Filter as follows:

$$y =a\times y+(1-a)\times x$$

Then my parameter $a$ may be calculated by $$a=\frac{time\ constant}{time\ constant+sample\ period}$$
where the $sample\ period$ is simply the reciprocal of the $sampling\ frequency$.

The $time\ constant$ seems to be at my own choice.

My Questions:

What is the theory behind this calculation?
How do we choose the $time\ constant$ properly?


texts: Fourier antitransform using scaling property?

texts:
I'm trying to calculate the antitransform of:

$\frac{1}{2\cdot(1+5w)^2}$

Now I know the antitransform of $\frac{1}{(1+5w)^2} = t \cdot e^{-5t} u(t)  $

But in this case I got that divided by 2. I assumed I had to use the scaling property which says:

$F[f(ax)] = \frac{1}{|a|} \hat{f}(\frac{w}{a})$

Now I'm not really sure how to apply this. Could anyone help?


texts: Log Distance-Normal Shadow Model and Friis

texts:
Since I'm founding several but different results about this model, I would ask you if all it is OK with this formulas:

1) Friis Model --> $Pr_0 = Pt + Gt + Gr + 20\log_{10}\frac{\lambda}{4\pi d}$

2) Log Normal Shadow --> $Pr_L = Pr_0 - 10\eta\log_{10} d + \chi_{\sigma}$

where:

$Pr_0$ is the power received in the Friis Model as depicted above
$Pr_L$ is the power received in the Log Normal Shadow Model as depicted above
$Pt$ is the power transmission
$Gt$ and $Gr$ are the respective transmitter and receiver gains
$\lambda = c/f$, where $c$ is the light speed and $f$ is the frequency
$\eta$ is the Path Loss exponent
$\chi_{\sigma}$ is a Gaussian zero mean random variable with standard deviation $\sigma$.

I am a bit concerned about the signs and the $\log$ operations.


texts: Can I search Doppler shift in freqency domain

texts:
I would like to know if it is possible  to search Doppler shift of a carrier with sufficient oversampling while performing code search in the freqency domain. For instance can I selectively drop every X time domain sample bin from the fft processing? Will that not effectively change the input frequency being compared to the locally generated code?
I would like to perform the Doppler shift search of digital satellite broadcasts without having to change the lo supplying the IF in hardware.
Can this be done this way?


texts: I am trying to make filters like sepia filter in my app like other photo editing applications , till now I don't have any idea about it , Can any one help me out for it about its algorithms and how to do it ? and Can I implement in opencv using native c++ or we have any of its build in functions ?


texts: Non invertibility of system $y[n]=x[n]-x[n-1]$ using transform method?

texts:
For the system to be invertible, we should have different outputs for different inputs.

In terms of constant functions say,

$$X_1[n]=3 \quad \forall n \in \mathbb{Z}$$ and
$$X_2[n]=4 \quad \forall n \in \mathbb{Z}$$

It is perfectly clear that the above system gives 0 for both the inputs hence can be concluded as non invertible. But how can this be explained in terms of transform method (Bilateral z transform or unilateral z transform )?


texts:
Background: I'm fairly new to signal processing and sensors, etc. I'm working on my thesis, which involves the use of an MEMS acceleration sensor as a vibration measuring device (for rotating machinery). I managed to extract the data from the sensor and save it to my computer. Now, I'm doing post-processing on the data with python. Basically I'm getting accelerations in X, Y ,Z axis and the time (milli seconds).

Problem: the signal is noisy and I'm getting strange results when I perform FFT to it.

I already did detrend (to remove the huge spike at 0 Hz) and used a window function (on the detrended data) to get a cleaner Fourier Transformation but still I'm not sure if what I'm getting is normal.

Above is data I get from the sensor. Blue: original data, Orange: after detrend, Green: after applying the window function. I applied the window function to all 3 but only showed it on the X

Above is the FFT of the data, with only unto 4 Hz on the frequency axis. Blue: FFT on detrended signal, Orange: FFT on the windowed signal

FFT of same data but full frequency axis

The measurements were taken while the sensor was not moving with a sampling rate of 1 kHz. Also, using the sensor's low pass filter of 184Hz.

Am I on the right path? Are these results to be expected? Or is there something wrong with my work?

I hope you guys can help me. Thank you in advance.


texts: How to decompose raw acceleration signals into gravity and dynamic acceleration?

texts:
I have a data from $3$-axis $50$  Hz accelerometer, acceleration over each of $3$-axis: $acc_X,\  acc_y,\  acc_z$.

I want to decompose acceleration into gravity and movement components.

First question:

Should I introduce some notation of magnitude, for example $mag = \sqrt{acc_x^2 + acc_y^2 + acc_z^2}$ and then apply all transformations to the magnitude rather than component-wisely?

The second question is the decomposition itself.

One solution I've found is to apply lowpass Butterworth filter. However, I don't know how to interpret ButterWorth filter return values, namely numpy arrays $a$ and $b$, in terms of gravity and movement component.

So, how can I implement decomposition using the Butterworth filter?


texts: Hilbert transformer's phase in .AC simulation

texts:
I don't understand this: the HT works as it should but in an .AC simulation, the phase shows up like this (wrapped):

Why doesn't it look like a constant -90deg phase, like in a differentiator?

[edit]

The thing that also confuses me is that a regular low-pass FIR has the same phase, so does that mean the FIR also adds constant -90deg? Obviously not, and I can't see the explanation. Can someone please shed some light?


texts: Which of these features may not be needed or redundant?

texts:
I am trying to extract some features of the accelerometer sensor and during the feature extraction each 5 second segment in the array is windowed and features are generated from these windows. Features extracted include:
•   Mean of the magnitude data
•   Maximum value.
•   Minimum value.
•   Standard Deviation value for each axis (x, y, and z).
•   Average Standard Deviation over 3 axes.
•   Root mean squared acceleration (RMS).
•   The sum of height of frequency component below 5 Hz.
•   Number of peaks in spectrum.

I am not sure if mixing all these is adding redundant values and affect the final results.

Thanks


texts:
I have 2 simultaneous signals that both are designed to measure eye movements.
They are sampled at 250 Hz.
We have 12 subject recordings.
For 3 stable periods in each subject, we choose 256 points and did an FFT.
Prior to the FFT, the data were mean-centered and detrended with a 2nd
order polynomial.  They were also windowed with a Hann window.
We are focused on the magnitude spectra plots.
We have a total of 12 X 3 = 36 magnitude spectra, which we average.
These averages are shown in the attached figure.

My hypothesis is that the second signal is a low-pass filtered version of
the first.  The filter has ringing in the passband.

I want to design a digital filter that I would apply to signal 1 that,
after fft, analyses would produce a magnitude spectra like that of
signal 2.

How would I go about this?


texts: why eigenvalues concerned in Harris corner detection?

texts:
In Harris corner detection, as I see, the goal is to find out those points $(x,y)$ which makes $S(x,y)$ a large value for any direction of shifting, $$ S(x,y) = [\Delta x , \Delta y]M\left[ \begin{array}{c}
\Delta x \\
\Delta y \\
\end{array} \right]$$, while $$M = \sum_{(x,y)}\left[ \begin{array}{cc}
I_x(x,y)^2,& I_x(x,y)I_y(x,y) \\
I_x(x,y)I_y(x,y),& I_y(x,y)^2 \\
\end{array} \right]$$.
Here is my problem, as the wiki tells me that $M$ should have 2 large eigenvalues in order to make $S(x,y)$ large in any direction. WHY large eigenvalue? HOW?


texts: A filter with low phase shift or no phase shift at all? Which one?

texts:
I'm seeking a good advice for a filter. Can you help me?

Right now I made my own simple filter. Not sure what I'm doing, but it seems to work.

function testFilter (t, y, p)

    % Forward filtering
    % Do first filtering by jumping k/2 elements in the future
  l = length(t);
  ye = y;
    for i = 1:l
      sum = 0;
      k = 0;
      for j = 0:p-1
        if(i + j <= l)
          sum = sum + ye(i + j);
          k = k + 1;
        end
      end
      if(k != 0)
        ye(i+floor(k/2)) = sum/k;
      end
    end

    % Do the first p elements!
    for i = p:-1:1
      sum = 0;
      for j = 1:i
        sum = sum + ye(j);
      end
      ye(i) = sum/i;
    end

    % Done!
  figure
    plot(t, ye, t, y);
    legend("Filtered", "Noisy")
end

It's some kind of moving average, ich.
The reason why I selected this is beacuse a low pass filter caused phase shift and I don't like that.

Here is a plot that shows a example how my filter algorithm works.
I think it's OK, but can it be done better without phase shift?
Do you think Fast Fourier Transform is a much better filter in this noisy case?

If there is no filter that cause phase shifting, can you recommend a good filter for me then with low phase shift?


texts: Correctly scaling FFT of different lengths

texts:
I have been looking at using two FFTs of different lengths and displaying the output magnitudes on the same graph (a shorter length window for the higher frequencies, and a longer one for lower frequencies).

Currently, I find my impulse response by performing an FFT of size 32k on my entire measurement signal, and my reference signal.  I divide each by the scaling factor 1/sqrt(M) which I found through this post
FFT averaging with different block sizes - how to scale the amplitudes

I then divide the two signals, and perform an inverse FFT, and then scale by dividing by sqrt(M).

This gives me the impulse response of the signal. I then multiply the impulse response by my two windows (one short window, and one longer. window).

I then once again perform an FFT on each window, and again scale with the 1/sqrt(M). And then get my magnitudes using:
     i = sqrt (re/im)
    mag = 20 * log10(i/M)

I would like to use the crossover frequency set by the short window length, so that above this, values from the shorter window are used, and below this values from the longer windows are used.

I can find the crossover frequency using:
    crossover = 1 / ((1/sampleRate) * Length * 2)

Currently if I use this, there is a jump in decibels where the crossover frequency is, as something is not scaled correctly.  I am pretty certain that the issue is to do with having not used any scaling factors for my windows used.

Can anyone suggest where I am going wrong at the moment, or point me towards some applicable reading material.

The aim is that I am measuring an acoustic signal from a loudspeaker, and would like to window out the environment, to try and minimise reflections in my measurements at higher frequencies.  I need a longer window in order to have enough data to represent the lower spectrum, and there is no way to avoid the reflections in this part of the measurement, but I can get the higher part of the spectrum as clean as possible.  Giving the user the tools to filter the measurement how they desire.

Below shows what I am. experiencing.  The top graph is magnitude, middle is phase, bottom is impulse, with a half hann window used. The shorter window is drawn here, the longer window is the same start time as the short but a longer length.


texts: Noise due to Fluorescent light in a signal from a LED

texts:
I measured a signal coming from a LED using a sensor. The signal is Amplitude Modulated, so I expect its spectrum to be moved by the carrier frequency.

I am trying to explain the symmetric harmonics that appear in both sides of the peaks. I believe they might originate from the Fluorescent lights of the lab. I made a model where I added a square wave to the envelope and that seems to reproduce the effect in Matlab, but I am having a hard time finding the frequency of the noise.

Could people let me know if I am on the right track? If so, how can I go about finding the frequency of the interference?

I real online that Fluorescent lights produce electromagnetic radiation that can interfere with measurements. Could that, rather than the actually light be the culprit?

The signal is given by:

  S(t)=cos(f*2*pi*t)*cos(fc*2*pi*t)

When fc = 1000Hz and f=30Hz.
Here is the signal's spectrum. Note the added Harmonics:

Bigger picture:

EDIT I came back and measured again after covering the system to hide it from the light. The noise is still there, so it is probably not due Flurescent. My latest theory is that the noise is due to AC currents inside the system, maybe due to over sampling. I will open a new question for descussing this as it is not related to this question.


texts: Based on what we choose sampling frequency when sampling some song? Do we use Nyquist–Shannon sampling theorem, or maximum sampling frequencies are pre-defined, so it will never come to aliasing effect?


texts: How to find the DTFT of unit step with $(-1)^n$ scalar multiplied?

texts:
What are the DTFTs of the following two signals?

$$x[n] = e^{j \pi n}\left\{u[n] - u[n-8]\right\}\quad\text{and}\quad h[n] = (-1)^n\left\{u[n] - u[n-4]\right\}$$

I am trying to find $X(\omega)$ and $H(\omega)$ and the scalar $(-1)^{n}$ is throwing me off.


texts:
How do radar systems identify friendly targets to avoid AA locks during combat scenarios?
Do friendly planes broadcast a known signal or is something else going on?


texts: Determine Gaussian distribution parameters from the signal-to-noise ratio

texts: Is there a straightforward formula for determining the mean and standard deviation of the gaussian distribution followed by noise applied on an image, knowing the signal-to-noise ratio between the original image and the noisy one?


texts: Feature Based Methods for Quality Inspection Problem

texts:
I am currently working on an image classification problem to classify thermal images (can be interpreted as false-color images) of certain products as with or without defect. From an initial search in literature, it seems like most similar problems are solved typically using Deep Learning and CNNs. It is actually hard to find a feature-based approach that extracts features from the image and uses a Machine Learning classifier or just a statistical method to classify the images.
It is important to note that the images belonging to both classes are largely similar to the human eye and only on close observation, the defect can be seen. Therefore, CNNs may after all be a good choice of approach, but I still want to explore some classical methods that allow more control and interpretability.
To summarize, I am looking for ideas for a feature-based method to detect physical defects in products from their IR thermal images. Any suggestions or articles of similar applications are welcome.


texts: All em radiation propagates spherically and at a far off place a small enough distance, when observed appears like a plane like our experience on the earth.  So I tend to think that whether a wave on an aperture can be considered plane or not depends on how far the aperture is from the origin and how much is the aperture.  So it should be only dependent on the angle made at the centre by the aperture i.e. apertures making more than a certain angle at the centre can be considered spherical, and otherwise can be considered plane.  This is my wrong understanding.    But in radar theory, this is not the criterion for considering plane and far field.  A 2D^2/lambda formula is used.  How is this formula relevant?  How lambda is entering into the formula?


texts:
As far as I have grasped the concept is that if we are given the expression

$$y[n]=(2x[n]-x^2[n])^2\,,$$

it is a memory less system because even if we give negative values of $n$, we still get the overall result in the positive sign, right?

And this expression is memory system because we get the negative answer for negative values of $n$, right?

$$y[n]=(2x[n]-x^2[n])\,.$$


texts: Why negative harmonics copies in sampling

texts:
i have a signal of 120Mhz and sampling at 800Mhz. we look at the region of fs/2=400MHz so obvios we have harmonics of the fundamental which is 240 360. But in the document i see that there is another harmonic -4*120M+800M I cant see why we have negative harmonics and their copies. Upon what theory its based?
they say the -120M is the only one copied to the 0-400M region but i thought we could take also
-6*120M+fs=-720M+800M=80MHz
I cant see what why we have negative harmonics and which one is copied to the 0-fs/2 region.
Thanks.


texts: Does any error correction code still work in such situation?

texts:
I'm looking for a kind of error correction code or solution that can correct my codeword in this case:

My message holds $k$ bits, and $2k$ bits codeword (rate is $1/2$) is produced by the generator matrix, e.g. $k=5$, so it yields $10$ bits codeword $\rm 1001100111$. If the codeword is erased for some reason and it becomes $\rm 1xx1x00xx1$ (similar to the codeword transmitted through Binary Erasure Channel, and $\rm x$ is unknown, either '$0$' or '$1$'), can I still correct all the "$\rm x$ bits" in such situation as bit error rate is $1/2$?

I have read about some error correction code, such as block code, convolutional code and LDPC and got the following questions:

All these ECC have pratical application in communication, so do they still work when BER is close to $1/2$ (I think BER is impossible so high)?
Are there any feasible solution to my case? In fact, my message is $30$ bits and I can introduce another $30$ bits redundancy as parity bits. Can I still correct my codeword even if its half bits are erased where the recipient knows which bits he didn't receive properly?
What's the limit of ECC? If it can't correct half bits of codeword that are erased, how many bits can it correct at most?

Any guides or suggestions are appreciated!


texts: Basics of leakage phenomena in DFT and its approximation with sinc function

texts:
I am trying to understand leakage phenomena when using DFT. In the following I am reffering to Lyons: Understanding Digital Signal Processing (2nd ed.), p.69-71.

Having real valued cosine with $N$ samples as an input, the amplitude response of N-point DFT can be approximated by (in terms of bin index $m$)

$|Y(m)|\approx\frac{N}{2}\operatorname{sinc}(k-m)$,

where $k$ is number of cycles inside $N$ samples.

If $k$ is a whole number, there is only 1 bin non-zero.
Otherwise spectral leakage occurs. So far so good.

Now I am want to replicate this in Matlab using following code.

N = 32;                % No of samples
fs = 32000;            % sampling frequency
m = linspace(0,N-1,N);
k = 8.5;               % No of cycles within N samples
X = sin(2*pi*k/N*m);   % cosine signal
Y = fft(X);
f = linspace(0,fs*(N-1)/N,N);
stem(f,abs(Y));hold on

With $k$ being a whole number, no leakage is obtained.

However, using $k=8.5$ produces peaks at 8 kHz and 9 kHz which differ in magnitude, althought slightly ($|Y((8 \text{kHz})/f_\text{s})|=10.15$ and $|Y((9 \text{kHz})/f_\text{s})|=10.25$ ). In my reference book number 10.17 is given.

My questions are:

Shouldn't the two peaks be exactly the same? Why they are not?
Additionaly, I have plotted function $|Y(m)|$ with ''continious'' $m$. The bins of original spectra should be exactly on the resulting sinc function. However, farther away we go from 8.5 kHz, bigger the discrepancy. Aren't the DFT bins just ''uncovered'' parts of underlying continious spectra?


texts: What do the 1D filters represent when using imfilter?

texts:
I am reading the source code of an algorithm that is used to process an image. While reading this source code (and others), I've found lines of code of the form

imfilter(image, [0.25 0 -0.25]', 'circular');

or

imfilter(image, [1 0 -1], 'circular');

I don't get what these kernels [0.25 0 -0.25]' (the transpose) or [1 0 -1] represent. Shouldn't kernels be 2D if the input is an image? What exactly do these specific kernels do to the image? I have seen several examples of imfilter being applied to an image with kernels of this form and I don't understand what the results of these operations should be (when I read the source code). Can someone provide some intuition?


texts: Median filter problems about the output image

texts:
An image has an isolated cluster of dark pixels on a light background. The area of the cluster
  is $(n - 1)/2$ pixels where $n$ is an odd positive integer. What happens to the cluster when it is filtered with a median filter of size of $n \times n$? Explain why this happens.

I guess the output picture will be blurred since there are dark pixels.


texts:
The camera uses two cameras and reflective infrared markers to compute 3D positions. For recognized marker configurations, the camera computes a translation and an orientation (quaternion). For stray markers, only the position is returned. The camera sends updates at 20-60 Hz.

To compute the depth (z-value) of a marker, the camera uses two noisy images. That means the noise in the z-dimension is different (and larger) than the noise in x and y. The noise increases with distance. For recognized configurations (translation+orientation), the noise distribution is pretty unclear.

How would you go about filtering this kind of data? We're mainly interested in getting rid of the jitter which is most noticeable when the trackers are just lying around or moving very slowly.


texts: What happens with signal in frequency spectrum when it is time shifted in time spectrum?

texts:
I have some trouble to understand what is going on with signal in frequency spectrum when it is time shifted in time spectrum.

I am hoping that somebody will help me to understand that.

Thanks you very much.


texts: Advantages of the Rotation Translation Operation Before Doing FT Smoothing

texts:
I was reading a relatively old paper from the 1970s on smoothing by FT methods (chemistry applications), where the authors show that if we do rotation translation operation on the signal (y- values) before filtering the data by cutting off higher frequencies, the output is free from various artifacts and oscillations. What that rotational-translation does is that it makes the start point and the end-point equal to zero (see equations in the original text).

I have not seen this type of operation mentioned in modern texts. Here is the explanation by the author of Digital smoothing of electroanalytical data based on the Fourier transformation, 1973.

I did not see any major advantage in MATLAB if we use an example of a noisy Gaussian peak. Was this suggestion an artifact of how FT algorithms worked in the 1970s or there is a theoretical advantage? I assume the author is trying to periodize the signal?

In the figure, please follow the arrows from the bottom to see the rotation-translation operation.  Has anyone seen this equation elsewhere and what could be the fundamental advantage of this operation?  Thanks.


texts:
E.g. the constant Q-transform is built by adding so called "Fourier filters".

What's a "Fourier filter"?


texts:
I am at the moment working on images such as this one:

What you see are filamentous structures / bundles. Other images coming from slightly different experiments could have more sparse / thick / bright filaments, but the order-of-magnitude and qualitative average image is like the one above.

What I would like to do is to extract as many information as possible from this image and the best thing would be to identify each single filament/bundle or a "skeletonization" of the image, but I am happy already with a vector field indicating the local orientation of the filament so that I can compute its divergence etc. etc.

So the question is, do you know of any program / conceptual tool / framework which may help me identyfyinf the filaments and or their local orientation?

I usually work in Python and any example-code is welcomed, but I would be more than satisfied with a purely mathematical / pseudocode / conceptual answer.

What I did so far:

I tried to use PCA (Principal component analysis). I select a ROI, threshold the image, create the dataset $(X, Y)$ of the pixels with high intensity and compute the covariance matrix using the intensity as a weight. Then I diagonalise it finding the "longer" eigenvecotr and assume that that is the local orientation. Works ok-ish, but I am afraid is very paramtere-dependant and may fail when filaments become too thick or too thin. An example is below. It looks good but I fear is too simplistic an approach.
I tried to implement (in Python) the procedure they describe here. Maybe I am tweaking the parameters wrong or is supposed to work only for very thin filaments, but it works very badly in my case.

I know there are pre-made tools online, but I'd rather write everything from scratch.

So summing up, the big question here is:

What is the best way to find the filaments and/or their orientation at a given point?

Thank you all!


texts: Practical advices for applying phase correlation in image registration task

texts:
I'm using OpenCV to detect shift between 2 images, here is sample code (based on cv::phaseCorrelate function):

cv::Mat ShiftTransform(const cv::Mat &source, const cv::Mat &target, bool bUseHanningWindow)
{
    CV_Assert(source.type() == CV_32FC1);
    CV_Assert(target.type() == CV_32FC1);

    Point2d shift;
    if(bUseHanningWindow)
    {
       Mat hann;
       createHanningWindow(hann, source.size(), CV_32F);
       shift= phaseCorrelate(source, target, hann);
    }
    else
    {
        shift= phaseCorrelate(source, target);
    }

    cout << "Detected shift: " << shift << endl;

    Mat H = (Mat_<float>(2, 3) << 1.0, 0.0, shift.x, 0.0, 1.0, shift.y);

    Mat res;
    warpAffine(source, res, H, target.size());

    CV_Assert(res.size() == target.size());
    CV_Assert(res.type() == CV_32FC1);

    return res;
}

For example images from wikipedia seems it works.

source

target

result

response map

But for some real life images it gives wrong shift, maybe because of this problems described in wikipedia:

  In practice, it is more likely that   $g_{b}$ will
  be a simple linear shift of   $g_{a}$ , rather
  than a circular shift as required by the explanation above. In such
  cases,  $r$ will not be a simple delta function,
  which will reduce the performance of the method. In such cases, a
  window function (such as a Gaussian or Tukey window) should be
  employed during the Fourier transform to reduce edge effects, or the
  images should be zero padded so that the edge effects can be ignored.
  If the images consist of a flat background, with all detail situated
  away from the edges, then a linear shift will be equivalent to a
  circular shift, and the above derivation will hold exactly. The peak
  can be sharpened by using edge or vector correlation.

  For periodic images (such as a chessboard), phase correlation may
  yield ambiguous results with several peaks in the resulting output.

But I'm not sure how to debug such cases if something goes wrong.

Here is suggested not to blur images.

What are other practical advices for applying phase correlation in image registration task?


texts:
I'm testing some code to perform deconvolution of two audio signals to recover the impulse response. Presently, as part of testing, I am simply deconvovolving two identical signals.

I have the assumption that I should be able to recover a simple dirac-delta impulse response from this, but for some reason, there is a lot of spurious noise in the impulse response result.

I am using standard 8-byte doubles for data storage and FFTW as my FFT library. I'm also normalising the impulse response.

Is my assumption correct (regarding the unit impulse response)?

I'm still trying to figure out how to correctly compensate for wrap-around (circular convolution) by correctly padding the input buffers. I am using a similar strategy to my working convolution code [ M+L-1 ]


texts: Linear classification and overlapping problem reduction

texts: I am study linear classification(Y=aX+b) But it is still weakness that is overlapping problem. Could you suggest to me how to reduce overlapping problem in linear classification or how to find these parameters that helpful for overlapping reduction. In my question, I don't considier SVM method because it is more difficult to implement. Thank you so much


texts: Recover curves from noisy collection of points

texts:
Background: I'm trying to make a system that tracks a number of bubbles in a video

I'm implementing the bubble detection in the single image case using the Circular Hough Transform. Due to occlusion, blur and other factors, this detection will never be 100% accurate. I am tuning the detection procedure for high recall, possibly at the expense of precision.

Once this is done and applied to a sequence of frames from a video, I will have a number of detections that can be characterised as points in 4D space - x-position, y-position, radius and frame index.

Is there a procedure that can recover curves from this 4D point cloud?


texts:
I have some issue with zero padding. It's probably because I don't understand it enough.

I have buffer size set to 400. And I use radix-2 fft. So I take the input signal 400 samples, and add to them 112 zeros. So I have acceptable 512 buffer size for radix-2. And then I take the output of fft (freq spectrum) and send it to inverse radix fft. And that's what I get:

it's my buffer window of size 512. So the end of buffer is cut. I suppose it's those 112 zeros. So it looks quite  logical: actually I sent to my forward fft buffer size that has signal only for first 400 samples, and the rest are zeros. So after inverse I get what I had on input. I can understand that. But how to deal with that?

OK, I think I could just use from inverse fft output just those first 400 samples and it probably would work. But I wonder if it's proper way? Maybe there is some smarter solution, some filtering or what?


texts:
Low scales are arguably the most challenging to implement due to limitations in discretized representations. Detailed comparison here; the principal difference is in how the two handle wavelets at each scale:

pywt: diff of int_psi resampled at each scale, self-normalized (caveat2); int_psi == cumsum(psi)
scipy: wavelet recomputed and explicitly normalized at each scale

(For pywt it's not exactly diff(int_psi), but key behavior is equivalent) Below plots compare real and complex morlet CWT's for a sharp transition signal; all coefficients were L1-normalized.

I didn't get much from inspecting shapes of respective wavelets (blue = recomputed, orange = resampled, both rescaled -1 to 1):

So what's the deal? Am I missing something in the discretization differences, or is pywt's integrated wavelet approach superior for lower scales (if so, why)?


texts: What does it mean by "Adding Gaussian Noise to a 2D Image"?

texts:
As far as I understand,

Suppose, we have a 2D image of pixel resolution 200 x 300. That means, the image has 60000 pixels in it.

Now, we would generate $n$ random values and add those values to $n$ number of random pixels.

Now, my question is, what would make those $n$ values to look like Gaussian Random Values?

What would be the logic that I should use?


texts: What is the electrical equivalent circuit for this interaction? (Is this correct?)

texts:
A DSP text gives an example of an ideal mass striking an ideal string here:

This is drawn as an equivalent electrical circuit as follows, where each R represents one of the two string segments the mass interacts with (ie. the string segment to the left of the mass and the string segment to the right):

A piano hammer is imagined slightly differently as a mass driving a damped spring against the string here:

They state: "The impedance of this plucking system, as seen by the string, is the parallel combination of the mass impedance $ ms$ and the damped spring impedance $ \mu+k/s$. The damper $ \mu $ and spring $ k/s$ are formally in series."

I am wondering if anyone would be able to draw the equivalent electrical circuit for this interaction. I am trying to figure out how to write equations for the forces and velocities of a hammer modeled in this way but I think I need the diagram first.

This is my best guess. I put the damper and spring in series, and their combination in parallel to the mass which has the force exerted to it directly. I am uncertain of the + or - directions for the damper and spring:

Furthermore, in the first case of the mass striking a string, because all the elements were in series, I believe the sum of forces for the elements had to equal zero ($Fm(t) + Fr(t) + Fr(t) + Fext(t) = 0$). What would that equation of forces look like for this circuit?

I'm guessing it would be something like an equation system based on the parallel sections:

$Fm(t) + Fr(t) + Fr(t) + Fext(t) = 0$

$Fk(t) + Fr(t) + Fr(t) + Fext(t) = 0$

$Fm(t) = Fk(t)$

Is any of that right?

Thanks.


texts: Why is FFT a good method for detection of bearing faults? Why can't we do the analysis in time-domain?


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

texts:
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 source point to each microphone; the signal will be (time) shifted
and distorted. A priori knowledge has been used to compensate for the time shifts as good as possible but still some time shift exist in the data.
The closer the measurement positions are the more similar the signals are.

I am interested in automatically classifying the peaks. By this I mean that I am seeking an algorithm that "looks" at the two microphone signals in the plot below and "recognize" from position and waveform that there are two main sounds and report their time positions:

sound 1: sample 17 upper plot, sample 19 lower plot,
sound 2: sample 40 upper plot, sample 38 lower plot

In order to do this I was planning to do a Chebyshev expansion around each peak and use the vector of Chebyshev coefficients as input to a cluster algorithm (k-means?).

As an example here are parts of the time signals measured at two nearby positions (blue) approximated by 5 term Chebyshev series over 9 samples (red) around two peaks (blue circles):

The approximations are quite good :-).

However; the Chebyshev coefficients for the upper plot are:

Clu = -1.1834   85.4318  -39.1155  -33.6420   31.0028
Cru =-43.0547  -22.7024 -143.3113   11.1709    0.5416

And the Chebyshev coefficients for the lower plot are:

Cll = 13.0926   16.6208  -75.6980  -28.9003    0.0337
Crl =-12.7664   59.0644  -73.2201  -50.2910   11.6775

I would like to have seen Clu ~= Cll and Cru ~= Crl,
but this does not seem to be the case :-(.

Maybe there is another orthogonal basis that is more suited in this case?

Any advice on how to proceede (I am using Matlab) ?

Thank in advance for any answers!


texts: If I take the magnitude of a complex signal, and then subtract the mean amplitude, I remove DC offset but lose the real and imaginary components. How can I properly subtract the DC offset of a complex signal? Subtracting the complex amplitude results in a non-zero magnitude so I don't believe that's the way to go...