ARX  1.2.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
PlanarTracker::PlanarTrackerImpl Class Reference
Collaboration diagram for PlanarTracker::PlanarTrackerImpl:
[legend]

Public Member Functions

 PlanarTrackerImpl ()
void Initialise (ARParam cParam)
cv::Vec2f CalcPyrDownScaleFactor (int pyrLevel, int x, int y)
 Calculate the exact scale factor using the same calculation pyrDown uses.
cv::Mat CreateFeatureMask (cv::Mat frame)
 Creates a mask image where the areas occupied by all currently tracked markers are 0, and all areas outside the markers are 1.
void UpdateTrackableBBox (const int index, const cv::Mat &homography)
void MatchFeatures (const std::vector< cv::KeyPoint > &newFrameFeatures, cv::Mat newFrameDescriptors)
void ResetAllTrackingPointSelectorsForTrackable (int trackableIndex)
bool RunOpticalFlow (int trackableId, const std::vector< cv::Point2f > &trackablePoints, const std::vector< cv::Point2f > &trackablePointsWarped)
bool UpdateTrackableHomography (int trackableId, const std::vector< cv::Point2f > &matchedPoints1, const std::vector< cv::Point2f > &matchedPoints2)
std::vector< cv::Point2f > GetVerticesFromPoint (cv::Point ptOrig, int width, int height)
 Calculates vertices of a rect centered on ptOrig.
std::vector< cv::Point2f > GetVerticesFromTopCorner (int x, int y, int width, int height)
 Calculates vertices of a rect with its top corner located at (x, y).
cv::Rect GetTemplateRoi (cv::Point2f pt)
bool IsRoiValidForFrame (cv::Rect frameRoi, cv::Rect roi)
cv::Rect InflateRoi (const cv::Rect &roi, int inflationFactor)
 Inflate the region of interest bounds by inflationFactor on each side.
std::vector< cv::Point2f > FloorVertexPoints (const std::vector< cv::Point2f > &vertexPoints)
 Transform all vertices by the same amount such that the point with the lowest x value moves to x=0 and the point with the lowest y value moves to y=0.
cv::Mat MatchTemplateToImage (cv::Mat searchImage, cv::Mat warpedTemplate)
bool RunTemplateMatching (cv::Mat frame, int trackableId)
void ProcessFrameData (unsigned char *frame)
 Wrap raw frame data in frame with a cv::Mat structure, then process it for tracking.
void ProcessFrame (cv::Mat frame)
void RemoveAllMarkers ()
bool SaveTrackableDatabase (std::string fileName)
bool LoadTrackableDatabase (std::string fileName)
void AddMarker (std::shared_ptr< unsigned char > buff, std::string fileName, int width, int height, int uid, float scale)
bool GetTrackablePose (int trackableId, float transMat[3][4])
bool IsTrackableVisible (int trackableId)
void CameraPoseFromPoints (cv::Mat &pose, const std::vector< cv::Point3f > &objPts, const std::vector< cv::Point2f > &imgPts)
bool HasTrackables ()
bool ChangeImageId (int prevId, int newId)
std::vector< int > GetImageIds ()
TrackedImageInfo GetTrackableImageInfo (int trackableId) const
void SetFeatureDetector (FeatureDetectorType detectorType)
FeatureDetectorType GetFeatureDetector (void) const
void SetMaximumNumberOfMarkersToTrack (int maximumNumberOfMarkersToTrack)
int GetMaximumNumberOfMarkersToTrack (void) const

Public Attributes

bool _trackVizActive
TrackerVisualization _trackViz

Constructor & Destructor Documentation

◆ PlanarTrackerImpl()

PlanarTracker::PlanarTrackerImpl::PlanarTrackerImpl ( )
inline
Here is the call graph for this function:

Member Function Documentation

◆ AddMarker()

void PlanarTracker::PlanarTrackerImpl::AddMarker ( std::shared_ptr< unsigned char > buff,
std::string fileName,
int width,
int height,
int uid,
float scale )
inline
Here is the call graph for this function:

◆ CalcPyrDownScaleFactor()

cv::Vec2f PlanarTracker::PlanarTrackerImpl::CalcPyrDownScaleFactor ( int pyrLevel,
int x,
int y )
inline

Calculate the exact scale factor using the same calculation pyrDown uses.

◆ CameraPoseFromPoints()

void PlanarTracker::PlanarTrackerImpl::CameraPoseFromPoints ( cv::Mat & pose,
const std::vector< cv::Point3f > & objPts,
const std::vector< cv::Point2f > & imgPts )
inline

◆ ChangeImageId()

bool PlanarTracker::PlanarTrackerImpl::ChangeImageId ( int prevId,
int newId )
inline

◆ CreateFeatureMask()

cv::Mat PlanarTracker::PlanarTrackerImpl::CreateFeatureMask ( cv::Mat frame)
inline

Creates a mask image where the areas occupied by all currently tracked markers are 0, and all areas outside the markers are 1.

◆ FloorVertexPoints()

std::vector< cv::Point2f > PlanarTracker::PlanarTrackerImpl::FloorVertexPoints ( const std::vector< cv::Point2f > & vertexPoints)
inline

Transform all vertices by the same amount such that the point with the lowest x value moves to x=0 and the point with the lowest y value moves to y=0.

Returns
The transformed points.

◆ GetFeatureDetector()

FeatureDetectorType PlanarTracker::PlanarTrackerImpl::GetFeatureDetector ( void ) const
inline

◆ GetImageIds()

