I'm trying to manipulate individual columns using OpenCV3 (Emgu) in c#. I have code that is similar to:
UMat Image = loaded image
UMat Column = new UMat();
CvInvoke.cvGetCol(Image, Column, 1);
{"OpenCV: Unrecognized or unsupported array type"}
And that is throwing the error in the header. I have tried Mat
and Mat.Ptr
instead of UMat
, but nothing helps. While I have found 1-2 c++ examples, I cannot find ac# example to help.
While not the solution to this issue, I was able to get similar functionality using the Matrix<> type instead of UMats.
UMat Image = ...
Matrix<byte> ImageMatrix = new Matrix<byte>(Image.Rows, Image.Cols, 3);
Image.CopyTo(ImageMatrix);
ImageMatrix.GetCol(1);
I believe this will be slower than using the CvInvoke calls with UMat types, but it works while looking for a complete solution to the above issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.