Gaussian Blur big mask time processing

asked 2017-05-17 04:49:56 -0500

spex gravatar image

updated 2017-05-17 08:55:06 -0500

LBerger gravatar image


I am creating smooth mask to merge image and CV_16UC3 solid color image together. I need create gradient for merge image with new background.

cv::Mat imgMask = cv::Mat(imageSize, CV_16UC1, cv::Scalar(65535, 65535, 65535));
cv::ellipse(imgMask, cv::Point(center.x(), center.y()), cv::Size(radiusCol, radiusRow), 0, 360, 0, cv::Scalar(0), -1);
cv::GaussianBlur(imgMask, imgMask, cv::Size(0, 0), feather);

Than I am blending mask and image. Image is 8700 x 5800 px size. Feather range <0 - 100>

Problem is with cv::GaussianBlur time processing with bigger feather value. Smooth of mask with feather 100 take 120 sec.

Is there some setting of Gaussian Blur which can speed up calculation of blur mask ellipse edge?

There is example of Gaussian blur in one thread But I am processing multiple images parallely and these can slow down other images.

Thank you

edit retag flag offensive close merge delete


Yes you have to wait. Now if you don't build youself opencv you can improve speed making yourself opencv using cmake and opencv source available on github.

LBerger gravatar imageLBerger ( 2017-05-17 08:58:29 -0500 )edit