Hello everyone,
I encountered a thing while fiddling around with the stitching_detailed.cpp tutorial provided on source repository.
Before proceeding please note that I had to improvise myself a C++ developer expert, I hope not to be trivial on my considerations.
In the tutorial, get straight to the point where the `cv::FeaturesMatcher` is defined.
On Eclipse C++ IDE, with fully set up project, the following will not compile (g++):
One can define the matcher in two different ways, one being
Ptr matcher;
matcher = makePtr(try_cuda, match_conf);
(*matcher)(features, pairwise_matches);The issue is on line 3, where we call the matcher as a pointer. When that happens, a conflicting declaration appears to occur within matcher and pairwise_matches.
On the other hand, the following will compile just fine:
And the other, more direct, being
BestOf2NearestMatcher matcher(tryCuda,matchingConfidence);
matcher(features, pairwiseMatches);
matcher.collectGarbage();
**Question:** why would I need to instantiate a matcher as a pointer when it works perfectly fine otherwise?
I wouldn't bother that much myself about it, but here is another (less trivial?) question. The following code works just fine:
cv::Ptr finder;
finder = cv::makePtr();
for(int currentImage=0;currentImage
Thank you for your time.
↧