实例及代码实现——基于PPF"/>
三维识别与位资估计实例及代码实现——基于PPF
准备一个model:ply格式,带法线;
准备一个scene:ply格式,带法线;
#include "opencv2/surface_matching.hpp"
#include <iostream>
#include "opencv2/surface_matching/ppf_helpers.hpp"
#include "opencv2/core/utility.hpp"using namespace std;
using namespace cv;
using namespace ppf_match_3d;static void help(const string& errorMessage)
{cout << "Program init error : "<< errorMessage << endl;cout << "\nUsage : ppf_matching [input model file] [input scene file]"<< endl;cout << "\nPlease start again with new parameters"<< endl;
}int main(int argc, char** argv)
{// welcome messagecout << "****************************************************" << endl;cout << "* Surface Matching demonstration : demonstrates the use of surface matching"" using point pair features." << endl;cout << "* The sample loads a model and a scene, where the model lies in a different"" pose than the training.\n* It then trains the model and searches for it in the"" input scene. The detected poses are further refined by ICP\n* and printed to the "" standard output." << endl;cout << "****************************************************" << endl;// if (argc < 3)//{// help("Not enough input arguments");// exit(1);// }#if (defined __x86_64__ || defined _M_X64)cout << "Running on 64 bits" << endl
更多推荐
三维识别与位资估计实例及代码实现——基于PPF
发布评论