signal-processing

How does google app engine manipulate image data? How can you manipulate pixel data?

牧云@^-^@ 提交于 2019-12-08 05:25:14
问题 I want to get access to the low level pixel data to complete signal processing algorithms using GAE (which elimiated the use of BufferedImages and Java.awt.image classes) You can access the Image data by: ImagesService imagesService = ImagesServiceFactory.getImagesService(); Image oldImage = ImagesServiceFactory.makeImageFromBlob(blobKey); byte[] imageData = oldImage.getImageData(); So here is the issue: Color Images have 4 Bands (aRGB) but when you get the Image Data its a 1D byte array. 1)

FIR filter (implementation )

醉酒当歌 提交于 2019-12-08 04:54:58
问题 I want to make a FIR filter. I have an array of coefficients (buffer[size]) and an array of data (filter[size_filter]). I have to do a convolution between the two arrays: for(j = 0;j < size+size_filter;j++) { output[j] = 0; for(i = 0;i < size_filter;i++) { output[j] += buffer[i]*filter[j-i]; } } output[size+size_filter] is the result. Where I'm wrong? 回答1: output[j] += filter[i]*buffer[j-i]; and also make sure that j-i will not be negative 回答2: From what I can see, none of the answers given

Computing the discrete fourier transform of audio data with FFTW

穿精又带淫゛_ 提交于 2019-12-08 04:32:07
问题 I am quite new to signal processing so forgive me if I rant on a bit. I have download and installed FFTW for windows. The documentation is ok but I still have queries. My overall aim is to capture raw audio data sampled at 44100 samps/sec from the sound card on the computer (this task is already implemented using libraries and my code), and then perform the DFT on blocks of this audio data. I am only interested in finding a range of frequency components in the audio and I will not be

Sharpen the edges

半世苍凉 提交于 2019-12-08 04:00:53
问题 I am trying to detect the biggest/larger rectangular shape and draw bounding box to the detected area. I have tried different way to detect perfect edge ( Edges with no holes) for contour detection. I searched on stackoverflow and the solution proposed OpenCV sharpen the edges (edges with no holes) and Segmentation Edges did not work with my sample image. I would like to detect biggest/larger rectangular shape on the following two images Original Image 1 and Original Image 2 Below is the code

How do I scale an FFT-based cross-correlation such that its peak is equal to Pearson's rho

坚强是说给别人听的谎言 提交于 2019-12-08 03:24:22
问题 Description of the problem FFT can be used to compute cross-correlation between two signals or images. To determine the delay or lag between two signals A and B , it suffices to locate the peak of: IFFT(FFT(A)*conjugate(FFT(B))) However, the amplitude of the peak is related to the amplitude of the frequency spectra of the individual signals. Thus to determine the Pearson correlation (rho), the amplitude of this peak must be scaled by the total energy in the two signals. One way to do this is

Low-pass filter in carrier modulation and demodulation

心不动则不痛 提交于 2019-12-08 03:10:18
问题 I'm designing a project in which an array is passed through quadrature amplitude modulation (QAM) modulator, and then do carrier modulation, make it playable with the sound() command, then demodulate it back for QAM demodulation. Firstly, I have used the standard way of QAM modulation: M = 16; x = randint(5000, 1, M); y = modulate(modem.qammod(M), x); Then, I wrote my own carrier modulation function: function [out] = carriermodulation(x) fs = 16000; T = 1.0 / 4000; fc = 8000; Q = real(x); I =

Trilateration of a signal using Time Difference(TDOA)

烈酒焚心 提交于 2019-12-08 03:02:20
问题 I am having some trouble to find or implement an algorithm to find a signal source. The objective of my work is to find the sound emitter position. To accomplish this I am using three vibration sensors. The technique that I am using is multilateration that is based on the time difference of arrival. The time difference of arrival between each sensor are found using Cross Correlation of the received signals. I already implemented the algorithm to find the time difference of arrival, but my

QRS detection(peaks) of a raw ecg signal in matlab

爱⌒轻易说出口 提交于 2019-12-08 02:49:45
问题 I want to find the peaks of the raw ecg signal so that I can calculate the beats per minute(bpm). I Have written a code in matlab which I have attached below.In the code below I am unable to find threshold point correctly which will help me in finding the peaks and hence the bpm. %input the signal into matlab [x,fs]=wavread('heartbeat.wav'); subplot(2,1,1) plot(x(1:10000),'r-') grid on %lowpass filter the input signal with cutoff at 100hz h=fir1(30,0.3126); %normalized cutoff freq=0.3126 y

Autocorrelation returns random results with mic input (using a high pass filter)

霸气de小男生 提交于 2019-12-08 01:48:44
问题 Sorry to ask a similar question to the one i asked before (FFT Problem (Returns random results)), but i've looked up pitch detection and autocorrelation and have found some code for pitch detection using autocorrelation. Im trying to do pitch detection of a users singing. Problem is, it keeps returning random results. I've got some code from http://code.google.com/p/yaalp/ which i've converted to C++ and modified (below). My sample rate is 2048, and data size is 1024. I'm detecting pitch of

Effcient way to do FFT shift in matlab (without using fftshift function)

无人久伴 提交于 2019-12-08 01:41:06
问题 http://www.mathworks.com/help/techdoc/ref/fftshift.html If you check that link - thats what I want to do in the first picture - swap quadrants of a matrix. However, I cant seem to think of a good way to do this without having several loops to pull out the relevant sub-matrices. I need it to work with MxN matrices, where M and N can be any combination of even and odd. Thanks 回答1: If you enter type fftshift.m at MATLAB's command line, you'll see the source code for MATLAB's implementation of