Commit 247f4c9b19ecc0cc8ebaf8267b9d1e7317ce56da
1 parent
646c680e
Control flipping of rects and points
Showing
1 changed file
with
5 additions
and
1 deletions
openbr/plugins/imgproc/flip.cpp
| @@ -30,6 +30,8 @@ class FlipTransform : public UntrainableTransform | @@ -30,6 +30,8 @@ class FlipTransform : public UntrainableTransform | ||
| 30 | Q_OBJECT | 30 | Q_OBJECT |
| 31 | Q_ENUMS(Axis) | 31 | Q_ENUMS(Axis) |
| 32 | Q_PROPERTY(Axis axis READ get_axis WRITE set_axis RESET reset_axis STORED false) | 32 | Q_PROPERTY(Axis axis READ get_axis WRITE set_axis RESET reset_axis STORED false) |
| 33 | + Q_PROPERTY(bool flipPoints READ get_flipPoints WRITE set_flipPoints RESET reset_flipPoints STORED false) | ||
| 34 | + Q_PROPERTY(bool flipRects READ get_flipRects WRITE set_flipRects RESET reset_flipRects STORED false) | ||
| 33 | 35 | ||
| 34 | public: | 36 | public: |
| 35 | /*!< */ | 37 | /*!< */ |
| @@ -39,10 +41,12 @@ public: | @@ -39,10 +41,12 @@ public: | ||
| 39 | 41 | ||
| 40 | private: | 42 | private: |
| 41 | BR_PROPERTY(Axis, axis, Y) | 43 | BR_PROPERTY(Axis, axis, Y) |
| 44 | + BR_PROPERTY(bool, flipPoints, true) | ||
| 45 | + BR_PROPERTY(bool, flipRects, true) | ||
| 42 | 46 | ||
| 43 | void project(const Template &src, Template &dst) const | 47 | void project(const Template &src, Template &dst) const |
| 44 | { | 48 | { |
| 45 | - OpenCVUtils::flip(src,dst,axis); | 49 | + OpenCVUtils::flip(src,dst,axis,true,flipPoints,flipRects); |
| 46 | } | 50 | } |
| 47 | }; | 51 | }; |
| 48 | 52 |