add 2 extra methods to ml::TrainData (#7169)
authorVadim Pisarevsky <vadim.pisarevsky@gmail.com>
Fri, 26 Aug 2016 12:25:46 +0000 (16:25 +0400)
committerGitHub <noreply@github.com>
Fri, 26 Aug 2016 12:25:46 +0000 (16:25 +0400)
commit40b870704edf3c89288a5cc7d81507e1103684c9
tree08ee67cc39e487723b17f5a4f8381705634601a9
parent5ddd25313fa77f033325035f16adba0068a6f018
add 2 extra methods to ml::TrainData (#7169)

* expose 2 extra methods from ml::TrainData: getNames() and getVarSymbolFlags(). The first one returns text labels from CSV (if the data has been loaded from CSV); the second one returns a matrix of boolean values; its n-th element is 1 iff the corresponding column in the CSV uses symbolic names, not numbers.

* check that the dynamic_cast succeeds
modules/ml/include/opencv2/ml.hpp
modules/ml/src/data.cpp