fixed a bug in boundWeight

- changed Scharr to Sobel in grad
- provided options for terms