| contours_a | CV_CONTOURS | | First shape. A whole contour LIST is accepted; the contour selected by 'index_a' is used. |
| contours_b | CV_CONTOURS | | Second shape, compared against the first. |
| method | COMBO | Shape Context (deformation-aware) | Shape Context handles deformation and returns a unitless matching cost; Hausdorff returns a distance in PIXELS, so it only makes sense on shapes that are already aligned and at the same scale. |
| sample_points | INT | 1004–1000 | Both contours are resampled to this many points before comparing, which is what makes contours of different lengths comparable. More points = finer and slower (Shape Context cost grows quickly). |
| index_aopt | INT | 00–10000 | Which contour of 'contours_a' to use (0 = the largest, since 'CV Find Contours' sorts by area). |
| index_bopt | INT | 00–10000 | Which contour of 'contours_b' to use. |
| angular_binsopt | INT | 124–64 | Shape Context only: angular bins of the log-polar histogram. |
| radial_binsopt | INT | 42–32 | Shape Context only: radial bins of the log-polar histogram. |
| hausdorff_normopt | COMBO | L2 (euclidean) | Hausdorff only: the point-to-point norm used. |
| rank_proportionopt | FLOAT | 0.600–1 | Hausdorff only: use this RANK instead of the true maximum (0.6 = the 60th-percentile nearest-point distance), which makes it robust to a few outliers. 1.0 is the classic worst-case Hausdorff distance. |
| rotation_invariantopt | BOOLEAN | false | Shape Context only: measure each log-polar histogram against the local tangent instead of a fixed axis, which is what actually makes it rotation tolerant (measured on a 40-degree turn: 1.930 off, 0.010 on; on a 20-degree turn 0.028 off, 0.009 on). It DEGRADES past about 160 degrees, and it is not a mirror test - a reflected shape lands among the large-rotation scores. Off by default so saved graphs keep their numbers. |