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/common/toolbox/toolbox_basic/stella/test_ncutm.m | |
parent | 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 (diff) |
initial sd-vbs
initial sd-vbs
add sd-vbs
sd-vbs
Diffstat (limited to 'SD-VBS/common/toolbox/toolbox_basic/stella/test_ncutm.m')
-rwxr-xr-x | SD-VBS/common/toolbox/toolbox_basic/stella/test_ncutm.m | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/SD-VBS/common/toolbox/toolbox_basic/stella/test_ncutm.m b/SD-VBS/common/toolbox/toolbox_basic/stella/test_ncutm.m new file mode 100755 index 0000000..c9b46ab --- /dev/null +++ b/SD-VBS/common/toolbox/toolbox_basic/stella/test_ncutm.m | |||
@@ -0,0 +1,38 @@ | |||
1 | fn = 'walk1'; | ||
2 | |||
3 | repulsion_test = 1; | ||
4 | |||
5 | if 1, | ||
6 | f = getimage2(fn); | ||
7 | par = jshincutdefpar; | ||
8 | par.fname_base = fn; | ||
9 | par.spatial_neighborhood_x = 10; | ||
10 | par.sigma_x = 3 * par.spatial_neighborhood_x; | ||
11 | par.sig_IC = 0.03; | ||
12 | par.num_eigvecs = 10; | ||
13 | par.offset = 0.00; | ||
14 | par.sig_filter = 1.0; | ||
15 | par.elong_filter = 3.0; | ||
16 | [par,rec_num] = jshincut(par); | ||
17 | [g,lgd,v,s,dd] = showncut(fn,rec_num); | ||
18 | |||
19 | if repulsion_test, | ||
20 | par.offset = 0.1; | ||
21 | [par,rec_num] = jshincut(par); | ||
22 | figure; | ||
23 | [g,lgd,v,s,dd] = showncut(fn,rec_num); | ||
24 | end | ||
25 | end | ||
26 | |||
27 | if 0, | ||
28 | x = v(:,:,1); | ||
29 | y = v(:,:,2); | ||
30 | figure; | ||
31 | subplot(2,1,1); plot(x(:),y(:),'ro'); | ||
32 | r = sqrt(x.^2+y.^2); | ||
33 | x = x./r; | ||
34 | y = y./r; | ||
35 | subplot(2,1,2); im([x,y]*[x,y]'); | ||
36 | % mask = (x>0) & y>0; | ||
37 | % showmask(f,mask); | ||
38 | end | ||