Registered Member
|
Hi everyone,
I'm trying to map, convert or even load an OpenCV 3-channel Mat to a 3D Eigen Tensor. So far, I can convert 1-channel grayscale Mat by:
My attempt to convert a BGR mat to a Tensor have been:
However, I get the error : libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(4.1.0) /tmp/opencv-20190505-12101-14vk1fh/opencv-4.1.0/modules/core/src/matrix_wrap.cpp:1195: error: (-215:Assertion failed) !fixedType() || ((Mat*)obj)->type() == mtype in function 'create' in the line: cv::cv2eigen(mat, temp); I guess that the problem with cv2eigen is that this function just works with 1-channel image. I know this is an OpenCV function, not part of the Eigen lib. However, I m hoping to someone who have tried something similar and can put me in the right direction. All the best, Gal Sight. |
Registered Member
|
For someone else interested,
I have posted the question in stackoverflow: https://stackoverflow.com/questions/56514170/map-bgr-opencv-mat-to-eigen-tensor/56516198#56516198 |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell