4. Using the toolbox
4.1 - Basic functions: indexing, queries
First, you need to download the LHI databaset or you need to provide the url of the images and annotations online. If you are going to use the dataset frequently, it is better that you get a local copy.
% Define the root folder for the images
HOMEIMAGES = 'C:\yourpath\Images'; % you can set here your default folder
HOMEANNOTATIONS = 'C:\yourpath\Annotations'; % you can set here your default folder
HOMELABELMAPS = 'C:\yourpath\LabelMaps'; % you can set here your default folder
% This line reads the entire database into a Matlab struct
D = LHIdatabase(HOMEANNOTATIONS,{'Badminton'});
LHIdbshowscenes(D, HOMEIMAGES, HOMELABELMAPS, 1);
LHIdbshowscenes(D, HOMEIMAGES, HOMELABELMAPS);

4.2 - Object part hierarchies
Show one image with object part hierarchies :
% Define the root folder for the images
HOMEIMAGES = 'C:\yourpath\Images'; % you can set here your default folder
HOMEANNOTATIONS = 'C:\yourpath\Annotations'; % you can set here your default folder
HOMELABELMAPS = 'C:\yourpath\LabelMaps'; % you can set here your default folder
% This line reads the entire database into a Matlab struct
D = LHIdatabase(HOMEANNOTATIONS);
LHIdbshowimage(D, 10, HOMEIMAGES);

4.3 - Search Objects by Names
LHIquery.m
% Define the root folder for the images
HOMEIMAGES = 'C:\yourpath\Images'; % you can set here your default folder
HOMEANNOTATIONS = 'C:\yourpath\Annotations'; % you can set here your default folder
HOMELABELMAPS = 'C:\yourpath\LabelMaps'; % you can set here your default folder
% This line reads the entire database into a Matlab struct
D = LHIdatabase(HOMEANNOTATIONS);
LHIdbshowscenes(LHIquery(D,'object.name',car), HOMEIMAGES, HOMELABELMAPS,1,[6,4]);
|