// 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 in python using opencv. I could not find an alternative for cv :: Mat. Please help me..
source share