Added debug for brezenhem & woo  algorithms