Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
cv:Mata からのデータを通常の C++に入れたいvector。cv::Matをベクトルに再形成できることを知っていますmat.reshape ( 0, 1 )
cv:Mat
vector
cv::Mat
mat.reshape ( 0, 1 )
どのようにデータをに入れることができvectorますか?
cv::Matstd::vectorベクトルが適切なデータ型を持っている場合、 にはへの変換演算子があります。
std::vector
cv::Mat m = cv::Mat::eye(3, 3, CV_8UC1); std::vector<uchar> v = m.reshape(0, 1);