This patch eliminates a couple of rare cases in which autopanosiftC chooses to
print an error message and die, rather than doing anything sensible. These
cases are numerically rather rare (some number has to be exactly zero). I
haven't thought this patch out to all its consequences, but (a) erroring out
when some floatingpoint number is exactly zero, but not when it is almost zero,
is hardly ever the right thing to do; and (b) whatever the consequences to end
users, they can hardly be worse than dying with an error. In any case, the
following patch seemed to fix things for the test case I tried: instead of an
error message, I got normal, usable output.
 ScaleSpace.c_orig 20090303 16:41:37.000000000 0500
+++ ScaleSpace.c 20090303 17:29:32.000000000 0500
@@ 415,8 +415,10 @@
*degreeCorrection = *peakValue = 1;
// Not a parabol
 if (a == 0.0)
 return (false);
+ if (a == 0.0) {
+ *degreeCorrection = 0;
+ return (true);
+ }
double c = (((left  middle) / a)  1.0) / 2.0;
double b = middle  c * c * a;
@@ 681,7 +683,7 @@
norm = sqrt (norm);
if (norm == 0.0)
 FatalError("CapAndNormalizeFV cannot normalize with norm = 0.0");
+ return;
for (n = 0 ; n < Keypoint_FVLinearDim(kp) ; ++n)
Keypoint_FVLinearSet (kp, n, Keypoint_FVLinearGet (kp, n) / norm);
