Sagitta tolerance


You can limit the allowable radial deviation from the defined conic shape by setting the Sagitta tolerance. This establishes the search area in which to consider active edges for an occurrence at a given scale; a best fit conic is then fit within these active edges. Essentially, setting the Sagitta tolerance allows you to specify how perfectly round you want your occurrences to be, and whether to find conic shapes that do not have a consistent radius over their full angular range.

More generally, the Sagitta tolerance allows you to identify shapes that are conic in nature, but have rough or noisy edges; a bottle cap could be identified as a potential occurrence of a circle. If the occurrence in the target is expected to be perfectly conic with a consistent radius across its full angular range, you can safely set the Sagitta tolerance close to 0.0%. Whereas, if the typical occurrence within a target does not contain a perfectly smooth contour, such as one containing rough edges, the Sagitta tolerance should be increased from the default value of 25.0%.

The following images demonstrate a situation where the outline of a flower needs to be identified as an occurrence. In the image on the left, the Sagitta tolerance was set too low, causing the algorithm to identify the outline of the petal as the circular shape being sought. In the image on the right, the Sagitta tolerance was set to an appropriate level, and the average outline of the flower was correctly identified as an occurrence.

The shape coverage for the image on the left would be under 50%, while the shape coverage for the image on the right would be 100%. This is because, unlike the image on the left, every point of the returned occurrence in the image on the right corresponds to a point of the outline of the flower within the established search area.

However, the fit error for the image on the left would be much lower than that of the image on the right. This is because the returned occurrence in the image on the left coincides very strongly with the portion of the flower within the search area, while the returned occurrence in the image on the right, which has full shape coverage, does not. The nature of the contour being sought (not perfectly circular), always increases the fit error.

If the Sagitta tolerance is set too high, edges from neighbouring objects can be included in the fit, skewing the results. The following image demonstrates a case of this.

It can be seen that the upper bound of the Sagitta tolerance covers the edge of an adjacent rectangle, and as such, the edge of the rectangle is misidentified as a part of the contour being sought.