Utility functions for file reading / writing.
More...
#include <FileFormatUtils.h>
|
static cv::Mat * | allocateXMLMatrix (const TiXmlElement *xml_matrix) |
| Allocates cv::Mat of a correct type and size. More...
|
|
static bool | parseXMLMatrix (const TiXmlElement *xml_matrix, cv::Mat &matrix) |
| Reads contents of alvar:matrix into cv::Mat. More...
|
|
static TiXmlElement * | createXMLMatrix (const char *element_name, const cv::Mat &matrix) |
| Allocates new XML element and populates it with a cv::Mat data. More...
|
|
Utility functions for file reading / writing.
Definition at line 43 of file FileFormatUtils.h.
◆ allocateXMLMatrix()
static cv::Mat* allocateXMLMatrix |
( |
const TiXmlElement * |
xml_matrix | ) |
|
|
static |
Allocates cv::Mat of a correct type and size.
- Parameters
-
xml_matrix | alvar:matrix element. |
- Returns
- cv::Mat that has the correct size for parseXMLMatrix.
◆ createXMLMatrix()
static TiXmlElement* createXMLMatrix |
( |
const char * |
element_name, |
|
|
const cv::Mat & |
matrix |
|
) |
| |
|
static |
Allocates new XML element and populates it with a cv::Mat data.
The returned element needs to be deallocated by the caller.
\param element_name Name of the allocated tiXmlElement.
\param matrix Data that is written into the returned XML element.
\return Newly allocated TiXmlElement.
◆ parseXMLMatrix()
static bool parseXMLMatrix |
( |
const TiXmlElement * |
xml_matrix, |
|
|
cv::Mat & |
matrix |
|
) |
| |
|
static |
Reads contents of alvar:matrix into cv::Mat.
Parsing fails if the matrix is not the same type or does not have
the same number of rows and columns as the XML element.
\param xml_matrix alvar:matrix element. If NULL no parsing is done and
false is returned.
\param matrix cv::Mat that has the correct size, populated with data in
the xml_matrix.
\return true if matrix was successfully parsed; otherwise false.
The documentation for this class was generated from the following file: