📄 demoaerial.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This script contains a number of examples about how to use the
% LHI_UCLA_Aerial_Image_5 subset
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear; close all;
% Set default folers
HOMEIMAGES = 'http://yoshi.cs.ucla.edu/yao/data/LHI_UCLA_Aerial_Image_5/Images'; % you can set here your default folder
HOMEANNOTATIONS = 'http://yoshi.cs.ucla.edu/yao/data/LHI_UCLA_Aerial_Image_5/Annotations'; % you can set here your default folder
HOMELABELMAPS = 'http://yoshi.cs.ucla.edu/yao/data/LHI_UCLA_Aerial_Image_5/LabelMaps';
% Set new folder to store translated annotations and labelmaps
NEWHOMELABELMAPS = 'C:/temp/aerial/LabelMaps_new';
NEWHOMEANNOTATIONS = 'C:/temp/aerial/Annotations_new';
% Load database
D = LHIdatabase(HOMEANNOTATIONS);
% Regularize names of objets ( first time running or to customize the
% translation rule ). For second time running, please use NEWHOMEANNOTATIONS,
% and skip the LHIregulatenames and upgradeDatabase step
db = LHIregulatenames(D,HOMELABELMAPS,NEWHOMELABELMAPS,'namelist_AerialImage.txt');
% Save back to your own folder
upgradeDatabase(db,NEWHOMEANNOTATIONS);
%% How to customize the namelist_*.txt file
% You can modify the object categories that will appear in the dataset by
% editing the 'namelist_*.txt' file.
% For example, if you want 'athlete' and 'spectator' be merged into a same category
% 'human'. The 'namelist_*.txt' should look like:
% %%%%%%%%%%%
% %salient objects
% %%%%%%%%%%%
% human,athlete,spectator
% ......
% After running LHIregulatenames(), the 'athlete' and 'spectator' will
% merge into 'human', and share same color in the labelmap
% Another example, if your algorithms concerns about a certain category
% inside the "less important objects" list (e.g. 'chair'),while
% you have no interest on some categories inside the "salient objects"
% such as 'window' 'light'. You can simply comment the line of
% 'window' 'light' and uncomment the line of 'chair'. Then the 'chair' will
% automatically appear among the object list when you do LHIregulatenames(), and
% 'window','light' will be categorized into 'other'.
% %%%%%%%%%%%
% %salient objects
% %%%%%%%%%%%
% .........
% %light
% %window
% ......
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %less important objects
% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% .....
% chair
% %.....
% The SALIENCY of an object category is decided heuristicly by
% occuring frequency and occupied area of the category, which differs
% from case to case.
%show images
LHIdbshowscenes(db, HOMEIMAGES, HOMELABELMAPS,0,[6,5]);
%show images with building
[db1,j] = LHIquery(db, 'object.name', 'building');
LHIdbshowscenes(db1, HOMEIMAGES, HOMELABELMAPS,0,[2,2]); % this shows all the
%show object statistics
[a,b,c,d,e]=LHIobjectstats(db,HOMEIMAGES,NEWHOMELABELMAPS);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -