source: distools/chickenpieces.m @ 157

Last change on this file since 157 was 10, checked in by bduin, 14 years ago
File size: 1.6 KB
RevLine 
[10]1%CHICKENPIECES
2%
3%   D = CHICKENPIECES(NORM,COST,DIR)
4%
5% Reads the original, asymmetric distances
6
7function a = chickenpieces(norm,cost,dirname)
8if nargin < 3
9    dirname = ['/data/pr/projects/dissim/data/chickenpieces/chickenpieces_norm' num2str(norm) '.0'];
10                if ispc
11                        dirname = ['s:\root' dirname];
12                end
13end
14if nargin < 2
15    dir(dirname)
16    a = [];
17    return
18end
19name = ['chickenpieces_norm' num2str(norm) '.0_AngleCostFunction' num2str(cost) '.0.dm'];
20a = prtbunke(fullfile(dirname,name));
21if length(a)==1 & a==-1
22    return
23end
24a = setprior(a,getprior(a,0));
25%a = (a + a')/2;
26a = setname(a,['Chickenpieces-' int2str(norm) '-' int2str(cost)]);
27desc = ['This is one of the chickenpieces dissimilarity matrices as made available by Bunke et.al. ' ...
28  'Every entry is a weighted edit distance between two strings representing the contours of 2D blobs. ' ...
29  'Contours are approximated by vectors of length ' num2str(norm) ...
30  '. Angles between vectors are used as replacement costs. ' ...
31  'The costs for insertion and deletion are ' num2str(cost)];
32ref = ['H. Bunke, H., U. Buhler, Applications of approximate string matching to 2D shape recognition, ' ...
33  'Pattern recognition 26 (1993) 1797-1812'];
34link = {'The original dissimilarity datasets', 'http://www.iam.unibe.ch/fki/databases/string-edit-distance-matrices'; ...
35  'The original images','http://algoval.essex.ac.uk/data/sequence/chicken/'; ...
36  'The PRTools versions','http://prlab.tudelft.nl/data/disdatasets.html'};
37a = setuser(a,desc,'desc');
38a = setuser(a,ref,'ref');
39a = setuser(a,link,'link');
Note: See TracBrowser for help on using the repository browser.