以下内容节选自https://bitesofcode.wordpress.com/2017/09/12/augmented-reality-with-python-and-opencv-part-1/comment-page-1/#comment-61
对于上图中,怎么估计\(\begin{bmatrix}h_{11} & h_{12} & h_{13} \\ h_{21} & h_{22} & h_{23} \\ h_{31} & h_{32} & h_{33} \end{bmatrix}\)?
我们可以使用Random Aample Consebsus(RANSAC)
RANSAC算法过程如下:
- 均匀随机选择点集合中的一部分点;
- Fit a model to subset
- find all remaining points that are "close" to the model and reject the rest as outliers
- do this many times and choose the best model
举个例子,假设我们有一下点集,我们想用使用RANSAC来用一条直线拟合: