machinevisiontoolbox.Image.upq
- Image.upq(p, q)
Central image moments
- Parameters:
p (int) – u exponent
q (int) – v exponent
- Returns:
moment
- Type:
scalar
Computes the pq’th central moment of the image:
\[\mu(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.upq(2, 2) 922044470450.7101