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

Revision history [back]

click to hide/show revision 1
initial version

Easy solution :

double a = 0.5; double b; 

b = ( 1.0 - a );

Mat Blended;

//Create image color
cv::Mat image_rgb(cv_ptr->image.rows, cv_ptr->image.cols, DataType<Vec3b>::type); 

// convert the gray image to rgb
cvtColor(image_gray, image_rgb, CV_GRAY2RGB);

//Blend the two rgb (old+the new)
addWeighted( cv_ptr_omni->image, a, image8U_flip_rgb, 0.5, 0.5, Blended); 

cv::imshow( "Linear Blend", Blended );