Questions tagged [downsampling]

231 questions
1
vote
1 answer

Resample and anti-alias FIRLS filter order

I have some audio files recorded in 48kHz sampling frequency. I will have to examine some audio characteristics and need to do that for lower sampling frequencies to see when they start to fail. I am going to test the downsampled audio files at…
Celdor
  • 2,437
  • 2
  • 23
  • 44
1
vote
1 answer

Java - Downsampling from 22050 to 8000 gives zero bytes

I'm trying to downsample a .wav audio from 22050 to 8000 using AudioInputStream but the conversion returns me 0 data bytes. Here is the code: AudioInputStream ais; AudioInputStream eightKhzInputStream = null; ais =…
Claudio Mezzasalma
  • 646
  • 1
  • 5
  • 23
1
vote
2 answers

What does this mean in MATLAB?

I have came about a MATLAB code like the following: xyz = imfilter(A,B); xyz_subsample = xyz(1:2:size(xyz, 1), 1:2:size(xyz, 2)); The code is related to subsampling. But, what does the second line mean? Thanks.
Simplicity
  • 47,404
  • 98
  • 256
  • 385
1
vote
0 answers

filtering before/after decimating

I deal with a signal of sampling frequency of 48000 Hz. I do not need this much and doing decimation in order to get to 8000 Hz, so, decimation of 6-th order. Additionally, I know I need to filter out 50 Hz and its harmonics. I am going to do it…
Elen Che
  • 31
  • 1
  • 3
1
vote
1 answer

Python: downsample a population using frequency data

Given a data series representing frequencies of elements in a population, what would be the easiest way to downsample it ? The following population: pop = ['a', 'b', 'a', 'c', 'c', 'd', 'c', 'a', 'a', 'b', 'a'] Can be summeriezed as: freq = {'a': 5,…
xApple
  • 6,150
  • 9
  • 48
  • 49
1
vote
0 answers

PCM-downsampling: input-frames/output-frames vs. buffer-size

I have a program which reads 4096 frames (16384 bytes) 16bit LE 48000 Hz PCM into a 16384 bytes large buffer per "read" from a kernel module (= read from ALSA's ring-buffer). After each "read" I have to downsample the 48 kHz to 44.1 kHz and the…
Martin L.
  • 3,006
  • 6
  • 36
  • 60
1
vote
3 answers

Play 48 kHz PCM on 44.1 kHz receiver

I have a 48 kHz PCM stream and want to stream it to a 44.1 kHz compatible player (Apple's AirPlay). Someone knows if this "just works because some bytes would get lost", or do I have to do a conversion/down-sampling before? If it not "just works",…
Martin L.
  • 3,006
  • 6
  • 36
  • 60
1
vote
2 answers

Python Pandas: Data Downsampling

My data looks like this: TEST 2012-05-01 00:00:00.203 OFF 0 2012-05-01 00:00:11.203 OFF 0 2012-05-01 00:00:22.203 ON 1 2012-05-01 00:00:33.203 ON 1 2012-05-01 00:00:44.203 OFF 0 TEST 2012-05-02 00:00:00.203 OFF 0 2012-05-02 00:00:11.203 OFF…
user1412286
  • 191
  • 3
  • 10
0
votes
0 answers

how to sample a data frame in R without exhaust the memory

I am trying to sample a data frame which contains two column one is ID one is count. the sum of count is 10^13 and I want to sample the size to 10^12 ,10^11 and so on. but The vector exceeds the limits of R. How can I sample this kind of data…
mel099
  • 23
  • 4
0
votes
0 answers

How should I implement downsampling and loading images in SwiftUI: synchronously or asynchronously?

I need to downsample the image stored in CoreData to show the image at a specific size. Currently, I've implemented it synchronously, but the image animation is not smooth when the sheetView comes up from the bottom. Should I animate it, or is…
0
votes
0 answers

Affine transformation using cv2 and torch

def opencv_downsampling(img, out_size, translation=(0.0, 0.0), rotation=0.0, shear=(0.0, 0.0), scale=(1.0, 1.0), interpolation=cv2.INTER_LINEAR): h, w = img.shape[:2] rotx = w / 2 - 0.5 roty = h / 2 - 0.5 tmat = np.zeros((2,3),…
0
votes
0 answers

How to downsample a PCM stream in android with kotlin

I am attempting to show the audio intensity in Android and in order to do it, I am recording data in stereo PCM 16 bit with AudioRecord, so I have a buffer with the values. The recording sample rate is 48kHz since it is supported by all the devices,…
albertopasqualetto
  • 87
  • 1
  • 1
  • 11
0
votes
0 answers

How to make an IBDesignable image down sampling function in Swift?

I faced and issue with images using too much memory when running the app. A 905kb SVG image was taking around 150mb when presented and this image was being cached by the system. Loading several different SVG images on different pages led to memory…
Zyfe3r
  • 653
  • 6
  • 24
0
votes
0 answers

How can i downsample a 16khz wav file after doing FFT on the wav file

I extracted a wav file then applied the FFT the sampling frequency is 16khz how can i downsample it and plot it to see the difference also if you check fft_spectrum_abs.size it should return 8001 can i instead just take 265 points and just plot them…
dengilewi
  • 1
  • 1
0
votes
1 answer

Downsampling and aliasing effect in python st.resample

Does downsampling using stream.resample () in Python introduce aliasing effect? I want to investigate a signal below 4 Hz. It has the original sampling rate of 100 Hz but I need to downsample it as much as possible. If I use In Python st.resample()…
OnEarth
  • 57
  • 1
  • 6