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

Aborted (core dumped) Error

asked 2014-07-23 05:36:20 -0600

ROSkinect gravatar image

I'm subscribing to RBG kinect topic (/camera/rgb/image_color) and depth topic (/camera/depth_registered/image_raw) and I try to blend the two images like this

image description

using this code that I get from opencv doc:

double a = 0.5; double b; 
Mat blend;
a = ( 1.0 - b );    
addWeighted( cv_ptr_kinect_rgb->image, alpha, cv_ptr_kinect_depth->image, 0.5, 0.5, blend);
cv::imshow( "Linear Blend", blend);

but I get this error message:

 /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = cv_bridge::CvImage]: Assertion `px != 0' failed.
    Aborted (core dumped)

I don't really know what going wrong !?

edit retag flag offensive close merge delete

Comments

1

One of you image pointers is probably null.

dornhege gravatar image dornhege  ( 2014-07-23 06:33:59 -0600 )edit

I don't think so because I can visualize the two topics before blending them. (I post the topic that I use)

ROSkinect gravatar image ROSkinect  ( 2014-07-23 06:39:39 -0600 )edit

Then "something else" is null. You should check the stack trace in a debugger to see where the null access is caused.

dornhege gravatar image dornhege  ( 2014-07-23 06:43:01 -0600 )edit

How can I do that ?

ROSkinect gravatar image ROSkinect  ( 2014-07-23 06:46:06 -0600 )edit

@dornhege you are right this error comes from a null pointer. Thank y'll

ROSkinect gravatar image ROSkinect  ( 2014-07-23 08:48:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-07-23 07:06:10 -0600

BennyRe gravatar image
edit flag offensive delete link more

Comments

1

this link is dead!!

vik748 gravatar image vik748  ( 2017-10-12 13:52:20 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-23 05:36:20 -0600

Seen: 2,822 times

Last updated: Jul 23 '14