Index: /trunk/psLib/src/imageops/psImageCovariance.c
===================================================================
--- /trunk/psLib/src/imageops/psImageCovariance.c	(revision 28148)
+++ /trunk/psLib/src/imageops/psImageCovariance.c	(revision 28149)
@@ -571,4 +571,5 @@
 
     psKernel *out = psKernelAlloc(xMinOut, xMaxOut, yMinOut, yMaxOut); // Output covariance
+    double sum = 0.0;                                                  // Sum of covariance
     for (int y = yMinOut; y <= yMaxOut; y++) {
         float yIn = y * scale + 0.5 - yMinIn + 1; // Position on input image (not the kernel)
@@ -580,9 +581,15 @@
                 return false;
             }
-            out->kernel[y][x] = value;
-        }
-    }
-
+            sum += out->kernel[y][x] = value;
+        }
+    }
     psFree(interp);
+
+    float norm = 1.0 / PS_SQR(scale) / sum; // Renormalisation for covariance (to remove errors in interp.)
+    for (int y = yMinOut; y <= yMaxOut; y++) {
+        for (int x = xMinOut; x <= xMaxOut; x++) {
+            out->kernel[y][x] *= norm;
+        }
+    }
 
     return out;
