ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

OpenCV Error when running image_transport republish node

asked 2012-03-14 08:17:27 -0500

Parisa gravatar image

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 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

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-05-02 03:20:14 -0500

damonkohler gravatar image

I had a similiar problem while working on the android_core/android_camera_tutorial. It turned out that some malformed 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
0

answered 2012-05-02 08:04:48 -0500

karthik gravatar image

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

Question Tools

Stats

Asked: 2012-03-14 08:17:27 -0500

Seen: 741 times

Last updated: May 02 '12