10 #ifndef CVTRACKEDFEATURES_H
11 #define CVTRACKEDFEATURES_H
26 #define SL_SPLIT_DETECT_COMPUTE 0
27 #define SL_DO_FEATURE_BENCHMARKING 0
30 #define SL_DRAW_REPROJECTION_POINTS 1
31 #define SL_DRAW_REPROJECTION_ERROR 1
32 #define SL_DRAW_PATCHES 1
35 #ifdef SL_SAVE_DEBUG_OUTPUT
36 # if defined(SL_OS_LINUX) || defined(SL_OS_MACOS) || defined(SL_OS_MACIOS)
37 # define SL_DEBUG_OUTPUT_PATH "/tmp/cv_tracking/"
38 # elif defined(SL_OS_WINDOWS)
39 # define SL_DEBUG_OUTPUT_PATH "cv_tracking/"
CVDetectDescribeType
Feature detector-decriptor types.
Declares the Raul Mur ORB feature detector and descriptor.
const int reposeFrequency
const float reprojection_error
const int initialPatchSize
vector< cv::Point3f > CVVPoint3f
vector< cv::Point2f > CVVPoint2f
vector< cv::DMatch > CVVDMatch
vector< cv::KeyPoint > CVVKeyPoint
Live video camera calibration class with OpenCV an OpenCV calibration.
Wrapper class around OpenCV feature detector & describer.
CVDetectDescribeType type()
CVTrackedFeatures is the main part of the AR Christoffelturm scene.
bool _isTracking
True if tracking.
void loadMarker(string markerFilename)
Loads the marker image form the filesystem.
CVVDMatch getFeatureMatches()
SLFrameData _prevFrame
The previous video frame data.
CVTrackedFeatures(string markerFilename)
CVFeatureManager _featureManager
Feature detector-descriptor wrapper instance.
~CVTrackedFeatures()
Show statistics if program terminates.
bool _forceRelocation
Force relocation every frame (no opt. flow tracking)
SLFeatureMarker2D _marker
2D marker data
cv::Ptr< cv::DescriptorMatcher > _matcher
Descriptor matching algorithm.
void forceRelocation(bool fR)
CVCalibration * _calib
Current calibration in use.
void drawDebugInformation(bool drawDetection)
void initFeaturesOnMarker()
CVDetectDescribeType type()
bool track(CVMat imageGray, CVMat image, CVCalibration *calib) final
int _frameCount
NO. of frames since process start.
void detectKeypointsAndDescriptors()
bool trackWithOptFlow(CVMat rvec, CVMat tvec)
SLFrameData _currentFrame
The current video frame data.
CVTracked is the pure virtual base class for tracking features in video.
Data of a 2D marker image.
CVMat imageGray
Grayscale image of the marker.
CVVPoint3f keypoints3D
3D feature points in mm
CVVKeyPoint keypoints2D
2D keypoints in pixels
CVMat descriptors
Descriptors of the 2D keypoints.
CVMat imageDrawing
Color debug image.
Feature date for a video frame.
CVVDMatch inlierMatches
matches that lead to correct transform
bool useExtrinsicGuess
flag if extrinsic gues should be used
bool foundPose
True if pose was found.
CVMat rvec
Rotation of the camera pose.
CVMat imageGray
Reference to grayscale video frame.
float reprojectionError
Reprojection error of the pose.
CVMat tvec
Translation of the camera pose.
CVVPoint2f inlierPoints2D
Inlier 2D points after RANSAC.
CVVDMatch matches
matches between video decriptors and marker descriptors
CVMat image
Reference to color video frame.
CVVKeyPoint keypoints
2D keypoints detected in video frame
CVVPoint3f inlierPoints3D
Inlier 3D points after RANSAC on the marker.
CVMat descriptors
Descriptors of keypoints.