// haar_x2
if ( (x+dx*2 <= winSize.width) && (y+dy <= winSize.height) )
{
- if ( x+x+dx*2 <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
x, y, dx*2, dy, -1,
x+dx, y, dx , dy, +2 ) );
}
// haar_y2
if ( (x+dx*2 <= winSize.height) && (y+dy <= winSize.width) )
{
- if ( y+y+dy <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
y, x, dy, dx*2, -1,
y, x+dx, dy, dx, +2 ) );
}
// haar_x3
if ( (x+dx*3 <= winSize.width) && (y+dy <= winSize.height) )
{
- if ( x+x+dx*3 <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
x, y, dx*3, dy, -1,
x+dx, y, dx , dy, +3 ) );
}
// haar_y3
if ( (x+dx*3 <= winSize.height) && (y+dy <= winSize.width) )
{
- if ( y+y+dy <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
y, x, dy, dx*3, -1,
y, x+dx, dy, dx, +3 ) );
}
// haar_x4
if ( (x+dx*4 <= winSize.width) && (y+dy <= winSize.height) )
{
- if ( x+x+dx*4 <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
x, y, dx*4, dy, -1,
x+dx, y, dx*2, dy, +2 ) );
}
// haar_y4
if ( (x+dx*4 <= winSize.height) && (y+dy <= winSize.width ) )
{
- if ( y+y+dy <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
y, x, dy, dx*4, -1,
y, x+dx, dy, dx*2, +2 ) );
}
// x2_y2
if ( (x+dx*2 <= winSize.width) && (y+dy*2 <= winSize.height) )
{
- if ( x+x+dx*2 <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
x, y, dx*2, dy*2, -1,
x, y, dx, dy, +2,
x+dx, y+dy, dx, dy, +2 ) );
{
if ( (x+dx*3 <= winSize.width) && (y+dy*3 <= winSize.height) )
{
- if ( x+x+dx*3 <= winSize.width )
- features.push_back( Feature( offset, false,
+ features.push_back( Feature( offset, false,
x , y , dx*3, dy*3, -1,
x+dx, y+dy, dx , dy , +9) );
}
// tilted haar_x2
if ( (x+2*dx <= winSize.width) && (y+2*dx+dy <= winSize.height) && (x-dy>= 0) )
{
- if ( x <= (winSize.width / 2) )
- features.push_back( Feature( offset, true,
+ features.push_back( Feature( offset, true,
x, y, dx*2, dy, -1,
x, y, dx, dy, +2 ) );
}
// tilted haar_y2
if ( (x+dx <= winSize.width) && (y+dx+2*dy <= winSize.height) && (x-2*dy>= 0) )
{
- if ( x <= (winSize.width / 2) )
- features.push_back( Feature( offset, true,
+ features.push_back( Feature( offset, true,
x, y, dx, 2*dy, -1,
x, y, dx, dy, +2 ) );
}
// tilted haar_x3
if ( (x+3*dx <= winSize.width) && (y+3*dx+dy <= winSize.height) && (x-dy>= 0) )
{
- if ( x <= (winSize.width / 2) )
- features.push_back( Feature( offset, true,
+ features.push_back( Feature( offset, true,
x, y, dx*3, dy, -1,
x+dx, y+dx, dx, dy, +3 ) );
}
// tilted haar_y3
if ( (x+dx <= winSize.width) && (y+dx+3*dy <= winSize.height) && (x-3*dy>= 0) )
{
- if ( x <= (winSize.width / 2) )
- features.push_back( Feature( offset, true,
+ features.push_back( Feature( offset, true,
x, y, dx, 3*dy, -1,
x-dy, y+dy, dx, dy, +3 ) );
}
// tilted haar_x4
if ( (x+4*dx <= winSize.width) && (y+4*dx+dy <= winSize.height) && (x-dy>= 0) )
{
- if ( x <= (winSize.width / 2) )
- features.push_back( Feature( offset, true,
+ features.push_back( Feature( offset, true,
x, y, dx*4, dy, -1,
x+dx, y+dx, dx*2, dy, +2 ) );
}
// tilted haar_y4
if ( (x+dx <= winSize.width) && (y+dx+4*dy <= winSize.height) && (x-4*dy>= 0) )
{
- if ( x <= (winSize.width / 2) )
- features.push_back( Feature( offset, true,
+ features.push_back( Feature( offset, true,
x, y, dx, 4*dy, -1,
x-dy, y+dy, dx, 2*dy, +2 ) );
}