diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2020-10-19 23:09:30 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 02:40:39 -0400 |
| commit | f618466c25d43f3bae9e40920273bf77de1e1149 (patch) | |
| tree | 460e739e2165b8a9c37a9c7ab1b60f5874903543 /SD-VBS/benchmarks/sift/src | |
| parent | 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 (diff) | |
initial sd-vbs
initial sd-vbs
add sd-vbs
sd-vbs
Diffstat (limited to 'SD-VBS/benchmarks/sift/src')
52 files changed, 5480 insertions, 0 deletions
diff --git a/SD-VBS/benchmarks/sift/src/c/diffss.c b/SD-VBS/benchmarks/sift/src/c/diffss.c new file mode 100644 index 0000000..683cbe7 --- /dev/null +++ b/SD-VBS/benchmarks/sift/src/c/diffss.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include "sift.h" | ||
| 6 | |||
| 7 | /** | ||
| 8 | DIFFSS Difference of scale space | ||
| 9 | Returns a scale space DSS obtained by subtracting | ||
| 10 | consecutive levels of the scale space SS. | ||
| 11 | |||
| 12 | In SIFT, this function is used to compute the difference of | ||
| 13 | Gaussian scale space from the Gaussian scale space of an image. | ||
| 14 | **/ | ||
| 15 | |||
| 16 | F2D** diffss(F2D** ss, int num, int intervals) | ||
| 17 | { | ||
| 18 | F2D** dss; | ||
| 19 | int o, sizeM, sizeN, s, i, j; | ||
| 20 | F2D *current, *in1, *in2; | ||
| 21 | |||
| 22 | dss = malloc(num*intervals*sizeof(F2D*)); | ||
| 23 | |||
| 24 | for(o=0; o<num; o++) | ||
| 25 | { | ||
| 26 | for(s=0; s<(intervals-1); s++) | ||
| 27 | { | ||
| 28 | sizeM = ss[o*intervals+s]->height; | ||
| 29 | sizeN = ss[o*intervals+s]->width; | ||
| 30 | |||
| 31 | dss[o*intervals+s] = fMallocHandle(sizeM, sizeN); | ||
| 32 | |||
| 33 | current = dss[o*intervals+s]; | ||
| 34 | in1 = ss[o*intervals+s+1]; | ||
| 35 | in2 = ss[o*intervals+s]; | ||
| 36 | |||
| 37 | for(i=0; i<sizeM; i++) | ||
| 38 | { | ||
| 39 | for(j=0; j<sizeN; j++) | ||
| 40 | { | ||
| 41 | subsref(current,i,j) = subsref(in1,i,j) - subsref(in2,i,j); | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | return dss; | ||
| 48 | |||
| 49 | } | ||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | |||
diff --git a/SD-VBS/benchmarks/sift/src/c/doubleSize.c b/SD-VBS/benchmarks/sift/src/c/doubleSize.c new file mode 100644 index 0000000..dd17f77 --- /dev/null +++ b/SD-VBS/benchmarks/sift/src/c/doubleSize.c | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include "sift.h" | ||
| 6 | |||
| 7 | F2D* doubleSize(F2D* I) | ||
| 8 | { | ||
| 9 | F2D *J; | ||
| 10 | int M, N, i, j; | ||
| 11 | |||
| 12 | M = I->height; | ||
| 13 | N = I->width; | ||
| 14 | J = fSetArray(2*M, 2*N, 0); | ||
| 15 | |||
| 16 | for(i=0; i<M; i++) | ||
| 17 | { | ||
| 18 | for(j=0; j<N; j++) | ||
| 19 | { | ||
| 20 | subsref(J,2*i,j*2) = subsref(I,i,j); | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | for(i=0; i<M-1; i++) | ||
| 25 | { | ||
| 26 | for(j=0; j<N-1; j++) | ||
| 27 | { | ||
| 28 | subsref(J,i*2+1,j*2+1) = (0.25 * (subsref(I,i,j) + subsref(I,i+1,j) + subsref(I,i,j+1) + subsref(I,(i+1),j+1))); | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | for(i=0; i<M-1; i++) | ||
| 33 | { | ||
| 34 | for(j=0; j<N; j++) | ||
| 35 | { | ||
| 36 | subsref(J,i*2+1,j*2) = (0.5 * (subsref(I,i,j) + subsref(I,i+1,j))); | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | for(i=0; i<M; i++) | ||
| 41 | { | ||
| 42 | for(j=0; j<N-1; j++) | ||
| 43 | { | ||
| 44 | subsref(J,i*2,j*2+1) = (0.5 * (subsref(I,i,j) + subsref(I,i,j+1))); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | |||
| 48 | return J; | ||
| 49 | } | ||
| 50 | |||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | |||
diff --git a/SD-VBS/benchmarks/sift/src/c/filterBoundaryPoints.c b/SD-VBS/benchmarks/sift/src/c/filterBoundaryPoints.c new file mode 100644 index 0000000..c68e717 --- /dev/null +++ b/SD-VBS/benchmarks/sift/src/c/filterBoundaryPoints.c | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | #include "sift.h" | ||
| 2 | |||
| 3 | /** | ||
| 4 | Filter out points on the boundaries. | ||
| 5 | The function returns oframes, which | ||
| 6 | contains the row, col and the interval number | ||
| 7 | **/ | ||
| 8 | |||
