Closed GoogleCodeExporter closed 8 years ago
>>> from pyopencv import *
>>> img = imread("c:\test.jpg")
>>> namedWindow("Test", 1)
>>> imshow("test", img)
OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupport
ed array type) in cvGetMat, file M:\programming\packages\opencv\workspace\2.1\Op
enCV-2.1.0\src\cxcore\cxarray.cpp, line 2476
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: M:\programming\packages\opencv\workspace\2.1\OpenCV-2.1.0\src\cxco
re\cxarray.cpp:2476: error: (-206) Unrecognized or unsupported array type in fun
ction cvGetMat
Original comment by satyajit...@gmail.com
on 19 Jun 2010 at 2:22
Acknowledged. There's some change in 1.0.2 that might make the example code not
functioning properly. I have not got time to fix it. However, the file
peopledetect.py in the demo package should work.
Cheers,
Minh-Tri
Original comment by pmtri80@gmail.com
on 20 Jun 2010 at 1:14
Original comment by pmtri80@gmail.com
on 20 Jun 2010 at 1:14
Don't know if it helps, but I am having the same exact problem doing C++ with
VideoCatpure class. C version does work, but C++ version returns run-time error:
OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or
unsupported array type) in cvGetMat, file
/Users/david/Downloads/OpenCV-2.1.0/src/cxcore/cxarray.cpp, line 2476
terminate called after throwing an instance of 'cv::Exception'
what(): /Users/david/Downloads/OpenCV-2.1.0/src/cxcore/cxarray.cpp:2476: error: (-206) Unrecognized or unsupported array type in function cvGetMat
Abort trap
Code:
#include <cv.h>
#include <highgui.h>
#include <iostream>
int main() {
cv::Mat frame;
cv::VideoCapture cap(0);
if (!cap.isOpened()) {
std::cout << "Failed to open video capture device 0\n";
return 1;
}
cv::namedWindow("picture window", CV_WINDOW_AUTOSIZE);
while (cv::waitKey(30) == -1) {
cap >> frame;
cv::imshow("picture window", frame);
}
return 0;
}
Original comment by David.Ab...@gmail.com
on 30 Jun 2010 at 9:25
Oh, satyajit.sarangi, I just realised your file path is slightly not correct.
Instead of "c:\test.jpg", you should use "c:\\test.jpg". I'm not sure if that
fixes your issue. Sorry for my very late reply. I'm just too busy this month. I
haven't got time to look into any issue in PyOpenCV at all.
Cheers,
Minh-Tri
Original comment by pmtri80@gmail.com
on 30 Jun 2010 at 11:42
I'm having the exact same problem as David, on OSX.
Original comment by T.Ac...@gmail.com
on 11 Jul 2010 at 9:33
I can't help with C/C++ code. PyOpenCV provides a layer that works on top of
the OpenCV library. If the error comes from the OpenCV library itself, there's
nothing I could do.
Cheers,
Minh-Tri
Original comment by pmtri80@gmail.com
on 16 Jul 2010 at 2:48
I'd like to close this issue. If you still have a problem, don't hesitate to
open a new issue.
Cheers,
Minh-Tri
Original comment by pmtri80@gmail.com
on 18 Jul 2010 at 10:15
Original issue reported on code.google.com by
satyajit...@gmail.com
on 19 Jun 2010 at 2:13