Fixed initial value of refImage2, use different values of visible[] for different reasons
More checks
Support vis.v with more values;  added vis.vorig
Limit increase rate in variance
Added comment
Increased minvar to avoid problems with detection in front of black surfaces; increased fgthresh
Removed debug stuff
Use all pixels if no blocked ones
Only disable LEDs for correlation mode.