lhiplotobjectsubgraph.m
来自「This code can parse any image in matlab.」· M 代码 · 共 35 行
M
35 行
function LHIplotobjectsubgraph(object,Crop, col, bshowid)
% plot object offset by crop
% object -- annotation of object/part (db(i).annotation.object(j) || db(i).annotation.object(j).parts(k))
% Crop -- get from getObjectCrop(),
% col-- color of plotting
% showid -- whether show ids of keypoints
if nargin < 3
col = 'b';
end
if nargin < 4
bshowid = 0;
end
Nsubgraphs = length(object.subgraphs);
ptCount = 1;
for i = 1:Nsubgraphs
Ncurves = length(object.subgraphs(i).curves);
for j =1:Ncurves
[X,Y] = getLHIpoints(object.subgraphs(i).curves(j));
X = X - Crop(1) + 1;
Y = Y - Crop(3) + 1;
h = plot(X,Y,'-o','MarkerFaceColor','g','MarkerEdgeColor','g',...
'MarkerSize',2,'LineWidth', 1, 'color', col);
Npts = length(X);
if (bshowid)
for k=1:Npts,
text(X(k),Y(k),num2str(ptCount));
ptCount = ptCount + 1;
end
end
hold on
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?