opencvimage-processingopencv-mat

SuperImpose one cv::mat image over another


I am working on a source code that will help me to superimpose a cv::Mat image of a skeletal stream (obtained from a Kinect ) with another cv::Mat image which is a normal camera color (BGR) image.

The code looks like this

cv::Mat imageMixer(cv::Mat colorImage,cv::Mat skeletalImage)
{
  // code to superimpose the skeletal image ... opencv function
  cv::Mat resultantImage = colorImage + skeletalImage;
  return resultantImage;
}

How can we superimpose a cv::Mat image on top of another cv::Mat based image ? Is there a OpenCV function that we can directly make use of ?


Solution

  • The OpenCV Documentation has a good tutorial for exactly what you are asking, check out this link.