Constraints are more stable.

- Improve speed by doing whole-pixel changes each round of relaxation.
- Fix logic error and infinite slope case error in colinearity constraint.