|
using | ImgPixelType = I |
|
using | SegPixelType = S |
|
using | ImgType = Image< ImgPixelType > |
|
using | SegType = Image< SegPixelType > |
|
using | ImgContainerType = std::vector< ImgType > |
|
using | SegContainerType = std::vector< SegType > |
|
using | ConstImgIterator = typename ImgContainerType::const_iterator |
|
using | ConstSegIterator = typename SegContainerType::const_iterator |
|
|
void | Add (const std::string &imgFileName, const std::string &segFileName) |
| Adds a pair of image and its segmentation. More...
|
|
void | Add (const ImgType &imgMat, const SegType &segMat, const std::string &imgFileName="", const std::string &segFileName="") |
| Adds a pair "image, its segmentation" without reading files from file system. More...
|
|
void | ReadFromConfig (const std::string &fileName) |
|
void | AppendFilesFromList (const std::string &fileName) |
| Read a list of filenames as 'image, segmentation' pairs and add them to the database. More...
|
|
void | ReadFilesFromList (const std::string &fileName) |
| Clear the database and read from list. More...
|
|
void | Clear () |
| Clear the contents of the database.
|
|
const ImgType & | GetImage (size_t i) const |
|
const SegType & | GetSegmentation (size_t i) const |
|
std::string | GetImageName (size_t i) const |
|
std::string | GetSegmentationName (size_t j) const |
|
size_t | GetImageCount () const |
|
bool | IsEmpty () const |
|
size_t | GetImageHeight () const |
|
size_t | GetImageWidth () const |
|
ConstImgIterator | img_cbegin () const |
|
ConstSegIterator | seg_cbegin () const |
|
ConstImgIterator | img_cend () const |
|
ConstSegIterator | seg_cend () const |
|
§ Add() [1/2]
template<class I , class S >
void ImageDatabase< I, S >::Add |
( |
const std::string & |
imgFileName, |
|
|
const std::string & |
segFileName |
|
) |
| |
Adds a pair of image and its segmentation.
Reads both from files.
- Parameters
-
[in] | imgFileName | Name of image file. |
[in] | segFileName | Name of segmentation file. |
- Exceptions
-
§ Add() [2/2]
template<class I , class S >
void ImageDatabase< I, S >::Add |
( |
const ImgType & |
imgMat, |
|
|
const SegType & |
segMat, |
|
|
const std::string & |
imgFileName = "" , |
|
|
const std::string & |
segFileName = "" |
|
) |
| |
Adds a pair "image, its segmentation" without reading files from file system.
Names of files can be passed, but are used only for logging. The following conditions must be met for successful run:
- Image and segmentation must be non-empty.
- Size of image matches size of segmentation.
- Size of image matches size of other images in the database.
- Parameters
-
[in] | imgMat | Image. |
[in] | segMat | Segmentation. |
[in] | imgFileName | Name of image file (optional). |
[in] | segFileName | Name of segmentation file (optional). |
- Exceptions
-
§ AppendFilesFromList()
template<class I , class S >
void ImageDatabase< I, S >::AppendFilesFromList |
( |
const std::string & |
fileName | ) |
|
Read a list of filenames as 'image, segmentation' pairs and add them to the database.
Doesn't clear the database before execution, adds images to existing ones.
- Parameters
-
[in] | fileName | Name of config file. |
- Exceptions
-
std | iostream excetions, std::runtime_error. |
§ ReadFilesFromList()
template<class I , class S >
void ImageDatabase< I, S >::ReadFilesFromList |
( |
const std::string & |
fileName | ) |
|
Clear the database and read from list.
See AppendFilesFromList.
- Parameters
-
[in] | fileName | Name of config file. |
- Exceptions
-
std | iostream excetions, std::runtime_error. |
The documentation for this class was generated from the following file: