c++ - Error blending two images in OpenCV -
I want to see two images in between for RGB and depth change, this is my program, Makes it very easy to understand using the original #include & lt; Ros / ros.h & gt; # Include & lt; Image_transport / image_transport.h & gt; #include & lt; Opencv / cv.h & gt; #include & lt; Opencv / highgui.h & gt; # Include & lt; Cv_bridge / cv_bridge.h & gt; #include & lt; Sensor_msgs / image_encodings.h & gt; Using namespace cv; Cv_bridge :: CvImagePtr cv_ptr_rgb; Zero imageCallbackrgb (static sensor_msgs :: ImageConstPtr & msg) {// cv_bridge :: CvImagePtr cv_ptr_rgb; Try {cv_ptr_rgb = cv_bridge :: toCvCopy (msg, sensor_msgs :: image_encodings :: MONO8); } Hold (cv_bridge :: exception & amp; A) {ROSS_ERROR ("CV_brivize exception:% s", e.w. ()); Return; } // cv :: imshow ("OpenCV Viewer Kinect RGB", cv_ptr_rgb-> Image); CvWaitKey (3); } Zero imageCallbackdepth (static sensor_msgs :: ImageConstPtr & amp; msg) {//...