且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Open CV计算机视觉中的haar级联分类器内部是什么?

更新时间:2022-11-29 11:43:52

我将尝试解释级联xml的含义.

I'll try explain the cascade xml meaning.

<_>
<!-- root node -->
    <feature>
      <rects>
        <_>3 7 14 4 -1.</_>
        <_>3 9 14 2 2.</_></rects>
      <tilted>0</tilted></feature>
    <threshold>4.0141958743333817e-003</threshold>
    <left_val>0.0337941907346249</left_val>
    <right_val>0.8378106951713562</right_val></_></_>
<_>

<_>3 7 14 4 -1.</_>

3,7是您要使用平方和矩阵求和的矩形的坐标(整数图像) 14 4是矩形的长度和高度 -1是矩形的宽度(根据viola-johnes原始文章,这不是权重)

3,7 are the cordinate of the rectangle you'd like to sum using the square sum matrix (the integral image) 14 4 are the length and hieght of the rectangle -1 is the wieght of the rectangle (this is NOT the weight according to viola-johnes original article)

请注意,将rects标准化为您的探测器尺寸

please denote that the rects are should be normalize to your detector size

如果rects总和超过阈值,则将right_val用于将来求和,否则将left_sum求和

if the rects sum passes the threashold value , then the right_val is sumed for the future, otherwise the left_sum is sumed

祝你好运

S