signal-processing

Simple image processing solution in python for measuring interval on a scanned electorcardiogram (ECG)

允我心安 提交于 2019-12-13 20:39:54
问题 I have a MacOS 10.13.4 and I want to write a GUI in python3 able to measure measure intervals on a scanned Electrocardiogram or ECG (hear rhythm of a patient). I have some programming knowledge in python but I'm not a professional computer scientist For this I need to do the following steps: Rotation : Rotate the image so that the ECG baseline is pefectly horizontal (because the ECG on the scan can be a little rotated by a few degrees of angle). Here is an image of an ECG which needs to be

Assigning Values to the neighbors same value in MATLAB

断了今生、忘了曾经 提交于 2019-12-13 20:17:08
问题 I am having a small issue but I am clueless where I am at fault. Can someone please guide me the right way? Thanks in advance. What I have done. My codes finds local maxima’s. Bring down from local maxima to a certain point. Assign the neighbors that are greater than the downsized value, the value of downsized point. Small Example X = [1 0 1 4.3 4.5 5 4.3 4.2 0 0 0 2 6.2 6.3 7 6.2 7.4 8 7.2 1 2 3 4 2]; Local maxima’s are 5, 7, 8, and 4 Go down to certain point. Like 4, 6, 7, 3. Assign

how to compare two audio signals with Matlab

倖福魔咒の 提交于 2019-12-13 19:24:46
问题 I have two audio signas that I want to compare using Matlab, my problem is that I can hear the difference between them loud and clear, but when use the function pwelch to compare their PSD ,I don't see much difference between them,any idea how can I compare them with a different methode ! thanks in advance ! PS: 1. I already ask the quesiton in DSP.stackexchange but had no answer! 2. I'm not asking for codes, that'S why I didn't put mine ! UPDATE after the answer of @Bas Swinckels here the

CUDA fft 2d different results from MATLAB fft on 2d

南笙酒味 提交于 2019-12-13 18:01:44
问题 I have tried to do a simple fft and compare the results between MATLAB and CUDA on 2d arrays. MATLAB: array of 9 numbers 1-9 I = [1 2 3 4 5 6 7 8 9]; and use this code: fft(I) gives the results: 12.0000 + 0.0000i 15.0000 + 0.0000i 18.0000 + 0.0000i -4.5000 + 2.5981i -4.5000 + 2.5981i -4.5000 + 2.5981i -4.5000 - 2.5981i -4.5000 - 2.5981i -4.5000 - 2.5981i And CUDA code: int FFT_Test_Function() { int width = 3; int height = 3; int n = width * height; double in[width][height]; Complex out[width]

Dynamic window forming in efficient way in MATLAB

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 16:08:35
问题 Can someone help me to provide an efficient way or help me to perform the provide code to do make same results in minimal possible steps. I shall be grateful to you. I have an Original Array: A = [1 1 1 4.3 4.5 4 4.3 3 1 0 0 2 6.2 6.3 6 6.2 7.4 8 7.2 2 2 3 3 2]; Output Looks like: A = [1 1 1 4 4 4 4 3 1 0 0 2 6 6 6 6 6 7 7 2 2 3 3 2]; I apply some restrictions and removed some values from array of local maxima’s after that I received some new arrays. Yposlocfiltered = [6 15 23]; idx = [4 6 3]

How to reconstruct the signal by applying thresholding on wavelet coefficients?

只谈情不闲聊 提交于 2019-12-13 15:28:51
问题 I want to reconstruct a 1D audio signal by thresholding the wavelet coefficients. First of all, I read the audio signal and normalised it. After that I added white Gaussian noise. Subsequently I calculated the maximum volume level for decomposition. I applied multi-level wavelet decomposition on the noisy signal using the db2 wavelet and obtained the approximate and detailed coefficients. For the thresholding calculation using wdencmp , I get the threshold value using soft thresholding and

How to get the frequency of a square wave in a python script

微笑、不失礼 提交于 2019-12-13 13:32:11
问题 I'm using the TSL235 (http://www.ti.com/lit/ds/symlink/tsl235.pdf) light-to-frequency converter and the Raspberry Pi. The output of the sensor is a square wave (50% duty cycle) with frequency directly proportional to light intensity. So I need to know (in a python script) which frequency gets to the Input GPIO-Pin of the Raspberry Pi. I only found a tutorial (http://playground.arduino.cc/Main/TSL235R) which shows a C-code, but I do not understand C... I'm only working with python Reading a

Voice Detection in C#

落花浮王杯 提交于 2019-12-13 12:02:57
问题 I'm looking for a simple C# real-time voice detection library. The input should be an audio stream, and the output should be "human voice" or "not a human voice". I have no knowledge in speech recognition or signal processing, and I'll appreciate any kind of assistance. 回答1: Take a look at the answer for "Detecting audio silence in WAV files using C#". I am assuming the input is a WAV file. If not please provide the format of the audio stream, or if you are intending on taking input from the

Converting SIGNED fractions to UNSIGNED fixed point for addition and multiplication

放肆的年华 提交于 2019-12-13 09:07:47
问题 How can we convert floating point numbers to their "fixed-point representations", and use their "fixed-point representations" in fixed-point operations such as addition and multiplication? The result in the fixed-point operation must yield to the correct answer when converted back to floating point. Say: (double)(xb_double) + (double)(xb_double) = ? Then we convert both addends to a fixed point representation (integer), (int)(xa_fixed) + (int)(xb_fixed) = (int) (xsum_fixed) To get (double)

To scale values from Matlab's spectrogram to real range

老子叫甜甜 提交于 2019-12-13 08:56:27
问题 I run spectrogram(data, 64, 60, 256, 2, 'yaxis'); I get I want to get range from 0 to 180 Hz, instead of normalised range from 0 to 1. I can change axis by axis([0 450 0 180]) but it does not change the values. I run unsuccessfully spectrogram(180 .* data, 64, 60, 256, 2, 'yaxis'); How can you scale the range from normalised to real range? 回答1: The x-axis should be frequency. You need to know the sampling rate fs (is it 2 ?) of data . Then the frequency range will be (0:63)/64*fs Actually you