What's inside the cascading haar classifier in Open CV computer vision?

I need to translate OpenCV haar xml cadrate to txt file.

(Open CV has a Haskar cascading classifier for detecting objects.)

So I need to understand xml. I wonder what the "stages" and "trees" are. Is there a tree for a weak classifier? Are trees at the same stage combined to be a strong classifier? Cascading stages.

The tree haarcascade_frontalface_alt.xml says:

<!-- tree 0 -->
    <_>
        <!-- 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></_></_>
    <_>

I want to know what numbers mean.

+3
source share
2 answers

I will try to explain the meaning of cascading xml.

<_>
<!-- 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></_></_>
<_>

AT

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

3,7 , , ( ) 14 4 - -1 - ( -johnes)

, ,

rects threashold, right_val , left_sum

.

S

+11

Source: https://habr.com/ru/post/1781090/


All Articles