diff options
Diffstat (limited to 'SD-VBS/benchmarks/sift/src/matlab/plotss.m')
-rw-r--r-- | SD-VBS/benchmarks/sift/src/matlab/plotss.m | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/SD-VBS/benchmarks/sift/src/matlab/plotss.m b/SD-VBS/benchmarks/sift/src/matlab/plotss.m new file mode 100644 index 0000000..17868b6 --- /dev/null +++ b/SD-VBS/benchmarks/sift/src/matlab/plotss.m | |||
@@ -0,0 +1,68 @@ | |||
1 | function plotss(ss,field) | ||
2 | % PLOTSS Plot scale space | ||
3 | % PLOTSS(SS) plots all octaves of the scale space SS. | ||
4 | % | ||
5 | % See also GAUSSIANSS(), DIFFSS(). | ||
6 | |||
7 | % AUTORIGHTS | ||
8 | % Copyright (c) 2006 The Regents of the University of California. | ||
9 | % All Rights Reserved. | ||
10 | % | ||
11 | % Created by Andrea Vedaldi | ||
12 | % UCLA Vision Lab - Department of Computer Science | ||
13 | % | ||
14 | % Permission to use, copy, modify, and distribute this software and its | ||
15 | % documentation for educational, research and non-profit purposes, | ||
16 | % without fee, and without a written agreement is hereby granted, | ||
17 | % provided that the above copyright notice, this paragraph and the | ||
18 | % following three paragraphs appear in all copies. | ||
19 | % | ||
20 | % This software program and documentation are copyrighted by The Regents | ||
21 | % of the University of California. The software program and | ||
22 | % documentation are supplied "as is", without any accompanying services | ||
23 | % from The Regents. The Regents does not warrant that the operation of | ||
24 | % the program will be uninterrupted or error-free. The end-user | ||
25 | % understands that the program was developed for research purposes and | ||
26 | % is advised not to rely exclusively on the program for any reason. | ||
27 | % | ||
28 | % This software embodies a method for which the following patent has | ||
29 | % been issued: "Method and apparatus for identifying scale invariant | ||
30 | % features in an image and use of same for locating an object in an | ||
31 | % image," David G. Lowe, US Patent 6,711,293 (March 23, | ||
32 | % 2004). Provisional application filed March 8, 1999. Asignee: The | ||
33 | % University of British Columbia. | ||
34 | % | ||
35 | % IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY | ||
36 | % FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, | ||
37 | % INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND | ||
38 | % ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN | ||
39 | % ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF | ||
40 | % CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT | ||
41 | % LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
42 | % A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" | ||
43 | % BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE | ||
44 | % MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | ||
45 | |||
46 | if nargin > 2 | ||
47 | error('Too many arguments.') ; | ||
48 | end | ||
49 | |||
50 | omin = ss.omin ; | ||
51 | smin = ss.smin ; | ||
52 | nlevels = ss.smax-ss.smin+1 ; | ||
53 | |||
54 | for oi=1:ss.O | ||
55 | for si=1:nlevels | ||
56 | tightsubplot(nlevels, ss.O, nlevels*(oi-1)+si) ; | ||
57 | s = si-1 + smin ; | ||
58 | o = oi-1 + omin ; | ||
59 | sigma = ss.sigma0 * 2^(s/ss.S + o) ; | ||
60 | F=squeeze(ss.octave{oi}(:,:,si)) ; | ||
61 | [M,N]=size(F) ; | ||
62 | imagesc(squeeze(ss.octave{oi}(:,:,si))) ; axis image ; axis off ; | ||
63 | h=text(M/10,N/20,sprintf('(o,s)=(%d,%d), sigma=%f',o,s,sigma)) ; | ||
64 | set(h,'BackgroundColor','w','Color','k') ; | ||
65 | end | ||
66 | end | ||
67 | |||
68 | |||