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

OpenCV Error: Image step is wrong () in cvInitMatHeader

asked 2011-05-29 18:55:13 -0600

ccm gravatar image

Hi,

Recently, whenever I enter the command "rosbag record -a" while trying to run vslam, my bumblebee camera will stop working and the following error comes up:

OpenCV Error: Image step is wrong () in cvInitMatHeader, file /tmp/buildd/ros-diamondback-vision-opencv-1.4.2/debian/ros-diamondback-vision-opencv/opt/ros/diamondback/stacks/vision_opencv/opencv2/build/opencv-svn/modules/core/src/array.cpp, line 162
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/ros-diamondback-vision-opencv-1.4.2/debian/ros-diamondback-vision-opencv/opt/ros/diamondback/stacks/vision_opencv/opencv2/build/opencv-svn/modules/core/src/array.cpp:162: error: (-13)  in function cvInitMatHeader

I was wondering if anyone could help me with this. Here are other info that might be needed.

Message in rosbag record window

ccm@robot-Dell-DM051:~/VSLAMDIR/vslam_system/bags$ rosbag record -a
[ INFO] [1306737580.335900373]: Recording to 2011-05-30-14-39-40.bag.
[ INFO] [1306737581.340443662]: Subscribing to /bumblebee2/left/image_rect_color/compressed/parameter_updates
[ INFO] [1306737581.346024663]: Subscribing to /bumblebee2/right/image_rect/theora/parameter_descriptions
[ INFO] [1306737581.349022810]: Subscribing to /bumblebee2/right/image_rect/compressed
[ INFO] [1306737581.351694410]: Subscribing to /bumblebee2/right/image_rect_color/theora
[ INFO] [1306737581.355132437]: Subscribing to /bumblebee2/left/image_mono/theora/parameter_descriptions
[ INFO] [1306737581.357699539]: Subscribing to /bumblebee2/left/image_rect_color/theora/parameter_updates
[ INFO] [1306737581.360281000]: Subscribing to /bumblebee2/right/image_raw/compressed/parameter_descriptions
[ INFO] [1306737581.362835132]: Subscribing to /bumblebee2/right/image_rect_color/compressed/parameter_descriptions
[ INFO] [1306737581.365451070]: Subscribing to /vslam/vo_tracks/image/compressed
[ INFO] [1306737581.372123405]: Subscribing to /bumblebee2/points
[ INFO] [1306737581.375330508]: Subscribing to /bumblebee2/right/image_rect/compressed/parameter_descriptions
[ INFO] [1306737581.384072804]: Subscribing to /bumblebee2/left/image_rect/compressed
[ INFO] [1306737581.387289104]: Subscribing to /bumblebee2/right/image_mono
[ INFO] [1306737581.390304456]: Subscribing to /bumblebee2/left/image_mono/compressed
[ INFO] [1306737581.393146818]: Subscribing to /bumblebee2/right/image_rect/theora/parameter_updates
[ INFO] [1306737581.396144688]: Subscribing to /bumblebee2/left/image_color/theora
[ INFO] [1306737581.399083173]: Subscribing to /bumblebee2/right/image_rect_color/theora/parameter_updates
[ INFO] [1306737581.402292286]: Subscribing to /bumblebee2/right/image_rect/theora
[ INFO] [1306737581.405286759]: Subscribing to /bumblebee2/points2
[ INFO] [1306737581.412194093]: Subscribing to /bumblebee2/left/image_rect_color/theora
[ INFO] [1306737581.420921503]: Subscribing to /vslam/points
[ INFO] [1306737581.425428170]: Subscribing to /bumblebee2/right/image_color/theora/parameter_updates
[ INFO] [1306737581.430461941]: Subscribing to /bumblebee2/left/image_rect
[ INFO] [1306737581.433240906]: Subscribing to /bumblebee2/parameter_descriptions
[ INFO] [1306737581.436205964]: Subscribing to /bumblebee2/right/image_rect
[ INFO] [1306737581.439064088]: Subscribing to /bumblebee2/left/image_raw/theora/parameter_updates
[ INFO] [1306737581.444591341]: Subscribing to /bumblebee2/right/image_raw/compressed/parameter_updates
[ INFO] [1306737581.447676394]: Subscribing to /vslam/vo_tracks/camera_info
[ INFO] [1306737581.450656623]: Subscribing to /wide_stereo/stereo_vslam_node/parameter_descriptions
[ INFO] [1306737581.454267416]: Subscribing to /vslam/vo_tracks/image/theora/parameter_descriptions
[ INFO] [1306737581.457781634]: Subscribing to /bumblebee2/left/image_rect/compressed/parameter_descriptions
[ INFO] [1306737581.460913910]: Subscribing to /vslam/vo_tracks/image
[ INFO] [1306737581.464131789]: Subscribing to /bumblebee2/left/image_mono/compressed/parameter_updates
[ INFO] [1306737581.478871635]: Subscribing to /bumblebee2/right/image_color/compressed/parameter_updates
[ INFO] [1306737581.482000397]: Subscribing to /bumblebee2/left/image_rect_color/theora/parameter_descriptions
[ INFO] [1306737581.485449787]: Subscribing to /bumblebee2/left/image_rect_color/compressed
[ INFO] [1306737581.488316787]: Subscribing to /bumblebee2/right/image_mono/compressed/parameter_descriptions
[ INFO] [1306737581.491363975]: Subscribing to /bumblebee2/right/image_mono/theora/parameter_descriptions
[ INFO] [1306737581.494404492]: Subscribing to /bumblebee2/left/image_mono/theora/parameter_updates
[ INFO] [1306737581.500500337]: Subscribing to /bumblebee2/right/image_rect_color/compressed/parameter_updates
[ INFO ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-05-30 04:09:47 -0600

What does the rosbag output have to do with the problem? "rosbag record -a" is not a good idea, it's better to subsribe to the specific topics you need or use rosbag record --node=xxx to subscribe to all topics of node xxx (which needs to be running at that time).

The reason for the error is, that the amount of bytes per pixel is "wrong", i.e. probably incongruent with the amount of pixels and bytes per row. Why that is, is mysterious though. So I suggest to run the node in the debuger (e.g. gdb) and look at the backtrace, where that happens. Then have a look at the relevant code.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-05-29 18:55:13 -0600

Seen: 1,489 times

Last updated: May 30 '11