Many people use cppflow for computer vision, and they usually work converting a cv::Mat into a std::vector, and then into a cppflow::tensor. We could directly provide a constructor and a get data function for this datatypes.
template<typename T>
tensor(const cv::Mat<T>& m);
And probably:
template<typename T>
cv::Mat<T> get_mat() const;
Probably both functions should be wrapped in a precompiler directive that only activates if a opencv installation is found, so non opencv users can still use the library.
Many people use cppflow for computer vision, and they usually work converting a
cv::Mat
into astd::vector
, and then into acppflow::tensor
. We could directly provide a constructor and a get data function for this datatypes.And probably:
Probably both functions should be wrapped in a precompiler directive that only activates if a opencv installation is found, so non opencv users can still use the library.
This would help issues like #157