diff options
Diffstat (limited to 'SD-VBS/benchmarks/disparity/src/matlab/refineDisparity.m')
-rwxr-xr-x | SD-VBS/benchmarks/disparity/src/matlab/refineDisparity.m | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/SD-VBS/benchmarks/disparity/src/matlab/refineDisparity.m b/SD-VBS/benchmarks/disparity/src/matlab/refineDisparity.m deleted file mode 100755 index f303236..0000000 --- a/SD-VBS/benchmarks/disparity/src/matlab/refineDisparity.m +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | function retDisparity=refineDisparity(Idisp, DispSAD, Ileft, Iright) | ||
2 | [nr nc ndist]=size(DispSAD); | ||
3 | retDisparity=zeros(nr, nc); | ||
4 | |||
5 | IdispNext=padarray(Idisp, [0 1], 'replicate', 'post'); | ||
6 | IdispNext=IdispNext(:,2:end); | ||
7 | |||
8 | |||
9 | IdispDiff=abs(Idisp-IdispNext); | ||
10 | idx=find(IdispDiff>1); | ||
11 | [idxI idxJ]=ind2sub([nr, nc], idx); | ||
12 | |||
13 | %if(Idisp(idx) | ||
14 | %sideFlag= | ||
15 | checkedResult= (abs( DispSAD(sub2ind( [nr, nc, ndist], idxI, idxJ, Idisp(idx))) - ... | ||
16 | DispSAD(sub2ind( [nr, nc, ndist], idxI, idxJ+1, Idisp(idx))) ) < 1 )+1; | ||
17 | checkedResult= checkedResult + (abs( DispSAD(sub2ind( [nr, nc, ndist], idxI, idxJ, Idisp(idx+nr))) - ... | ||
18 | DispSAD(sub2ind( [nr, nc, ndist], idxI, idxJ+1, Idisp(idx+nr))) ) < 1 ); | ||
19 | retDisparity(idx)=checkedResult; | ||
20 | |||
21 | |||
22 | % IdispDiff=(Idisp-IdispNext); | ||
23 | % idx=find(IdispDiff<-1); | ||
24 | % [idxI idxJ]=ind2sub([nr, nc], idx); | ||
25 | % | ||
26 | % checkedResult= abs( DispSAD(sub2ind( [nr, nc, ndist], idxI, idxJ, Idisp(idx+nr))) - ... | ||
27 | % DispSAD(sub2ind( [nr, nc, ndist], idxI, idxJ+1, Idisp(idx+nr))) ) < 0.5; | ||
28 | % retDisparity(idx)=checkedResult; | ||
29 | |||
30 | |||
31 | |||