⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lhicountobject.m

📁 This code can parse any image in matlab. Very elaborate code
💻 M
字号:
function counts = LHIcountobject(D, objectname);
% Returns the number of object instances of the class 'objectname' for each
% entry in the database.
%
% Example: to know how many side views of cars there are in every image:
% counts = LHIcountobject(D, 'car+side');
%

n = length(D);
counts = zeros(n,1);

if nargin == 2
    [D, j] = LHIquery(D, 'object.name', objectname);
else
    j = 1:n;
end

for i = 1:length(D);
  if isfield(D(i).annotation,'object')
    counts(j(i)) = length(D(i).annotation.object);
  else
    count(j(i)) = 0;
  end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -