MCPcopy Create free account
hub / github.com/Profactor/cv-plot / toVector

Function toVector

CvPlot/inc/CvPlot/Internal/util.h:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35template<typename T>
36std::vector<T> toVector(cv::InputArray inputArray) {
37 cv::Mat_<T> mat(inputArray.getMat());
38 if (!mat.isContinuous()) {
39 mat = mat.clone();
40 }
41 const T* data = reinterpret_cast<T*>(mat.data);
42 return std::vector<T>(data, data + mat.total());
43}
44
45template<typename T>
46cv::Rect_<T> fixRatio(cv::Rect_<T> rect, double ratio, bool extend) {

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.80
totalMethod · 0.45

Tested by

no test coverage detected