Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv::cvtColor(mask, mask, cv::COLOR_GRAY2BGR); cv::Mat roi; cv::blur(image & mask,roi,cv::Size(3,3));//Or whatever blurring you want cv::Mat Result=(image & (~mask)) + roi; cv::resize(result,result,cv::Size(New_Width,New_height)); // Or whatever downsampling you want

The faster solution is:

cv::cvtColor(mask, mask, cv::COLOR_GRAY2BGR); cv::Mat roi; cv::blur(image & mask,roi,cv::Size(3,3));//Or whatever blurring you want cv::Mat Result=(image & (~mask)) + roi; cv::resize(result,result,cv::Size(New_Width,New_height)); // Or whatever downsampling you want

The faster solution is:

cv::cvtColor(mask, mask, cv::COLOR_GRAY2BGR); cv::Mat roi; cv::blur(image & mask,roi,cv::Size(3,3));//Or whatever blurring you want cv::Mat Result=(image & (~mask)) + roi; cv::resize(result,result,cv::Size(New_Width,New_height)); // Or whatever downsampling you want

The faster solution is:

cv::cvtColor(mask, mask, cv::COLOR_GRAY2BGR);
cv::Mat roi;
cv::blur(image & mask,roi,cv::Size(3,3));//Or whatever blurring you want
cv::Mat Result=(image & (~mask)) + roi;
cv::resize(result,result,cv::Size(New_Width,New_height)); // Or whatever downsampling you want

want