Parallel Gaussian Blur Chain

I have this code (updated version of this ):

void HessianDetector::detectOctaveKeypoints(const Mat &firstLevel, ...) { vector<Mat> blurs (par.numberOfScales+3, Mat()); blurs[1] = firstLevel; for (int i = 1; i < par.numberOfScales+2; i++){ float sigma = par.sigmas[i]* sqrt(sigmaStep * sigmaStep - 1.0f); blurs[i+1] = gaussianBlur(blurs[i], sigma); } ... 

Where:

 Mat gaussianBlur(const Mat input, const float sigma) { Mat ret(input.rows, input.cols, input.type()); int size = (int)(2.0 * 3.0 * sigma + 1.0); if (size % 2 == 0) size++; GaussianBlur(input, ret, Size(size, size), sigma, sigma, BORDER_REPLICATE); return ret; } 

So, as you can see, each blurs[i+1] depends on blurs[i] , so it cannot be parallelized. My question is: is there an equivalent way to get the same result, but using firstLevel instead of blurs[i] ? Therefore, it should look like this:

 for (int i = 1; i < par.numberOfScales+2; i++){ float sigma = //something; blurs[i+1] = gaussianBlur(firstLevel, sigma); } 

Is it possible?

This answer allows me to think that this is possible , but I cannot understand how I can implement this

Convert filters If you apply multiple filters on the same image in sequence, like a Gaussian blur, then a Gabor filter, you can combine them together. Make all filters the same size and collapse them. Then apply the result in the image. Mathematics says that the effect will be identical to the previous combination

+1
c ++ opencv blur
source share

No one has answered this question yet.

See similar questions:

7
Replace image chain blurred with one blur

or similar:

7
Replace image chain blurred with one blur
5
Gaussian Blur with FFT Questions
4
Gaussian Blur Image Filter with ARM NEON
2
Search for an equivalent Gaussian filter mask in the frequency domain for a given mask in the space domain
one
Quick image filtering using a bank of Gaussian filters - OpenCV
one
How to make your own 2D core on Filter2D using a 1D Gaussian core
one
Why is Gaussian Filter different between cv2 and skimage?
one
how to get a gaussian filter?
one
CSS3 Filter Blur Algorithm
0
Gaussian Blur + Decimation of an arbitrary ratio can be implemented using the steps of dyadic blur / thinning?

All Articles