计算并保存第一帧中所有归一化前景关键点points_normalized与x轴的夹角(反正切)angles_pairwise以及关键点两两之间的距离distances_pairwise。
评估当前的旋转角度和尺度因子
<code class="language-cpp hljs has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: Source Code Pro, monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">consensus.estimateScaleRotation(points_fused, classes_fused, scale, rotation);</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
计算matchGlobal匹配后融合得到的关键点的夹角以及关键点两两之间的距离,并与对应的points_normalized关键点的夹角求差、距离求商,再分别取平均,评估出当前帧中目标的尺度因子scale和旋转角度rotation。cmt算法
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/tongxinshuyu/article-53279-5.html
尤其改革开放初期