summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/stitch/src/c/maxWindow.c
diff options
context:
space:
mode:
authorleochanj105 <leochanj@live.unc.edu>2021-10-26 13:22:32 -0400
committerleochanj105 <leochanj@live.unc.edu>2021-10-26 13:22:32 -0400
commit14c854543b1a3cf344a371a5b45595657f95786b (patch)
tree70f752880522e5e44669af365754ac0f649dce81 /SD-VBS/benchmarks/stitch/src/c/maxWindow.c
parent5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff)
add deadlines and costs
Diffstat (limited to 'SD-VBS/benchmarks/stitch/src/c/maxWindow.c')
-rw-r--r--SD-VBS/benchmarks/stitch/src/c/maxWindow.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/SD-VBS/benchmarks/stitch/src/c/maxWindow.c b/SD-VBS/benchmarks/stitch/src/c/maxWindow.c
deleted file mode 100644
index 07f8dc9..0000000
--- a/SD-VBS/benchmarks/stitch/src/c/maxWindow.c
+++ /dev/null
@@ -1,51 +0,0 @@
1/********************************
2Author: Sravanthi Kota Venkata
3********************************/
4
5#include "stitch.h"
6
7F2D* maxWindow(F2D* im, I2D* window)
8{
9 int exR, exC, rows, cols, tr, tc, i, j, k;
10 F2D *out, *temp;
11 float t;
12 int m;
13
14 exR = asubsref(window,0)/2;
15 exC = asubsref(window,1)/2;
16
17 rows = im->height;
18 cols = im->width;
19
20 tr = rows+exR-1;
21 tc = cols+exC-1;
22 temp = fDeepCopy(im);
23 out = fMallocHandle(rows, cols);
24
25 for(i=0; i<rows; i++)
26 {
27 for(j=0; j<cols; j++)
28 {
29 t = 0;
30 for(k=-exR; k<=exR; k++)
31 {
32 for(m=-exC; m<=exC; m++)
33 {
34 if( (i+k) < 0 || (i+k) >= rows || (j+m) < 0 || (j+m) >= cols)
35 continue;
36 if( subsref(temp,(i+k),(j+m)) > t)
37 t = subsref(temp,(i+k),(j+m));
38 }
39 }
40 subsref(out,i,j) = t;
41 }
42 }
43
44 fFreeHandle(temp);
45 return out;
46}
47
48
49
50
51