0
0
Computer Visionml~8 mins

Corner detection (Harris) in Computer Vision - Model Metrics & Evaluation

Choose your learning style9 modes available
Metrics & Evaluation - Corner detection (Harris)
Which metric matters for Corner Detection (Harris) and WHY

For corner detection, the key metrics are repeatability and localization accuracy. Repeatability means the detector finds the same corners under different views or lighting. Localization accuracy means the detected corners are close to the true corner points. These metrics matter because a good corner detector should reliably find important points that help in tasks like image matching or tracking.

Confusion matrix or equivalent visualization
True Corners Detected: TP = 85
False Corners Detected: FP = 15
Missed True Corners: FN = 10
Correctly Ignored Non-Corners: TN = 890

Confusion Matrix:
          | Detected Corner | Not Detected |
----------|-----------------|--------------|
Corner    |       85 (TP)   |    10 (FN)   |
No Corner |       15 (FP)   |   890 (TN)   |

Total samples = 85 + 15 + 10 + 890 = 1000
    
Precision vs Recall Tradeoff with Examples

Precision tells us how many detected corners are actually true corners. High precision means few false corners, which is good to avoid noise.

Recall tells us how many true corners were detected. High recall means we miss very few real corners.

For example, if you want to track objects in video, missing corners (low recall) can cause tracking failure. But if you detect too many false corners (low precision), the system wastes time processing useless points.

So, a balance is needed. Harris detector parameters can be tuned to increase recall (detect more corners) or precision (detect fewer but more accurate corners).

What "Good" vs "Bad" Metric Values Look Like

Good: Precision and recall both above 0.8 means most detected corners are true and most true corners are found. Localization error is low (corners detected within a few pixels of true corners).

Bad: Precision below 0.5 means many false corners detected, causing noise. Recall below 0.5 means many true corners missed, losing important features. Large localization error means corners are not accurately placed.

Common Pitfalls in Metrics for Corner Detection
  • Ignoring localization error: Counting detected corners without checking how close they are to true corners can mislead about quality.
  • Overfitting to one image: A detector tuned only for one image may not work well on others, hurting repeatability.
  • Data leakage: Using test images to tune parameters inflates performance metrics.
  • Accuracy paradox: High accuracy can be misleading if most pixels are non-corners (TN dominate), so precision and recall are better.
Self-Check Question

Your Harris corner detector has 98% accuracy but only 12% recall on true corners. Is it good for use?

Answer: No, because the detector misses 88% of true corners (low recall). High accuracy is misleading here since most pixels are non-corners. The detector is not reliable for finding important corners.

Key Result
For Harris corner detection, high recall and precision with low localization error ensure reliable and accurate corner points.