Hot answers tagged

16

The first step is to verify that both your starting sample rate and your target sample rate are rational numbers. Since they are integers they are automatically rational numbers. If one of them wasn't a rational number it would still be possible to make the sample rate change, but it is a much different process and more difficult. The next step is to ...


8

Could you please define the "percentage of difference"? For example, please tell us which value do you expect to get: Between two versions of the same file encoded with different settings? Between two versions of the same file, except that one is slightly faster than the other? Between two recordings of the same audio input, but through different ...


7

Both your images contain many lines that have nothing to do with the sign you're looking for. And some of those lines are longer/have higher contrast than the lines you actually want, so I think detecting the edge lines (e.g. using a hough transform or by summing up contrasts horizontally/vertically) will not work. But: The sign you're looking for has ...


5

i don't consider this a "bad" question. But there is a lot that nano needs to deal with. first, you must be able to think about conceptually and mathematically converting your continuous-time signal $$ x(t) = \sin(\Omega t) $$ into a discrete-time signal $$ x[n] = \sin(\omega n) $$ how $n$ is related to $t$ and how $\omega$ is related to $\Omega$. ...


4

You can use the formulas presented in the answers to: How to calculate a delay (correlation peak) between two signals with a precision smaller than the sampling period? To recap, find the largest value, called $\beta$. Take also the values of the samples just to the left of it, $\alpha$, and just to the right of it, $\gamma$. Then calculate the peak ...


3

Any kind of digital filter will cause the the output signal to be delayed by some amount of samples. From what I gather, you are trying to run a signal through a high pass filter (is it an FIR or IIR?) and correct the group delay by "filtering the first time, inverting the response in time...". I personally have never been taught or have read of such an ...


3

I know this answer is very late but I think this question worth an answer The algorithm you used goes as follows: Blur the original image using the Gaussian filter with given Mask Size & Sigma Subtract the blurred image from the original (result is called Mask) to eliminate background and get the edges regions Add a weighted portion from the mask to ...


3

