cppflow
cppflow copied to clipboard
Support for cv::Mat
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.
This would help issues like #157
Also useful for #137
Would like to try and contribute on this useful feature @serizba .