machinevisiontoolbox.Image.npq
- Image.npq(p, q)
Normalized central image moments
- Parameters:
p (int) – u exponent
q (int) – v exponent
- Returns:
moment
- Type:
scalar
Computes the pq’th normalized central moment of the image:
\[\nu(I) = \frac{\mu_{pq}(I)}{m_{00}(I)} = \frac{1}{m_{00}(I)} \sum_{uv} I_{uv} (u-u_0)^p (v-v_0)^q\]where \(u_0 = m_{10}(I) / m_{00}(I)\) and \(v_0 = m_{01}(I) / m_{00}(I)\).
Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Read('shark1.png') >>> img.npq(2, 2) 1.1596991128539826e-07