komrad36 / clatch Goto Github PK
View Code? Open in Web Editor NEWInsanely fast CUDA LATCH: fully scale- and rotation-invariant 512-bit binary descriptor for computer vision
License: MIT License
Insanely fast CUDA LATCH: fully scale- and rotation-invariant 512-bit binary descriptor for computer vision
License: MIT License
Hi,
I'm trying to use the CUDA LATCH processing logic described in the main.cpp file to compare 2 different images for matching.
Objective is to use Brute Force Hamming (Any Binary comparator) to identify the matches between the 2 host descriptors obtained from image 1 and 2 respectively. For KNNMatch to work it expects the data type to be either CV_8UC1/CV_32F.
To use KNNmatch matcher for comparison, I made a Mat object explicitly from the unit64 host descriptor. Conversion of unit64 to either 8U/32F creating data loss so that the KNNMatcher is failing to identify matches across descriptors.
Would like to get your suggestion on how would I convert the unit64 host descriptor to 8U/32F without data loss so that I use any binary comparator to work.
Kindly advice.
std::cout << "Desc 1 " << endl;
uint64_t** tempDesc1 = new uint64_t*[kps1.size()];
int nMark1 = 0;
for (int j=0; j<kps1.size(); j++)
{
tempDesc1[j] = new uint64_t[32];
for (int k = 0; k < 8; k++, nMark1++)
tempDesc1[j][k] = h_GPUdesc1[nMark1];
}
cv::Mat matDesc1(kps1.size(), 8, CV_8UC1, tempDesc1);
std::cout << "Desc 2 " << endl;
uint64_t** tempDesc2 = new uint64_t*[kps2.size()];
int nMark2 = 0;
for (int j=0; j<kps2.size(); j++)
{
tempDesc2[j] = new uint64_t[8];
for ( int k = 0; k < 8; k++, nMark2++)
tempDesc2[j][k] = h_GPUdesc2[nMark2];
}
cv::Mat matDesc2(kps2.size(), 8, CV_8UC1, tempDesc2);
vector<cv::DMatch> good_matches;
cv::BFMatcher matcher(cv::NORM_HAMMING);
vector< vector<cv::DMatch> > matches;
matcher.knnMatch(matDesc1, matDesc2, matches, 2);
Thanks.
Hi @komrad36
There is a problem when I compiled the CLATCH. The error is caused by the following:
cv::Ptr<cv::ORB> orb = cv::ORB::create(numkps, 1.2f, 8, 31, 0, 2, cv::ORB::HARRIS_SCORE, 31, 20);
Would you like to tell me which OpenCV version you use to compile the CLATCH?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.