Questions tagged [downsampling]
231 questions
2
votes
2 answers
fast downsampling of huge matrix using python (numpy memmap, pytables or other?)
As part of my data processing I produce huge non sparse matrices in the order of 100000*100000 cells, which I want to downsample by a factor of 10 to reduce the amount of data. In this case I want to average over blocks of 10*10 pixels, to reduce…

Gert
- 55
- 1
- 7
2
votes
1 answer
ghostscript downsampling of pdf images, downsample factor error
I issue the following command:
gs \
-o downsampled.pdf \
-sDEVICE=pdfwrite \
-dDownsampleColorImages=true \
-dColorImageResolution=180 \
-dColorImageDownsampleThreshold=1.0 \
And get the following errors:
Subsample filter does not support…

Admiral Tso
- 71
- 2
- 7
2
votes
2 answers
Max-pooling vs. zero padding: Loosing spatial information
When it comes to convolutional neural networks there are normally many papers recommending different strategies. I have heard people say that it is an absolute must to add padding to the images before a convolution, otherwise to much spatial…

Daniel Falk
- 522
- 4
- 16
2
votes
2 answers
How we can down sample a 1D array values by averaging method using float and int window sizes?
I am trying to down sample a fixed [Mx1] vector into any given [Nx1] dimensions by using averaging method. I have a dynamic window size that changes every time depending upon the required output array. So, in some cases i get lucky and get window…

Nomiluks
- 2,052
- 5
- 31
- 53
2
votes
1 answer
C++ How to best scale image by dropping pixels
I am capturing a frame of data from an imager with a resolution of 102 x 77. I want to downsample this to 80 x 60. Quality is not the main concern but ease of implementation and speed are.
I believe I can accomplish this by roughly dropping every…

PhilBot
- 748
- 18
- 85
- 173
2
votes
1 answer
How to downsample a texture
(I'm doing this in Apple Metal, but I think the question applies to OpenGL and DirectX too. Code examples from Metal or OpenGL are highly welcome.)
I have one texture smallTex whose size is a multiple of the size of another texture bigTex.
For…

Jonas Sourlier
- 13,684
- 16
- 77
- 148
2
votes
2 answers
Downsampling a 2d MATRIX in matlab, by taking average block wise
Say I have a matrix A, which is of dimension 4x4.
Now I want to downsample this matrix by a factor 2 to get a new matrix B of dimension 2x2.
I want to downsample in the following way :
Let A be
1 5 9 13
2 6 10 14
3 7 …

Adithyan Ilangovan
- 169
- 1
- 9
2
votes
2 answers
How to simply downsample a triangular mesh?
This requirement occur when I show the surface mesh in Matlab by trisurf, because the mesh is dense (high-resolution) and it is rendered slowly and can not be rotated. So I am wondering there is some intuitive method to downsample the mesh while…

nicozuo
- 21
- 4
2
votes
1 answer
Downsample PCM audio 44100 to 8000
I've taken over maintaining an android application that records an audio source using AudioRecord in 44100, 16-bit mono. I need to downsample it to 8000. The current app has a downsample algorithm in it that I'm not sure is working correctly. …

mjsalinger
- 660
- 6
- 17
2
votes
1 answer
How does OpenTSDB downsample data
I have a 2 part question regarding downsampling on OpenTSDB.
The first is I was wondering if anyone knows whether OpenTSDB takes the last end point inclusive or exclusive when it calculates downsampling, or does it count the end data point…

Classified
- 5,759
- 18
- 68
- 99
2
votes
1 answer
Downsampling 96 to 44.1 kHz audio fast (realtime) in a VST instrument
I'm trying to make a fast downsampling function in my VSTi (c++), but I'm having some hard time to get it to work. This is what I have and what I'm trying to do. First off is the low-pass filter..
void resetFilter()
{
c = 1.0 /…

Magnus
- 379
- 1
- 15
2
votes
0 answers
GLSL 330: down sample texture
I want to down sample an input texture from 800x600 to one quarter itself (200x150 pixel). But if I do that I can see only a little bit of the image. It seems that the frament shader doesn't down sample the whole texture. The following example is to…

Tobias
- 427
- 4
- 19
2
votes
2 answers
Ghostscript: how to reduce file size of large PDFs without changing smaller PDFs
I am using GhostScript to convert large batches of PDF to PDF to reduce file size. The original PDFs vary in size and quality. Where there is a low quality, small file size (<350kb) PDF the output from Ghostscript is often poor.
Is there a way I can…

vix
- 21
- 1
- 2
1
vote
0 answers
Downsampling: Audible Clicks
In a C++ Program, I am trying to downsample blocks of 8192 audio samples (-32768...32767).
The original Sampling Rate is 48kHz, and I'd like to have 16kHz.
The ratio 16/48 should yield roughly 2731 samples if the original number of samples is…

Nox997
- 71
- 5
1
vote
2 answers
Python - Downsampling of a list of points, with given coordinates and distance between two adjacent points in the list
I really hope someone can help me with this! I'm trying to make this script run as I want, but I cannot seem to get the hang of it.
The file with the data to be handled is input from a GPS and looks like this:
Line…

user1059822
- 11
- 1
- 3