33 #ifndef VP_DETECTOR_APRILTAG_H
34 #define VP_DETECTOR_APRILTAG_H
38 #include <visp3/core/vpConfig.h>
40 #ifdef VISP_HAVE_APRILTAG
41 #include <visp3/core/vpCameraParameters.h>
42 #include <visp3/core/vpColor.h>
43 #include <visp3/core/vpHomogeneousMatrix.h>
44 #include <visp3/core/vpImage.h>
45 #include <visp3/detection/vpDetectorBase.h>
255 HOMOGRAPHY_VIRTUAL_VS,
257 DEMENTHON_VIRTUAL_VS,
261 BEST_RESIDUAL_VIRTUAL_VS,
264 HOMOGRAPHY_ORTHOGONAL_ITERATION
268 const vpPoseEstimationMethod &poseEstimationMethod = HOMOGRAPHY_VIRTUAL_VS);
272 bool detect(const
vpImage<
unsigned char> &I) VP_OVERRIDE;
277 std::vector<
double> *projErrors =
nullptr, std::vector<
double> *projErrors2 =
nullptr);
284 void displayTags(const
vpImage<
unsigned char> &I, const std::vector<std::vector<
vpImagePoint> > &tagsCorners,
285 const
vpColor &color =
vpColor::none,
unsigned int thickness = 1) const;
287 const
vpColor &color =
vpColor::none,
unsigned int thickness = 1) const;
290 vpHomogeneousMatrix *cMo2 =
nullptr,
double *projError =
nullptr,
double *projError2 =
nullptr);
297 std::vector<std::vector<vpImagePoint> > getTagsCorners()
const;
298 std::vector<int> getTagsId()
const;
299 std::vector<std::vector<vpPoint> > getTagsPoints3D(
const std::vector<int> &tagsId,
300 const std::map<int, double> &tagsSize)
const;
302 bool isZAlignedWithCameraAxis()
const;
304 void setAprilTagDecodeSharpening(
double decodeSharpening);
305 void setAprilTagFamily(
const vpAprilTagFamily &tagFamily);
306 void setAprilTagNbThreads(
int nThreads);
307 void setAprilTagPoseEstimationMethod(
const vpPoseEstimationMethod &poseEstimationMethod);
308 void setAprilTagQuadDecimate(
float quadDecimate);
309 void setAprilTagQuadSigma(
float quadSigma);
310 void setAprilTagRefineEdges(
bool refineEdges);
318 m_displayTag = display;
319 m_displayTagColor = color;
320 m_displayTagThickness = thickness;
326 swap(o1.m_impl, o2.m_impl);
329 void setZAlignedWithCameraAxis(
bool zAlignedWithCameraFrame);
331 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
336 VP_DEPRECATED
void setAprilTagRefinePose(
bool refinePose);
337 VP_DEPRECATED
void setAprilTagRefineDecode(
bool refineDecode);
364 os <<
"HOMOGRAPHY_VIRTUAL_VS";
368 os <<
"DEMENTHON_VIRTUAL_VS";
372 os <<
"LAGRANGE_VIRTUAL_VS";
376 os <<
"BEST_RESIDUAL_VIRTUAL_VS";
380 os <<
"HOMOGRAPHY_ORTHOGONAL_ITERATION";
384 os <<
"ERROR_UNKNOWN_POSE_METHOD!";
431 os <<
"STANDARD52h13";
435 os <<
"STANDARD41h12";
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionalities.
static const vpColor none
@ BEST_RESIDUAL_VIRTUAL_VS
@ HOMOGRAPHY_ORTHOGONAL_ITERATION
void setDisplayTag(bool display, const vpColor &color=vpColor::none, unsigned int thickness=2)
friend void swap(vpDetectorAprilTag &o1, vpDetectorAprilTag &o2)
unsigned int m_displayTagThickness
vpAprilTagFamily m_tagFamily
vpPoseEstimationMethod m_poseEstimationMethod
@ TAG_CIRCLE21h7
AprilTag Circle21h7 pattern.
@ TAG_25h7
DEPRECATED AND POOR DETECTION PERFORMANCE.
@ TAG_36ARTOOLKIT
DEPRECATED AND WILL NOT DETECT ARTOOLKIT TAGS.
@ TAG_25h9
AprilTag 25h9 pattern.
@ TAG_CUSTOM48h12
AprilTag Custom48h12 pattern.
@ TAG_36h11
AprilTag 36h11 pattern (recommended)
@ TAG_STANDARD52h13
AprilTag Standard52h13 pattern.
@ TAG_16h5
AprilTag 16h5 pattern.
@ TAG_STANDARD41h12
AprilTag Standard41h12 pattern.
@ TAG_CIRCLE49h12
AprilTag Circle49h12 pattern.
vpColor m_displayTagColor
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition of the vpImage class member functions.