File size: 556 Bytes
d4035c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function jc = LMobjectindex(annotation, name, method)
% jc = LMobjectindex(annotation, name) 
% Finds an object class in the annotation struct and returns the indices
%
% D = LMquery(database, 'name', 'car');
% jc = LMobjectindex(D(1).annotation, 'car');
%
% This will return the indices of the object class 'car' in the first
% image returned by the query.

if nargin < 3
    method = '';
end

jc = [];
if isfield(annotation, 'object')
    query = parseContent(name);
    jc = findobject({annotation.object.name}, query, method); % find object index
end