Added marker pose estimation. Not tested yet.
This commit is contained in:
@@ -22,20 +22,30 @@
|
||||
|
||||
namespace nxtar{
|
||||
|
||||
typedef std::vector<cv::Point2f> points_vector;
|
||||
class Marker;
|
||||
|
||||
typedef std::vector<cv::Point2f> points_vector;
|
||||
typedef std::vector<Marker> markers_vector;
|
||||
|
||||
/**
|
||||
* A class representing a marker with the geometric transformations needed to
|
||||
* render something on top of it.
|
||||
*/
|
||||
class Marker{
|
||||
public:
|
||||
~Marker();
|
||||
|
||||
int code;
|
||||
points_vector points;
|
||||
int code;
|
||||
cv::Mat translation;
|
||||
cv::Mat rotation;
|
||||
};
|
||||
|
||||
/**
|
||||
* Detect all 5x5 markers in the input image and return their codes in the
|
||||
* output vector.
|
||||
*/
|
||||
void getAllMarkers(std::vector<int> &, cv::Mat &);
|
||||
void getAllMarkers(markers_vector &, cv::Mat &);
|
||||
|
||||
/**
|
||||
* Find a chessboard calibration pattern in the input image. Returns true
|
||||
@@ -51,6 +61,14 @@ bool findCalibrationPattern(points_vector &, cv::Mat &);
|
||||
*/
|
||||
double getCameraParameters(cv::Mat &, cv::Mat &, std::vector<points_vector> &, cv::Size);
|
||||
|
||||
/**
|
||||
* Obtains the necesary geometric transformations necessary to move a reference
|
||||
* unitary polygon to the position and rotation of the markers passed as input.
|
||||
* The obtained transformations are given relative to a camera centered in the
|
||||
* origin and are saved inside the input markers.
|
||||
*/
|
||||
void estimateMarkerPosition(markers_vector &, cv::Mat &, cv::Mat &);
|
||||
|
||||
} // namespace nxtar
|
||||
|
||||
#endif // MARKER_HPP
|
||||
|
||||
Reference in New Issue
Block a user