📄 lhidbshowscenes.m
字号:
function LHIdbshowscenes(D, HOMEIMAGES, HOMELABELMAPS, showsub, subimages)
%
% Shows all the images in the database with annotation.
% This function can be used in combination with LHIquery
%
% LHIdbshowscenes(D, HOMEIMAGES, HOMELABELMAPS, showsub, subimages)
%
% showsub: Show subgraph or not
% numPerpage: Number of images to show per figure, default 30
Nimages = length(D);
if nargin > 4
Nx = subimages(1); Ny = subimages(2);
else
Nx = 6; Ny = 5; % will show 6x5 images per figure
end
if nargin < 3
pace = 1;
else
pace = 2;
end
if nargin < 4
showsub = 0;
end
if showsub == 1
pace = pace + 1;
end
Dx = 1/Nx; Dy = 1/Ny;
i = 0;
while i<Nimages
handle = figure;
maximize(handle);
for y = Ny-1:-1:0
for x = 0:pace:Nx-1
i = i+1;
if i>Nimages
return
end
axes('position', [x*Dx y*Dy Dx Dy]); % create axis
if nargin>1
img = LHIimread(D, i, HOMEIMAGES); % Load image
scaling = min(1,320/size(img,1)); % scale factor to create thumbnail
[annotation, img] = LHIimscale(D(i).annotation, img, scaling, 'nearest'); % scale image
[h,class] = LHIplot(annotation, img); % show image and polygons
if nargin>2
labelMap = LHILMread(D, i, HOMELABELMAPS);
axes('position', [(x+1)*Dx y*Dy Dx Dy]);
imagesc(labelMap)
axis('off'); axis('equal'); axis('tight');
if showsub == 1
imgwhite = ones(size(img));
imgwhite(:) = 255;
axes('position', [(x+2)*Dx y*Dy Dx Dy]);
[h,class] = LHIplotsubgraph(annotation,imgwhite);
end
end
else
[h,class] = LHIplot(D(i).annotation); % show polygons
axis('ij')
end
drawnow
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -