Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature enhancement: PnP algorithm for pose Matrix calculation and other functions improves #23

Merged
merged 35 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c22785c
creating WebARKitPattern struct see #21
kalwalt Nov 1, 2023
e91098e
using push_back to avoid an Seg fault
kalwalt Nov 1, 2023
5e2d37b
getPoseMatrix function and improved computePose
kalwalt Nov 2, 2023
0647381
trying to find the root of the pose matrix issue
kalwalt Nov 3, 2023
d383ac9
cleaning the code
kalwalt Nov 4, 2023
40017fc
The issue arise the wrong camera matrix data
kalwalt Nov 4, 2023
d13feef
this seems to be correct!
kalwalt Nov 4, 2023
bfcebc9
improved classes and features
kalwalt Nov 4, 2023
684d9c6
new WebARKitGL collection of GL functions
kalwalt Nov 5, 2023
809471e
fix for wrong cv headers
kalwalt Nov 5, 2023
e3997cb
values and params should be double
kalwalt Nov 6, 2023
ad15a7f
make GL mfunctions part of ebarkit namespace
kalwalt Nov 6, 2023
d01a0a1
revert to old syntax pattern
kalwalt Nov 6, 2023
0d74031
new cameraProjectionMatrix with gtest
kalwalt Nov 6, 2023
dce5a2a
getCameraProjectioMatrix with gtest
kalwalt Nov 6, 2023
ce4fe4d
fix for: Test issue: impossible to load a jpeg image with imread (Ope…
kalwalt Nov 9, 2023
fe46f86
add to initTracker colorSpace option to let use other colors channels
kalwalt Nov 10, 2023
f6dfcbc
pinball image is 3 channels add support for this type to initTracker
kalwalt Nov 10, 2023
218eda8
processFrameData now may process also RGB data input
kalwalt Nov 10, 2023
022b559
new convert2Grayscale function to avoid repetitions
kalwalt Nov 11, 2023
47e102f
oveloaded convert2Grayscale function and other fixes
kalwalt Nov 13, 2023
8cc8572
testing matrix and cameraProjmatrix
kalwalt Nov 16, 2023
a68af51
sphere is displayed but don't move
kalwalt Nov 18, 2023
bd21912
_isDetected = false should be outside clear_output()
kalwalt Nov 18, 2023
2dff6c4
initTracker as templatized function
kalwalt Nov 18, 2023
04a5bb2
Fix swapImage and other related code
kalwalt Dec 5, 2023
e3cdf48
small improves
kalwalt Mar 3, 2024
63946b4
fix for MIN_NUM_MATCHES failed test
kalwalt Mar 4, 2024
e754f20
move marker dected message inside processFrame
kalwalt Mar 8, 2024
e9c7fb1
new extractFeatures method
kalwalt Mar 15, 2024
afac6e7
new boolean option enablleBlur
kalwalt Mar 20, 2024
6043029
more modularity in the C++ code
kalwalt Mar 31, 2024
16dd102
fix for getMatches function
kalwalt Mar 31, 2024
c78ef5c
fix for numMatches
kalwalt Mar 31, 2024
ef898c4
fix for numMatches format display
kalwalt Mar 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WebARKit/WebARKitPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ void WebARKitPatternTrackingInfo::computePose(std::vector<cv::Point3f>& treeDPoi
cv::Rodrigues(rvec, rMat);
cv::hconcat(rMat, tvec, pose3d);

std::cout << "pose3d: " << pose3d.rows << "x" << pose3d.cols << std::endl;
std::cout << "pose3d: " << pose3d.rows << " x " << pose3d.cols << std::endl;
}
Original file line number Diff line number Diff line change
Expand Up @@ -340,32 +340,11 @@ class WebARKitTracker::WebARKitTrackerImpl {
std::vector<cv::Point2f> getSelectedFeaturesWarped(cv::Mat& H)
{
std::vector<cv::Point2f> warpedPoints;
//std::vector<cv::Point2f> selectedPoints;
/*for(std::vector<TrackedPoint>::iterator it = _selectedPts.begin(); it != _selectedPts.end(); ++it) {
if(it->IsTracking()) {
selectedPoints.push_back(it->pt);
}
}*/
//perspectiveTransform(selectedPoints, warpedPoints, homography);
perspectiveTransform(_pattern.points2d, warpedPoints, H);
WEBARKIT_LOGi("warpedPoint(0,0): %.2f, %.2f\n", warpedPoints[0].x, warpedPoints[0].y);
kalwalt marked this conversation as resolved.
Show resolved Hide resolved
return warpedPoints;
}

/*
std::vector<cv::Point3f> getSelectedFeatures3D(cv::Mat& H)
{
std::vector<cv::Point3f> treeDPoints;
//std::vector<cv::Point2f> selectedPoints;
/*for(std::vector<TrackedPoint>::iterator it = _selectedPts.begin(); it != _selectedPts.end(); ++it) {
if(it->IsTracking()) {
selectedPoints.push_back(it->pt);
}
}*/
//perspectiveTransform(selectedPoints, warpedPoints, homography);
//perspectiveTransform(_pattern.points3d, treeDPoints, H);
//return treeDPoints;
//}*/

bool _valid;

bool _isDetected;
Expand Down