# Tag Info

7

Change the following line : time1 = np.linspace(0, capture_size1 * timestep1, capture_size1) To the following: time1 = np.linspace(0, capture_size1 * timestep1, capture_size1, endpoint=false) You will see correct results. Your original time instances is not what you intend because Python will create 2048 equally spaced point between 0 and 2048*Ts. ...

7

[EDITED FROM DISCUSSION] On the first order, your data looks like a decay with a positive origin on a small-valued range $[0.7 \; 0.49]\times 10^{-7}$, and very tiny fluctuations with respect to the area under the curve. So from afar, your data is much closer to an almost constant function than to some putative oscillations. So the the zero, or DC-...

4

MATLAB is one of the most important software inventions of the twentieth century, from a DSP point of view its syntax is simply the best in the world. And image processing is one of its strongest parts. However it's mainly of academic focus and if you look for industrial output you should consider having a number of additional tools. LabView is one such ...

4

[EDIT-20200516: see at the bottom fro comparison with...cars] For learning from scratch, I would not suggest a programming language alone, but instead the couple "teaching materials" (book, lecture notes) + "exercices with a specific programming language". So if you find a book that you like on "Python for computer vision with exercices" or "Image ...

4

Is the rate of 2B exclusive? Yes. The sampling theorem states that the signal must be band limited to half the sample rate. That implies that the energy at the Nyquist frequency must be zero. In practice you need a healthy margin between the highest usable frequency and the Nyquist frequency. There is always some "transition band" that you need to get the ...

4

You can use cv2.PSNR like this example: import cv2 img1 = cv2.imread('img1.bmp') img2 = cv2.imread('img2.bmp') psnr = cv2.PSNR(img1, img2)

4

Because your data is (I assume) composed of some interesting stuff times a teeny number, plus the -- presumably uninteresting -- $k_0 + N\,k_1 + N^2\,k_2$, where $N$ is your "epoch". So the Fourier transform of the data as a whole is dominated by the Fourier transform of $k_0 + N\,k_1 + N^2\,k_2$.

3

My guess is that the currently popular and new and likely robust way to solve this detection problem is to feed a sequence of audio fingerprints (such as MFCCs) to an RNN machine learning algorithm that was trained on a large wide range of rhythm tracks mixed with increasing levels of realistic background noise. Feeding audio stream samples directly to a ...

3

Zeroing out bins / attenuating them in discrete Fourier domain is universally a bad idea, due to the undesirable time-domain effects of that. Instead, use a audio processing program to apply an adjustable equalizer to the song of choice. Let's walk you through Free software: Get audacity; load your song in that, open "Effects"->"Equalizer" start with one ...

3

