This forum is disabled, please visit https://forum.opencv.org

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 height*width*2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).

2 | Suggested edit |

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 height*width*2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).

3 | Suggested edit |

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 ~~height~~height * width*2 - since both sides are measured in diagonal pixel units ( sqrt(2) pixels).*width*2

4 | Suggested edit |

To reflect tilted haar features horizontally:

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

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).

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.