2
$\begingroup$

I have been implementing the paper Blur Detection for Digital Images Using Wavelet Transform and was asking myself how the following formula could reconstruct the edges given a Haar Wavelet transformed image :

$$ \sqrt{LH_i^2 + HL_i^2 + HH_i^2} $$

This formula is on page 2, Algorithm 1, step 2.

I looked at the reference given, but couldn't find where this was explained.

$\endgroup$
  • $\begingroup$ @ CpCd0y, Are you able to detect blur? $\endgroup$ – Abc Nov 26 '17 at 7:41
  • $\begingroup$ I tried that paper too, but it does not work for me. $\endgroup$ – Abc Nov 26 '17 at 7:41
  • $\begingroup$ I remember it somewhat working, but their method has a high error rate for me, so it's not the best way to detect blur. $\endgroup$ – CpCd0y Nov 26 '17 at 15:33
  • $\begingroup$ but in my image, the maximum value in first scale is always lower than second and third scale, so in my images, not able to get dirac structure. so every blur image is detected as not blurry image. can we talk on chat? because i want to clear my understanding on this algorithm with you. $\endgroup$ – Abc Nov 27 '17 at 10:42
  • $\begingroup$ Also, the paper said that if you lower the scale of image, the intensity of edge will get reduce. but intensity of edge is always high in lower scale for example at 3rd scale on window 8x8. $\endgroup$ – Abc Nov 27 '17 at 10:44
1
$\begingroup$

One single level of a standard separable 2-channel wavelet transform, denoted by $i$, uses a low-pass $l$ and a high-pass $h$ filters (followed by downsampling). Traditionally, one applies $l$ and $g$ on the rows of the image, putting the downsampled low-passed coefficients on a left-half, and the downsampled high-passed coefficients on a left-half. Then the resulting image is processed in the same way column-wise.

This results in a set of four separable 2D filters:

  • $l$ on rows, $l$ on columns (LL)
  • $l$ on rows, $h$ on columns (LH)
  • $h$ on rows, $l$ on columns (HL)
  • $h$ on rows, $h$ on columns (HH)

producing the arrangement below. This is iterated (levels) for on the image, then on the low-pass/low-pass images (LL)

Wavelet decomposition

Among those filters, three (LH, HL, HH) can be considered as edge detectors ($h$ is similar to a 2-point gradient) in different directions: more horizontal (HL), more vertical (LH), somehow diagonal (HH).

The corresponding coefficients, as least their combined energy, can be interpreted as a measure of edge strength, a map computed for each level.

Remember that for a continuous 2D field modeling an image $f(x,y)$, the image gradient

$$\nabla f =\left[\frac{\partial f(x,y)}{\partial x} ,\frac{\partial f(x,y)}{\partial y} \right]^T$$

represents the local directional change in image intensities, whose norm is a measure of gradient "magnitude". You can compute several norms, the most common being the Euclidean, the Taxicab or the max norms.

The Haar filter $[1\,-1]$ is one possible discretization for the 1D gradient, the three 2D Haar wavelets compute an horizontal, a vertical and a somewhat diagonal gradient, hence their combined energy (Euclidean norm) is an estimate of the true gradient magnitude.

$\endgroup$
  • $\begingroup$ Thanks for your answer. Could you elaborate more on the gradient part ? Is this why we have to compute the Euclidean distance between HL, LH and HH ? $\endgroup$ – CpCd0y Mar 9 '17 at 9:12
  • $\begingroup$ so it mean magnitude will be sqrt (vv + hh + d*d) $\endgroup$ – Abc Nov 17 '17 at 11:56
  • $\begingroup$ After re-reading this answer, it seems like haar filter [1 -1] is actually 1D gradient. $\endgroup$ – Abc Nov 25 '17 at 9:37
  • $\begingroup$ There several potential discrete 1D gradient, and this one is the shortest. It provides a derivative estimate at the mid-point between two pixels $\endgroup$ – Laurent Duval Nov 25 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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