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

📄 lhiobjectpolygon.m

📁 This code can parse any image in matlab. Very elaborate code
💻 M
字号:
function [x,y,jc] = LHIobjectpolygon(annotation, name);
% [x,y] = LHIobjectpolygon(annotation, name) returns all the regions that
% belong to object class 'name'. Is it an array Ninstances*Nvertices

if isfield(annotation, 'object')
    if nargin == 1
        jc = 1:length(annotation.object);
    else
        jc = LHIobjectindex(annotation, name);
    end

    Nobjects = length(jc);
    if Nobjects == 0
        x = []; y =[];
    else
        n=0;
        for i = 1:Nobjects
            n = n+1;
           if (isfield(annotation.object(i),'regions'))
                Nregions = length(annotation.object(i).regions);
                for j = 1:Nregions
                    [x{n},y{n}] = getLHIpolygon(annotation.object(jc(i)).regions(j));
                end
           end
        end
    end
else
    x = [];
    y = [];
    jc = [];
end

⌨️ 快捷键说明

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