Edge Blur¶
Blurs the edges of an image, keeping center in focus.
- int edgeBlur(InputArray src, OutputArray dst, int indentTop, int indentLeft)¶
Parameters: - src – RGB image.
- dst – Destination image of the same size and the same type as src.
- indentTop – The indent from the top and the bottom of the image. It will be blured.
- indentLeft – The indent from the left and right side of the image. It will be blured.
Returns: Error code.
The algorithm.
The amount of blurring is defined by the gaussian filter’s kernel size and standard deviation and depends on the weighted distance from the center of the image:
\[d(x, y) = \frac{(x - a)^2}{(a - indentLeft)^2} + \frac{(y - b)^2}{(b - indentTop)^2},\]where \(a = \frac{src_{width}}{2}, b = \frac{src_{height}}{2}\). For each pixel \((x, y)\) of the image, if the distance \(d(x, y)\) is greater than 1, gaussian filter with center at \((x,y)\), kernel size \(d(x, y)\) and standard deviation \((radius - 0.5)\) is applied, otherwise src image pixel is left unchanged. Border pixels are replicated to fit the kernel size.
Example.
indentTop = 90, indentLeft = 90.

