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