Small compile error
Only add edges that we need.  Check threshold on intensity and difference