diff options
Diffstat (limited to 'SD-VBS/benchmarks/disparity/src/matlab/script_run_profile.m')
-rwxr-xr-x | SD-VBS/benchmarks/disparity/src/matlab/script_run_profile.m | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/SD-VBS/benchmarks/disparity/src/matlab/script_run_profile.m b/SD-VBS/benchmarks/disparity/src/matlab/script_run_profile.m deleted file mode 100755 index 6e0386d..0000000 --- a/SD-VBS/benchmarks/disparity/src/matlab/script_run_profile.m +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | function script_run_profile(dataDir, resultDir, type, common, tooldir) | ||
2 | |||
3 | path(path,common); | ||
4 | |||
5 | tol = 2; | ||
6 | elapsed = [0, 0]; | ||
7 | |||
8 | WIN_SZ = 8; | ||
9 | SHIFT = 64; | ||
10 | |||
11 | if(strcmp(type,'test')) | ||
12 | WIN_SZ = 2; | ||
13 | SHIFT = 1; | ||
14 | elseif(strcmp(type, 'sim_fast')) | ||
15 | WIN_SZ = 4; | ||
16 | SHIFT = 4; | ||
17 | elseif(strcmp(type,'sim')) | ||
18 | WIN_SZ = 4; | ||
19 | SHIFT = 8; | ||
20 | end | ||
21 | |||
22 | outFile = [resultDir, '/', 'out', '.bmp']; | ||
23 | |||
24 | file = [dataDir, '/1.bmp']; | ||
25 | imleft = readImage(file); | ||
26 | imright = readImage([dataDir, '/2.bmp']); | ||
27 | [rows, cols] = size(imright); | ||
28 | |||
29 | fprintf(1,'Input size\t\t- (%dx%d)\n', rows, cols); | ||
30 | |||
31 | start = photonStartTiming; | ||
32 | [imDispOwn, DispSAD, minSAD]=getDisparity(double(imleft), double(imright), WIN_SZ, SHIFT); | ||
33 | stop = photonEndTiming; | ||
34 | elapsed = photonReportTiming(start, stop); | ||
35 | |||
36 | writeMatrix(imDispOwn, dataDir); | ||
37 | imwrite(uint8(minSAD), outFile, 'bmp'); | ||
38 | |||
39 | photonPrintTiming(elapsed); | ||
40 | |||
41 | |||
42 | |||
43 | |||