# Fitting Algorithm

The tool supports two line-fitting algorithms:

- The Random Sample Consensus algorithm (RANSAC), an algorithm for robust fitting of edge points in the presence of many edge point candidates.
- Exhaustive mode: All edge point combinations are evaluated for line fitting.

Cognex recommends you use the default RANSAC mode and switch to Exhaustive mode only if necessary, as this mode can require more execution time.