示例#1
0
int main(int argc, const char** argv)
{
    size_t const bufferSize = 64 KB;
    void* const buffer = MALLOC(bufferSize);
    const char* exename = argv[0];
    const char* filename = argv[1];

    assert(argc >= 1);
    if (argc != 2) {
        printf("usage : %s FILENAME \n", exename);
        return 1;   /* usage : exe Filename */
    }

    /* read up to 64 KB from input, then search matches into it */
    {   FILE* const f = FOPEN(filename, "rb");
        size_t const size = FREAD(buffer, 1, bufferSize, f);
        FCLOSE(f);
        printMatches(buffer, size);
    }

    FREE(buffer);
}
示例#2
0
文件: core.cpp 项目: jimmysue/TJ_v2
void performMatching(char *type)
{
    string terrainCtrlsPath,featuresPath,matchesToPassPath;
    readConfigFile(filename,"terrainCtrlsPath",terrainCtrlsPath);
    readConfigFile(filename,"featuresPath",featuresPath);
    readConfigFile(filename,"matchesToPassPath",matchesToPassPath);

    vector<Match> matches;
    readMatches(matchesToPassPath,matches);
    refineMatches(img1,img2,matches,matches,16,1,0.9);
        printMatches("/home/kevin/Documents/win7share/output/aaa.txt",matches);

//    showMatches(img1,img2,terrainCtrls,imagescale);

//    vector<KeyPoint> kpts;
//    readKeyPoints(featuresPath,kpts);
//    vector<Match> matches;
//    matchUnderTerrainControl(img1,img2,terrainCtrls,kpts,matches,16,64,32,.9);
//    cout<<matches.size()<<endl;
//    ransacTest(matches,matches);
//    cout<<matches.size()<<endl;
//    showMatches(img1,img2,matches,imagescale);
//    printMatches(terrainCtrlsPath,matches,1);
}