diff options
Diffstat (limited to 'SD-VBS/benchmarks/tracking/src/matlab/imageBlur.m')
-rwxr-xr-x | SD-VBS/benchmarks/tracking/src/matlab/imageBlur.m | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/SD-VBS/benchmarks/tracking/src/matlab/imageBlur.m b/SD-VBS/benchmarks/tracking/src/matlab/imageBlur.m deleted file mode 100755 index fd6c199..0000000 --- a/SD-VBS/benchmarks/tracking/src/matlab/imageBlur.m +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | function imageOut = imageBlur(imageIn) | ||
2 | |||
3 | imsize = size(imageIn); | ||
4 | rows = imsize(1); | ||
5 | cols = imsize(2); | ||
6 | |||
7 | imageOut = zeros(rows, cols);%initalize output image to all zeros | ||
8 | imageIn = double(imageIn);%convert to double to allow image arithmetic | ||
9 | |||
10 | kernel = [1 4 6 4 1]; | ||
11 | kernelSize = 5; | ||
12 | |||
13 | startCol = 3; %((kernelSize+1)/2); | ||
14 | endCol = cols - 2; %round(cols - ((kernelSize+1)/2)); | ||
15 | halfKernel = 2; %(kernelSize-1)/2; | ||
16 | |||
17 | startRow = 3; %((kernelSize+1)/2); | ||
18 | endRow = rows - 2; %(rows - ((kernelSize+1)/2)); | ||
19 | |||
20 | %% Start 1-D filtering row-wise first. | ||
21 | |||
22 | tempOut = zeros(rows, cols);%initalize temp image to all zeros | ||
23 | for i=startRow:endRow | ||
24 | for j=startCol:endCol | ||
25 | tempOut(i,j) = sum(imageIn(i,j-halfKernel:j+halfKernel).*kernel)/sum(kernel);%actual filtering step | ||
26 | end | ||
27 | end | ||
28 | |||
29 | %% Start 1-D filtering col-wise first. | ||
30 | |||
31 | for i=startRow:endRow | ||
32 | for j=startCol:endCol | ||
33 | imageOut(i,j) = sum(tempOut(i-halfKernel:i+halfKernel,j).*kernel')/sum(kernel);%kernel to be transposed for performing multiplcation | ||
34 | end | ||
35 | end | ||
36 | |||