| 22 | |
| 23 | template<typename T> |
| 24 | void normalize(cv::Rect_<T> &rect) { |
| 25 | if (rect.width < 0) { |
| 26 | rect.x += rect.width; |
| 27 | rect.width *= -1; |
| 28 | } |
| 29 | if (rect.height < 0) { |
| 30 | rect.y += rect.height; |
| 31 | rect.height *= -1; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | template<typename T> |
| 36 | std::vector<T> toVector(cv::InputArray inputArray) { |