Given points, makes rotated bounding box.
More...
#include "brat_math.h"
Go to the source code of this file.
|
|
float | length (cv::Point2f const &p) |
| |
|
float | angle (cv::Point2f const &) |
| |
|
bool | operator< (Pointf const &, Pointf const &) |
| |
|
bool | operator> (const Pointf &, const Pointf &) |
| |
| b2Vec2 | getb2Vec2 (cv::Point2f) |
| | Gets an opencv point in b2VEc2 format. More...
|
| |
| template<typename T > |
| Pointf | getPointf (T v) |
| | Get the Pointf object from a 2d point/vector. More...
|
| |
| Pointf | Polar2f (float radius, float angle) |
| | Gets Pointf from polar coordinates. More...
|
| |
| template<typename T > |
| std::vector< T > | set2vec (std::set< T > s) |
| | Casts a set to vector. More...
|
| |
| template<typename T > |
| std::vector< cv::Point2f > | set2vec2f (std::set< T > s) |
| | Casts a set of 2d points/vectors to a vector of cv::Point2f. More...
|
| |
| template<typename T > |
| std::vector< b2Vec2 > | cast_b2Vec2 (const std::vector< T > &v) |
| | Casts a vector of 2d points to a vector of box2d b2Vec2. More...
|
| |
| template<typename T > |
| std::vector< cv::Point2f > | cast_Point2f (const std::vector< T > &v) |
| | Casts a vector of 2d points to a vector of cv::Point2f. More...
|
| |
| template<typename T > |
| std::set< T > | vec2set (std::vector< T > vec) |
| | Casts a vector to set. More...
|
| |
|
std::pair< bool, BodyFeatures > | bounding_rotated_box (std::vector< cv::Point2f >nb) |
| |
| template<class Pt > |
| std::pair< bool, BodyFeatures > | bounding_box (std::vector< Pt > &nb) |
| | Makes an upright bounding box around points. More...
|
| |
Given points, makes rotated bounding box.
- Parameters
-
- Returns
- std::pair <bool, BodyFeatures> : <are features valid?, features>
◆ bounding_box()
template<class Pt >
| std::pair<bool,BodyFeatures> bounding_box |
( |
std::vector< Pt > & |
nb | ) |
|
Makes an upright bounding box around points.
- Template Parameters
-
| Pt | template for point (Box2D, OpenCV or similar) |
- Parameters
-
- Returns
- std::pair<bool,BodyFeatures> (is the object valid, object)
◆ cast_b2Vec2()
template<typename T >
| std::vector<b2Vec2> cast_b2Vec2 |
( |
const std::vector< T > & |
v | ) |
|
|
inline |
Casts a vector of 2d points to a vector of box2d b2Vec2.
- Template Parameters
-
- Parameters
-
- Returns
- std::vector<b2Vec2>
◆ cast_Point2f()
template<typename T >
| std::vector<cv::Point2f> cast_Point2f |
( |
const std::vector< T > & |
v | ) |
|
|
inline |
Casts a vector of 2d points to a vector of cv::Point2f.
- Template Parameters
-
- Parameters
-
- Returns
- std::vector<b2Vec2>
◆ getb2Vec2()
| b2Vec2 getb2Vec2 |
( |
cv::Point2f |
p | ) |
|
Gets an opencv point in b2VEc2 format.
- Returns
- b2Vec2
◆ getPointf()
Get the Pointf object from a 2d point/vector.
- Template Parameters
-
- Parameters
-
- Returns
- Pointf
◆ Polar2f()
| Pointf Polar2f |
( |
float |
radius, |
|
|
float |
angle |
|
) |
| |
Gets Pointf from polar coordinates.
- Parameters
-
- Returns
- Pointf
◆ set2vec()
template<typename T >
| std::vector<T> set2vec |
( |
std::set< T > |
s | ) |
|
Casts a set to vector.
- Template Parameters
-
- Parameters
-
- Returns
- std::vector<T>
◆ set2vec2f()
template<typename T >
| std::vector<cv::Point2f> set2vec2f |
( |
std::set< T > |
s | ) |
|
Casts a set of 2d points/vectors to a vector of cv::Point2f.
- Template Parameters
-
- Parameters
-
- Returns
- std::vector<cv::Point2f>
◆ vec2set()
template<typename T >
| std::set<T> vec2set |
( |
std::vector< T > |
vec | ) |
|
Casts a vector to set.
- Template Parameters
-
- Parameters
-
- Returns
- std::set<T>