3
$\begingroup$

I came across a problem working with image moments [1]. It is stated that

$\eta_{ij} = \frac{\mu_{ji}}{\mu_{00}^{k}}$

where $k = 1 + \frac{i+j}{2}$

is scale invariant.

However, if I try to reproduce this, it does not appear scale invariant at all.

Consider a simple example:

In a binary image, we calculate $\eta_{20}$ of a 2x2 block of 4 pixels:

☐☐
☐☐

$\mu_{20} = 0.5^2 + 0.5^2 + (-0.5)^2 + (-0.5)^2 = 4 \cdot 0.25 = 1$

$\mu_{00} = 4$

$k = 1 + \frac{2+0}{2} = 1+1 = 2$

$\eta_{20} = \frac{1}{4^2} = \frac{1}{16} = 0.0625$

Now, let's scale this block by the factor two:

☐☐☐☐
☐☐☐☐
☐☐☐☐
☐☐☐☐

$\mu_{20} = 4 \cdot 1.5^2 + 4 \cdot 0.5^2 + 4 \cdot (-0.5)^2 + 4 \cdot (-1.5)^2 = 8 \cdot 2.25 + 8 \cdot 0.25 = 18 + 2 = 20$

$\mu_{00} = 16$

$k = 1 + \frac{2+0}{2} = 1+1 = 2$

$\eta_{20} = \frac{20}{16^2} = \frac{20}{256} = 0.078125$

Why do we have a different result after scaling the object if $\eta_{ij}$ is supposedly scale invariant? Is there any formal proof of the scale invariance of $\eta$?

[1] https://en.wikipedia.org/wiki/Image_moment

$\endgroup$
1
$\begingroup$

The invariance is exact in the continuous domain. Your problem here is how you scale, which is limited by the discrete grid.

Scaling by a factor 2 of your original 4 squares would result in 4 squares, centered at (-1,-1), (-1,1), (1,-1) and (1,1), each with a weight of 4:

$$ \mu_{20} = 4 \cdot 1^2 + 4 \cdot 1^2 + 4 \cdot (-1)^2 + 4 \cdot (-1)^2 = 16 $$

$$ \mu_{00} = 4 \cdot 4 = 16 $$

$$ \eta_{20} = \frac{16}{16^2} = 0.0625 $$

On the discrete grid, the invariances are approximate.

$\endgroup$

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.