use raw gradient instead of median filtered gradient