Public Member Functions | Public Attributes | List of all members
ecvl::Sample Class Reference

Sample image in a dataset. More...

#include <dataset_parser.h>

Public Member Functions

ecvl::Image LoadImage (ecvl::ColorType ctype=ecvl::ColorType::BGR, const bool &is_gt=false)
 Return an Image of the dataset. More...
 

Public Attributes

std::vector< filesystem::path > location_
 Absolute path of the sample. More...
 
optional< std::vector< int > > label_
 Vector of sample labels. More...
 
optional< filesystem::path > label_path_
 Absolute path of sample ground truth. More...
 
optional< std::map< int, std::string > > values_
 Map (map<feature-index,feature-value>) which stores the features of a sample. More...
 
std::vector< int > size_
 Original x and y dimensions of the sample. More...
 

Detailed Description

Sample image in a dataset.

This class provides the information to describe a dataset sample. label_ and label_path_ are mutually exclusive.

Definition at line 45 of file dataset_parser.h.

Member Function Documentation

◆ LoadImage()

ecvl::Image ecvl::Sample::LoadImage ( ecvl::ColorType  ctype = ecvl::ColorType::BGR,
const bool &  is_gt = false 
)

Return an Image of the dataset.

The LoadImage() function opens the sample image, from location_ or label_path_ depending on is_gt parameter.

Parameters
[in]ctypeecvl::ColorType of the returned Image.
[in]is_gtWhether to load the sample image or its ground truth.
Returns
Image containing the loaded sample.

Member Data Documentation

◆ label_

optional<std::vector<int> > ecvl::Sample::label_

Vector of sample labels.

Definition at line 49 of file dataset_parser.h.

◆ label_path_

optional<filesystem::path> ecvl::Sample::label_path_

Absolute path of sample ground truth.

Definition at line 50 of file dataset_parser.h.

◆ location_

std::vector<filesystem::path> ecvl::Sample::location_

Absolute path of the sample.

Definition at line 48 of file dataset_parser.h.

◆ size_

std::vector<int> ecvl::Sample::size_

Original x and y dimensions of the sample.

Definition at line 52 of file dataset_parser.h.

◆ values_

optional<std::map<int, std::string> > ecvl::Sample::values_

Map (map<feature-index,feature-value>) which stores the features of a sample.

Definition at line 51 of file dataset_parser.h.


The documentation for this class was generated from the following file: