-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new getHomograpyInliers function and WebARKitHomographyInfo class
- issue at line 246 in the track function - debug compilation to get more infos
- Loading branch information
Showing
6 changed files
with
113 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
WebARKit/WebARKitTrackers/WebARKitOpticalTracking/WebARKitHomographyInfo.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <WebARKitTrackers/WebARKitOpticalTracking/WebARKitHomographyInfo.h> | ||
|
||
namespace webarkit { | ||
namespace homography { | ||
|
||
WebARKitHomographyInfo::WebARKitHomographyInfo() { validHomography = false; } | ||
|
||
WebARKitHomographyInfo::WebARKitHomographyInfo(cv::Mat hom, std::vector<uchar> newStatus, | ||
std::vector<cv::DMatch> matches) { | ||
homography = hom; | ||
status = newStatus; | ||
inlier_matches = matches; | ||
if (matches.size() > 4) { | ||
validHomography = true; | ||
} | ||
} | ||
|
||
} // namespace homography | ||
|
||
} // namespace webarkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...OpticalTracking/include/WebARKitTrackers/WebARKitOpticalTracking/WebARKitHomographyInfo.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef WEBARKIT_HOMOGRAPHY_INFO_H | ||
#define WEBARKIT_HOMOGRAPHY_INFO_H | ||
#include "WebARKitConfig.h" | ||
|
||
namespace webarkit { | ||
namespace homography { | ||
|
||
class WebARKitHomographyInfo { | ||
public: | ||
WebARKitHomographyInfo(); | ||
|
||
WebARKitHomographyInfo(cv::Mat hom, std::vector<uchar> newStatus, std::vector<cv::DMatch> matches); | ||
|
||
bool validHomography; | ||
cv::Mat homography; | ||
std::vector<uchar> status; | ||
std::vector<cv::DMatch> inlier_matches; | ||
}; | ||
|
||
} // namespace homography | ||
|
||
} // namespace webarkit | ||
|
||
#endif |
55 changes: 54 additions & 1 deletion
55
.../WebARKitOpticalTracking/include/WebARKitTrackers/WebARKitOpticalTracking/WebARKitUtils.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters