resampling

Where can I find a good read about bicubic interpolation and Lanczos resampling?

I want to implement the two above mentioned image resampling algorithms (bicubic and Lanczos) in C++. I know that there are dozens of existing implementations out there, but I still want to make my own. I want to make it partly because I want to understand how they work, and partly because I want to give them some capabilities not found ...

How do you do bicubic (or other non-linear) interpolation of re-sampled audio data?

I'm writing some code that plays back WAV files at different speeds, so that the wave is either slower and lower-pitched, or faster and higher-pitched. I'm currently using simple linear interpolation, like so: int newlength = (int)Math.Round(rawdata.Length * lengthMultiplier); float[] output = new float[newlengt...

Percentiles of Live Data Capture

I am looking for an algorithm that determines percentiles for live data capture. For example, consider the development of a server application. The server might have response times as follows: 17 ms 33 ms 52 ms 60 ms 55 ms etc. It is useful to report the 90th percentile response time, 80th percentile response time, etc. The naive alg...

How can I make sure sox doesn't perform automatic dithering without knowing the version?

I'm using sox to resample audio before introducing it to our speech detection system, but I've hit a snag with version 14.3 of sox adding automatic dithering by default to the resampling operation, which we don't want. This wouldn't be a problem if we knew that we were always using sox 14.3, as we could just use the new -D flag to disa...

How to Resize using Lanczos

I can easily calculate the values for sinc(x) curve used in Lanczos, and I have read the previous explanations about Lanczos resize, but being new to this area I do not understand how to actually apply them. To resample with lanczos imagine you overlay the output and input over eachother, with points signifying where the pixel...

jpegs are corrupted when resampled with java imageIO

The JPEG Images that ImageIO generated view correctly on windows file explorer, as well as safari webbrowser, but in FireFox, the resampled images are clipped. How do I use ImageIO without corrupting the resamples? The code should resize image keeping aspect ratio, as well as do jpeg compression, the convert it to a byte [] array, whic...

resampling a series of points

hello, i have an array of points in 3d (imagine the trajectory of a ball) with X samples. now, i want to resample these points so that i have a new array with positions with y samples. y can be bigger or smaller than x but not smaller than 1. there will always be at least 1 sample. how would an algorithm look like to resample the orig...

resample / upsample sound frames from 8Khz to 48Khz (Java/Android)

Hi there, The application that I am trying to develop for andriod, records frames at 48Khz (PCM 16bits & mono) and sends them to the network. Also, there is an incoming stream of audio at 8Khz. So, I receive 8Khz sampled frames and play them (my AudioTrack object is set to 8Khz), but when playing them, everything works but the latency i...

How do I mixdown multiple audio channels in java/xuggler?

like mixing 6 channel surround down to stereo? xuggler throws: ERROR com.xuggle.xuggler - Error: inputChannels > 2; unsupported ...

Resampling irregularly spaced data to a regular grid in Python

Hi! I need to resample 2D-data to a regular grid. This is what my code looks like: import matplotlib.mlab as ml import numpy as np y = np.zeros((512,115)) x = np.zeros((512,115)) # Just random data for this test: data = np.random.randn(512,115) # filling the grid coordinates: for i in range(512): y[i,:]=np.arange(380,380+4*...

Library for audio resampling

In an embedded (Windows CE) C++ project, I have to resample an arbitrary sample-rate down (or up) to 44100 Hz. Is there a free and portable C/C++ library for audio resampling? ...