sethrh / pyopencv

Automatically exported from code.google.com/p/pyopencv
0 stars 0 forks source link

Crashes on running the 1st example #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take a random JPG image
2. Run example 1 i.e. People detector

What is the expected output? What do you see instead?
Instead of showing the image, the application crashes. Running from cmd line 
within python shows this error - 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

What version of the product are you using? On what operating system?

Use - PyOpenCV -2.1.0 WR 1.0.2 on Windows XP with SP3

Please provide any additional information below.

Original issue reported on code.google.com by satyajit...@gmail.com on 19 Jun 2010 at 2:13

GoogleCodeExporter commented 9 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

Original comment by pmtri80@gmail.com on 20 Jun 2010 at 1:14

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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