std::vector< int > PlanarTracker::PlanarTrackerImpl::GetImageIds ( )
inline

◆ GetMaximumNumberOfMarkersToTrack()

int PlanarTracker::PlanarTrackerImpl::GetMaximumNumberOfMarkersToTrack ( void ) const
inline

◆ GetTemplateRoi()

cv::Rect PlanarTracker::PlanarTrackerImpl::GetTemplateRoi ( cv::Point2f pt)
inline

◆ GetTrackableImageInfo()

TrackedImageInfo PlanarTracker::PlanarTrackerImpl::GetTrackableImageInfo ( int trackableId) const
inline

◆ GetTrackablePose()

bool PlanarTracker::PlanarTrackerImpl::GetTrackablePose ( int trackableId,
float transMat[3][4] )
inline

◆ GetVerticesFromPoint()

std::vector< cv::Point2f > PlanarTracker::PlanarTrackerImpl::GetVerticesFromPoint ( cv::Point ptOrig,
int width,
int height )
inline

Calculates vertices of a rect centered on ptOrig.

◆ GetVerticesFromTopCorner()

std::vector< cv::Point2f > PlanarTracker::PlanarTrackerImpl::GetVerticesFromTopCorner ( int x,
int y,
int width,
int height )
inline

Calculates vertices of a rect with its top corner located at (x, y).

◆ HasTrackables()

bool PlanarTracker::PlanarTrackerImpl::HasTrackables ( )
inline

◆ InflateRoi()

cv::Rect PlanarTracker::PlanarTrackerImpl::InflateRoi ( const cv::Rect & roi,
int inflationFactor )
inline

Inflate the region of interest bounds by inflationFactor on each side.

Returns
The inflated bounds.

◆ Initialise()

void PlanarTracker::PlanarTrackerImpl::Initialise ( ARParam cParam)
inline
Here is the call graph for this function:

◆ IsRoiValidForFrame()

bool PlanarTracker::PlanarTrackerImpl::IsRoiValidForFrame ( cv::Rect frameRoi,
cv::Rect roi )
inline

◆ IsTrackableVisible()

bool PlanarTracker::PlanarTrackerImpl::IsTrackableVisible ( int trackableId)
inline

◆ LoadTrackableDatabase()

bool PlanarTracker::PlanarTrackerImpl::LoadTrackableDatabase ( std::string fileName)
inline
Here is the call graph for this function:

◆ MatchFeatures()

void PlanarTracker::PlanarTrackerImpl::MatchFeatures ( const std::vector< cv::KeyPoint > & newFrameFeatures,
cv::Mat newFrameDescriptors )
inline
Here is the call graph for this function:

◆ MatchTemplateToImage()

cv::Mat PlanarTracker::PlanarTrackerImpl::MatchTemplateToImage ( cv::Mat searchImage,
cv::Mat warpedTemplate )
inline

Do the Matching and Normalize

◆ ProcessFrame()

void PlanarTracker::PlanarTrackerImpl::ProcessFrame ( cv::Mat frame)
inline
Here is the call graph for this function:

◆ ProcessFrameData()

void PlanarTracker::PlanarTrackerImpl::ProcessFrameData ( unsigned char * frame)
inline

Wrap raw frame data in frame with a cv::Mat structure, then process it for tracking.

As the data is not copied,frame must remain valid for the duration of the call.

Here is the call graph for this function:

◆ RemoveAllMarkers()

void PlanarTracker::PlanarTrackerImpl::RemoveAllMarkers ( )
inline

◆ ResetAllTrackingPointSelectorsForTrackable()

void PlanarTracker::PlanarTrackerImpl::ResetAllTrackingPointSelectorsForTrackable ( int trackableIndex)
inline

◆ RunOpticalFlow()

bool PlanarTracker::PlanarTrackerImpl::RunOpticalFlow ( int trackableId,
const std::vector< cv::Point2f > & trackablePoints,
const std::vector< cv::Point2f > & trackablePointsWarped )
inline
Here is the call graph for this function:

◆ RunTemplateMatching()

bool PlanarTracker::PlanarTrackerImpl::RunTemplateMatching ( cv::Mat frame,
int trackableId )
inline
Here is the call graph for this function:

◆ SaveTrackableDatabase()

bool PlanarTracker::PlanarTrackerImpl::SaveTrackableDatabase ( std::string fileName)
inline

◆ SetFeatureDetector()

void PlanarTracker::PlanarTrackerImpl::SetFeatureDetector ( FeatureDetectorType detectorType)
inline

◆ SetMaximumNumberOfMarkersToTrack()

void PlanarTracker::PlanarTrackerImpl::SetMaximumNumberOfMarkersToTrack ( int maximumNumberOfMarkersToTrack)
inline

◆ UpdateTrackableBBox()

void PlanarTracker::PlanarTrackerImpl::UpdateTrackableBBox ( const int index,
const cv::Mat & homography )
inline

◆ UpdateTrackableHomography()

bool PlanarTracker::PlanarTrackerImpl::UpdateTrackableHomography ( int trackableId,
const std::vector< cv::Point2f > & matchedPoints1,
const std::vector< cv::Point2f > & matchedPoints2 )
inline
Here is the call graph for this function:

Member Data Documentation

◆ _trackViz

TrackerVisualization PlanarTracker::PlanarTrackerImpl::_trackViz

◆ _trackVizActive

bool PlanarTracker::PlanarTrackerImpl::_trackVizActive

The documentation for this class was generated from the following file: