Cv.error Null Array Pointer Is Passed
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat up vote 2 down vote favorite I have run the code of Caltech-Lanes-Detection. There is my command: $ ./LaneDetector32 --show --list-file=/home/me/caltech-lanes/cordova1/list.txt --list-path=/home/me/caltech-lanes/cordova1/ --output-suffix=_result and there is a problem as following: main.cc:187 msg Loaded camera file main.cc:194 msg Loaded lanes config file main.cc:249 msg Processing image: /home/me/caltech-lanes/cordova1/f00000.png OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat, file /home/me/OpenCV-2.0.0/src/cxcore/cxarray.cpp, line 2370 terminate called after throwing an instance of 'cv::Exception' and if I run this command: eog /home/me/caltech-lanes/cordova1/f00000.png I can see the picture.Please help me. Thank you. c++ opencv share|improve this question asked Aug 24 '13 at 15:19 wcwswswws 196 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted This question might better be answered by Mohamed Aly, the guy who actually worked on this. His contact is right on the page you linked. That said, let's take a look. (There's a TLDR if you want to skip this) The error is caused by the cvGetMat in the cxarray.cpp file. The first couple lines of which are: 2362 cvGetMa
Parisa 23 ●3 ●4 ●6 updated 2012-03-14 08:18:21 -0500 Hello, I have an Ubuntu 11.10 and Ros electric. I try to convert an Compressed image that comes from axis_camera to image, I have used : rosrun image_transport republish compressed in:=/axis_camera _image_transport:=compressed raw out:=/axis_camera/image And I got this error: OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat, file /home/parisa/OpenCV-2.3.1/modules/core/src/array.cpp, line 2382 terminate called after throwing an instance of 'cv::Exception' what():/home/parisa/OpenCV-2.3.1/modules/core/src/array.cpp,line 2382: error: (-27) NULL array pointer is passed in function cvGetMat Aborted Actually, there http://stackoverflow.com/questions/18420068/opencv-error-null-pointer-null-array-pointer-is-passed-in-cvgetmat is no such file or directory in my laptop /home/parisa/OpenCV-2.3.1/modules/core/src/array.cpp Anybody can help me? Thank you edit retag flag offensive close merge delete add a comment 2 answers Sort by » oldest newest most voted 1 answered 2012-05-02 03:20:14 -0500 damonkohler 3419 ●19 ●37 ●47 I had a similiar problem while working on the android_core/android_camera_tutorial. It turned out that some malformed http://answers.ros.org/question/29725/opencv-error-when-running-image_transport-republish-node/ images were being published. I suggest looking into the axis_camera node and make sure that it's publishing good data. edit flag offensive delete link more add a comment 0 answered 2012-05-02 08:04:48 -0500 karthik 2481 ●54 ●64 ●94 Hi, This error corresponds to the fact that the imread is not able to read the file you are passing to it. So please check if the strings of paths in your code is having the images. If you are subscribing to another node that is publishing then see to it that it is actually publishing the images. Hope it helps, Karthik edit flag offensive delete link more add a comment Your Answer Please start posting anonymously - your entry will be published after you log in or create a new account. Add Answer Question Tools Follow subscribe to rss feed Stats Asked: 2012-03-14 08:17:27 -0500 Seen: 565 times Last updated: May 02 '12 Related questions Error when try to republish theora [closed] republish image from rospy node to roscpp node Is there a conversion tool for video to rosbag file?
queryIssue summary - OpenCV 2.4.10- OpenCV 3.0- VOLUNTEER! (easy tasks)-- Your tasks-- Your watches--- Bugfixes (please prefer GitHub pull http://code.opencv.org/issues/593 requests)--- Bugs--- Features--- Patches (please prefer GitHub pull requests)Category = documentationDuty - Category = NoneDuty - New tasksDuty - Newly created (7 days)Duty - Recently updated (7 days)Hackathon List Wiki Index by titleIndex by date Repository Issues cvConvertImage null pointer err in Python call (Bug #593) Added by Jim Von Ehr cv.error null about 6 years ago. Updated about 6 years ago. Status:Done Start date: Priority:Low Due date: Assignee:- % Done:0% Category:highgui-images Target version:- Affected version: Operating System: Difficulty: HW Platform: Pull request: Description Seems to be a problem in Python bindings for cvConvertImage (Python 2.6, OpenCV 2.1.0). If I knew more about building OpenCV, cv.error null array I'd try to look into this, but for now, will probably write my own version of the very handy cvConvertImage. (and thanks for all the work of making OpenCV available!) ------------import cvimport opencv.highgui as gui # ?? is this right ?? imgSize = (16, 16)imgDepth = cv.IPL_DEPTH_8Uimg = cv.CreateImage(imgSize, imgDepth, 1)temp = cv.CreateImage(imgSize, imgDepth, 3)print 'Convert ', imgprint ' into ', tempprint ' matrices: ', cv.GetMat(img), cv.GetMat(temp)try: gui.cvConvertImage(img, temp) print 'Success1!'except Exception, e: print 'Exception1:', e----------- gives result: Convert