diff options
author | leochanj <jbakita@cs.unc.edu> | 2020-10-21 01:52:54 -0400 |
---|---|---|
committer | leochanj <jbakita@cs.unc.edu> | 2020-10-21 01:52:54 -0400 |
commit | 25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 (patch) | |
tree | ba80e76d25d9ca9486092e2f6b6d76f0e3352bf7 /SD-VBS/benchmarks/mser/src/matlab/old/mser_demo2.m | |
parent | e2b50015cebdfba68699abd6e8575e38230f5a78 (diff) |
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/benchmarks/mser/src/matlab/old/mser_demo2.m')
-rwxr-xr-x | SD-VBS/benchmarks/mser/src/matlab/old/mser_demo2.m | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/SD-VBS/benchmarks/mser/src/matlab/old/mser_demo2.m b/SD-VBS/benchmarks/mser/src/matlab/old/mser_demo2.m deleted file mode 100755 index 37a4ed1..0000000 --- a/SD-VBS/benchmarks/mser/src/matlab/old/mser_demo2.m +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | % MSER_DEMO2 Demonstrate MSER code | ||
2 | |||
3 | % AUTORIGHTS | ||
4 | % Copyright (C) 2006 Regents of the University of California | ||
5 | % All rights reserved | ||
6 | % | ||
7 | % Written by Andrea Vedaldi (UCLA VisionLab). | ||
8 | % | ||
9 | % Redistribution and use in source and binary forms, with or without | ||
10 | % modification, are permitted provided that the following conditions are met | ||
11 | % | ||
12 | % * Redistributions of source code must retain the above copyright | ||
13 | % notice, this list of conditions and the following disclaimer. | ||
14 | % * Redistributions in binary form must reproduce the above copyright | ||
15 | % notice, this list of conditions and the following disclaimer in the | ||
16 | % documentation and/or other materials provided with the distribution. | ||
17 | % * Neither the name of the University of California, Berkeley nor the | ||
18 | % names of its contributors may be used to endorse or promote products | ||
19 | % derived from this software without specific prior written permission. | ||
20 | % | ||
21 | % THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY | ||
22 | % EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
23 | % WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
24 | % DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY | ||
25 | % DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
26 | % (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
27 | % LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
28 | % ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
29 | % (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
30 | % SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
31 | |||
32 | I = load('clown') ; I = uint8(I.X) ; | ||
33 | figure(1) ; imagesc(I) ; colormap gray; hold on ; | ||
34 | |||
35 | [M,N] = size(I) ; | ||
36 | i = double(i) ; | ||
37 | j = double(j) ; | ||
38 | |||
39 | [r,ell] = mser(I,5) ; | ||
40 | |||
41 | r=double(r) ; | ||
42 | |||
43 | [i,j]=ind2sub(size(I),r) ; | ||
44 | plot(j,i,'r*') ; | ||
45 | |||
46 | ell = ell([2 1 5 4 3],:) ; | ||
47 | plotframe(ell); | ||
48 | |||
49 | figure(2) ; | ||
50 | |||
51 | clear MOV ; | ||
52 | K = size(ell,2) ; | ||
53 | for k=1:K | ||
54 | clf ; | ||
55 | sel = erfill(I,r(k)) ; | ||
56 | mask = zeros(M,N) ; mask(sel) =1 ; | ||
57 | imagesc(cat(3,I,255*uint8(mask),I)) ; colormap gray ; hold on ; | ||
58 | set(gca,'position',[0 0 1 1]) ; axis off ; axis equal ; | ||
59 | plot(j(k),i(k),'r*') ; | ||
60 | plotframe(ell(:,k),'color','r') ; | ||
61 | MOV(k) = getframe(gca) ; | ||
62 | end | ||