Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To reflect tilted haar features horizontally: - Change the x to img_width - x - Swap the width & height values.

The (x,y) are the coordinates of the upper 'corner' of the rectangle (the shape actually includes two adjacent pixels on that row, and the x coordinate is that of the rightmost one).

The 'width' is measured diagonally down from that point (increasing x and y) and the height is measured diagonally the other way (decreasing x, and increasing y) from (x-1,y).

For instance, the min ''x' corner pixel included within a tilted feature rectangle is at x-height, and the max x is x+width-1. The total number of pixels included in a tilted rectangle is heightwidth2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).

To reflect tilted haar features horizontally: - Change the x to img_width - x - Swap the width & height values.

The (x,y) are the coordinates of the upper 'corner' of the rectangle (the shape actually includes two adjacent pixels on that row, and the x coordinate is that of the rightmost one).

The 'width' is measured diagonally down from that point (increasing x and y) and the height is measured diagonally the other way (decreasing x, and increasing y) from (x-1,y).

For instance, the min ''x' ''x" corner pixel included within a tilted feature rectangle is at x-height, (x-height, y+height-1) and the max x is x+width-1. (x+width-1, y + width-1). The total number of pixels included in a tilted rectangle is heightwidth2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).

To reflect tilted haar features horizontally: - Change the x to img_width - x - Swap the width & height values.

The (x,y) are the coordinates of the upper 'corner' of the rectangle (the shape actually includes two adjacent pixels on that row, and the x coordinate is that of the rightmost one).

The 'width' is measured diagonally down from that point (increasing x and y) and the height is measured diagonally the other way (decreasing x, and increasing y) from (x-1,y).

For instance, the min ''x" corner pixel included within a tilted feature rectangle is at (x-height, y+height-1) and the max x is (x+width-1, y + width-1). The total number of pixels included in a tilted rectangle is heightwidth2 height * width*2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).

To reflect tilted haar features horizontally:

-
  • Change the x to img_width - x - img_width-x
  • Swap the width & height values.

The (x,y) are the coordinates of the upper 'corner' of the rectangle (the shape actually includes two adjacent pixels on that row, and the x coordinate is that of the rightmost one).

The 'width' is measured diagonally down from that point (increasing x and y) and the height is measured diagonally the other way (decreasing x, and increasing y) from (x-1,y).

For instance, the min ''x" corner pixel included within a tilted feature rectangle is at (x-height, y+height-1) and the max x is (x+width-1, y + width-1). The total number of pixels included in a tilted rectangle is height * width*2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).