Update: Given the approach started in the OP's Github code I have this suggestion: Observe that the unilateral Laplace Transform given as: $$X(s) = \int_0^\infty x(t)e^{-st}dt$$ Is just the Fourier Transform of a causal function with a weighting exponential: $$X(s) = \int_0^\infty x(t)e^{-(\sigma+j\omega)t}dt$$ $$X(s) = \int_0^\infty [e^{-\sigma t}x(t)... 3 Thank you for your response. I registered to this website, so not sure if my name is the same one or not anymore, but I am the OP. I'm not quite sure I fully understand the solution on how the resampling and interpolation can help me. If I downsample (let's say every 100th sample), I will have a 100x smaller Dataframe size, but the elements are not evenly ... 2 turn to float first!!!!!!!! turn to float first!!!!!!!! turn to float first!!!!!!!! def compute_psnr(img1, img2): img1 = img1.astype(np.float64) / 255. img2 = img2.astype(np.float64) / 255. mse = np.mean((img1 - img2) ** 2) if mse == 0: return "Same Image" return 10 * math.log10(1. / mse) 2 I am just reading Quantitative characterization of surface topography using spectral analysis and recalled seeing your post today. The paper makes distinction between C^{iso} (radially averaged) and C^{pseudo-1D} (radially averaged but scaled by the factor of \frac{q}{\pi}, for reasons described in there), that looks like the issue you have. This is ... 2 Python librosa library has a functionality you can use: librosa.effects.split(y=buffer, frame_length=8000, top_db=40) Split an audio signal into non-silent intervals. Given sampling rate of 8000 it will split the audio by detecting audio lower than 40db for period of 1 sec Or, you can trim the audio "silent parts" using: librosa.effects.trim(y=buffer,... 2 From my answer Short-time Fourier transform Tradeoffs Since the frequency content of overlapping windows are displayed sequentially rather than averaged, I find talking about overlapping windows confusing. I would rather divide the time domain into Frames for which we try to obtain a picture of the frequencies in their range as accurately as possible. ... 2 I will use Wikipedia notations - Kalman Filter. In most models the state transition model matrix  F  depends on the interval parameter  T . The same goes for the Process Noise Covarinace Matrix  Q . For instance, for the constant velocity model:$$ F = \begin{bmatrix} 1 & T \\ 0 & 1 \end{bmatrix}, \; Q = \begin{bmatrix} \frac{ {T}^4 }{4} & ...

2

They do mean the pseudo-frequency of the wavelet which is not dependent on the signal being analyzed. The misleading terminology that they use seems to come from from one of the references, Han, P. (2013), Investigation of ULF seismo-magnetic phenomena in Kanto, Japan during 2000–2010, PhD thesis, Chiba University, Chiba, Japan. Quoting an article of a ...

2

It will work when you take the 2nd gradient of the signals: import numpy as np from scipy import signal s0 = np.gradient(np.gradient(s0)) s1 = np.gradient(np.gradient(s1)) np.argmax(signal.correlate(s0, s1)) -> 525358 That corresponds to a shift of 1071 which is close to your expected 1069 Interestingly the minimum (most negative correlation) is close ...

2

The main reason why your Kalman filter is not working is because you are not converting lat and lon values to kms. In the code below, I defined a new function called lat_lon_posx_posy which converts lat and lon values to px and py values in mts. You will need to make the following changes to your code. Include the following function import utm def ...

2

First off, a small thing: The sampling rate usually has to be one of the standard sampling rates. Closest to your 1024*40 would be 44100. The hardware has to support the sampling rate. Some drivers will resample to the given rate, but that will be somewhat slow as it is in software. Try using a proper sampling rate. The real bottle neck is the plotting. ...

2

First of all, thanks for sharing this problem. I hope it can foster some good discussions here at stack-exchange. I guess this problem is commonly called Multi-Focus Multi-Image Fusion (MF-MIF). Let's look at all the images together with their grayscale histograms and the gradient magnitude (information content in each image): As the original question ...

2

The frequency resolution of your FFT is determined by its length and the sampling rate. In your second plot you show Fs = 10e6 and 3200 samples. Assuming you don't zero-pad these samples when you pass them to the FFT this gives you a frequency resolution of 3125Hz: $$3215 = \frac{10 \times 10^6}{3200}$$ So at lower frequencies you have frequency bins as ...

2

For sinusoids that are not exactly integer periodic in the FFT length, an FFT measures the phase at a circular discontinuity. And that discontinuity flips direction as frequency changes from slightly below to slightly above an exact integer periodic-in-aperture frequency. This is part of the effect of the default rectangular windowing of any finite length ...

2

I don't know much about this semantics? of WAV files but their numerical format is the following. (assuming mono) Given a recording with 8-bit per sample precision, then those samples are unsigned integers taking values between $0$ and $255$. Due to being unsigned, to represent negative values, there is a bias of $128$, and the sample values are actually ...

2

The semantics for a sampled audio signal is very simple. Each sample represents an amplitude, each sample is done at a specific time. If you create a signal using a microphone, the amplitude is related to the pressure as measured by the microphone diaphragm. The sampling process will introduce time in the equation. In the question, there are two sets of ...

2

In practice, this does not matter much. All serious work normalizes audio levels. In our code base, there's even some code that runs a nightly check to verify our algorithms are gain-independent. We recognize that the external format is typically 16 bits, but this does not need to match the internal formats used in transforms. Internally, extra precision ...

2

I'd consider why you really want to do this - I personally can't think of a reason why I'd want to downsample to a specific sample number but I don't know your project Floating an alternate idea, you could downsample until you're near around that level of decimation and then truncate? It won't be 100 samples exactly but it might be easier in the long run to ...

2

The goal is to predict a genetic distance of species from the spectra. For instance if the genetic distance of species 1 and species 2 is very height I would expect a different spectra. If the distance is 0 or very low,m the spectra are the same /very similar. In that case, defining the distance between two spectra based on the spectra makes no sense – you ...

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