Since you already know your background image beforehand, it should be simple. I done many background subtraction before. Here is an example of removal of background by comparison. if (newBitmap.Width == backgroundBitmap.Width && newBitmap.Height == backgroundBitmap.Height) { for(int x = 0; x < newBitmap.Width; x++) { ...


3

While the above answer is really complete: Here is the gist of it: to downsample a signal it needs to be a whole number. Before the down sampling of a signal, you need to FILTER the signal. you can acheive rational number downsampling by Up-sampling/interpolating the signal first. Upsampling is simply inserting zeros and then FILTERING the signal. so to ...


3

Please get a look at ITU-T P.862. It is standardized form of PESQ (Perceptual Evaluation of Speech Quality), family of standards for evaluating the speech quality as experienced by a user of a telephony system. This is only around speech (not other audio information). You compare two audio files, source and degraded and you obtain a value in percent or MOS ...


2

Your description of how to create a spectrogram is correct. Here's an explanation with a little more detail: First, create a WaveChannel32, using a WaveFileReader. This will output a PCM byte stream. Then read 4 times the size of your FFT bytes from the WaveChannel32 into a buffer. Convert every four bits in the buffer into an integer. It's important at ...


2

This is a very old problem and a very difficult one. Trying to match off a single example image is not going to work well. Computer vision is a great area, but it is a difficult one. Generally the focus in these types of problems is that you have a single specific type of item you want to identify (e.g. pedestrians) and you try to simply answer questions ...


2

From an algorithm perspective, subtraction is the simplest method. Run a feature detection algorithm (like SIFT or SURF) on both images to align them Apply any enhancement operations at this stage, such as lens distortion removal, lighting correction, or others. Do a simple subtraction of the background image from the test image. Perform a blur or median ...


2

Histogram equalization is a global operation which can result in some areas being adversely effected at the cost of the rest of the image looking better. Consider using the Retinex algorithm. It works very well at improving both local and global contrast enhancement. There's a flurry of papers on this topic and the algorithm is somewhat straightforward to ...


2

Intuitively, HSV is the place to easily define Skin Color Hues. Yet there is a broad work on that and even articles about the optimal Color Space for Skin Detection. Yet, you should have a look at OPTIMUM COLOR SPACES FOR SKIN DETECTION (Alternative at IEEE - Optimum color spaces for skin detection). According to them there is no difference in the ...


2

There is no way to regain any lost data at all. However, there are many phenomena that might distort the image in a recoverable way, not actually losing any data. You seem to try to undo a "point spread function", that is eg. some consistent blur. This would be not the only way an image can be distorted, however it is by far the most common. In that case ...


2

You have probably found out that entropy of a discrete random variable $X$ is defined by $$H(X)=-\sum_{i=1}^N p_i\log_2 p_i\tag{1}$$ where $N$ is the size of the alphabet (i.e. the number of possible values of $X$), and $p_i$ is the probability that $X$ assumes the $i^{th}$ value of the alphabet. The entropy $H(X)$ can be interpreted as the average ...


2

I suspect that you need to pre-whiten the images. Here's an example with and without prewhitening. I've found a simple way to do pre-whitening (though in no way optimal) is to just do a column-wise diff on the images first. Some more text here.


1

Since your shift is going to be in the 0-5 pixel range, I am assuming you are going to want a method that gives you sub-sample accuracy. I have a suggestion for you to try. Read my article Exponential Smoothing with a Wrinkle and apply the technique to your 1D signal. Look for some matching zero crossings in the difference case near the center of your ...


1

The answer is "No, you cannot attenuate the impact of tide on pressure derived depth data you have already captured without extraneous information". The reason for this is that the hydrostatic pressure derived depth measurements from the tracked fish ($depth_{fish}(n)$), is only a component of the captured signal. The illustrative example here is a "...


1

You have to estimate a velocity based on a regularly sampled signal. The velocity is given by the derivative on a continuous time signal. The approximation of this value with discrete data is a long-lasting topic. @Juancho is correct with the proposal of the $2$-point difference scheme. As the sampling is never perfect, and $x[i]-x[i-1]$ is not symmetric. ...


1

Entropy would be a good metric in order to separate trees. However I would suggest you to calculate the entropy of gray values within a rectangular window. Consider this image: After entropy filter, I could obtain this one: Note that the trees (and also other informative areas) look white and it's possible to segment them out with a simple threshold. Try ...


1

"If I want to measure entropy of an image how should I do it?" An excellent question and one that, as of September 2016, has a simple and directly computable answer. The question is answered in a recent Stack Exchange correspondence: https://stats.stackexchange.com/questions/235270/entropy-of-an-image A detailed explanation is presented in the recent ...


1

You can't simply skip ahead some amount of time, and won't be able to skip ahead when decoding in real time. You need to simply decode as the values come in, and switch your output depending on what comes in. Change states only on input changes. So, like this: Feed input signal into the bank of goertzel filters, the detected tone is the filter output ...


1

First of all, a link to an example of the Goertzel algorithm. Second, the goertzel algorithm is so fast that you don't need to get into multithreading. Just create a class that does the goertzel algorithm for a frequency and sampling rate that you define when you create an instance. Make a list or array of instances of that class, then for every sample, ...


1

Your image seems sharp. Increasing the sharpness will not help. You need to use Deconvolution to inpaint some of the missing data. Try algorithms for inpainting, low-rank + sparse recovery or other methods of compressed sensing. If you want to increase the resolution then you can use the algorithms of super resolution, try the following http://www.wisdom....


1

You can perform histogram equalization on blocks inside the image. Overlapping blocks (and result averaging in the overlap areas) could help in reducing the subsequent block artifacts. R. Szeliski's book has some explanation of this local equalization algorithm. Another possibility is to model the hotspot in the middle as a kind of Gaussian spot, then ...


1

I think if you want to evaluate pronunciation, comparing the average pitch of two utterances is a terrible idea. It does not make sense because: Unless you are working with a tone language (like Chinese or Vietnamese), or something specifically related to prosody (english stress patterns), pitch is of lesser importance than other parameters. An utterance ...


1

This is just a start, because I am not sure I fully understand the problem yet. Here is a plot of what I think is happening. The blue curve is the "truth" of your quantity and the red curve is a delayed, noisy, measured version of it. Does this look like your problem? If not, how should it be changed to make it look more like it? I suspect that a ...


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