2015-02-06 16:27:51 +01:00
|
|
|
#ifndef _CHESSBOARDCAMERATRACKER_HPP_
|
|
|
|
#define _CHESSBOARDCAMERATRACKER_HPP_
|
|
|
|
|
|
|
|
#include "Camera.hpp"
|
|
|
|
#include "utility.hpp"
|
|
|
|
|
2015-03-12 14:42:06 +01:00
|
|
|
/**
|
|
|
|
* \ingroup calibration
|
|
|
|
* \brief Class that wraps a chessboard detector and compute the pose mat
|
|
|
|
*/
|
2015-02-06 16:27:51 +01:00
|
|
|
class ChessboardCameraTracker
|
|
|
|
{
|
|
|
|
public:
|
2015-03-12 14:42:06 +01:00
|
|
|
/**
|
|
|
|
* \brief Default constructor
|
|
|
|
*/
|
2015-02-06 16:27:51 +01:00
|
|
|
ChessboardCameraTracker() = default;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* It detects a chessboard inside an image and if found it returns the pose of the camera wrt the chessboard
|
|
|
|
*
|
|
|
|
* @param[in,out] img the original image
|
|
|
|
* @param[out] pose the pose of the camera
|
|
|
|
* @param[in] cam the camera
|
|
|
|
* @param[in] boardSize the size of the chessboard to detect
|
|
|
|
* @return true if the chessboard has been found
|
|
|
|
*/
|
|
|
|
bool process( cv::Mat &img, cv::Mat &pose, const Camera & cam, const cv::Size &boardSize);
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*_CHESSBOARDCAMERATRACKER_HPP_*/
|