From f618466c25d43f3bae9e40920273bf77de1e1149 Mon Sep 17 00:00:00 2001 From: leochanj105 Date: Mon, 19 Oct 2020 23:09:30 -0400 Subject: initial sd-vbs initial sd-vbs add sd-vbs sd-vbs --- SD-VBS/benchmarks/stitch/src/c/maxWindow.c | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 SD-VBS/benchmarks/stitch/src/c/maxWindow.c (limited to 'SD-VBS/benchmarks/stitch/src/c/maxWindow.c') diff --git a/SD-VBS/benchmarks/stitch/src/c/maxWindow.c b/SD-VBS/benchmarks/stitch/src/c/maxWindow.c new file mode 100644 index 0000000..07f8dc9 --- /dev/null +++ b/SD-VBS/benchmarks/stitch/src/c/maxWindow.c @@ -0,0 +1,51 @@ +/******************************** +Author: Sravanthi Kota Venkata +********************************/ + +#include "stitch.h" + +F2D* maxWindow(F2D* im, I2D* window) +{ + int exR, exC, rows, cols, tr, tc, i, j, k; + F2D *out, *temp; + float t; + int m; + + exR = asubsref(window,0)/2; + exC = asubsref(window,1)/2; + + rows = im->height; + cols = im->width; + + tr = rows+exR-1; + tc = cols+exC-1; + temp = fDeepCopy(im); + out = fMallocHandle(rows, cols); + + for(i=0; i= rows || (j+m) < 0 || (j+m) >= cols) + continue; + if( subsref(temp,(i+k),(j+m)) > t) + t = subsref(temp,(i+k),(j+m)); + } + } + subsref(out,i,j) = t; + } + } + + fFreeHandle(temp); + return out; +} + + + + + -- cgit v1.2.2