# Questions tagged [c#]

C# is a programming language from Microsoft for .NET/CLR

41 questions
Filter by
Sorted by
Tagged with
70 views

### FFT algorithm gives wrong signs on my output numbers

I was told from another stack exchange (stackoverflow and computer science stack exchange) to post here - so hopefully now i can get some help from people who understand the algorithm, but if this is ...
77 views

### Math.Net and alglib returning different FFT outputs by default

I am developing an application in C# with spectrogram drawing functionality. For my fist try, I used MathNet.Numerics, and now I am continuing to develop with alglib. When I changed from one to the ...
92 views

### My Power Law (Gamma) Transformation Code Doesn't Compatible With Gamma Value

I'm trying to apply Power Law (Gamma) Transformation. Formula is simple: s = c*rγ. (c=1 , r= intensity , s= outputintensity). Here is detailed information: https://theailearner.com/2019/01/26/power-...
112 views

### Maximum of cross-correlation not moving

I already asked this question here yesterday, but it was very poorly worded I think. I made a much more detailled post explaining my problem of stackoverflow, as it might also be a code problem. Here ...
120 views

### What algorithm can I use to “match” or “align” (translate and scale) two vectors of different size in C#?

Let's say I have two vectors A and B, of lengths, m, and n respectively. They are not "signals" but a collection of ordered time marks or indexes from another two "original" longer vectors (let's call ...
336 views

### How to convert a sound signal function to wave file? [closed]

I am new to understanding sound signals. A sound signal, as far as I know, is a real function of time $x:[0,\infty)\to \Bbb R$. For example, $x(t)=\sin(t)$ is a sinusoidal signal. What is $x(t)$. For ...
73 views

### Parabolic fiting for sub-sample precision

I am performing cross-correlation between two double[1024] arrays. I want to track the correlation's maximum with sub-sample accuracy, so I decided to implement parabolic fitting to my code. I used ...
433 views

### Windowing a signal for FFT

I am actually working on a project involving the cross-correlation of two signals. My cross-correlation code is working fine, but I suspect that I should apply a window to my data set in order to ...
430 views

### Cross-correlation, sharp peak at 0?

First of all, I have to stress that I am not a professional of coding, no more than a professional of signal processing. I am a chemist that happen to be working on a project involving both. So in ...
896 views

### Real-time FFT Pitch shifting in c# [closed]

I'm using Math.net and Bass.Net to write FX effects for guitars. I'm currently stuck on the the pitch shifter. I have to implement a custom DSP callback function which provides the guitar PCM data and ...
683 views

### How to implement a FIR filter with correction of group delay on c#?

I read respect to digital filters, and implemented both IIR and FIR filters and I found that this type of filters have a called "group delay". Now I know that the IIR have a non-linear group delay and ...
348 views

### How do I attenuate a tidal signal in depth time series data

I work with depth time series data from electronically tagged fish. When the fish spend time on the bottom we get a prominent tidal signal (approx 1.96 cycles per day). This interferes with our ...
1k views

### Designing Butterworth filter

I'm looking to implement the designing of a Butterworth filter based on the implementation in MATLAB/Scipy into C# but I've ran out of knowledge and can't quite seem how to compute the coefficients <...
82 views

### Anti tremor motion detection

I'm programming in c# using opencv (emguCV). I use motion detection approach to detect some changes in a paper wall. For example it's may be colored by a laser pointer. My problem is that when I use ...
99 views

### Computes velocity from sampled position

My system is : A step by step wheel returns its position each 150ms. I want to pilot an horizontal infinite scroll bar with the wheel. The scroll bar needs velocity as input to move. Moreover the ...
880 views

### What Is the Best Color Space to Work with for Hand Detection: RGB, HSV, or YCrCb?

I'm working on hand gesture recognition using C#. I'm using OPENCV for skin detection but its performance is not optimal. So I decided to do some filtering based on color space, but I do not know what ...
903 views

### Normalizing the magnitude of Goertzel Filter c#

I'm trying to detect some frequencies of 18Khz with sample rate of 44100 [samples/sec]. When I pass a buffer(~4500 samples) to the algorithm it returns a magnitude in a very strange range. Sometimes ...
1k views

### Applying a FIR filter to floating point array c# [closed]

I have designed using MATLAB a FIR filter with some coefficients. I have an array that is normalized to -+1. The array is float. I used this method to apply the FIR to the array but I'm not sure if ...
690 views

