Is dim>2 array conversion supported?
Closed this issue · 5 comments
lc82111 commented
Great work! Thanks!
Actually, before I come here, I have checked the rep
https://github.com/yati-sagade/opencv-ndarray-conversion/blob/master/conversion.h
Where I find dim>2 array may not be supported, see below code snippet.
Is this project solve this problem?
if( ndims > 2)
{
failmsg("toMat: Object has more than 2 dimensions");
}
Algomorph commented
That excerpt is from conversion.cpp
Are you're trying to make an N-D OpenCV matrix?
I think it should work. Please try it & close this issue if it works.
lc82111 commented
Yes, I try to convert a N-D array in numpy to N-D mat in opencv. But, the conversion.cpp only support 2-D array.
lc82111 commented
@Algomorph, I have tried 4-D array conversion and it works as my expectation.