Index: /branches/pap_branch_20090128/psModules/src/imcombine/pmSubtraction.c
===================================================================
--- /branches/pap_branch_20090128/psModules/src/imcombine/pmSubtraction.c	(revision 21405)
+++ /branches/pap_branch_20090128/psModules/src/imcombine/pmSubtraction.c	(revision 21406)
@@ -48,10 +48,8 @@
 
     // Take the square of the normal kernel
-    double sumNormal = 0.0, sumVariance = 0.0; // Sum of the normal and variance kernels
+    double sumVariance = 0.0;           // Sum of the variance kernel
     for (int v = yMin; v <= yMax; v++) {
         for (int u = xMin; u <= xMax; u++) {
-            float value = normalKernel->kernel[v][u]; // Value of interest
-            float value2 = PS_SQR(value); // Value squared
-            sumNormal += value;
+            float value2 = PS_SQR(normalKernel->kernel[v][u]); // Value squared
             sumVariance += value2;
             out->kernel[v][u] = value2;
@@ -59,7 +57,5 @@
     }
 
-    // Normalise so that the sum of the variance kernel is the square of the sum of the normal kernel
-    // This is required to keep the relative scaling between the image and the variance map
-    psBinaryOp(out->image, out->image, "*", psScalarAlloc(PS_SQR(sumNormal) / sumVariance, PS_TYPE_F32));
+    psBinaryOp(out->image, out->image, "*", psScalarAlloc(1.0 / sumVariance, PS_TYPE_F32));
 
     return out;