### Synchronizing data sent over sound beeps with Goertzel Detection, C#

I'm trying to send some text over sound. For example, I try to send the words "Hello John". I do it this way: Every char is converted into its binary ascii code. Then I construct a wav file with no ...
847 views

### Parallel Goertzel filters in C# [closed]

I have 2 frequencies in my application: $12000\mathrm{Hz}$, $13000\mathrm{Hz}$. I want to set a parallel Goertzel filters and every 100ms I want to take the bigger magnitude for detecting the tone ...
141 views

### Finding periodicity within sequence of time hacks

I have a series of time hacks for various events that have occurred. Some of these events occur at regular intervals (+/- some small variance) but I do not know what those intervals are and would ...
537 views

### Using Fourier Transform on Gyroscope

The original idea is to calculate distance from accelerometer input. However, accelerometer reading also contains the gravitational values, thus to remove gravity, I tried using Gyroscope. The idea ...
987 views

### Image Registration C#

I'm trying to fuse different images of the same scene which each image have a different focus. I've been told that first I have to perform an image registration to the images. Right now, the result ...
3k views

### Options to enhance a poor image

I have a C# desktop application. I am using EMGU as a wrapper for OpenCV. I am receiving images in JPEG format that were originally taken by an analogue camera. The quality of the image is poor (...
2k views

### Entropy/frequency of a natural image

I have a C# desktop application. I am using a wrapper to OpenCV which is EMGU. I am just performing a basic motion detection operation. I am using component labelling and 2 frames differencing to ...
2k views

### Entropy of an image

If I want to measure entropy of an image how should I do it? My aim is to ignore things like tree leaves moving in the wind with my C# desktop application. I know matlab has this functionality but I ...
7k views

### Sharpening an image using emgu

I have c# desktop application and I am using emgu framework as a wrapper for OpenCV. I am trying to sharpen an image because the input images are not great. I tired a technique I found via searches ...
3k views

### Improve contrast when image has a flood of white balancing

I have an image taken a night time. I apply _EqualizeHist to it. But the result is a high level of whiteness running through the image. This is the image: I had asked this question in a slightly ...
220 views

### motion detection within a poor contrast image

I have a C# desktop application. Its purpose is to detect motion changes between consecutive frames. Currently I am using the excellent Emgu wrapper to OpenCV. Now, I know this question may seem ...
553 views

### Getting the average pitch of a wave in C#

I want to separate out the components that I need to evaluate the pronunciation of a user, so I am dealing with the energy/stress/volume and intonation or pitch. Focusing first on the pitch, is ...
867 views

### PID With Prediction

First, I just want to start off by saying that I am a programmer, and am no expert in complex algorithms, and will probably not be able to apply complex pseudo-code or other descriptions of a solution....
10k views

### Remove background from image

I want to remove the background from image. Let's say I have this background: . Then I put pen drive and tippex on it. . Is it possible to remove the background image from second image? If so, ...
176 views

### processing 16bit audio files [closed]

I currently have a 16bit mono file. I would like to read this data to retrieve only the data chunk part and not the entire file with the headers so that I can apply fft on it. I tried finding ...
3k views

### comparing 2 audio files in c#

I have 2 audio .wav files recorded by the the same person with the same word. Each audio file has a format of 16bit, 44.1kHz and is a mono channel. I would like to know how to compare these 2 audio ...
7k views

### Applying FFT to PCM stream

I would like to use a .WAV file and convert it into a spectogram. Any idea how to do this with Naudio? Basically the flow should be like this, I think: Convert WAV file to PCM stream Convert PCM ...
2k views

### Object Recognition

I need help to develop an object recognition system. It needs to identify an object in an image by comparing it with an image in an existing database. For example my database may consist of images of ...
95 views

### What could an algorithm look like that iterates through all combinations of two variables to aim at a certain number of entries? [closed]

For background information, see "Some background" further down. I have a list that looks like this: Start-Time-In-Seconds;End-Time-In-Seconds 1;2 4;6 12;15 ... ...
13k views

### How to resample audio using FFT or DFT

I'm down sampling voice audio by first performing an FFT, then only taking the parts of the result that I need, and then performing an inverse FFT. However, it's only working properly when I'm using ...
694 views

### Get bit stream from known radio frequency

I'm a beginner in radio demodulation, and several days can't solve my problem. The problem is to get bit stream from known frequency. I made I C# application that gets the data in real time from ...