|
static int | readMat (boost::filesystem::path file, cv::Mat &mat, std::string field="mat") |
| Read an OpenCV matrix. More...
|
|
static int | writeMat (boost::filesystem::path file, const cv::Mat &mat, std::string field="mat") |
| Write a matrix to the given file. More...
|
|
template<typename T > |
static int | writeArrayCSV (boost::filesystem::path file, T **array, int rows, int cols, std::string separator=",", int precision=6) |
| Write two dimensional array to CSV file. More...
|
|
template<typename T > |
static int | writeMatCSV (boost::filesystem::path file, const cv::Mat &mat, std::string separator=",", int precision=6) |
| Write the content of a cv::Mat to a CSV file. More...
|
|
static int | readMatCSVInt (boost::filesystem::path file, cv::Mat &result) |
| Read CSV file into matrix. More...
|
|
static int | readMatCSVInt (boost::filesystem::path file, int rows, int cols, cv::Mat &result) |
| Read CSV file into matrix. More...
|
|
static int | readMatCSVFloat (boost::filesystem::path file, cv::Mat &result) |
| Read CSV file into matrix. More...
|
|
static int | readCSVHeaderString (boost::filesystem::path file, std::vector< std::string > &header) |
| Read header of CSV file into string array. More...
|
|
static int | readCSVSummary (boost::filesystem::path file, std::vector< std::string > &row_headers, std::vector< std::string > &col_headers, cv::Mat &data) |
| Read a CSV summary file as produced by EvaluationSummary. More...
|
|
static void | listSubdirectories (boost::filesystem::path directory, std::multimap< std::string, boost::filesystem::path > subdirectories) |
| Creates an ordered list of all subdirectories. More...
|
|
static void | readDirectory (boost::filesystem::path directory, std::vector< std::string > extensions, std::multimap< std::string, boost::filesystem::path > &files, std::string prefix="", std::string suffix="", std::vector< std::string > exclude=std::vector< std::string >{}) |
| Creates an ordered multimap of all files in the given directory. More...
|
|
static void | readDirectory (boost::filesystem::path directory, std::multimap< std::string, boost::filesystem::path > &files, std::string prefix="", std::string suffix="") |
| Creates an ordered multimap of all files in the given directory. More...
|
|
static void | getImageExtensions (std::vector< std::string > &extensions) |
| Gets a vector containing common extensions for images. More...
|
|
static void | getTxtExtensions (std::vector< std::string > &extensions) |
| Gets a vector containing common extensions for text files. More...
|
|
static void | getCSVExtensions (std::vector< std::string > &extensions) |
| Get a vector of common CSV extensions. More...
|
|
int IOUtil::readMat |
( |
boost::filesystem::path |
file, |
|
|
cv::Mat & |
mat, |
|
|
std::string |
field = "mat" |
|
) |
| |
|
static |
Read an OpenCV matrix.
- Parameters
-
[in] | file | path to file to read |
[out] | mat | matrix read |
[in] | field | the field the matrix was saved in, default is "mat" |
- Returns
- number of rows read
Copyright (c) 2016, David Stutz Contact: david.nosp@m..stu.nosp@m.tz@rw.nosp@m.th-a.nosp@m.achen.nosp@m..de, davidstutz.de All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.