why normrect discard one pixel of each boundary when applying Viola-Jones Obj detection

asked 2019-07-24 05:04:34 -0600

majaja gravatar image

Dears:

I find the normalization to a rectangle of Viola-Jones object detection discard one pixel from all boundary, as below.

bool HaarEvaluator::read(const FileNode& node, Size _origWinSize) {
    ....
    normrect = Rect(1, 1, origWinSize.width - 2, origWinSize.height - 2);

Do you know why to do it?
How to prove it is better than taking the whole rectangle into consideration?

Thanks

edit retag flag offensive close merge delete