4
$\begingroup$

Since my algorithm needs to detect long, coherent edges, the estimated local magnitude P for each pixel is normalized with respect to the magnitudes in it’s local neighborhood W (i.e., a 5x5 window).

$P_{normalized} = \dfrac{P - \mu _w}{\sigma_w}$

where $\mu _w$ and $\sigma_w$ denote the average and the standard deviation of edge magnitudes in the pixel neighborhood $w$.

This is given in the paper "GradientShop: A Gradient-Domain Optimization Framework for Image and Video Filtering" by Bhat, and I need to implement the algorithm described there. I am not getting, what does normalizing the gradient mean exactly ?

$\endgroup$
1
  • $\begingroup$ Could you please review my answer? $\endgroup$
    – Royi
    Commented Jun 30, 2022 at 5:50

2 Answers 2

1
$\begingroup$

Since you're working local it is suggested for you to compare things normalized to their relative surroundings.

The gradient is a vector (2D vector in single channel image).
You can normalize it according to the norm of the gradients surrounding this pixel.

So $ {\mu}_{w} $ is the average magnitude and $ {\sigma}_{w} $ is the standard deviation in the 5x5 window.

$\endgroup$
0
$\begingroup$

If $\nabla \mathbf{x}=[g_x, g_y]^T$, then the normalized gradient is ${\nabla \mathbf{x}}_n=[\frac{g_x}{\lVert \nabla \mathbf{x} \rVert}, \frac{g_y}{{\lVert \nabla \mathbf{x} \rVert}}]^T$ .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.