Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c#]

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

0
votes
0answers
252 views

How can I improve the Canny edge detection code?

I have converted this Matlab code for Canny edge detection into C# given that the Matlab version gives out a good output. The output from Matlab code is as follows: And my C# version's outputs are ...
2
votes
1answer
40 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 ...
0
votes
1answer
39 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 ...
0
votes
2answers
92 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 ...
0
votes
0answers
121 views

Edge effects in cross-correlation

This is a follow-up of this question. The problem explained in the linked question has been in part solved by the mean of a windowing function. But my cross-corrleation still exhibits strong edge-...
1
vote
1answer
53 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 ...
0
votes
1answer
159 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 ...
2
votes
1answer
162 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 ...
-1
votes
0answers
144 views

How to read .wav file to n array [duplicate]

Can anyone provide a solution to move the value on a .wav signal into an array in C# or C++? I want to process the signal. Thank you.
1
vote
0answers
510 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 ...
0
votes
0answers
117 views

Filter time series with variable cutoff

I am looking for a practical way to filter a time series with a cutoff frequency which will be increased during the period of the data. This is not a real time application. The data will be in an ...
4
votes
1answer
407 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 ...
0
votes
0answers
68 views

Extracting curve of audio file's fft

I have an audio file whose fft looks like this. I want to get the values of this curve over time as in Which algorithms help me do this, which keywords am I looking for? So far, I applied a high ...
3
votes
2answers
231 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 ...
0
votes
1answer
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 <...
1
vote
0answers
72 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 ...
0
votes
2answers
75 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 ...
1
vote
2answers
758 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 ...
0
votes
1answer
660 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 ...
2
votes
0answers
972 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 ...
0
votes
1answer
578 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 ...
0
votes
1answer
565 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 ...
0
votes
0answers
112 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 ...
1
vote
0answers
388 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 ...
1
vote
0answers
844 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 ...
0
votes
2answers
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 (...
1
vote
1answer
1k 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 ...
0
votes
2answers
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 ...
2
votes
1answer
6k 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 ...
1
vote
2answers
2k 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 ...
1
vote
0answers
189 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 ...
-1
votes
1answer
500 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 ...
5
votes
1answer
661 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....
1
vote
2answers
8k 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, ...
-1
votes
2answers
153 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 ...
0
votes
1answer
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 ...
1
vote
1answer
5k 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 ...
1
vote
2answers
1k 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 ...
-1
votes
1answer
94 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 ... ...
8
votes
3answers
10k 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 ...
1
vote
0answers
641 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 ...
13
votes
3answers
5k views

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

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 ...
10
votes
3answers
16k views

How do I compare 2 audio files, returning a percentage of difference

Is there a way to compare 2 audio files, whereby a percentage of difference will be returned? I am using C# VS08, .net framework 3.5. Edited: difference in the sound (like for eg. Audio 1: ...