summaryrefslogtreecommitdiffstats
path: root/matlab/tools/downsample_sinogram.m
blob: a4122e8a86ed113ec77087804154caeb0b0de87f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function sinogram_out = downsample_sinogram(sinogram, ds)

	if ds == 1
		sinogram_out = sinogram;
		return;
	end

	sinogram_out = sinogram(:,1:ds:end,:);
	for i = 2:ds
		sinogram_out = sinogram_out + sinogram(:,i:ds:end,:);
	end
	sinogram_out = sinogram_out / (ds*ds);