// Generate output image
cv::Mat foreground(image.size(),CV_8UC3,
cv::Scalar(255,255,255)); // all white image
image.copyTo(foreground,result); // bg pixels not copied
The above code is written in C++ using openCV, now i need to change this to python using opencv. I couldn't find the alternate for cv::Mat . Please help me..